import{g as f,y as v,K as V}from"./primevue-CfIk0_DY.js";import{w as $,s as e}from"./index-BxIwIJfy.js";import{M as x}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as w}from"./NumeroChip-QCXXOqUM.js";import{o as g,i as h,b as S,k as N,l as y,d as t,v as d,j as L,a as k}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 A={class:"md-form-grid"},C={class:"flex items-end md-col-full",style:{gap:"8px"}},U={class:"field",style:{flex:"1","min-width":"0"}},B={class:"field"},F={class:"field"},W={__name:"Statut",props:["ndoc","embedded"],setup(p){const n=k([]);g(async()=>{n.value=await $("pipeline_opportunite")});const r={list:()=>`${e.lienApi}/statut_opportunite/${e.db}`,getOne:i=>`${e.lienApi}/unstatut_opportunite/${e.db}/${i}`,add:()=>`${e.lienApi}/AjouterEtRenvoyerstatut_opportunite/${e.db}`,save:i=>`${e.lienApi}/enregistrerStatut_opportunite/${e.db}/${i}`,remove:i=>`${e.lienApi}/supprimerStatut_opportunite/${e.db}/${i}`},u={excelFileName:"Statuts",excelSheetName:"Statuts",documentNumberFields:["ndoc"],excludedColumns:["ndoc","id_statut_opportunite","id_pipeline"],columnWidths:{Libelle:220,Commentaire:320,ordre:90,pipeline_libelle:200}};return(i,o)=>{const m=f,c=v,b=V,_=h("maxlen-db");return S(),N(x,{"page-id":307,"tab-id":"Statut","id-field":"id_statut_opportunite",resource:r,grid:u,embedded:p.embedded,ndoc:p.ndoc,variant:"drawer","drawer-width":"640px",title:"Statut","entity-label":"un statut","empty-icon":"pi pi-flag","delete-message":"Voulez-vous vraiment supprimer ce statut ?"},{form:y(({entete:l,modeModification:a})=>[t("div",A,[t("div",C,[d(w,{value:l.id_statut_opportunite},null,8,["value"]),t("div",U,[o[0]||(o[0]=t("label",{for:"inputFocus",class:"block mb-1"},"Libellé",-1)),L(d(m,{size:"small",id:"inputFocus",modelValue:l.Libelle,"onUpdate:modelValue":s=>l.Libelle=s,disabled:!a,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[_,"statut_opportunite.Libelle"]])])]),t("div",B,[o[1]||(o[1]=t("label",{for:"pipeline",class:"block mb-1"},"Pipeline",-1)),d(c,{id:"pipeline",modelValue:l.id_pipeline,"onUpdate:modelValue":s=>l.id_pipeline=s,options:n.value,optionLabel:"text",optionValue:"value",class:"w-full",disabled:!a,placeholder:"Choisir un pipeline"},null,8,["modelValue","onUpdate:modelValue","options","disabled"])]),t("div",F,[o[2]||(o[2]=t("label",{for:"ordre",class:"block mb-1"},"Ordre dans le pipeline",-1)),d(b,{size:"small",id:"ordre",modelValue:l.ordre,"onUpdate:modelValue":s=>l.ordre=s,class:"w-full",disabled:!a,min:0,showButtons:""},null,8,["modelValue","onUpdate:modelValue","disabled"])])])]),_:1},8,["embedded","ndoc"])}}};export{W as default};
