1import{j as a,v as A,C as s,n as r,f as c,g as D,d as t,w as L,A as B,D as N,x as F,r as u,u as f,a as y,y as R,B as p,R as j,af as v,l as k,o as d}from"./index-CUCg6Zxa.js";import{I as z}from"./input-DVOpVeNL.js";import{S as H,a as P,b as U,c as V,d as o}from"./select-Dg4yzCDt.js";import{E as _,a as M,b as O,c as q,d as Q,e as X}from"./empty-Dziq98Qn.js";import{C as $}from"./create-income-dialog-YBKYLdAg.js";import{A as G}from"./arrow-left-DvhwFyyL.js";import{F as J}from"./funnel-Cgkv_NkL.js";import"./index-DeTWvO78.js";import"./useForm-zm0H2HuK.js";import"./label-Bkx2rHip.js";import"./textarea-BuzAFgHC.js";import"./case-search-select-BqoacxRL.js";import"./chevrons-up-down--bE9O23b.js";import"./dollar-sign-DQiTTAf2.js";function K(){const[b,m]=u.useState(!1),[g,C]=u.useState("all"),[x,S]=u.useState(""),w=f(y.financialRegistry.listIncomeEntries,g==="all"?{}:{status:g}),n=f(y.financialRegistry.getFinancialStats,{}),h=w?.filter(e=>{const i=x.toLowerCase();return e.description.toLowerCase().includes(i)||e.entryNumber.toLowerCase().includes(i)||e.clientName?.toLowerCase().includes(i)||e.caseNumber?.toLowerCase().includes(i)}),E=e=>{switch(e){case"encaisse":return a.jsx(d,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:48:15","data-hercules-name":"Badge",variant:"default",children:"Encaissé"});case"en_attente":return a.jsx(d,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:50:15","data-hercules-name":"Badge",variant:"secondary",children:"En attente"});case"annule":return a.jsx(d,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:52:15","data-hercules-name":"Badge",variant:"destructive",children:"Annulé"})}},I=e=>({honoraires:"Honoraires",consultation:"Consultation",retrocession:"Rétrocession",remboursement:"Remboursement",autre:"Autre"})[e]||e,l=e=>new Intl.NumberFormat("fr-FR",{style:"currency",currency:"XOF",minimumFractionDigits:0}).format(e),T=e=>new Date(e).toLocaleDateString("fr-FR",{day:"2-digit",month:"short",year:"numeric"});return a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:84:4","data-hercules-name":"div",className:"min-h-screen bg-gradient-to-br from-emerald-50 to-teal-50",children:[a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:86:6","data-hercules-name":"div",className:"border-b border-emerald-200 bg-white/80 backdrop-blur-sm",children:a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:87:8","data-hercules-name":"div",className:"container mx-auto px-4 py-6",children:[a.jsx(R,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:88:10","data-hercules-name":"Link",to:"/administration/allocation",children:a.jsxs(p,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:89:12","data-hercules-name":"Button",variant:"ghost",size:"sm",className:"mb-4",children:[a.jsx(G,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:90:14","data-hercules-name":"ArrowLeft",className:"mr-2 size-4"}),"Retour à D2Allocation"]})}),a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:94:10","data-hercules-name":"div",className:"flex items-center justify-between",children:[a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:95:12","data-hercules-name":"div",children:[a.jsxs("h1",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:96:14","data-hercules-name":"h1",className:"flex items-center gap-2 text-3xl font-bold text-emerald-900",children:[a.jsx(j,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:97:16","data-hercules-name":"TrendingUp",className:"size-8 text-emerald-600"}),"Registre des recettes"]}),a.jsx("p",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:100:14","data-hercules-name":"p",className:"mt-2 text-emerald-700",children:"Suivi des encaissements et honoraires"})]}),a.jsxs(p,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:104:12","data-hercules-name":"Button",onClick:()=>m(!0),className:"bg-emerald-600 hover:bg-emerald-700",children:[a.jsx(v,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:105:14","data-hercules-name":"Plus",className:"mr-2 size-4"}),"Nouvelle recette"]})]})]})}),n&&a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:114:8","data-hercules-name":"div",className:"container mx-auto px-4 py-6",children:a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:115:10","data-hercules-name":"div",className:"grid gap-4 md:grid-cols-3",children:[a.jsxs(s,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:116:12","data-hercules-name":"Card",className:"border-emerald-200 bg-white/80",children:[a.jsx(r,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:117:14","data-hercules-name":"CardHeader",className:"pb-3",children:a.jsx(c,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:118:16","data-hercules-name":"CardTitle",className:"text-sm font-medium text-emerald-700",children:"Total encaissé"})}),a.jsx(t,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:122:14","data-hercules-name":"CardContent",children:a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:123:16","data-hercules-name":"div",className:"text-2xl font-bold text-emerald-900",children:l(n.totalIncome)})})]}),a.jsxs(s,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:129:12","data-hercules-name":"Card",className:"border-amber-200 bg-white/80",children:[a.jsx(r,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:130:14","data-hercules-name":"CardHeader",className:"pb-3",children:a.jsx(c,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:131:16","data-hercules-name":"CardTitle",className:"text-sm font-medium text-amber-700",children:"En attente"})}),a.jsx(t,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:135:14","data-hercules-name":"CardContent",children:a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:136:16","data-hercules-name":"div",className:"text-2xl font-bold text-amber-900",children:l(n.pendingIncome)})})]}),a.jsxs(s,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:142:12","data-hercules-name":"Card",className:"border-blue-200 bg-white/80",children:[a.jsx(r,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:143:14","data-hercules-name":"CardHeader",className:"pb-3",children:a.jsx(c,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:144:16","data-hercules-name":"CardTitle",className:"text-sm font-medium text-blue-700",children:"Solde net"})}),a.jsx(t,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:148:14","data-hercules-name":"CardContent",children:a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:149:16","data-hercules-name":"div",className:`text-2xl font-bold ${n.balance>=0?"text-emerald-900":"text-red-900"}`,children:l(n.balance)})})]})]})}),a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:159:6","data-hercules-name":"div",className:"container mx-auto px-4 py-4",children:a.jsxs(s,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:160:8","data-hercules-name":"Card",className:"border-emerald-200 bg-white/80",children:[a.jsx(r,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:161:10","data-hercules-name":"CardHeader",children:a.jsxs(c,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:162:12","data-hercules-name":"CardTitle",className:"flex items-center gap-2 text-emerald-900",children:[a.jsx(J,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:163:14","data-hercules-name":"Filter",className:"size-5"}),"Filtres"]})}),a.jsx(t,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:167:10","data-hercules-name":"CardContent",className:"space-y-4",children:a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:168:12","data-hercules-name":"div",className:"grid gap-4 md:grid-cols-2",children:[a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:169:14","data-hercules-name":"div",className:"space-y-2",children:[a.jsxs("label",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:170:16","data-hercules-name":"label",className:"text-sm font-medium text-emerald-900",children:[a.jsx(k,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:171:18","data-hercules-name":"Search",className:"mr-2 inline size-4"}),"Rechercher"]}),a.jsx(z,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:174:16","data-hercules-name":"Input",placeholder:"N° entrée, description, client...",value:x,onChange:e=>S(e.target.value)})]}),a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:181:14","data-hercules-name":"div",className:"space-y-2",children:[a.jsx("label",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:182:16","data-hercules-name":"label",className:"text-sm font-medium text-emerald-900",children:"Statut"}),a.jsxs(H,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:183:16","data-hercules-name":"Select",value:g,onValueChange:e=>C(e),children:[a.jsx(P,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:189:18","data-hercules-name":"SelectTrigger",children:a.jsx(U,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:190:20","data-hercules-name":"SelectValue"})}),a.jsxs(V,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:192:18","data-hercules-name":"SelectContent",children:[a.jsx(o,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:193:20","data-hercules-name":"SelectItem",value:"all",children:"Tous les statuts"}),a.jsx(o,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:194:20","data-hercules-name":"SelectItem",value:"encaisse",children:"Encaissé"}),a.jsx(o,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:195:20","data-hercules-name":"SelectItem",value:"en_attente",children:"En attente"}),a.jsx(o,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:196:20","data-hercules-name":"SelectItem",value:"annule",children:"Annulé"})]})]})]})]})})]})}),a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:206:6","data-hercules-name":"div",className:"container mx-auto px-4 pb-8",children:h?h.length===0?a.jsxs(_,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:214:10","data-hercules-name":"Empty",children:[a.jsxs(M,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:215:12","data-hercules-name":"EmptyHeader",children:[a.jsx(O,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:216:14","data-hercules-name":"EmptyMedia",variant:"icon",children:a.jsx(j,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:217:16","data-hercules-name":"TrendingUp"})}),a.jsx(q,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:219:14","data-hercules-name":"EmptyTitle",children:"Aucune recette"}),a.jsx(Q,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:220:14","data-hercules-name":"EmptyDescription",children:"Commencez par enregistrer votre première recette"})]}),a.jsx(X,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:224:12","data-hercules-name":"EmptyContent",children:a.jsxs(p,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:225:14","data-hercules-name":"Button",size:"sm",onClick:()=>m(!0),children:[a.jsx(v,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:226:16","data-hercules-name":"Plus",className:"mr-2 size-4"}),"Nouvelle recette"]})})]}):a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:232:10","data-hercules-name":"div",className:"space-y-3",children:h.map(e=>a.jsx(s,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:234:14","data-hercules-name":"Card",className:"border-emerald-200 bg-white/80 transition-all hover:shadow-md",children:a.jsx(t,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:238:16","data-hercules-name":"CardContent",className:"p-4",children:a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:239:18","data-hercules-name":"div",className:"flex items-start justify-between",children:[a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:240:20","data-hercules-name":"div",className:"flex-1 space-y-2",children:[a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:241:22","data-hercules-name":"div",className:"flex items-center gap-3",children:[a.jsx("span",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:242:24","data-hercules-name":"span",className:"font-mono text-sm font-medium text-emerald-900",children:e.entryNumber}),E(e.status),a.jsx(d,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:246:24","data-hercules-name":"Badge",variant:"outline",className:"text-emerald-700",children:I(e.incomeType)})]}),a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:251:22","data-hercules-name":"div",children:[a.jsx("p",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:252:24","data-hercules-name":"p",className:"font-medium text-emerald-900",children:e.description}),a.jsxs("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:253:24","data-hercules-name":"div",className:"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-sm text-emerald-700",children:[a.jsxs("span",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:254:26","data-hercules-name":"span",children:["ð
",T(e.date)]}),e.clientName&&a.jsxs("span",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:255:47","data-hercules-name":"span",children:["ð¤ ",e.clientName]}),e.caseNumber&&a.jsxs("span",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:256:47","data-hercules-name":"span",children:["ð ",e.caseNumber]}),e.bankReference&&a.jsxs("span",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:257:50","data-hercules-name":"span",children:["ð¦ ",e.bankReference]})]})]}),e.no
1tes&&a.jsx("p",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:262:24","data-hercules-name":"p",className:"text-sm italic text-emerald-600",children:e.notes})]}),a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:266:20","data-hercules-name":"div",className:"ml-4 text-right",children:a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:267:22","data-hercules-name":"div",className:"text-xl font-bold text-emerald-900",children:l(e.amount)})})]})})},e._id))}):a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:208:10","data-hercules-name":"div",className:"space-y-4",children:Array.from({length:5}).map((e,i)=>a.jsx(N,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:210:14","data-hercules-name":"Skeleton",className:"h-24 w-full"},i))})}),a.jsx($,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:280:6","data-hercules-name":"CreateIncomeDialog",open:b,onOpenChange:m})]})}function ma(){return a.jsxs(a.Fragment,{children:[a.jsx(A,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:288:6","data-hercules-name":"Unauthenticated",children:a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:289:8","data-hercules-name":"div",className:"flex min-h-screen items-center justify-center bg-gradient-to-br from-emerald-50 to-teal-50",children:a.jsxs(s,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:290:10","data-hercules-name":"Card",className:"w-full max-w-md",children:[a.jsxs(r,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:291:12","data-hercules-name":"CardHeader",children:[a.jsx(c,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:292:14","data-hercules-name":"CardTitle",children:"Connexion requise"}),a.jsx(D,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:293:14","data-hercules-name":"CardDescription",children:"Veuillez vous connecter pour accéder au registre des recettes"})]}),a.jsx(t,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:297:12","data-hercules-name":"CardContent",children:a.jsx(L,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:298:14","data-hercules-name":"SignInButton"})})]})})}),a.jsx(B,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:304:6","data-hercules-name":"AuthLoading",children:a.jsx("div",{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:305:8","data-hercules-name":"div",className:"flex min-h-screen items-center justify-center bg-gradient-to-br from-emerald-50 to-teal-50",children:a.jsx(N,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:306:10","data-hercules-name":"Skeleton",className:"h-96 w-full max-w-4xl"})})}),a.jsx(F,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:310:6","data-hercules-name":"Authenticated",children:a.jsx(K,{"data-hercules-id":"src/pages/administration/allocation/financial-registry/income-page.tsx:311:8","data-hercules-name":"IncomePageInner"})})]})}export{ma as default};
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.