1import{d as V,i as f,O as D,H as y,P as g,N as p,z as h,A as w,B as P,a8 as S,a as E,_ as N,b as $,e as b,v as F,g as q,r as C,o as O}from"./index-Di9lGHFk.js";import{D as z,P as B}from"./Form-0C7G4BKq.js";import"./EBRadioGroup-Dss_fEKM.js";import"./EBRadio-DNeeVA2U.js";import"./EBCheckboxGroup-DsRxrdFv.js";import"./EBCheckbox-Cr7mm532.js";import"./EBDatePicker.vue_vue_type_style_index_0_lang-cGE7LB0a.js";import"./fromUnixTime-B8XkyvZc.js";import"./toDate-qOSwr3PX.js";import"./parse-BqypIYIw.js";import"./protectedTokens-BcDtbJIM.js";import"./format-hgXVADNT.js";const A=V({components:{DataForm:z},props:{newVersion:{type:String,default:""},duplicate:{type:String,default:""}},setup(e){const n=S(),l=E(),t=f(!1),s=D(new B),i=f("Neu"),u=()=>{l.push({name:"ProcessList"})},d=r=>{t.value=r},R=r=>{v(s.formData())},v=async r=>{var o;try{t.value=!0;let a="/processes/add";e.newVersion!==""&&(a="/processes/duplicate/".concat(e.newVersion)),e.duplicate!==""&&(a="/processes/duplicate/".concat(e.duplicate));const c=await g.post(a,r);n.dispatch("app/addNotification",{text:"Prozess wurde erfolgreich gespeichert.",type:p.SAVE}),l.push({name:"ProcessDetail",params:{uid:(o=c.data)==null?void 0:o.uid}})}catch(a){let c="Prozess konnte nicht gespeichert werden:<br />".concat(a.message);a.toJSON().status===409&&(c="Diese Versionsnummer ist bereits in diesem Prozess in Verwendung"),h("PROCESSEDIT: edit process",P.DEBUG,w.ALERT,a.message),n.dispatch("app/addNotification",{text:c,type:p.ERROR})}finally{t.value=!1}},m=async r=>{t.value=!0;try{const o=await g.get("/processes/show/".concat(r));s.setMasterData(o.data),e.newVersion!==""&&(s.rootProcess=s.uid.toString(),s.rootProcessName="".concat(s.process," (").concat(s.version,")"),s.version=0)}catch(o){h("PROCESSNEWVERSION: loadProcessData",P.DEBUG,w.ALERT,o.message),n.dispatch("app/addNotification",{text:"Process konnten nicht geladen werden:<br />".concat(o.message),type:p.ERROR})}finally{t.value=!1}};return y(async()=>{e.newVersion!==""?(i.value="Neue Version",m(e.newVersion)):e.duplicate!==""&&(i.value="duplizieren",m(e.duplicate))}),{isRequestingData:t,process:s,mode:i,onCancel:u,onRequesting:d,onSubmit:R}}}),T={class:"main-container"},_={class:"page-heading-text mb-4"};function k(e,n,l,t,s,i){const u=C("DataForm");return O(),$("div",T,[b("h1",_," Prozess "+F(e.mode),1),q(u,{modelValue:e.process,"onUpdate:modelValue":n[0]||(n[0]=d=>e.process=d),"is-requesting-data":e.isRequestingData,"new-version":e.newVersion!=="","onForm:submit":e.onSubmit,"onForm:cancel":e.onCancel,"onForm:isRequesting":e.onRequesting},null,8,["modelValue","is-requesting-data","new-version","onForm:submit","onForm:cancel","onForm:isRequesting"])])}const X=N(A,[["render",k]]);export{X as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.