import{o as f,c as b,b as t,a,z as v,q as _,F as g,r as s}from"./vendor-BDR7yMJi.js";import{u as x,S as w,a as y,s as n}from"./index-BSaHX2oa.js";import{_ as A}from"./DataGrid-DbeHIyBR.js";import"./useAgGridConfig-DxO2r97K.js";const J={class:"flex min-w-full flex-col lg:flex-row lg:items-center gap-2 p-1"},M={class:"btns flex items-center gap-2 lg:w-1/4 lg:justify-start lg:ml-0 py-2"},C={style:{height:"calc(100vh - 220px)",width:"100%"}},G={__name:"JoursAbsencesMois",setup(F){const{showError:l}=x(),c=s(null),u=s(null),o=s([]),m=s({Matricule:95,nom:200,cin:90,cnss:90,Janvier:90,Fevrier:90,Mars:90,Avril:90,Mai:90,Juin:90,Juillet:90,Aout:90,Septembre:90,Octobre:90,Novembre:90,Decembre:90,Total:90}),d=e=>{e.api.sizeColumnsToFit()},p=({selectedRows:e})=>{e.length>0&&(u.value=e[0])},h=async()=>{try{const e=await y.post(`${n.lienApi}/AbsencesParMois/${n.db}`,{Annee:n.state.annee_fiscale},{headers:{"Content-Type":"application/json"}});o.value=e.data}catch(e){l(`Une erreur est survenue lors du chargement des données: ${e.message}`)}};return(e,r)=>{const i=v;return f(),b(g,null,[t("div",J,[t("div",M,[a(i,{icon:"pi pi-refresh",label:"Afficher",text:"",onClick:h}),a(i,{icon:"pi pi-times",label:"Fermer",text:"",onClick:r[0]||(r[0]=S=>_(w)("JoursAbsencesMois"))})])]),t("div",C,[a(A,{ref_key:"dataGrid",ref:c,"excel-file-name":"Jours absences mois","excel-sheet-name":"Jours absences mois","row-data":o.value,"numeric-columns":["Janvier","Fevrier","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Decembre","Total"],"column-widths":m.value,"excluded-columns":["datee"],"grid-style":"height: calc(100vh - 240px); width: 100%",onSelectionChanged:p,onGridReady:d},null,8,["row-data","column-widths"])])],64)}}};export{G as default};
