text: !function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var i,n=l(t);if(e){var r=l(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a(this,i)}}function a(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}(self.webpackChunkworkflow_ui_ngx=self.webpackChunkworkflow_ui_ngx||[]).push([[152],{5152:function(t,r,a){"use strict";a.r(r),a.d(r,{WorklistModule:function(){return ue}});var l,s=a(2057),c=a(4751),u=a(7208),p=a(5629),f=a(6852),d=a(3532),h=a(9451),g=Array.isArray,v="object"==typeof global&&global&&global.Object===Object&&global,_="object"==typeof self&&self&&self.Object===Object&&self,y=v||_||Function("return this")(),b=y.Symbol,m=Object.prototype,k=m.hasOwnProperty,A=m.toString,T=b?b.toStringTag:void 0,w=Object.prototype.toString,x=b?b.toStringTag:void 0,Z=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?function(t){var e=k.call(t,T),i=t[T];try{t[T]=void 0;var n=!0}catch(o){}var r=A.call(t);return n&&(e?t[T]=i:delete t[T]),r}(t):function(t){return w.call(t)}(t)},O=function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==Z(t)},S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/,E=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},I=y["__core-js_shared__"],R=(l=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+l:"",q=Function.prototype.toString,j=/^\[object .+?Constructor\]$/,C=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=function(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!E(t)||(e=t,R&&R in e))&&(function(t){if(!E(t))return!1;var e=Z(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?C:j).test(function(t){if(null!=t){try{return q.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var e}(i)?i:void 0},J=M(Object,"create"),$=Object.prototype.hasOwnProperty,N=Object.prototype.hasOwnProperty;function F(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}F.prototype.clear=function(){this.__data__=J?J(null):{},this.size=0},F.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},F.prototype.get=function(t){var e=this.__data__;if(J){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return $.call(e,t)?e[t]:void 0},F.prototype.has=function(t){var e=this.__data__;return J?void 0!==e[t]:N.call(e,t)},F.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=J&&void 0===e?"__lodash_hash_undefined__":e,this};var U=F,P=function(t,e){for(var i=t.length;i--;)if((n=t[i][0])===(r=e)||n!=n&&r!=r)return i;var n,r;return-1},Q=Array.prototype.splice;function Y(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(t){var e=this.__data__,i=P(e,t);return!(i<0||(i==e.length-1?e.pop():Q.call(e,i,1),--this.size,0))},Y.prototype.get=function(t){var e=this.__data__,i=P(e,t);return i<0?void 0:e[i][1]},Y.prototype.has=function(t){return P(this.__data__,t)>-1},Y.prototype.set=function(t,e){var i=this.__data__,n=P(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this};var D=Y,H=M(y,"Map"),B=function(t,e){var i,n,r=t.__data__;return("string"==(n=typeof(i=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?r["string"==typeof e?"string":"hash"]:r.map};function K(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}K.prototype.clear=function(){this.size=0,this.__data__={hash:new U,map:new(H||D),string:new U}},K.prototype.delete=function(t){var e=B(this,t).delete(t);return this.size-=e?1:0,e},K.prototype.get=function(t){return B(this,t).get(t)},K.prototype.has=function(t){return B(this,t).has(t)},K.prototype.set=function(t,e){var i=B(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this};var z=K;function W(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function i(){var n=arguments,r=e?e.apply(this,n):n[0],o=i.cache;if(o.has(r))return o.get(r);var a=t.apply(this,n);return i.cache=o.set(r,a)||o,a};return i.cache=new(W.Cache||z),i}W.Cache=z;var X,G,V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tt=/\\(\\)?/g,et=(X=W(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(V,function(t,i,n,r){e.push(n?r.replace(tt,"$1"):i||t)}),e},function(t){return 500===G.size&&G.clear(),t}),G=X.cache,X),it=b?b.prototype:void 0,nt=it?it.toString:void 0,rt=function t(e){if("string"==typeof e)return e;if(g(e))return function(t,e){for(var i=-1,n=null==t?0:t.length,r=Array(n);++i<n;)r[i]=e(t[i],i,t);return r}(e,t)+"";if(O(e))return nt?nt.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i},ot=function(t,e){return g(t)?t:function(t,e){if(g(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!O(t))||L.test(t)||!S.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:et(function(t){return null==t?"":rt(t)}(t))},at=function(t){if("string"==typeof t||O(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},lt=function(t,e,i){var n=null==t?void 0:function(t,e){for(var i=0,n=(e=ot(e,t)).length;null!=t&&i<n;)t=t[at(e[i++])];return i&&i==n?t:void 0}(t,e);return void 0===n?i:n},st=a(5554),ct=a(5324),ut=a(1721),pt=a(6782),ft=a(1989),dt=function(){var t=function(t){n(a,t);var r=o(a);function a(t,e){var n;return i(this,a),(n=r.call(this))._config=t,n._ref=e,n._authService=ut.M.injector.get(st.e),n._fb=ut.M.injector.get(c.qu),n._authService.isLoggedIn$$.pipe((0,pt.R)(n.ngUnsubscribe$)).subscribe(function(t){t||n._ref.close()}),n}return e(a)}(ct.H);return t.\u0275fac=function(e){return new(e||t)(ft.Y36(h.S),ft.Y36(h.E7))},t.\u0275cmp=ft.Xpm({type:t,selectors:[["app-modal-base"]],features:[ft.qOj],decls:1,vars:0,template:function(t,e){1&t&&ft._uU(0,"no template")},encapsulation:2}),t}(),ht=a(3013),gt=a(900),vt=a(8497),_t=function(){var t=function(){function t(e){i(this,t),this._http=e}return e(t,[{key:"getTasks",value:function(){return this._http.get("".concat(gt.X.REST_API_URL,"/tasks/").concat(gt.X.TASKS_LIMIT))}},{key:"getTask",value:function(t){return this._http.get("".concat(gt.X.REST_API_URL,"/task/").concat(t))}},{key:"saveTask",value:function(t){return this._http.post("".concat(gt.X.REST_API_URL,"/task/").concat(t.id),t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ft.LFG(vt.eN))},t.\u0275prov=ft.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),yt=a(4656),bt=a(4207),mt=a(9309),kt=a(154),At=a(369),Tt=a(3928),wt=function(){var t=function(){function t(){i(this,t),this.relAttr="",this.targetAttr="",this.hrefAttr="",this.href=""}return e(t,[{key:"ngOnChanges",value:function(){this.hrefAttr=this.href,this.isLinkAbsolute()&&(this.relAttr="noopener noreferrer",this.targetAttr="_blank")}},{key:"isLinkAbsolute",value:function(){return this.href.includes("://")}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ft.lG2({type:t,selectors:[["","handleLink",""]],hostVars:3,hostBindings:function(t,e){2&t&&ft.uIk("rel",e.relAttr)("target",e.targetAttr)("href",e.hrefAttr,ft.P3R)},inputs:{href:"href"},features:[ft.TTD]}),t}(),xt=function(){var t=function(){function t(){i(this,t)}return e(t,[{key:"transform",value:function(t,e){return lt(t,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=ft.Yjl({name:"get",type:t,pure:!0}),t}();function Zt(t,e){if(1&t&&(ft.TgZ(0,"span",12),ft.ALo(1,"translate"),ft._UZ(2,"i",13),ft.TgZ(3,"span",14),ft._uU(4),ft.ALo(5,"date"),ft.qZA(),ft.qZA()),2&t){var i=ft.oxw();ft.Q6J("title",ft.lcZ(1,2,"TASK_MODAL.TIME_CREATED")),ft.xp6(4),ft.hij(" ",ft.xi3(5,4,null==i.task?null:i.task.timeCreated,"dd.MM.yyyy HH:mm:ss")," ")}}function Ot(t,e){if(1&t&&(ft.TgZ(0,"span",12),ft.ALo(1,"translate"),ft._UZ(2,"i",15),ft.TgZ(3,"span",14),ft._uU(4),ft.qZA(),ft.qZA()),2&t){var i=ft.oxw();ft.Q6J("title",ft.lcZ(1,2,"TASK_MODAL.ROLE")),ft.xp6(4),ft.hij(" ",null==i.task?null:i.task.role," ")}}function St(t,e){1&t&&ft._UZ(0,"i",21)}function Lt(t,e){1&t&&ft._UZ(0,"i",22)}function Et(t,e){if(1&t&&(ft.TgZ(0,"div",16),ft.ALo(1,"translate"),ft.TgZ(2,"span",17),ft._uU(3),ft.ALo(4,"translate"),ft.qZA(),ft.TgZ(5,"span",18),ft.YNc(6,St,1,0,"i",19),ft.YNc(7,Lt,1,0,"i",20),ft._uU(8),ft.qZA(),ft.qZA()),2&t){var i=ft.oxw();ft.Q6J("title",ft.lcZ(1,15,"TASK_MODAL.PRIORITY")),ft.xp6(3),ft.hij(" ",ft.lcZ(4,17,"TASK_MODAL.PRIORITY")," "),ft.xp6(2),ft.ekj("is-danger",i.task&&1===i.task.priority)("is-warning",i.task&&2===i.task.priority)("is-success",i.task&&3===i.task.priority)("is-primary",i.task&&4===i.task.priority)("is-info",i.task&&i.task.priority<4),ft.xp6(1),ft.Q6J("ngIf",(null==i.task?null:i.task.priority)<=3),ft.xp6(1),ft.Q6J("ngIf",(null==i.task?null:i.task.priority)>3),ft.xp6(1),ft.hij(" ",null==i.task?null:i.task.priority," ")}}function It(t,e){if(1&t&&(ft.TgZ(0,"div",3),ft._UZ(1,"markdown",23),ft.qZA()),2&t){var i=ft.oxw();ft.xp6(1),ft.Q6J("data",null==i.task?null:i.task.message)}}function Rt(t,e){if(1&t){var i=ft.EpF();ft.TgZ(0,"div",27),ft.TgZ(1,"label",28),ft._uU(2),ft.qZA(),ft.TgZ(3,"input",29),ft.NdJ("ngModelChange",function(t){ft.CHM(i);var e=ft.oxw().$implicit,n=ft.oxw();return(null==n.task?null:n.task.formFields)[e.key]=t}),ft.qZA(),ft.qZA()}if(2&t){var n=ft.oxw().$implicit,r=ft.oxw();ft.xp6(1),ft.Q6J("for",n.key),ft.xp6(1),ft.Oqu(n.key),ft.xp6(1),ft.Q6J("id",n.key)("ngModel",null==r.task?null:r.task.formFields[n.key])}}function qt(t,e){if(1&t&&(ft.TgZ(0,"div"),ft.TgZ(1,"label",30),ft._uU(2),ft.qZA(),ft.TgZ(3,"a",31),ft._uU(4),ft.qZA(),ft.qZA()),2&t){var i=ft.oxw().$implicit;ft.xp6(1),ft.Q6J("for",i.key),ft.xp6(1),ft.hij(" ",i.key,": "),ft.xp6(1),ft.Q6J("href",i.value,ft.LSH),ft.xp6(1),ft.Oqu(i.value)}}function jt(t,e){if(1&t&&(ft.TgZ(0,"div"),ft.TgZ(1,"label",28),ft._uU(2),ft.qZA(),ft.TgZ(3,"a",31),ft.TgZ(4,"div",32),ft._UZ(5,"img",33),ft.qZA(),ft.qZA(),ft.qZA()),2&t){var i=ft.oxw().$implicit;ft.xp6(1),ft.Q6J("for",i.key),ft.xp6(1),ft.hij(" ",i.key," "),ft.xp6(1),ft.Q6J("href",i.value,ft.LSH),ft.xp6(2),ft.Q6J("src",i.value,ft.LSH)}}var Ct=function(){return["link","img"]},Mt=function(){return["link"]},Jt=function(){return["img"]};function $t(t,e){if(1&t&&(ft.TgZ(0,"div",24),ft.YNc(1,Rt,4,4,"div",25),ft.ALo(2,"get"),ft.YNc(3,qt,5,4,"div",26),ft.ALo(4,"get"),ft.YNc(5,jt,6,4,"div",26),ft.ALo(6,"get"),ft.qZA()),2&t){var i=e.$implicit,n=ft.oxw();ft.Q6J("hidden","$$$Handler"===i.key),ft.xp6(1),ft.Q6J("ngIf",!ft.DdM(13,Ct).includes(ft.xi3(2,4,null==n.formFields?null:n.formFields.$$$Handler,i.key))),ft.xp6(2),ft.Q6J("ngIf",ft.DdM(14,Mt).includes(ft.xi3(4,7,null==n.formFields?null:n.formFields.$$$Handler,i.key))),ft.xp6(2),ft.Q6J("ngIf",ft.DdM(15,Jt).includes(ft.xi3(6,10,null==n.formFields?null:n.formFields.$$$Handler,i.key)))}}function Nt(t,e){if(1&t){var i=ft.EpF();ft.TgZ(0,"button",34),ft.NdJ("throttleClick",function(){var t=ft.CHM(i).$implicit;return ft.oxw().performAction(t)}),ft.qZA()}if(2&t){var n=e.$implicit,r=ft.oxw();ft.Q6J("disabled",r.loading)("label",n)}}var Ft=function(){var t=function(t){n(a,t);var r=o(a);function a(t,e,n,o,l,s){var c;return i(this,a),(c=r.call(this,t,l))._config=t,c._el=e,c._i18n=n,c._messageService=o,c._ref=l,c._worklistService=s,c.formFields=null,c.loading=!0,c.placeholder="assets/images/placeholder.jpg",c.task=null,c}return e(a,[{key:"ngOnInit",value:function(){var t=this;this.loading=!0,this._worklistService.getTask(this._config.data.id).subscribe(function(e){t.task=e,t.formFields=Object.assign({},e.formFields),t.loading=!1},function(e){var i=lt(e,"error.summary","");t._messageService.add({severity:"error",summary:t._i18n.instant("TASK_MODAL.LOADING_ERROR"),detail:i}),console.error(e),t.closeModal(),t.loading=!1})}},{key:"getBlockableElement",value:function(){return this._el.nativeElement.parentElement.parentElement}},{key:"performAction",value:function(t){var e=this;this.loading=!0;var i=Object.assign({},this.task);i.action=t,i.formFields&&i.formFields.$$$Handler&&(i.formFields.$$$Handler=JSON.stringify(i.formFields.$$$Handler)),this._worklistService.saveTask(i).subscribe(function(){setTimeout(function(){e._messageService.add("$Save"!==t?{severity:"success",summary:e._i18n.instant("TASK_MODAL.SUCCESS_MESSAGE"),detail:e._i18n.instant("TASK_MODAL.ACTION_COMPLETE",{action:t})}:{severity:"success",summary:e._i18n.instant("TASK_MODAL.SAVING_COMPLETE")}),e.closeModal(t),e.loading=!1},300)},function(t){var i=lt(t,"error.summary","");e._messageService.add({severity:"error",summary:e._i18n.instant("TASK_MODAL.SAVING_ERROR"),detail:i}),console.error(t),e.loading=!1})}},{key:"closeModal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this._ref.close(t)}}]),a}(dt);return t.\u0275fac=function(e){return new(e||t)(ft.Y36(h.S),ft.Y36(ft.SBq),ft.Y36(p.sK),ft.Y36(ht.ez),ft.Y36(h.E7),ft.Y36(_t))},t.\u0275cmp=ft.Xpm({type:t,selectors:[["app-task-modal"]],features:[ft.qOj],decls:16,vars:18,consts:[[3,"target","blocked"],[1,"pi","pi-spin","pi-spinner",2,"font-size","2rem"],[1,"columns","is-multiline","p-dialog-content",2,"max-height","60vh","overflow","auto","padding","0"],[1,"column","is-full"],["class","details-header","style","display: inline-block; margin-right: 32px",3,"title",4,"ngIf"],["style","display: inline-flex;","class","details-header tags has-addons",3,"title",4,"ngIf"],["class","column is-full",4,"ngIf"],["class","column is-full",3,"hidden",4,"ngFor","ngForOf"],[1,"p-dialog-footer",2,"padding","0","text-align","right"],["pButton","","pRipple","","style","margin-right: 8px","class","is-fullwidth-mobile",3,"disabled","label","throttleClick",4,"ngFor","ngForOf"],["pButton","","pRipple","","icon","pi pi-save",1,"button","is-success","is-fullwidth-mobile",2,"margin-right","8px",3,"disabled","label","throttleClick"],["pButton","","pRipple","","icon","pi pi-times",1,"p-button-secondary","is-fullwidth-mobile",3,"disabled","label","click"],[1,"details-header",2,"display","inline-block","margin-right","32px",3,"title"],[1,"pi","pi-clock",2,"font-weight","bold","vertical-align","middle","margin-right","4px"],[2,"font-size","13px","font-weight","600"],[1,"pi","pi-user",2,"font-weight","bold","vertical-align","middle","margin-right","4px"],[1,"details-header","tags","has-addons",2,"display","inline-flex",3,"title"],[1,"tag","is-light",2,"margin-bottom","0","font-size","12px"],[1,"tag",2,"margin-bottom","0","font-size","12px"],["class","pi pi-arrow-up","style","font-size: 9px; font-weight: bold; vertical-align: middle; margin-right: 4px",4,"ngIf"],["class","pi pi-arrow-down","style","font-size: 9px; font-weight: bold; vertical-align: middle; margin-right: 4px",4,"ngIf"],[1,"pi","pi-arrow-up",2,"font-size","9px","font-weight","bold","vertical-align","middle","margin-right","4px"],[1,"pi","pi-arrow-down",2,"font-size","9px","font-weight","bold","vertical-align","middle","margin-right","4px"],[1,"markdown-body",3,"data"],[1,"column","is-full",3,"hidden"],["class","field",4,"ngIf"],[4,"ngIf"],[1,"field"],[1,"label",3,"for"],["type","text","pInputText","",2,"width","100%",3,"id","ngModel","ngModelChange"],[1,"label",2,"display","inline",3,"for"],["handleLink","",3,"href"],[1,"img-placeholder"],[2,"height","100px",3,"src"],["pButton","","pRipple","",1,"is-fullwidth-mobile",2,"margin-right","8px",3,"disabled","label","throttleClick"]],template:function(t,e){1&t&&(ft.TgZ(0,"p-blockUI",0),ft._UZ(1,"i",1),ft.qZA(),ft.TgZ(2,"div",2),ft.TgZ(3,"div",3),ft.YNc(4,Zt,6,7,"span",4),ft.YNc(5,Ot,5,4,"span",4),ft.YNc(6,Et,9,19,"div",5),ft.qZA(),ft.YNc(7,It,2,1,"div",6),ft.YNc(8,$t,7,16,"div",7),ft.ALo(9,"keyvalue"),ft.qZA(),ft.TgZ(10,"div",8),ft.YNc(11,Nt,1,2,"button",9),ft.TgZ(12,"button",10),ft.NdJ("throttleClick",function(){return e.performAction("$Save")}),ft.ALo(13,"translate"),ft.qZA(),ft.TgZ(14,"button",11),ft.NdJ("click",function(){return e.closeModal()}),ft.ALo(15,"translate"),ft.qZA(),ft.qZA()),2&t&&(ft.Q6J("target",e)("blocked",e.loading),ft.xp6(4),ft.Q6J("ngIf",null==e.task?null:e.task.timeCreated),ft.xp6(1),ft.Q6J("ngIf",null==e.task?null:e.task.role),ft.xp6(1),ft.Q6J("ngIf",null==e.task?null:e.task.priority),ft.xp6(1),ft.Q6J("ngIf",null==e.task?null:e.task.message),ft.xp6(1),ft.Q6J("ngForOf",ft.lcZ(9,12,e.formFields)),ft.xp6(3),ft.Q6J("ngForOf",null==e.task||null==e.task.actions?null:e.task.actions.split(",")),ft.xp6(1),ft.Q6J("disabled",e.loading)("label",ft.lcZ(13,14,"TASK_MODAL.SAVE_BUTTON")),ft.xp6(2),ft.Q6J("disabled",e.loading)("label",ft.lcZ(15,16,"TASK_MODAL.CLOSE_BUTTON")))},directives:[yt.b,s.O5,s.sg,bt.Hq,mt.H,kt.j,At.lF,c.Fj,Tt.o,c.JJ,c.On,wt],pipes:[s.Nd,p.X$,s.uU,xt],styles:[".priority-top[_ngcontent-%COMP%]{color:#e54343}.priority-2nd[_ngcontent-%COMP%]{color:#e8912f}.priority-3rd[_ngcontent-%COMP%]{color:#f5da2c}.priority-4th[_ngcontent-%COMP%]{color:#268226}.priority-low[_ngcontent-%COMP%]{color:#2088cd}.img-placeholder[_ngcontent-%COMP%]{height:100px;background-repeat:no-repeat;background-size:contain;background-image:url(placeholder.26c5501417f0a21d2c61.gif)}.details-header[_ngcontent-%COMP%], .p-dialog-footer[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-bottom:8px}@media screen and (min-width: 769px){.details-header[_ngcontent-%COMP%], .p-dialog-footer[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-bottom:0}}"]}),t}(),Ut=a(7965),Pt=a(6052);function Qt(t,e){if(1&t){var i=ft.EpF();ft.TgZ(0,"div",6),ft._uU(1),ft.ALo(2,"translate"),ft.TgZ(3,"span",7),ft._UZ(4,"i",8),ft.TgZ(5,"input",9),ft.NdJ("input",function(t){return ft.CHM(i),ft.oxw(),ft.MAs(1).filterGlobal(t.target.value,"contains")}),ft.ALo(6,"translate"),ft.qZA(),ft.qZA(),ft.TgZ(7,"button",10),ft.NdJ("throttleClick",function(){return ft.CHM(i),ft.oxw().onRefresh()}),ft.ALo(8,"translate"),ft.qZA(),ft.qZA()}2&t&&(ft.xp6(1),ft.hij(" ",ft.lcZ(2,3,"WORKLIST.TABLE_TITLE")," "),ft.xp6(4),ft.Q6J("placeholder",ft.lcZ(6,5,"WORKLIST.SEARCH_PLACEHOLDER")),ft.xp6(2),ft.Q6J("label",ft.lcZ(8,7,"WORKLIST.REFRESH_BUTTON")))}function Yt(t,e){if(1&t&&ft._UZ(0,"p-sortIcon",16),2&t){var i=ft.oxw().$implicit;ft.Q6J("field",i.field)}}function Dt(t,e){if(1&t&&(ft.TgZ(0,"th",14),ft._uU(1),ft.YNc(2,Yt,1,1,"p-sortIcon",15),ft.qZA()),2&t){var i=e.$implicit;ft.Udp("width",i.width),ft.Q6J("pSortableColumn",i.isSortable?i.field:null),ft.xp6(1),ft.hij(" ",i.header," "),ft.xp6(1),ft.Q6J("ngIf",i.isSortable)}}function Ht(t,e){if(1&t&&(ft.TgZ(0,"tr"),ft.TgZ(1,"th",11),ft._uU(2,"#"),ft.qZA(),ft.YNc(3,Dt,3,5,"th",12),ft._UZ(4,"th",13),ft.qZA()),2&t){var i=ft.oxw();ft.xp6(3),ft.Q6J("ngForOf",i.cols)}}function Bt(t,e){1&t&&(ft.TgZ(0,"span",27),ft._uU(1,"New"),ft.qZA())}function Kt(t,e){if(1&t&&(ft.TgZ(0,"span"),ft.YNc(1,Bt,2,0,"span",26),ft.qZA()),2&t){var i=ft.oxw().$implicit,n=ft.oxw().$implicit;ft.xp6(1),ft.Q6J("ngIf",n[i.field])}}function zt(t,e){if(1&t&&(ft.TgZ(0,"span"),ft._uU(1),ft.ALo(2,"date"),ft.qZA()),2&t){var i=ft.oxw().$implicit,n=ft.oxw().$implicit;ft.xp6(1),ft.hij(" ",ft.xi3(2,1,n[i.field],"dd.MM.yyyy HH:mm:ss")," ")}}function Wt(t,e){if(1&t&&(ft.TgZ(0,"span"),ft._uU(1),ft.qZA()),2&t){var i=ft.oxw().$implicit,n=ft.oxw().$implicit;ft.xp6(1),ft.hij(" ",n[i.field]," ")}}function Xt(t,e){if(1&t&&(ft.TgZ(0,"td",23),ft.YNc(1,Kt,2,1,"span",24),ft.YNc(2,zt,3,4,"span",24),ft.YNc(3,Wt,2,1,"span",25),ft.qZA()),2&t){var i=e.$implicit;ft.Udp("width",i.width)("text-align",i.align),ft.ekj("tagged-cell","isNew"===i.field),ft.Q6J("ngSwitch",i.field),ft.xp6(1),ft.Q6J("ngSwitchCase","isNew"),ft.xp6(1),ft.Q6J("ngSwitchCase","timeCreated")}}function Gt(t,e){if(1&t){var i=ft.EpF();ft.TgZ(0,"button",28),ft.NdJ("click",function(){ft.CHM(i);var t=ft.oxw().$implicit;return ft.oxw().onAccept(t)}),ft.ALo(1,"translate"),ft.qZA()}2&t&&ft.Q6J("title",ft.lcZ(1,1,"WORKLIST.ACCEPT_BUTTON"))}function Vt(t,e){if(1&t){var i=ft.EpF();ft.TgZ(0,"button",29),ft.NdJ("click",function(){ft.CHM(i);var t=ft.oxw().$implicit;return ft.oxw().onDetails(t)}),ft.ALo(1,"translate"),ft.qZA()}2&t&&ft.Q6J("title",ft.lcZ(1,1,"WORKLIST.DETAILS_BUTTON"))}function te(t,e){if(1&t){var i=ft.EpF();ft.TgZ(0,"button",30),ft.NdJ("click",function(){ft.CHM(i);var t=ft.oxw().$implicit;return ft.oxw().onRelinquish(t)}),ft.ALo(1,"translate"),ft._UZ(2,"i",31),ft.qZA()}2&t&&ft.Q6J("title",ft.lcZ(1,1,"WORKLIST.RELINQUISH_BUTTON"))}function ee(t,e){if(1&t&&(ft.TgZ(0,"tr"),ft.TgZ(1,"td",17),ft._uU(2),ft.qZA(),ft.YNc(3,Xt,4,9,"td",18),ft.TgZ(4,"td",19),ft.YNc(5,Gt,2,3,"button",20),ft.YNc(6,Vt,2,3,"button",21),ft.YNc(7,te,3,3,"button",22),ft.qZA(),ft.qZA()),2&t){var i=e.$implicit,n=e.rowIndex,r=ft.oxw();ft.xp6(2),ft.Oqu(n+1),ft.xp6(1),ft.Q6J("ngForOf",r.cols),ft.xp6(2),ft.Q6J("ngIf",i.isNew),ft.xp6(1),ft.Q6J("ngIf",!i.isNew),ft.xp6(1),ft.Q6J("ngIf",!i.isNew)}}function ie(t,e){if(1&t&&(ft.TgZ(0,"div",32),ft._uU(1),ft.ALo(2,"translate"),ft.qZA()),2&t){ft.oxw();var i=ft.MAs(1);ft.xp6(1),ft.AsE("",ft.lcZ(2,2,"WORKLIST.TOTAL"),": ",i.totalRecords,"")}}var ne,re,oe=function(){return[10,25,50,100]},ae=function(){return{minWidth:"1024px",width:"100%"}},le=function(){var t=function(){function t(e){i(this,t),this._i18n=e,this.items=[],this.loading=!1,this.accept=new ft.vpe,this.details=new ft.vpe,this.refresh=new ft.vpe,this.relinquish=new ft.vpe,this.cols=[{field:"isNew",header:"",width:"60px",align:"center",isSortable:!0},{field:"priority",header:this._i18n.instant("WORKLIST.TABLE_HEADERS.PRIORITY"),width:"130px",align:"right",isSortable:!0},{field:"subject",header:this._i18n.instant("WORKLIST.TABLE_HEADERS.SUBJECT"),isSortable:!0},{field:"message",header:this._i18n.instant("WORKLIST.TABLE_HEADERS.MESSAGE"),isSortable:!0},{field:"role",header:this._i18n.instant("WORKLIST.TABLE_HEADERS.ROLE"),isSortable:!0},{field:"timeCreated",header:this._i18n.instant("WORKLIST.TABLE_HEADERS.TIME_CREATED"),width:"160px",align:"center",isSortable:!0}],this.filterCols=["priority","subject","message","role","timeCreated"]}return e(t,[{key:"onAccept",value:function(t){this.accept.emit(t)}},{key:"onRelinquish",value:function(t){this.relinquish.emit(t)}},{key:"onDetails",value:function(t){this.details.emit(t)}},{key:"onRefresh",value:function(){this.refresh.emit()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(ft.Y36(p.sK))},t.\u0275cmp=ft.Xpm({type:t,selectors:[["app-tasks-table"]],inputs:{items:"items",loading:"loading"},outputs:{accept:"accept",details:"details",refresh:"refresh",relinquish:"relinquish"},decls:6,vars:11,consts:[["dataKey","id","sortField","timeCreated","styleClass","p-datatable-sm p-datatable-gridlines",3,"loading","globalFilterFields","paginator","rows","rowsPerPageOptions","value","sortOrder","tableStyle","responsiveLayout"],["table",""],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","paginatorleft"],[1,"table-header"],[1,"p-input-icon-left",2,"margin-left","16px","width","40%"],[1,"pi","pi-search"],["pInputText","","type","text",2,"width","100%",3,"placeholder","input"],["pButton","","pRipple","","icon","pi pi-refresh",1,"is-pulled-right","no-label-mobile",3,"label","throttleClick"],[2,"width","60px"],[3,"width","pSortableColumn",4,"ngFor","ngForOf"],[2,"width","85px"],[3,"pSortableColumn"],[3,"field",4,"ngIf"],[3,"field"],[2,"width","60px","text-align","right"],[3,"width","text-align","tagged-cell","ngSwitch",4,"ngFor","ngForOf"],[1,"button-cell",2,"width","85px","vertical-align","middle"],["type","button","pButton","","pRipple","","icon","pi pi-check","iconPos","left","class","button is-success",3,"title","click",4,"ngIf"],["type","button","pButton","","pRipple","","icon","pi pi-search","iconPos","left","style","margin-right: 8px",3,"title","click",4,"ngIf"],["type","button","pButton","","pRipple","","icon","pi pi-minus-circle","iconPos","left","class","p-button-danger",3,"title","click",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","tag is-info is-light",4,"ngIf"],[1,"tag","is-info","is-light"],["type","button","pButton","","pRipple","","icon","pi pi-check","iconPos","left",1,"button","is-success",3,"title","click"],["type","button","pButton","","pRipple","","icon","pi pi-search","iconPos","left",2,"margin-right","8px",3,"title","click"],["type","button","pButton","","pRipple","","icon","pi pi-minus-circle","iconPos","left",1,"p-button-danger",3,"title","click"],[1,"fa","fa-copy"],[1,"total"]],template:function(t,e){1&t&&(ft.TgZ(0,"p-table",0,1),ft.YNc(2,Qt,9,9,"ng-template",2),ft.YNc(3,Ht,5,1,"ng-template",3),ft.YNc(4,ee,8,5,"ng-template",4),ft.YNc(5,ie,3,4,"ng-template",5),ft.qZA()),2&t&&ft.Q6J("loading",e.loading)("globalFilterFields",e.filterCols)("paginator",!0)("rows",25)("rowsPerPageOptions",ft.DdM(9,oe))("value",e.items)("sortOrder",-1)("tableStyle",ft.DdM(10,ae))("responsiveLayout","scroll")},directives:[Pt.iA,ht.jx,Tt.o,bt.Hq,mt.H,kt.j,s.sg,Pt.lQ,s.O5,Pt.fz,s.RF,s.n9,s.ED],pipes:[p.X$,s.uU],styles:[".p-datatable-scrollable-header-box{padding-right:unset!important}  .p-datatable-virtual-scrollable-body{overflow-y:overlay}"],changeDetection:0}),t}(),se=[{path:"",pathMatch:"full",component:(ne=function(){function t(e,n,r){i(this,t),this._dialogService=e,this._i18n=n,this._worklistService=r,this.loading=!0,this.tasks=[]}return e(t,[{key:"ngOnInit",value:function(){this.loadTasks()}},{key:"loadTasks",value:function(){var t=this;this.loading=!0,this._worklistService.getTasks().subscribe(function(e){t.tasks=e,t.loading=!1},function(){t.tasks=[],t.loading=!1})}},{key:"acceptTask",value:function(t){var e=this;t=Object.assign(Object.assign({},t),{action:"$Accept",formFields:{}}),this._worklistService.saveTask(t).subscribe(function(){return e.loadTasks()})}},{key:"relinquishTask",value:function(t){var e=this;t=Object.assign(Object.assign({},t),{action:"$Relinquish",formFields:{}}),this._worklistService.saveTask(t).subscribe(function(){return e.loadTasks()})}},{key:"showTaskDetails",value:function(t){var e=this;this._dialogService.open(Ft,{contentStyle:{overflow:"hidden"},data:{id:t.id},header:t.subject||this._i18n.instant("TASK_MODAL.TITLE"),dismissableMask:!1,transitionOptions:"350ms cubic-bezier(0.25, 0.8, 0.25, 1)",modal:!0,style:{"max-width":"1200px"},styleClass:"details-modal"}).onClose.subscribe(function(t){return t?e.loadTasks():null})}}]),t}(),ne.\u0275fac=function(t){return new(t||ne)(ft.Y36(h.xA),ft.Y36(p.sK),ft.Y36(_t))},ne.\u0275cmp=ft.Xpm({type:ne,selectors:[["app-worklist-container"]],features:[ft._Bn([h.xA])],decls:5,vars:2,consts:[[1,"hero","fullheight-with-navbar","main-bg"],["position","top-right"],[1,"container","is-fluid",2,"padding-top","32px","padding-bottom","32px"],[1,"card","border-rounded",2,"padding","16px","overflow","auto"],[3,"loading","items","refresh","accept","relinquish","details"]],template:function(t,e){1&t&&(ft.TgZ(0,"div",0),ft._UZ(1,"p-toast",1),ft.TgZ(2,"div",2),ft.TgZ(3,"div",3),ft.TgZ(4,"app-tasks-table",4),ft.NdJ("refresh",function(){return e.loadTasks()})("accept",function(t){return e.acceptTask(t)})("relinquish",function(t){return e.relinquishTask(t)})("details",function(t){return e.showTaskDetails(t)}),ft.qZA(),ft.qZA(),ft.qZA(),ft.qZA()),2&t&&(ft.xp6(4),ft.Q6J("loading",e.loading)("items",e.tasks))},directives:[Ut.FN,le],styles:[""]}),ne)}],ce=function(){var t=e(function t(){i(this,t)});return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ft.oAB({type:t}),t.\u0275inj=ft.cJS({imports:[[d.Bz.forChild(se)],d.Bz]}),t}(),ue=((re=e(function t(){i(this,t)})).\u0275fac=function(t){return new(t||re)},re.\u0275mod=ft.oAB({type:re}),re.\u0275inj=ft.cJS({imports:[[s.ez,c.u5,c.UX,u.m,p.aw,f.I,ce]]}),re)}}])}();