"use strict";(this.webpackChunk_tsmesolutions_cubes_initiatives=this.webpackChunk_tsmesolutions_cubes_initiatives||[]).push([[5013],{15013:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var i=n(24590),r=n(90726),o=n(16464),s=n(19244);function a(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(i,r)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){a(o,i,r,s,u,"next",e)}function u(e){a(o,i,r,s,u,"throw",e)}s(void 0)})}}const l={class:"form-actions justify-content-end form-actions-justified pt-0"},c=(0,i.defineComponent)({__name:"progress-reporting",setup(e){const t=r.IoC.DI().resolve(o.Ow.appContext),a=t.services[s.St.AppService.key],c=t.translation.global,d=(0,i.inject)(o.Ow.initiativeSettings),f=d?.translation.tSettings,p=d.hasSettingsPrivilege,v=(0,i.ref)(),g=(0,i.ref)(d?.reportingProgressDC.isDirty),y=function(){var e=u(function*(){try{if(!(yield v.value.validateAsync()))return;yield d?.api.updateReportingProgress(),d.reportingProgressDC.commit()}catch(e){return}});return function(){return e.apply(this,arguments)}}(),m=function(){var e=u(function*(){"yes"==(yield a.confirm({i18n:{title:f.value.confirmCancel.title(f.value.steps["progress-reporting-settings"]),body:f.value.confirmCancel.body},yesButton:{accent:"danger",modifier:"outline",title:c.value.yes},noButton:{accent:"none",title:c.value.no},cancelButton:void 0})).type&&d?.reportingProgressDC.rollback()});return function(){return e.apply(this,arguments)}}(),C=(0,i.defineAsyncComponent)(()=>n.e(75).then(n.bind(n,90075)));return(e,t)=>{const n=(0,i.resolveComponent)("v-card"),r=(0,i.resolveComponent)("v-button");return(0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[(0,i.createVNode)(n,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(C),{disabled:!(0,i.unref)(p),ref_key:"progressReportingSetupRef",ref:v},null,8,["disabled"])]),_:1}),(0,i.createElementVNode)("div",l,[(0,i.createVNode)(r,{modifier:"outline",disabled:!g.value||!(0,i.unref)(p),onClick:m},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(c).discard),1)]),_:1},8,["disabled"]),(0,i.createVNode)(r,{disabled:!g.value||!(0,i.unref)(p),onClick:y},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(c).save),1)]),_:1},8,["disabled"])])],64)}}})}}]);
//# sourceMappingURL=02a149786810dc1a6a45.js.map