import{g,K as v,y as V}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as _}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as $}from"./NumeroChip-QCXXOqUM.js";import{i as x,b as w,k as P,l as U,d as l,v as t,j as D}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 E={class:"md-form-grid"},O={class:"flex items-end md-col-full",style:{gap:"8px"}},h={class:"field",style:{flex:"1","min-width":"0"}},N={class:"field"},k={class:"field"},q={class:"field"},J={__name:"ProgrammeEntretien",props:["ndoc","embedded"],setup(n){const m=[{label:"Jours",value:1},{label:"Semaines",value:2},{label:"Mois",value:3},{label:"Années",value:4}],u={list:()=>`${e.lienApi}/ProgrammesEntretien/${e.db}`,getOne:s=>`${e.lienApi}/unProgrammeEntretien/${e.db}/${s}`,add:()=>`${e.lienApi}/AjouterEtRenvoyerProgrammeEntretien/${e.db}`,save:s=>`${e.lienApi}/enregistrerProgrammeEntretien/${e.db}/${s}`,remove:s=>`${e.lienApi}/supprimerProgrammeEntretien/${e.db}/${s}`},p={excelFileName:"Programmes d'entretien",excelSheetName:"Programmes d'entretien",documentNumberFields:["ndoc"],excludedColumns:["ndoc"],numericColumns:["Fréquence","Odomètre"],columnWidths:{Description:350,Fréquence:130,Unité:130,Odomètre:130}};return(s,o)=>{const c=g,a=v,b=V,f=x("maxlen-db");return w(),P(_,{"page-id":2603,"tab-id":"ProgrammeEntretien","id-field":"ID_ProgrammeEntretien",resource:u,grid:p,embedded:n.embedded,ndoc:n.ndoc,variant:"drawer","drawer-width":"720px",title:"Programme d'entretien","entity-label":"un programme d'entretien","empty-icon":"pi pi-wrench","delete-message":"Voulez-vous vraiment supprimer ce programme d'entretien ?"},{form:U(({entete:r,modeModification:d})=>[l("div",E,[l("div",O,[t($,{label:"N°Ordre",value:r.ID_ProgrammeEntretien},null,8,["value"]),l("div",h,[o[0]||(o[0]=l("label",{for:"inputFocus",class:"block mb-1"},"Description",-1)),D(t(c,{size:"small",id:"inputFocus",modelValue:r.Description,"onUpdate:modelValue":i=>r.Description=i,disabled:!d,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[f,"programmeentretien.Description"]])])]),l("div",N,[o[1]||(o[1]=l("label",{for:"frequence",class:"block mb-1"},"Fréquence",-1)),t(a,{size:"small",id:"frequence",modelValue:r.frequence,"onUpdate:modelValue":i=>r.frequence=i,disabled:!d,class:"w-full",min:0},null,8,["modelValue","onUpdate:modelValue","disabled"])]),l("div",k,[o[2]||(o[2]=l("label",{for:"Temp",class:"block mb-1"},"Unité",-1)),t(b,{id:"Temp",modelValue:r.Temp,"onUpdate:modelValue":i=>r.Temp=i,options:m,optionLabel:"label",optionValue:"value",placeholder:"Unité",disabled:!d,size:"small",class:"w-full",showClear:""},null,8,["modelValue","onUpdate:modelValue","disabled"])]),l("div",q,[o[3]||(o[3]=l("label",{for:"Odometre",class:"block mb-1"},"Odomètre",-1)),t(a,{size:"small",id:"Odometre",modelValue:r.Odometre,"onUpdate:modelValue":i=>r.Odometre=i,disabled:!d,class:"w-full",min:0},null,8,["modelValue","onUpdate:modelValue","disabled"])])])]),_:1},8,["embedded","ndoc"])}}};export{J as default};
