Anons79 Mini Shell

Directory : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/
Upload File :
Current File : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/Detail-Dmglqmzq.js

import{X as h,r,G as p,j as e,S as g}from"./app-gfr-ib37.js";import{A as j}from"./AuthenticatedLayout-HhExOOUD.js";import{C as u,a as N,b as f,e as v,c as y,d as b}from"./card-DXOdMjfg.js";import{B as w}from"./button-BO7dBnw7.js";import{L as _}from"./label-x03lUZts.js";import{C as S}from"./calendar-CXXbOxg-.js";import{M as D}from"./map-pin-CoCr5eI9.js";import{U as C}from"./user-Bk5MKx7x.js";import{B as $}from"./book-open-BOJIPqm0.js";import{D as L}from"./download-d-X90xLD.js";import{C as k}from"./clock-DLaATd0D.js";import{S as R}from"./star-67zIrgej.js";import"./index-DdIJVDlg.js";import"./index-DhpnwBoB.js";import"./dropdown-menu-DZqFYVgF.js";import"./index-CkxSt56m.js";import"./toaster-vMB7v3yU.js";import"./x-DtkmEU2x.js";import"./createLucideIcon-CmTsF7We.js";import"./Combination-CS4mfNZZ.js";import"./index-BBgJa0IW.js";import"./chevron-right-CHMZXt5T.js";import"./graduation-cap-Cj1VSrac.js";import"./clipboard-list-CJ4Z33bx.js";import"./award-C238XUBX.js";function ie({pelatihan:s}){const c=h().props.auth.user,d=t=>{switch(t){case"beginner":return"bg-green-100 text-green-800";case"intermediate":return"bg-yellow-100 text-yellow-800";case"advanced":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},[a,i]=r.useState(s.pelatihan_pesertas.length>0?s.pelatihan_pesertas[0].review:0),[n,l]=r.useState(0),[M,B]=r.useState(""),{setData:m,post:o}=p({review:s.pelatihan_pesertas.length>0?s.pelatihan_pesertas[0].review:0,pelatihan_peserta_id:s.pelatihan_pesertas.length>0?s.pelatihan_pesertas[0].id:0}),x=t=>{t.preventDefault(),o(route("pelatihan-peserta.review",{id:s.pelatihan_pesertas.length>0?s.pelatihan_pesertas[0].id:0}),{onFinish:()=>i(0),onSuccess:()=>alert(`Thank you for your ${a}-star review!`),onError:()=>alert("Ops something wrong")})};return e.jsxs(j,{user:c,children:[e.jsx(g,{title:"Pelatihan"}),e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsx("h1",{className:"text-lg font-bold md:text-2xl",children:"Detail Pelatihan"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[e.jsx("div",{className:"p-6 border-b border-gray-200",children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:s.title}),e.jsx("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium ${d(s.level)} capitalize`,children:s.level})]}),e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${s.status?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s.status?"Active":"Inactive"})})]})}),e.jsxs("div",{className:"p-6 grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx(S,{className:"w-5 h-5 text-gray-400 mt-1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-gray-500",children:"Durasi"}),e.jsxs("p",{className:"text-base text-gray-900",children:[new Date(s.start_date).toLocaleDateString()," - ",new Date(s.end_date).toLocaleDateString()]})]})]}),e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx(D,{className:"w-5 h-5 text-gray-400 mt-1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-gray-500",children:"Lokasi"}),e.jsxs("p",{className:"text-base text-gray-900",children:[s.province.name,", ",s.regency.name]})]})]}),e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx(C,{className:"w-5 h-5 text-gray-400 mt-1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-gray-500",children:"Instruktur"}),e.jsx("p",{className:"text-base text-gray-900",children:s.instructor.nama})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Deskripsi"}),e.jsx("p",{className:"text-gray-600",children:s.description}),e.jsx("div",{children:e.jsx("img",{src:`${route("storage.images")}?path=${s.thumbnail}`,alt:"Thumbnail",className:"w-full rounded-lg"})})]})]}),e.jsxs("div",{className:"p-6 border-t border-gray-200",children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[e.jsx($,{className:"w-5 h-5 text-gray-400"}),e.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Materi"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.pelatihan_materis.map(t=>e.jsxs("div",{className:"border rounded-lg p-4 flex justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-gray-900",children:t.name}),e.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Kode: ",t.code]}),e.jsx("p",{className:"text-sm text-gray-600 mt-2",children:t.description})]}),e.jsx("div",{children:e.jsx("a",{href:`${route("storage.file")}?path=${t.file}`,target:"_blank",children:e.jsx(L,{className:"w-5 h-5 text-gray-400"})})})]},t.id))})]}),e.jsxs("div",{className:"p-6 border-t border-gray-200",children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[e.jsx(k,{className:"w-5 h-5 text-gray-400"}),e.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Jadwal"})]}),e.jsx("div",{className:"space-y-4",children:s.pelatihan_jadwals.map(t=>e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-gray-900",children:t.name}),e.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Kode: ",t.code]})]}),e.jsx("div",{className:"text-end",children:e.jsx("p",{className:"text-sm text-gray-500",children:new Date(t.course_date).toLocaleDateString()})})]}),e.jsx("p",{className:"text-sm text-gray-600 mt-2",children:t.description})]},t.id))})]})]}),s.pelatihan_pesertas.length>0&&s.pelatihan_pesertas[0].status=="approve"&&e.jsxs(u,{className:"w-full",children:[e.jsxs(N,{children:[e.jsx(f,{children:"Leave a Review"}),e.jsx(v,{children:"Share your experience with our course"})]}),e.jsxs("form",{onSubmit:x,children:[e.jsx(y,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(_,{htmlFor:"rating",children:"Rating"}),e.jsxs("div",{className:"flex items-center gap-1",id:"rating",children:[[1,2,3,4,5].map(t=>e.jsx("button",{type:"button",className:"focus:outline-none transition-colors",onMouseEnter:()=>l(t),onMouseLeave:()=>l(0),onClick:()=>{i(t),m("review",t)},"aria-label":`${t} star${t!==1?"s":""}`,children:e.jsx(R,{className:`w-8 h-8 ${t<=(n||a)?"fill-yellow-400 text-yellow-400":"text-gray-300"}`})},t)),e.jsx("span",{className:"ml-2 text-sm text-gray-500",children:a>0?`${a} star${a!==1?"s":""}`:"Select a rating"})]})]})}),e.jsx(b,{children:e.jsx(w,{type:"submit",className:"w-full",disabled:a===0,children:"Submit Review"})})]})]})]})]})}export{ie as default};

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]