import{r as m,j as e,X as I,G as U,S as E,x as K}from"./app-CxHOVtVX.js";import{A as O}from"./AuthenticatedLayout--cmUB6oo.js";import{C as n,a as g,b as j,c as y}from"./card-LSMiAnQe.js";import{B as c}from"./button-Bk7o5w0i.js";import{T as k,a as w,b as o,c as l,d as C,e as r}from"./table-DZw-pRqD.js";import{B as V}from"./badge-DgYuvipX.js";import{d as $}from"./index-DHPjb6t2.js";import{c as f}from"./utils-CytzSlOG.js";import{D as G,a as q,b as J,c as X}from"./dialog-BLlwSjJY.js";import{I as A}from"./InputError-C_DWs7eM.js";import{L as T}from"./label-i90iwWue.js";import{I as _}from"./input-CHbmowwm.js";import{P as Y}from"./PrimaryButton-DYsuNtVk.js";import{c as N}from"./createLucideIcon-C5q1cU9E.js";import{S as Q}from"./search-MM6nvd_V.js";import{C as W}from"./circle-plus-BPT49nPy.js";import{G as Z}from"./graduation-cap-Dxo2La1U.js";import{U as ee}from"./users-D0lo1CCg.js";import{z as se}from"./transition-BgiGOvjx.js";import"./dropdown-menu-DMajtl6E.js";import"./toaster-DVflDQ0a.js";import"./index-D5p3_XeN.js";import"./x-DSQmn6v7.js";import"./Combination-CdjBXhkv.js";import"./index-CoxD3u_C.js";import"./chevron-right-Caoj2go0.js";import"./book-open-BwBSHTmx.js";import"./calendar-ClP93Df9.js";import"./award-BsWRyoup.js";/**
* @license lucide-react v0.474.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ae=[["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m16 12 2 2 4-4",key:"mdajum"}],["path",{d:"M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3",key:"8arnkb"}]],te=N("BookOpenCheck",ae);/**
* @license lucide-react v0.474.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ne=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],le=N("CircleAlert",ne);/**
* @license lucide-react v0.474.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const re=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],ie=N("Rocket",re),de=$("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),B=m.forwardRef(({className:a,variant:t,...i},x)=>e.jsx("div",{ref:x,role:"alert",className:f(de({variant:t}),a),...i}));B.displayName="Alert";const S=m.forwardRef(({className:a,...t},i)=>e.jsx("h5",{ref:i,className:f("mb-1 font-medium leading-none tracking-tight",a),...t}));S.displayName="AlertTitle";const D=m.forwardRef(({className:a,...t},i)=>e.jsx("div",{ref:i,className:f("text-sm [&_p]:leading-relaxed",a),...t}));D.displayName="AlertDescription";function Ie({pelatihan:a,aku:t,tugas:i}){const x=I().props.auth.user,[d,h]=m.useState(null),{data:P,setData:p,post:R,errors:b,processing:z,recentlySuccessful:F}=U({file:null,link:"",materi_tugas_id:0}),M=s=>{s.preventDefault(),R(route("kirim-tugas"),{onFinish(){h(null)}})},L=s=>{var v;const u=(v=s.target.files)==null?void 0:v[0];u&&(new FileReader().readAsDataURL(u),p(H=>({...H,[s.target.name]:u})))};return e.jsxs(O,{user:x,header:e.jsx("h2",{className:"font-semibold text-xl text-gray-800 leading-tight",children:"Dashboard"}),children:[e.jsx(E,{title:"Dashboard"}),t!=null&&t.status=="pending"&&e.jsxs(B,{children:[e.jsx(le,{className:"h-4 w-4"}),e.jsx(S,{children:"Status Pendaftaran"}),e.jsx(D,{children:"Terima kasih sudah mendaftar pelatihan. Saat ini status pendfataraanmu sedang diproses oleh admin."})]}),a!=null&&e.jsxs("div",{className:"py-2",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 lg:gap-6 mb-8",children:[e.jsx(n,{className:"bg-[#5BA4CF] text-white",children:e.jsxs(g,{children:[e.jsx(j,{className:"text-sm font-normal",children:"Pelatihan yang diikuti"}),e.jsx("p",{className:"text-lg font-semibold",children:a.title})]})}),e.jsxs(n,{className:"bg-[#E6C88A]",children:[e.jsx(g,{children:e.jsx(j,{className:"text-sm font-normal",children:"Sertifikasi BNSP"})}),e.jsxs(y,{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm",children:"Tidak Ada"}),e.jsx(c,{variant:"outline",className:"bg-white hover:bg-gray-100",children:"Ajukan"})]})]}),e.jsxs(n,{className:"bg-[#4CAF50] text-white",children:[e.jsx(g,{children:e.jsx(j,{className:"text-sm font-normal",children:"Progress Anda"})}),e.jsx(y,{className:"space-y-4",children:e.jsx("h1",{children:"Belum Ada"})})]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Jadwal Pelatihan"}),e.jsx(n,{className:"overflow-auto",children:e.jsxs(k,{children:[e.jsx(w,{className:"bg-gray-200",children:e.jsxs(o,{children:[e.jsx(l,{className:"font-semibold",children:"Kode Unit"}),e.jsx(l,{className:"font-semibold",children:"Kompetensi"}),e.jsx(l,{className:"font-semibold",children:"Tanggal"}),e.jsx(l,{className:"font-semibold",children:"Instruktur"})]})}),e.jsx(C,{children:a.pelatihan_jadwals.map(s=>e.jsxs(o,{children:[e.jsx(r,{className:"font-medium",children:s.code}),e.jsx(r,{children:s.name}),e.jsx(r,{children:s.course_date}),e.jsx(r,{children:s.instructor.nama})]},`jadwal-${s.id}`))})]})})]}),e.jsxs("div",{className:" rounded-lg",children:[e.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Pengumpulan Tugas"}),e.jsx(n,{className:"overflow-auto",children:e.jsxs(k,{children:[e.jsx(w,{className:"bg-gray-200",children:e.jsxs(o,{children:[e.jsx(l,{className:"font-semibold",children:"Tugas"}),e.jsx(l,{className:"font-semibold",children:"Tanggal Akhir Pengumpulan"}),e.jsx(l,{className:"font-semibold ",children:"Status"}),e.jsx(l,{className:"font-semibold text-right",children:"Upload"})]})}),e.jsx(C,{children:i.map(s=>e.jsxs(o,{className:"even:bg-gray-50",children:[e.jsx(r,{children:s.name}),e.jsx(r,{children:s.due_date}),e.jsx(r,{children:s.tugas_pesertas.length>0?s.tugas_pesertas[0].status=="pending"?e.jsx("span",{className:"inline-flex items-center rounded bg-orange-50 px-2 py-0.5 text-xs font-medium text-orange-500 ring-1 ring-inset ring-orange-600/20",children:"Pending"}):s.tugas_pesertas[0].status=="reject"?e.jsx("span",{className:"inline-flex items-center rounded bg-red-50 px-2 py-0.5 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/10",children:"Reject"}):e.jsx("span",{className:"inline-flex items-center rounded bg-green-50 px-2 py-0.5 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:"Approve"}):"-"}),e.jsx(r,{className:"text-right",children:s.tugas_pesertas.length>0?e.jsx(V,{variant:"secondary",className:"bg-emerald-500 hover:bg-emerald-500 text-white",children:"Sudah Dikirim"}):e.jsx(c,{onClick:()=>{s.tugas_pesertas.length<=0&&s.tugas_pesertas[0].status!=="reject"?(h(s),p("materi_tugas_id",s.id)):alert("Anda sudah mengirim tugas")},variant:"secondary",children:"Upload"})})]},`tugas-${s.id}`))})]})})]})]}),a==null&&e.jsxs("div",{className:"text-center max-w-2xl mx-auto py-12",children:[e.jsx("div",{className:"bg-blue-50 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx(ie,{className:"w-8 h-8 text-blue-600"})}),e.jsx("h2",{className:"text-2xl font-bold mb-3",children:"Mulai tingkatkan skill-mu sekarang juga"}),e.jsx("p",{className:"text-gray-600 mb-8",children:"Kamu belum terdaftar di pelatihan manamupun. Yuk cari dan daftar pelatiha untuk meningkatan skill-mu."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.jsx(K,{href:route("course.index"),children:e.jsxs(c,{className:"gap-2",children:[e.jsx(Q,{className:"w-4 h-4"}),"Cari Pelatihan"]})}),e.jsxs(c,{variant:"outline",className:"gap-2",children:[e.jsx(te,{className:"w-4 h-4"}),"Lihat Rekomendasi"]})]}),e.jsxs("div",{className:"mt-12 grid grid-cols-1 sm:grid-cols-3 gap-6 text-left",children:[e.jsxs(n,{className:"p-6",children:[e.jsx(W,{className:"w-8 h-8 text-blue-600 mb-4"}),e.jsx("h3",{className:"font-semibold mb-2",children:"Berbagai macam pelatihan"}),e.jsx("p",{className:"text-sm text-gray-600",children:"Browse through our extensive catalog of professional courses."})]}),e.jsxs(n,{className:"p-6",children:[e.jsx(Z,{className:"w-8 h-8 text-blue-600 mb-4"}),e.jsx("h3",{className:"font-semibold mb-2",children:"Dapatka sertifikat BNSP"}),e.jsx("p",{className:"text-sm text-gray-600",children:"Earn industry-recognized certificates to boost your career."})]}),e.jsxs(n,{className:"p-6",children:[e.jsx(ee,{className:"w-8 h-8 text-blue-600 mb-4"}),e.jsx("h3",{className:"font-semibold mb-2",children:"Bergabung bersama komunitas"}),e.jsx("p",{className:"text-sm text-gray-600",children:"Connect with fellow learners and industry experts."})]})]})]}),e.jsx(G,{open:!!d,onOpenChange:()=>h(null),children:e.jsxs(q,{className:"sm:max-w-[425px] transition-all duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",children:[e.jsx(J,{children:e.jsx(X,{className:"text-xl font-semibold",children:d==null?void 0:d.name})}),e.jsx("div",{children:e.jsxs("form",{onSubmit:M,className:"space-y-2",encType:"multipart/form-data",method:"POST",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"file",children:"File Tugas (Max 50 MB)"}),e.jsx(_,{id:"file",name:"file",type:"file",onChange:s=>L(s),accept:`image/*,
video/*,
application/pdf,
application/msword,
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
application/vnd.ms-excel,
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
application/vnd.ms-powerpoint,
application/vnd.openxmlformats-officedocument.presentationml.presentation,
application/zip`})]}),e.jsx(A,{message:b.file})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"link",children:"Link Tugas"}),e.jsx(_,{id:"link",name:"link",placeholder:"masukan link...",value:P.link,onChange:s=>p("link",s.target.value)})]}),e.jsx(A,{message:b.link})]}),e.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[e.jsx(Y,{disabled:z,children:"Kirim"}),e.jsx(se,{show:F,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:e.jsx("p",{className:"text-sm text-gray-600",children:"Kirim."})})]})]})})]})})]})}export{Ie as default};
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]