import{g as f}from"./primevue-CfIk0_DY.js";import{s as a}from"./index-BxIwIJfy.js";import{M as V}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as g}from"./NumeroChip-QCXXOqUM.js";import{C as c}from"./ComboDynamique-BzWI4ISP.js";import{i as v,b as A,k as x,l as _,d as e,v as o,j as t}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 $={class:"md-form-grid"},w={class:"flex items-end md-col-full",style:{gap:"8px"}},D={class:"field",style:{flex:"1","min-width":"0"}},I={class:"field"},U={class:"field"},k={class:"field"},T={class:"field"},N={class:"field"},O={__name:"Agence",props:["ndoc","embedded"],setup(u){const p={list:()=>`${a.lienApi}/agence/${a.db}`,getOne:i=>`${a.lienApi}/unagence/${a.db}/${i}`,add:()=>`${a.lienApi}/AjouterEtRenvoyerAgence/${a.db}`,save:i=>`${a.lienApi}/enregistrerAgence/${a.db}/${i}`,remove:i=>`${a.lienApi}/supprimerAgence/${a.db}/${i}`},b={excelFileName:"Agences",excelSheetName:"Agences",documentNumberFields:["ndoc"],excludedColumns:["ndoc","ID"],columnWidths:{Libelle:250,Tel:150,mail:200,Adresse:250}};return(i,d)=>{const n=f,r=v("maxlen-db");return A(),x(V,{"page-id":214,"tab-id":"Agence","id-field":"ID",resource:p,grid:b,embedded:u.embedded,ndoc:u.ndoc,variant:"drawer","drawer-width":"640px",title:"Agence","entity-label":"une agence","empty-icon":"pi pi-building","delete-message":"Voulez-vous vraiment supprimer cette agence ?"},{form:_(({entete:l,modeModification:m})=>[e("div",$,[e("div",w,[o(g,{value:l.ID},null,8,["value"]),e("div",D,[d[0]||(d[0]=e("label",{for:"inputFocus",class:"block mb-1"},"Libellé",-1)),t(o(n,{size:"small",id:"inputFocus",modelValue:l.Libelle,"onUpdate:modelValue":s=>l.Libelle=s,disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[r,"agence.Libelle"]])])]),e("div",I,[d[1]||(d[1]=e("label",{for:"Tel",class:"block mb-1"},"Tél",-1)),t(o(n,{size:"small",id:"Tel",modelValue:l.Tel,"onUpdate:modelValue":s=>l.Tel=s,disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[r,"agence.Tel"]])]),e("div",U,[d[2]||(d[2]=e("label",{for:"fax",class:"block mb-1"},"Fax",-1)),t(o(n,{size:"small",id:"fax",modelValue:l.fax,"onUpdate:modelValue":s=>l.fax=s,disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[r,"agence.fax"]])]),e("div",k,[d[3]||(d[3]=e("label",{for:"Adresse",class:"block mb-1"},"Adresse",-1)),t(o(n,{size:"small",id:"Adresse",modelValue:l.Adresse,"onUpdate:modelValue":s=>l.Adresse=s,disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[r,"agence.Adresse"]])]),e("div",T,[d[4]||(d[4]=e("label",{for:"Id_ville",class:"block mb-1"},"Ville",-1)),o(c,{id:"Id_ville",modelValue:l.Id_ville,"onUpdate:modelValue":s=>l.Id_ville=s,placeholder:"Sélectionner une ville",table:"ville",disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"])]),e("div",N,[d[5]||(d[5]=e("label",{for:"IDdepot",class:"block mb-1"},"Dépôt",-1)),o(c,{id:"IDdepot",modelValue:l.IDdepot,"onUpdate:modelValue":s=>l.IDdepot=s,placeholder:"Sélectionner un dépôt",table:"depot",disabled:!m,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"])])])]),_:1},8,["embedded","ndoc"])}}};export{O as default};
