import{X as t,j as e}from"./app-CxHOVtVX.js";import{T as x,a as j,b as i,c as l,d as u,e as r}from"./table-DZw-pRqD.js";import{T as b,u as f}from"./useSorting-CY2acSN8.js";import{u as T,T as g,a as N}from"./useDebouncedSearch-D-2aW_-S.js";import{B as v}from"./button-Bk7o5w0i.js";import{B}from"./badge-DgYuvipX.js";import{P as S}from"./printer-DiAWYWq0.js";import"./utils-CytzSlOG.js";import"./createLucideIcon-C5q1cU9E.js";import"./chevron-left-BKibdH7U.js";import"./chevron-right-Caoj2go0.js";import"./input-CHbmowwm.js";import"./select-_9wqYcJ7.js";import"./Combination-CdjBXhkv.js";import"./index-DHPjb6t2.js";import"./index-CoxD3u_C.js";import"./index-D5p3_XeN.js";import"./index-CiPjYYJ1.js";function K(){t().props.auth.user;const{filters:o}=t().props,p=t().props.datatable,{data:n,links:h}=t().props.datatable,{params:s,setParams:c,setTimeDebounce:d}=T(route(`${route().current()}`),o),{sort:m}=f(o,c);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{placeholder:"Cari sertifikat",search:s.search,params:s,setParams:c,setTimeDebounce:d}),e.jsx("div",{className:"",children:e.jsxs(x,{children:[e.jsx(j,{children:e.jsxs(i,{children:[e.jsx(l,{children:e.jsx(b,{className:"",title:"Pelatihan",onClick:()=>{d(50),m("pelatihan.title")},sort:s.col==="pelatihan.title"?s.sort:null})}),e.jsx(l,{children:"Sertifikat"}),e.jsx(l,{children:"Action"})]})}),e.jsx(u,{children:n.length>0?n.map(a=>e.jsxs(i,{className:"bg-white",children:[e.jsx(r,{children:a.pelatihan.title}),e.jsx(r,{children:"Certificate of completion"}),e.jsxs(r,{children:[a.status=="finish"&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("a",{href:route("sertifikat.print",{id:a.id}),children:e.jsx(v,{variant:"outline",children:e.jsx(S,{className:"w-4 h-4 text-blue-500"})})})}),a.status!=="finish"&&e.jsx(B,{variant:"secondary",className:"bg-orange-400 hover:bg-orange-400 text-white text-center",children:"Belum Selesai"})]})]},a.id)):e.jsx(i,{children:e.jsx(r,{colSpan:6,className:"h-24 text-center bg-white",children:"No results found."})})})]})}),e.jsx(N,{links:h,meta:p})]})}export{K as default};
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]