import{X as o,j as e,x as T,A as f}from"./app-IOXEkjZV.js";import{T as N,a as g,b as n,c as i,d as k,e as t}from"./table-DqH29bHE.js";import{u as w,T as v,a as c,b as C,c as y}from"./useSorting-Cmai0EQf.js";import{B as h}from"./Combination-BNwF1qlx.js";import{P as E,T as D}from"./trash-ByiMiuGK.js";import"./utils-CytzSlOG.js";import"./createLucideIcon-CiCxt4rN.js";import"./chevron-right-jusdPylV.js";import"./input-DSAKdGbg.js";import"./select-Ce0S2nMA.js";import"./index-2qmCrqIB.js";import"./index-4MJacFxF.js";import"./index-Cg-qGOAP.js";import"./index-Dygw6O6N.js";function F(){const{filters:d}=o().props,j=o().props.datatable,{data:m,links:p}=o().props.datatable,{params:a,setParams:x,setTimeDebounce:r}=w(route(`${route().current()}`),d),{sort:l}=C(d,x),u=s=>{var b=window.confirm("Yakin ingin menghapus data ini?");b==!0&&f.post(route("admin.instruktur.destroy",{id:s}),{_method:"DELETE"})};return e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{placeholder:"Cari instruktur",search:a.search,params:a,setParams:x,setTimeDebounce:r}),e.jsx("div",{className:"",children:e.jsxs(N,{children:[e.jsx(g,{children:e.jsxs(n,{children:[e.jsx(i,{children:e.jsx(c,{className:"",title:"Nama",onClick:()=>{r(50),l("nama")},sort:a.col==="nama"?a.sort:null})}),e.jsx(i,{children:e.jsx(c,{className:"",title:"Email",onClick:()=>{r(50),l("email")},sort:a.col==="email"?a.sort:null})}),e.jsx(i,{children:e.jsx(c,{className:"",title:"Role",onClick:()=>{r(50),l("role")},sort:a.col==="role"?a.sort:null})}),e.jsx(i,{children:"Action"})]})}),e.jsx(k,{children:m.length>0?m.map(s=>e.jsxs(n,{className:"bg-white",children:[e.jsx(t,{children:s.nama}),e.jsx(t,{children:s.email}),e.jsx(t,{children:s.role}),e.jsx(t,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{href:route("admin.instruktur.edit",{id:s.id}),children:e.jsx(h,{variant:"secondary",children:e.jsx(E,{className:"w-4 h-4 text-gray-500"})})}),e.jsx(h,{variant:"destructive",onClick:()=>u(s.id),children:e.jsx(D,{className:"w-4 h-4 text-white"})})]})})]},s.id)):e.jsx(n,{children:e.jsx(t,{colSpan:6,className:"h-24 text-center bg-white",children:"No results found."})})})]})}),e.jsx(y,{links:p,meta:j})]})}export{F as default};
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]