import{g as b}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as f}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as v}from"./NumeroChip-QCXXOqUM.js";import{i as N,b as _,k as x,l as $,d as s,v as i,j as c}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"},j={__name:"Postes",props:["ndoc","embedded"],setup(a){const p={list:()=>`${e.lienApi}/postes/${e.db}`,getOne:o=>`${e.lienApi}/unposte/${e.db}/${o}`,add:()=>`${e.lienApi}/AjouterEtRenvoyerPoste/${e.db}`,save:o=>`${e.lienApi}/enregistrerPoste/${e.db}/${o}`,remove:o=>`${e.lienApi}/supprimerPoste/${e.db}/${o}`},u={excelFileName:"Postes",excelSheetName:"Postes",documentNumberFields:["ndoc"],excludedColumns:["ndoc","defaul"],columnWidths:{Id_poste:120,Nom:250,Nomenclature:200}};return(o,t)=>{const r=b,m=N("maxlen-db");return _(),x(f,{"page-id":1408,"tab-id":"Postes","id-field":"Id_poste",resource:p,grid:u,embedded:a.embedded,ndoc:a.ndoc,variant:"drawer","drawer-width":"640px",title:"Poste","entity-label":"un poste","empty-icon":"pi pi-id-card","delete-message":"Voulez-vous vraiment supprimer ce poste ?"},{form:$(({entete:l,modeModification:n})=>[s("div",V,[s("div",g,[i(v,{value:l.Id_poste},null,8,["value"]),s("div",h,[t[0]||(t[0]=s("label",{for:"inputFocus",class:"block mb-1"},"Nom",-1)),c(i(r,{size:"small",id:"inputFocus",modelValue:l.Nom,"onUpdate:modelValue":d=>l.Nom=d,disabled:!n,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[m,"poste.Nom"]])])]),s("div",w,[t[1]||(t[1]=s("label",{for:"nomenclature",class:"block mb-1"},"Nomenclature",-1)),c(i(r,{size:"small",id:"nomenclature",modelValue:l.Nomenclature,"onUpdate:modelValue":d=>l.Nomenclature=d,disabled:!n,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[m,"poste.Nomenclature"]])])])]),_:1},8,["embedded","ndoc"])}}};export{j as default};
