1"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[47638],{36504(e,t,r){r.r(t),r.d(t,{default:()=>g});var n=r(2916),i=r(56370),o=r(20641),l=r(53751),a=r(90033);const s={class:"d-flex justify-content-between w-100"};var u=r(18607),c=r(69047),d=r(73096),h=r(85903),p=r(86840),f=r(69430),y=r(82124),v=r(80493),b=r(33289);const m={name:"TaskModelUpdateModal",components:{TaskModelForm:h.A},mixins:[b.A,d.A],data:()=>({previousOwnerId:null,previousCompleted:null,modalName:"TaskModelUpdateModal"}),computed:{...(0,y.L8)({userId:"AuthStore/userId"}),ownerId(){return this.scratch.owner?this.scratch.owner._id:null},completed:{get(){return this.scratch.completed},set(e){this.setScratchValue({key:"completed",value:e})}},reopened:{get(){return this.scratch.reopened},set(e){this.setScratchValue({key:"reopened",value:e})}}},methods:{eagerLoadModal:c.y,hidden(){this.previousOwnerId=null,this.previousCompleted=null,this.resetErrors(),this.resetScratch()},async init(){let e=await this.hydratedEntity();e.priority=[e.priority],this.setScratch(e),this.previousOwnerId=this.scratch.owner?this.scratch.owner._id:null,this.previousCompleted=this.scratch.completed},toggleSelectedTask(){(this.completed||this.reopened)&&(this.reopened=!this.reopened),this.completed=!this.completed,this.submit()},submit(){this.resetErrors(),this.loading=!0;let e={...this.scratch,priority:this.scratch.priority[0]||null};this.$store.dispatch("TaskStore/update",{url:this.entityLocation,data:e}).then((e=>{this.hideWithSuccess(),this.selectedPursuit&&(this.refreshPursuit({url:this.selectedPursuit.showUrl}),v.D&&v.D.join("PursuitModel."+this.selectedPursuit._id).whisper("TaskModel:updated",{_id:e._id,url:e.showUrl})),e.owner&&e.owner._id!==this.previousOwnerId&&(0,p.A)(f.bJ,{id:e.owner._id}),e.completed&&e.completed!==this.previousCompleted&&(0,p.A)(f.Cr,{id:e.owner._id})})).catch((e=>{throw this.loading=!1,e}))},destroy(){this.hide(),(0,c.t)(u.b.TASK_MODEL_DELETE,{props:{entityLocation:this.entityLocation}})},openTaskModelCommentModal(){(0,c.t)(u.b.TASK_MODEL_COMMENT,{on:{"comment-submitted":this.toggleSelectedTask}})}}};const g=(0,r(66262).A)(m,[["render",function(e,t,r,u,c,d){const h=(0,o.g2)("TaskModelForm"),p=i.A,f=n.A;return(0,o.uX)(),(0,o.Wv)(f,{id:e.computedModalName,ref:e.computedModalName,header:"Edit Task",visible:e.visible,style:{width:"50rem"},draggable:!1,modal:"",onShow:d.init,"onUpdate:visible":e.updateVisible},{default:(0,o.k6)((()=>[(0,o.Lk)("form",{"data-hs-do-not-collect":"true",onSubmit:t[2]||(t[2]=(0,l.withModifiers)(((...e)=>d.submit&&d.submit(...e)),["prevent"]))},[e.visible?((0,o.uX)(),(0,o.Wv)(h,{key:0,"form-action":"update",loading:e.loading},null,8,["loading"])):(0,o.Q3)("",!0),(0,o.Lk)("div",s,[(0,o.bF)(p,{severity:"danger",disabled:e.loading,label:"Delete","aria-haspopup":"dialog",onMouseenterOnce:t[0]||(t[0]=e=>{d.eagerLoadModal("TASK_MODEL_DELETE")}),onClick:d.destroy},null,8,["disabled","onClick"]),(0,o.Lk)("div",null,[(0,o.bF)(p,{severity:"secondary",variant:"outlined",label:"Cancel",disabled:e.loading,onClick:e.hide},null,8,["disabled","onClick"]),(0,o.bF)(p,{severity:"primary",label:"OK",disabled:e.loading,onClick:d.submit},null,8,["disabled","onClick"]),(0,o.bF)(p,{icon:d.completed?"fa-regular fa-lg fa-exclamation-circle text-danger":"fa-regular fa-lg fa-regular fa-check-circle text-success",severity:d.completed?"danger":"success",label:d.completed?"Re-Open":"Close",variant:"text",dusk:"toggle-task",disabled:e.userId!==d.ownerId||e.loading,title:e.userId!==d.ownerId?"Only the Owner can change task status.":"",style:(0,a.normalizeStyle)(e.userId!==d.ownerId?"cursor: not-allowed;":""),"aria-haspopup":"dialog",onMouseenterOnce:t[1]||(t[1]=e=>{d.eagerLoadModal("TASK_MODEL_COMMENT")}),onClick:d.openTaskModelCommentModal},null,8,["icon","severity","label","disabled","title","style","onClick"])])])],32)])),_:1},8,["id","visible","onShow","onUpdate:visible"])}]])},85742(e,t,r){r.d(t,{Lc:()=>y,Ol:()=>v,bM:()=>s});var n=r(86803),i=r(31922);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function l(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==o(t)?t:t+""}var s=function(){return l((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this.listener=r}),[{key:"bindScrollListener",value:function(){this.scrollableParents=(0,n.db)(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])}();function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==u(t)?t:t+""}
1var y=function(){return h((function e(t){var r=t.init,n=t.type;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),p(this,"helpers",void 0),p(this,"type",void 0),this.helpers=new Set(r),this.type=n}),[{key:"add",value:function(e){this.helpers.add(e)}},{key:"update",value:function(){}},{key:"delete",value:function(e){this.helpers.delete(e)}},{key:"clear",value:function(){this.helpers.clear()}},{key:"get",value:function(e,t){var r=this._get(e,t),n=r?this._recursive(c(this.helpers),r):null;return(0,i.hj)(n)?n:null}},{key:"_isMatched",value:function(e,t){var r,n=null==e?void 0:e.parent;return(null==n||null===(r=n.vnode)||void 0===r?void 0:r.key)===t||n&&this._isMatched(n,t)||!1}},{key:"_get",value:function(e,t){var r,n;return(null===(r=t||(null==e?void 0:e.$slots))||void 0===r||null===(n=r.default)||void 0===n?void 0:n.call(r))||null}},{key:"_recursive",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=[];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(n){n.children instanceof Array?r=r.concat(e._recursive(r,n.children)):n.type.name===e.type?r.push(n):(0,i.hj)(n.key)&&(r=r.concat(t.filter((function(t){return e._isMatched(t,n.key)})).map((function(e){return e.vnode}))))})),r}}])}();function v(e,t){if(e){var r=e.props;if(r){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Object.prototype.hasOwnProperty.call(r,n)?n:t;return e.type.extends.props[t].type===Boolean&&""===r[i]||r[i]}}return null}}}]);
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.