PageSourceSearch

https://anam.ma/assets/MyCommissionHistory-Dl2LcFBi.js

js anam.ma collected 2026-10-02 06:27:58 UTC 23,428 bytes, 1 lines download raw bytes

1import{r as g,b8 as ae,c1 as he,u as fe,j as e,bP as V,C as H,b as q,bn as je,bg as ge,X as z,h as C,a as be,g as Ne,F as ve,B as E,b7 as ye,bs as X,bO as J,b9 as Ce,bb as we,bc as D,c2 as U,bd as Te,bT as ke,bu as De}from"./index-2upL18V-.js";import{T as Me}from"./textarea-DPVnFy6K.js";import{T as Ee,a as _e,b as Y,c as v,d as Se,e as y}from"./table-Ce40x48p.js";import{D as ie,b as re,d as le,c as Ie,f as Re}from"./dialog-h4OZW20M.js";import{S as G,a as Z,b as ee,c as se,d as u}from"./select-CliYJYrF.js";import{I as Ae}from"./InlinePdfViewer-DrR-Ijfo.js";import{F as Pe}from"./filter-C-G8BDpN.js";import{P as B}from"./pencil-C0ZzcmwP.js";import{A as te}from"./arrow-right-D9EJ0SNC.js";import{C as Oe}from"./circle-x-Dg7bm871.js";import{C as F}from"./circle-check-B0r-IYVj.js";import{U as ne}from"./user-BiLMrUGH.js";import{B as ce}from"./building-2-BKoqCFLO.js";import{P as oe}from"./pill-C8CiMijy.js";import{C as $e}from"./clock-BrCgYvQE.js";import{f as M}from"./format-J665ceH1.js";import{D as Le}from"./download-COPj6Lk2.js";import{S as Fe}from"./save-DuCCJnLy.js";import{C as He}from"./calendar-days-I8Ww6DxD.js";import"./index-UqYw647F.js";import"./chevron-down-C2yPeus7.js";import"./loader-circle-8lBfJYzw.js";import"./maximize-2-CpN-hEjr.js";import"./chevron-left-BYO7G1rf.js";import"./chevron-right-B94tAz5p.js";const de={CT:"Commission de la Transparence",MedecinExpert:"Médecin Expert",RCP:"RCP"},qe={CT:"CT",MedecinExpert:"Expert",RCP:"RCP"},W={CT:"bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300",MedecinExpert:"bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300",RCP:"bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300"},$={avis_favorable:"Favorable",avis_defavorable:"Défavorable",soumis_medecin_expert:"Renvoyé Expert",soumis_rcp:"Renvoyé RCP",complement_demande:"Complément demandé"},L={avis_favorable:"bg-emerald-100 text-emerald-800 border-emerald-200 dark:bg-emerald-900/30 dark:text-emerald-300",avis_defavorable:"bg-red-100 text-red-800 border-red-200 dark:bg-red-900/30 dark:text-red-300",soumis_medecin_expert:"bg-orange-100 text-orange-800 border-orange-200 dark:bg-orange-900/30 dark:text-orange-300",soumis_rcp:"bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900/30 dark:text-yellow-300",complement_demande:"bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300"},K={avis_favorable:F,avis_defavorable:Oe,soumis_medecin_expert:te,soumis_rcp:te,complement_demande:J},me={medicament_remboursable:"Médicament remboursable",medicament_non_remboursable:"Médicament non remboursable",acte_medical:"Acte médical",dispositif_medical:"Dispositif médical",autre:"Autre"},ze={CT:"ct",MedecinExpert:"expert",RCP:"rcp"};function Ue({decision:s,open:b,onClose:l,onSaved:N}){var R,_,S,A,n,P;const[a,w]=g.useState(s.comments||""),{toast:p}=ae(),m=((R=s.claim)==null?void 0:R.id)??s.claimId,h=K[s.decision]||F,T=Ce({mutationFn:I=>we("PATCH",`/api/commission-decisions/${ze[s.commissionType]}/${s.id}/comments`,{comments:I}),onSuccess:()=>{p({title:"Justification médicale enregistrée"}),N(),l()},onError:()=>{p({title:"Erreur",description:"Impossible d'enregistrer la justification",variant:"destructive"})}});return e.jsx(ie,{open:b,onOpenChange:l,children:e.jsxs(re,{className:"max-w-[96vw] w-[96vw] h-[96vh] max-h-[96vh] p-0 flex flex-col gap-0 overflow-hidden","aria-describedby":void 0,children:[e.jsxs(le,{className:"sr-only",children:["Justification médicale — ",((_=s.claim)==null?void 0:_.claimNumber)||m]}),e.jsxs("div",{className:"flex items-center justify-between gap-4 px-5 py-3 border-b shrink-0 bg-muted/40",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsx(V,{className:"h-5 w-5 text-primary shrink-0"}),e.jsx("span",{className:"font-semibold text-base",children:"Justification médicale"}),e.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:((S=s.claim)==null?void 0:S.claimNumber)||m.slice(0,8).toUpperCase()}),e.jsx(E,{variant:"outline",className:`text-xs ${W[s.commissionType]}`,children:de[s.commissionType]}),e.jsxs(E,{variant:"outline",className:`text-xs gap-1 ${L[s.decision]||""}`,children:[e.jsx(h,{className:"h-3 w-3 shrink-0"}),$[s.decision]||s.decision]})]}),e.jsx("button",{onClick:l,className:"rounded-md p-1 hover-elevate text-muted-foreground","data-testid":"button-close-edit-pdf","aria-label":"Fermer",children:e.jsx(z,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"w-[60%] border-r overflow-hidden flex flex-col",children:[e.jsx("div",{className:"px-4 py-2 text-xs font-semibold text-muted-foreground uppercase tracking-wide border-b bg-muted/20 shrink-0",children:"Dossier médical — Pièces jointes"}),e.jsx("div",{className:"flex-1 overflow-hidden p-3",children:e.jsx(Ae,{claimId:m,className:"h-full"})})]}),e.jsxs("div",{className:"w-[40%] flex flex-col overflow-hidden",children:[e.jsx("div",{className:"px-4 py-2 text-xs font-semibold text-muted-foreground uppercase tracking-wide border-b bg-muted/20 shrink-0",children:"Justification / Commentaire médical"}),e.jsxs("div",{className:"flex-1 flex flex-col gap-4 overflow-y-auto p-5",children:[e.jsxs("div",{className:`rounded-md border p-3 text-sm ${L[s.decision]||"bg-muted"}`,children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide opacity-70 mb-1",children:"Décision enregistrée"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"font-semibold",children:$[s.decision]||s.decision})]}),e.jsx("p",{className:"text-xs opacity-70 mt-1",children:M(new Date(s.createdAt),"dd MMMM yyyy 'à' HH:mm",{locale:D})})]}),e.jsxs("div",{className:"space-y-1.5 text-sm",children:[((A=s.claim)==null?void 0:A.insuredName)&&s.claim.insuredName!=="[CONFIDENTIEL]"&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"Assuré :"}),e.jsx("span",{className:"font-medium text-xs",children:s.claim.insuredName})]}),((n=s.claim)==null?void 0:n.medicationName)&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(oe,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"Médicament :"}),e.jsx("span",{className:"font-medium text-xs",children:s.claim.medicationName})]}),((P=s.claim)==null?void 0:P.organism)&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"Organisme :"}),e.jsx("span",{className:"font-medium text-xs",children:s.claim.organism})]})]}),e.jsx(U,{}),e.jsxs("div",{className:"space-y-2 flex-1 flex flex-col",children:[e.jsxs(Te,{htmlFor:"justification-input",className:"text-sm font-semibold flex items-center gap-1.5",children:[e.jsx(J,{className:"h-4 w-4 text-muted-foreground"}),"Justification médicale"]}),e.jsx(Me,{id:"justification-input",value:a,onChange:I=>w(I.target.value),placeholder:"Rédigez ici la justification médicale, l'argumentaire clinique, les éléments du dossier qui ont orienté la décision…",className:"flex-1 min-h-[280px] resize-none text-sm leading-relaxed",autoFocus:!0,"data-testid":"textarea-justification-medicale"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Cette justification sera liée à la décision et pourra être exportée dans le rapport Word."})]})]}),e.jsxs("div",{className:"px-5 py-4 border-t bg-muted/20 shrink-0 flex items-center justify-between gap-3",children:[e.jsx(C,{variant:"outline",onClick:l,"data-testid":"button-cancel-edit-comment",children:"Annuler"}),e.jsxs(C,{onClick:()=>T.mutate(a),disabled:T.isPending,className:"gap-2","data-testid":"button-save-edit-comment",children:[e.jsx(Fe,{className:"h-4 w-4"}),T.isPending?"Enregistrement…":"Enregistrer la justification"]})]})]})]})]})})}function Be({decision:s,open:b,onClose:l,onEditComment:N}){var p;const a=s.claim,w=K[s.decision]||F;return e.jsx(ie,{open:b,onOpenChange:l,children:e.jsxs(re,{className:"max-w-2xl max-h-[90vh] overflow-y-auto","aria-describedby":void 0,children:[e.jsxs(Ie,{children:[e.jsxs(le,{className:"flex items-center gap-2 text-lg",children:[e.jsx(V,{className:"h-5 w-5 text-primary"}),"Dossier médical — Audit de décision"]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap text-sm text-muted-foreground mt-1",children:[e.jsx("span",{className:"font-mono font-semibold text-foreground",children:(a==null?void 0:a.claimNumber)||s.claimId.slice(0,8).toUpperCase()}),e.jsx(E,{variant:"outline",className:W[s.commissionType],children:de[s.commissionType]})]})]}),e.jsxs("div",{className:"space-y-5 py-1",children:[e.jsxs("div",{className:`rounded-lg border p-4 ${L[s.decision]||"bg-muted"}`,children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide mb-2 opacity-70",children:"Décision rendue"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{className:"h-5 w-5 shrink-0"}),e.jsx("span",{className:"text-lg font-bold",children:$[s.decision]||s.decision})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs opacity-75",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(He,{className:"h-3.5 w-3.5"}),M(new Date(s.createdAt),"dd MMMM yyyy 'à' HH:mm",{locale:D})]}),s.updatedAt&&s.updatedAt!==s.createdAt&&e.jsxs("span",{children:["· Modifié le ",M(new Date(s.updatedAt),"dd/MM/yyyy HH:mm",{locale:D})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm font-semibold flex items-center gap-1.5",children:[e.jsx(J,{className:"h-4 w-4 text-muted-foreground"}),"Commentaire / Justification médicale"]}),e.jsxs(C,{variant:"outline",size:"sm",onClick:N,className:"gap-1.5","data-testid":"button-edit-comment-from-audit",children:[e.jsx(B,{className:"h-3.5 w-3.5"}),"Modifier"]})]}),s.comments?e.jsx("div",{className:"bg-muted/60 rounded-md p-3 text-sm leading-relaxed whitespace-pre-wrap",children:s.comments}):e.jsx("div",{className:"bg-muted/40 rounded-md p-3 text-sm text-muted-foreground italic",children:"Aucun commentaire saisi pour cette décision."})]}),e.jsx(U,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-sm font-semibold flex items-center gap-1.5",children:[e.jsx(ke,{className:"h-4 w-4 text-muted-foreground"}),"Informations du dossier"]}),e.jsx("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[{label:"N° Dossier",value:a==null?void 0:a.claimNumber},{label:"Statut dossier",value:(p=a==null?void 0:a.status)==null?void 0:p.replace(/_/g," ")},{label:"Assuré",value:(a==null?void 0:a.insuredName)==="[CONFIDENTIEL]"?"[CONFIDENTIEL]":a==null?void 0:a.insuredName},{label:"Organisme",value:a==null?void 0:a.organism},{label:"Médicament / Acte",value:a==null?void 0:a.medicationName},{label:"Type de demande",value:a!=null&&a.typeDemande?me[a.typeDemande]??a.typeDemande:void 0},{label:"Date d'enregistrement",value:a!=null&&a.dateImported?M(new Date(a.dateImported),"dd/MM/yyyy",{locale:D}):void 0},{label:"Date de chargement commission",value:a!=null&&a.dateAssignedToDoctor?M(new Date(a.dateAssignedToDoctor),"dd/MM/yyyy",{locale:D}):void 0}].map(({label:m,value:h})=>e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e.jsx("p",{className:"text-sm font-medium",children:h||"—"})]},m))})]}),s.dcnConclusion&&e.jsxs(e.Fragment,{children:[e.jsx(U,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-sm font-semibold flex items-center gap-1.5",children:[e.jsx(De,{className:"h-4 w-4 text-muted-foreground"}),"Conclusion DCN"]}),e.jsx("div",{className:"bg-muted/60 rounded-md p-3 text-sm leading-relaxed whitespace-pre-wrap",children:s.dcnConclusion})]})]})]}),e.jsx(Re,{className:"gap-2",children:e.jsx(C,{variant:"outline",onClick:l,children:"Fermer"})})]})})}function k({label:s,value:b,sub:l,color:N}){return e.jsx(H,{children:e.jsxs(q,{className:"pt-4 pb-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e.jsx("p",{className:`text-2xl font-bold mt-0.5 ${N||""}`,children:b}),l&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:l})]})})}function fs(){const[s,b]=g.useState("all"),[l,N]=g.useState("all"),[a,w]=g.useState(""),[p,m]=g.useState(null),[h,T]=g.useState(null),[R,_]=g.useState(null),{toast:S}=ae(),A=he(),{data:n=[],isLoading:P,isError:I}=fe({queryKey:["/api/my-commission-history"]}),c=g.useMemo(()=>{const t=n.length,r=n.filter(i=>i.decision==="avis_favorable").length,x=n.filter(i=>i.decision==="avis_defavorable").length,f=n.filter(i=>i.decision==="complement_demande").length,o=n.filter(i=>i.commissionType==="CT").length,j=n.filter(i=>i.commissionType==="MedecinExpert").length,d=n.filter(i=>i.commissionType==="RCP").length;return{total:t,favorable:r,defavorable:x,complement:f,byCT:o,byExpert:j,byRCP:d}},[n]),O=g.useMemo(()=>{const t=a.trim().toLowerCase();return n.filter(r=>{var x,f,o,j;return s!=="all"&&r.commissionType!==s||l!=="all"&&r.decision!==l?!1:t?[(x=r.claim)==null?void 0:x.claimNumber,(f=r.claim)==null?void 0:f.insuredName,(o=r.claim)==null?void 0:o.medicationName,(j=r.claim)==null?void 0:j.organism,r.comments].some(d=>d==null?void 0:d.toLowerCase().includes(t)):!0})},[n,s,l,a]),xe=()=>A.invalidateQueries({queryKey:["/api/my-commission-history"]}),ue=a||s!=="all"||l!=="all",pe=async t=>{var x;const r=((x=t.claim)==null?void 0:x.id)??t.claimId;if(r){_(t.id);try{const f={CT:`/api/export/ct-decision/${r}/word`,MedecinExpert:`/api/export/expert-decision/${r}/word`,RCP:`/api/export/rcp-decision/${r}/word`},o=await fetch(f[t.commissionType],{credentials:"include"});if(!o.ok)throw new Error(`HTTP ${o.status}`);const j=await o.blob(),d=URL.createObjectURL(j),i=document.createElement("a");i.href=d,i.download=`decision-${t.commissionType.toLowerCase()}-${r}.docx`,document.body.appendChild(i),i.click(),URL.revokeObjectURL(d),document.body.removeChild(i),S({title:"Document Word téléchargé"})}catch{S({title:"Erreur export",variant:"destructive"})}finally{_(null)}}};return e.jsxs("div",{className:"container mx-auto p-6 space-y-5",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[e.jsx(V,{className:"h-6 w-6 text-primary"}),"Mon Historique de Commission"]}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"Uniquement les dossiers que vous avez personnellement traités en commission"})]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx("div",{className:"flex-1 min-w-[130px]",children:e.jsx(k,{label:"Total traités",value:c.total})}),e.jsx("div",{className:"flex-1 min-w-[130px]",children:e.jsx(k,{label:"Favorables",value:c.favorable,color:"text-emerald-600 dark:text-emerald-400"})}),e.jsx("div",{className:"flex-1 min-w-[130px]",children:e.jsx(k,{label:"Défavorables",value:c.defavorable,color:"text-red-600 dark:text-red-400"})}),c.complement>0&&e.jsx("div",{className:"flex-1 min-w-[130px]",children:e.jsx(k,{label:"Compléments demandés",value:c.complement,color:"text-amber-600 dar
1k:text-amber-400"})}),c.byCT>0&&e.jsx("div",{className:"flex-1 min-w-[130px]",children:e.jsx(k,{label:"Commission Transparence",value:c.byCT,color:"text-blue-600 dark:text-blue-400"})}),c.byExpert>0&&e.jsx("div",{className:"flex-1 min-w-[130px]",children:e.jsx(k,{label:"Médecin Expert",value:c.byExpert,color:"text-purple-600 dark:text-purple-400"})}),c.byRCP>0&&e.jsx("div",{className:"flex-1 min-w-[130px]",children:e.jsx(k,{label:"RCP",value:c.byRCP,color:"text-green-600 dark:text-green-400"})})]}),e.jsx(H,{children:e.jsx(q,{className:"pt-4 pb-3",children:e.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[e.jsxs("div",{className:"flex-1 min-w-[220px] relative",children:[e.jsx(je,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),e.jsx(ge,{placeholder:"N° dossier, assuré, médicament, organisme, commentaire…",value:a,onChange:t=>w(t.target.value),className:"pl-9 pr-8","data-testid":"input-search-history"}),a&&e.jsx("button",{className:"absolute right-2.5 top-1/2 -translate-y-1/2",onClick:()=>w(""),"data-testid":"button-clear-search",children:e.jsx(z,{className:"h-4 w-4 text-muted-foreground"})})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx(Pe,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs(G,{value:s,onValueChange:b,children:[e.jsx(Z,{className:"w-[190px]","data-testid":"select-filter-commission",children:e.jsx(ee,{placeholder:"Toutes commissions"})}),e.jsxs(se,{children:[e.jsx(u,{value:"all",children:"Toutes les commissions"}),c.byCT>0&&e.jsx(u,{value:"CT",children:"Commission de la Transparence"}),c.byExpert>0&&e.jsx(u,{value:"MedecinExpert",children:"Médecin Expert"}),c.byRCP>0&&e.jsx(u,{value:"RCP",children:"RCP"})]})]})]}),e.jsxs(G,{value:l,onValueChange:N,children:[e.jsx(Z,{className:"w-[175px]","data-testid":"select-filter-decision",children:e.jsx(ee,{placeholder:"Toutes décisions"})}),e.jsxs(se,{children:[e.jsx(u,{value:"all",children:"Toutes les décisions"}),e.jsx(u,{value:"avis_favorable",children:"Favorable"}),e.jsx(u,{value:"avis_defavorable",children:"Défavorable"}),e.jsx(u,{value:"soumis_medecin_expert",children:"Renvoyé Expert"}),e.jsx(u,{value:"soumis_rcp",children:"Renvoyé RCP"}),e.jsx(u,{value:"complement_demande",children:"Complément demandé"})]})]}),ue&&e.jsxs(C,{variant:"ghost",size:"sm",onClick:()=>{w(""),b("all"),N("all")},"data-testid":"button-reset-filters",className:"gap-1.5",children:[e.jsx(z,{className:"h-4 w-4"}),"Réinitialiser"]})]})})}
1),e.jsxs(H,{children:[e.jsxs(be,{className:"pb-2",children:[e.jsxs(Ne,{className:"text-base flex items-center gap-2",children:[e.jsx(ve,{className:"h-4 w-4"}),"Décisions enregistrées",e.jsx(E,{variant:"outline",className:"ml-1",children:O.length}),O.length!==n.length&&e.jsxs("span",{className:"text-xs text-muted-foreground font-normal",children:["sur ",n.length]})]}),e.jsxs(ye,{className:"text-xs",children:["Chaque ligne correspond à un dossier que vous avez traité. Cliquez sur",e.jsx(X,{className:"h-3.5 w-3.5 inline mx-1"})," pour auditer la décision ou sur",e.jsx(B,{className:"h-3.5 w-3.5 inline mx-1"})," pour modifier le commentaire."]})]}),e.jsx(q,{className:"p-0",children:P?e.jsx("div",{className:"py-12 text-center text-muted-foreground text-sm",children:"Chargement de l'historique…"}):I?e.jsxs("div",{className:"py-12 text-center","data-testid":"error-loading",children:[e.jsx("p",{className:"text-destructive font-semibold",children:"Erreur de chargement"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Veuillez rafraîchir la page."})]}):O.length===0?e.jsx("div",{className:"py-12 text-center text-muted-foreground text-sm",children:n.length===0?"Vous n'avez encore traité aucun dossier en commission.":"Aucun résultat pour ces critères de recherche."}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(Ee,{children:[e.jsx(_e,{children:e.jsxs(Y,{className:"text-xs bg-muted/40",children:[e.jsx(v,{className:"pl-4 w-[90px]",children:"Commission"}),e.jsx(v,{className:"w-[120px]",children:"N° Dossier"}),e.jsx(v,{children:"Assuré / Organisme"}),e.jsx(v,{children:"Médicament / Type"}),e.jsx(v,{className:"w-[150px]",children:"Décision"}),e.jsx(v,{className:"min-w-[200px]",children:"Commentaire"}),e.jsx(v,{className:"w-[120px]",children:"Date décision"}),e.jsx(v,{className:"text-right pr-4 w-[110px]",children:"Actions"})]})}),e.jsx(Se,{children:O.map(t=>{var x,f,o,j,d,i,Q;const r=K[t.decision]||F;return e.jsxs(Y,{"data-testid":`row-decision-${t.id}`,className:"align-top text-sm hover:bg-muted/30",children:[e.jsx(y,{className:"pl-4 pt-3",children:e.jsx(E,{variant:"outline",className:`text-xs ${W[t.commissionType]}`,"data-testid":`badge-commission-${t.commissionType}`,children:qe[t.commissionType]})}),e.jsx(y,{className:"pt-3",children:e.jsx("span",{className:"font-mono text-xs font-semibold text-foreground","data-testid":`text-claim-number-${t.id}`,children:((x=t.claim)==null?void 0:x.claimNumber)||t.claimId.slice(0,8).toUpperCase()})}),e.jsxs(y,{className:"pt-3 max-w-[150px]",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ne,{className:"h-3 w-3 text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-xs truncate",title:((f=t.claim)==null?void 0:f.insuredName)||"",children:((o=t.claim)==null?void 0:o.insuredName)||"—"})]}),((j=t.claim)==null?void 0:j.organism)&&e.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[e.jsx(ce,{className:"h-3 w-3 text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.claim.organism})]})]}),e.jsxs(y,{className:"pt-3 max-w-[180px]",children:[e.jsxs("div",{className:"flex items-start gap-1",children:[e.jsx(oe,{className:"h-3 w-3 text-muted-foreground shrink-0 mt-0.5"}),e.jsx("span",{className:"text-xs leading-snug",title:((d=t.claim)==null?void 0:d.medicationName)||"",children:((i=t.claim)==null?void 0:i.medicationName)||"—"})]}),((Q=t.claim)==null?void 0:Q.typeDemande)&&e.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5 ml-4",children:me[t.claim.typeDemande]??t.claim.typeDemande})]}),e.jsx(y,{className:"pt-3",children:e.jsxs(E,{variant:"outline",className:`text-xs gap-1 ${L[t.decision]||"bg-muted text-muted-foreground"}`,"data-testid":`badge-decision-${t.id}`,children:[e.jsx(r,{className:"h-3 w-3 shrink-0"}),$[t.decision]||t.decision]})}),e.jsx(y,{className:"pt-3 max-w-[220px]",children:t.comments?e.jsx("p",{className:"text-xs leading-relaxed line-clamp-3 text-foreground",title:t.comments,children:t.comments}):e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"Aucun commentaire"})}),e.jsxs(y,{className:"pt-3",children:[e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx($e,{className:"h-3 w-3 shrink-0"}),M(new Date(t.createdAt),"dd/MM/yyyy HH:mm",{locale:D})]}),t.updatedAt&&t.updatedAt!==t.createdAt&&e.jsxs("div",{className:"text-[10px] text-muted-foreground
1/60 mt-0.5",children:["modifié ",M(new Date(t.updatedAt),"dd/MM HH:mm",{locale:D})]})]}),e.jsx(y,{className:"pt-2.5 text-right pr-4",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx(C,{variant:"outline",size:"icon",onClick:()=>T(t),title:"Voir le dossier médical","data-testid":`button-audit-${t.id}`,children:e.jsx(X,{className:"h-4 w-4"})}),e.jsx(C,{variant:"outline",size:"icon",onClick:()=>m(t),title:"Modifier le commentaire","data-testid":`button-edit-${t.id}`,children:e.jsx(B,{className:"h-4 w-4"})}),e.jsx(C,{variant:"outline",size:"icon",onClick:()=>pe(t),disabled:R===t.id,title:"Exporter en Word","data-testid":`button-export-${t.id}`,children:e.jsx(Le,{className:"h-4 w-4"})})]})})]},t.id)})})]})})})]}),p&&e.jsx(Ue,{decision:p,open:!!p,onClose:()=>m(null),onSaved:xe}),h&&e.jsx(Be,{decision:h,open:!!h,onClose:()=>T(null),onEditComment:()=>{m(h),T(null)}})]})}export{fs 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.