@enablerr-ui/task 0.2.70 → 0.2.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,l,a,i,c,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,r=t.currentRoles,s=t.settings,l=t.Page},function(t){a=t.Form},function(t){i=t.Workflow},function(t){c=t.Report},function(t){u=t.Collaboration}],execute:function(){t("version","0.2.70");function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f,m,$=(f=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==s(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},l),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:a.bind(null,e,n),mount:i.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function i(t,e,n){var r=Object.keys(l),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),l=r();e.instance=new t.component(o(o({},s),{},{target:l,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},f(m={exports:{}},m.exports),m.exports),p=d($);function v(){}function g(t){return t()}function h(){return Object.create(null)}function w(t){t.forEach(g)}function k(t){return"function"==typeof t}function b(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function y(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return v;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function x(t,e){t.appendChild(e)}function I(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function S(t){return document.createTextNode(t)}function O(){return S(" ")}function j(){return S("")}function P(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function T(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let N;function D(t){N=t}function z(){if(!N)throw new Error("Function called outside component initialization");return N}const M=[],W=[],A=[],F=[],q=Promise.resolve();let V=!1;function G(){V||(V=!0,q.then(H))}function R(t){A.push(t)}function Y(t){F.push(t)}let J=!1;const L=new Set;function H(){if(!J){J=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];D(e),K(e.$$)}for(D(null),M.length=0;W.length;)W.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];L.has(e)||(L.add(e),e())}A.length=0}while(M.length);for(;F.length;)F.pop()();V=!1,J=!1,L.clear()}}function K(t){if(null!==t.fragment){t.update(),w(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const Q=new Set;let U;function X(){U={r:0,c:[],p:U}}function Z(){U.r||w(U.c),U=U.p}function tt(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function et(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),U&&U.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function rt(t){t&&t.c()}function st(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:a}=t.$$;r&&r.m(e,n),o||R((()=>{const e=s.map(g).filter(k);l?l.push(...e):w(e),t.$$.on_mount=[]})),a.forEach(R)}function lt(t,e){const n=t.$$;null!==n.fragment&&(w(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function at(t,e,n,o,r,s,l=[-1]){const a=N;D(t);const i=t.$$={fragment:null,ctx:null,props:s,update:v,not_equal:r,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:h(),dirty:l,skip_bound:!1};let c=!1;if(i.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return i.ctx&&r(i.ctx[e],i.ctx[e]=s)&&(!i.skip_bound&&i.bound[e]&&i.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(M.push(t),G(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],i.update(),c=!0,w(i.before_update),i.fragment=!!o&&o(i.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);i.fragment&&i.fragment.l(t),t.forEach(E)}else i.fragment&&i.fragment.c();e.intro&&tt(t.$$.fragment),st(t,e.target,e.anchor,e.customElement),H()}D(a)}class it{$destroy(){lt(this,1),this.$destroy=v}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function ct(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ut(t){let e,n,o,r,s,l,i,c,u,d,f,m,$,p,v,g,h,w,k,b,y,C,j,N,D,z,M,W,A=t[1].status+"",F=(t[1].task?.workflow?.status||"")+"";return D=new t[5]({props:{class:"divider"}}),M=new a({props:{schema:t[20],recID:t[2],prevEventID:t[3],taskId:t[0],prev:t[4],readonly:t[7],root:"true"}}),M.$on("back",t[8]),{c(){e=_("div"),n=_("table"),o=_("th"),r=O(),s=_("th"),l=O(),i=_("tr"),c=_("td"),c.innerHTML="<div>Beschreibung:</div>",u=O(),d=_("td"),f=_("textarea"),m=O(),$=_("tr"),p=_("td"),p.textContent="Task-Status:",v=O(),g=_("td"),h=S(A),w=O(),k=_("tr"),b=_("td"),b.textContent="Workflow-Status:",y=O(),C=_("td"),j=S(F),N=O(),rt(D.$$.fragment),z=O(),rt(M.$$.fragment),T(o,"width","20%"),T(s,"width","80%"),P(c,"class","svelte-1wwh1vl"),P(f,"rows","5"),f.readOnly=!0,f.value=t[20].identity.description,P(f,"class","svelte-1wwh1vl"),P(d,"class","svelte-1wwh1vl"),P(i,"class","svelte-1wwh1vl"),P(p,"class","svelte-1wwh1vl"),P(g,"class","svelte-1wwh1vl"),P($,"class","svelte-1wwh1vl"),P(b,"class","svelte-1wwh1vl"),P(C,"class","svelte-1wwh1vl"),P(k,"class","svelte-1wwh1vl"),P(e,"class","subcat svelte-1wwh1vl")},m(t,a){I(t,e,a),x(e,n),x(n,o),x(n,r),x(n,s),x(n,l),x(n,i),x(i,c),x(i,u),x(i,d),x(d,f),x(n,m),x(n,$),x($,p),x($,v),x($,g),x(g,h),x(n,w),x(n,k),x(k,b),x(k,y),x(k,C),x(C,j),I(t,N,a),st(D,t,a),I(t,z,a),st(M,t,a),W=!0},p(t,e){(!W||2&e)&&A!==(A=t[1].status+"")&&B(h,A),(!W||2&e)&&F!==(F=(t[1].task?.workflow?.status||"")+"")&&B(j,F);const n={};4&e&&(n.recID=t[2]),8&e&&(n.prevEventID=t[3]),1&e&&(n.taskId=t[0]),16&e&&(n.prev=t[4]),M.$set(n)},i(t){W||(tt(D.$$.fragment,t),tt(M.$$.fragment,t),W=!0)},o(t){et(D.$$.fragment,t),et(M.$$.fragment,t),W=!1},d(t){t&&E(e),t&&E(N),lt(D,t),t&&E(z),lt(M,t)}}}function dt(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ft(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:dt,then:ut,catch:ct,value:20,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let l=e.ctx;void 0!==r&&(l=l.slice(),l[r]=s);const a=t&&(e.current=t)(l);let i=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(X(),et(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),Z())})):e.block.d(1),a.c(),tt(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&H()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=z();if(t.then((t=>{D(n),o(e.then,1,e.value,t),D(null)}),(t=>{if(D(n),o(e.catch,2,e.error,t),D(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}(t[6],o),{c(){e=j(),o.block.c()},m(t,r){I(t,e,r),o.block.m(t,o.anchor=r),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(o,t=e,n)},i(t){n||(tt(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){et(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function mt(t,r,s){const{Card:l,Table:a,Button:i,Modal:c,Tabs:u,Divider:d,FormField:f,TextField:m}=e;let{task:$}=r,{taskId:p}=r,{eventItem:v}=r,{followerEventId:g}=r;const h=$,w=v,k=n.getSchema(g||w._id),b=h.task?.readonly;let y,x,I=h.docId||h.id;g&&(x=I,I=void 0,y=w._id),o.subscribe((async t=>{t&&t.taskId===p&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{s(1,h.status=t.status,h),s(1,h.readonly=t.readonly,h)}))}));return t.$$set=t=>{"task"in t&&s(9,$=t.task),"taskId"in t&&s(0,p=t.taskId),"eventItem"in t&&s(10,v=t.eventItem),"followerEventId"in t&&s(11,g=t.followerEventId)},[p,h,I,y,x,d,k,b,()=>window.singleSpaNavigate("/"),$,v,g]}class $t extends it{constructor(t){var e;super(),document.getElementById("svelte-1wwh1vl-style")||((e=_("style")).id="svelte-1wwh1vl-style",e.textContent=".subcat.svelte-1wwh1vl.svelte-1wwh1vl{margin-bottom:0.5em}.subcat.svelte-1wwh1vl table td.svelte-1wwh1vl{padding-bottom:0.5em}.subcat.svelte-1wwh1vl table tr.svelte-1wwh1vl{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-1wwh1vl>td.svelte-1wwh1vl{padding:0}textarea.svelte-1wwh1vl.svelte-1wwh1vl{font-family:inherit;font-size:inherit;width:100%;border:none;resize:none;min-height:2em;line-height:1.25em}",x(document.head,e)),at(this,t,mt,ft,b,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function pt(t){let e,n,o,r,s;return{c(){e=C("svg"),n=C("path"),o=C("line"),r=C("line"),P(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),P(o,"x1","12"),P(o,"y1","9"),P(o,"x2","12"),P(o,"y2","13"),P(r,"x1","12"),P(r,"y1","17"),P(r,"x2","12.01"),P(r,"y2","17"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"width",t[0]),P(e,"height",t[0]),P(e,"fill","none"),P(e,"viewBox","0 0 24 24"),P(e,"stroke","currentColor"),P(e,"stroke-width",t[1]),P(e,"stroke-linecap","round"),P(e,"stroke-linejoin","round"),P(e,"class",s="feather feather-alert-triangle "+t[2])},m(t,s){I(t,e,s),x(e,n),x(e,o),x(e,r)},p(t,[n]){1&n&&P(e,"width",t[0]),1&n&&P(e,"height",t[0]),2&n&&P(e,"stroke-width",t[1]),4&n&&s!==(s="feather feather-alert-triangle "+t[2])&&P(e,"class",s)},i:v,o:v,d(t){t&&E(e)}}}function vt(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class gt extends it{constructor(t){super(),at(this,t,vt,pt,b,{size:0,strokeWidth:1,class:2})}}function ht(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[0].visum?.role||t[2]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};5&n&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function wt(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[6]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.value=t[6]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function kt(t){let e,n,o;return e=new t[12]({props:{noCalendar:!0,readonly:!0,value:t[5]}}),n=new t[13]({props:{readonly:!0,value:t[5]}}),{c(){rt(e.$$.fragment),rt(n.$$.fragment)},m(t,r){st(e,t,r),st(n,t,r),o=!0},p(t,o){const r={};32&o&&(r.value=t[5]),e.$set(r);const s={};32&o&&(s.value=t[5]),n.$set(s)},i(t){o||(tt(e.$$.fragment,t),tt(n.$$.fragment,t),o=!0)},o(t){et(e.$$.fragment,t),et(n.$$.fragment,t),o=!1},d(t){lt(e,t),lt(n,t)}}}function bt(t){let e,n,o=t[0].visum&&kt(t);return{c(){o&&o.c(),e=j()},m(t,r){o&&o.m(t,r),I(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n&&tt(o,1)):(o=kt(t),o.c(),tt(o,1),o.m(e.parentNode,e)):o&&(X(),et(o,1,1,(()=>{o=null})),Z())},i(t){n||(tt(o),n=!0)},o(t){et(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function yt(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[It]},$$scope:{ctx:t}}}),e.$on("click",t[15]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.disabled=t[1]),134217856&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function xt(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Et]},$$scope:{ctx:t}}}),e.$on("click",t[16]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function It(t){let e;return{c(){e=S(t[7])},m(t,n){I(t,e,n)},p(t,n){128&n&&B(e,t[7])},d(t){t&&E(e)}}}function Et(t){let e;return{c(){e=S("Visum zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function _t(t){let e;return{c(){e=S("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Ct(t){let e,n,o,r;return o=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[_t]},$$scope:{ctx:t}}}),o.$on("click",t[17]),{c(){e=_("p"),e.textContent="Wollen Sie die Aufgabe visieren?",n=O(),rt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),st(o,t,s),r=!0},p(t,e){const n={};134217728&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(tt(o.$$.fragment,t),r=!0)},o(t){et(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),lt(o,t)}}}function St(t){let e,n,o;return n=new gt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),P(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:v,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function Ot(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[26],danger:!0,$$slots:{"title-icon":[St],default:[Ct]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};67108864&n&&(o.closeCallback=t[26]),134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function jt(t){let e;return{c(){e=S("Ja, bitte zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e,n,o,r;return o=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[jt]},$$scope:{ctx:t}}}),o.$on("click",t[18]),{c(){e=_("p"),e.textContent="Wollen Sie das Visum zurücknehmen?",n=O(),rt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),st(o,t,s),r=!0},p(t,e){const n={};134217728&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(tt(o.$$.fragment,t),r=!0)},o(t){et(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),lt(o,t)}}}function Bt(t){let e,n,o;return n=new gt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),P(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:v,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function Tt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[26],danger:!0,$$slots:{"title-icon":[Bt],default:[Pt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};67108864&n&&(o.closeCallback=t[26]),134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Nt(t){let e,n,o,r,s,l,a,i,c,u,d,f,m,$,p,v,g,h;r=new t[10]({props:{name:"Rolle",$$slots:{default:[ht]},$$scope:{ctx:t}}}),l=new t[10]({props:{name:"visiert von",$$slots:{default:[wt]},$$scope:{ctx:t}}}),i=new t[10]({props:{name:"visiert am",$$slots:{default:[bt]},$$scope:{ctx:t}}});const w=[xt,yt],k=[];function b(t,e){return t[0].visum&&"Ready"===t[0].status?0:1}function y(e){t[24](e)}u=b(t),d=k[u]=w[u](t);let C={$$slots:{default:[Ot,({closeCallback:t})=>({26:t}),({closeCallback:t})=>t?67108864:0]},$$scope:{ctx:t}};function S(e){t[25](e)}void 0!==t[3]&&(C.open=t[3]),m=new t[8]({props:C}),W.push((()=>ot(m,"open",y)));let j={$$slots:{default:[Tt,({closeCallback:t})=>({26:t}),({closeCallback:t})=>t?67108864:0]},$$scope:{ctx:t}};return void 0!==t[4]&&(j.open=t[4]),v=new t[8]({props:j}),W.push((()=>ot(v,"open",S))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=O(),o=_("div"),rt(r.$$.fragment),s=O(),rt(l.$$.fragment),a=O(),rt(i.$$.fragment),c=O(),d.c(),f=O(),rt(m.$$.fragment),p=O(),rt(v.$$.fragment),P(o,"class","visum")},m(t,d){I(t,e,d),I(t,n,d),I(t,o,d),st(r,o,null),x(o,s),st(l,o,null),x(o,a),st(i,o,null),x(o,c),k[u].m(o,null),I(t,f,d),st(m,t,d),I(t,p,d),st(v,t,d),h=!0},p(t,[e]){const n={};134217733&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};134217792&e&&(s.$$scope={dirty:e,ctx:t}),l.$set(s);const a={};134217761&e&&(a.$$scope={dirty:e,ctx:t}),i.$set(a);let c=u;u=b(t),u===c?k[u].p(t,e):(X(),et(k[c],1,1,(()=>{k[c]=null})),Z(),d=k[u],d?d.p(t,e):(d=k[u]=w[u](t),d.c()),tt(d,1),d.m(o,null));const f={};201326592&e&&(f.$$scope={dirty:e,ctx:t}),!$&&8&e&&($=!0,f.open=t[3],Y((()=>$=!1))),m.$set(f);const p={};201326592&e&&(p.$$scope={dirty:e,ctx:t}),!g&&16&e&&(g=!0,p.open=t[4],Y((()=>g=!1))),v.$set(p)},i(t){h||(tt(r.$$.fragment,t),tt(l.$$.fragment,t),tt(i.$$.fragment,t),tt(d),tt(m.$$.fragment,t),tt(v.$$.fragment,t),h=!0)},o(t){et(r.$$.fragment,t),et(l.$$.fragment,t),et(i.$$.fragment,t),et(d),et(m.$$.fragment,t),et(v.$$.fragment,t),h=!1},d(t){t&&E(e),t&&E(n),t&&E(o),lt(r),lt(l),lt(i),k[u].d(),t&&E(f),lt(m,t),t&&E(p),lt(v,t)}}}function Dt(t,l,a){let i,c;y(t,r,(t=>a(22,i=t))),y(t,s,(t=>a(23,c=t)));const{Modal:u,Dialog:d,FormField:f,TextField:m,DatePicker:$,TimePicker:p,Button:v}=e;let g,h,w,k,b,x,{task:I}=l,{taskId:E}=l,{eventItem:_}=l,C=!1,S=!1;return o.subscribe((t=>{t&&t.taskId===E&&a(0,I.visum=t.data,I)})),t.$$set=t=>{"task"in t&&a(0,I=t.task),"taskId"in t&&a(19,E=t.taskId),"eventItem"in t&&a(20,_=t.eventItem)},t.$$.update=()=>{15728647&t.$$.dirty&&(a(5,h=new Date(I.visum?.timeStamp)),a(7,k=I.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),a(21,b=!I.visum),a(21,b=b&&!!_.output?.approval?.length),b&&i&&(a(2,x=_.output.approval.flatMap((({refRole:t})=>t))),a(21,b=x.some((t=>i.some((e=>t===e)))))),a(1,g=!b),a(6,w=I.visum?.user||(g?"":c.email)))},[I,g,x,C,S,h,w,k,u,d,f,m,$,p,v,()=>{a(3,C=!0)},()=>{a(4,S=!0)},()=>{a(3,C=!1);const t={eventId:_._id,eventDesignation:_.identity.designation,docId:I.docId,role:x.filter((t=>i.find((e=>e===t)))).join(", "),user:c.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(I._id,t),a(0,I.visum=t,I)},()=>{a(4,S=!1),n.deleteTaskVisum(I._id,_._id),a(0,I.visum=!1,I)},E,_,b,i,c,function(t){C=t,a(3,C)},function(t){S=t,a(4,S)}]}class zt extends it{constructor(t){var e;super(),document.getElementById("svelte-b9m9m8-style")||((e=_("style")).id="svelte-b9m9m8-style",e.textContent=".visum .time-picker .dropdown{display:none !important}",x(document.head,e)),at(this,t,Dt,Nt,b,{task:0,taskId:19,eventItem:20})}}const{document:Mt}=nt;function Wt(t){let e,n,o,r,s,l,a,i,c=t[7](t[25],!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){k(t[6](t[28],t[21],t[20],t[26]))&&t[6](t[28],t[21],t[20],t[26]).apply(this,arguments)}));var u=t[24].component;function d(t){return{props:{taskId:t[21],task:t[27],eventItem:t[25],followerEventId:t[26]}}}return u&&(a=new u(d(t)),a.$on("back",t[8])),{c(){e=_("div"),rt(n.$$.fragment),o=O(),r=S(c),s=O(),l=_("div"),a&&rt(a.$$.fragment),P(e,"class","task--header svelte-ak8kus"),P(l,"class","task--content svelte-ak8kus")},m(t,c){I(t,e,c),st(n,e,null),x(e,o),x(e,r),I(t,s,c),I(t,l,c),a&&st(a,l,null),i=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!i||101711873&o)&&c!==(c=t[7](t[25],!!t[26]||t[0]===t[20])+"")&&B(r,c);const f={};if(2097152&o&&(f.taskId=t[21]),134217728&o&&(f.task=t[27]),33554432&o&&(f.eventItem=t[25]),67108864&o&&(f.followerEventId=t[26]),u!==(u=t[24].component)){if(a){X();const t=a;et(t.$$.fragment,1,0,(()=>{lt(t,1)})),Z()}u?(a=new u(d(t)),a.$on("back",t[8]),rt(a.$$.fragment),tt(a.$$.fragment,1),st(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(tt(n.$$.fragment,t),a&&tt(a.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),a&&et(a.$$.fragment,t),i=!1},d(t){t&&E(e),lt(n),t&&E(s),t&&E(l),a&<(a)}}}function At(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[Wt]},$$scope:{ctx:t}}}),{c(){e=_("div"),rt(n.$$.fragment),P(e,"class","task svelte-ak8kus")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title=t[19]),1605369857&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function Ft(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[At,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=_("div"),rt(n.$$.fragment),P(e,"class","task--page svelte-ak8kus")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function qt(t){let e,n,o;return n=new l({props:{update:t[4],$$slots:{default:[Ft,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:a,task:i,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:l,26:a,27:i,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=O(),rt(n.$$.fragment),Mt.title="enablerr - Task"},m(t,r){I(t,e,r),st(n,t,r),o=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n,t)}}}function Vt(t,o,r){const{Modal:s,Dialog:l,Tabs:a}=e;let d,f,m,$,p,v;const g={items:[{id:"task",name:"Aufgabe",component:$t},{id:"visum",name:"Visum",component:zt},{id:"collab",name:"Kommunikation",component:u},{id:"workflow",name:"Workflow",component:i},{id:"report",name:"Anhänge",component:c}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},h=()=>{scrollY=window.scrollY,$=document.body.style.position,p=document.body.style.overflow,v=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};h();const w=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){z().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[m,s,l,a,async(t,e,o,s)=>{const l=g.findById(o);if(!l)return w(t,e,g.deflt());"task"!==o&&(s=void 0),r(0,m=e);let a={status:"New"};const i=await n.getEvent(t);i||window.singleSpaNavigate("/error");let c=i.identity.designation;if(s){const t=await n.getEvent(s);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(d===e?a=f:(d=e,f=a=await n.getTaskById(e)),a||window.singleSpaNavigate("/error"),a.event!==i._id.toString()&&window.singleSpaNavigate("/error")):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:i,followerEventId:s,task:a,items:g.map(),findMenu:t=>g.findByName(t)}},function(t){t.detail.value?h():(document.body.style.position=$||"",document.body.style.top="",document.body.style.overflow=p||"",document.body.style.width=v||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||w(n,e,t(r))},(t,e)=>{let n=!t.output?.approval;return(G(),q).then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)}))})),""},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>window.singleSpaNavigate("/")]}class Gt extends it{constructor(t){var e;super(),Mt.getElementById("svelte-ak8kus-style")||((e=_("style")).id="svelte-ak8kus-style",e.textContent='.task--page.svelte-ak8kus .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-ak8kus{margin-top:4em}@media(max-height: 900px){.task.svelte-ak8kus{margin-top:0}}.task.svelte-ak8kus .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-ak8kus .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-ak8kus{margin-top:0.5em}.task--header.svelte-ak8kus .task_tabs{margin-bottom:1em}.task--content.svelte-ak8kus{margin-top:1em;overflow-x:hidden;overflow-y:auto;height:fit-content;min-height:60vh}',x(Mt.head,e)),at(this,t,Vt,qt,b,{})}}const Rt=p({component:Gt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Yt,mount:Jt,unmount:Lt}=Rt;t({bootstrap:Yt,mount:Jt,unmount:Lt});t("Task",Gt)}}}));
|
|
1
|
+
System.register(["@enablerr-ui/layout","@enablerr-ui/form","@enablerr-ui/detail","@enablerr-ui/workflow","@enablerr-ui/report","@enablerr-ui/collab"],(function(t){"use strict";var e,n,o,r,s,l,a,i,c,u;return{setters:[function(t){e=t.getAttractions},function(t){n=t.Request,o=t.approval_notification,r=t.currentRoles,s=t.settings,l=t.Page},function(t){a=t.Form},function(t){i=t.Workflow},function(t){c=t.Report},function(t){u=t.Collaboration}],execute:function(){t("version","0.2.72");function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f,m,$=(f=function(t,e){function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("object"!==s(t))throw new Error("single-spa-svelte requires a configuration object");var e=o(o({},l),t);if(!e.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:a.bind(null,e,n),mount:i.bind(null,e,n),unmount:c.bind(null,e,n),update:u.bind(null,e,n)}};var l={component:null,domElementGetter:null,props:{}};function a(t){return Promise.resolve()}function i(t,e,n){var r=Object.keys(l),s=Object.keys(t).reduce((function(e,n){return r.includes(n)||(e[n]=t[n]),e}),{});return Promise.resolve().then((function(){var r=function(t,e){return(e=e&&e.customProps?e.customProps:e).domElement?function(){return e.domElement}:e.domElementGetter?function(){return e.domElementGetter(e)}:t.domElementGetter?function(){return t.domElementGetter(e)}:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)}(t,n),l=r();e.instance=new t.component(o(o({},s),{},{target:l,props:Object.assign({},n,t.props)}))}))}function c(t,e){return Promise.resolve().then((function(){e.instance.$destroy?e.instance.$destroy():e.instance.destroy()}))}function u(t,e,n){return Promise.resolve().then((function(){e.instance.$set?e.instance.$set(n):e.instance.set(n)}))}},f(m={exports:{}},m.exports),m.exports),p=d($);function v(){}function g(t){return t()}function h(){return Object.create(null)}function w(t){t.forEach(g)}function k(t){return"function"==typeof t}function b(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function y(t,e,n){t.$$.on_destroy.push(function(t,...e){if(null==t)return v;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}(e,n))}function x(t,e){t.appendChild(e)}function I(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function S(t){return document.createTextNode(t)}function O(){return S(" ")}function j(){return S("")}function P(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function T(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let N;function D(t){N=t}function z(){if(!N)throw new Error("Function called outside component initialization");return N}const M=[],W=[],A=[],F=[],q=Promise.resolve();let V=!1;function G(){V||(V=!0,q.then(H))}function R(t){A.push(t)}function Y(t){F.push(t)}let J=!1;const L=new Set;function H(){if(!J){J=!0;do{for(let t=0;t<M.length;t+=1){const e=M[t];D(e),K(e.$$)}for(D(null),M.length=0;W.length;)W.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];L.has(e)||(L.add(e),e())}A.length=0}while(M.length);for(;F.length;)F.pop()();V=!1,J=!1,L.clear()}}function K(t){if(null!==t.fragment){t.update(),w(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const Q=new Set;let U;function X(){U={r:0,c:[],p:U}}function Z(){U.r||w(U.c),U=U.p}function tt(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function et(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),U&&U.c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function rt(t){t&&t.c()}function st(t,e,n,o){const{fragment:r,on_mount:s,on_destroy:l,after_update:a}=t.$$;r&&r.m(e,n),o||R((()=>{const e=s.map(g).filter(k);l?l.push(...e):w(e),t.$$.on_mount=[]})),a.forEach(R)}function lt(t,e){const n=t.$$;null!==n.fragment&&(w(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function at(t,e,n,o,r,s,l=[-1]){const a=N;D(t);const i=t.$$={fragment:null,ctx:null,props:s,update:v,not_equal:r,bound:h(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:e.context||[]),callbacks:h(),dirty:l,skip_bound:!1};let c=!1;if(i.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return i.ctx&&r(i.ctx[e],i.ctx[e]=s)&&(!i.skip_bound&&i.bound[e]&&i.bound[e](s),c&&function(t,e){-1===t.$$.dirty[0]&&(M.push(t),G(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],i.update(),c=!0,w(i.before_update),i.fragment=!!o&&o(i.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);i.fragment&&i.fragment.l(t),t.forEach(E)}else i.fragment&&i.fragment.c();e.intro&&tt(t.$$.fragment),st(t,e.target,e.anchor,e.customElement),H()}D(a)}class it{$destroy(){lt(this,1),this.$destroy=v}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function ct(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ut(t){let e,n,o,r,s,l,i,c,u,d,f,m,$,p,v,g,h,w,k,b,y,C,j,N,D,z,M,W,A=t[1].status+"",F=(t[1].task?.workflow?.status||"")+"";return D=new t[6]({props:{class:"divider"}}),M=new a({props:{schema:t[20],recID:t[3],prevEventID:t[4],taskId:t[0],prev:t[5],readonly:t[2],root:"true"}}),M.$on("back",t[8]),{c(){e=_("div"),n=_("table"),o=_("th"),r=O(),s=_("th"),l=O(),i=_("tr"),c=_("td"),c.innerHTML="<div>Beschreibung:</div>",u=O(),d=_("td"),f=_("textarea"),m=O(),$=_("tr"),p=_("td"),p.textContent="Task-Status:",v=O(),g=_("td"),h=S(A),w=O(),k=_("tr"),b=_("td"),b.textContent="Workflow-Status:",y=O(),C=_("td"),j=S(F),N=O(),rt(D.$$.fragment),z=O(),rt(M.$$.fragment),T(o,"width","20%"),T(s,"width","80%"),P(c,"class","svelte-1wwh1vl"),P(f,"rows","5"),f.readOnly=!0,f.value=t[20].identity.description,P(f,"class","svelte-1wwh1vl"),P(d,"class","svelte-1wwh1vl"),P(i,"class","svelte-1wwh1vl"),P(p,"class","svelte-1wwh1vl"),P(g,"class","svelte-1wwh1vl"),P($,"class","svelte-1wwh1vl"),P(b,"class","svelte-1wwh1vl"),P(C,"class","svelte-1wwh1vl"),P(k,"class","svelte-1wwh1vl"),P(e,"class","subcat svelte-1wwh1vl")},m(t,a){I(t,e,a),x(e,n),x(n,o),x(n,r),x(n,s),x(n,l),x(n,i),x(i,c),x(i,u),x(i,d),x(d,f),x(n,m),x(n,$),x($,p),x($,v),x($,g),x(g,h),x(n,w),x(n,k),x(k,b),x(k,y),x(k,C),x(C,j),I(t,N,a),st(D,t,a),I(t,z,a),st(M,t,a),W=!0},p(t,e){(!W||2&e)&&A!==(A=t[1].status+"")&&B(h,A),(!W||2&e)&&F!==(F=(t[1].task?.workflow?.status||"")+"")&&B(j,F);const n={};8&e&&(n.recID=t[3]),16&e&&(n.prevEventID=t[4]),1&e&&(n.taskId=t[0]),32&e&&(n.prev=t[5]),4&e&&(n.readonly=t[2]),M.$set(n)},i(t){W||(tt(D.$$.fragment,t),tt(M.$$.fragment,t),W=!0)},o(t){et(D.$$.fragment,t),et(M.$$.fragment,t),W=!1},d(t){t&&E(e),t&&E(N),lt(D,t),t&&E(z),lt(M,t)}}}function dt(t){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ft(t){let e,n,o={ctx:t,current:null,token:null,hasCatch:!1,pending:dt,then:ut,catch:ct,value:20,blocks:[,,,]};return function(t,e){const n=e.token={};function o(t,o,r,s){if(e.token!==n)return;e.resolved=s;let l=e.ctx;void 0!==r&&(l=l.slice(),l[r]=s);const a=t&&(e.current=t)(l);let i=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(X(),et(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),Z())})):e.block.d(1),a.c(),tt(a,1),a.m(e.mount(),e.anchor),i=!0),e.block=a,e.blocks&&(e.blocks[o]=a),i&&H()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const n=z();if(t.then((t=>{D(n),o(e.then,1,e.value,t),D(null)}),(t=>{if(D(n),o(e.catch,2,e.error,t),D(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var r}(t[7],o),{c(){e=j(),o.block.c()},m(t,r){I(t,e,r),o.block.m(t,o.anchor=r),o.mount=()=>e.parentNode,o.anchor=e,n=!0},p(e,[n]){!function(t,e,n){const o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}(o,t=e,n)},i(t){n||(tt(o.block),n=!0)},o(t){for(let t=0;t<3;t+=1){et(o.blocks[t])}n=!1},d(t){t&&E(e),o.block.d(t),o.token=null,o=null}}}function mt(t,r,s){const{Card:l,Table:a,Button:i,Modal:c,Tabs:u,Divider:d,FormField:f,TextField:m}=e;let{task:$}=r,{taskId:p}=r,{eventItem:v}=r,{followerEventId:g}=r;const h=$,w=v,k=n.getSchema(g||w._id);let b,y,x=h.task?.readonly,I=h.docId||h.id;g&&(y=I,I=void 0,b=w._id),o.subscribe((async t=>{t&&t.taskId===p&&n.getTaskqueue(null,t.taskId).then((({task:t})=>{s(1,h.status=t.status,h),s(1,h.readonly=t.readonly,h),s(2,x=h.readonly)}))}));return t.$$set=t=>{"task"in t&&s(9,$=t.task),"taskId"in t&&s(0,p=t.taskId),"eventItem"in t&&s(10,v=t.eventItem),"followerEventId"in t&&s(11,g=t.followerEventId)},[p,h,x,I,b,y,d,k,()=>window.singleSpaNavigate("/"),$,v,g]}class $t extends it{constructor(t){var e;super(),document.getElementById("svelte-1wwh1vl-style")||((e=_("style")).id="svelte-1wwh1vl-style",e.textContent=".subcat.svelte-1wwh1vl.svelte-1wwh1vl{margin-bottom:0.5em}.subcat.svelte-1wwh1vl table td.svelte-1wwh1vl{padding-bottom:0.5em}.subcat.svelte-1wwh1vl table tr.svelte-1wwh1vl{vertical-align:top}.task_divider{background:#326173;color:#326173}tr.svelte-1wwh1vl>td.svelte-1wwh1vl{padding:0}textarea.svelte-1wwh1vl.svelte-1wwh1vl{font-family:inherit;font-size:inherit;width:100%;border:none;resize:none;min-height:2em;line-height:1.25em}",x(document.head,e)),at(this,t,mt,ft,b,{task:9,taskId:0,eventItem:10,followerEventId:11})}}function pt(t){let e,n,o,r,s;return{c(){e=C("svg"),n=C("path"),o=C("line"),r=C("line"),P(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),P(o,"x1","12"),P(o,"y1","9"),P(o,"x2","12"),P(o,"y2","13"),P(r,"x1","12"),P(r,"y1","17"),P(r,"x2","12.01"),P(r,"y2","17"),P(e,"xmlns","http://www.w3.org/2000/svg"),P(e,"width",t[0]),P(e,"height",t[0]),P(e,"fill","none"),P(e,"viewBox","0 0 24 24"),P(e,"stroke","currentColor"),P(e,"stroke-width",t[1]),P(e,"stroke-linecap","round"),P(e,"stroke-linejoin","round"),P(e,"class",s="feather feather-alert-triangle "+t[2])},m(t,s){I(t,e,s),x(e,n),x(e,o),x(e,r)},p(t,[n]){1&n&&P(e,"width",t[0]),1&n&&P(e,"height",t[0]),2&n&&P(e,"stroke-width",t[1]),4&n&&s!==(s="feather feather-alert-triangle "+t[2])&&P(e,"class",s)},i:v,o:v,d(t){t&&E(e)}}}function vt(t,e,n){let{size:o="100%"}=e,{strokeWidth:r=2}=e,{class:s=""}=e;return"100%"!==o&&(o="x"===o.slice(-1)?o.slice(0,o.length-1)+"em":parseInt(o)+"px"),t.$$set=t=>{"size"in t&&n(0,o=t.size),"strokeWidth"in t&&n(1,r=t.strokeWidth),"class"in t&&n(2,s=t.class)},[o,r,s]}class gt extends it{constructor(t){super(),at(this,t,vt,pt,b,{size:0,strokeWidth:1,class:2})}}function ht(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[0].visum?.role||t[2]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};5&n&&(o.value=t[0].visum?.role||t[2]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function wt(t){let e,n;return e=new t[11]({props:{readonly:!0,value:t[6]}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.value=t[6]),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function kt(t){let e,n,o;return e=new t[12]({props:{noCalendar:!0,readonly:!0,value:t[5]}}),n=new t[13]({props:{readonly:!0,value:t[5]}}),{c(){rt(e.$$.fragment),rt(n.$$.fragment)},m(t,r){st(e,t,r),st(n,t,r),o=!0},p(t,o){const r={};32&o&&(r.value=t[5]),e.$set(r);const s={};32&o&&(s.value=t[5]),n.$set(s)},i(t){o||(tt(e.$$.fragment,t),tt(n.$$.fragment,t),o=!0)},o(t){et(e.$$.fragment,t),et(n.$$.fragment,t),o=!1},d(t){lt(e,t),lt(n,t)}}}function bt(t){let e,n,o=t[0].visum&&kt(t);return{c(){o&&o.c(),e=j()},m(t,r){o&&o.m(t,r),I(t,e,r),n=!0},p(t,n){t[0].visum?o?(o.p(t,n),1&n&&tt(o,1)):(o=kt(t),o.c(),tt(o,1),o.m(e.parentNode,e)):o&&(X(),et(o,1,1,(()=>{o=null})),Z())},i(t){n||(tt(o),n=!0)},o(t){et(o),n=!1},d(t){o&&o.d(t),t&&E(e)}}}function yt(t){let e,n;return e=new t[14]({props:{filled:!0,disabled:t[1],$$slots:{default:[It]},$$scope:{ctx:t}}}),e.$on("click",t[15]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.disabled=t[1]),134217856&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function xt(t){let e,n;return e=new t[14]({props:{filled:!0,danger:!0,$$slots:{default:[Et]},$$scope:{ctx:t}}}),e.$on("click",t[16]),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function It(t){let e;return{c(){e=S(t[7])},m(t,n){I(t,e,n)},p(t,n){128&n&&B(e,t[7])},d(t){t&&E(e)}}}function Et(t){let e;return{c(){e=S("Visum zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function _t(t){let e;return{c(){e=S("Ja, bitte visieren")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Ct(t){let e,n,o,r;return o=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[_t]},$$scope:{ctx:t}}}),o.$on("click",t[17]),{c(){e=_("p"),e.textContent="Wollen Sie die Aufgabe visieren?",n=O(),rt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),st(o,t,s),r=!0},p(t,e){const n={};134217728&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(tt(o.$$.fragment,t),r=!0)},o(t){et(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),lt(o,t)}}}function St(t){let e,n,o;return n=new gt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),P(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:v,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function Ot(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[26],danger:!0,$$slots:{"title-icon":[St],default:[Ct]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};67108864&n&&(o.closeCallback=t[26]),134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function jt(t){let e;return{c(){e=S("Ja, bitte zurücknehmen")},m(t,n){I(t,e,n)},d(t){t&&E(e)}}}function Pt(t){let e,n,o,r;return o=new t[14]({props:{danger:!0,outline:!0,$$slots:{default:[jt]},$$scope:{ctx:t}}}),o.$on("click",t[18]),{c(){e=_("p"),e.textContent="Wollen Sie das Visum zurücknehmen?",n=O(),rt(o.$$.fragment)},m(t,s){I(t,e,s),I(t,n,s),st(o,t,s),r=!0},p(t,e){const n={};134217728&e&&(n.$$scope={dirty:e,ctx:t}),o.$set(n)},i(t){r||(tt(o.$$.fragment,t),r=!0)},o(t){et(o.$$.fragment,t),r=!1},d(t){t&&E(e),t&&E(n),lt(o,t)}}}function Bt(t){let e,n,o;return n=new gt({props:{size:"25"}}),{c(){e=_("div"),rt(n.$$.fragment),P(e,"slot","title-icon")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p:v,i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function Tt(t){let e,n;return e=new t[9]({props:{title:"Bestätigung",closeCallback:t[26],danger:!0,$$slots:{"title-icon":[Bt],default:[Pt]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){st(e,t,o),n=!0},p(t,n){const o={};67108864&n&&(o.closeCallback=t[26]),134217728&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){lt(e,t)}}}function Nt(t){let e,n,o,r,s,l,a,i,c,u,d,f,m,$,p,v,g,h;r=new t[10]({props:{name:"Rolle",$$slots:{default:[ht]},$$scope:{ctx:t}}}),l=new t[10]({props:{name:"visiert von",$$slots:{default:[wt]},$$scope:{ctx:t}}}),i=new t[10]({props:{name:"visiert am",$$slots:{default:[bt]},$$scope:{ctx:t}}});const w=[xt,yt],k=[];function b(t,e){return t[0].visum&&"Ready"===t[0].status?0:1}function y(e){t[24](e)}u=b(t),d=k[u]=w[u](t);let C={$$slots:{default:[Ot,({closeCallback:t})=>({26:t}),({closeCallback:t})=>t?67108864:0]},$$scope:{ctx:t}};function S(e){t[25](e)}void 0!==t[3]&&(C.open=t[3]),m=new t[8]({props:C}),W.push((()=>ot(m,"open",y)));let j={$$slots:{default:[Tt,({closeCallback:t})=>({26:t}),({closeCallback:t})=>t?67108864:0]},$$scope:{ctx:t}};return void 0!==t[4]&&(j.open=t[4]),v=new t[8]({props:j}),W.push((()=>ot(v,"open",S))),{c(){e=_("h3"),e.textContent="Visum bearbeiten",n=O(),o=_("div"),rt(r.$$.fragment),s=O(),rt(l.$$.fragment),a=O(),rt(i.$$.fragment),c=O(),d.c(),f=O(),rt(m.$$.fragment),p=O(),rt(v.$$.fragment),P(o,"class","visum")},m(t,d){I(t,e,d),I(t,n,d),I(t,o,d),st(r,o,null),x(o,s),st(l,o,null),x(o,a),st(i,o,null),x(o,c),k[u].m(o,null),I(t,f,d),st(m,t,d),I(t,p,d),st(v,t,d),h=!0},p(t,[e]){const n={};134217733&e&&(n.$$scope={dirty:e,ctx:t}),r.$set(n);const s={};134217792&e&&(s.$$scope={dirty:e,ctx:t}),l.$set(s);const a={};134217761&e&&(a.$$scope={dirty:e,ctx:t}),i.$set(a);let c=u;u=b(t),u===c?k[u].p(t,e):(X(),et(k[c],1,1,(()=>{k[c]=null})),Z(),d=k[u],d?d.p(t,e):(d=k[u]=w[u](t),d.c()),tt(d,1),d.m(o,null));const f={};201326592&e&&(f.$$scope={dirty:e,ctx:t}),!$&&8&e&&($=!0,f.open=t[3],Y((()=>$=!1))),m.$set(f);const p={};201326592&e&&(p.$$scope={dirty:e,ctx:t}),!g&&16&e&&(g=!0,p.open=t[4],Y((()=>g=!1))),v.$set(p)},i(t){h||(tt(r.$$.fragment,t),tt(l.$$.fragment,t),tt(i.$$.fragment,t),tt(d),tt(m.$$.fragment,t),tt(v.$$.fragment,t),h=!0)},o(t){et(r.$$.fragment,t),et(l.$$.fragment,t),et(i.$$.fragment,t),et(d),et(m.$$.fragment,t),et(v.$$.fragment,t),h=!1},d(t){t&&E(e),t&&E(n),t&&E(o),lt(r),lt(l),lt(i),k[u].d(),t&&E(f),lt(m,t),t&&E(p),lt(v,t)}}}function Dt(t,l,a){let i,c;y(t,r,(t=>a(22,i=t))),y(t,s,(t=>a(23,c=t)));const{Modal:u,Dialog:d,FormField:f,TextField:m,DatePicker:$,TimePicker:p,Button:v}=e;let g,h,w,k,b,x,{task:I}=l,{taskId:E}=l,{eventItem:_}=l,C=!1,S=!1;return o.subscribe((t=>{t&&t.taskId===E&&a(0,I.visum=t.data,I)})),t.$$set=t=>{"task"in t&&a(0,I=t.task),"taskId"in t&&a(19,E=t.taskId),"eventItem"in t&&a(20,_=t.eventItem)},t.$$.update=()=>{15728647&t.$$.dirty&&(a(5,h=new Date(I.visum?.timeStamp)),a(7,k=I.visum?"Visum erfolgleich erstellt":"Jetzt visieren"),a(21,b=!I.visum),a(21,b=b&&!!_.output?.approval?.length),b&&i&&(a(2,x=_.output.approval.flatMap((({refRole:t})=>t))),a(21,b=x.some((t=>i.some((e=>t===e)))))),a(1,g=!b),a(6,w=I.visum?.user||(g?"":c.email)))},[I,g,x,C,S,h,w,k,u,d,f,m,$,p,v,()=>{a(3,C=!0)},()=>{a(4,S=!0)},()=>{a(3,C=!1);const t={eventId:_._id,eventDesignation:_.identity.designation,docId:I.docId,role:x.filter((t=>i.find((e=>e===t)))).join(", "),user:c.email,timeStamp:(new Date).toISOString()};n.setTaskVisum(I._id,t),a(0,I.visum=t,I)},()=>{a(4,S=!1),n.deleteTaskVisum(I._id,_._id),a(0,I.visum=!1,I)},E,_,b,i,c,function(t){C=t,a(3,C)},function(t){S=t,a(4,S)}]}class zt extends it{constructor(t){var e;super(),document.getElementById("svelte-b9m9m8-style")||((e=_("style")).id="svelte-b9m9m8-style",e.textContent=".visum .time-picker .dropdown{display:none !important}",x(document.head,e)),at(this,t,Dt,Nt,b,{task:0,taskId:19,eventItem:20})}}const{document:Mt}=nt;function Wt(t){let e,n,o,r,s,l,a,i,c=t[7](t[25],!!t[26]||t[0]===t[20])+"";n=new t[3]({props:{name:"menu",items:t[23],value:t[24].name,class:"task--tabs",tabClass:"menuTab"}}),n.$on("change",(function(){k(t[6](t[28],t[21],t[20],t[26]))&&t[6](t[28],t[21],t[20],t[26]).apply(this,arguments)}));var u=t[24].component;function d(t){return{props:{taskId:t[21],task:t[27],eventItem:t[25],followerEventId:t[26]}}}return u&&(a=new u(d(t)),a.$on("back",t[8])),{c(){e=_("div"),rt(n.$$.fragment),o=O(),r=S(c),s=O(),l=_("div"),a&&rt(a.$$.fragment),P(e,"class","task--header svelte-ak8kus"),P(l,"class","task--content svelte-ak8kus")},m(t,c){I(t,e,c),st(n,e,null),x(e,o),x(e,r),I(t,s,c),I(t,l,c),a&&st(a,l,null),i=!0},p(e,o){t=e;const s={};8388608&o&&(s.items=t[23]),16777216&o&&(s.value=t[24].name),n.$set(s),(!i||101711873&o)&&c!==(c=t[7](t[25],!!t[26]||t[0]===t[20])+"")&&B(r,c);const f={};if(2097152&o&&(f.taskId=t[21]),134217728&o&&(f.task=t[27]),33554432&o&&(f.eventItem=t[25]),67108864&o&&(f.followerEventId=t[26]),u!==(u=t[24].component)){if(a){X();const t=a;et(t.$$.fragment,1,0,(()=>{lt(t,1)})),Z()}u?(a=new u(d(t)),a.$on("back",t[8]),rt(a.$$.fragment),tt(a.$$.fragment,1),st(a,l,null)):a=null}else u&&a.$set(f)},i(t){i||(tt(n.$$.fragment,t),a&&tt(a.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),a&&et(a.$$.fragment,t),i=!1},d(t){t&&E(e),lt(n),t&&E(s),t&&E(l),a&<(a)}}}function At(t){let e,n,o;return n=new t[2]({props:{constrainWidth:!0,title:t[19],titleClass:"task_title",closeCallback:t[9],class:"task--area",$$slots:{default:[Wt]},$$scope:{ctx:t}}}),{c(){e=_("div"),rt(n.$$.fragment),P(e,"class","task svelte-ak8kus")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};524288&e&&(o.title=t[19]),1605369857&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function Ft(t){let e,n,o;return n=new t[1]({props:{open:"true",noClickaway:"true",class:"task--modal",$$slots:{default:[At,({closeCallback:t})=>({29:t}),({closeCallback:t})=>t?536870912:0]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=_("div"),rt(n.$$.fragment),P(e,"class","task--page svelte-ak8kus")},m(t,r){I(t,e,r),st(n,e,null),o=!0},p(t,e){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n)}}}function qt(t){let e,n,o;return n=new l({props:{update:t[4],$$slots:{default:[Ft,({prop:{title:t,eventId:e,taskId:n,tabId:o,items:r,item:s,eventItem:l,followerEventId:a,task:i,findMenu:c}})=>({19:t,20:e,21:n,22:o,23:r,24:s,25:l,26:a,27:i,28:c}),({prop:t})=>(t?524288:0)|(t?1048576:0)|(t?2097152:0)|(t?4194304:0)|(t?8388608:0)|(t?16777216:0)|(t?33554432:0)|(t?67108864:0)|(t?134217728:0)|(t?268435456:0)]},$$scope:{ctx:t}}}),{c(){e=O(),rt(n.$$.fragment),Mt.title="enablerr - Task"},m(t,r){I(t,e,r),st(n,t,r),o=!0},p(t,[e]){const o={};1605894145&e&&(o.$$scope={dirty:e,ctx:t}),n.$set(o)},i(t){o||(tt(n.$$.fragment,t),o=!0)},o(t){et(n.$$.fragment,t),o=!1},d(t){t&&E(e),lt(n,t)}}}function Vt(t,o,r){const{Modal:s,Dialog:l,Tabs:a}=e;let d,f,m,$,p,v;const g={items:[{id:"task",name:"Aufgabe",component:$t},{id:"visum",name:"Visum",component:zt},{id:"collab",name:"Kommunikation",component:u},{id:"workflow",name:"Workflow",component:i},{id:"report",name:"Anhänge",component:c}],findBy(t,e){return this.items.find((n=>n[t]===e))},findByName(t){return this.findBy("name",t)},findById(t){return this.findBy("id",t)},deflt(){return this.items[0]},map(){return this.items.map((t=>t.name))}},h=()=>{scrollY=window.scrollY,$=document.body.style.position,p=document.body.style.overflow,v=document.body.style.width,document.body.style.position="fixed",document.body.style.top=`-${scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"};h();const w=(t,e,n)=>window.singleSpaNavigate(`/task/${t}/${e}/${n.id}`);!function(t){z().$$.on_destroy.push(t)}((()=>{document.body.style.position="inherit",document.body.style.overflow="auto",document.title="enablerr - Dashboard"}));return[m,s,l,a,async(t,e,o,s)=>{const l=g.findById(o);if(!l)return w(t,e,g.deflt());"task"!==o&&(s=void 0),r(0,m=e);let a={status:"New"};const i=await n.getEvent(t);i||window.singleSpaNavigate("/error");let c=i.identity.designation;if(s){const t=await n.getEvent(s);t||window.singleSpaNavigate("/error"),c+=" => "+t.identity.designation}return e!==t?(d===e?a=f:(d=e,f=a=await n.getTaskById(e)),a||window.singleSpaNavigate("/error"),a.event!==i._id.toString()&&window.singleSpaNavigate("/error")):e=void 0,{title:c,eventId:t,taskId:e,tabId:o,item:l,eventItem:i,followerEventId:s,task:a,items:g.map(),findMenu:t=>g.findByName(t)}},function(t){t.detail.value?h():(document.body.style.position=$||"",document.body.style.top="",document.body.style.overflow=p||"",document.body.style.width=v||"",window.scrollTo(0,scrollY))},(t,e,n,o)=>({detail:{value:r}})=>{o||w(n,e,t(r))},(t,e)=>{let n=!t.output?.approval;return(G(),q).then((()=>{Array.from(document.getElementsByClassName("menuTab")).map(((t,o)=>{o&&(t.querySelector("input").disabled=e),1===o&&(t.querySelector("input").disabled=e||n)}))})),""},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)},()=>window.singleSpaNavigate("/")]}class Gt extends it{constructor(t){var e;super(),Mt.getElementById("svelte-ak8kus-style")||((e=_("style")).id="svelte-ak8kus-style",e.textContent='.task--page.svelte-ak8kus .task--modal{align-items:flex-start !important;overflow:auto !important}.task.svelte-ak8kus{margin-top:4em}@media(max-height: 900px){.task.svelte-ak8kus{margin-top:0}}.task.svelte-ak8kus .task--area{overflow-x:hidden;overflow-y:auto;min-width:50vw}.task.svelte-ak8kus .dialog nav[role="group"]{display:flex;justify-content:flex-start;flex-direction:row;flex-wrap:nowrap;gap:1em}.task--header.svelte-ak8kus{margin-top:0.5em}.task--header.svelte-ak8kus .task_tabs{margin-bottom:1em}.task--content.svelte-ak8kus{margin-top:1em;overflow-x:hidden;overflow-y:auto;height:fit-content;min-height:60vh}',x(Mt.head,e)),at(this,t,Vt,qt,b,{})}}const Rt=p({component:Gt,domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Yt,mount:Jt,unmount:Lt}=Rt;t({bootstrap:Yt,mount:Jt,unmount:Lt});t("Task",Gt)}}}));
|