module.exports=[703130,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Card",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card",className:(0,c.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a),...d})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-6",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-muted-foreground text-sm",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.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",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("leading-none font-semibold",a),...d})}])},890075,a=>{"use strict";function b(a){if(a instanceof Date)return a;if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let[b,c,d]=a.split("-").map(Number);return new Date(b,c-1,d)}return new Date(a)}a.s(["formatCurrency",0,function(a){if(null==a||""===a)return"0.00";let b="string"==typeof a?parseFloat(a):a;return isNaN(b)?"0.00":b.toLocaleString("en-IN",{minimumFractionDigits:2,maximumFractionDigits:2})},"formatDate",0,function(a){if(!a)return"—";let c=b(a);if(isNaN(c.getTime()))return"—";let d=String(c.getDate()).padStart(2,"0"),e=String(c.getMonth()+1).padStart(2,"0"),f=c.getFullYear();return`${d}/${e}/${f}`},"formatDateTime",0,function(a){if(!a)return"—";let c=b(a);if(isNaN(c.getTime()))return"—";let d=String(c.getDate()).padStart(2,"0"),e=String(c.getMonth()+1).padStart(2,"0"),f=c.getFullYear(),g=String(c.getHours()).padStart(2,"0"),h=String(c.getMinutes()).padStart(2,"0");return`${d}/${e}/${f} ${g}:${h}`}])},773629,a=>{"use strict";var b=a.i(187924),c=a.i(238246),d=a.i(572131),e=a.i(50944),f=a.i(703130),g=a.i(340695),h=a.i(133951),i=a.i(725944),j=a.i(890075),k=a.i(700006);a.s(["default",0,function(){let a=(0,e.useParams)().id,l=(0,d.useMemo)(()=>(0,i.getApiService)(),[]),{error:m}=(0,h.useToast)(),[n,o]=(0,d.useState)(null),[p,q]=(0,d.useState)([]),[r,s]=(0,d.useState)([]),[t,u]=(0,d.useState)(!0);(0,d.useEffect)(()=>{(async()=>{u(!0);let[b,c,d]=await Promise.all([l.getSalaryPayment(a),l.listEmployees({pageSize:200}),l.listAccounts({pageSize:200})]);b.success&&b.data?o(b.data):m("Failed to load salary payment",b.error),c.success&&c.data&&q(c.data.results||[]),d.success&&d.data&&s(d.data.results||[]),u(!1)})()},[l,a,m]);let v=p.reduce((a,b)=>(a[b.id]=b.name,a),{}),w=r.reduce((a,b)=>(a[b.id]=b.name,a),{});return(0,b.jsxs)("div",{className:"flex-1 space-y-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-3xl font-bold text-foreground",children:"Salary Payment Details"}),(0,b.jsx)("p",{className:"text-muted-foreground mt-2",children:"View salary payment information"})]}),(0,b.jsx)(c.default,{href:"/accounts/salaries",children:(0,b.jsx)(g.Button,{variant:"outline",children:"Back"})})]}),(0,b.jsxs)(f.Card,{className:"bg-card border-border",children:[(0,b.jsx)(f.CardHeader,{children:(0,b.jsx)(f.CardTitle,{children:"Payment"})}),(0,b.jsx)(f.CardContent,{children:t?(0,b.jsx)("p",{className:"text-muted-foreground",children:"Loading payment..."}):n?(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Payment Date"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:(0,j.formatDate)(n.paymentDate)})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Amount"}),(0,b.jsxs)("p",{className:"font-medium text-foreground",children:[k.config.locale.currencySymbol,n.amount.toLocaleString()]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Employee"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:v[n.employeeId]||n.employeeId})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Account"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:w[n.accountId]||n.accountId})]}),(0,b.jsxs)("div",{className:"md:col-span-2",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"Notes"}),(0,b.jsx)("p",{className:"font-medium text-foreground",children:n.notes||"-"})]})]}):(0,b.jsx)("p",{className:"text-muted-foreground",children:"Salary payment not found."})})]})]})}])}];

//# sourceMappingURL=_0iwrl_q._.js.map