(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,970065,e=>{"use strict";var t=e.i(843476),a=e.i(647163);e.s(["Card",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,a.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...r})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-muted-foreground text-sm",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",e),...r})}])},175379,e=>{"use strict";function t(e){if(e instanceof Date)return e;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,a,r]=e.split("-").map(Number);return new Date(t,a-1,r)}return new Date(e)}e.s(["formatCurrency",0,function(e){if(null==e||""===e)return"0.00";let t="string"==typeof e?parseFloat(e):e;return isNaN(t)?"0.00":t.toLocaleString("en-IN",{minimumFractionDigits:2,maximumFractionDigits:2})},"formatDate",0,function(e){if(!e)return"—";let a=t(e);if(isNaN(a.getTime()))return"—";let r=String(a.getDate()).padStart(2,"0"),s=String(a.getMonth()+1).padStart(2,"0"),n=a.getFullYear();return`${r}/${s}/${n}`},"formatDateTime",0,function(e){if(!e)return"—";let a=t(e);if(isNaN(a.getTime()))return"—";let r=String(a.getDate()).padStart(2,"0"),s=String(a.getMonth()+1).padStart(2,"0"),n=a.getFullYear(),d=String(a.getHours()).padStart(2,"0"),i=String(a.getMinutes()).padStart(2,"0");return`${r}/${s}/${n} ${d}:${i}`}])},588083,e=>{"use strict";var t=e.i(843476),a=e.i(522016),r=e.i(271645),s=e.i(618566),n=e.i(970065),d=e.i(167881),i=e.i(270598),o=e.i(272944),c=e.i(175379),l=e.i(551956);e.s(["default",0,function(){let e=(0,s.useParams)().id,u=(0,r.useMemo)(()=>(0,o.getApiService)(),[]),{error:m}=(0,i.useToast)(),[x,f]=(0,r.useState)(null),[g,p]=(0,r.useState)([]),[h,j]=(0,r.useState)([]),[N,y]=(0,r.useState)(!0);(0,r.useEffect)(()=>{(async()=>{y(!0);let[t,a,r]=await Promise.all([u.getSalaryPayment(e),u.listEmployees({pageSize:200}),u.listAccounts({pageSize:200})]);t.success&&t.data?f(t.data):m("Failed to load salary payment",t.error),a.success&&a.data&&p(a.data.results||[]),r.success&&r.data&&j(r.data.results||[]),y(!1)})()},[u,e,m]);let S=g.reduce((e,t)=>(e[t.id]=t.name,e),{}),v=h.reduce((e,t)=>(e[t.id]=t.name,e),{});return(0,t.jsxs)("div",{className:"flex-1 space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-3xl font-bold text-foreground",children:"Salary Payment Details"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:"View salary payment information"})]}),(0,t.jsx)(a.default,{href:"/accounts/salaries",children:(0,t.jsx)(d.Button,{variant:"outline",children:"Back"})})]}),(0,t.jsxs)(n.Card,{className:"bg-card border-border",children:[(0,t.jsx)(n.CardHeader,{children:(0,t.jsx)(n.CardTitle,{children:"Payment"})}),(0,t.jsx)(n.CardContent,{children:N?(0,t.jsx)("p",{className:"text-muted-foreground",children:"Loading payment..."}):x?(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"Payment Date"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:(0,c.formatDate)(x.paymentDate)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"Amount"}),(0,t.jsxs)("p",{className:"font-medium text-foreground",children:[l.config.locale.currencySymbol,x.amount.toLocaleString()]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"Employee"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:S[x.employeeId]||x.employeeId})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"Account"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:v[x.accountId]||x.accountId})]}),(0,t.jsxs)("div",{className:"md:col-span-2",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:"Notes"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:x.notes||"-"})]})]}):(0,t.jsx)("p",{className:"text-muted-foreground",children:"Salary payment not found."})})]})]})}])}]);