1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ba18004a-9195-4e1d-b141-fea0749bcbe5",e._sentryDebugIdIdentifier="sentry-dbid-ba18004a-9195-4e1d-b141-fea0749bcbe5")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8918],{77124:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my_timesheets",function(){return s(29067)}])},78091:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return w},default:function(){return _}});var l=s(85893),a=s(67294),r=s(60013),n=s(96762),i=s(53974),d=s(58192),o=s(84573),c=s(16789),m=s(88485),x=s(23634),u=s(59183),h=s(71750),f=s(61200),p=s(68784),j=s(30387);let b=()=>{let{t:e}=(0,h.$G)("document");return(0,l.jsxs)("div",{className:"flex flex-1 flex-col gap-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"flex flex-row gap-2",children:(0,l.jsx)("h3",{className:"text-2xl font-bold text-neutral-900 dark:text-neutral-100",children:e("empty_page.title")})}),(0,l.jsx)("p",{className:"mt-1 text-sm text-neutral-500 dark:text-neutral-300",children:e("empty_page.description")})]}),(0,l.jsx)("hr",{className:"border-t border-neutral-300 dark:border-neutral-600"}),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"flex flex-col gap-3",children:(0,l.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,l.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,l.jsx)("span",{className:"flex h-[4.375rem] w-[4.375rem] items-center justify-center rounded-md bg-pink-500",children:(0,l.jsx)(f.JO.DocOnDoc,{className:"h-[1.875rem] w-[1.875rem] text-white"})}),(0,l.jsxs)("div",{className:"flex w-[12.125rem] flex-col gap-1",children:[(0,l.jsx)("span",{className:"text-sm font-medium",children:e("empty_page.share_files_title")}),(0,l.jsx)("p",{className:"dark:text-netural-400 text-sm text-neutral-500",children:e("empty_page.share_files_description")})]})]}),(0,l.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,l.jsx)("span",{className:"flex h-[4.375rem] w-[4.375rem] items-center justify-center rounded-md bg-yellow-500",children:(0,l.jsx)(f.JO.Folder,{className:"h-[1.875rem] w-[1.875rem] text-white"})}),(0,l.jsxs)("div",{className:"flex w-[12.125rem] flex-col gap-1",children:[(0,l.jsx)("span",{className:"text-sm font-medium",children:e("empty_page.organize_files_title")}),(0,l.jsx)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:e("empty_page.organize_files_description")})]})]})]})}),(0,l.jsx)("div",{className:"flex flex-col gap-3",children:(0,l.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,l.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,l.jsx)("span",{className:"flex h-[4.375rem] w-[4.375rem] items-center justify-center rounded-md bg-teal-500",children:(0,l.jsx)(f.JO.Check,{className:"h-[1.875rem] w-[1.875rem] text-white"})}),(0,l.jsxs)("div",{className:"flex w-[12.125rem] flex-col gap-1",children:[(0,l.jsx)("span",{className:"text-sm font-medium",children:e("empty_page.track_acknowledgement_title")}),(0,l.jsx)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:e("empty_page.track_acknowledgement_description")})]})]}),(0,l.jsxs)("div",{className:"flex flex-row gap-3",children:[(0,l.jsx)("span",{className:"flex h-[4.375rem] w-[4.375rem] items-center justify-center rounded-md bg-blue-500",children:(0,l.jsx)(f.JO.Folder,{className:"h-[1.875rem] w-[1.875rem] text-white"})}),(0,l.jsxs)("div",{className:"flex w-[12.125rem] flex-col gap-1",children:[(0,l.jsx)("span",{className:"text-sm font-medium",children:e("empty_page.share_updates_title")}),(0,l.jsx)("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:e("empty_page.share_updates_description")})]})]})]})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(p.Z,{title:"Upload a document",hideIcon:!0,className:"w-48 normal-case",from:"INTRODUCTION_PAGE"}),(0,l.jsx)(j.Z,{children:(0,l.jsxs)("div",{className:"flex w-56 gap-1 text-sm text-blue-500 group-active/newFolderButton:text-blue-600 dar
1k:text-blue-400 dark:group-active/newFolderButton:text-blue-300",children:[(0,l.jsx)("span",{className:"font-medium",children:e("folder.create_a_folder")}),(0,l.jsx)(f.JO.ArrowRight,{className:"h-5 w-5"})]})})]})]})};var v=s(1393);let g=()=>{let{isOwner:e}=(0,c.iN)(),t=(0,x.k)(),{queryResult:{isPending:s},documents:a}=(0,m.sA)(t),{data:r}=(0,v.pDv)();return e&&(a.length>0||(null==r?void 0:r.folders)&&r.folders.length>0)||!e?(0,l.jsx)("div",{className:"mx-auto h-full w-full gap-5 overflow-hidden px-4 py-2 md:px-8 lg:pt-6",children:(0,l.jsx)("div",{className:"flex h-full w-full flex-col",children:(0,l.jsxs)("div",{className:"flex h-full flex-col gap-8 overflow-hidden",children:[(0,l.jsx)(i.Z,{}),(0,l.jsx)(n.Z,{})]})})}):e&&!s&&0===a.length&&(null==r?void 0:r.folders.length)===0?(0,l.jsx)("div",{className:"mx-auto flex max-w-screen-sm items-start gap-5 px-4 py-2 md:px-8 lg:pb-8 lg:pt-6 xl:w-full",children:(0,l.jsx)("div",{className:"flex w-full flex-col gap-9 2xl:flex-row",children:(0,l.jsx)(b,{})})}):(0,l.jsx)(u.Z,{})},N=()=>{let e=(0,d.U0)();return(0,a.useEffect)(()=>{null==e||e.capture("Viewed Document Page")},[e]),(0,l.jsx)("div",{className:"relative h-full w-full overflow-auto",children:(0,l.jsx)(g,{})})};N.getLayout=e=>(0,l.jsx)(r.Z,{title:"Camelo | Documents",containerClassNames:"overflow-hidden h-full lg:px-0",children:(0,l.jsx)(o.Z,{children:e})});var w=!0,_=N},29067:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return ey},default:function(){return ek}});var l=s(85893),a=s(60013),r=s(61200),n=s(71750),i=s(93799),d=s(84272),o=s(16789),c=s(30120),m=s(67294),x=s(58575);let u=e=>{let{className:t=""}=e,{t:s}=(0,n.$G)("timesheets"),a=(0,o.xJ)(),[i,u]=(0,m.useState)(!1),h=()=>{u(!1)},f=()=>{u(!0)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.zx,{type:"primary",icon:(0,l.jsx)(r.JO.PlusSymbol,{className:"size-5"}),className:(0,x.m)("capitalize",t),onClick:f,children:s("new_timesheet")}),(0,l.jsx)(r.dy,{visible:i,onClose:h,placement:"right",title:(0,l.jsx)("h1",{className:"capitalize",children:s("new_timesheet")}),children:(0,l.jsx)("div",{className:"relative mt-6 flex-1 px-4 sm:px-6",children:(0,l.jsx)("div",{className:"absolute inset-0 px-4 sm:pl-6 sm:pr-0",children:(null==a?void 0:a.id)?(0,l.jsx)(d.Z,{hideAssigneeField:!0,employeeId:null==a?void 0:a.id,date:c.ou.now(),onClose:h}):null})})})]})};var h=s(48583),f=s(87536),p=s(26885),j=s(21041),b=s(73995),v=s(64470);let g=p.L.map(e=>({id:e.value,name:e.label})),N=e=>{var t,s,a;let{onClose:d}=e,{t:x}=(0,n.$G)("common"),u=(0,o.$_)(),p=(0,h.Dv)(i.l),[N,w]=(0,j.Z)(),_=(0,m.useMemo)(()=>null!==(s=null==p?void 0:p.startDate)&&void 0!==s?s:c.ou.now().startOf("month"),[p]),y=(0,m.useMemo)(()=>null!==(a=null==p?void 0:p.endDate)&&void 0!==a?a:c.ou.now().endOf("month"),[p]),k=(0,f.cI)({defaultValues:{startDate:_,endDate:y,format:"GENERAL"},mode:"onChange"}),{control:C,handleSubmit:T,formState:{isSubmitting:D},watch:I,setValue:O}=k,S=I("startDate"),P=I("endDate"),Z=I("format"),E=(0,o.xJ)();(0,m.useEffect)(()=>{S&&P&&P<S&&O("endDate",S)},[S]);let z=T(e=>{var t,s,l;let{startDate:a,endDate:r,schedule:n,exportScheduleType:i,exportColumnType:o,exportColumns:c,format:m}=e;N({input:{fromTime:null!==(t=a.toISO())&&void 0!==t?t:"",toTime:null!==(s=r.toISO())&&void 0!==s?s:"",scheduleId:"all"===i.id?void 0:n.id,employeeIds:[null!==(l=null==E?void 0:E.id)&&void 0!==l?l:""],columns:(null==o?void 0:o.id)==="some"?(c||[]).map(e=>e.id):void 0,format:m}},{onSettled:d})});return(0,l.jsx)(f.RV,{...k,children:(0,l.jsxs)("form",{className:"flex flex-col gap-5 pt-6",onSubmit:z,children:[(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsxs)("label",{htmlFor:"startDate",className:"flex w-1/2 flex-col gap-2 text-sm",children:[(0,l.jsx)("span",{className:"font-medium capitalize text-neutral-700 dark:text-neutral-200",children:x("start_date")}),(0,l.jsx)(f.Qr,{control:C,defaultValue:_,name:"startDate",render:e=>{let{field:{value:t,onChange:s}}=e;return(0,l.jsx)(r.Mt,{value:t,onChange:s,trigger:"focus",children:(0,l.jsx)(r.Mt.Input,{})})}})]}),(0,l.jsxs)("label",{htmlFor:"endDate",className:"flex w-1/2 flex-col gap-2 text-sm",children:[(0,l.jsx)("span",{className:"font-medium capitalize text-neutral-700 dark:text-neutral-200",children:x("end_date")}),(0,l.jsx)(f.Qr,{control:C,defaultValue:y,name:"endDate",render:e=>{let{field:{value:t,onChange:s}}=e;return(0,l.jsx)(r.Mt,{minDate:S,value:t,onChange:s,trigger:"focus",children:(0,l.jsx)(r.Mt.Input,{})})}})]})]}),(0,l.jsx)(b.Z,{}),(null==u?void 0:null===(t=u.metadata)||void 0===t?void 0:t.payroll_provider)==="ADP_RUN"?null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("label",{htmlFor:"format",className:"flex w-1/2 flex-col gap-2 text-sm",children:[(0,l.jsx)("span",{className:"font-medium capitalize text-neutral-700 dark:text-neutral-200",children:x("format",{ns:"common"})}),(0,l.jsx)(f.Qr,{name:"format",control:C,rules:{required:!0},render:e=>{let{field:{value:t,onChange:s}}=e;return(0,l.jsx)(r.Ri,{items:g,value:g.find(e=>e.id===t),onChange:e=>
1s(e.id),className:"w-full self-stretch"})}})]}),"EUROPEAN"===Z?(0,l.jsx)(v.Z,{}):null]}),(0,l.jsx)(r.bZ,{icon:"fill",type:"info",message:x("export_timesheet.description",{ns:"timesheets"}),itemsClassName:"items-start"}),(0,l.jsxs)("div",{className:"flex w-full justify-end gap-2",children:[(0,l.jsx)(r.zx,{onClick:d,disabled:D||w,children:x("cancel")}),(0,l.jsx)(r.zx,{htmlType:"submit",type:"primary",disabled:D||w,loading:D||w,children:x("export")})]})]})})},w=()=>{let{t:e}=(0,n.$G)("timesheets"),[t,s]=(0,m.useState)(!1),a=()=>s(!0),i=()=>s(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.u,{content:e("export_timesheet.title"),children:(0,l.jsxs)("button",{type:"button",className:"bg-default relative -ml-px inline-flex items-center rounded border border-neutral-300 px-2 py-2 text-sm font-medium text-neutral-500 hover:bg-neutral-50 focus:z-10 focus-visible:border-blue-500 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-blue-500 disabled:bg-neutral-50 disabled:text-neutral-400 dark:border-neutral-600 dar
1k:text-neutral-400 dark:hover:bg-neutral-700/50 dark:disabled:bg-neutral-700/50 dark:disabled:text-neutral-500",onClick:a,children:[(0,l.jsx)("span",{className:"sr-only",children:e("export_timesheet.title")}),(0,l.jsx)(r.JO.DocDown,{className:"h-5 w-5","aria-hidden":"true"})]})}),(0,l.jsxs)(r.u_,{visible:t,onClose:i,className:"relative",children:[(0,l.jsx)(r.u_.Header,{title:e("export_timesheet.title"),className:"mb-6 items-center"}),(0,l.jsx)("hr",{className:"-mx-6 h-[1px]"}),(0,l.jsx)(N,{onClose:i})]})]})},_=()=>{let{t:e}=(0,n.$G)("timesheets");return(0,l.jsxs)("div",{className:"flex w-full flex-row items-center gap-4",children:[(0,l.jsx)("div",{className:"flex flex-row gap-2",children:(0,l.jsx)(r.H1,{className:"flex-1",children:e("my_timesheets_page.page_title")})}),(0,l.jsxs)("div",{className:"flex flex-1 items-center justify-end gap-3",children:[(0,l.jsx)(i.Z,{}),(0,l.jsx)(w,{}),(0,l.jsx)("div",{className:"ml-3 mr-3 h-5 w-px bg-neutral-200 dark:bg-neutral-700"}),(0,l.jsx)(u,{})]})]})};var y=s(4835),k=s.n(y),C=s(11163);let T=e=>{let{filter:t,pageSize:s=31,beforeCursor:l,afterCursor:a,dateRange:r}=e,n=(0,o.xJ)();return{filter:{...t,fromTime:r?r.startDate.toISO():void 0,toTime:r?r.endDate.toISO():void 0,employeeIds:n?[null==n?void 0:n.id]:void 0},first:l?void 0:s,last:l?s:void 0,before:l,after:a}};var D=s(88735),I=s(88485),O=s(22638),S=s(1393),P=s(14611),Z=s(78091),E=s(89847),z=s(50933),J=s(23791),G=s(88313),R=s(85071);let L=e=>{let{timesheet:t}=e,{t:s}=(0,n.$G)("timesheets"),{referenceObject:a}=t;return(0,l.jsxs)("section",{className:"flex h-[calc(100vh-300px)] flex-1 flex-col overflow-x-auto",children:[(0,l.jsx)("span",{className:"flex pl-6 text-base font-bold",children:s((null==a?void 0:a.__typename)==="TimeCard"?"time_log":"notes")}),(0,l.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(null==a?void 0:a.__typename)==="TimeCard"&&(0,l.jsx)(R.Z,{timeCardId:a.id,row:t}),!a&&(0,l.jsx)(G.Z,{row:t})]})]})},$=e=>{var t,s;let{timesheet:a}=e,{t:i}=(0,n.$G)(),d=c.ou.fromISO(a.from),m=c.ou.fromISO(a.to),x=(0,o.C)(),u=Math.floor(a.totalDuration/60),h=a.totalDuration%60,f="".concat(u," hours ").concat(h," minutes");return(0,l.jsx)("div",{className:"mt-2 flex-1",children:(0,l.jsxs)("section",{className:"mt-4 grid h-[calc(100vh-300px)] flex-1 items-start gap-8 [grid-template-columns:1fr_1fr]",children:[(0,l.jsxs)("div",{className:"flex h-full flex-col overflow-auto",children:[(0,l.jsx)("div",{className:"shrink-0 pb-2",children:(0,l.jsx)("span",{className:"flex text-base font-bold",children:i("details",{ns:"common"})})}),(0,l.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto pr-2",children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"mb-4 flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-neutral-700 dark:text-neutral-200",children:i("employee")}),(0,l.jsx)("div",{className:"rounded-md border border-neutral-300 bg-neutral-100 px-3 py-2 dark:border-neutral-600 dar
1k:bg-neutral-700/80 dark:focus:ring-blue-300/30",children:a.employee.name})]}),(0,l.jsxs)("div",{className:"mb-4 flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-neutral-700 dark:text-neutral-200",children:i("position",{ns:"common"})}),(0,l.jsx)("div",{className:"rounded-md border border-neutral-300 bg-neutral-100 px-3 py-2 dark:border-neutral-600 dark:bg-neutral-700/80 dark:focus:ring-blue-300/30",children:(null===(t=a.group)||void 0===t?void 0:t.name)?a.group.name:i("no_position",{ns:"schedule"})})]}),(0,l.jsxs)("div",{className:"mb-4 flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-sm font-medium capitalize text-neutral-700 dark:text-neutral-200",children:i("schedule",{ns:"common"})}),(0,l.jsx)("div",{className:"rounded-md border border-neutral-300 bg-neutral-100 px-3 py-2 dark:border-neutral-600 dark:bg-neutral-700/80 dark:focus:ring-blue-300/30",children:null===(s=a.schedule)||void 0===s?void 0:s.name})]}),(0,l.jsxs)("div",{className:"mb-4 flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-neutral-700 dark:text-neutral-200",children:i("date",{ns:"common"})}),(0,l.jsx)("div",{className:"rounded-md border border-neutral-300 bg-neutral-100 px-3 py-2 dark:border-neutral-600 dar
1k:bg-neutral-700/80 dark:focus:ring-blue-300/30",children:d.toLocaleString(c.ou.DATE_SHORT)})]}),(0,l.jsxs)("div",{className:"mb-4 flex flex-row gap-6",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-neutral-700 dark:text-neutral-200",children:i("clock_in",{ns:"common"})}),(0,l.jsx)("div",{className:"rounded-md border border-neutral-300 bg-neutral-100 px-3 py-2 dark:border-neutral-600 dark:bg-neutral-700/80 dark:focus:ring-blue-300/30",children:x(d)})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-neutral-700 dark:text-neutral-200",children:i("clock_out",{ns:"common"})}),(0,l.jsx)("div",{className:"rounded-md border border-neutral-300 bg-neutral-100 px-3 py-2 dark:border-neutral-600 dark:bg-neutral-700/80 dark:focus:ring-blue-300/30",children:x(m)})]})]}),(0,l.jsxs)("div",{className:"mb-4 flex flex-col gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-neutral-700 dark:text-neutral-200",children:i("unpaid_break",{ns:"schedule"})}),0===a.unpaidBreaks.length?(0,l.jsx)("div",{className:"rounded-md border border-neutral-300 bg-neutral-100 px-3 py-2 dark:border-neutral-600 dar
1k:bg-neutral-700/80 dark:focus:ring-blue-300/30",children:i("no_unpaid_break",{ns:"timesheets"})}):(0,l.jsx)("div",{className:"flex w-1/3 flex-col gap-2",children:a.unpaidBreaks.map(e=>(0,l.jsx)(r.II,{className:"disabled:bg-neutral-100 disabled:dark:bg-neutral-700/80",disabled:!0,value:e.duration,prefix:(0,l.jsx)(r.JO.Timer,{className:"h-5 w-5 text-neutral-500 dark:text-neutral-400"})}))})]})]})}),(0,l.jsx)("div",{className:"sticky bottom-0 pr-4 pt-5",children:(0,l.jsxs)("div",{className:"flex flex-row items-center justify-between border-y border-neutral-200 py-4 text-sm dark:border-neutral-700",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-neutral-700 dark:text-neutral-200",children:(0,l.jsx)("span",{children:i("total",{ns:"schedule"})})}),(0,l.jsx)("span",{className:"text-nowrap font-medium text-neutral-900 dark:text-neutral-100",children:f})]})})]}),(0,l.jsx)(L,{timesheet:a})]})})},A=e=>{let{timesheet:t,onClose:s}=e,{t:a}=(0,n.$G)();return(0,l.jsxs)("section",{className:"mt-4 grid h-[calc(100vh-300px)] flex-1 items-start gap-8 [grid-template-columns:1fr_1fr]",children:[(0,l.jsxs)("div",{className:"flex h-full flex-col overflow-auto",children:[(0,l.jsx)("div",{className:"shrink-0 pb-2",children:(0,l.jsx)("span",{className:"flex text-base font-bold",children:a("details",{ns:"common"})})}),(0,l.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,l.jsx)(J.Z,{className:"h-full",onClose:s,timesheet:t,hideAssigneeField:!0})})]}),(0,l.jsx)(L,{timesheet:t})]})},F=e=>{let{timesheet:t,onClose:s}=e,a=(0,o.a7)(),r=a.can("update",t);return r?(0,l.jsx)(A,{timesheet:t,onClose:s}):(0,l.jsx)($,{timesheet:t})},M=()=>(0,l.jsxs)("div",{className:"flex h-full w-full flex-1 flex-col gap-5 overflow-x-auto px-5 py-8",children:[(0,l.jsx)("header",{className:"flex w-full items-center",children:(0,l.jsx)(r.Od.Title,{className:"h-10 w-1/3"})}),(0,l.jsx)("div",{className:"flex flex-1 flex-col overflow-y-auto lg:overflow-y-hidden",children:(0,l.jsx)(r.Od.Title,{className:"h-full"})})]}),B=e=>{let{timesheetId:t,onClose:s}=e,{t:a}=(0,n.$G)(),{data:i,isError:d}=(0,S.Ys_)({id:t});if(null==i?void 0:i.timesheet){let{state:e,from:t}=i.timesheet,n=c.ou.fromISO(t);return(0,l.jsxs)("div",{className:"relative ml-2 flex h-full flex-col",children:[(0,l.jsx)("div",{className:"sticky top-0 z-[50] flex items-center justify-between gap-4 bg-white pb-2 dark:bg-neutral-800 dark:text-neutral-200",children:(0,l.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,l.jsx)(r.H2,{children:a("timesheet_details_screen.header",{date:n&&n.toLocaleString({weekday:"short",month:"short",day:"2-digit",year:"numeric"}),ns:"timesheets"})}),(0,l.jsx)("span",{children:(0,l.jsx)(z.i,{state:e})})]})}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(F,{timesheet:i.timesheet,onClose:s})})]})}return d?(0,l.jsx)("div",{className:"mx-auto flex h-full max-w-screen-md flex-1 flex-col justify-center",children:(0,l.jsx)(D.Z,{title:a("something_went_wrong",{ns:"common"}),description:a("please_try_again_later",{ns:"common"})})}):(0,l.jsx)(M,{})},q=e=>{let{timesheetId:t,visible:s,onClose:a}=e;return(0,l.jsxs)(r.u_,{visible:s,className:"h-[85vh] pt-5 sm:w-full sm:max-w-[68vw]",onClose:a,children:[(0,l.jsx)(r.u_.Header,{className:"pb-2"}),(0,l.jsx)("div",{className:"time-off-details relative h-full w-full",children:(0,l.jsx)(B,{timesheetId:t,onClose:a})})]})};var U=s(78037);let V=e=>{let{state:t}=e,{t:s}=(0,n.$G)("common"),a=(0,U.EQ)(t).with("DRAFT",()=>(0,l.jsx)(r.Ct,{className:"w-fit",bordered:!0,color:"gray",children:s("status.draft")})).with("SUBMITTED",()=>(0,l.jsx)(r.Ct,{className:"w-fit",bordered:!0,color:"yellow",children:s("status.awaiting_approval")})).with("APPROVED",()=>(0,l.jsx)(r.Ct,{className:"w-fit",bordered:!0,color:"green",children:s("status.approved")})).with("REJECTED",()=>(0,l.jsx)(r.Ct,{className:"w-fit",bordered:!0,color:"red",children:s("status.rejected")})).with("PROCESSED",()=>(0,l.jsx)(r.Ct,{className:"w-fit",bordered:!0,color:"yellow",children:s("status.processed")})).otherwise(()=>null);return a},Q=e=>{let t=(0,o.a7)(),s=t.can("submit",e),l=t.can("update",e),a=t.can("resubmit",e),r=t.can("withdraw",e),n=t.can("destroy",e),i=t.can("show",e);return{canSubmitTimesheet:s,canEditTimesheet:l,canResubmitTimesheet:a,canWithdrawTimesheet:r,canDeleteTimesheet:n,canViewTimeSheet:i}};var H=s(78403),W=s(30202);let K=()=>{let{t:e}=(0,n.$G)("common"),t=(0,W.NL)(),s=(0,o.vN)(),l=(0,C.useRouter)(),{mutate:a,isPending:r}=(0,S.HQu)({onSuccess:a=>{var r,n;let i=null===(r=a.withdrawTimesheet)||void 0===r?void 0:r.result;
1if(i)l.push({pathname:"/my_timesheets",query:{...l.query,tab:"all"}}),H.Am.success(e("flash_message.success.description.withdrawn",{model:e("timesheet",{ns:"common"}),ns:"common"})),t.invalidateQueries({queryKey:["Timesheets"]});else{let e=null===(n=a.withdrawTimesheet)||void 0===n?void 0:n.errors[0];s(e)}}});return[a,r]},X=()=>{let{t:e}=(0,n.$G)("common"),t=(0,W.NL)(),s=(0,o.vN)(),{mutate:l,isPending:a}=(0,S.rcz)({onSuccess:l=>{var a,r;let n=null===(a=l.submitDraftTimesheet)||void 0===a?void 0:a.result;if(n)H.Am.success(e("flash_message.success.description.submitted",{model:e("timesheet",{ns:"common"}),ns:"common"})),t.invalidateQueries({queryKey:["Timesheets"]});else{let e=null===(r=l.submitDraftTimesheet)||void 0===r?void 0:r.errors[0];s(e)}}});return[l,a]};var Y=s(2025),ee=s(85709);let et=()=>{let{t:e}=(0,n.$G)("common"),t=(0,W.NL)(),s=(0,ee.Z)(),{mutate:l,isPending:a}=(0,S.f8x)({onSuccess:l=>{var a,r;let n=null===(a=l.destroyTimesheet)||void 0===a?void 0:a.result;if(n)H.Am.success(e("flash_message.success.description.deleted",{model:e("timesheet",{ns:"common"}),ns:"common"})),t.invalidateQueries({queryKey:["Timesheets"]});else{let e=null===(r=l.destroyTimesheet)||void 0===r?void 0:r.errors[0];s(e)}}});return[l,a]};var es=s(74287);let el=e=>{let{timesheetId:t,visible:s,onClose:a}=e,{t:r}=(0,n.$G)("timesheets"),[i,d]=et();return(0,l.jsx)(es.sm,{className:"outline outline-[1px] outline-neutral-300",type:"danger",confirmText:r("delete_timesheet_confirmation_message"),visible:s,onClose:a,onConfirm:()=>i({input:{timesheetId:t}}),btnConfirmProps:{loading:d}})},ea=e=>{let{timesheet:t}=e,{t:s}=(0,n.$G)("timesheets"),{id:a}=t,[i,d]=(0,m.useState)("none"),{canSubmitTimesheet:o,canEditTimesheet:c,canResubmitTimesheet:x,canWithdrawTimesheet:u,canDeleteTimesheet:h}=Q(t),[f]=K(),[p]=X(),j=e=>{d(e)},b=()=>{d("none")},v=k()([o&&{key:"submitDraftTimesheet",label:s("action_buttons.submit_timesheet"),icon:(0,l.jsx)(r.JO.Paperplane,{className:"size-5"}),onClick:e=>{e.stopPropagation(),p({input:{timesheetId:a}})}},c&&{key:"editTimesheet",label:s("action_buttons.edit_timesheet"),icon:(0,l.jsx)(r.JO.Pencil,{className:"size-5"}),onClick:e=>{e.stopPropagation(),j("edit")}},x&&{key:"resubmitTimesheet",label:s("action_buttons.resubmit_timesheet"),icon:(0,l.jsx)(r.JO.RectangleAndPencilAndEllipsis,{className:"size-5"}),onClick:e=>{e.stopPropagation(),j("resubmit")}},u&&{key:"withDrawTimesheet",label:s("action_buttons.withdraw_timesheet"),icon:(0,l.jsx)(r.JO.ArrowUturnBackward,{className:"size-5"}),onClick:e=>{e.stopPropagation(),f({input:{timesheetId:a}})}},h&&{key:"deleteTimesheet",preset:"danger",label:s("action_buttons.delete_timesheet"),icon:(0,l.jsx)(r.JO.Trash,{}),onClick:e=>{e.stopPropagation(),j("delete")}}]);return 0===v.length?null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.v2,{items:v,scrollLock:!0,triggerRender:(0,l.jsx)("button",{onClick:e=>e.stopPropagation(),type:"button",className:"self-center rounded-md p-1 hover:bg-neutral-100 dark:hover:bg-neutral-700/80",children:(0,l.jsx)(r.JO.DotsHorizontal,{className:"h-4 w-4"})})}),(0,l.jsx)(el,{timesheetId:a,visible:"delete"===i,onClose:b}),(0,l.jsxs)("div",{role:"button",tabIndex:0,onClick:e=>e.stopPropagation(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation())},children:[(0,l.jsx)(r.dy,{visible:"edit"===i,onClose:b,placement:"right",title:(0,l.jsx)("h1",{className:"capitalize",children:s("action_buttons.edit_timesheet")}),children:(0,l.jsx)("div",{className:"relative mt-6 flex-1 px-4 sm:px-6",children:(0,l.jsx)("div",{className:"absolute inset-0 px-4 sm:pl-6 sm:pr-0",children:(0,l.jsx)(Y.Z,{timesheetId:a,onClose:b})})})}),(0,l.jsx)(r.dy,{visible:"resubmit"===i,onClose:b,placement:"right",title:(0,l.jsx)("h1",{className:"capitalize",children:s("action_buttons.resubmit_timesheet")}),children:(0,l.jsx)("div",{className:"relative mt-6 flex-1 px-4 sm:px-6",children:(0,l.jsx)("div",{className:"absolute inset-0 px-4 sm:pl-6 sm:pr-0",children:(0,l.jsx)(Y.Z,{timesheetId:a,onClose:b,formAction:"resubmit"})})})})]})]})},er=e=>{let{totalDuration:t}=e,{t:s}=(0,n.$G)("common",{keyPrefix:"duration"}),a=Math.floor(t/60),r=t%60,i=s(a>1?"hr_other":"hr_one",{count:a}),d=s(r>
11?"min_other":"min_one",{count:r}),o="".concat(i," ").concat(d);return(0,l.jsx)("span",{children:o})};var en=s(49688),ei=s(96525),ed=s(18043),eo=s(67356);let ec=e=>{let{timesheet:t}=e,{group:s,schedule:a,referenceObject:n}=t;return(0,l.jsxs)("div",{className:"flex h-full items-center justify-start gap-2",children:[(()=>{if(n){if("LeaveRequest"===n.__typename){let{leaveCategory:e,id:t}=n;return(0,l.jsx)(en.Z,{name:(0,eo.g_)(e),leaveId:t})}if("Shift"===n.__typename)return null;if("TimeCard"===n.__typename&&n.shift){let{startTime:e,endTime:s,breakDuration:a}=n.shift,{id:r,hasWarning:i}=n;return(0,l.jsx)(ed.Z,{startTime:e,endTime:s,breakDuration:a,timeCardId:r,hasWarning:i,row:t})}if("TimeCard"===n.__typename&&!n.shift){let{id:e,hasWarning:s,fromTime:a,toTime:r,totalDuration:i}=n;return a&&r&&(0,l.jsx)(ed.Z,{startTime:a,endTime:r,breakDuration:i,timeCardId:e,hasWarning:s,row:t,fromUnscheduledShift:!0})}}return(0,l.jsx)("button",{type:"button",onClick:e=>e.stopPropagation(),className:"m-0 border-0 bg-transparent p-0",children:(0,l.jsx)(ei.Z,{row:t})})})(),s&&(0,l.jsxs)("div",{className:"flex items-center rounded bg-neutral-100/90 px-2 py-1.5 text-xs text-neutral-700 transition-colors group-hover/row:bg-neutral-200/70 dark:bg-neutral-700/70 dark:text-neutral-200 dark:group-hover/row:bg-neutral-700",children:[(0,l.jsx)(r.JO.PersonTextRect,{className:"mr-1 h-4 w-4 text-neutral-500 dark:text-neutral-400"}),s.name]}),a&&(0,l.jsxs)("div",{className:(0,x.m)("flex items-center rounded px-2 py-1.5 text-xs text-neutral-700 transition-colors dark:text-neutral-100","bg-".concat(a.color,"-200/50 dark:bg-").concat(a.color,"-500/50 group-hover/row:bg-").concat(a.color,"-200/80 dark:group-hover/row:bg-").concat(a.color,"-500/60")),children:[(0,l.jsx)(r.JO.Calendar,{className:"mr-1 h-4 w-4 text-neutral-500 dark:text-neutral-300"}),a.name]})]})},em=e=>{let{fromTime:t,toTime:s}=e,a=(0,o.C)();return t&&!s.hasSame(t,"day")?(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("span",{children:[a(s),(0,l.jsxs)("sup",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[" ","*"]})]}),(0,l.jsx)("span",{className:"-translate-x-2 text-sm text-neutral-500 opacity-0 transition-all duration-100 group-hover/row:translate-x-0 group-hover/row:opacity-100 dark:text-neutral-400",children:s.toLocaleString({weekday:"short",month:"short",day:"numeric"})})]}):(0,l.jsx)("span",{children:a(s)})},ex=e=>{let{breaks:t}=e,{t:s}=(0,n.$G)("common"),a=t.reduce((e,t)=>e+t.duration,0);return 1!==a?(0,l.jsx)("span",{children:s("duration.min_other",{count:a})}):(0,l.jsx)("span",{children:s("duration.min_one",{count:a})})},eu=e=>{let{timesheet:t,isLastTimesheet:s}=e,{t:a}=(0,n.$G)("timesheets"),{id:r,from:i,to:d,state:u,totalDuration:h,unpaidBreaks:f}=t,p=c.ou.fromISO(i),j=c.ou.fromISO(d),b=(0,o.um)(),v=(0,o.C)(),g=s?"border-0":"",N="group-hover/row:bg-neutral-50 dark:group-hover/row:bg-neutral-750",w=(0,l.jsx)(ea,{timesheet:t}),[_,y]=(0,m.useState)("none"),k=e=>y(e),C=()=>y("none");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{role:"button",className:"group/row contents",tabIndex:0,onClick:()=>k("viewDetails"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),k("viewDetails"))},children:[(0,l.jsx)(E.Z,{className:(0,x.m)(g,"left-sticky sticky left-0 z-[1]",N),columnName:a("column_name.date",{ns:"table"}),children:b(p,{includeWeekday:!0})}),(0,l.jsx)(E.Z,{columnName:a("column_name.in",{ns:"table"}),className:"".concat(g," ").concat(N),children:v(p)}),(0,l.jsx)(E.Z,{columnName:a("column_name.out",{ns:"table"}),className:"".concat(g," ").concat(N),children:(0,l.jsx)(em,{fromTime:p,toTime:j})}),(0,l.jsx)(E.Z,{columnName:a("column_name.break",{ns:"table"}),className:"".concat(g," ").concat(N),children:(0,l.jsx)(ex,{breaks:f})}),(0,l.jsx)(E.Z,{className:"".concat(g," ").concat(N),columnName:a("column_name.total_duration",{ns:"table"}),children:(0,l.jsx)(er,{totalDuration:h})}),(0,l.jsx)(E.Z,{className:"".concat(g," ").concat(N),columnName:a("column_name.status",{ns:"table"}),children:(0,l.jsx)(V,{state:u})}),(0,l.jsx)(E.Z,{className:"".concat(g," ").concat(N),columnName:a("column_name.details",{ns:"table"}),children:(0,l.jsx)(ec,{timesheet:t})}),(0,l.jsx)(E.Z,{className:(0,x.m)(g,N,"right-sticky sticky right-0 z-[1]"),columnName:a("column_name.status",{ns:"table"}),children:w})]},r),(0,l.jsx)(q,{timesheetId:t.id,visible:"viewDetails"===_,onClose:C})]})},eh=e=>{let{totalTimesheets:t,timesheets:s,disabledButtonNext:a,disabledButtonPrev:i,pageSize:d,currentPage:o,onJumpNextPage:c,onJumpPrevPage:u}=e,{t:h}=(0,n.$G)("timesheets"),f=(0,m.useRef)(null),p=o*d;return(0,m.useEffect)(()=>{let e=f.current;if(!e)return;let t=()=>{e.scrollLeft>0?e.classList.add("grid-scrolled-left"):e.classList.remove("grid-scrolled-left")};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{id:"grid-timesheets",role:"grid",className:(0,x.m)("box-order relative box-border grid h-[calc(100%-4rem)] w-full min-w-full flex-1 overflow-auto pb-4","divide-y divide-neutral-300 dark:divide-neutral-600","auto-rows-min"),style:{gridTemplateColumns:"minmax(170px, 200px) minmax(90px, 120px) 140px minmax(90px, 120px) minmax(160px, 200px) minmax(180px, 200px) minmax(350px, 1fr) 4rem"},ref:f,children:[(0,l.jsxs)("div",{className:"header contents",children:[(0,l.jsx)(P.s,{header:!0,className:"left-sticky left-0 z-[5]",children:h("column_name.date",{ns:"table"})}),(0,l.jsx)(P.s,{header:!0,children:h("column_name.in",{ns:"table"})}),(0,l.jsx)(P.s,{header:!0,children:h("column_name.out",{ns:"table"})}),(0,l.jsx)(P.s,{header:!0,children:(0,l.jsx)(r.u,{content:h("break_column.description"),children:(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{children:h("column_name.break",{ns:"table"})}),(0,l.jsx)(r.JO.InfoCircle,{className:"h-5 w-5 text-neutral-600 dar
1k:text-neutral-300"})]})})}),(0,l.jsx)(P.s,{header:!0,children:h("column_name.total_duration",{ns:"table"})}),(0,l.jsx)(P.s,{header:!0,children:h("column_name.status",{ns:"table"})}),(0,l.jsx)(P.s,{header:!0,children:h("column_name.details",{ns:"table"})}),(0,l.jsx)(P.s,{header:!0,className:"right-sticky right-0 z-[5]",children:(0,l.jsx)("span",{})})]}),s.map((e,t)=>(0,l.jsx)(eu,{timesheet:e,isLastTimesheet:t===Z.default.length-1},e.id))]}),(0,l.jsx)("div",{className:"bg-default sticky bottom-0 left-0 right-0 z-[5] col-span-full shadow-[0_-3px_3px_-3px_rgba(48,49,61,0.1)]",children:(0,l.jsxs)("div",{className:"flex w-full items-center justify-between py-3",children:[(0,l.jsx)("div",{className:"text-sm",dangerouslySetInnerHTML:{__html:"<span>".concat(h("showing_results",{startIndexOfPage:"".concat((o-1)*d+1),endIndexOfPage:t>p?"".concat(p):"".concat(t),totalResults:"<b>".concat(t,"</b>"),ns:"table"}),"</span>")}}),(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)(r.zx,{icon:(0,l.jsx)(r.JO.ChevronLeft,{}),size:"xs",disabled:i,onClick:u,children:h("pagination.previous",{ns:"table"})}),(0,l.jsxs)(r.zx,{size:"xs",disabled:a,onClick:c,children:[(0,l.jsx)("span",{className:"ml-0.5",children:h("pagination.next",{ns:"table"})}),(0,l.jsx)(r.JO.ChevronRight,{className:"-mr-0.5 ml-1 h-4 w-4"})]})]})]})})]})},ef=e=>{let{timesheetState:t}=e,{t:s}=(0,n.$G)("timesheets"),a={DRAFT:s("empty_list.draft"),SUBMITTED:s("empty_list.submitted"),APPROVED:s("empty_list.approved"),REJECTED:s("empty_list.rejected")};return(0,l.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 text-center",children:[(0,l.jsx)("span",{children:(0,l.jsx)(r.JO.ClockBadgeCheckmark,{className:"size-14 text-neutral-400 dark:text-neutral-500"})}),(0,l.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,l.jsx)("span",{className:"text-base font-semibold text-neutral-700 dark:text-neutral-200",children:t?a[t]:s("empty_list.all")}),(0,l.jsx)("p",{className:"text-sm text-neutral-700 dark:text-neutral-200",children:s("empty_list.description")})]}),!t&&(0,l.jsx)(u,{className:"mt-4"})]})},ep=e=>{let{totalTimesheets:t,timesheets:s,timesheetState:a,pageSize:r,currentPage:n,disabledButtonNext:i,disabledButtonPrev:d,onJumpNextPage:o,onJumpPrevPage:c}=e;return 0===s.length?(0,l.jsx)(ef,{timesheetState:a}):(0,l.jsx)("div",{className:"relative h-full",children:(0,l.jsx)(eh,{pageSize:r,currentPage:n,timesheets:s,totalTimesheets:t,disabledButtonNext:i,disabledButtonPrev:d,onJumpNextPage:o,onJumpPrevPage:c})})},ej=e=>{let{className:t=""}=e;return(0,l.jsx)("div",{className:(0,x.m)("h-11 px-3 py-3",t),children:(0,l.jsx)(r.Od.Title,{className:"m-0 h-full w-full"})})},eb=()=>(0,l.jsxs)("div",{className:"contents",children:[(0,l.jsx)(ej,{className:"pl-0"}),(0,l.jsx)(ej,{}),(0,l.jsx)(ej,{}),(0,l.jsx)(ej,{}),(0,l.jsx)(ej,{}),(0,l.jsx)(ej,{}),(0,l.jsx)(ej,{}),(0,l.jsx)(ej,{})]}),ev=()=>{let{t:e}=(0,n.$G)("timesheets");return(0,l.jsx)("div",{className:"relative h-full",children:(0,l.jsxs)("div",{id:"grid-timesheets",role:"grid",className:(0,x.m)("box-order relative box-border grid h-[calc(100%-4rem)] w-full min-w-full flex-1 overflow-auto pb-4","divide-y divide-neutral-300 dark:divide-neutral-600","auto-rows-min"),style:{gridTemplateColumns:"minmax(170px, 200px) minmax(90px, 120px) 140px minmax(90px, 120px) minmax(160px, 200px) minmax(180px, 200px) minmax(350px, 1fr) 4rem"},children:[(0,l.jsxs)("div",{className:"header contents",children:[(0,l.jsx)(E.Z,{header:!0,className:"left-sticky left-0 z-[5]",children:e("column_name.date",{ns:"table"})}),(0,l.jsx)(E.Z,{header:!0,children:e("column_name.in",{ns:"table"})}),(0,l.jsx)(E.Z,{header:!0,children:e("column_name.out",{ns:"table"})}),(0,l.jsx)(E.Z,{header:!0,children:(0,l.jsx)(r.u,{content:e("break_column.description"),children:(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{children:e("column_name.break",{ns:"table"})}),(0,l.jsx)(r.JO.InfoCircle,{className:"h-5 w-5 text-neutral-600 dar
1k:text-neutral-300"})]})})}),(0,l.jsx)(E.Z,{header:!0,children:e("column_name.total_duration",{ns:"table"})}),(0,l.jsx)(E.Z,{header:!0,children:e("column_name.status",{ns:"table"})}),(0,l.jsx)(E.Z,{header:!0,children:e("column_name.details",{ns:"table"})}),(0,l.jsx)(E.Z,{header:!0,children:(0,l.jsx)("span",{})})]}),Array.from({length:15},(e,t)=>t).map(e=>(0,l.jsx)(eb,{},e))]})})},eg=e=>{let{timesheetFilter:t,timesheetState:s}=e,{t:a}=(0,n.$G)("timesheet"),r=(0,h.Dv)(i.l),[d,o]=(0,m.useState)(1),[x,u]=(0,m.useState)(void 0),[f,p]=(0,m.useState)(void 0);(0,m.useEffect)(()=>{o(1),u(void 0),p(void 0)},[r]);let j=T({filter:t,beforeCursor:x,afterCursor:f,pageSize:31,dateRange:{startDate:(null==r?void 0:r.startDate)||c.ou.now().startOf("month"),endDate:(null==r?void 0:r.endDate)||c.ou.now().endOf("month")}}),{data:b,isPending:v,isError:g,isPlaceholderData:N}=(0,S.JGu)(j),w=(0,I.h4)(null==b?void 0:b.timesheets),_=(null==b?void 0:b.timesheets.totalCount)||0,y=null==b?void 0:b.timesheets.pageInfo,k=(0,O.Z)(()=>{o(e=>e-1),p(null),u(null==y?void 0:y.startCursor)}),C=(0,O.Z)(()=>{o(e=>e+1),u(null),p(null==y?void 0:y.endCursor)});return v?(0,l.jsx)(ev,{}):g?(0,l.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,l.jsx)(D.Z,{title:a("something_went_wrong",{ns:"common"}),description:a("please_try_again_later",{ns:"common"})})}):(0,l.jsx)(ep,{totalTimesheets:_,timesheets:w,disabledButtonNext:N||!(null==y?void 0:y.hasNextPage),disabledButtonPrev:!(null==y?void 0:y.hasPreviousPage),onJumpNextPage:C,onJumpPrevPage:k,pageSize:31,currentPage:d,timesheetState:s},"timesheet-".concat(s))},eN=()=>{let{t:e}=(0,n.$G)(),t=(0,C.useRouter)(),s=(0,o.cq)("tab"),a={all:{filter:{}},submitted:{filter:{timesheetStates:["SUBMITTED"]}},approved:{filter:{timesheetStates:["APPROVED"]}}},i=k()([{id:"submitted",tabTitle:e("status.awaiting_approval",{ns:"common"}),tabPanel:(0,l.jsx)(eg,{timesheetFilter:a.submitted.filter,timesheetState:"SUBMITTED"},"submitted")},{id:"approved",tabTitle:e("status.approved",{ns:"common"}),tabPanel:(0,l.jsx)(eg,{timesheetFilter:a.approved.filter,timesheetState:"APPROVED"},"approvedTimesheets")},{id:"all",tabTitle:e("all",{ns:"common"}),tabPanel:(0,l.jsx)(eg,{timesheetFilter:a.all.filter},"allTimesheets")}]),d=i.findIndex(e=>e.id===s);return(0,l.jsx)("div",{className:"flex flex-1 flex-col overflow-hidden p-1.5",children:(0,l.jsx)(r.mQ,{tabList:i,type:"line",showDivideLine:!0,tabListClassName:"w-auto",tabPanelsClassName:"overflow-hidden flex-1",defaultIndex:-1!==d?d:0,selectedIndex:-1!==d?d:0,onChange:e=>{t.push({pathname:t.pathname,query:{...t.query,tab:i[e].id}},void 0,{shallow:!0})}})})},ew=()=>(0,l.jsxs)("div",{className:"mx-auto flex h-full w-full flex-col gap-5 overflow-hidden px-4 py-2 md:px-8 lg:pt-6",children:[(0,l.jsx)(_,{}),(0,l.jsx)(eN,{})]}),e_=()=>(0,l.jsx)(ew,{});e_.getLayout=e=>(0,l.jsx)(a.Z,{title:"Camelo | My Timesheets",containerClassNames:"overflow-hidden h-full lg:px-0",children:e});var ey=!0,ek=e_},95495:function(e,t,s){"use strict";s.d(t,{O4:function(){return d}});var l=s(15103);let a=Symbol();new WeakMap,new WeakMap;let r=e=>{if("object"!=typeof e||null===e)return;Object.freeze(e);let t=Object.getOwnPropertyNames(e);for(let s of t){let t=e[s];r(t)}return e};new WeakMap;let n=Symbol(),i=function(e){let t,s;let l={getItem:l=>{var a,r;let i=e=>{if(t!==(e=e||"")){try{s=JSON.parse(e)}catch{return n}t=e}return s},d=null!=(r=null==(a=e())?void 0:a.getItem(l))?r:null;return d instanceof Promise?d.then(i):i(d)},setItem:(t,s)=>{var l;return null==(l=e())?void 0:l.setItem(t,JSON.stringify(s))},removeItem:t=>{var s;return null==(s=e())?void 0:s.removeItem(t)}};return"undefined"!=typeof window&&"function"==typeof window.addEventListener&&(l.subscribe=(e,t)=>{let s=s=>{s.key===e&&s.newValue&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",s),()=>{window.removeEventListener("storage",s)}}),l}(()=>"undefined"!=typeof window?window.localStorage:void 0);function d(e,t,s=i){let r=(0,l.cn)(t);r.onMount=l=>{let a;let r=s.getItem(e);return r instanceof Promise?r.then(e=>l(e===n?t:e)):l(r===n?t:r),s.subscribe&&(a=s.subscribe(e,l)),a};let d=(0,l.cn)(e=>e(r),(l,n,i)=>{let d="function"==typeof i?i(l(r)):i;return d===a?(n(r,t),s.removeItem(e)):(n(r,d),s.setItem(e,d))});return d}new WeakMap,new WeakMap}},function(e){e.O(0,[1255,1204,7536,959,3609,944,497,6799,4287,13,1555,817,3473,6837,2495,7338,1548,872,933,9774,2888,179],function(){return e(e.s=77124)}),_N_E=e.O()}]); 2//# sourceMappingURL=my_timesheets-139fd58ac931c2a5.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.