1import{j as t}from"./index-CkAxGocv.js";import{u as f,r as c}from"./i18n-vendor-Co-krN6G.js";import{g as p,a as g}from"./employeeData-C8aL7inU.js";import{u as N,g as j}from"./employeePhotos-Bk2b9ZIj.js";import{u as b}from"./employeeExitStore-Dzn5jaTi.js";import{m as S}from"./search-BjfNVckD.js";import{e as w,u as E}from"./react-vendor-D5E1hOjb.js";import"./supabase-vendor-Co_IX6oM.js";import"./permissionGuard-BRj1WUDY.js";import"./fileUploadPolicy-Dsb_MFV2.js";import"./browserCache-CpZow4D-.js";import"./logging-BzcNMByf.js";const v=(a,s)=>String(a(`terms.${s}`,{defaultValue:s})),D=a=>{if(!a)return"-";const s=new Date(a);return Number.isNaN(s.getTime())?a:s.toLocaleDateString("en-GB")};function G(){const a=w(),s=E(),{i18n:n,t:x}=f(),l=e=>v(x,e),i=(s==null?void 0:s.searchTerm)??"",r=b(),d=c.useMemo(()=>r.map(e=>e.employeeSnapshot),[r]),h=N(d),o=c.useMemo(()=>r.filter(e=>S(i,[e.employeeId,p(e.employeeSnapshot,n.language),e.employeeSnapshot.idNumber,e.exitDate,e.reason,e.destination,e.exitMethod,e.salaryStatus,e.transactionStatus,e.returnedAt?"Returned":"Exited"])),[n.language,r,i]);return t.jsx("div",{className:"ars-page h-full overflow-auto p-4",children:t.jsx("div",{className:"mx-auto max-w-7xl space-y-4",children:t.jsx("div",{className:"overflow-x-auto rounded-xl border border-slate-200 bg-white shadow-sm",children:t.jsxs("table",{className:"min-w-[640px] w-full text-left text-sm",children:[t.jsx("thead",{className:"bg-slate-50 text-[10px] uppercase tracking-wider text-slate-400",children:t.jsxs("tr",{children:[t.jsx("th",{className:"w-16 px-3 py-2 text-center",children:l("SL")}),t.jsx("th",{className:"px-3 py-2",children:l("Employee")}),t.jsx("th",{className:"px-3 py-2",children:l("Exit Date")}),t.jsx("th",{className:"px-3 py-2",children:l("Transactions")})]})}),t.jsxs("tbody",{className:"divide-y divide-slate-100",children:[o.map((e,u)=>{const y=p(e.employeeSnapshot,n.language),m=j(e.employeeSnapshot,h);return t.jsxs("tr",{onClick:()=>a(`/employees/exited/${e.id}`),className:"cursor-pointer hover:bg-emerald-50/60",children:[t.jsx("td",{className:"px-3 py-2 text-center font-black text-slate-500",children:u+1}),t.jsx("td",{className:"px-3 py-2",children:t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m?t.jsx("img",{src:m,alt:"",loading:"lazy",decoding:"async",className:"h-10 w-10 shrink-0 rounded-lg border border-slate-200 object-cover"}):t.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-emerald-100 bg-emerald-50 text-xs font-black text-emerald-700",children:g(e.employeeSnapshot,n.language)}),t.jsx("p",{className:"min-w-0 truncate font-black text-slate-800",children:y})]})}),t.jsx("td",{className:"px-3 py-2 font-semibold text-slate-700",children:D(e.exitDate)}),t.jsx("td",{className:"max-w-[260px] truncate px-3 py-2 text-slate-600",children:e.transactionStatus||"-"})]},e.id)}),o.length===0&&t.jsx("tr",{children:t.jsx("td",{colSpan:4,className:"px-3 py-10 text-center text-sm font-semibold text-slate-400",children:l("No exited employees found.")})})]})]})})})})}export{G as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.