"use strict";exports.id=84976,exports.ids=[84976],exports.modules={4483:(a,b,c)=>{c.d(b,{l:()=>i});var d=c(48249),e=c(82697);let f={PAID:"text-emerald-700",PARTIAL:"text-amber-700",UNPAID:"text-rose-700"},g={CASH:"Cash",BANK:"Bank transfer",ESEWA:"eSewa",CARD:"Card",OTHER:"Other"};function h(a){return Number(a||0).toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})}function i({data:a,studentLabel:b}){let c=b||[a.student.fullName,a.student.studentCode,a.schoolClass.displayName,a.academicYear.name].filter(Boolean).join(" \xb7 ");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(e.jQ,{items:[{label:"Assigned",value:h(a.totals.totalAssigned)},{label:"Paid",value:h(a.totals.totalPaid)},{label:"Due",value:h(a.totals.totalDue)}]}),(0,d.jsxs)("div",{className:"overflow-hidden rounded-lg border border-slate-100 bg-white shadow-sm",children:[(0,d.jsx)("div",{className:"border-b border-slate-100 bg-slate-50/80 px-4 py-3 text-sm text-slate-600 sm:px-5",children:c}),a.lines.length?(0,d.jsx)("ul",{className:"divide-y divide-slate-100",children:a.lines.map(a=>(0,d.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3 text-sm sm:px-5",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-slate-900",children:a.feesMaster.feesType?.name||"Fee"}),(0,d.jsxs)("p",{className:"text-xs text-slate-500",children:["Assigned ",h(a.assignedAmount)," \xb7 Paid ",h(a.paidAmount)]})]}),(0,d.jsxs)("div",{className:"text-right",children:[(0,d.jsx)("p",{className:"font-semibold tabular-nums text-slate-900",children:h(a.dueAmount)}),(0,d.jsx)("p",{className:`text-xs font-medium ${f[a.status]||"text-slate-500"}`,children:a.status})]})]},a.feesMaster.id))}):(0,d.jsx)("div",{className:"p-6",children:(0,d.jsx)(e.i0,{title:"No fee lines",description:"Fee types for this class have not been set up yet."})})]}),a.payments?.length?(0,d.jsxs)("section",{className:"overflow-hidden rounded-lg border border-slate-100 bg-white shadow-sm",children:[(0,d.jsxs)("div",{className:"border-b border-slate-100 px-4 py-3 sm:px-5",children:[(0,d.jsx)("h2",{className:"text-sm font-semibold text-slate-900",children:"Payment history"}),(0,d.jsx)("p",{className:"mt-0.5 text-xs text-slate-500",children:"Receipts recorded by the school office"})]}),(0,d.jsx)("ul",{className:"divide-y divide-slate-100",children:a.payments.map(a=>(0,d.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3 text-sm sm:px-5",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-slate-900",children:a.receiptNo||"Receipt"}),(0,d.jsxs)("p",{className:"text-xs text-slate-500",children:[a.paymentDate||"—",a.notes?` \xb7 ${a.notes}`:""]})]}),(0,d.jsxs)("div",{className:"text-right",children:[(0,d.jsx)("p",{className:"font-semibold tabular-nums text-slate-900",children:h(a.totalAmount)}),(0,d.jsx)("p",{className:"text-xs text-slate-500",children:g[a.method]||a.method})]})]},a.id))})]}):null]})}},84976:(a,b,c)=>{c.r(b),c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(19099),g=c(59478),h=c(82697),i=c(4483);function j(){let a=(0,f.useParams)();"string"==typeof a?.studentUserId&&a.studentUserId;let[b,c]=(0,e.useState)(null),[j,k]=(0,e.useState)(!0);return(0,d.jsx)(g.R,{title:"Fees",description:"Assigned fees, payment history, and remaining dues for your child.",children:j?(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-slate-100"}):b?(0,d.jsx)(i.l,{data:b}):(0,d.jsx)(h.i0,{title:"No fee records",description:"The school has not assigned fees to your child's class yet."})})}c(93529),c(91115)},93529:(a,b,c)=>{c.d(b,{BT:()=>h,CP:()=>o,OI:()=>k,W6:()=>f,WR:()=>l,hi:()=>j,kN:()=>g,mk:()=>i,n9:()=>n,xw:()=>m});var d=c(23971);function e(a){if(!a.data.success||void 0===a.data.data)throw Error(a.data.message||"Request failed");return a.data.data}async function f(){return e(await d.uE.get("/school/parent/home"))}async function g(a){return e(await d.uE.get(`/school/parent/children/${a}/overview`))}async function h(a){return e(await d.uE.get(`/school/parent/children/${a}/details`))}async function i(a){return e(await d.uE.get(`/school/parent/children/${a}/notices`))}async function j(a){return e(await d.uE.get(`/school/parent/children/${a}/homework`))}async function k(a,b){return e(await d.uE.get(`/school/parent/children/${a}/attendance`,{params:b}))}async function l(a){return e(await d.uE.get(`/school/parent/children/${a}/fees`))}async function m(a){return e(await d.uE.get(`/school/parent/children/${a}/exams`))}async function n(a,b){return e(await d.uE.get(`/school/parent/children/${a}/exam-result`,{params:{examId:b}}))}async function o(){return e(await d.uE.get("/school/parent/holidays"))}}};