This commit is contained in:
yaschalew
2026-07-11 12:17:33 +03:00
parent e9d373ed18
commit 9acfc15f62
468 changed files with 0 additions and 153754 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{d as N,r as c,az as S,j as t,v as u}from"./index-Db-xuq0b.js";import{C as U,a as A,b as y,d as z}from"./card-BBWyxDss.js";import{S as I,a as k,b as w,c as P,d as E}from"./select-BoQxM42A.js";import{A as T}from"./AdvancedTable-CC9ioMU-.js";import{u as F,A as L}from"./ArchivedUserColumnDefn-DQXeUrrA.js";import{u as V}from"./useUnit-C4s9nepK.js";import"./table-D3n3VABd.js";import"./chevron-left-DCpEaNzo.js";import"./utils-BncSPdK1.js";import"./badge-D7JvaQeJ.js";import"./command-Cr0tMDDu.js";import"./search-CM5F2ZRy.js";import"./popover-X-j_SRnG.js";import"./Popover-CzANYrEa.js";import"./use-uncontrolled-C3HRHW6t.js";import"./separator-BaOOgzZX.js";import"./refresh-cw-JB7N413f.js";import"./organizationsService-BEVk8qa1.js";import"./alert-dialog-B5Y0wlSz.js";import"./useEmployeePostions-CMraotEg.js";import"./employeePositionsService-CkHoE9xG.js";import"./ellipsis-vertical-Cs1B3vez.js";import"./square-pen-B91TPB19.js";import"./user-plus-CBq7Z0dQ.js";import"./unitService-CmGVtFHQ.js";const ce=()=>{var p,h,x,g,f;const{user:i}=N(),{getList:j}=V(),[o,b]=c.useState(0),s=10,v=S(),l=i!=null&&i.employee&&i.employee.length>0?i.employee[0].organizationId:void 0,{data:e}=l?j(l,{take:300,skip:0}):{data:void 0},[d,n]=c.useState(((h=(p=e==null?void 0:e.data)==null?void 0:p.items[0])==null?void 0:h.id)||"All");c.useEffect(()=>{var r;((r=e==null?void 0:e.data)==null?void 0:r.items.length)>0&&n(e==null?void 0:e.data.items[0].id)},[(x=e==null?void 0:e.data)==null?void 0:x.items]);const m=r=>{b(r)},{data:a,refetch:C}=F(d,{take:s,skip:o*s});return t.jsx("div",{className:"p-6 space-y-6",children:t.jsxs(U,{className:"col-span-2 shadow-none border-none bg-transparent px-0",children:[t.jsx(A,{className:"flex flex-row justify-between items-center px-0",children:t.jsx(y,{className:"text-xl font-semibold ",children:u("setting.archivedUsers")})}),((f=(g=e==null?void 0:e.data)==null?void 0:g.items)==null?void 0:f.length)>0&&t.jsxs("div",{className:"mb-4 w-1/2",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:u("organization.selectUnit")}),t.jsxs(I,{value:d,onValueChange:r=>n(r),children:[t.jsx(k,{className:"mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",children:t.jsx(w,{placeholder:"Select a Unit"})}),t.jsx(P,{children:e==null?void 0:e.data.items?.map(r=>t.jsx(E,{value:r.id,children:v(r.name)},r.id))})]})]}),t.jsx(z,{className:"px-0",children:t.jsx(T,{columns:L,data:(a==null?void 0:a.items)||[],tableName:"ArchivedUsers",toolBarPosition:"right",itemCount:(a==null?void 0:a.count)||0,pageIndex:o,onPageChange:m,nextFunction:a!=null&&a.count&&a.count>(o+1)*s?()=>m(o+1):()=>{},prevFunction:o>0?()=>m(Math.max(o-1,0)):()=>{},refresh:C})})]})})};export{ce as default};

View File

@@ -1 +0,0 @@
import{d as N,r as c,az as S,j as t,v as u}from"./index-7T7TTikv.js";import{C as U,a as A,b as y,d as z}from"./card-_ldW-koX.js";import{S as I,a as k,b as w,c as P,d as E}from"./select--i8koVXg.js";import{A as T}from"./AdvancedTable-vWyUWUDX.js";import{u as F,A as L}from"./ArchivedUserColumnDefn-Ja27QDEy.js";import{u as V}from"./useUnit-CRt6YBLp.js";import"./table-D_B7hhqb.js";import"./chevron-left-G_a9-f9o.js";import"./utils-N2wtfq7C.js";import"./badge-D4t6Wb1T.js";import"./command-B6S1IvD4.js";import"./search-y8VSu0lZ.js";import"./popover-CSKEA8hg.js";import"./Popover-BSKEfTKH.js";import"./use-uncontrolled-tg0LIUAX.js";import"./separator-BXi_hr72.js";import"./refresh-cw-B7fipPS4.js";import"./organizationsService-DIFVjoLn.js";import"./alert-dialog-DwppaTz4.js";import"./useEmployeePostions-BZG3u-zs.js";import"./employeePositionsService-C7MSoCNC.js";import"./ellipsis-vertical-CoMd89ns.js";import"./square-pen-Dh1zj83N.js";import"./user-plus-tzUBEFtH.js";import"./unitService-DTtkt-Pb.js";const ce=()=>{var p,h,x,g,f;const{user:i}=N(),{getList:j}=V(),[o,b]=c.useState(0),s=10,v=S(),l=i!=null&&i.employee&&i.employee.length>0?i.employee[0].organizationId:void 0,{data:e}=l?j(l,{take:300,skip:0}):{data:void 0},[d,n]=c.useState(((h=(p=e==null?void 0:e.data)==null?void 0:p.items[0])==null?void 0:h.id)||"All");c.useEffect(()=>{var r;((r=e==null?void 0:e.data)==null?void 0:r.items.length)>0&&n(e==null?void 0:e.data.items[0].id)},[(x=e==null?void 0:e.data)==null?void 0:x.items]);const m=r=>{b(r)},{data:a,refetch:C}=F(d,{take:s,skip:o*s});return t.jsx("div",{className:"p-6 space-y-6",children:t.jsxs(U,{className:"col-span-2 shadow-none border-none bg-transparent px-0",children:[t.jsx(A,{className:"flex flex-row justify-between items-center px-0",children:t.jsx(y,{className:"text-xl font-semibold ",children:u("setting.archivedUsers")})}),((f=(g=e==null?void 0:e.data)==null?void 0:g.items)==null?void 0:f.length)>0&&t.jsxs("div",{className:"mb-4 w-1/2",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:u("organization.selectUnit")}),t.jsxs(I,{value:d,onValueChange:r=>n(r),children:[t.jsx(k,{className:"mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",children:t.jsx(w,{placeholder:"Select a Unit"})}),t.jsx(P,{children:e==null?void 0:e.data.items.map(r=>t.jsx(E,{value:r.id,children:v(r.name)},r.id))})]})]}),t.jsx(z,{className:"px-0",children:t.jsx(T,{columns:L,data:(a==null?void 0:a.items)||[],tableName:"ArchivedUsers",toolBarPosition:"right",itemCount:(a==null?void 0:a.count)||0,pageIndex:o,onPageChange:m,nextFunction:a!=null&&a.count&&a.count>(o+1)*s?()=>m(o+1):()=>{},prevFunction:o>0?()=>m(Math.max(o-1,0)):()=>{},refresh:C})})]})})};export{ce as default};

View File

@@ -1,6 +0,0 @@
import{y as S,u as R,d as T,az as B,r as l,j as e,B as d,A as F}from"./index-7T7TTikv.js";import{C as K,a as L,b as M,d as q}from"./card-_ldW-koX.js";import{S as E,a as V,b as _,c as H,d as G}from"./select--i8koVXg.js";import{A as j}from"./AdvancedTable-vWyUWUDX.js";import{u as J}from"./useUnit-CRt6YBLp.js";import{a as O,b as Q,u as W}from"./useArchived-5V0W60Gf.js";import{A as N}from"./archive-restore-CbEMfc7_.js";import"./table-D_B7hhqb.js";import"./chevron-left-G_a9-f9o.js";import"./utils-N2wtfq7C.js";import"./badge-D4t6Wb1T.js";import"./command-B6S1IvD4.js";import"./search-y8VSu0lZ.js";import"./popover-CSKEA8hg.js";import"./Popover-BSKEfTKH.js";import"./use-uncontrolled-tg0LIUAX.js";import"./separator-BXi_hr72.js";import"./refresh-cw-B7fipPS4.js";import"./unitService-DTtkt-Pb.js";import"./positionService-BwPU5sNe.js";import"./organizationsService-DIFVjoLn.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X=[["path",{d:"M18 21a6 6 0 0 0-12 0",key:"kaz2du"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Y=S("square-user-round",X),fe=()=>{var y;const{t}=R(),{user:i}=T(),m=B(),{getList:A}=J(),h=i!=null&&i.employee&&i.employee.length>0?i.employee[0].organizationId:void 0,[r,x]=l.useState("units"),[u,g]=l.useState(""),{data:p}=h?A(h,{take:300,skip:0}):{data:void 0},c=((y=p==null?void 0:p.data)==null?void 0:y.items)??[];!u&&c.length>0&&g(c[0].id);const{data:a,refetch:b}=O(h),{data:n,refetch:k}=Q(u||void 0),{restoreUnit:C,isRestoringUnit:U,restorePosition:z,isRestoringPosition:P}=W(),v=l.useMemo(()=>(a==null?void 0:a.items)??a??[],[a]),f=l.useMemo(()=>(n==null?void 0:n.items)??n??[],[n]),I=[{id:"name",header:t("organization.name","Name"),cell:({row:s})=>{var o;return m((o=s.original)==null?void 0:o.name)||"—"}},{id:"key",header:t("organization.key","Key"),accessorKey:"key"},{id:"actions",header:t("userIncomingretun.Actions","Actions"),cell:({row:s})=>e.jsxs(d,{size:"sm",variant:"outline",disabled:U,onClick:()=>C(s.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(N,{className:"h-4 w-4"}),t("archive.restore","Restore")]})}],w=[{id:"name",header:t("organization.name","Name"),cell:({row:s})=>{var o;return m((o=s.original)==null?void 0:o.name)||"—"}},{id:"key",header:t("organization.key","Key"),accessorKey:"key"},{id:"actions",header:t("userIncomingretun.Actions","Actions"),cell:({row:s})=>e.jsxs(d,{size:"sm",variant:"outline",disabled:P,onClick:()=>z(s.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(N,{className:"h-4 w-4"}),t("archive.restore","Restore")]})}];return e.jsx("div",{className:"p-6 space-y-6",children:e.jsxs(K,{className:"shadow-none border-none bg-transparent px-0",children:[e.jsx(L,{className:"flex flex-row justify-between items-center px-0",children:e.jsx(M,{className:"text-xl font-semibold",children:t("archive.archivedItems","Archived Items")})}),e.jsxs("div",{className:"flex gap-2 mb-4",children:[e.jsxs(d,{variant:r==="units"?"default":"outline",onClick:()=>x("units"),className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-4 w-4"}),t("archive.archivedUnits","Archived Units")]}),e.jsxs(d,{variant:r==="positions"?"default":"outline",onClick:()=>x("positions"),className:"flex items-center gap-2",children:[e.jsx(Y,{className:"h-4 w-4"}),t("archive.archivedPositions","Archived Positions")]})]}),r==="positions"&&c.length>0&&e.jsxs("div",{className:"mb-4 w-full sm:w-1/2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-200",children:t("organization.selectUnit","Select Unit")}),e.jsxs(E,{value:u,onValueChange:s=>g(s),children:[e.jsx(V,{className:"mt-1 block w-full",children:e.jsx(_,{placeholder:t("organization.selectUnit")})}),e.jsx(H,{children:c.map(s=>e.jsx(G,{value:s.id,children:m(s.name)},s.id))})]})]}),e.jsx(q,{className:"px-0",children:r==="units"?e.jsx(j,{columns:I,data:v,tableName:"ArchivedUnits",toolBarPosition:"right",itemCount:v.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:b}):e.jsx(j,{columns:w,data:f,tableName:"ArchivedPositions",toolBarPosition:"right",itemCount:f.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:k})})]})})};export{fe as default};

View File

@@ -1,6 +0,0 @@
import{y as S,u as R,d as T,az as B,r as l,j as e,B as d,A as F}from"./index-Db-xuq0b.js";import{C as K,a as L,b as M,d as q}from"./card-BBWyxDss.js";import{S as E,a as V,b as _,c as H,d as G}from"./select-BoQxM42A.js";import{A as j}from"./AdvancedTable-CC9ioMU-.js";import{u as J}from"./useUnit-C4s9nepK.js";import{a as O,b as Q,u as W}from"./useArchived-D2u5xEKl.js";import{A as N}from"./archive-restore-CST5LuiK.js";import"./table-D3n3VABd.js";import"./chevron-left-DCpEaNzo.js";import"./utils-BncSPdK1.js";import"./badge-D7JvaQeJ.js";import"./command-Cr0tMDDu.js";import"./search-CM5F2ZRy.js";import"./popover-X-j_SRnG.js";import"./Popover-CzANYrEa.js";import"./use-uncontrolled-C3HRHW6t.js";import"./separator-BaOOgzZX.js";import"./refresh-cw-JB7N413f.js";import"./unitService-CmGVtFHQ.js";import"./positionService-JD0NEiGK.js";import"./organizationsService-BEVk8qa1.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X=[["path",{d:"M18 21a6 6 0 0 0-12 0",key:"kaz2du"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Y=S("square-user-round",X),fe=()=>{var y;const{t}=R(),{user:i}=T(),m=B(),{getList:A}=J(),h=i!=null&&i.employee&&i.employee.length>0?i.employee[0].organizationId:void 0,[r,x]=l.useState("units"),[u,g]=l.useState(""),{data:p}=h?A(h,{take:300,skip:0}):{data:void 0},c=((y=p==null?void 0:p.data)==null?void 0:y.items)??[];!u&&c.length>0&&g(c[0].id);const{data:a,refetch:b}=O(h),{data:n,refetch:k}=Q(u||void 0),{restoreUnit:C,isRestoringUnit:U,restorePosition:z,isRestoringPosition:P}=W(),v=l.useMemo(()=>(a==null?void 0:a.items)??a??[],[a]),f=l.useMemo(()=>(n==null?void 0:n.items)??n??[],[n]),I=[{id:"name",header:t("organization.name","Name"),cell:({row:s})=>{var o;return m((o=s.original)==null?void 0:o.name)||"—"}},{id:"key",header:t("organization.key","Key"),accessorKey:"key"},{id:"actions",header:t("userIncomingretun.Actions","Actions"),cell:({row:s})=>e.jsxs(d,{size:"sm",variant:"outline",disabled:U,onClick:()=>C(s.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(N,{className:"h-4 w-4"}),t("archive.restore","Restore")]})}],w=[{id:"name",header:t("organization.name","Name"),cell:({row:s})=>{var o;return m((o=s.original)==null?void 0:o.name)||"—"}},{id:"key",header:t("organization.key","Key"),accessorKey:"key"},{id:"actions",header:t("userIncomingretun.Actions","Actions"),cell:({row:s})=>e.jsxs(d,{size:"sm",variant:"outline",disabled:P,onClick:()=>z(s.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(N,{className:"h-4 w-4"}),t("archive.restore","Restore")]})}];return e.jsx("div",{className:"p-6 space-y-6",children:e.jsxs(K,{className:"shadow-none border-none bg-transparent px-0",children:[e.jsx(L,{className:"flex flex-row justify-between items-center px-0",children:e.jsx(M,{className:"text-xl font-semibold",children:t("archive.archivedItems","Archived Items")})}),e.jsxs("div",{className:"flex gap-2 mb-4",children:[e.jsxs(d,{variant:r==="units"?"default":"outline",onClick:()=>x("units"),className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-4 w-4"}),t("archive.archivedUnits","Archived Units")]}),e.jsxs(d,{variant:r==="positions"?"default":"outline",onClick:()=>x("positions"),className:"flex items-center gap-2",children:[e.jsx(Y,{className:"h-4 w-4"}),t("archive.archivedPositions","Archived Positions")]})]}),r==="positions"&&c.length>0&&e.jsxs("div",{className:"mb-4 w-full sm:w-1/2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-200",children:t("organization.selectUnit","Select Unit")}),e.jsxs(E,{value:u,onValueChange:s=>g(s),children:[e.jsx(V,{className:"mt-1 block w-full",children:e.jsx(_,{placeholder:t("organization.selectUnit")})}),e.jsx(H,{children:c?.map(s=>e.jsx(G,{value:s.id,children:m(s.name)},s.id))})]})]}),e.jsx(q,{className:"px-0",children:r==="units"?e.jsx(j,{columns:I,data:v,tableName:"ArchivedUnits",toolBarPosition:"right",itemCount:v.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:b}):e.jsx(j,{columns:w,data:f,tableName:"ArchivedPositions",toolBarPosition:"right",itemCount:f.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:k})})]})})};export{fe as default};

View File

@@ -1 +0,0 @@
import{d as v}from"./organizationsService-BEVk8qa1.js";import{n as j,r as d,u as A,k as f,j as e,B as g,aF as w,f as D,aA as y,aB as b,aC as C,aD as N,v as o,aE as x,b_ as S,az as E}from"./index-Db-xuq0b.js";import{A as O,a as M,b as R,c as U,d as T,e as B,f as L}from"./alert-dialog-B5Y0wlSz.js";import{u as z,T as F}from"./useEmployeePostions-CMraotEg.js";import{E as I}from"./ellipsis-vertical-Cs1B3vez.js";import{S as k}from"./square-pen-B91TPB19.js";import{U as q}from"./user-plus-CBq7Z0dQ.js";import{B as K}from"./badge-D7JvaQeJ.js";const Z=(s,r)=>j({queryKey:["archived-users",s,r],queryFn:async()=>{if(!s)return{items:[],count:0};const{data:a}=await v(s,r);return a},enabled:!!s}),P=({isOpen:s,onClose:r,userId:a})=>{const{activateUser:t,isActivatingUser:i}=z(),[n,c]=d.useState(!1),{t:l}=A(),{handleError:u}=f(l),h=async()=>{try{await t({payload:a,successCallback:()=>{r()}}),c(!0)}catch(m){u(m)}};return e.jsx(O,{open:s,onOpenChange:r,children:e.jsxs(M,{children:[e.jsxs(R,{children:[e.jsx(U,{children:"Remove team member from this position?"}),e.jsx(T,{children:"Are you sure you want to activate this archived user? This action will restore the user's access and data within the organization."})]}),e.jsxs(B,{children:[e.jsx(L,{disabled:n,children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:h,disabled:n,children:[i&&e.jsx(w,{className:"h-4 w-4 mr-2 animate-spin"}),"Confirm"]})]})]})})},H=({row:s})=>{const r=D(),[a,t]=d.useState(!1),[i,n]=d.useState(!1),[c,l]=d.useState(!1),u=()=>{r(`/user-management/archive/edit/${s==null?void 0:s.userId}`)},h=p=>{p.preventDefault(),t(!1),n(!0)},m=()=>{l(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs(y,{open:a,onOpenChange:t,children:[e.jsx(b,{asChild:!0,children:e.jsxs(g,{variant:"ghost",className:"h-8 w-8 p-0",children:[e.jsx(I,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Open actions menu"})]})}),e.jsxs(C,{align:"end",onInteractOutside:p=>{p.target.closest('[role="dialog"]')||t(!1)},children:[e.jsx(N,{children:o("userRecord.Actions")}),e.jsxs(x,{onSelect:u,className:"cursor-pointer hover:!text-primary-700 !bg-transparent !transition-colors duration-200",children:[e.jsx(k,{className:"mr-2 h-4 w-4 group-hover:text-white transition-colors duration-200"}),e.jsxs("span",{children:[" ",o("userRecord.Edit")]})]}),e.jsxs(x,{onSelect:m,className:"cursor-pointer hover:!text-primary-700 !bg-transparent !transition-colors duration-200",children:[e.jsx(q,{className:"mr-2 h-4 w-4 group-hover:text-white transition-colors duration-200"}),e.jsxs("span",{children:[" ",o("userRecord.Activate")]})]}),e.jsx(S,{}),e.jsxs(x,{onSelect:h,className:"text-red-600 cursor-pointer hover:!text-red-800 !bg-transparent !transition-colors duration-200",children:[e.jsx(F,{className:"mr-2 h-4 w-4 text-red-600 group-hover:text-white transition-colors duration-200"}),e.jsxs("span",{children:[" ",o("userRecord.Delete")]})]})]})]}),c&&e.jsx(P,{isOpen:c,onClose:()=>l(!1),userId:s.id})]})},ee=[{accessorKey:"name",header:()=>o("setting.Name"),cell:({row:s})=>{var t;const r=E(),a=(t=s.original)==null?void 0:t.name;return e.jsx("span",{children:r(a)})}},{accessorKey:"status",header:()=>o("userRecord.Status"),cell:({row:s})=>{var i;const r=(i=s.original)==null?void 0:i.status,a=n=>{switch(n.toLowerCase()){case"inactive":return"bg-red-100 text-red-600 hover:bg-red-100";case"active":return"bg-primary-100 text-primary-600 hover:bg-primary-100";default:return"bg-gray-100 text-gray-600 hover:bg-gray-100"}},t=n=>{switch(n.toLowerCase()){case"inactive":return"InActive";case"active":return"Active";default:return"Not Available"}};return e.jsx("div",{children:e.jsx(K,{className:`${a(r)} rounded-full px-6 py-1 font-medium`,children:t(r)})})}},{id:"actions",header:()=>o("userRecord.Actions"),cell:({row:s})=>e.jsx(H,{row:s.original})}];export{ee as A,Z as u};

View File

@@ -1 +0,0 @@
import{d as v}from"./organizationsService-DIFVjoLn.js";import{n as j,r as d,u as A,k as f,j as e,B as g,aF as w,f as D,aA as y,aB as b,aC as C,aD as N,v as o,aE as x,b_ as S,az as E}from"./index-7T7TTikv.js";import{A as O,a as M,b as R,c as U,d as T,e as B,f as L}from"./alert-dialog-DwppaTz4.js";import{u as z,T as F}from"./useEmployeePostions-BZG3u-zs.js";import{E as I}from"./ellipsis-vertical-CoMd89ns.js";import{S as k}from"./square-pen-Dh1zj83N.js";import{U as q}from"./user-plus-tzUBEFtH.js";import{B as K}from"./badge-D4t6Wb1T.js";const Z=(s,r)=>j({queryKey:["archived-users",s,r],queryFn:async()=>{if(!s)return{items:[],count:0};const{data:a}=await v(s,r);return a},enabled:!!s}),P=({isOpen:s,onClose:r,userId:a})=>{const{activateUser:t,isActivatingUser:i}=z(),[n,c]=d.useState(!1),{t:l}=A(),{handleError:u}=f(l),h=async()=>{try{await t({payload:a,successCallback:()=>{r()}}),c(!0)}catch(m){u(m)}};return e.jsx(O,{open:s,onOpenChange:r,children:e.jsxs(M,{children:[e.jsxs(R,{children:[e.jsx(U,{children:"Remove team member from this position?"}),e.jsx(T,{children:"Are you sure you want to activate this archived user? This action will restore the user's access and data within the organization."})]}),e.jsxs(B,{children:[e.jsx(L,{disabled:n,children:"Cancel"}),e.jsxs(g,{variant:"destructive",onClick:h,disabled:n,children:[i&&e.jsx(w,{className:"h-4 w-4 mr-2 animate-spin"}),"Confirm"]})]})]})})},H=({row:s})=>{const r=D(),[a,t]=d.useState(!1),[i,n]=d.useState(!1),[c,l]=d.useState(!1),u=()=>{r(`/user-management/archive/edit/${s==null?void 0:s.userId}`)},h=p=>{p.preventDefault(),t(!1),n(!0)},m=()=>{l(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs(y,{open:a,onOpenChange:t,children:[e.jsx(b,{asChild:!0,children:e.jsxs(g,{variant:"ghost",className:"h-8 w-8 p-0",children:[e.jsx(I,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Open actions menu"})]})}),e.jsxs(C,{align:"end",onInteractOutside:p=>{p.target.closest('[role="dialog"]')||t(!1)},children:[e.jsx(N,{children:o("userRecord.Actions")}),e.jsxs(x,{onSelect:u,className:"cursor-pointer hover:!text-primary-700 !bg-transparent !transition-colors duration-200",children:[e.jsx(k,{className:"mr-2 h-4 w-4 group-hover:text-white transition-colors duration-200"}),e.jsxs("span",{children:[" ",o("userRecord.Edit")]})]}),e.jsxs(x,{onSelect:m,className:"cursor-pointer hover:!text-primary-700 !bg-transparent !transition-colors duration-200",children:[e.jsx(q,{className:"mr-2 h-4 w-4 group-hover:text-white transition-colors duration-200"}),e.jsxs("span",{children:[" ",o("userRecord.Activate")]})]}),e.jsx(S,{}),e.jsxs(x,{onSelect:h,className:"text-red-600 cursor-pointer hover:!text-red-800 !bg-transparent !transition-colors duration-200",children:[e.jsx(F,{className:"mr-2 h-4 w-4 text-red-600 group-hover:text-white transition-colors duration-200"}),e.jsxs("span",{children:[" ",o("userRecord.Delete")]})]})]})]}),c&&e.jsx(P,{isOpen:c,onClose:()=>l(!1),userId:s.id})]})},ee=[{accessorKey:"name",header:()=>o("setting.Name"),cell:({row:s})=>{var t;const r=E(),a=(t=s.original)==null?void 0:t.name;return e.jsx("span",{children:r(a)})}},{accessorKey:"status",header:()=>o("userRecord.Status"),cell:({row:s})=>{var i;const r=(i=s.original)==null?void 0:i.status,a=n=>{switch(n.toLowerCase()){case"inactive":return"bg-red-100 text-red-600 hover:bg-red-100";case"active":return"bg-primary-100 text-primary-600 hover:bg-primary-100";default:return"bg-gray-100 text-gray-600 hover:bg-gray-100"}},t=n=>{switch(n.toLowerCase()){case"inactive":return"InActive";case"active":return"Active";default:return"Not Available"}};return e.jsx("div",{children:e.jsx(K,{className:`${a(r)} rounded-full px-6 py-1 font-medium`,children:t(r)})})}},{id:"actions",header:()=>o("userRecord.Actions"),cell:({row:s})=>e.jsx(H,{row:s.original})}];export{ee as A,Z as u};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{r as n,j as r,bj as c}from"./index-7T7TTikv.js";import{u as z}from"./useOrganizations-CPt4mkXS.js";import{O}from"./OrganizationForm-BNuDw3k3.js";import"./organizationsService-DIFVjoLn.js";import"./select--i8koVXg.js";import"./card-_ldW-koX.js";import"./label-CABYEcfW.js";import"./useOrganizationTypes-CQm1BLlI.js";import"./index.esm-BRNlF2G3.js";import"./zod-D-9d3Txu.js";import"./switch-D9hx8CZw.js";import"./Switch-ByfhjkDo.js";import"./InputsGroupFieldset-B16dMH0P.js";import"./use-uncontrolled-tg0LIUAX.js";const f=({id:i})=>{const[a,e]=n.useState(),{editOrganization:s,isEditing:m,getOrganizationByDetails:p}=z("Org"),g=()=>{p(i,{onSuccess:t=>{e(t)}})};n.useEffect(()=>{g()},[]);const d=t=>{const o={key:t.key,name:t.name,organizationTypeId:t.organizationTypeId,isGovernmentOrganization:t.isGovernmentOrganization};t.parentId&&t.parentId!==""&&(o.parentId=t.parentId),s({id:i,payload:o})};return r.jsx(O,{isLoading:m,onSubmit:t=>d(t),type:"Edit",organizationDetails:a})},h=()=>{const{id:i}=c();return i&&r.jsx(f,{id:i})};export{h as default};

View File

@@ -1 +0,0 @@
import{r as n,j as r,bj as c}from"./index-Db-xuq0b.js";import{u as z}from"./useOrganizations-DiuNBweX.js";import{O}from"./OrganizationForm-Dc20iiRT.js";import"./organizationsService-BEVk8qa1.js";import"./select-BoQxM42A.js";import"./card-BBWyxDss.js";import"./label-CsFy6wpo.js";import"./useOrganizationTypes-B6vCp97C.js";import"./index.esm-BG4gweZJ.js";import"./zod-Df58YiJ6.js";import"./switch-BNCD27Bd.js";import"./Switch-DSHMk-sj.js";import"./InputsGroupFieldset-COkNgcEo.js";import"./use-uncontrolled-C3HRHW6t.js";const f=({id:i})=>{const[a,e]=n.useState(),{editOrganization:s,isEditing:m,getOrganizationByDetails:p}=z("Org"),g=()=>{p(i,{onSuccess:t=>{e(t)}})};n.useEffect(()=>{g()},[]);const d=t=>{const o={key:t.key,name:t.name,organizationTypeId:t.organizationTypeId,isGovernmentOrganization:t.isGovernmentOrganization};t.parentId&&t.parentId!==""&&(o.parentId=t.parentId),s({id:i,payload:o})};return r.jsx(O,{isLoading:m,onSubmit:t=>d(t),type:"Edit",organizationDetails:a})},h=()=>{const{id:i}=c();return i&&r.jsx(f,{id:i})};export{h as default};

View File

@@ -1 +0,0 @@
import{u as b,f as w,r as l,j as e,H as j,I as N,B as h,h as y,t as p}from"./index-Db-xuq0b.js";import{b as v}from"./Utils-BP0IYDrC.js";import{L as k}from"./lock-BCybB-Lq.js";import{P as C}from"./phone-Ce15UUGI.js";import{M as f}from"./mail-bwr0seHR.js";import{R as P}from"./refresh-cw-JB7N413f.js";import{A as S}from"./arrow-left-CE5-YfaQ.js";const F=()=>{const{t:s}=b(),t=w(),[n,u]=l.useState(""),[d,c]=l.useState(!1),[m,a]=l.useState(""),g=async o=>{o.preventDefault(),a("");let r=n;if(!v(r)){a(s("forgotpassword.invalidphone"));return}r.startsWith("0")&&(r="+251"+r.slice(1)),c(!0);try{await y(r),p.success(s("forgotpassword.success"),{description:s("forgotpassword.successdesc")}),setTimeout(()=>t("/"),3e3)}catch(i){const x=(i==null?void 0:i.message)||s("forgotpassword.fail");a(x),p.error(s("forgotpassword.fail"),{description:x})}finally{c(!1)}};return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-cyan-50 via-white to-primary-50 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-cyan-100/30 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-96 h-96 bg-primary-100/30 rounded-full blur-3xl"}),e.jsxs("button",{onClick:()=>t("/"),className:"absolute top-6 left-6 z-10 flex items-center gap-2 px-4 py-2 bg-white/80 backdrop-blur-sm hover:bg-white rounded-full shadow-md hover:shadow-lg transition-all duration-300 group",children:[e.jsx(j,{className:"w-4 h-4 text-primary group-hover:scale-110 transition-transform"}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:s("forgotpassword.home")})]}),e.jsx("div",{className:"relative min-h-screen flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-gray-100 overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-primary to-primary-500 p-8 text-center relative",children:[e.jsx("div",{className:"absolute inset-0 bg-white/5"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-16 h-16 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(k,{className:"w-8 h-8 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:s("forgotpassword.title")}),e.jsx("p",{className:"text-cyan-50 text-sm",children:s("forgotpassword.subtitle")})]})]}),e.jsx("div",{className:"p-8",children:e.jsxs("form",{onSubmit:g,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[e.jsx(C,{className:"w-4 h-4 text-primary"}),s("forgotpassword.phone")]}),e.jsx("div",{className:"relative",children:e.jsx(N,{type:"tel",placeholder:s("forgotpassword.phoneplaceholder"),className:"h-12 rounded-lg border-gray-200 px-4 text-sm focus:border-primary focus:ring-primary transition-all",value:n,onChange:o=>{u(o.target.value),a("")},required:!0})}),m&&e.jsxs("div",{className:"flex items-start gap-2 p-3 bg-red-50 border border-red-100 rounded-lg",children:[e.jsx("div",{className:"w-1 h-1 bg-red-500 rounded-full mt-1.5"}),e.jsx("p",{className:"text-sm text-red-600 flex-1",children:m})]})]}),e.jsxs("div",{className:"flex items-start gap-3 p-4 bg-cyan-50 border border-cyan-100 rounded-lg",children:[e.jsx(f,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-700 font-medium mb-1",children:s("forgotpassword.checkphone")}),e.jsx("p",{className:"text-xs text-gray-600",children:s("forgotpassword.checkdesc")})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(h,{type:"submit",className:"w-full h-12 bg-primary hover:bg-primary-500 text-white text-sm font-medium rounded-lg shadow-md hover:shadow-lg transition-all duration-300",disabled:d,children:d?e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx(P,{className:"animate-spin h-5 w-5"}),s("forgotpassword.sending")]}):e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx(f,{className:"h-5 w-5"}),s("forgotpassword.sendresetlink")]})}),e.jsxs(h,{type:"button",variant:"outline",className:"w-full h-12 text-sm font-medium border-gray-200 hover:bg-gray-50 rounded-lg transition-all duration-300 bg-transparent",onClick:()=>t("/login"),children:[e.jsx(S,{className:"h-4 w-4 mr-2"}),s("forgotpassword.backtologin")]})]})]})})]}),e.jsxs("p",{className:"text-center text-sm text-gray-500 mt-6",children:[s("forgotpassword.remember")," ",e.jsx("button",{onClick:()=>t("/login"),className:"text-primary hover:text-primary-500 font-medium transition-colors",children:s("forgotpassword.signin")})]})]})})]})};export{F as ForgotPassword,F as default};

View File

@@ -1 +0,0 @@
import{u as b,f as w,r as l,j as e,H as j,I as N,B as h,h as y,t as p}from"./index-7T7TTikv.js";import{b as v}from"./Utils-BP0IYDrC.js";import{L as k}from"./lock-DGEqses-.js";import{P as C}from"./phone-w_VmAt3l.js";import{M as f}from"./mail-q8lHlEPt.js";import{R as P}from"./refresh-cw-B7fipPS4.js";import{A as S}from"./arrow-left-mae9HpSL.js";const F=()=>{const{t:s}=b(),t=w(),[n,u]=l.useState(""),[d,c]=l.useState(!1),[m,a]=l.useState(""),g=async o=>{o.preventDefault(),a("");let r=n;if(!v(r)){a(s("forgotpassword.invalidphone"));return}r.startsWith("0")&&(r="+251"+r.slice(1)),c(!0);try{await y(r),p.success(s("forgotpassword.success"),{description:s("forgotpassword.successdesc")}),setTimeout(()=>t("/"),3e3)}catch(i){const x=(i==null?void 0:i.message)||s("forgotpassword.fail");a(x),p.error(s("forgotpassword.fail"),{description:x})}finally{c(!1)}};return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-cyan-50 via-white to-primary-50 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-cyan-100/30 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-96 h-96 bg-primary-100/30 rounded-full blur-3xl"}),e.jsxs("button",{onClick:()=>t("/"),className:"absolute top-6 left-6 z-10 flex items-center gap-2 px-4 py-2 bg-white/80 backdrop-blur-sm hover:bg-white rounded-full shadow-md hover:shadow-lg transition-all duration-300 group",children:[e.jsx(j,{className:"w-4 h-4 text-primary group-hover:scale-110 transition-transform"}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:s("forgotpassword.home")})]}),e.jsx("div",{className:"relative min-h-screen flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-gray-100 overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-primary to-primary-500 p-8 text-center relative",children:[e.jsx("div",{className:"absolute inset-0 bg-white/5"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-16 h-16 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(k,{className:"w-8 h-8 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:s("forgotpassword.title")}),e.jsx("p",{className:"text-cyan-50 text-sm",children:s("forgotpassword.subtitle")})]})]}),e.jsx("div",{className:"p-8",children:e.jsxs("form",{onSubmit:g,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[e.jsx(C,{className:"w-4 h-4 text-primary"}),s("forgotpassword.phone")]}),e.jsx("div",{className:"relative",children:e.jsx(N,{type:"tel",placeholder:s("forgotpassword.phoneplaceholder"),className:"h-12 rounded-lg border-gray-200 px-4 text-sm focus:border-primary focus:ring-primary transition-all",value:n,onChange:o=>{u(o.target.value),a("")},required:!0})}),m&&e.jsxs("div",{className:"flex items-start gap-2 p-3 bg-red-50 border border-red-100 rounded-lg",children:[e.jsx("div",{className:"w-1 h-1 bg-red-500 rounded-full mt-1.5"}),e.jsx("p",{className:"text-sm text-red-600 flex-1",children:m})]})]}),e.jsxs("div",{className:"flex items-start gap-3 p-4 bg-cyan-50 border border-cyan-100 rounded-lg",children:[e.jsx(f,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-700 font-medium mb-1",children:s("forgotpassword.checkphone")}),e.jsx("p",{className:"text-xs text-gray-600",children:s("forgotpassword.checkdesc")})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(h,{type:"submit",className:"w-full h-12 bg-primary hover:bg-primary-500 text-white text-sm font-medium rounded-lg shadow-md hover:shadow-lg transition-all duration-300",disabled:d,children:d?e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx(P,{className:"animate-spin h-5 w-5"}),s("forgotpassword.sending")]}):e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx(f,{className:"h-5 w-5"}),s("forgotpassword.sendresetlink")]})}),e.jsxs(h,{type:"button",variant:"outline",className:"w-full h-12 text-sm font-medium border-gray-200 hover:bg-gray-50 rounded-lg transition-all duration-300 bg-transparent",onClick:()=>t("/login"),children:[e.jsx(S,{className:"h-4 w-4 mr-2"}),s("forgotpassword.backtologin")]})]})]})})]}),e.jsxs("p",{className:"text-center text-sm text-gray-500 mt-6",children:[s("forgotpassword.remember")," ",e.jsx("button",{onClick:()=>t("/login"),className:"text-primary hover:text-primary-500 font-medium transition-colors",children:s("forgotpassword.signin")})]})]})})]})};export{F as ForgotPassword,F as default};

View File

@@ -1 +0,0 @@
import{r as i,j as n,B as k,aI as u}from"./index-Db-xuq0b.js";import"./form-BeLK5rTt.js";import"./multi-select-C9K8HXhI.js";import"./single-select-D9ZG1edj.js";i.createContext({open:!1,setOpen:()=>{}});const O=({label:h,options:x,value:o,onChange:j,collapsible:f=!1,localizedName:r})=>{const[l,b]=i.useState(!f),[m,S]=i.useState(new Set),w=t=>{const e=new Set(m);e.has(t)?e.delete(t):e.add(t),S(e)},g=t=>{j(t)},p=(t,e=[])=>{for(const s of t){const a=typeof s.name=="string"?s.name:(r==null?void 0:r(s.name))??s.name.en;if(s.id===o)return[...e,a].join(" / ");if(s.children&&s.children.length>0){const c=p(s.children,[...e,a]);if(c)return c}}return null},d=t=>t.flatMap(e=>{const s=e.children&&e.children.length>0,a=m.has(e.id),c=s?e.children?.some(v=>v.id===o):!1;if(s&&e.children.length===1)return d(e.children);const C=typeof e.name=="string"?e.name:(r==null?void 0:r(e.name))??e.name.en;return n.jsxs("div",{className:"ml-4 mb-1",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[s&&n.jsx("button",{type:"button",onClick:()=>w(e.id),className:"w-4 h-4 flex items-center justify-center",children:n.jsx(u,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})}),n.jsxs("label",{className:"flex items-center space-x-2",children:[n.jsx("input",{type:"radio",name:"unit-select",checked:o===e.id||c,onChange:()=>g(e.id)}),n.jsx("span",{className:c?"font-semibold":"",children:C})]})]}),s&&a&&n.jsx("div",{className:"ml-4",children:d(e.children)})]},e.id)}),y=p(x);return n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"block font-semibold mb-1",children:h}),f&&n.jsxs(k,{type:"button",variant:"outline",onClick:()=>b(!l),className:"w-full justify-between mb-2",children:[n.jsx("span",{children:y??`Select ${h.toLowerCase()}`}),n.jsx(u,{className:`h-4 w-4 transition-transform ${l?"rotate-180":""}`})]}),l&&n.jsx("div",{className:"border rounded-md p-2 bg-background max-h-96 overflow-y-auto",children:d(x)})]})};export{O as S};

View File

@@ -1 +0,0 @@
import{r as i,j as n,B as k,aI as u}from"./index-7T7TTikv.js";import"./form-lLGtsTgY.js";import"./multi-select-CZLBnGmP.js";import"./single-select-CqAjmX3L.js";i.createContext({open:!1,setOpen:()=>{}});const O=({label:h,options:x,value:o,onChange:j,collapsible:f=!1,localizedName:r})=>{const[l,b]=i.useState(!f),[m,S]=i.useState(new Set),w=t=>{const e=new Set(m);e.has(t)?e.delete(t):e.add(t),S(e)},g=t=>{j(t)},p=(t,e=[])=>{for(const s of t){const a=typeof s.name=="string"?s.name:(r==null?void 0:r(s.name))??s.name.en;if(s.id===o)return[...e,a].join(" / ");if(s.children&&s.children.length>0){const c=p(s.children,[...e,a]);if(c)return c}}return null},d=t=>t.flatMap(e=>{const s=e.children&&e.children.length>0,a=m.has(e.id),c=s?e.children.some(v=>v.id===o):!1;if(s&&e.children.length===1)return d(e.children);const C=typeof e.name=="string"?e.name:(r==null?void 0:r(e.name))??e.name.en;return n.jsxs("div",{className:"ml-4 mb-1",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[s&&n.jsx("button",{type:"button",onClick:()=>w(e.id),className:"w-4 h-4 flex items-center justify-center",children:n.jsx(u,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})}),n.jsxs("label",{className:"flex items-center space-x-2",children:[n.jsx("input",{type:"radio",name:"unit-select",checked:o===e.id||c,onChange:()=>g(e.id)}),n.jsx("span",{className:c?"font-semibold":"",children:C})]})]}),s&&a&&n.jsx("div",{className:"ml-4",children:d(e.children)})]},e.id)}),y=p(x);return n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"block font-semibold mb-1",children:h}),f&&n.jsxs(k,{type:"button",variant:"outline",onClick:()=>b(!l),className:"w-full justify-between mb-2",children:[n.jsx("span",{children:y??`Select ${h.toLowerCase()}`}),n.jsx(u,{className:`h-4 w-4 transition-transform ${l?"rotate-180":""}`})]}),l&&n.jsx("div",{className:"border rounded-md p-2 bg-background max-h-96 overflow-y-auto",children:d(x)})]})};export{O as S};

View File

@@ -1 +0,0 @@
import{r as W,V as B,j as e,Q as o,ae as x,_ as C,Z as R,at as w}from"./index-7T7TTikv.js";var u={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const N=u,D=W.forwardRef(({__staticSelector:t,__stylesApiProps:l,className:s,classNames:f,styles:_,unstyled:h,children:I,label:i,description:d,id:p,disabled:b,error:n,size:r,labelPosition:j="left",bodyElement:c="div",labelElement:m="label",variant:v,style:y,vars:E,mod:S,...F},g)=>{const a=B({name:t,props:l,className:s,style:y,classes:u,classNames:f,styles:_,unstyled:h});return e.jsx(o,{...a("root"),ref:g,__vars:{"--label-fz":R(r),"--label-lh":C(r,"label-lh")},mod:[{"label-position":j},S],variant:v,size:r,...F,children:e.jsxs(o,{component:c,htmlFor:c==="label"?p:void 0,...a("body"),children:[I,e.jsxs("div",{...a("labelWrapper"),"data-disabled":b||void 0,children:[i&&e.jsx(o,{component:m,htmlFor:m==="label"?p:void 0,...a("label"),"data-disabled":b||void 0,children:i}),d&&e.jsx(x.Description,{size:r,__inheritStyles:!1,...a("description"),children:d}),n&&typeof n!="boolean"&&e.jsx(x.Error,{size:r,__inheritStyles:!1,...a("error"),children:n})]})]})})});D.displayName="@mantine/core/InlineInput";function Q({children:t,role:l}){const s=w();return s?e.jsx("div",{role:l,"aria-labelledby":s.labelId,"aria-describedby":s.describedBy,children:t}):e.jsx(e.Fragment,{children:t})}export{Q as I,D as a,N as b};

View File

@@ -1 +0,0 @@
import{r as W,V as B,j as e,Q as o,ae as x,_ as C,Z as R,at as w}from"./index-Db-xuq0b.js";var u={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const N=u,D=W.forwardRef(({__staticSelector:t,__stylesApiProps:l,className:s,classNames:f,styles:_,unstyled:h,children:I,label:i,description:d,id:p,disabled:b,error:n,size:r,labelPosition:j="left",bodyElement:c="div",labelElement:m="label",variant:v,style:y,vars:E,mod:S,...F},g)=>{const a=B({name:t,props:l,className:s,style:y,classes:u,classNames:f,styles:_,unstyled:h});return e.jsx(o,{...a("root"),ref:g,__vars:{"--label-fz":R(r),"--label-lh":C(r,"label-lh")},mod:[{"label-position":j},S],variant:v,size:r,...F,children:e.jsxs(o,{component:c,htmlFor:c==="label"?p:void 0,...a("body"),children:[I,e.jsxs("div",{...a("labelWrapper"),"data-disabled":b||void 0,children:[i&&e.jsx(o,{component:m,htmlFor:m==="label"?p:void 0,...a("label"),"data-disabled":b||void 0,children:i}),d&&e.jsx(x.Description,{size:r,__inheritStyles:!1,...a("description"),children:d}),n&&typeof n!="boolean"&&e.jsx(x.Error,{size:r,__inheritStyles:!1,...a("error"),children:n})]})]})})});D.displayName="@mantine/core/InlineInput";function Q({children:t,role:l}){const s=w();return s?e.jsx("div",{role:l,"aria-labelledby":s.labelId,"aria-describedby":s.describedBy,children:t}):e.jsx(e.Fragment,{children:t})}export{Q as I,D as a,N as b};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{n as x,j as r,aA as b,aB as C,B as y,aC as E,aE as M,r as d,az as w,u as S,f as v}from"./index-Db-xuq0b.js";import{A as z}from"./AdvancedTable-CC9ioMU-.js";import{C as I,a as K,b as B,d as T}from"./card-BBWyxDss.js";import{a as A}from"./userService-BHeFzZdn.js";import{E as U}from"./ellipsis-CbtaBcvT.js";import{E as L}from"./eye-Bhud4znU.js";import{f as P}from"./organizationService-DPKKJMFw.js";import{S as k}from"./FormFields-BA7SVWfi.js";import"./table-D3n3VABd.js";import"./select-BoQxM42A.js";import"./chevron-left-DCpEaNzo.js";import"./utils-BncSPdK1.js";import"./badge-D7JvaQeJ.js";import"./command-Cr0tMDDu.js";import"./search-CM5F2ZRy.js";import"./popover-X-j_SRnG.js";import"./Popover-CzANYrEa.js";import"./use-uncontrolled-C3HRHW6t.js";import"./separator-BaOOgzZX.js";import"./refresh-cw-JB7N413f.js";import"./form-BeLK5rTt.js";import"./index.esm-BG4gweZJ.js";import"./label-CsFy6wpo.js";import"./multi-select-C9K8HXhI.js";import"./single-select-D9ZG1edj.js";const q=(n,l)=>x({queryKey:["migratedData",n,l],queryFn:async()=>{const{data:m}=await A(n,l);return m}}),F=(n,l,m)=>{const g=t=>{m(`/user-management/migrated-records-management/view/${t}`)};return[{accessorKey:"record.referenceNumber",header:"Reference Number",cell:({row:t})=>{var e,a;return(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.referenceNumber}},{accessorKey:"record.letterNumber",header:"Letter Number",cell:({row:t})=>{var e,a;return(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.letterNumber}},{accessorKey:"record.metadata.uploadedBy.en",header:"Uploaded By",cell:({row:t})=>{var e,a,s;return n(((s=(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.metadata)==null?void 0:s.uploadedBy)??{en:"-",am:"-"})}},{accessorKey:"record.metadata.organizationName.en",header:"Organization",cell:({row:t})=>{var e,a,s;return n(((s=(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.metadata)==null?void 0:s.organizationName)??{en:"-",am:"-"})}},{accessorKey:"record.dispatchedDate",header:"Dispatched Date",cell:({row:t})=>{var e,a;return new Date((a=(e=t.original)==null?void 0:e.record)==null?void 0:a.dispatchedDate).toLocaleString()}},{accessorKey:"status",header:"Status",cell:({row:t})=>{var e;return(e=t.original)==null?void 0:e.status}},{accessorKey:"record.content",header:"Subject",cell:({row:t})=>{var e,a,s;return((s=(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.content[0])==null?void 0:s.subject)||"-"}},{id:"actions",cell:({row:t})=>{const e=t.original.record;return r.jsxs(b,{children:[r.jsx(C,{asChild:!0,children:r.jsx(y,{variant:"ghost",size:"sm",children:r.jsx(U,{className:"h-4 w-4"})})}),r.jsx(E,{align:"end",children:r.jsxs(M,{onClick:()=>g(e.id),children:[r.jsx(L,{className:"h-4 w-4 mr-2"}),l("userRecord.View")]})})]})}}]};function V(){const[n,l]=d.useState(0),m=10,[g,t]=d.useState(!1),e=w(),{t:a}=S(),s=v(),{data:o,isLoading:O,error:H}=x({queryKey:["organizations"],queryFn:P,staleTime:300*1e3}),[u,h]=d.useState(null),j=d.useMemo(()=>(o==null?void 0:o.items?.map(i=>({id:i.id,name:i.name,hierarchyType:"organization",value:i.units.length===1?i.units[0].id:"",children:Array.isArray(i.units)&&i.units.length>0?i.units?.map(c=>({id:c.id,name:c.name,hierarchyType:"unit",value:c.id,children:[]})):[]})))||[],[o,e]);d.useEffect(()=>{if(!u){const i=o==null?void 0:o.items.flatMap(c=>c.units).find(c=>c.id);i&&h(i.id)}},[o]),d.useEffect(()=>{u&&sessionStorage.setItem("selectedUnitId",u)},[u]),d.useEffect(()=>{const i=sessionStorage.getItem("selectedUnitId");i&&h(i)},[]);const{data:p,isLoading:D}=q(u??"",{skip:n*m,take:m,orderBy:"migratedAt:DESC"}),f=i=>{l(i)},N=()=>{t(!0)};return D?r.jsx("div",{children:a("loading")}):r.jsx("div",{className:"p-6 space-y-6",children:r.jsxs(I,{className:"col-span-2 shadow-none border-none bg-transparent px-0",children:[r.jsxs(K,{className:"flex flex-row justify-between items-center px-0",children:[r.jsx(B,{className:"text-xl font-semibold ",children:a("migration.migratedData")}),r.jsx(y,{onClick:N,children:a(g?"migration.exporting":"migration.exportData")})]}),r.jsx("div",{className:"mb-4",children:r.jsx(k,{label:a("selectUnit"),options:j,value:u,onChange:h,collapsible:!0})}),r.jsx(T,{className:"px-0",children:r.jsx(z,{columns:F(e,a,s),data:(p==null?void 0:p.items)||[],tableName:"Migrated Data",toolBarPosition:"right",itemCount:(p==null?void 0:p.count)||0,pageIndex:n,onPageChange:f,nextFunction:()=>f(n+1),prevFunction:()=>f(Math.max(n-1,0))})})]})})}function he(){return r.jsx(V,{})}export{he as default};

View File

@@ -1 +0,0 @@
import{n as x,j as r,aA as b,aB as C,B as y,aC as E,aE as M,r as d,az as w,u as S,f as v}from"./index-7T7TTikv.js";import{A as z}from"./AdvancedTable-vWyUWUDX.js";import{C as I,a as K,b as B,d as T}from"./card-_ldW-koX.js";import{a as A}from"./userService-CFvyXTYe.js";import{E as U}from"./ellipsis-DBW5EePE.js";import{E as L}from"./eye-DYwZYJcQ.js";import{f as P}from"./organizationService-B_C-b9EH.js";import{S as k}from"./FormFields-DeF71qnl.js";import"./table-D_B7hhqb.js";import"./select--i8koVXg.js";import"./chevron-left-G_a9-f9o.js";import"./utils-N2wtfq7C.js";import"./badge-D4t6Wb1T.js";import"./command-B6S1IvD4.js";import"./search-y8VSu0lZ.js";import"./popover-CSKEA8hg.js";import"./Popover-BSKEfTKH.js";import"./use-uncontrolled-tg0LIUAX.js";import"./separator-BXi_hr72.js";import"./refresh-cw-B7fipPS4.js";import"./form-lLGtsTgY.js";import"./index.esm-BRNlF2G3.js";import"./label-CABYEcfW.js";import"./multi-select-CZLBnGmP.js";import"./single-select-CqAjmX3L.js";const q=(n,l)=>x({queryKey:["migratedData",n,l],queryFn:async()=>{const{data:m}=await A(n,l);return m}}),F=(n,l,m)=>{const g=t=>{m(`/user-management/migrated-records-management/view/${t}`)};return[{accessorKey:"record.referenceNumber",header:"Reference Number",cell:({row:t})=>{var e,a;return(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.referenceNumber}},{accessorKey:"record.letterNumber",header:"Letter Number",cell:({row:t})=>{var e,a;return(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.letterNumber}},{accessorKey:"record.metadata.uploadedBy.en",header:"Uploaded By",cell:({row:t})=>{var e,a,s;return n(((s=(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.metadata)==null?void 0:s.uploadedBy)??{en:"-",am:"-"})}},{accessorKey:"record.metadata.organizationName.en",header:"Organization",cell:({row:t})=>{var e,a,s;return n(((s=(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.metadata)==null?void 0:s.organizationName)??{en:"-",am:"-"})}},{accessorKey:"record.dispatchedDate",header:"Dispatched Date",cell:({row:t})=>{var e,a;return new Date((a=(e=t.original)==null?void 0:e.record)==null?void 0:a.dispatchedDate).toLocaleString()}},{accessorKey:"status",header:"Status",cell:({row:t})=>{var e;return(e=t.original)==null?void 0:e.status}},{accessorKey:"record.content",header:"Subject",cell:({row:t})=>{var e,a,s;return((s=(a=(e=t.original)==null?void 0:e.record)==null?void 0:a.content[0])==null?void 0:s.subject)||"-"}},{id:"actions",cell:({row:t})=>{const e=t.original.record;return r.jsxs(b,{children:[r.jsx(C,{asChild:!0,children:r.jsx(y,{variant:"ghost",size:"sm",children:r.jsx(U,{className:"h-4 w-4"})})}),r.jsx(E,{align:"end",children:r.jsxs(M,{onClick:()=>g(e.id),children:[r.jsx(L,{className:"h-4 w-4 mr-2"}),l("userRecord.View")]})})]})}}]};function V(){const[n,l]=d.useState(0),m=10,[g,t]=d.useState(!1),e=w(),{t:a}=S(),s=v(),{data:o,isLoading:O,error:H}=x({queryKey:["organizations"],queryFn:P,staleTime:300*1e3}),[u,h]=d.useState(null),j=d.useMemo(()=>(o==null?void 0:o.items.map(i=>({id:i.id,name:i.name,hierarchyType:"organization",value:i.units.length===1?i.units[0].id:"",children:Array.isArray(i.units)&&i.units.length>0?i.units.map(c=>({id:c.id,name:c.name,hierarchyType:"unit",value:c.id,children:[]})):[]})))||[],[o,e]);d.useEffect(()=>{if(!u){const i=o==null?void 0:o.items.flatMap(c=>c.units).find(c=>c.id);i&&h(i.id)}},[o]),d.useEffect(()=>{u&&sessionStorage.setItem("selectedUnitId",u)},[u]),d.useEffect(()=>{const i=sessionStorage.getItem("selectedUnitId");i&&h(i)},[]);const{data:p,isLoading:D}=q(u??"",{skip:n*m,take:m,orderBy:"migratedAt:DESC"}),f=i=>{l(i)},N=()=>{t(!0)};return D?r.jsx("div",{children:a("loading")}):r.jsx("div",{className:"p-6 space-y-6",children:r.jsxs(I,{className:"col-span-2 shadow-none border-none bg-transparent px-0",children:[r.jsxs(K,{className:"flex flex-row justify-between items-center px-0",children:[r.jsx(B,{className:"text-xl font-semibold ",children:a("migration.migratedData")}),r.jsx(y,{onClick:N,children:a(g?"migration.exporting":"migration.exportData")})]}),r.jsx("div",{className:"mb-4",children:r.jsx(k,{label:a("selectUnit"),options:j,value:u,onChange:h,collapsible:!0})}),r.jsx(T,{className:"px-0",children:r.jsx(z,{columns:F(e,a,s),data:(p==null?void 0:p.items)||[],tableName:"Migrated Data",toolBarPosition:"right",itemCount:(p==null?void 0:p.count)||0,pageIndex:n,onPageChange:f,nextFunction:()=>f(n+1),prevFunction:()=>f(Math.max(n-1,0))})})]})})}function he(){return r.jsx(V,{})}export{he as default};

View File

@@ -1 +0,0 @@
import{j as i}from"./index-Db-xuq0b.js";import{u as m}from"./useOrganizations-DiuNBweX.js";import{O as e}from"./OrganizationForm-Dc20iiRT.js";import"./organizationsService-BEVk8qa1.js";import"./select-BoQxM42A.js";import"./card-BBWyxDss.js";import"./label-CsFy6wpo.js";import"./useOrganizationTypes-B6vCp97C.js";import"./index.esm-BG4gweZJ.js";import"./zod-Df58YiJ6.js";import"./switch-BNCD27Bd.js";import"./Switch-DSHMk-sj.js";import"./InputsGroupFieldset-COkNgcEo.js";import"./use-uncontrolled-C3HRHW6t.js";const p=()=>{const{createOrganization:o,isCreating:n}=m("Org"),a=t=>{const r={key:t.key,name:t.name,organizationTypeId:t.organizationTypeId,isGovernmentOrganization:t.isGovernmentOrganization};t.parentId&&t.parentId!==""&&(r.parentId=t.parentId),o(r)};return i.jsx(e,{isLoading:n,onSubmit:t=>a(t),type:"Create"})},w=()=>i.jsx(p,{});export{w as default};

View File

@@ -1 +0,0 @@
import{j as i}from"./index-7T7TTikv.js";import{u as m}from"./useOrganizations-CPt4mkXS.js";import{O as e}from"./OrganizationForm-BNuDw3k3.js";import"./organizationsService-DIFVjoLn.js";import"./select--i8koVXg.js";import"./card-_ldW-koX.js";import"./label-CABYEcfW.js";import"./useOrganizationTypes-CQm1BLlI.js";import"./index.esm-BRNlF2G3.js";import"./zod-D-9d3Txu.js";import"./switch-D9hx8CZw.js";import"./Switch-ByfhjkDo.js";import"./InputsGroupFieldset-B16dMH0P.js";import"./use-uncontrolled-tg0LIUAX.js";const p=()=>{const{createOrganization:o,isCreating:n}=m("Org"),a=t=>{const r={key:t.key,name:t.name,organizationTypeId:t.organizationTypeId,isGovernmentOrganization:t.isGovernmentOrganization};t.parentId&&t.parentId!==""&&(r.parentId=t.parentId),o(r)};return i.jsx(e,{isLoading:n,onSubmit:t=>a(t),type:"Create"})},w=()=>i.jsx(p,{});export{w as default};

View File

@@ -1,6 +0,0 @@
import{y as C,f as A,d as S,z as M,F as x,v as a,j as e,B as u,A as D}from"./index-Db-xuq0b.js";import{C as n,d as l,a as U,b as z}from"./card-BBWyxDss.js";import{u as $}from"./useOrganizationReport-D3QtWTPL.js";import{A as L,a as E}from"./alert-8Xu28MAD.js";import{S as c}from"./skeleton-CIiqp2Y5.js";import{S as R}from"./SmartOfficeAuditPage-DLN72875.js";import{U as b}from"./users-DNqydOCy.js";import{C as f}from"./circle-alert-Cd_zeQMw.js";import{R as j}from"./refresh-cw-JB7N413f.js";import"./organizationsService-BEVk8qa1.js";import"./Skeleton-BJECajc_.js";import"./table-D3n3VABd.js";import"./badge-D7JvaQeJ.js";import"./avatar-C2-XEZ4v.js";import"./format-DvwV82px.js";import"./en-US-Cc-9gH5A.js";import"./shield-uC_usZTb.js";import"./lock-BCybB-Lq.js";import"./eye-Bhud4znU.js";import"./square-pen-B91TPB19.js";import"./download-CX6rsOqt.js";import"./select-BoQxM42A.js";import"./popover-X-j_SRnG.js";import"./Popover-CzANYrEa.js";import"./use-uncontrolled-C3HRHW6t.js";import"./endOfMonth-DmxQbzXi.js";import"./search-CM5F2ZRy.js";import"./label-CsFy6wpo.js";import"./radio-group-DqG5gUnT.js";import"./Radio-C3SNvFel.js";import"./get-auto-contrast-value-Da6zqqWm.js";import"./InputsGroupFieldset-COkNgcEo.js";import"./checkbox-Dd0VhnrO.js";import"./Checkbox-IILksgz0.js";import"./eye-off-CDMvHElM.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],B=C("files",_),je=()=>{var g,h;const t=A(),{user:i}=S(),y=((h=(g=i==null?void 0:i.employee)==null?void 0:g[0])==null?void 0:h.organizationId)||"fecaa9b3-0b9d-4772-a7c7-bcb19d46122a",{report:s,isLoading:d,isError:v,error:m,refetch:N}=$(y),k=()=>{var r,o,p;return[{id:"employees",title:a("dashboard.totalEmployees"),value:((r=s==null?void 0:s.employeesCount)==null?void 0:r.toLocaleString())||"0",icon:b,color:"from-blue-500 to-blue-600"},{id:"units",title:a("dashboard.totalUnits"),value:((o=s==null?void 0:s.unitsCount)==null?void 0:o.toLocaleString())||"0",icon:D,color:"from-primary-500 to-primary-600"},{id:"positions",title:a("dashboard.totalPositions"),value:((p=s==null?void 0:s.positionsCount)==null?void 0:p.toLocaleString())||"0",icon:x,color:"from-purple-500 to-purple-600"}]},w=[{id:"user-mgmt",title:a("dashboard.userManagement"),description:a("dashboard.userManagementDesc"),icon:b,action:()=>t("/user-management/user_management"),color:"bg-gradient-to-r from-blue-500 to-cyan-600"},{id:"content-mgmt",title:a("dashboard.contentManagement"),description:a("dashboard.contentManagementDesc"),icon:B,action:()=>t("/user-management/content-management"),color:"bg-gradient-to-r from-purple-500 to-indigo-600"},{id:"excel-upload",title:a("dashboard.excelUploader"),description:a("dashboard.excelUploaderDesc"),icon:M,action:()=>t("/user-management/bulk-upload"),color:"bg-gradient-to-r from-primary-500 to-primary-600"},{id:"position-settings",title:a("dashboard.positionSettings"),description:a("dashboard.positionSettingsDesc"),icon:x,action:()=>t("/user-management/position-management"),color:"bg-gradient-to-r from-orange-500 to-red-600"},{id:"archive-users",title:a("dashboard.archiveUsers"),description:a("dashboard.archiveUsersDesc"),icon:f,action:()=>t("/user-management/archives"),color:"bg-gradient-to-r from-gray-500 to-slate-600"}];return e.jsxs("div",{className:"mx-auto p-6 space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-gray-100",children:a("dashboard.organizationDashboard")}),e.jsx("p",{className:"text-muted-foreground dark:text-gray-400",children:a("dashboard.orgMsg")})]}),e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>N(),disabled:d,children:[e.jsx(j,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),a("dashboard.refresh")]})]}),v&&e.jsxs(L,{variant:"destructive",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsxs(E,{children:[a("dashboard.errorMsg"),m instanceof Error&&`: ${m.message}`]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:d?Array(3).fill(0)?.map((r,o)=>e.jsx(n,{className:"hover:shadow-lg transition-shadow duration-200 dark:bg-gray-800 dark:border-gray-700",children:e.jsx(l,{className:"p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"w-full",children:[e.jsx(c,{className:"h-4 w-24 mb-2"}),e.jsx(c,{className:"h-8 w-16"})]}),e.jsx(c,{className:"h-12 w-12 rounded-full"})]})})},`skeleton-stat-${o}`)):k()?.map(r=>e.jsx(n,{className:"hover:shadow-lg transition-shadow duration-200 border-l-4 border-l-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:border-l-blue-500",children:e.jsx(l,{className:"p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground dark:text-gray-400",children:r.title}),e.jsx("h3",{className:"text-3xl font-bold mt-2 text-gray-900 dark:text-gray-100",children:r.value})]}),e.jsx("div",{className:`p-4 rounded-full bg-gradient-to-r ${r.color} shadow-lg`,children:e.jsx(r.icon,{className:"h-6 w-6 text-white"})})]})})},`stat-${r.id}`))}),e.jsxs(n,{className:"dark:bg-gray-800 dark:border-gray-700",children:[e.jsx(U,{children:e.jsxs(z,{className:"flex items-center dark:text-gray-100",children:[e.jsx(j,{className:"h-5 w-5 mr-2"}),a("landingPage.quickActions")]})}),e.jsx(l,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:w?.map(r=>e.jsx(u,{onClick:r.action,className:`h-auto p-6 ${r.color} text-white hover:opacity-90 hover:scale-105 transition-all duration-200`,children:e.jsxs("div",{className:"flex flex-col items-center space-y-3 text-center",children:[e.jsx(r.icon,{className:"h-8 w-8"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-base",children:r.title}),e.jsx("div",{className:"text-sm opacity-90 mt-1",children:r.description})]})]})},`action-${r.id}`))})})]}),e.jsx(R,{})]})};export{je as default};

View File

@@ -1,6 +0,0 @@
import{y as C,f as A,d as S,z as M,F as x,v as a,j as e,B as u,A as D}from"./index-7T7TTikv.js";import{C as n,d as l,a as U,b as z}from"./card-_ldW-koX.js";import{u as $}from"./useOrganizationReport-Btcu9b-4.js";import{A as L,a as E}from"./alert-CCWXLU2U.js";import{S as c}from"./skeleton-BCpLdfqO.js";import{S as R}from"./SmartOfficeAuditPage-Dcwrs1dM.js";import{U as b}from"./users-bn5-xqQf.js";import{C as f}from"./circle-alert-HVqsZpe-.js";import{R as j}from"./refresh-cw-B7fipPS4.js";import"./organizationsService-DIFVjoLn.js";import"./Skeleton-BOu0YqbY.js";import"./table-D_B7hhqb.js";import"./badge-D4t6Wb1T.js";import"./avatar-BU_IHgzI.js";import"./format-DvwV82px.js";import"./en-US-Cc-9gH5A.js";import"./shield-D3luOm6l.js";import"./lock-DGEqses-.js";import"./eye-DYwZYJcQ.js";import"./square-pen-Dh1zj83N.js";import"./download-Btm1n-GQ.js";import"./select--i8koVXg.js";import"./popover-CSKEA8hg.js";import"./Popover-BSKEfTKH.js";import"./use-uncontrolled-tg0LIUAX.js";import"./endOfMonth-DmxQbzXi.js";import"./search-y8VSu0lZ.js";import"./label-CABYEcfW.js";import"./radio-group-C9tEhs3a.js";import"./Radio-D43EoWlg.js";import"./get-auto-contrast-value-Da6zqqWm.js";import"./InputsGroupFieldset-B16dMH0P.js";import"./checkbox-CTVlz2xL.js";import"./Checkbox-CAXGYFGh.js";import"./eye-off-AoIvdwmO.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],B=C("files",_),je=()=>{var g,h;const t=A(),{user:i}=S(),y=((h=(g=i==null?void 0:i.employee)==null?void 0:g[0])==null?void 0:h.organizationId)||"fecaa9b3-0b9d-4772-a7c7-bcb19d46122a",{report:s,isLoading:d,isError:v,error:m,refetch:N}=$(y),k=()=>{var r,o,p;return[{id:"employees",title:a("dashboard.totalEmployees"),value:((r=s==null?void 0:s.employeesCount)==null?void 0:r.toLocaleString())||"0",icon:b,color:"from-blue-500 to-blue-600"},{id:"units",title:a("dashboard.totalUnits"),value:((o=s==null?void 0:s.unitsCount)==null?void 0:o.toLocaleString())||"0",icon:D,color:"from-primary-500 to-primary-600"},{id:"positions",title:a("dashboard.totalPositions"),value:((p=s==null?void 0:s.positionsCount)==null?void 0:p.toLocaleString())||"0",icon:x,color:"from-purple-500 to-purple-600"}]},w=[{id:"user-mgmt",title:a("dashboard.userManagement"),description:a("dashboard.userManagementDesc"),icon:b,action:()=>t("/user-management/user_management"),color:"bg-gradient-to-r from-blue-500 to-cyan-600"},{id:"content-mgmt",title:a("dashboard.contentManagement"),description:a("dashboard.contentManagementDesc"),icon:B,action:()=>t("/user-management/content-management"),color:"bg-gradient-to-r from-purple-500 to-indigo-600"},{id:"excel-upload",title:a("dashboard.excelUploader"),description:a("dashboard.excelUploaderDesc"),icon:M,action:()=>t("/user-management/bulk-upload"),color:"bg-gradient-to-r from-primary-500 to-primary-600"},{id:"position-settings",title:a("dashboard.positionSettings"),description:a("dashboard.positionSettingsDesc"),icon:x,action:()=>t("/user-management/position-management"),color:"bg-gradient-to-r from-orange-500 to-red-600"},{id:"archive-users",title:a("dashboard.archiveUsers"),description:a("dashboard.archiveUsersDesc"),icon:f,action:()=>t("/user-management/archives"),color:"bg-gradient-to-r from-gray-500 to-slate-600"}];return e.jsxs("div",{className:"mx-auto p-6 space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-gray-100",children:a("dashboard.organizationDashboard")}),e.jsx("p",{className:"text-muted-foreground dark:text-gray-400",children:a("dashboard.orgMsg")})]}),e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>N(),disabled:d,children:[e.jsx(j,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),a("dashboard.refresh")]})]}),v&&e.jsxs(L,{variant:"destructive",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsxs(E,{children:[a("dashboard.errorMsg"),m instanceof Error&&`: ${m.message}`]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:d?Array(3).fill(0).map((r,o)=>e.jsx(n,{className:"hover:shadow-lg transition-shadow duration-200 dark:bg-gray-800 dark:border-gray-700",children:e.jsx(l,{className:"p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"w-full",children:[e.jsx(c,{className:"h-4 w-24 mb-2"}),e.jsx(c,{className:"h-8 w-16"})]}),e.jsx(c,{className:"h-12 w-12 rounded-full"})]})})},`skeleton-stat-${o}`)):k().map(r=>e.jsx(n,{className:"hover:shadow-lg transition-shadow duration-200 border-l-4 border-l-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:border-l-blue-500",children:e.jsx(l,{className:"p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground dark:text-gray-400",children:r.title}),e.jsx("h3",{className:"text-3xl font-bold mt-2 text-gray-900 dark:text-gray-100",children:r.value})]}),e.jsx("div",{className:`p-4 rounded-full bg-gradient-to-r ${r.color} shadow-lg`,children:e.jsx(r.icon,{className:"h-6 w-6 text-white"})})]})})},`stat-${r.id}`))}),e.jsxs(n,{className:"dark:bg-gray-800 dark:border-gray-700",children:[e.jsx(U,{children:e.jsxs(z,{className:"flex items-center dark:text-gray-100",children:[e.jsx(j,{className:"h-5 w-5 mr-2"}),a("landingPage.quickActions")]})}),e.jsx(l,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:w.map(r=>e.jsx(u,{onClick:r.action,className:`h-auto p-6 ${r.color} text-white hover:opacity-90 hover:scale-105 transition-all duration-200`,children:e.jsxs("div",{className:"flex flex-col items-center space-y-3 text-center",children:[e.jsx(r.icon,{className:"h-8 w-8"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-base",children:r.title}),e.jsx("div",{className:"text-sm opacity-90 mt-1",children:r.description})]})]})},`action-${r.id}`))})})]}),e.jsx(R,{})]})};export{je as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +0,0 @@
import{y as h,az as f,j as a,A as k,H as j,bj as N}from"./index-7T7TTikv.js";import{B as g}from"./badge-D4t6Wb1T.js";import{C as v,a as w,b as z,d as C}from"./card-_ldW-koX.js";import{S as p}from"./separator-BXi_hr72.js";import{a as O}from"./useOrganizations-CPt4mkXS.js";import{u as D}from"./useOrganizationTypes-CQm1BLlI.js";import{B as y}from"./building-BTGMe3qn.js";import{S as A}from"./shield-check-CfyQTFAv.js";import"./organizationsService-DIFVjoLn.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],B=h("map-pin",S),L=({id:d})=>{var x;const l=f(),{organizationsDetailResponse:o,isDetailLoading:u,isDetailError:b}=O("Org",d),{organizationTypesResponse:n}=D();if(u)return a.jsx("div",{children:"Loading..."});if(b||!o)return a.jsx("div",{children:"Error loading organization."});const r=o.items,c=r.organizationTypeId,m=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});return a.jsxs(v,{className:"w-full max-w-3xl mx-auto shadow-xl rounded-2xl border border-gray-200 bg-white dark:bg-zinc-900 transition hover:shadow-2xl",children:[a.jsxs(w,{className:"flex items-center gap-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[a.jsx(k,{className:"w-7 h-7 text-primary"}),a.jsx(z,{className:"text-2xl font-bold",children:l(r.name)})]}),a.jsxs(C,{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(g,{variant:r.isGovernmentOrganization?"default":"outline",className:`px-3 py-1 rounded-xl ${r.isGovernmentOrganization?"bg-primary-100 text-primary-800 dark:bg-primary-800 dark:text-primary-100":"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100"}`,children:r.isGovernmentOrganization?"Government":"Private"}),a.jsx(g,{variant:"default",className:`px-3 py-1 rounded-xl ${r.status==="Active"?"bg-primary-100 text-primary-800 dark:bg-primary-800 dark:text-primary-100":"bg-red-100 text-red-800 dark:bg-red-800 dark:text-red-100"}`,children:r.status})]}),a.jsx(p,{className:"my-2"}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm text-gray-700 dark:text-gray-300",children:[a.jsxs("div",{className:"order-1",children:[a.jsx("p",{className:"font-semibold",children:"Created At:"}),a.jsx("p",{children:m(r.createdAt)})]}),a.jsxs("div",{className:"order-2",children:[a.jsx("p",{className:"font-semibold",children:"Updated At:"}),a.jsx("p",{children:m(r.updatedAt)})]}),a.jsxs("div",{className:"sm:col-span-2 order-3",children:[a.jsx("p",{className:"font-semibold",children:"Key:"}),a.jsx("p",{className:"break-words",children:r.key})]})]}),a.jsx(p,{className:"my-2"}),a.jsx("div",{className:"flex flex-wrap gap-2 items-center",children:c&&((x=n==null?void 0:n.items)==null?void 0:x.filter(e=>e.id===c).map(e=>{let t,s,i;switch(e.key){case"super_admin":t=A,s="bg-purple-100 dark:bg-purple-800",i="text-purple-800 dark:text-purple-100";break;case"woreda":t=B,s="bg-blue-100 dark:bg-blue-800",i="text-blue-800 dark:text-blue-100";break;case"subcity":t=j,s="bg-primary-100 dark:bg-primary-800",i="text-primary-800 dark:text-primary-100";break;case"office":t=y,s="bg-yellow-100 dark:bg-yellow-800",i="text-yellow-800 dark:text-yellow-100";break;default:t=y,s="bg-gray-100 dark:bg-gray-800",i="text-gray-800 dark:text-gray-100"}return a.jsxs("span",{className:`flex items-center gap-1 px-3 py-1 rounded-xl font-medium ${s} ${i}`,children:[a.jsx(t,{className:"w-4 h-4"}),l(e.name)]},e.id)}))})]})]})},U=()=>{const{id:d}=N();return d?a.jsx(L,{id:d}):a.jsx("div",{className:"text-gray-900 dark:text-gray-100",children:"Organization ID is missing"})};export{U as default};

View File

@@ -1,6 +0,0 @@
import{y as h,az as f,j as a,A as k,H as j,bj as N}from"./index-Db-xuq0b.js";import{B as g}from"./badge-D7JvaQeJ.js";import{C as v,a as w,b as z,d as C}from"./card-BBWyxDss.js";import{S as p}from"./separator-BaOOgzZX.js";import{a as O}from"./useOrganizations-DiuNBweX.js";import{u as D}from"./useOrganizationTypes-B6vCp97C.js";import{B as y}from"./building-B2uZxFCD.js";import{S as A}from"./shield-check-BeHB0C5s.js";import"./organizationsService-BEVk8qa1.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],B=h("map-pin",S),L=({id:d})=>{var x;const l=f(),{organizationsDetailResponse:o,isDetailLoading:u,isDetailError:b}=O("Org",d),{organizationTypesResponse:n}=D();if(u)return a.jsx("div",{children:"Loading..."});if(b||!o)return a.jsx("div",{children:"Error loading organization."});const r=o.items,c=r.organizationTypeId,m=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});return a.jsxs(v,{className:"w-full max-w-3xl mx-auto shadow-xl rounded-2xl border border-gray-200 bg-white dark:bg-zinc-900 transition hover:shadow-2xl",children:[a.jsxs(w,{className:"flex items-center gap-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[a.jsx(k,{className:"w-7 h-7 text-primary"}),a.jsx(z,{className:"text-2xl font-bold",children:l(r.name)})]}),a.jsxs(C,{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(g,{variant:r.isGovernmentOrganization?"default":"outline",className:`px-3 py-1 rounded-xl ${r.isGovernmentOrganization?"bg-primary-100 text-primary-800 dark:bg-primary-800 dark:text-primary-100":"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100"}`,children:r.isGovernmentOrganization?"Government":"Private"}),a.jsx(g,{variant:"default",className:`px-3 py-1 rounded-xl ${r.status==="Active"?"bg-primary-100 text-primary-800 dark:bg-primary-800 dark:text-primary-100":"bg-red-100 text-red-800 dark:bg-red-800 dark:text-red-100"}`,children:r.status})]}),a.jsx(p,{className:"my-2"}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm text-gray-700 dark:text-gray-300",children:[a.jsxs("div",{className:"order-1",children:[a.jsx("p",{className:"font-semibold",children:"Created At:"}),a.jsx("p",{children:m(r.createdAt)})]}),a.jsxs("div",{className:"order-2",children:[a.jsx("p",{className:"font-semibold",children:"Updated At:"}),a.jsx("p",{children:m(r.updatedAt)})]}),a.jsxs("div",{className:"sm:col-span-2 order-3",children:[a.jsx("p",{className:"font-semibold",children:"Key:"}),a.jsx("p",{className:"break-words",children:r.key})]})]}),a.jsx(p,{className:"my-2"}),a.jsx("div",{className:"flex flex-wrap gap-2 items-center",children:c&&((x=n==null?void 0:n.items)==null?void 0:x.filter(e=>e.id===c)?.map(e=>{let t,s,i;switch(e.key){case"super_admin":t=A,s="bg-purple-100 dark:bg-purple-800",i="text-purple-800 dark:text-purple-100";break;case"woreda":t=B,s="bg-blue-100 dark:bg-blue-800",i="text-blue-800 dark:text-blue-100";break;case"subcity":t=j,s="bg-primary-100 dark:bg-primary-800",i="text-primary-800 dark:text-primary-100";break;case"office":t=y,s="bg-yellow-100 dark:bg-yellow-800",i="text-yellow-800 dark:text-yellow-100";break;default:t=y,s="bg-gray-100 dark:bg-gray-800",i="text-gray-800 dark:text-gray-100"}return a.jsxs("span",{className:`flex items-center gap-1 px-3 py-1 rounded-xl font-medium ${s} ${i}`,children:[a.jsx(t,{className:"w-4 h-4"}),l(e.name)]},e.id)}))})]})]})},U=()=>{const{id:d}=N();return d?a.jsx(L,{id:d}):a.jsx("div",{className:"text-gray-900 dark:text-gray-100",children:"Organization ID is missing"})};export{U as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{f as B,i as D,u as H,r as n,j as s,I as y,B as N,s as O,t as b}from"./index-7T7TTikv.js";import{L as v}from"./lock-DGEqses-.js";import{E as C}from"./eye-off-AoIvdwmO.js";import{E as P}from"./eye-DYwZYJcQ.js";import{R as T}from"./refresh-cw-B7fipPS4.js";import{A as U}from"./arrow-left-mae9HpSL.js";const J=()=>{const p=B(),[u]=D(),{t:e}=H(),r=u.get("email")||"",c=u.get("verificationCode")||"",i=u.get("userId")||"",[t,S]=n.useState(""),[d,E]=n.useState(""),[f,w]=n.useState(!1),[g,a]=n.useState(""),[x,L]=n.useState(!1),[h,R]=n.useState(!1);n.useEffect(()=>{!i&&!r&&a("Missing required parameters in the reset link. Please request a new password reset link."),c||a("Missing verification code in the reset link. Please request a new password reset link.")},[i,r,c]);const k=async m=>{if(m.preventDefault(),a(""),!t){a(e("msg.newPasswordRequired"));return}if(t.length<8){a(e("msg.passwordMinLength"));return}if(!d){a(e("msg.confirmPasswordRequired"));return}if(t!==d){a(e("msg.passwordMismatch"));return}const q=/[A-Z]/.test(t),I=/[a-z]/.test(t),M=/\d/.test(t),A=/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(t),l=[];if(q||l.push(e("msg.uppercaseLetter")),I||l.push(e("msg.lowercaseLetter")),M||l.push(e("msg.number")),A||l.push(e("msg.specialCharacter")),l.length>0){a(e("msg.passwordComplexity")+" "+l.join(", "));return}w(!0);try{const o={verificationCode:c,newPassword:t,confirmPassword:d};i&&(o.userId=i),r&&(o.email=r),await O(o),b.success(e("msg.successChange"),{description:e("msg.passwordResetSuccess")}),setTimeout(()=>p("/"),2e3)}catch(o){const j=(o==null?void 0:o.message)||e("msg.failedChange");a(j),b.error(e("msg.failedChange"),{description:j})}finally{w(!1)}};return s.jsx("div",{className:"min-h-screen bg-gray-100 p-4 flex items-center justify-center",children:s.jsxs("div",{className:"w-full max-w-md bg-white rounded-xl shadow-lg p-6 md:p-8",children:[s.jsxs("div",{className:"mb-6 md:mb-8 text-center",children:[s.jsx("img",{src:"/assets/smart-office-logo.svg",alt:"Smart Office Logo",className:"h-8 md:h-10 mb-4 md:mb-6 mx-auto"}),s.jsx("h1",{className:"text-xl md:text-2xl font-bold text-gray-900 mb-2",children:"Reset Password"}),s.jsx("p",{className:"text-xs md:text-sm text-gray-500",children:"Set a new password for your account"}),r&&s.jsxs("p",{className:"text-xs text-gray-400 mt-1 truncate max-w-full px-2",children:["Email: ",r]}),i&&s.jsxs("p",{className:"text-xs text-gray-400 mt-1 truncate max-w-full px-2",children:["User ID: ",i]})]}),s.jsxs("form",{onSubmit:k,className:"space-y-4 md:space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:s.jsx(v,{className:"h-4 w-4 md:h-5 md:w-5 text-gray-400"})}),s.jsx(y,{type:x?"text":"password",placeholder:"New Password",className:"h-10 rounded-md border px-4 text-sm ps-10 pr-10",value:t,onChange:m=>S(m.target.value),required:!0}),s.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center",onClick:()=>L(!x),"aria-label":x?"Hide password":"Show password",children:x?s.jsx(C,{className:"h-4 w-4 text-gray-400"}):s.jsx(P,{className:"h-4 w-4 text-gray-400"})})]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:s.jsx(v,{className:"h-4 w-4 md:h-5 md:w-5 text-gray-400"})}),s.jsx(y,{type:h?"text":"password",placeholder:"Confirm New Password",className:"h-10 rounded-md border px-4 text-sm ps-10 pr-10",value:d,onChange:m=>E(m.target.value),required:!0}),s.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center",onClick:()=>R(!h),"aria-label":h?"Hide password":"Show password",children:h?s.jsx(C,{className:"h-4 w-4 text-gray-400"}):s.jsx(P,{className:"h-4 w-4 text-gray-400"})})]}),g&&s.jsx("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 md:p-4",children:s.jsx("p",{className:"text-xs md:text-sm text-red-700 font-medium",children:g})})]}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(N,{type:"submit",className:"w-full h-10 bg-primary hover:bg-primary-300 text-white text-sm",disabled:f||!i&&!r||!c,children:f?s.jsxs("span",{className:"flex items-center justify-center",children:[s.jsx(T,{className:"animate-spin h-4 w-4 md:h-5 md:w-5 mr-2"}),"Resetting..."]}):"Reset Password"}),s.jsxs(N,{type:"button",variant:"outline",className:"w-full h-10 text-sm",onClick:()=>p("/"),children:[s.jsx(U,{className:"h-4 w-4 mr-2"}),"Back to Login"]})]})]})]})})};export{J as ResetPassword,J as default};

View File

@@ -1 +0,0 @@
import{f as B,i as D,u as H,r as n,j as s,I as y,B as N,s as O,t as b}from"./index-Db-xuq0b.js";import{L as v}from"./lock-BCybB-Lq.js";import{E as C}from"./eye-off-CDMvHElM.js";import{E as P}from"./eye-Bhud4znU.js";import{R as T}from"./refresh-cw-JB7N413f.js";import{A as U}from"./arrow-left-CE5-YfaQ.js";const J=()=>{const p=B(),[u]=D(),{t:e}=H(),r=u.get("email")||"",c=u.get("verificationCode")||"",i=u.get("userId")||"",[t,S]=n.useState(""),[d,E]=n.useState(""),[f,w]=n.useState(!1),[g,a]=n.useState(""),[x,L]=n.useState(!1),[h,R]=n.useState(!1);n.useEffect(()=>{!i&&!r&&a("Missing required parameters in the reset link. Please request a new password reset link."),c||a("Missing verification code in the reset link. Please request a new password reset link.")},[i,r,c]);const k=async m=>{if(m.preventDefault(),a(""),!t){a(e("msg.newPasswordRequired"));return}if(t.length<8){a(e("msg.passwordMinLength"));return}if(!d){a(e("msg.confirmPasswordRequired"));return}if(t!==d){a(e("msg.passwordMismatch"));return}const q=/[A-Z]/.test(t),I=/[a-z]/.test(t),M=/\d/.test(t),A=/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(t),l=[];if(q||l.push(e("msg.uppercaseLetter")),I||l.push(e("msg.lowercaseLetter")),M||l.push(e("msg.number")),A||l.push(e("msg.specialCharacter")),l.length>0){a(e("msg.passwordComplexity")+" "+l.join(", "));return}w(!0);try{const o={verificationCode:c,newPassword:t,confirmPassword:d};i&&(o.userId=i),r&&(o.email=r),await O(o),b.success(e("msg.successChange"),{description:e("msg.passwordResetSuccess")}),setTimeout(()=>p("/"),2e3)}catch(o){const j=(o==null?void 0:o.message)||e("msg.failedChange");a(j),b.error(e("msg.failedChange"),{description:j})}finally{w(!1)}};return s.jsx("div",{className:"min-h-screen bg-gray-100 p-4 flex items-center justify-center",children:s.jsxs("div",{className:"w-full max-w-md bg-white rounded-xl shadow-lg p-6 md:p-8",children:[s.jsxs("div",{className:"mb-6 md:mb-8 text-center",children:[s.jsx("img",{src:"/assets/smart-office-logo.svg",alt:"Smart Office Logo",className:"h-8 md:h-10 mb-4 md:mb-6 mx-auto"}),s.jsx("h1",{className:"text-xl md:text-2xl font-bold text-gray-900 mb-2",children:"Reset Password"}),s.jsx("p",{className:"text-xs md:text-sm text-gray-500",children:"Set a new password for your account"}),r&&s.jsxs("p",{className:"text-xs text-gray-400 mt-1 truncate max-w-full px-2",children:["Email: ",r]}),i&&s.jsxs("p",{className:"text-xs text-gray-400 mt-1 truncate max-w-full px-2",children:["User ID: ",i]})]}),s.jsxs("form",{onSubmit:k,className:"space-y-4 md:space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:s.jsx(v,{className:"h-4 w-4 md:h-5 md:w-5 text-gray-400"})}),s.jsx(y,{type:x?"text":"password",placeholder:"New Password",className:"h-10 rounded-md border px-4 text-sm ps-10 pr-10",value:t,onChange:m=>S(m.target.value),required:!0}),s.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center",onClick:()=>L(!x),"aria-label":x?"Hide password":"Show password",children:x?s.jsx(C,{className:"h-4 w-4 text-gray-400"}):s.jsx(P,{className:"h-4 w-4 text-gray-400"})})]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:s.jsx(v,{className:"h-4 w-4 md:h-5 md:w-5 text-gray-400"})}),s.jsx(y,{type:h?"text":"password",placeholder:"Confirm New Password",className:"h-10 rounded-md border px-4 text-sm ps-10 pr-10",value:d,onChange:m=>E(m.target.value),required:!0}),s.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center",onClick:()=>R(!h),"aria-label":h?"Hide password":"Show password",children:h?s.jsx(C,{className:"h-4 w-4 text-gray-400"}):s.jsx(P,{className:"h-4 w-4 text-gray-400"})})]}),g&&s.jsx("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 md:p-4",children:s.jsx("p",{className:"text-xs md:text-sm text-red-700 font-medium",children:g})})]}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(N,{type:"submit",className:"w-full h-10 bg-primary hover:bg-primary-300 text-white text-sm",disabled:f||!i&&!r||!c,children:f?s.jsxs("span",{className:"flex items-center justify-center",children:[s.jsx(T,{className:"animate-spin h-4 w-4 md:h-5 md:w-5 mr-2"}),"Resetting..."]}):"Reset Password"}),s.jsxs(N,{type:"button",variant:"outline",className:"w-full h-10 text-sm",onClick:()=>p("/"),children:[s.jsx(U,{className:"h-4 w-4 mr-2"}),"Back to Login"]})]})]})]})})};export{J as ResetPassword,J as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{K as S,N as x,V as h,j as f,Q as N,W as R,Y as g,X as a}from"./index-Db-xuq0b.js";var l={root:"m_18320242","skeleton-fade":"m_299c329c"};const j={visible:!0,animate:!0},_=R((r,{width:o,height:s,radius:e,circle:t})=>({root:{"--skeleton-height":a(s),"--skeleton-width":t?a(s):a(o),"--skeleton-radius":t?"1000px":e===void 0?void 0:g(e)}})),n=S((r,o)=>{const s=x("Skeleton",j,r),{classNames:e,className:t,style:i,styles:c,unstyled:m,vars:d,width:b,height:w,circle:P,visible:u,radius:V,animate:p,mod:v,...k}=s,y=h({name:"Skeleton",classes:l,props:s,className:t,style:i,classNames:e,styles:c,unstyled:m,vars:d,varsResolver:_});return f.jsx(N,{ref:o,...y("root"),mod:[{visible:u,animate:p},v],...k})});n.classes=l;n.displayName="@mantine/core/Skeleton";export{n as S};

View File

@@ -1 +0,0 @@
import{K as S,N as x,V as h,j as f,Q as N,W as R,Y as g,X as a}from"./index-7T7TTikv.js";var l={root:"m_18320242","skeleton-fade":"m_299c329c"};const j={visible:!0,animate:!0},_=R((r,{width:o,height:s,radius:e,circle:t})=>({root:{"--skeleton-height":a(s),"--skeleton-width":t?a(s):a(o),"--skeleton-radius":t?"1000px":e===void 0?void 0:g(e)}})),n=S((r,o)=>{const s=x("Skeleton",j,r),{classNames:e,className:t,style:i,styles:c,unstyled:m,vars:d,width:b,height:w,circle:P,visible:u,radius:V,animate:p,mod:v,...k}=s,y=h({name:"Skeleton",classes:l,props:s,className:t,style:i,classNames:e,styles:c,unstyled:m,vars:d,varsResolver:_});return f.jsx(N,{ref:o,...y("root"),mod:[{visible:u,animate:p},v],...k})});n.classes=l;n.displayName="@mantine/core/Skeleton";export{n as S};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{r as n,az as g,u as y,n as v,j as i}from"./index-7T7TTikv.js";import{A as j}from"./AdvancedTable-vWyUWUDX.js";import{C as A,a as C,b,d as N}from"./card-_ldW-koX.js";import{u as S,A as U}from"./ArchivedUserColumnDefn-Ja27QDEy.js";import{f as I}from"./organizationService-B_C-b9EH.js";import{S as z}from"./FormFields-DeF71qnl.js";import"./table-D_B7hhqb.js";import"./select--i8koVXg.js";import"./chevron-left-G_a9-f9o.js";import"./utils-N2wtfq7C.js";import"./badge-D4t6Wb1T.js";import"./command-B6S1IvD4.js";import"./search-y8VSu0lZ.js";import"./popover-CSKEA8hg.js";import"./Popover-BSKEfTKH.js";import"./use-uncontrolled-tg0LIUAX.js";import"./separator-BXi_hr72.js";import"./refresh-cw-B7fipPS4.js";import"./organizationsService-DIFVjoLn.js";import"./alert-dialog-DwppaTz4.js";import"./useEmployeePostions-BZG3u-zs.js";import"./employeePositionsService-C7MSoCNC.js";import"./ellipsis-vertical-CoMd89ns.js";import"./square-pen-Dh1zj83N.js";import"./user-plus-tzUBEFtH.js";import"./form-lLGtsTgY.js";import"./index.esm-BRNlF2G3.js";import"./label-CABYEcfW.js";import"./multi-select-CZLBnGmP.js";import"./single-select-CqAjmX3L.js";const ne=()=>{const[o,c]=n.useState(0),p=g(),{t:m}=y(),{data:t,isLoading:u,error:E}=v({queryKey:["organizations"],queryFn:I,staleTime:300*1e3}),[s,d]=n.useState(null),f=e=>{d(e)},h=n.useMemo(()=>(t==null?void 0:t.items.map(e=>({id:e.id,name:e.name,hierarchyType:"organization",value:e.units.length===1?e.units[0].id:"",children:Array.isArray(e.units)&&e.units.length>0?e.units.map(r=>({id:r.id,name:r.name,hierarchyType:"unit",value:r.id,children:[]})):[]})))||[],[t,p]);n.useEffect(()=>{if(!s&&(t!=null&&t.items)){const e=t.items.flatMap(r=>r.units).find(r=>r.id);e&&d(e.id)}},[t,s]),n.useEffect(()=>{s&&sessionStorage.setItem("selectedArchiveUnitId",s)},[s]),n.useEffect(()=>{const e=sessionStorage.getItem("selectedArchiveUnitId");e&&d(e)},[]);const{data:a,refetch:x}=S(s??""),l=e=>{c(e)};return u?i.jsx("div",{className:"text-gray-900 dark:text-gray-100",children:m("loading")}):i.jsx("div",{className:"p-6 space-y-6",children:i.jsxs(A,{className:"col-span-2 shadow-none border-none bg-transparent px-0",children:[i.jsx(C,{className:"flex flex-row justify-between items-center px-0",children:i.jsx(b,{className:"text-xl font-semibold",children:m("setting.archivedUsers")})}),i.jsx("div",{className:"mb-4",children:i.jsx(z,{label:m("selectUnit"),options:h,value:s,onChange:f,collapsible:!0})}),i.jsx(N,{className:"px-0",children:i.jsx(j,{columns:U,data:(a==null?void 0:a.items)||[],tableName:"Archived Users",toolBarPosition:"right",itemCount:(a==null?void 0:a.count)||0,pageIndex:o,onPageChange:l,nextFunction:()=>l(o+1),prevFunction:()=>l(Math.max(o-1,0)),refresh:x})})]})})};export{ne as default};

View File

@@ -1 +0,0 @@
import{r as n,az as g,u as y,n as v,j as i}from"./index-Db-xuq0b.js";import{A as j}from"./AdvancedTable-CC9ioMU-.js";import{C as A,a as C,b,d as N}from"./card-BBWyxDss.js";import{u as S,A as U}from"./ArchivedUserColumnDefn-DQXeUrrA.js";import{f as I}from"./organizationService-DPKKJMFw.js";import{S as z}from"./FormFields-BA7SVWfi.js";import"./table-D3n3VABd.js";import"./select-BoQxM42A.js";import"./chevron-left-DCpEaNzo.js";import"./utils-BncSPdK1.js";import"./badge-D7JvaQeJ.js";import"./command-Cr0tMDDu.js";import"./search-CM5F2ZRy.js";import"./popover-X-j_SRnG.js";import"./Popover-CzANYrEa.js";import"./use-uncontrolled-C3HRHW6t.js";import"./separator-BaOOgzZX.js";import"./refresh-cw-JB7N413f.js";import"./organizationsService-BEVk8qa1.js";import"./alert-dialog-B5Y0wlSz.js";import"./useEmployeePostions-CMraotEg.js";import"./employeePositionsService-CkHoE9xG.js";import"./ellipsis-vertical-Cs1B3vez.js";import"./square-pen-B91TPB19.js";import"./user-plus-CBq7Z0dQ.js";import"./form-BeLK5rTt.js";import"./index.esm-BG4gweZJ.js";import"./label-CsFy6wpo.js";import"./multi-select-C9K8HXhI.js";import"./single-select-D9ZG1edj.js";const ne=()=>{const[o,c]=n.useState(0),p=g(),{t:m}=y(),{data:t,isLoading:u,error:E}=v({queryKey:["organizations"],queryFn:I,staleTime:300*1e3}),[s,d]=n.useState(null),f=e=>{d(e)},h=n.useMemo(()=>(t==null?void 0:t.items?.map(e=>({id:e.id,name:e.name,hierarchyType:"organization",value:e.units.length===1?e.units[0].id:"",children:Array.isArray(e.units)&&e.units.length>0?e.units?.map(r=>({id:r.id,name:r.name,hierarchyType:"unit",value:r.id,children:[]})):[]})))||[],[t,p]);n.useEffect(()=>{if(!s&&(t!=null&&t.items)){const e=t.items.flatMap(r=>r.units).find(r=>r.id);e&&d(e.id)}},[t,s]),n.useEffect(()=>{s&&sessionStorage.setItem("selectedArchiveUnitId",s)},[s]),n.useEffect(()=>{const e=sessionStorage.getItem("selectedArchiveUnitId");e&&d(e)},[]);const{data:a,refetch:x}=S(s??""),l=e=>{c(e)};return u?i.jsx("div",{className:"text-gray-900 dark:text-gray-100",children:m("loading")}):i.jsx("div",{className:"p-6 space-y-6",children:i.jsxs(A,{className:"col-span-2 shadow-none border-none bg-transparent px-0",children:[i.jsx(C,{className:"flex flex-row justify-between items-center px-0",children:i.jsx(b,{className:"text-xl font-semibold",children:m("setting.archivedUsers")})}),i.jsx("div",{className:"mb-4",children:i.jsx(z,{label:m("selectUnit"),options:h,value:s,onChange:f,collapsible:!0})}),i.jsx(N,{className:"px-0",children:i.jsx(j,{columns:U,data:(a==null?void 0:a.items)||[],tableName:"Archived Users",toolBarPosition:"right",itemCount:(a==null?void 0:a.count)||0,pageIndex:o,onPageChange:l,nextFunction:()=>l(o+1),prevFunction:()=>l(Math.max(o-1,0)),refresh:x})})]})})};export{ne as default};

View File

@@ -1,6 +0,0 @@
import{y as O,u as w,az as S,r as c,j as e,B as l,A as I}from"./index-Db-xuq0b.js";import{C as M,a as U,b as T,d as B}from"./card-BBWyxDss.js";import{S as P,a as R,b as F,c as K,d as L}from"./select-BoQxM42A.js";import{A as v}from"./AdvancedTable-CC9ioMU-.js";import{u as E}from"./useOrganizations-DiuNBweX.js";import{c as H,a as V,u as _}from"./useArchived-D2u5xEKl.js";import{A as f}from"./archive-restore-CST5LuiK.js";import"./table-D3n3VABd.js";import"./chevron-left-DCpEaNzo.js";import"./utils-BncSPdK1.js";import"./badge-D7JvaQeJ.js";import"./command-Cr0tMDDu.js";import"./search-CM5F2ZRy.js";import"./popover-X-j_SRnG.js";import"./Popover-CzANYrEa.js";import"./use-uncontrolled-C3HRHW6t.js";import"./separator-BaOOgzZX.js";import"./refresh-cw-JB7N413f.js";import"./organizationsService-BEVk8qa1.js";import"./unitService-CmGVtFHQ.js";import"./positionService-JD0NEiGK.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],G=O("landmark",q),ge=()=>{const{t:a}=w(),m=S(),[t,g]=c.useState("organizations"),{organizationsResponse:d}=E("Org",{take:300,skip:0}),o=(d==null?void 0:d.items)??[],[h,p]=c.useState("");!h&&o.length>0&&p(o[0].id);const{data:s,refetch:j}=H(),{data:n,refetch:z}=V(t==="units"&&h||void 0),u=c.useMemo(()=>(s==null?void 0:s.items)??s??[],[s]),x=c.useMemo(()=>(n==null?void 0:n.items)??n??[],[n]),{restoreUnit:y,isRestoringUnit:k,restoreOrganization:N,isRestoringOrganization:A}=_(),b=[{id:"name",header:a("organization.name","Name"),cell:({row:i})=>{var r;return m((r=i.original)==null?void 0:r.name)||"—"}},{id:"key",header:a("organization.key","Key"),accessorKey:"key"},{id:"actions",header:a("userIncomingretun.Actions","Actions"),cell:({row:i})=>e.jsxs(l,{size:"sm",variant:"outline",disabled:A,onClick:()=>N(i.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(f,{className:"h-4 w-4"}),a("archive.restore","Restore")]})}],C=[{id:"name",header:a("organization.name","Name"),cell:({row:i})=>{var r;return m((r=i.original)==null?void 0:r.name)||"—"}},{id:"key",header:a("organization.key","Key"),accessorKey:"key"},{id:"actions",header:a("userIncomingretun.Actions","Actions"),cell:({row:i})=>e.jsxs(l,{size:"sm",variant:"outline",disabled:k,onClick:()=>y(i.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(f,{className:"h-4 w-4"}),a("archive.restore","Restore")]})}];return e.jsx("div",{className:"p-6 space-y-6",children:e.jsxs(M,{className:"shadow-none border-none bg-transparent px-0",children:[e.jsx(U,{className:"flex flex-row justify-between items-center px-0",children:e.jsx(T,{className:"text-xl font-semibold",children:a("archive.archivedItems","Archived Items")})}),e.jsxs("div",{className:"flex gap-2 mb-4",children:[e.jsxs(l,{variant:t==="organizations"?"default":"outline",onClick:()=>g("organizations"),className:"flex items-center gap-2",children:[e.jsx(G,{className:"h-4 w-4"}),a("archive.archivedOrganizations","Archived Organizations")]}),e.jsxs(l,{variant:t==="units"?"default":"outline",onClick:()=>g("units"),className:"flex items-center gap-2",children:[e.jsx(I,{className:"h-4 w-4"}),a("archive.archivedUnits","Archived Units")]})]}),t==="units"&&o.length>0&&e.jsxs("div",{className:"mb-4 w-full sm:w-1/2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-200",children:a("organization.selectOrganization","Select Organization")}),e.jsxs(P,{value:h,onValueChange:i=>p(i),children:[e.jsx(R,{className:"mt-1 block w-full",children:e.jsx(F,{placeholder:a("organization.selectOrganization")})}),e.jsx(K,{children:o?.map(i=>e.jsx(L,{value:i.id,children:m(i.name)},i.id))})]})]}),e.jsx(B,{className:"px-0",children:t==="organizations"?e.jsx(v,{columns:b,data:u,tableName:"ArchivedOrganizations",toolBarPosition:"right",itemCount:u.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:j}):e.jsx(v,{columns:C,data:x,tableName:"ArchivedUnits",toolBarPosition:"right",itemCount:x.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:z})})]})})};export{ge as default};

View File

@@ -1,6 +0,0 @@
import{y as O,u as w,az as S,r as c,j as e,B as l,A as I}from"./index-7T7TTikv.js";import{C as M,a as U,b as T,d as B}from"./card-_ldW-koX.js";import{S as P,a as R,b as F,c as K,d as L}from"./select--i8koVXg.js";import{A as v}from"./AdvancedTable-vWyUWUDX.js";import{u as E}from"./useOrganizations-CPt4mkXS.js";import{c as H,a as V,u as _}from"./useArchived-5V0W60Gf.js";import{A as f}from"./archive-restore-CbEMfc7_.js";import"./table-D_B7hhqb.js";import"./chevron-left-G_a9-f9o.js";import"./utils-N2wtfq7C.js";import"./badge-D4t6Wb1T.js";import"./command-B6S1IvD4.js";import"./search-y8VSu0lZ.js";import"./popover-CSKEA8hg.js";import"./Popover-BSKEfTKH.js";import"./use-uncontrolled-tg0LIUAX.js";import"./separator-BXi_hr72.js";import"./refresh-cw-B7fipPS4.js";import"./organizationsService-DIFVjoLn.js";import"./unitService-DTtkt-Pb.js";import"./positionService-BwPU5sNe.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],G=O("landmark",q),ge=()=>{const{t:a}=w(),m=S(),[t,g]=c.useState("organizations"),{organizationsResponse:d}=E("Org",{take:300,skip:0}),o=(d==null?void 0:d.items)??[],[h,p]=c.useState("");!h&&o.length>0&&p(o[0].id);const{data:s,refetch:j}=H(),{data:n,refetch:z}=V(t==="units"&&h||void 0),u=c.useMemo(()=>(s==null?void 0:s.items)??s??[],[s]),x=c.useMemo(()=>(n==null?void 0:n.items)??n??[],[n]),{restoreUnit:y,isRestoringUnit:k,restoreOrganization:N,isRestoringOrganization:A}=_(),b=[{id:"name",header:a("organization.name","Name"),cell:({row:i})=>{var r;return m((r=i.original)==null?void 0:r.name)||"—"}},{id:"key",header:a("organization.key","Key"),accessorKey:"key"},{id:"actions",header:a("userIncomingretun.Actions","Actions"),cell:({row:i})=>e.jsxs(l,{size:"sm",variant:"outline",disabled:A,onClick:()=>N(i.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(f,{className:"h-4 w-4"}),a("archive.restore","Restore")]})}],C=[{id:"name",header:a("organization.name","Name"),cell:({row:i})=>{var r;return m((r=i.original)==null?void 0:r.name)||"—"}},{id:"key",header:a("organization.key","Key"),accessorKey:"key"},{id:"actions",header:a("userIncomingretun.Actions","Actions"),cell:({row:i})=>e.jsxs(l,{size:"sm",variant:"outline",disabled:k,onClick:()=>y(i.original.id),className:"flex items-center gap-2 text-primary-700 hover:bg-primary-50",children:[e.jsx(f,{className:"h-4 w-4"}),a("archive.restore","Restore")]})}];return e.jsx("div",{className:"p-6 space-y-6",children:e.jsxs(M,{className:"shadow-none border-none bg-transparent px-0",children:[e.jsx(U,{className:"flex flex-row justify-between items-center px-0",children:e.jsx(T,{className:"text-xl font-semibold",children:a("archive.archivedItems","Archived Items")})}),e.jsxs("div",{className:"flex gap-2 mb-4",children:[e.jsxs(l,{variant:t==="organizations"?"default":"outline",onClick:()=>g("organizations"),className:"flex items-center gap-2",children:[e.jsx(G,{className:"h-4 w-4"}),a("archive.archivedOrganizations","Archived Organizations")]}),e.jsxs(l,{variant:t==="units"?"default":"outline",onClick:()=>g("units"),className:"flex items-center gap-2",children:[e.jsx(I,{className:"h-4 w-4"}),a("archive.archivedUnits","Archived Units")]})]}),t==="units"&&o.length>0&&e.jsxs("div",{className:"mb-4 w-full sm:w-1/2",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-200",children:a("organization.selectOrganization","Select Organization")}),e.jsxs(P,{value:h,onValueChange:i=>p(i),children:[e.jsx(R,{className:"mt-1 block w-full",children:e.jsx(F,{placeholder:a("organization.selectOrganization")})}),e.jsx(K,{children:o.map(i=>e.jsx(L,{value:i.id,children:m(i.name)},i.id))})]})]}),e.jsx(B,{className:"px-0",children:t==="organizations"?e.jsx(v,{columns:b,data:u,tableName:"ArchivedOrganizations",toolBarPosition:"right",itemCount:u.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:j}):e.jsx(v,{columns:C,data:x,tableName:"ArchivedUnits",toolBarPosition:"right",itemCount:x.length,pageIndex:0,onPageChange:()=>{},nextFunction:()=>{},prevFunction:()=>{},refresh:z})})]})})};export{ge as default};

View File

@@ -1 +0,0 @@
import{r as R,K as L,N as T,j as s,ae as W,V as X,au as Z,a8 as ee,Q as N,W as te,aa as se,_ as h,Y as ae}from"./index-7T7TTikv.js";import{I as oe,a as ce,b as re}from"./InputsGroupFieldset-B16dMH0P.js";import{u as A}from"./use-uncontrolled-tg0LIUAX.js";const B=R.createContext(null),le=B.Provider,ne=()=>R.useContext(B),ie={},x=L((l,o)=>{const{value:t,defaultValue:e,onChange:b,size:d,wrapperProps:u,children:p,readOnly:f,...y}=T("SwitchGroup",ie,l),[c,m]=A({value:t,defaultValue:e,finalValue:[],onChange:b}),w=v=>{const n=v.currentTarget.value;!f&&m(c.includes(n)?c.filter(C=>C!==n):[...c,n])};return s.jsx(le,{value:{value:c,onChange:w,size:d},children:s.jsx(W.Wrapper,{size:d,ref:o,...u,...y,labelElement:"div",__staticSelector:"SwitchGroup",children:s.jsx(oe,{role:"group",children:p})})})});x.classes=W.Wrapper.classes;x.displayName="@mantine/core/SwitchGroup";var F={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const he={labelPosition:"right"},de=te((l,{radius:o,color:t,size:e})=>({root:{"--switch-radius":o===void 0?void 0:ae(o),"--switch-height":h(e,"switch-height"),"--switch-width":h(e,"switch-width"),"--switch-thumb-size":h(e,"switch-thumb-size"),"--switch-label-font-size":h(e,"switch-label-font-size"),"--switch-track-label-padding":h(e,"switch-track-label-padding"),"--switch-color":t?se(t,l):void 0}})),_=L((l,o)=>{const t=T("Switch",he,l),{classNames:e,className:b,style:d,styles:u,unstyled:p,vars:f,color:y,label:c,offLabel:m,onLabel:w,id:v,size:n,radius:C,wrapperProps:K,thumbIcon:O,checked:g,defaultChecked:Q,onChange:S,labelPosition:P,description:U,error:j,disabled:G,variant:Y,rootRef:$,mod:q,...D}=t,a=ne(),H=n||(a==null?void 0:a.size),i=X({name:"Switch",props:t,classes:F,className:b,style:d,classNames:e,styles:u,unstyled:p,vars:f,varsResolver:de}),{styleProps:J,rest:I}=Z(D),V=ee(v),r=a?{checked:a.value.includes(I.value),onChange:a.onChange}:{},[z,M]=A({value:r.checked??g,defaultValue:Q,finalValue:!1});return s.jsxs(ce,{...i("root"),__staticSelector:"Switch",__stylesApiProps:t,id:V,size:H,labelPosition:P,label:c,description:U,error:j,disabled:G,bodyElement:"label",labelElement:"span",classNames:e,styles:u,unstyled:p,"data-checked":r.checked||g||void 0,variant:Y,ref:$,mod:q,...J,...K,children:[s.jsx("input",{...I,disabled:G,checked:z,"data-checked":r.checked||g||void 0,onChange:k=>{var E;a?(E=r.onChange)==null||E.call(r,k):S==null||S(k),M(k.currentTarget.checked)},id:V,ref:o,type:"checkbox",role:"switch",...i("input")}),s.jsxs(N,{"aria-hidden":"true",component:"span",mod:{error:j,"label-position":P,"without-labels":!w&&!m},...i("track"),children:[s.jsx(N,{component:"span",mod:"reduce-motion",...i("thumb"),children:O}),s.jsx("span",{...i("trackLabel"),children:z?w:m})]})]})});_.classes={...F,...re};_.displayName="@mantine/core/Switch";_.Group=x;export{_ as S};

View File

@@ -1 +0,0 @@
import{r as R,K as L,N as T,j as s,ae as W,V as X,au as Z,a8 as ee,Q as N,W as te,aa as se,_ as h,Y as ae}from"./index-Db-xuq0b.js";import{I as oe,a as ce,b as re}from"./InputsGroupFieldset-COkNgcEo.js";import{u as A}from"./use-uncontrolled-C3HRHW6t.js";const B=R.createContext(null),le=B.Provider,ne=()=>R.useContext(B),ie={},x=L((l,o)=>{const{value:t,defaultValue:e,onChange:b,size:d,wrapperProps:u,children:p,readOnly:f,...y}=T("SwitchGroup",ie,l),[c,m]=A({value:t,defaultValue:e,finalValue:[],onChange:b}),w=v=>{const n=v.currentTarget.value;!f&&m(c.includes(n)?c.filter(C=>C!==n):[...c,n])};return s.jsx(le,{value:{value:c,onChange:w,size:d},children:s.jsx(W.Wrapper,{size:d,ref:o,...u,...y,labelElement:"div",__staticSelector:"SwitchGroup",children:s.jsx(oe,{role:"group",children:p})})})});x.classes=W.Wrapper.classes;x.displayName="@mantine/core/SwitchGroup";var F={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const he={labelPosition:"right"},de=te((l,{radius:o,color:t,size:e})=>({root:{"--switch-radius":o===void 0?void 0:ae(o),"--switch-height":h(e,"switch-height"),"--switch-width":h(e,"switch-width"),"--switch-thumb-size":h(e,"switch-thumb-size"),"--switch-label-font-size":h(e,"switch-label-font-size"),"--switch-track-label-padding":h(e,"switch-track-label-padding"),"--switch-color":t?se(t,l):void 0}})),_=L((l,o)=>{const t=T("Switch",he,l),{classNames:e,className:b,style:d,styles:u,unstyled:p,vars:f,color:y,label:c,offLabel:m,onLabel:w,id:v,size:n,radius:C,wrapperProps:K,thumbIcon:O,checked:g,defaultChecked:Q,onChange:S,labelPosition:P,description:U,error:j,disabled:G,variant:Y,rootRef:$,mod:q,...D}=t,a=ne(),H=n||(a==null?void 0:a.size),i=X({name:"Switch",props:t,classes:F,className:b,style:d,classNames:e,styles:u,unstyled:p,vars:f,varsResolver:de}),{styleProps:J,rest:I}=Z(D),V=ee(v),r=a?{checked:a.value.includes(I.value),onChange:a.onChange}:{},[z,M]=A({value:r.checked??g,defaultValue:Q,finalValue:!1});return s.jsxs(ce,{...i("root"),__staticSelector:"Switch",__stylesApiProps:t,id:V,size:H,labelPosition:P,label:c,description:U,error:j,disabled:G,bodyElement:"label",labelElement:"span",classNames:e,styles:u,unstyled:p,"data-checked":r.checked||g||void 0,variant:Y,ref:$,mod:q,...J,...K,children:[s.jsx("input",{...I,disabled:G,checked:z,"data-checked":r.checked||g||void 0,onChange:k=>{var E;a?(E=r.onChange)==null||E.call(r,k):S==null||S(k),M(k.currentTarget.checked)},id:V,ref:o,type:"checkbox",role:"switch",...i("input")}),s.jsxs(N,{"aria-hidden":"true",component:"span",mod:{error:j,"label-position":P,"without-labels":!w&&!m},...i("track"),children:[s.jsx(N,{component:"span",mod:"reduce-motion",...i("thumb"),children:O}),s.jsx("span",{...i("trackLabel"),children:z?w:m})]})]})});_.classes={...F,...re};_.displayName="@mantine/core/Switch";_.Group=x;export{_ as S};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
var l={exports:{}},y,v;function R(){if(v)return y;v=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return y=e,y}var m,b;function w(){if(b)return m;b=1;var e=R();function o(){}function r(){}return r.resetWarningCache=o,m=function(){function t(i,p,f,g,h,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}t.isRequired=t;function c(){return t}var u={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:c,element:t,elementType:t,instanceOf:c,node:t,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:r,resetWarningCache:o};return u.PropTypes=u,u},m}var E;function D(){return E||(E=1,l.exports=w()()),l.exports}var n=D();const O={onActivate:n.func,onAddUndo:n.func,onBeforeAddUndo:n.func,onBeforeExecCommand:n.func,onBeforeGetContent:n.func,onBeforeRenderUI:n.func,onBeforeSetContent:n.func,onBeforePaste:n.func,onBlur:n.func,onChange:n.func,onClearUndos:n.func,onClick:n.func,onContextMenu:n.func,onCommentChange:n.func,onCompositionEnd:n.func,onCompositionStart:n.func,onCompositionUpdate:n.func,onCopy:n.func,onCut:n.func,onDblclick:n.func,onDeactivate:n.func,onDirty:n.func,onDrag:n.func,onDragDrop:n.func,onDragEnd:n.func,onDragGesture:n.func,onDragOver:n.func,onDrop:n.func,onExecCommand:n.func,onFocus:n.func,onFocusIn:n.func,onFocusOut:n.func,onGetContent:n.func,onHide:n.func,onInit:n.func,onInput:n.func,onKeyDown:n.func,onKeyPress:n.func,onKeyUp:n.func,onLoadContent:n.func,onMouseDown:n.func,onMouseEnter:n.func,onMouseLeave:n.func,onMouseMove:n.func,onMouseOut:n.func,onMouseOver:n.func,onMouseUp:n.func,onNodeChange:n.func,onObjectResizeStart:n.func,onObjectResized:n.func,onObjectSelected:n.func,onPaste:n.func,onPostProcess:n.func,onPostRender:n.func,onPreProcess:n.func,onProgressState:n.func,onRedo:n.func,onRemove:n.func,onReset:n.func,onSaveContent:n.func,onSelectionChange:n.func,onSetAttrib:n.func,onSetContent:n.func,onShow:n.func,onSubmit:n.func,onUndo:n.func,onVisualAid:n.func,onSkinLoadError:n.func,onThemeLoadError:n.func,onModelLoadError:n.func,onPluginLoadError:n.func,onIconsLoadError:n.func,onLanguageLoadError:n.func,onScriptsLoad:n.func,onScriptsLoadError:n.func},L={apiKey:n.string,licenseKey:n.string,id:n.string,inline:n.bool,init:n.object,initialValue:n.string,onEditorChange:n.func,value:n.string,tagName:n.string,tabIndex:n.number,cloudChannel:n.string,plugins:n.oneOfType([n.string,n.array]),toolbar:n.oneOfType([n.string,n.array]),disabled:n.bool,textareaName:n.string,tinymceScriptSrc:n.oneOfType([n.string,n.arrayOf(n.string),n.arrayOf(n.shape({src:n.string,async:n.bool,defer:n.bool}))]),rollback:n.oneOfType([n.number,n.oneOf([!1])]),scriptLoading:n.shape({async:n.bool,defer:n.bool,delay:n.number}),...O},N=e=>typeof e=="function",T=e=>e in O,C=e=>e.substr(2),x=(e,o,r,t,c,u,i)=>{const p=Object.keys(c).filter(T),f=Object.keys(u).filter(T),g=p.filter(a=>u[a]===void 0),h=f.filter(a=>c[a]===void 0);g.forEach(a=>{const s=C(a),d=i[s];r(s,d),delete i[s]}),h.forEach(a=>{const s=t(e,a),d=C(a);i[d]=s,o(d,s)})},I=(e,o,r,t,c)=>x(c,e.on.bind(e),e.off.bind(e),(u,i)=>p=>{var f;return(f=u(i))==null?void 0:f(p,e)},o,r,t);let P=0;const M=e=>{const o=Date.now(),r=Math.floor(Math.random()*1e9);return P++,e+"_"+r+P+String(o)},A=e=>e!==null&&(e.tagName.toLowerCase()==="textarea"||e.tagName.toLowerCase()==="input"),S=e=>typeof e>"u"||e===""?[]:Array.isArray(e)?e:e.split(" "),_=(e,o)=>S(e).concat(S(o)),F=()=>window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function",U=e=>{if(!("isConnected"in Node.prototype)){let o=e,r=e.parentNode;for(;r!=null;)o=r,r=o.parentNode;return o===e.ownerDocument}return e.isConnected},j=(e,o)=>{e!==void 0&&(e.mode!=null&&typeof e.mode=="object"&&typeof e.mode.set=="function"?e.mode.set(o):e.setMode(o))},k=e=>{const o=e.replace(/\s+/g,"");return/^(\+2519\d{8}|09\d{8})$/.test(o)||/^(\+2517\d{8}|07\d{8})$/.test(o)},B=e=>{const o=e.replace(/\s+/g,"");return/^(\+2519\d{8}|09\d{8})$/.test(o)||/^(\+2517\d{8}|07\d{8})$/.test(o)},K=e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/.test(e);export{L as E,K as a,k as b,F as c,I as d,N as e,U as f,A as g,B as i,_ as m,j as s,M as u};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{r as a,j as s,b8 as l,bv as i}from"./index-Db-xuq0b.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a,v as b};

View File

@@ -1 +0,0 @@
import{r as a,j as s,b8 as l,bv as i}from"./index-7T7TTikv.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a,v as b};

View File

@@ -1 +0,0 @@
import{r,j as a,b1 as p,b8 as i,b9 as x}from"./index-Db-xuq0b.js";const u=r.createContext({open:!1,setOpen:()=>{}});function b({children:e,open:t,onOpenChange:s,defaultOpen:l=!1}){const[o,n]=r.useState(l),c=t!==void 0,f=c?t:o,g=r.useCallback(d=>{c||n(d),s==null||s(d)},[c,s]);return a.jsx(u.Provider,{value:{open:f,setOpen:g},children:e})}function j({children:e,asChild:t}){const{setOpen:s}=r.useContext(u);return t&&r.isValidElement(e)?r.cloneElement(e,{onClick:l=>{var o,n;(n=(o=e.props).onClick)==null||n.call(o,l),s(!0)}}):a.jsx("span",{"data-slot":"alert-dialog-trigger",onClick:()=>s(!0),style:{display:"contents",cursor:"pointer"},children:e})}function A({children:e,className:t,...s}){const{open:l,setOpen:o}=r.useContext(u);return a.jsx(p,{opened:l,onClose:()=>o(!1),withCloseButton:!1,centered:!0,padding:0,radius:"lg",classNames:{content:i("bg-background text-foreground",t),overlay:"bg-black/50"},...s,children:a.jsx("div",{className:"grid gap-4 p-6",children:e})})}function v({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",e),...t})}function D({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function N({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-title",className:i("text-lg font-semibold",e),...t})}function y({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-description",className:i("text-muted-foreground text-sm",e),...t})}function C({className:e,onClick:t,children:s,...l}){const{setOpen:o}=r.useContext(u);return a.jsx("button",{type:"button",className:i(x(),e),onClick:n=>{t==null||t(n),o(!1)},...l,children:s})}function E({className:e,onClick:t,children:s,...l}){const{setOpen:o}=r.useContext(u);return a.jsx("button",{type:"button",className:i(x({variant:"outline"}),e),onClick:n=>{t==null||t(n),o(!1)},...l,children:s})}export{b as A,A as a,v as b,N as c,y as d,D as e,E as f,C as g,j as h};

View File

@@ -1 +0,0 @@
import{r,j as a,b1 as p,b8 as i,b9 as x}from"./index-7T7TTikv.js";const u=r.createContext({open:!1,setOpen:()=>{}});function b({children:e,open:t,onOpenChange:s,defaultOpen:l=!1}){const[o,n]=r.useState(l),c=t!==void 0,f=c?t:o,g=r.useCallback(d=>{c||n(d),s==null||s(d)},[c,s]);return a.jsx(u.Provider,{value:{open:f,setOpen:g},children:e})}function j({children:e,asChild:t}){const{setOpen:s}=r.useContext(u);return t&&r.isValidElement(e)?r.cloneElement(e,{onClick:l=>{var o,n;(n=(o=e.props).onClick)==null||n.call(o,l),s(!0)}}):a.jsx("span",{"data-slot":"alert-dialog-trigger",onClick:()=>s(!0),style:{display:"contents",cursor:"pointer"},children:e})}function A({children:e,className:t,...s}){const{open:l,setOpen:o}=r.useContext(u);return a.jsx(p,{opened:l,onClose:()=>o(!1),withCloseButton:!1,centered:!0,padding:0,radius:"lg",classNames:{content:i("bg-background text-foreground",t),overlay:"bg-black/50"},...s,children:a.jsx("div",{className:"grid gap-4 p-6",children:e})})}function v({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",e),...t})}function D({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function N({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-title",className:i("text-lg font-semibold",e),...t})}function y({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-description",className:i("text-muted-foreground text-sm",e),...t})}function C({className:e,onClick:t,children:s,...l}){const{setOpen:o}=r.useContext(u);return a.jsx("button",{type:"button",className:i(x(),e),onClick:n=>{t==null||t(n),o(!1)},...l,children:s})}function E({className:e,onClick:t,children:s,...l}){const{setOpen:o}=r.useContext(u);return a.jsx("button",{type:"button",className:i(x({variant:"outline"}),e),onClick:n=>{t==null||t(n),o(!1)},...l,children:s})}export{b as A,A as a,v as b,N as c,y as d,D as e,E as f,C as g,j as h};

View File

@@ -1,6 +0,0 @@
import{y as e}from"./index-Db-xuq0b.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],o=e("archive-restore",t);export{o as A};

View File

@@ -1,6 +0,0 @@
import{y as e}from"./index-7T7TTikv.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],o=e("archive-restore",t);export{o as A};

View File

@@ -1,6 +0,0 @@
import{y as o}from"./index-Db-xuq0b.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],r=o("arrow-left",e);export{r as A};

View File

@@ -1,6 +0,0 @@
import{y as o}from"./index-7T7TTikv.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],r=o("arrow-left",e);export{r as A};

View File

@@ -1 +0,0 @@
import{r as p,K as M,N,V as b,j as c,Q as j,W as w,a3 as Z,$ as z,Y as F,_ as V,b8 as $}from"./index-7T7TTikv.js";const G=p.createContext(null),P=G.Provider;function B(){return{withinGroup:!!p.useContext(G)}}var C={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const U={},K=w((r,{spacing:a})=>({group:{"--ag-spacing":Z(a)}})),h=M((r,a)=>{const t=N("AvatarGroup",U,r),{classNames:e,className:n,style:l,styles:u,unstyled:i,vars:d,spacing:s,...o}=t,m=b({name:"AvatarGroup",classes:C,props:t,className:n,style:l,classNames:e,styles:u,unstyled:i,vars:d,varsResolver:K,rootSelector:"group"});return c.jsx(P,{value:!0,children:c.jsx(j,{ref:a,...m("group"),...o})})});h.classes=C;h.displayName="@mantine/core/AvatarGroup";function Q(r){return c.jsx("svg",{...r,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function W(r){let a=0;for(let t=0;t<r.length;t+=1){const e=r.charCodeAt(t);a=(a<<5)-a+e,a|=0}return a}const Y=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function q(r,a=Y){const t=W(r),e=Math.abs(t)%a.length;return a[e]}function D(r,a=2){const t=r.split(" ");return t.length===1?r.slice(0,a).toUpperCase():t.map(e=>e[0]).slice(0,a).join("").toUpperCase()}const H={},J=w((r,{size:a,radius:t,variant:e,gradient:n,color:l,autoContrast:u,name:i,allowedInitialsColors:d})=>{const s=l==="initials"&&typeof i=="string"?q(i,d):l,o=r.variantColorResolver({color:s||"gray",theme:r,gradient:n,variant:e||"light",autoContrast:u});return{root:{"--avatar-size":V(a,"avatar-size"),"--avatar-radius":t===void 0?void 0:F(t),"--avatar-bg":s||e?o.background:void 0,"--avatar-color":s||e?o.color:void 0,"--avatar-bd":s||e?o.border:void 0}}}),g=z((r,a)=>{const t=N("Avatar",H,r),{classNames:e,className:n,style:l,styles:u,unstyled:i,vars:d,src:s,alt:o,radius:m,color:X,gradient:aa,imageProps:v,children:R,autoContrast:ra,mod:E,name:x,allowedInitialsColors:ta,...I}=t,S=B(),[_,y]=p.useState(!s),f=b({name:"Avatar",props:t,classes:C,className:n,style:l,classNames:e,styles:u,unstyled:i,vars:d,varsResolver:J});return p.useEffect(()=>y(!s),[s]),c.jsx(j,{...f("root"),mod:[{"within-group":S.withinGroup},E],ref:a,...I,children:_?c.jsx("span",{...f("placeholder"),title:o,children:R||typeof x=="string"&&D(x)||c.jsx(Q,{})}):c.jsx("img",{...v,...f("image"),src:s,alt:o,onError:k=>{var A;y(!0),(A=v==null?void 0:v.onError)==null||A.call(v,k)}})})});g.classes=C;g.displayName="@mantine/core/Avatar";g.Group=h;p.createContext({});function L({className:r,children:a,...t}){const e=p.Children.toArray(a),n=e.find(s=>{var o;return p.isValidElement(s)&&((o=s.type)==null?void 0:o.displayName)==="AvatarImage"}),l=e.find(s=>{var o;return p.isValidElement(s)&&((o=s.type)==null?void 0:o.displayName)==="AvatarFallback"}),u=n==null?void 0:n.props.src,i=(n==null?void 0:n.props.alt)??"",d=l==null?void 0:l.props.children;return c.jsx(g,{src:u,alt:i,radius:"xl",className:$("relative flex size-8 shrink-0 overflow-hidden rounded-full",r),...t,children:d})}L.displayName="Avatar";function O({className:r,src:a,alt:t,...e}){return null}O.displayName="AvatarImage";function T({className:r,children:a,...t}){return null}T.displayName="AvatarFallback";export{L as A,T as a,g as b,O as c};

View File

@@ -1 +0,0 @@
import{r as p,K as M,N,V as b,j as c,Q as j,W as w,a3 as Z,$ as z,Y as F,_ as V,b8 as $}from"./index-Db-xuq0b.js";const G=p.createContext(null),P=G.Provider;function B(){return{withinGroup:!!p.useContext(G)}}var C={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const U={},K=w((r,{spacing:a})=>({group:{"--ag-spacing":Z(a)}})),h=M((r,a)=>{const t=N("AvatarGroup",U,r),{classNames:e,className:n,style:l,styles:u,unstyled:i,vars:d,spacing:s,...o}=t,m=b({name:"AvatarGroup",classes:C,props:t,className:n,style:l,classNames:e,styles:u,unstyled:i,vars:d,varsResolver:K,rootSelector:"group"});return c.jsx(P,{value:!0,children:c.jsx(j,{ref:a,...m("group"),...o})})});h.classes=C;h.displayName="@mantine/core/AvatarGroup";function Q(r){return c.jsx("svg",{...r,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function W(r){let a=0;for(let t=0;t<r.length;t+=1){const e=r.charCodeAt(t);a=(a<<5)-a+e,a|=0}return a}const Y=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function q(r,a=Y){const t=W(r),e=Math.abs(t)%a.length;return a[e]}function D(r,a=2){const t=r.split(" ");return t.length===1?r.slice(0,a).toUpperCase():t?.map(e=>e[0]).slice(0,a).join("").toUpperCase()}const H={},J=w((r,{size:a,radius:t,variant:e,gradient:n,color:l,autoContrast:u,name:i,allowedInitialsColors:d})=>{const s=l==="initials"&&typeof i=="string"?q(i,d):l,o=r.variantColorResolver({color:s||"gray",theme:r,gradient:n,variant:e||"light",autoContrast:u});return{root:{"--avatar-size":V(a,"avatar-size"),"--avatar-radius":t===void 0?void 0:F(t),"--avatar-bg":s||e?o.background:void 0,"--avatar-color":s||e?o.color:void 0,"--avatar-bd":s||e?o.border:void 0}}}),g=z((r,a)=>{const t=N("Avatar",H,r),{classNames:e,className:n,style:l,styles:u,unstyled:i,vars:d,src:s,alt:o,radius:m,color:X,gradient:aa,imageProps:v,children:R,autoContrast:ra,mod:E,name:x,allowedInitialsColors:ta,...I}=t,S=B(),[_,y]=p.useState(!s),f=b({name:"Avatar",props:t,classes:C,className:n,style:l,classNames:e,styles:u,unstyled:i,vars:d,varsResolver:J});return p.useEffect(()=>y(!s),[s]),c.jsx(j,{...f("root"),mod:[{"within-group":S.withinGroup},E],ref:a,...I,children:_?c.jsx("span",{...f("placeholder"),title:o,children:R||typeof x=="string"&&D(x)||c.jsx(Q,{})}):c.jsx("img",{...v,...f("image"),src:s,alt:o,onError:k=>{var A;y(!0),(A=v==null?void 0:v.onError)==null||A.call(v,k)}})})});g.classes=C;g.displayName="@mantine/core/Avatar";g.Group=h;p.createContext({});function L({className:r,children:a,...t}){const e=p.Children.toArray(a),n=e.find(s=>{var o;return p.isValidElement(s)&&((o=s.type)==null?void 0:o.displayName)==="AvatarImage"}),l=e.find(s=>{var o;return p.isValidElement(s)&&((o=s.type)==null?void 0:o.displayName)==="AvatarFallback"}),u=n==null?void 0:n.props.src,i=(n==null?void 0:n.props.alt)??"",d=l==null?void 0:l.props.children;return c.jsx(g,{src:u,alt:i,radius:"xl",className:$("relative flex size-8 shrink-0 overflow-hidden rounded-full",r),...t,children:d})}L.displayName="Avatar";function O({className:r,src:a,alt:t,...e}){return null}O.displayName="AvatarImage";function T({className:r,children:a,...t}){return null}T.displayName="AvatarFallback";export{L as A,T as a,g as b,O as c};

View File

@@ -1 +0,0 @@
import{r as d,b8 as a,j as g,bv as u}from"./index-7T7TTikv.js";const o=u("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-blue-100 text-blue-800 text-sm font-medium me-2 px-3 py-0.5 rounded-full dark:bg-blue-900 dark:text-blue-300",secondary:"bg-indigo-100 text-indigo-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-indigo-900 dark:text-indigo-300",destructive:"bg-gray-100 text-gray-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-gray-700 dark:text-gray-300",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",info:"border-transparent bg-info text-info-foreground [a&]:hover:bg-info/90",purple:"bg-purple-100 text-purple-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-purple-900 dark:text-purple-300",warning:"bg-pink-100 text-pink-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-pink-900 dark:text-pink-300",success:"bg-green-100 text-green-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-green-900 dark:text-green-300",danger:"bg-red-100 text-red-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-red-900 dark:text-red-300",danger2:"bg-yellow-100 text-yellow-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-yellow-900 dark:text-yellow-300",forward:"bg-orange-100 text-orange-800 text-sm font-medium me-2 px-3 py-0.5 rounded-full dark:bg-orange-900 dark:text-orange-300",dispatched:"bg-green-100 text-green-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-green-900 dark:text-green-300"}},defaultVariants:{variant:"default"}});function l({className:t,variant:r,asChild:i=!1,children:e,...n}){return i&&d.isValidElement(e)?d.cloneElement(e,{className:a(o({variant:r}),e.props.className,t),...n}):g.jsx("span",{"data-slot":"badge",className:a(o({variant:r}),t),...n,children:e})}export{l as B};

View File

@@ -1 +0,0 @@
import{r as d,b8 as a,j as g,bv as u}from"./index-Db-xuq0b.js";const o=u("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-blue-100 text-blue-800 text-sm font-medium me-2 px-3 py-0.5 rounded-full dark:bg-blue-900 dark:text-blue-300",secondary:"bg-indigo-100 text-indigo-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-indigo-900 dark:text-indigo-300",destructive:"bg-gray-100 text-gray-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-gray-700 dark:text-gray-300",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",info:"border-transparent bg-info text-info-foreground [a&]:hover:bg-info/90",purple:"bg-purple-100 text-purple-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-purple-900 dark:text-purple-300",warning:"bg-pink-100 text-pink-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-pink-900 dark:text-pink-300",success:"bg-green-100 text-green-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-green-900 dark:text-green-300",danger:"bg-red-100 text-red-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-red-900 dark:text-red-300",danger2:"bg-yellow-100 text-yellow-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-yellow-900 dark:text-yellow-300",forward:"bg-orange-100 text-orange-800 text-sm font-medium me-2 px-3 py-0.5 rounded-full dark:bg-orange-900 dark:text-orange-300",dispatched:"bg-green-100 text-green-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-green-900 dark:text-green-300"}},defaultVariants:{variant:"default"}});function l({className:t,variant:r,asChild:i=!1,children:e,...n}){return i&&d.isValidElement(e)?d.cloneElement(e,{className:a(o({variant:r}),e.props.className,t),...n}):g.jsx("span",{"data-slot":"badge",className:a(o({variant:r}),t),...n,children:e})}export{l as B};

View File

@@ -1,6 +0,0 @@
import{y as h}from"./index-Db-xuq0b.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],d=h("building",t);export{d as B};

View File

@@ -1,6 +0,0 @@
import{y as h}from"./index-7T7TTikv.js";/**
* @license lucide-react v0.513.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],d=h("building",t);export{d as B};

Some files were not shown because too many files have changed in this diff Show More