import{g as f}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as v}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as _}from"./NumeroChip-QCXXOqUM.js";import{C as c}from"./ComboDynamique-BzWI4ISP.js";import{i as V,b as x,k as $,l as g,d as l,v as a,j as u}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 w={class:"md-form-grid"},A={class:"flex items-end md-col-full",style:{gap:"8px"}},C={class:"field",style:{flex:"1","min-width":"0"}},N={class:"field"},S={class:"field"},I={class:"field"},O={__name:"SitesCommercial",props:["ndoc","embedded"],setup(r){const p={list:()=>`${e.lienApi}/listesites/${e.db}`,getOne:o=>`${e.lienApi}/unsite/${e.db}/${o}`,add:()=>`${e.lienApi}/AjouterEtRenvoyersite/${e.db}`,save:o=>`${e.lienApi}/enregistrerSite/${e.db}/${o}`,remove:o=>`${e.lienApi}/supprimerSite/${e.db}/${o}`},b={excelFileName:"Sites commercial",excelSheetName:"Sites commercial",excludedColumns:["Id_affaire_p","Id_ville","IDCommune","code_comptable","Matricule_controleur","RIB","code_client","affaire"]};return(o,s)=>{const m=f,n=V("maxlen-db");return x(),$(v,{"page-id":230,"tab-id":"SitesCommercial","id-field":"Id_site",resource:p,grid:b,embedded:r.embedded,ndoc:r.ndoc,variant:"drawer","drawer-width":"640px",title:"Site","entity-label":"un site","empty-icon":"pi pi-map-marker","delete-message":"Voulez-vous vraiment supprimer ce site ?"},{form:g(({entete:i,modeModification:t})=>[l("div",w,[l("div",A,[a(_,{value:i.Id_site},null,8,["value"]),l("div",C,[s[0]||(s[0]=l("label",{for:"inputFocus",class:"block mb-1"},"Nom",-1)),u(a(m,{size:"small",id:"inputFocus",modelValue:i.Nom,"onUpdate:modelValue":d=>i.Nom=d,disabled:!t,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[n,"site.Nom"]])])]),l("div",N,[s[1]||(s[1]=l("label",{for:"client",class:"block mb-1"},"Client",-1)),a(c,{id:"client",modelValue:i.code_client,"onUpdate:modelValue":d=>i.code_client=d,placeholder:"Sélectionner un client",table:"client",disabled:!t,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"])]),l("div",S,[s[2]||(s[2]=l("label",{for:"ville",class:"block mb-1"},"Ville",-1)),a(c,{id:"ville",modelValue:i.Id_ville,"onUpdate:modelValue":d=>i.Id_ville=d,placeholder:"Sélectionner une ville",table:"ville",disabled:!t,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"])]),l("div",I,[s[3]||(s[3]=l("label",{for:"adresse",class:"block mb-1"},"Adresse",-1)),u(a(m,{size:"small",id:"adresse",modelValue:i.Adresse,"onUpdate:modelValue":d=>i.Adresse=d,disabled:!t,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[n,"site.Adresse"]])])])]),_:1},8,["embedded","ndoc"])}}};export{O as default};
