import{g as v}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as b}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as _}from"./NumeroChip-QCXXOqUM.js";import{i as f,b as x,k as $,l as N,d as o,v as r,j as n}from"./vue-core-Di3IuVqe.js";import"./cjs-helpers-psZwOBky.js";import"./vue-cal-DKMVGERa.js";import"./moment-BeHQNF8T.js";import"./usePagerDetail-BeqYPv-1.js";import"./DataGrid-CoMfrBJA.js";import"./useAgGridConfig-Dp3DkgaV.js";const V={class:"md-form-grid"},g={class:"flex items-end md-col-full",style:{gap:"8px"}},h={class:"field",style:{flex:"1","min-width":"0"}},w={class:"field"},R={__name:"Services",props:["ndoc","embedded"],setup(t){const p={list:()=>`${e.lienApi}/services/${e.db}`,getOne:i=>`${e.lienApi}/unservice/${e.db}/${i}`,add:()=>`${e.lienApi}/AjouterEtRenvoyerservice/${e.db}`,save:i=>`${e.lienApi}/enregistrerService/${e.db}/${i}`,remove:i=>`${e.lienApi}/supprimerService/${e.db}/${i}`},u={excelFileName:"Services",excelSheetName:"Services",documentNumberFields:["ndoc"],excludedColumns:["ndoc","id_service"],columnWidths:{Nom:200,code_comptable:150}};return(i,d)=>{const a=v,c=f("maxlen-db");return x(),$(b,{"page-id":1406,"tab-id":"Services","id-field":"id_service",resource:p,grid:u,embedded:t.embedded,ndoc:t.ndoc,variant:"drawer","drawer-width":"640px",title:"Service","entity-label":"un service","empty-icon":"pi pi-sitemap","delete-message":"Voulez-vous vraiment supprimer ce service ?"},{form:N(({entete:l,modeModification:m})=>[o("div",V,[o("div",g,[r(_,{value:l.id_service},null,8,["value"]),o("div",h,[d[0]||(d[0]=o("label",{for:"inputFocus",class:"block mb-1"},"Nom",-1)),n(r(a,{size:"small",id:"inputFocus",modelValue:l.Nom,"onUpdate:modelValue":s=>l.Nom=s,disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[c,"service.Nom"]])])]),o("div",w,[d[1]||(d[1]=o("label",{for:"code_comptable",class:"block mb-1"},"Code Comptable",-1)),n(r(a,{size:"small",id:"code_comptable",modelValue:l.code_comptable,"onUpdate:modelValue":s=>l.code_comptable=s,disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[c,"service.code_comptable"]])])])]),_:1},8,["embedded","ndoc"])}}};export{R as default};
