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AoBC,EAAE24H,EAAiBlD,IAAYkD,EAAgBlD,IACrEkD,EAAgBlD,GAAS,KAE1BkD,EAAgBlD,GAAW,EAE5B,OAAO11H,EAAoBs0H,EAAE7tH,EAC9B,EAEI4yH,EAAqBV,KAAK,qBAAuBA,KAAK,sBAAwB,GAClFU,EAAmBnjG,QAAQ+iG,EAAqBhC,KAAK,KAAM,IAC3DoC,EAAmBr1H,KAAOi1H,EAAqBhC,KAAK,KAAMoC,EAAmBr1H,KAAKizH,KAAKoC,G,ICpFvF,IAAIC,EAAsBt5H,EAAoBs0H,OAAE9iH,EAAW,CAAC,MAAM,WAAa,OAAOxR,EAAoB,MAAQ,IAClHs5H,EAAsBt5H,EAAoBs0H,EAAEgF,E","sources":["webpack://anser/./src/assets/css/variables.module.scss","webpack://anser/./node_modules/moment/locale/ sync ^\\.\\/.*$","webpack://anser/./src/i18n.js","webpack://anser/./src/js/dn-agent-event.js","webpack://anser/./src/js/dn-call-statistics.js","webpack://anser/./src/js/dn-colors.js","webpack://anser/./src/js/dn-email-helper.js","webpack://anser/./src/js/dn-employee-helper.js","webpack://anser/./src/js/dn-event-bus.js","webpack://anser/./src/js/dn-fetch-employee.js","webpack://anser/./src/js/dn-fetch-schedule.js","webpack://anser/./src/js/dn-fetch.js","webpack://anser/./src/js/dn-forecast.js","webpack://anser/./src/js/dn-helper.js","webpack://anser/./src/js/dn-localStorage.js","webpack://anser/./src/js/dn-schedule-helper.js","webpack://anser/./src/js/dn-simulation-model.js","webpack://anser/./src/js/dn-simulation.js","webpack://anser/./src/js/dn-uihelper.js","webpack://anser/./src/js/dn-undo.js","webpack://anser/./src/js/dn-variables.js","webpack://anser/./src/App.vue","webpack://anser/./src/components/Navigation/Header.vue","webpack://anser/./src/components/Settings/AvatarSelector.vue","webpack://anser/./src/components/Settings/AvatarSelector.vue?9a1e","webpack://anser/./src/components/Navigation/Header.vue?9061","webpack://anser/./src/components/Navigation/Footer.vue","webpack://anser/./src/components/Navigation/MobileNavbarFooter.vue","webpack://anser/./src/components/Navigation/MobileNavbarItem.vue","webpack://anser/./src/components/Navigation/MobileNavbarItem.vue?ee72","webpack://anser/./src/components/Navigation/MobileNavbarFooter.vue?567d","webpack://anser/./src/components/Navigation/Footer.vue?7987","webpack://anser/./src/components/Settings/Guide.vue","webpack://anser/./src/components/Settings/Guide.vue?79de","webpack://anser/./src/App.vue?7ccd","webpack://anser/./src/stores/dn-store.js","webpack://anser/./src/router.js","webpack://anser/./src/main.js","webpack://anser/./src/model/dn-affinity.js","webpack://anser/./src/model/dn-availability-request.js","webpack://anser/./src/model/dn-availability.js","webpack://anser/./src/model/dn-bo.js","webpack://anser/./src/model/dn-break-settings.js","webpack://anser/./src/model/dn-callcenter.js","webpack://anser/./src/model/dn-callgroup.js","webpack://anser/./src/model/dn-custom-shift.js","webpack://anser/./src/model/dn-customer.js","webpack://anser/./src/model/dn-daytype.js","webpack://anser/./src/model/dn-invoice.js","webpack://anser/./src/model/dn-login.js","webpack://anser/./src/model/dn-optimizable-shift.js","webpack://anser/./src/model/dn-request-item.js","webpack://anser/./src/model/dn-rotation.js","webpack://anser/./src/model/dn-schedule-request.js","webpack://anser/./src/model/dn-setting.js","webpack://anser/./src/model/dn-shift.js","webpack://anser/./src/model/dn-skill.js","webpack://anser/./src/model/dn-switch.js","webpack://anser/./src/model/dn-tag.js","webpack://anser/./src/model/dn-user.js","webpack://anser/./src/shared/dn-agreement.js","webpack://anser/./src/shared/dn-date-interval.js","webpack://anser/./src/shared/dn-employee-schedule.js","webpack://anser/./src/shared/dn-employee.js","webpack://anser/./src/shared/dn-model-object.js","webpack://anser/./src/shared/dn-shared-helper.js","webpack://anser/./src/shared/dn-task.js","webpack://anser/./src/shared/dn-tasktype.js","webpack://anser/./src/shared/dn-timezone.js","webpack://anser/./src/model/dn-employee-cc.js","webpack://anser/./src/model/dn-initial-data.js","webpack://anser/./src/js/dn-fetch-data.js","webpack://anser/./src/stores/dataStore.js","webpack://anser/./src/stores/dn-forecast-ai-data.js","webpack://anser/./src/stores/dn-forecast-data.js","webpack://anser/./src/stores/dn-simulation-data.js","webpack://anser/./src/stores/dn-special-day-data.js","webpack://anser/./src/js/dn-genesis.js","webpack://anser/./src/js/dn-import-calls.js","webpack://anser/./src/stores/fileImportStore.js","webpack://anser/./src/stores/forecastStore.js","webpack://anser/./src/stores/portfolioStore.js","webpack://anser/./src/stores/reportStore.js","webpack://anser/./src/model/dn-break-optimization-settings.js","webpack://anser/./src/model/dn-employee-context.js","webpack://anser/./src/model/dn-employee-list.js","webpack://anser/./src/model/dn-schedule-task.js","webpack://anser/./src/stores/scheduleStore.js","webpack://anser/./src/components/Account/UserAuthConfig.vue","webpack://anser/./src/components/Account/UserAuthConfig.vue?93c6","webpack://anser/./src/components/Base/Avatar.vue","webpack://anser/./src/components/Base/Avatar.vue?8d1a","webpack://anser/./src/components/Base/Button.vue","webpack://anser/./src/components/Base/Button.vue?15bc","webpack://anser/./src/components/Base/Icon.vue","webpack://anser/./src/components/Base/Icon.vue?fdd4","webpack://anser/./src/components/Base/Modal.vue","webpack://anser/./src/components/Base/Modal.vue?f44a","webpack://anser/./src/components/Base/RawData.vue","webpack://anser/./src/components/Base/RawData.vue?f5ee","webpack://anser/./src/components/Settings/ColorIndicator.vue","webpack://anser/./src/components/Settings/ColorIndicator.vue?c550","webpack://anser/./src/locales/ lazy ^\\.\\/.*\\.json$ namespace object","webpack://anser/webpack/bootstrap","webpack://anser/webpack/runtime/chunk loaded","webpack://anser/webpack/runtime/compat get default export","webpack://anser/webpack/runtime/create fake namespace object","webpack://anser/webpack/runtime/define property getters","webpack://anser/webpack/runtime/ensure chunk","webpack://anser/webpack/runtime/get javascript chunk filename","webpack://anser/webpack/runtime/get mini-css chunk filename","webpack://anser/webpack/runtime/global","webpack://anser/webpack/runtime/hasOwnProperty shorthand","webpack://anser/webpack/runtime/load script","webpack://anser/webpack/runtime/make namespace object","webpack://anser/webpack/runtime/node module decorator","webpack://anser/webpack/runtime/publicPath","webpack://anser/webpack/runtime/css loading","webpack://anser/webpack/runtime/jsonp chunk loading","webpack://anser/webpack/startup"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"availability\":\"#d7d7d7\",\"availabilityOtherCC\":\"#d6aeae\",\"white\":\"#fff\",\"black\":\"#000\",\"grey\":\"#d3d3d3\",\"light\":\"#f5f6fa\",\"lightgrey\":\"#ededee\",\"midGrey\":\"#838383\",\"dark\":\"#5b5659\",\"lightsuccess\":\"#b9fff0\",\"lightdanger\":\"#ffbabf\",\"lightinfo\":\"#fcf5cc\",\"darksuccess\":\"#086c56\",\"darkdanger\":\"#6f4144\",\"primary\":\"#7600ed\",\"success\":\"#4ca687\",\"info\":\"#f6de5b\",\"warning\":\"#f58b22\",\"danger\":\"#e73542\",\"primarydark\":\"#50009f\",\"hot\":\"#f2af61\",\"veryHot\":\"#bf2c26\",\"cold\":\"#8dc4eb\",\"veryCold\":\"#2164d9\",\"stroke1\":\"#2164d9\",\"stroke2\":\"#ffc000\",\"stroke3\":\"#ed7d31\",\"stroke4\":\"#70ad47\",\"stroke5\":\"#a5a5a5\",\"stroke6\":\"#5b9bd5\",\"stroke7\":\"#26442f\",\"stroke8\":\"#9e480e\",\"stroke9\":\"#4472c4\",\"free\":\"#97383e\",\"red\":\"#911c12\",\"selected\":\"#e8f0fe\",\"selectedfocus\":\"#cdd8f2\",\"primarySelected\":\"#4f84ef\",\"pvInfo\":\"#0ea5e9\"};","var map = {\n\t\"./af\": 25177,\n\t\"./af.js\": 25177,\n\t\"./ar\": 61509,\n\t\"./ar-dz\": 41488,\n\t\"./ar-dz.js\": 41488,\n\t\"./ar-kw\": 58676,\n\t\"./ar-kw.js\": 58676,\n\t\"./ar-ly\": 42353,\n\t\"./ar-ly.js\": 42353,\n\t\"./ar-ma\": 24496,\n\t\"./ar-ma.js\": 24496,\n\t\"./ar-ps\": 6947,\n\t\"./ar-ps.js\": 6947,\n\t\"./ar-sa\": 82682,\n\t\"./ar-sa.js\": 82682,\n\t\"./ar-tn\": 89756,\n\t\"./ar-tn.js\": 89756,\n\t\"./ar.js\": 61509,\n\t\"./az\": 95533,\n\t\"./az.js\": 95533,\n\t\"./be\": 28959,\n\t\"./be.js\": 28959,\n\t\"./bg\": 47777,\n\t\"./bg.js\": 47777,\n\t\"./bm\": 54903,\n\t\"./bm.js\": 54903,\n\t\"./bn\": 61290,\n\t\"./bn-bd\": 17357,\n\t\"./bn-bd.js\": 17357,\n\t\"./bn.js\": 61290,\n\t\"./bo\": 31545,\n\t\"./bo.js\": 31545,\n\t\"./br\": 11470,\n\t\"./br.js\": 11470,\n\t\"./bs\": 44429,\n\t\"./bs.js\": 44429,\n\t\"./ca\": 7306,\n\t\"./ca.js\": 7306,\n\t\"./cs\": 56464,\n\t\"./cs.js\": 56464,\n\t\"./cv\": 73635,\n\t\"./cv.js\": 73635,\n\t\"./cy\": 64226,\n\t\"./cy.js\": 64226,\n\t\"./da\": 93601,\n\t\"./da.js\": 93601,\n\t\"./de\": 77853,\n\t\"./de-at\": 26111,\n\t\"./de-at.js\": 26111,\n\t\"./de-ch\": 54697,\n\t\"./de-ch.js\": 54697,\n\t\"./de.js\": 77853,\n\t\"./dv\": 60708,\n\t\"./dv.js\": 60708,\n\t\"./el\": 54691,\n\t\"./el.js\": 54691,\n\t\"./en-au\": 53872,\n\t\"./en-au.js\": 53872,\n\t\"./en-ca\": 28298,\n\t\"./en-ca.js\": 28298,\n\t\"./en-gb\": 56195,\n\t\"./en-gb.js\": 56195,\n\t\"./en-ie\": 66584,\n\t\"./en-ie.js\": 66584,\n\t\"./en-il\": 65543,\n\t\"./en-il.js\": 65543,\n\t\"./en-in\": 9033,\n\t\"./en-in.js\": 9033,\n\t\"./en-nz\": 79402,\n\t\"./en-nz.js\": 79402,\n\t\"./en-sg\": 43004,\n\t\"./en-sg.js\": 43004,\n\t\"./eo\": 32934,\n\t\"./eo.js\": 32934,\n\t\"./es\": 97650,\n\t\"./es-do\": 20838,\n\t\"./es-do.js\": 20838,\n\t\"./es-mx\": 17730,\n\t\"./es-mx.js\": 17730,\n\t\"./es-us\": 56575,\n\t\"./es-us.js\": 56575,\n\t\"./es.js\": 97650,\n\t\"./et\": 3035,\n\t\"./et.js\": 3035,\n\t\"./eu\": 3508,\n\t\"./eu.js\": 3508,\n\t\"./fa\": 119,\n\t\"./fa.js\": 119,\n\t\"./fi\": 90527,\n\t\"./fi.js\": 90527,\n\t\"./fil\": 95995,\n\t\"./fil.js\": 95995,\n\t\"./fo\": 52477,\n\t\"./fo.js\": 52477,\n\t\"./fr\": 85498,\n\t\"./fr-ca\": 26435,\n\t\"./fr-ca.js\": 26435,\n\t\"./fr-ch\": 37892,\n\t\"./fr-ch.js\": 37892,\n\t\"./fr.js\": 85498,\n\t\"./fy\": 37071,\n\t\"./fy.js\": 37071,\n\t\"./ga\": 41734,\n\t\"./ga.js\": 41734,\n\t\"./gd\": 70217,\n\t\"./gd.js\": 70217,\n\t\"./gl\": 77329,\n\t\"./gl.js\": 77329,\n\t\"./gom-deva\": 32124,\n\t\"./gom-deva.js\": 32124,\n\t\"./gom-latn\": 93383,\n\t\"./gom-latn.js\": 93383,\n\t\"./gu\": 95050,\n\t\"./gu.js\": 95050,\n\t\"./he\": 11713,\n\t\"./he.js\": 11713,\n\t\"./hi\": 43861,\n\t\"./hi.js\": 43861,\n\t\"./hr\": 26308,\n\t\"./hr.js\": 26308,\n\t\"./hu\": 90609,\n\t\"./hu.js\": 90609,\n\t\"./hy-am\": 17160,\n\t\"./hy-am.js\": 17160,\n\t\"./id\": 74063,\n\t\"./id.js\": 74063,\n\t\"./is\": 89374,\n\t\"./is.js\": 89374,\n\t\"./it\": 88383,\n\t\"./it-ch\": 21827,\n\t\"./it-ch.js\": 21827,\n\t\"./it.js\": 88383,\n\t\"./ja\": 23827,\n\t\"./ja.js\": 23827,\n\t\"./jv\": 89722,\n\t\"./jv.js\": 89722,\n\t\"./ka\": 41794,\n\t\"./ka.js\": 41794,\n\t\"./kk\": 27088,\n\t\"./kk.js\": 27088,\n\t\"./km\": 96870,\n\t\"./km.js\": 96870,\n\t\"./kn\": 84451,\n\t\"./kn.js\": 84451,\n\t\"./ko\": 63164,\n\t\"./ko.js\": 63164,\n\t\"./ku\": 98174,\n\t\"./ku-kmr\": 6181,\n\t\"./ku-kmr.js\": 6181,\n\t\"./ku.js\": 98174,\n\t\"./ky\": 78474,\n\t\"./ky.js\": 78474,\n\t\"./lb\": 79680,\n\t\"./lb.js\": 79680,\n\t\"./lo\": 15867,\n\t\"./lo.js\": 15867,\n\t\"./lt\": 45766,\n\t\"./lt.js\": 45766,\n\t\"./lv\": 69532,\n\t\"./lv.js\": 69532,\n\t\"./me\": 58076,\n\t\"./me.js\": 58076,\n\t\"./mi\": 41848,\n\t\"./mi.js\": 41848,\n\t\"./mk\": 30306,\n\t\"./mk.js\": 30306,\n\t\"./ml\": 73739,\n\t\"./ml.js\": 73739,\n\t\"./mn\": 99053,\n\t\"./mn.js\": 99053,\n\t\"./mr\": 86169,\n\t\"./mr.js\": 86169,\n\t\"./ms\": 73386,\n\t\"./ms-my\": 92297,\n\t\"./ms-my.js\": 92297,\n\t\"./ms.js\": 73386,\n\t\"./mt\": 77075,\n\t\"./mt.js\": 77075,\n\t\"./my\": 72264,\n\t\"./my.js\": 72264,\n\t\"./nb\": 22274,\n\t\"./nb.js\": 22274,\n\t\"./ne\": 8235,\n\t\"./ne.js\": 8235,\n\t\"./nl\": 92572,\n\t\"./nl-be\": 43784,\n\t\"./nl-be.js\": 43784,\n\t\"./nl.js\": 92572,\n\t\"./nn\": 54566,\n\t\"./nn.js\": 54566,\n\t\"./oc-lnc\": 69330,\n\t\"./oc-lnc.js\": 69330,\n\t\"./pa-in\": 29849,\n\t\"./pa-in.js\": 29849,\n\t\"./pl\": 94418,\n\t\"./pl.js\": 94418,\n\t\"./pt\": 79834,\n\t\"./pt-br\": 48303,\n\t\"./pt-br.js\": 48303,\n\t\"./pt.js\": 79834,\n\t\"./ro\": 24457,\n\t\"./ro.js\": 24457,\n\t\"./ru\": 82271,\n\t\"./ru.js\": 82271,\n\t\"./sd\": 1221,\n\t\"./sd.js\": 1221,\n\t\"./se\": 33478,\n\t\"./se.js\": 33478,\n\t\"./si\": 17538,\n\t\"./si.js\": 17538,\n\t\"./sk\": 5784,\n\t\"./sk.js\": 5784,\n\t\"./sl\": 46637,\n\t\"./sl.js\": 46637,\n\t\"./sq\": 86794,\n\t\"./sq.js\": 86794,\n\t\"./sr\": 45719,\n\t\"./sr-cyrl\": 3322,\n\t\"./sr-cyrl.js\": 3322,\n\t\"./sr.js\": 45719,\n\t\"./ss\": 56000,\n\t\"./ss.js\": 56000,\n\t\"./sv\": 41011,\n\t\"./sv.js\": 41011,\n\t\"./sw\": 40748,\n\t\"./sw.js\": 40748,\n\t\"./ta\": 11025,\n\t\"./ta.js\": 11025,\n\t\"./te\": 11885,\n\t\"./te.js\": 11885,\n\t\"./tet\": 28861,\n\t\"./tet.js\": 28861,\n\t\"./tg\": 86571,\n\t\"./tg.js\": 86571,\n\t\"./th\": 55802,\n\t\"./th.js\": 55802,\n\t\"./tk\": 59527,\n\t\"./tk.js\": 59527,\n\t\"./tl-ph\": 29231,\n\t\"./tl-ph.js\": 29231,\n\t\"./tlh\": 31052,\n\t\"./tlh.js\": 31052,\n\t\"./tr\": 85096,\n\t\"./tr.js\": 85096,\n\t\"./tzl\": 79846,\n\t\"./tzl.js\": 79846,\n\t\"./tzm\": 81765,\n\t\"./tzm-latn\": 97711,\n\t\"./tzm-latn.js\": 97711,\n\t\"./tzm.js\": 81765,\n\t\"./ug-cn\": 48414,\n\t\"./ug-cn.js\": 48414,\n\t\"./uk\": 16618,\n\t\"./uk.js\": 16618,\n\t\"./ur\": 57777,\n\t\"./ur.js\": 57777,\n\t\"./uz\": 57609,\n\t\"./uz-latn\": 72475,\n\t\"./uz-latn.js\": 72475,\n\t\"./uz.js\": 57609,\n\t\"./vi\": 21135,\n\t\"./vi.js\": 21135,\n\t\"./x-pseudo\": 64051,\n\t\"./x-pseudo.js\": 64051,\n\t\"./yo\": 82218,\n\t\"./yo.js\": 82218,\n\t\"./zh-cn\": 52648,\n\t\"./zh-cn.js\": 52648,\n\t\"./zh-hk\": 1632,\n\t\"./zh-hk.js\": 1632,\n\t\"./zh-mo\": 31541,\n\t\"./zh-mo.js\": 31541,\n\t\"./zh-tw\": 50304,\n\t\"./zh-tw.js\": 50304\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 35358;","\nimport { createI18n } from 'vue-i18n';\nimport messages from '@/locales/en.json';\nimport { getLanguage } from \"@/js/dn-localStorage\";\n\nconst SUPORTED_LANGUAGES = Object.freeze(['en', 'sv', 'de']);\nconst loadedLanguages = ['en'];\n\nexport const i18n = createI18n({\n locale: 'en',\n fallbackLocale: 'en',\n messages: { 'en': messages }, \n})\n\nloadSelectedLang();\n\nfunction getBrowserDefaultLanguage() {\n const languages = navigator.languages;\n if (languages) {\n for (const lang of languages) {\n const shortCode = getISO639Code(lang);\n if (SUPORTED_LANGUAGES.includes(shortCode)) {\n return lang;\n }\n }\n }\n return 'en-US';\n}\n\n/**\n * @param {string} code\n */\nfunction getISO639Code(code) {\n if(code){\n const splitted = code.split('-');\n return splitted[0];\n}else{return undefined}\n}\n\nexport function getLanguageCode() {\n //get selected lang from local storage\n const lang = getLanguage();\n if (lang) { return lang; }\n\n //if not get default from browser\n const browserLang=getBrowserDefaultLanguage();\n //check if browser lang is supported \n //else return undefined\n if(loadedLanguages.includes(browserLang)){\n return browserLang\n }else{return undefined}\n}\n\nexport function getSupportedCultures() {\n return ['en-US', 'en-GB', 'sv-SE', 'de-DE'];\n}\n\nfunction loadSelectedLang() {\n //if no getLanguageCode load en language\n //languageCode remains undefined and forces time/date settings from browser\n const languageCode=getLanguageCode()\n let lang ='en'\n if(languageCode){lang = getISO639Code(languageCode)}\n if (lang !== 'en') {\n loadLanguageAsync(lang)\n }\n}\n\n/**\n * @param {string} languague\n */\nexport async function loadLanguageAsync(languague) {\n const lang = getISO639Code(languague);\n if (i18n.global.locale === lang) {\n return Promise.resolve(setI18nLanguage(lang))\n }\n\n if (loadedLanguages.includes(lang)) {\n return Promise.resolve(setI18nLanguage(lang))\n }\n\n return import(`@/locales/${lang}.json`).then(\n messages => {\n i18n.global.setLocaleMessage(lang, messages.default)\n loadedLanguages.push(lang)\n return setI18nLanguage(lang)\n }\n )\n}\n\n/**\n * @param {string} lang\n */\nfunction setI18nLanguage(lang) {\n // @ts-ignore\n i18n.global.locale = lang\n // document.querySelector('html').setAttribute('lang', lang)\n return lang\n}","\r\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\r\n\r\n/**\r\n * @typedef {{employeeSwitchId:string, kind:number, timestamp:string, reasonCode?:string }} AgentEventDto\r\n */\r\n\r\n/**\r\n * @param {Date} st\r\n * @param {Date} fi\r\n * @param {number} switchId\r\n */\r\nexport async function deleteAgentEvents(st, fi, switchId) {\r\n const agentEvents = await fetchAndCheckJson(`agent-event?st=${st.toISOString()}&fi=${fi.toISOString()}&switchId=${switchId}`, 'DELETE');\r\n return agentEvents;\r\n}\r\n\r\n/**\r\n * @param {number} limit\r\n * @param {number} switchId\r\n */\r\nexport async function getAgentEvents(limit, switchId) {\r\n /** @type {AgentEventDto[]} */\r\n const agentEvents = await fetchAndCheckJson(`agent-event?limit=${limit}&switchId=${switchId}`, 'GET');\r\n return agentEvents;\r\n}\r\n\r\n/**\r\n * @param {AgentEventDto[]} data\r\n * @param {number} switchId\r\n */\r\nasync function postAgentEvents(data, switchId) {\r\n return await fetchAndCheckJson(`agent-event?file=1&switchId=${switchId}`, 'POST', data);\r\n}\r\n\r\n/**\r\n * @param {string[]} lines\r\n * @param {number} switchId\r\n * @param {{ (progress: any): void; (arg0: number): void; }} updateProgress\r\n */\r\nexport async function importAgentEventsCsv(lines, switchId, updateProgress) {\r\n let startIndex = 0;\r\n if (lines[0].toLowerCase().startsWith('timestamp;kind;employeeswitchid'))\r\n startIndex = 1;\r\n\r\n let data = [];\r\n for (let i = startIndex; i < lines.length; i++) {\r\n const rowData = lines[i].split(';');\r\n if (rowData.length === 1)\r\n continue;\r\n\r\n if (rowData.length < 3 || rowData.length > 4) {\r\n throw new Error(`Number of fields error on line ${i}`);\r\n }\r\n\r\n /** @type {AgentEventDto} */\r\n const dto = { timestamp: rowData[0].trim(), kind: parseInt(rowData[1].trim()), employeeSwitchId: rowData[2].trim() };\r\n if (rowData.length > 3 && rowData[3]) {\r\n const reasonCode = rowData[3].trim();\r\n if (reasonCode) {\r\n dto.reasonCode = reasonCode;\r\n }\r\n }\r\n\r\n if (isNaN(Date.parse(dto.timestamp))) {\r\n throw new Error(`Bad formatting of timestamp on line ${i}`);\r\n }\r\n\r\n if (dto.kind < 0 || dto.kind > 3) {\r\n throw new Error(`kind expects 0,1,2 or 3 error on line ${i}`);\r\n }\r\n\r\n data.push(dto)\r\n }\r\n\r\n if (data.length === 0)\r\n throw new Error('No agent events to import found');\r\n\r\n const batchSize = 10000;\r\n let result;\r\n const total = data.length;\r\n let left = data.length;\r\n do {\r\n let batch;\r\n if (left <= batchSize) {\r\n batch = data;\r\n left = 0;\r\n } else {\r\n batch = data.splice(0, batchSize);\r\n left = data.length;\r\n }\r\n\r\n result = await postAgentEvents(batch, switchId);\r\n updateProgress(1 - left / total);\r\n } while (left > 0);\r\n\r\n return result;\r\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\n/** @typedef {{startTimeUTC?:Date;quarters?:number;intervals?:{st:Date;quarters:number}[];ipoa:number}} CallStatisticsPost */\n\n/** @typedef {{cgId:number;noc:number[];ht:number[]}[]} CallStatisticsData */\n\n/** @typedef {{data?:CallStatisticsData;list?:{st:Date;data:CallStatisticsData}[];isCalculating: boolean}} CallStatisticsResult */\n\n/**\n * @param {CallStatisticsPost} data\n */\nexport async function getCallStatistics(data) {\n /** @type {CallStatisticsResult} */\n const result = await fetchAndCheckJson(`call-statistics`, 'POST', data);\n return result;\n}\n\nexport async function recalculateCallGroups() {\n await fetchAndCheckJson(`call-statistics?recalc=1`, 'POST');\n}\n","// @ts-check\nexport const COLORS = createColorEnum();\n\nfunction createColorEnum() {\n /** @type {string[]} */\n const colorArray = [];\n const colors = {\n stroke1: 'stroke1',\n stroke2: 'stroke2',\n stroke3: 'stroke3',\n stroke4: 'stroke4',\n stroke5: 'stroke5',\n stroke6: 'stroke6',\n stroke7: 'stroke7',\n stroke8: 'stroke8',\n stroke9: 'stroke9',\n primary: 'primary',\n lightdanger: 'lightdanger',\n lightinfo: 'lightinfo',\n dark: 'dark',\n byId: byId,\n idBySchemecolor: idBySchemecolor\n };\n\n colorArray[1] = colors.stroke1;\n colorArray[2] = colors.stroke2;\n colorArray[3] = colors.stroke3;\n colorArray[4] = colors.stroke4;\n colorArray[5] = colors.stroke5;\n colorArray[6] = colors.stroke6;\n colorArray[7] = colors.primary;\n colorArray[8] = colors.stroke8;\n colorArray[9] = colors.dark;\n colorArray[10] = colors.lightdanger;\n colorArray[11] = colors.lightinfo;\n return Object.freeze(colors);\n function byId(id) {\n return colorArray[id];\n }\n /**\n * @param {string} name\n */\n function idBySchemecolor(name) {\n return colorArray.findIndex(x => x === name)\n }\n}\n\nexport function getSelectableColors() {\n return [COLORS.stroke1, COLORS.stroke2, COLORS.stroke3, COLORS.stroke4, COLORS.stroke5, COLORS.stroke6, COLORS.stroke7, COLORS.stroke8, COLORS.lightinfo, COLORS.lightdanger, COLORS.primary, COLORS.dark];\n}\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\nexport const EMAIL_KIND = createEmailKind();\nexport const NOTIFY_KIND = createNotifyKind();\n\nfunction createEmailKind() {\n const enumObject = {\n message: 0,\n invoiceReminder: 1,\n customerInfo: 2,\n resetPassword: 3,\n invoiceReport: 4,\n emailVerification: 5,\n scheduleNotification: 6,\n invoicePDF: 7,\n };\n return Object.freeze(enumObject);\n}\n\nfunction createNotifyKind() {\n const enumObject = {\n email: 0,\n sms: 1\n };\n\n return Object.freeze(enumObject);\n\n}\n\nexport async function sendEmail(kind, eMailObject) {\n const result = await fetchAndCheckJson('email-send', 'POST', { kind: kind, eMailObject: eMailObject });\n return result;\n}\n\nexport async function sendSMS(smsObject) {\n let x = smsObject.to\n\n //Remove invalid charecters\n let correctedPhone = ''\n for (let c = 0; c < x.length; c++) {\n const code = x[c].charCodeAt(0);\n if (code == 43 || (code >= 48 && code <= 57)) { correctedPhone += x[c] }\n }\n smsObject.to = correctedPhone\n const result = await fetchAndCheckJson('sms-send', 'POST', { smsObject: smsObject });\n return result;\n}\n\n/**\n * @param {string} email\n */\nexport async function sendEmailVerification(email) {\n /** @type {{ loginId?:number }} */\n const result = await fetchAndCheckJson('email-send', 'POST', { kind: EMAIL_KIND.emailVerification, eMailObject: email });\n return result;\n}","import { getBreakSettingsByTag } from \"@/model/dn-break-settings.js\";\nimport { postEmployeeSkill } from \"@/js/dn-fetch-employee.js\";\nimport { simulationData } from \"@/stores/dn-simulation-data.js\";\nimport { INFOTYPE } from \"@/js/dn-schedule-helper.js\";\nimport { getColorFromName } from \"@/js/dn-variables\";\nimport { useDataStore } from '@/stores/dataStore.js';\nimport { useScheduleStore } from \"@/stores/scheduleStore.js\";\nimport variables from \"@/assets/css/variables.module.scss\";\nimport { i18n } from \"@/i18n.js\";\nimport { addDays } from '@/shared/dn-shared-helper.js';\nimport {getShiftWorkTime} from '@/model/dn-shift.js';\n\n\n/** @returns {import(\"@/model/dn-skill.js\").Skill[]} */\nexport function getSortedSkills(){\n const dataStore = useDataStore();\n return dataStore.skillsCurrentCC.sort((a,b) => (a.numericSort > b.numericSort) ? 1 : ((b.numericSort > a.numericSort) ? -1 : 0))\n}\n\n/** @typedef {{id:number; empid:string; name:string; ghost:boolean; skills:boolean[]}} SkillMatrixRow */\n\nexport function getSkillsMatrix(){\n const scheduleStore = useScheduleStore();\n const employees=scheduleStore.employees.list;\n const skills = getSortedSkills()\n /** @type {SkillMatrixRow[]} */\n const skillsMatrix=employees.map(function (x) { return {id:x.id, empid: x.empid, name: x.name, ghost:x.ghost, skills: new Array(skills.length).fill(false)}});\n\n //load matrix\n for(let e=0;e s.affinity ==aId||aId==null));\n for(let s=0;s=sMinMax[0]&&s<=sMinMax[1]){\n paginatedSkillIds.push(filteredskills[s].id)\n }\n }\n\n let columnDefs =\n [{\"name\":\"empid\",\"label\":\"empid\",\"sticky\":true,\"width\":60},\n {\"name\":\"name\",\"label\":\"name\",\"sticky\":true,\"width\":300},\n {\"name\":\"copy/paste\",\"label\":\"copy\",\"sticky\":false,\"width\":10},\n]\n\n for(let s=0;s s.affinity ==aId)).length;\n }else{\n return getSortedSkills().length;\n }\n \n}\n\n export async function saveSkillsMatrix(skillsMatrix){\n const scheduleStore = useScheduleStore();\n const employees=scheduleStore.employees.list;\n /** @type {import(\"@/shared/dn-employee.js\").EmployeeSkillDto[]} */\n const postEmployeeSkillDto = [];\n\n /** @type {import(\"@/shared/dn-employee.js\").Employee[]} */\n const changedEmps = [];\n let skills = getSortedSkills()\n //load matrix\n for(let i=0;i 0){\n await postEmployeeSkill(postEmployeeSkillDto);\n for (const emp of changedEmps) {\n emp.confirmChanges();\n }\n simulationData.reset();\n }\n}\n\nexport function getEmpIdsSameTags(emp){\n const scheduleStore = useScheduleStore();\n const empids = [];\n let employees=scheduleStore.employees.list;\n for(let e=0;e 0\n let affinityInfoMap = new Map\n if(hasAffinities){\n const dataStore = useDataStore();\n \n let taskTypes=dataStore.taskTypes.list\n for(let a=0;a 0\n //prepare affinity data\n \n if(hasAffinities){\n const dataStore = useDataStore();\n let affinityInfoMap = getAffinityInfoMap()\n /* for(let a=0;a\"+ skill.name;\n }\n }\n }else{\n skillInfoText= i18n.global.t('employees.skills')+':'\n for (const skill of callGroups) {\n if(emp.skills.includes(skill.id)){\n skillInfoText+=\"
\"+ skill.name;\n }\n }\n }\n return skillInfoText\n}\n//Nghia Lang Codes\n/**\n * @param {import(\"@/shared/dn-employee.js\").Employee} emp\n */\nexport function getEmployeeWarning(emp,fromOptDialog=false){\n const dataStore = useDataStore();\n /** @type {string[]} */\n const warnings=[];\n if (!dataStore.currentUser) { return warnings; }\n const scheduleStore = useScheduleStore();\n const rotations = scheduleStore.rotations\n const shiftBags= scheduleStore.shiftBags\n const availabilities = scheduleStore.availabilities\n const employeeDisplaySettings = scheduleStore.employeeDisplaySettings\n const taskTypeMap=dataStore.taskTypeMap\n \n //skill warning\n if(emp.skills.length==0&&employeeDisplaySettings.skillsWarning) {warnings.push(i18n.global.t('employees.no-skills'))}\n\n //shiftbags || rotations\n if(rotations&&shiftBags){\n if(!rotations.byEmp.has(emp.id)&&!shiftBags.byEmp.has(emp.id)&&employeeDisplaySettings.shiftWarning){warnings.push(i18n.global.t('employees.no-shifts'))}\n }\n\n //switch id\n if(dataStore.currentUser.hasAdherence&&employeeDisplaySettings.switchIdWarning){\n if(!emp.switchid&&!emp.ghost&&!fromOptDialog){\n {warnings.push(i18n.global.t('employees.no-switch-id'))}\n }\n }\n\n //work time &&emp.empid==84311\n if(employeeDisplaySettings.workTimeWarning ){\n\n if(!emp.workTimeOk()) {\n {warnings.push(i18n.global.t('employees.work-time-outside'))}\n }\n\n //prepare breaksettings\n const breakSettingsIsLoaded = dataStore.breakSettings !== null;\n const breakSettings = breakSettingsIsLoaded ? getBreakSettingsByTag(dataStore.breakSettings, emp, dataStore.currentCC.tagIds) : null;\n if(breakSettings&&taskTypeMap){\n for(const bs of breakSettings){\n bs.calculateUnpaidDuration(taskTypeMap)\n }\n }\n\n //Check cyclic shedules fit into work time\n let wwt =null//weekly work time\n let rotation= null\n if(rotations && breakSettingsIsLoaded && rotations.byEmp.has(emp.id)) {\n rotation =rotations.byEmp.get(emp.id)\n if(rotation){wwt=rotation.getWeeklyWorkTime(breakSettings,dataStore.taskTypeMap)}\n }\n let empMinMax = getMinMaxWeeklyWork(emp)\n let remainingWorkTime={minWork:empMinMax.min,maxWork:empMinMax.max}\n\n let remainingWorkTimeAfterCyclicExist=false\n if(wwt){\n remainingWorkTimeAfterCyclicExist=false\n //check cyclic shedule work time\n if(wwt.minWork>empMinMax.max||(!shiftBags.byEmp.has(emp.id)&&wwt.maxWork=0&&ava&&ava.length>0){\n\n //check if fits into availability\n if(ava){\n if(!shiftOKweek){shiftOKweek=new Array(avail.weeks).fill(false)}\n if(sh.isFix){\n let fixShift= sh.getFixShift(taskTypeMap)\n durOK=true\n //number shift parts and availability parts are equal\n if(fixShift.tasks.length ==ava.length){\n let doFit = true\n for (let a=0;aaSpan.fi){doFit=false}\n }\n shiftOKweek[w]=doFit\n \n //check if shift fits any availability part\n }else if(fixShift.tasks.length==1){\n const shPart = fixShift.tasks[0]\n for (let a=0;a=aSpan.st&&shPart.fi<=aSpan.fi){shiftOKweek[w]=true}\n } \n }\n //if (ava.length==0){shiftOKweek[w]=false} ???\n }else{\n for(let a=0;a=aSpan.st&&sh.fiMin<=aSpan.fi&&sh.durMin<=aSpan.fi-aSpan.st){shiftOKweek[w]=true}\n }\n }\n }\n }else{\n stOK = true\n fiOK = true\n durOK = true\n\n }\n }\n if(shiftOKweek){\n stOK = true\n fiOK = true\n durOK = true\n let x = shiftOKweek.filter((s => s ==false)).length;\n if(x==avail.weeks){stOK=false;fiOK=false} \n }\n if(!stOK||!fiOK||!durOK){\n if(!warningCountArray[d].errorShifts.includes(s)){\n warningCountArray[d].errorShifts.push(s)}\n }\n }\n }\n }\n\n // check for days where no shift fits\n const weekDayFormat = new Intl.DateTimeFormat(useDataStore().language, { weekday: 'long' });\n let tempWarnings = new Array\n for(let d=0;d<7;d++){\n let dt=addDays( new Date(2000,1,7),d)\n if(warningCountArray[d].errorShifts.length>0&&warningCountArray[d].errorShifts.length==warningCountArray[d].shiftCount){tempWarnings.push(\"No shift fits availabilty on \"+ weekDayFormat.format(dt))}\n }\n if(tempWarnings.length==1){warnings.push(tempWarnings[0])}\n else if(tempWarnings.length>1){warnings.push(\"No shift fits availabilty on \"+tempWarnings.length + \" weekdays\")}\n\n // check for shifts that do not fit any days availability\n for(let s=0;sd*96){\n result.push({st:avail.stFi[i]-d*96,fi:avail.stFi[i+1]-d*96})\n }\n }\n return result\n }\n\n /**\n * @param {import(\"@/shared/dn-employee.js\").Employee} emp\n */\n function getMinMaxWeeklyWork(emp) {\n let retuenValue = { min: emp.agreedWorkWeek, max: emp.agreedWorkWeek }\n const minWorkWeek = emp.minWorkWeek ? emp.minWorkWeek : 0;\n const maxWorkWeek = emp.maxWorkWeek ? emp.maxWorkWeek : 7 * 24 * 60;\n if (emp.agreedWorkWeek > 0) {\n if (maxWorkWeek > emp.agreedWorkWeek) {\n retuenValue.max = maxWorkWeek;\n }\n if (minWorkWeek > 0) {\n retuenValue.min = minWorkWeek;\n }\n } else {\n retuenValue = { min: minWorkWeek, max: maxWorkWeek };\n }\n return retuenValue\n }\n\n function dayHasRotationShift(d,rotation){\n if(!rotation){return false}\n for(let w=0;w=b.minWork && a.minWork<=b.maxWork\n }\n\n \n function combine(a,b){\n let res=[]\n if(a.length==0){return b}\n for(let x=0;x { return value.minWork == sh.minWork&&value.maxWork == sh.maxWork })\n if(!duplicat){\n res.push(sh)\n }\n }\n }\n \n return res\n }\n }\n\n \n}\nexport function empSkillsRowIsIncluded(r){\n return empRowIsIncluded(useScheduleStore().employees.getById(r.id))\n}\n\nexport function empRowIsIncluded(r){\n const scheduleStore = useScheduleStore();\n //if(!scheduleStore.scheduleOptions.scheduleFilter.show){return true}\n let filter=scheduleStore.scheduleOptions.scheduleFilter\n let isIncludedByName=false\n let isIncludedBySkill=false\n let isIncludedByTag = false\n let includeByTermination= true\n \n if(filter.searchText.length>0){\n if( r.name.toLowerCase().includes(filter.searchText.toLowerCase())){isIncludedByName=true}\n }else{isIncludedByName=true}\n \n if(filter.callGroups.length>0){\n for(let c=0;c0){\n for(let t=0;tnew Date('2000-01-01')&&r.terminationDate 0) {\n let switchIdList = employee.switchIdList;\n for (const switchIdConflict of employeeSwitchConflicts) {\n switchIdList = switchIdList.filter(x => x !== switchIdConflict.id);\n }\n employee.switchIdList = switchIdList;\n }\n}\n\n/**\n * @param {import(\"@/shared/dn-employee\").Employee[]} employees\n */\nexport async function saveEmployees(employees) {\n let result = [];\n await new Promise((resolve) => {\n let promises = []\n for (let i = 0; i < employees.length; i++) {\n if (employees[i].hasChanges) {\n promises.push(patchEmployee(employees[i]).then(x => result.push(x)));\n }\n }\n Promise.all(promises).then(resolve).catch(error => {\n console.error(error.message)\n });\n });\n\n return result;\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { addDays } from '@/shared/dn-shared-helper.js';\nimport { Task } from '@/shared/dn-task.js';\n\n/**\n * @param {{st:Date; numberOfDays:number}[]} dateIntervals\n * @param {number} id\n * @param {boolean} idIsEmp\n * @return {Promise}\n */\nexport async function getScheduleTasks(dateIntervals, id, idIsEmp = false) {\n const result = await getTasks(dateIntervals, id, idIsEmp);\n return result.map(x => new Task(x));\n}\n\n/**\n * @param {{st:Date; numberOfDays:number}[]} dateIntervals\n * @param {number} id\n * @param {boolean} idIsEmp\n * @return {Promise}\n */\nexport async function getTasks(dateIntervals, id, idIsEmp = false) {\n const idParam = idIsEmp ? 'empId' : 'ccid';\n const st = dateIntervals.map(x => x.st.toISOString()).join(';');\n const fi = dateIntervals.map(x => (new Date(addDays(x.st, x.numberOfDays))).toISOString()).join(';');\n /** @type {import(\"@/shared/dn-task.js\").TaskDto[]} */\n const result = await fetchAndCheckJson(`scheduletasks?st=${st}&fi=${fi}&${idParam}=${id}`, 'GET');\n return result;\n}\n\n/**\n * @param {{st:Date; numberOfDays:number}[]} dateIntervals\n * @param {number} id\n * @param {boolean} idIsEmp\n * @param {{id:number;histId:number}} last\n * @return {Promise<{tasks:import(\"@/shared/dn-task.js\").TaskDto[];last:{id:number; histId:number};deleted?:number[];updated?:import(\"@/shared/dn-task.js\").TaskDto[]}>}\n */\nexport async function getScheduleTasksSync(dateIntervals, id, idIsEmp = false, last) {\n const idParam = idIsEmp ? 'empId' : 'ccid';\n const st = dateIntervals.map(x => x.st.toISOString()).join(';');\n const fi = dateIntervals.map(x => (new Date(addDays(x.st, x.numberOfDays))).toISOString()).join(';');\n\n /** @type {{tasks:import(\"@/shared/dn-task.js\").TaskDto[];last:{id:number; histId:number};deleted?:number[];updated?:import(\"@/shared/dn-task.js\").TaskDto[]}} */\n const result = await fetchAndCheckJson(`scheduletasks?st=${st}&fi=${fi}&${idParam}=${id}&minId=${last.id}&minHistId=${last.histId}`, 'GET');\n return result;\n}\n\n/**\n * @param {import(\"@/shared/dn-task.js\").TaskDto} dto\n */\nfunction getUniqueTaskDtoKey(dto) {\n const st = new Date(dto.st);\n return dto.empid + '_' + dto.tasktypeId + '_' + st.getTime();\n}\n\n/**\n * @param {Task} t\n */\nfunction getUniqueTaskKey(t) {\n return t.empid + '_' + t.tasktypeId + '_' + t.st.getTime();\n}\n\n/**\n * @param {{st:Date; numberOfDays:number}[]} dateIntervals\n * @param {number} id\n * @param {boolean} idIsEmp\n * @param {{id:number;histId:number}} last\n * @param {import(\"@/model/dn-schedule-task.js\").ScheduleTasks} scheduleTasks\n */\nexport async function updateScheduleTasks(dateIntervals, id, idIsEmp, last, scheduleTasks) {\n scheduleTasks.removeUnsavedDeletedTasks();\n const tasks = scheduleTasks.list;\n const result = await getScheduleTasksSync(dateIntervals, id, idIsEmp, last);\n let wasChanged = false\n if (result.deleted && result.deleted.length > 0) {\n const toDelete = new Set(result.deleted);\n for (let i = tasks.length - 1; i >= 0; i--) {\n const t = tasks[i];\n if (t.id >0 && toDelete.has(t.id)) {\n if (t.hasChanges) {\n t.id = -1;\n t.confirmChanges();\n } else {\n t.toDelete();\n tasks.splice(i, 1);\n }\n }\n }\n wasChanged = true;\n }\n\n if ((result.updated && result.updated.length > 0) || result.tasks.length > 0) {\n wasChanged = true;\n const currentById = new Map(tasks.filter(x => x.id > 0).map(x => [x.id, x]));\n const unsavedByUniqueKey = new Map(tasks.filter(x => x.id <= 0).map(x => [getUniqueTaskKey(x), x]));\n if (result.updated) {\n for (const dto of result.updated) {\n updateOrInsert(scheduleTasks, dto, currentById, unsavedByUniqueKey);\n }\n }\n for (const dto of result.tasks) {\n updateOrInsert(scheduleTasks, dto, currentById, unsavedByUniqueKey);\n }\n }\n\n last.id = result.last.id;\n last.histId = result.last.histId;\n return wasChanged;\n\n /**\n * @param {import(\"@/model/dn-schedule-task.js\").ScheduleTasks} scheduleTasks\n * @param {import(\"@/shared/dn-task.js\").TaskDto} dto\n * @param {Map} currentById\n * @param {Map} unsavedByUniqueKey\n */\n function updateOrInsert(scheduleTasks, dto, currentById, unsavedByUniqueKey) {\n let t = currentById.get(dto.id);\n if (t !== undefined) {\n t.update(dto);\n } else {\n const key = getUniqueTaskDtoKey(dto);\n t = unsavedByUniqueKey.get(key);\n if (t !== undefined) {\n t.update(dto);\n } else {\n t = scheduleTasks.add(dto);\n currentById.set(t.id, t);\n }\n }\n }\n}\n","import { getLoginInfo, setLoginInfo } from './dn-localStorage.js';\nimport { LoginInfo } from '@/model/dn-login.js';\nimport { EventBus } from \"./dn-event-bus.js\";\nconst apiPath = 'https://api-dot-secure-ripple-312910.nw.r.appspot.com/';\n\nexport function getApiPath() {\n return apiPath;\n}\n\n/**\n * @param {{ email: string; password: string; }} userCredentials\n * @param {{ loginId: number; password: string; }} [credentials2]\n * @returns {Promise<{msg?:string;cause?:number;loginId?:number; refreshToken?:string;accessToken?:string;user?:{id:number;email:string;name:string;authMethod:number|null;reqNotify:number|null}}>}\n */\nexport async function login(userCredentials, credentials2 = undefined) {\n const url = apiPath + 'authentication/user';\n const body = {\n strategy: 'local',\n email: userCredentials.email,\n password: userCredentials.password\n };\n\n if (credentials2) {\n body.loginId = credentials2.loginId;\n body.password2 = credentials2.password;\n }\n\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body)\n };\n\n try {\n const response = await fetch(url, options);\n const json = await response.json();\n if (response.ok) return json;\n \n let cause = 0;\n let msg;\n if (response.status === 401) {\n msg = 'Wrong email or password.';\n if (json.data) {\n cause = json.data.cause;\n console.log(cause)\n }\n } else { \n msg = response.statusText; \n }\n \n return { msg, cause};\n\n } catch (error) {\n console.log(error)\n return { msg: error.message};\n }\n}\n\nlet _lastUpdateAccessToken = 0;\n\n/**\n * @param {import(\"@/model/dn-login.js\").LoginInfo} loginInfo\n */\nexport async function updateAccessToken(loginInfo) {\n // avoid duplicated calls.\n if (Date.now() - _lastUpdateAccessToken < 1000 * 30) {\n let counter = 0;\n do {\n await new Promise((resolve) => {\n setTimeout(() => resolve(), 1000)\n });\n if (!loginInfo.needRefresh()) {\n return;\n }\n\n counter++;\n } while (counter < 10);\n\n return;\n }\n\n _lastUpdateAccessToken = Date.now();\n const url = apiPath + 'authentication/user';\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n 'strategy': 'local',\n 'action': 'refresh',\n 'refresh_token': loginInfo.refreshToken\n })\n };\n return await fetch(url, options).then(returnJson)\n .then(function (response) {\n loginInfo.setAuthRefreshResult(response);\n setLoginInfo(loginInfo);\n })\n}\n\nexport async function passwordReset(accCredentials) {\n const url = apiPath + 'user/change-password';\n const options = {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n 'accToReset': {\n 'userName': accCredentials.username,\n 'password': accCredentials.password,\n 'newPassword': accCredentials.newPassword\n }\n })\n };\n\n return await fetch(url, options)\n .then(function (response) {\n let result;\n console.log(response)\n if (response.status === 401) {\n result = {\n msg: 'Wrong username or password!',\n success: false\n }\n return result;\n }\n else if (response.status === 200) {\n result = {\n msg: 'Success',\n success: true\n }\n return result;\n }\n }).catch(function (error) {\n return error.statusText\n });\n}\n\n/**\n * @param {string} key\n * @param {(isAgent) => void} afterExternalLogin\n */\nexport async function externalLogin(key, afterExternalLogin) {\n const options = { method: 'PATCH' };\n const url = apiPath + `authentication/external/${key}`;\n try {\n /** @type {{accessToken:string, user: {id:number;email:string;isAgent:boolean;name:string, schema:string}}} */\n const result = await fetch(url, options).then(checkIfOk).then(returnJson);\n const loginInfo = new LoginInfo({ accessToken: result.accessToken, customerSchema: result.user.schema, isAgent: result.user.isAgent });\n setLoginInfo(loginInfo);\n afterExternalLogin(loginInfo.isAgent);\n } catch (error) {\n afterExternalLogin();\n }\n}\n\nexport function getSchemas() {\n return fetchAndCheckJson('schema-selection/', 'GET')\n}\n\nexport function getLongestCalls(date, maxToReturn, longestCallKind) {\n let path =\n 'callDetails/longestCalls?dt=' +\n date +\n '&maxToReturn=' +\n maxToReturn +\n '&longestCallKind=' +\n longestCallKind;\n return fetchAndCheckJson(path, 'GET');\n}\n\nexport async function getCustomerData(schema) {\n let path = 'customer-data';\n if (schema)\n path += '?schema=' + schema;\n return await fetchAndCheckJson(path, 'GET');\n}\n\nexport async function saveForecastAdjustment(adjustmentsToSave){\n await fetchAndCheckJson(`forecastadjustment`,'POST', adjustmentsToSave);\n}\n\n/**\n * @param {number} contactCenterId\n * @param {FormData} formData\n */\nexport async function importEmployeeData(contactCenterId, formData) {\n let loginInfo = getLoginInfo();\n if (loginInfo === null) {\n throw 'No login.';\n }\n\n if (loginInfo.needRefresh()) {\n await updateAccessToken(loginInfo);\n }\n const accessToken = loginInfo.accessToken;\n const response = await fetch(`${apiPath}import-employee-data?ccId=${contactCenterId}`, {\n method: 'POST',\n headers: {\n Authorization: 'Bearer ' + accessToken,\n 'dn-customer-schema': loginInfo.customerSchema\n },\n body: formData\n });\n\n if (response.status !== 201) {\n let json = await response.json();\n throw json.message;\n }\n\n return await response.text();\n}\n\n/**\n * @param {string} resource\n * @param {string} method\n * @param {any} data\n */\nasync function fetchAndCheck(resource, method, data) {\n EventBus.emit('onError', null);\n const loginInfo = getLoginInfo();\n if (loginInfo === null) {\n return Promise.reject(new Error('No login.'));\n }\n\n if (loginInfo.needRefresh()) {\n await updateAccessToken(loginInfo);\n }\n\n const options = getOptions(method, loginInfo, data);\n var url = apiPath + resource;\n return fetch(url, options)\n .then(checkIfOk)\n .catch(function (error) {\n EventBus.emit('onError', error.message);\n return Promise.reject(error);\n });\n}\n\nexport async function fetchAndCheckJson(resource, method, data = undefined) {\n return fetchAndCheck(resource, method, data).then(returnJson);\n}\n\nfunction checkIfOk(response) {\n if (response.ok) return response;\n let msg = '';\n if (response.status === 401) EventBus.emit('unauthorized');\n else msg = response.statusText;\n throw new Error(msg);\n}\n\nfunction returnJson(response) {\n if (response.status === 204) return null;\n return response.json();\n}\n\n/**\n * @param {string} method\n * @param {import(\"@/model/dn-login.js\").LoginInfo} loginInfo\n * @param {any} data\n * @return {RequestInit}\n */\nfunction getOptions(method, loginInfo, data) {\n if (data === undefined || data === null) {\n return {\n method: method,\n headers: {\n Authorization: 'Bearer ' + loginInfo.accessToken,\n 'dn-customer-schema': loginInfo.customerSchema\n }\n };\n }\n\n return {\n method: method,\n headers: {\n Authorization: 'Bearer ' + loginInfo.accessToken,\n 'Content-Type': 'application/json',\n 'dn-customer-schema': loginInfo.customerSchema\n },\n\n body: JSON.stringify(data)\n };\n}","import { getStartOfWeek } from '@/js/dn-helper.js';\nimport { addDays, getShortDate, getStartOfDay } from '@/shared/dn-shared-helper.js';\n\n/**\n * @param {Date} nowDt\n * @param {{ forecastWeeks: number; historicFocusDate:null|Date; historicWeeks: number; occupacyFte: number; }} forecastOptions\n * @param {Map} specialDays\n * @param {Map} historicDataMap\n * @param {{id:number}[]} callGroups\n * @param {{id:number}[]} dayTypes\n */\nexport function getAllWeekData(nowDt,forecastOptions,specialDays,historicDataMap,callGroups, dayTypes) {\n const returnData = new Map();\n let startDate=new Date()\n if(forecastOptions.historicFocusDate!==null){\n startDate = getStartOfWeek(addDays(new Date(forecastOptions.historicFocusDate), 0)); /* mon or sun of the youngset week */\n }else{\n startDate = getStartOfWeek(addDays(new Date(nowDt), forecastOptions.forecastWeeks * 7)); /* mon or sun of the youngset week */\n }\n\n\n for (let a = 0; a < callGroups.length; a++) {\n let weekMap = new Map();\n /* NORMAL DAYS including special days during normal period*/\n for (let w = 0; w < forecastOptions.historicWeeks + forecastOptions.forecastWeeks; w++) {\n let dtweekStart = getStartOfWeek(addDays(startDate, 1 - w * 7));\n\n let wArray = []; /* 7 days */\n for (let d = 0; d <= 6; d++) {\n let dtx = addDays(dtweekStart, d);\n wArray.push(getDayData(callGroups[a].id, dtx, forecastOptions.occupacyFte,historicDataMap));\n }\n weekMap.set(getShortDate(dtweekStart), wArray);\n }\n\n /* SPECIAL DAYS*/\n if(forecastOptions.historicFocusDate===null){\n for (let dx = 1; dx < dayTypes.length; dx++) {\n let itr = historicDataMap.keys();\n for (let i = 0; i < historicDataMap.size; i++) {\n let key = itr.next().value;\n let histData =historicDataMap.get(key);\n\n if (specialDays.has(getShortDate(histData.dt))) {\n if (histData.acgr == callGroups[a].id && specialDays.get(getShortDate(histData.dt)) == dayTypes[dx].id) {\n let dt = new Date(histData.dt);\n let wArray = [];\n let dtweekStart = getStartOfWeek(dt);\n let dtkey = getShortDate(dtweekStart);\n if (weekMap.has(dtkey)) {\n wArray = weekMap.get(dtkey);\n } else {\n for (let d = 0; d <= 6; d++) {\n wArray.push({ weekdayindex: d, dt: null, fte: 0, ffte: 0, noc: 0, fnoc: 0, aht: 0, faht: 0, nocRms: 8, dayType: 0, isChecked: false });\n }\n }\n wArray[dt.getDay()] = getDayData(callGroups[a].id, dt, forecastOptions.occupacyFte,historicDataMap);\n weekMap.set(dtkey, wArray);\n }\n }\n }\n }\n }\n\n /* Transfer data from weekMap to weeklists */\n let itr2 = weekMap.keys();\n let weekList = []; /* One row per week */\n for (let i = 0; i < weekMap.size; i++) {\n let key = itr2.next().value;\n let val = weekMap.get(key);\n let dt = new Date(key);\n let weeknumber = dt.getWeekNumber();\n\n if (new Date(dt).getFullYear() != nowDt.getFullYear()) {\n weeknumber = dt.getFullYear() + ' ' + dt.getWeekNumber();\n }\n\n weekList.push({ week: 'w ' + weeknumber, weekdata: val });\n }\n let key = callGroups[a].id;\n returnData.set(key, weekList);\n }\n return returnData;\n}\nexport function updateForecastInAllWeekData(callStatsWeekMap, nowDt, forecastOptions, specialDaysMap, forecastAdjustmentmap,historicDataMap,aiForecastMap,callGroups, latestImportDate) {\n let focusDt =nowDt\n if(forecastOptions.historicFocusDate!==null){ focusDt = forecastOptions.historicFocusDate }\n for (let a = 0; a < callGroups.length; a++) {\n let key = callGroups[a].id;\n let weekList = callStatsWeekMap.get(key);\n for (let w = 0; w < weekList.length; w++) {\n for (let d = 0; d < 7; d++) {\n let dayData = weekList[w].weekdata[d];\n const dt = new Date(dayData.dt);\n const forc = getForcastXX(dt, focusDt, specialDaysMap, forecastOptions.historicWeeks, callGroups[a], historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate);\n dayData.fnoc = parseInt(forc.noc.reduce((a, b) => a + b, 0));\n if (dayData.fnoc > 0) {\n dayData.faht = forc.ht.reduce((a, b) => a + b, 0) / dayData.fnoc;\n dayData.ffte = (dayData.faht * dayData.fnoc) / (96*900*(forecastOptions.occupacyFte/100));\n }\n dayData.nocRms=dayData.noc*getRMS(callGroups[a].id,dt,forc.noc,historicDataMap)\n }\n }\n }\n return callStatsWeekMap;\n}\n\nfunction getRMS(acgr,dt,fnoc,historicDataMap){\n let keyx = acgr + '_' + dt.yyyymmdd();\n let seriesData = {};\n if (historicDataMap.has(keyx)) {\n seriesData = historicDataMap.get(keyx);\n let sq= seriesData.nocData.map(function(x, index) {return Math.pow((fnoc[index] -x),2) });\n let sqRef=seriesData.nocData.map(function(x, index) {return Math.pow((x),2) });\n let refRMS =Math.sqrt(sqRef.reduce((a, b) => a + b, 0) / 96)\n let RMS =Math.sqrt(sq.reduce((a, b) => a + b, 0) / 96)\n if(refRMS>0){return 100*RMS/refRMS;}\n }\n return 0\n}\n\n\n\n/**\n * @param {{ selectedParameters: string[]; compareWithForecast: boolean; selectedCallGroups: {id:number;forecastMethod:number}[]; selectedDates: any[]; historicWeeks: number; occupacyFte: number}} forecastOptions\n * @param {Map} specialDaysMap\n * @param {Date} dateNow\n * @param {Map>} forecastAdjustmentmap\n * @param {Map} historicDataMap\n * @param {import(\"@/stores/dn-forecast-ai-data.js\").ForecastDataMap} aiForecastMap\n * @param {Date} latestImportDate\n */\nexport function getChartData(forecastOptions, specialDaysMap,dateNow,forecastAdjustmentmap,historicDataMap,aiForecastMap, latestImportDate) {\n const selectedCallGroups = forecastOptions.selectedCallGroups;\n const dates = forecastOptions.selectedDates;\n const params = forecastOptions.selectedParameters;\n let returnValue = [];\n\n if (params.length == 1) {\n if(dates.length == 1){\n switch (params[0]) {\n case \"noc\":\n\n if (isForecast(dates[0])) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], 'fnoc', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap,historicDataMap, aiForecastMap, latestImportDate));\n } else {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], params[0], dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n if (forecastOptions.compareWithForecast) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], 'fnoc', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n }\n }\n break;\n case \"aht\":\n if (isForecast(dates[0])) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], 'faht', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n } else {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], params[0], dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n if (forecastOptions.compareWithForecast) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], 'faht', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n }\n }\n break;\n case \"fte\":\n if (isForecast(dates[0])) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], 'ffte', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n } else {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], params[0], dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n if (forecastOptions.compareWithForecast) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[0], 'ffte', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n }\n }\n break;\n default:\n console.log(\"in default\");\n }\n }else{\n for (let i = 0; i < dates.length; i++) {\n switch (params[0]) {\n case \"noc\":\n\n if (isForecast(dates[i])) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[i], 'fnoc', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n } else {\n returnValue.push(getChartSerie(selectedCallGroups, dates[i], params[0], dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n }\n break;\n case \"aht\":\n if (isForecast(dates[i])) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[i], 'faht', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n } else {\n returnValue.push(getChartSerie(selectedCallGroups, dates[i], params[0], dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n\n }\n break;\n case \"fte\":\n if (isForecast(dates[i])) {\n returnValue.push(getChartSerie(selectedCallGroups, dates[i], 'ffte', dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n } else {\n returnValue.push(getChartSerie(selectedCallGroups, dates[i], params[0], dateNow, specialDaysMap, forecastOptions,forecastAdjustmentmap, historicDataMap,aiForecastMap, latestImportDate));\n }\n break;\n default:\n console.log(\"in default\");\n }\n }\n }\n return returnValue;\n }\n\n if (dates.length == 1) {\n for (let i = 0; i 1&¶ms.length>1){\n returnValue = []\n }\n\n return returnValue;\n function isForecast(dt){\n return (new Date(dt) >= new Date(dateNow) || dt == dateNow)\n }\n}\n\n/**\n * @param {Date} dt\n * @param {number} length\n * @param {Date} nowDt\n * @param {Map} specialDaysMap\n * @param {number} numberOfWeeks\n * @param {object} acgr\n * @param {Map} historicDataMap\n * @param {import(\"@/stores/dn-forecast-ai-data.js\").ForecastDataMap} aiForecastMap\n * @param {Map>} forecastAdjustmentmap\n * @param {Date} latestImportDate\n */\nexport function getForcastOnInterval(dt, length, nowDt, specialDaysMap, numberOfWeeks, acgr, historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate) {\n const indexesPerDay = 96;\n const startOfDay = getStartOfDay(dt);\n if (length === indexesPerDay && startOfDay.getTime() === dt.getTime()) {\n return getForcastXX(dt, nowDt, specialDaysMap, numberOfWeeks, acgr, historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate);\n }\n\n const msPerIndex = 1000*60*15;\n const startIndex = Math.floor((dt.getTime() - startOfDay.getTime()) / msPerIndex);\n const lengthNextDay = Math.max(0, startIndex + length - indexesPerDay);\n const lengthStartDay = length - lengthNextDay;\n const forecast = getForcastXX(startOfDay, nowDt, specialDaysMap, numberOfWeeks, acgr, historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate);\n forecast.ht = forecast.ht.slice(startIndex, startIndex + lengthStartDay);\n forecast.noc= forecast.noc.slice(startIndex, startIndex + lengthStartDay);\n if (lengthNextDay > 0) {\n const nextDay = addDays(startOfDay, 1);\n const forecastNextDay = getForcastXX(nextDay, nowDt, specialDaysMap, numberOfWeeks, acgr, historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate);\n forecast.ht = forecast.ht.concat(forecastNextDay.ht.slice(0, lengthNextDay));\n forecast.noc = forecast.noc.concat(forecastNextDay.noc.slice(0, lengthNextDay));\n }\n\n return forecast;\n}\n\n/**\n * Calculate forecast for one given day\n * @param {Date} dt\n * @param {Date} nowDt\n * @param {Map} specialDaysMap\n * @param {number} numberOfWeeks\n * @param {{id:number;forecastMethod:number}} acgr\n * @param {Map} historicDataMap\n * @param {import(\"@/stores/dn-forecast-ai-data.js\").ForecastDataMap} aiForecastMap\n * @param {Map>} forecastAdjustmentmap\n * @param {Date} latestImportDate\n */\nexport function getForcastXX(dt, nowDt, specialDaysMap, numberOfWeeks, acgr, historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate,ignoreCopiedData=false) {\n \n let adjInfo =getAdj(dt, acgr.id, forecastAdjustmentmap);\n let daytype = getDaytype(dt, specialDaysMap);\n if (!latestImportDate) { latestImportDate = nowDt; }\n\n /** @type {number[]}} */\n let nocSum = new Array(96).fill(0);\n /** @type {number[]}} */\n let htSum = new Array(96).fill(0);\n\n if(acgr.forecastMethod==1){\n let keyx = acgr.id + '_' + getShortDate(dt);\n if(aiForecastMap.has(keyx)){\n let x = aiForecastMap.get(keyx)\n nocSum = x.nocData\n for (let i = 0; i < 96; i++) {\n htSum[i]= x.ahtData[i] * x.nocData[i]\n }\n }\n }else{\n\n //future days same forecast as earliest future day\n if (dt.getTime() >= nowDt.getTime()) {\n let weekOffset = Math.floor((dt.getTime() - nowDt.getTime()) / (60 * 60 * 24 * 1000 * 7));\n dt = addDays(dt, -weekOffset * 7);\n }\n let numberOfDysCounter = 0;\n\n if (daytype == 0) {\n for (let wx = 1; wx < numberOfWeeks + 1; wx++) {\n let dtx = addDays(new Date(dt), -wx * 7);\n let keyx = acgr.id + '_' + getShortDate(dtx);\n let histData = {};\n\n //exclude days that are not complete\n if (historicDataMap.has(keyx)&&dtx<=addDays(latestImportDate, -1)) {\n histData = historicDataMap.get(keyx);\n let daytypex = getDaytype(dtx, specialDaysMap);\n if(histData.nocData.reduce((a, b) => a + b, 0)>0){\n if (daytypex == 0) {\n nocSum = nocSum.map(function(x, index) {\n return histData.nocData[index] + x;\n });\n htSum = htSum.map(function(x, index) {\n return histData.nocData[index] * histData.ahtData[index] + x;\n });\n numberOfDysCounter++;\n }\n }\n }\n }\n } else {\n let itr = historicDataMap.keys();\n for (let i = 0; i < historicDataMap.size; i++) {\n let key = itr.next().value;\n let histData = historicDataMap.get(key);\n let dtx = histData.dt;\n if (dtx < dt) {\n let daytypex = getDaytype(dtx, specialDaysMap);\n\n if (histData.acgr == acgr.id && daytypex == daytype) {\n if(histData.nocData.reduce((a, b) => a + b, 0)>0){\n nocSum = nocSum.map(function(x, index) {\n return histData.nocData[index] + x;\n });\n htSum = htSum.map(function(x, index) {\n return histData.nocData[index] * histData.ahtData[index] + x;\n });\n numberOfDysCounter++;\n }\n }\n }\n }\n }\n\n/*\nlet isDemo=false\n let loginInfo = dnLocalStorage.getLoginInfo();\n if(loginInfo && loginInfo.customerSchema == 'demo'){isDemo=true}\n if (numberOfDysCounter > 0) {\n nocSum = nocSum.map(function(x) {\n if(isDemo){return 1*x / numberOfDysCounter;}else{return x / numberOfDysCounter;}\n });\n htSum = htSum.map(function(x) {\n if(isDemo){return 1*x / numberOfDysCounter;}else{return x / numberOfDysCounter;}\n });\n } */\n\n//*************************************************************************** */\n if (numberOfDysCounter > 0) {\n nocSum = nocSum.map(function(x) {\n return x / numberOfDysCounter;\n });\n htSum = htSum.map(function(x) {\n return x / numberOfDysCounter;\n });\n }\n\n}\n //*************************************************************************** */\n\n /* STATIC COPIED DATA */\n if (adjInfo.copiedNocAht&&!ignoreCopiedData) {\n nocSum=adjInfo.copiedNocAht.noc\n htSum=adjInfo.copiedNocAht.ht\n }\n\n //ADJUSTEMENT\n if (adjInfo.nocAdj!=0) {\n return adjustSeries(htSum,nocSum, adjInfo.nocAdj,adjInfo.quarterRange)\n }\n\n/* nocSum = new Array(96).fill(0)\n htSum = new Array(96).fill(0*300)\n\n nocSum[48] = 5\n htSum[48] = 5*300 */\n\n return { noc: nocSum, ht: htSum };\n}\n\nfunction adjustSeries(ht,noc, adj,quarterRange) {\n let qr =[0,96]\n if(quarterRange){qr=quarterRange}\n let nocAdj = []\n let s = noc.map(function(x,index) {return index>=qr[0]&&index a + b, 0);\n if (s != 0) {\n nocAdj = noc.map(function(x,index) {return index>=qr[0]&&index0 ? x*nocAdj[index]/noc[index]:0});\n }\n return { noc: nocAdj, ht: ht };\n}\n\n/**\n * @param {string} parameter\n */\nexport function getForecastSetValue(parameter) {\n let returnValue = { setValue: 0, minimum: 0, maximum: 0 };\n switch (parameter) {\n case 'SL':\n returnValue = { setValue: 80, minimum: 70, maximum: 90 };\n break;\n default:\n console.log('in default');\n }\n return returnValue;\n}\n\n/**\n * @param {Date} dt\n * @param {number} acgr\n * @param {Map>} forecastAdjustmentmap\n */\nfunction getAdj(dt, acgr, forecastAdjustmentmap) {\n let adj = {nocAdj:0,quarterRange:[0,96],copiedNocAht:null};\n let timerange = null\n const day = getShortDate(dt);\n if (forecastAdjustmentmap.has(day)) {\n let adjMap = forecastAdjustmentmap.get(day);\n if (adjMap.has(acgr)) {\n adj = adjMap.get(acgr);\n }\n }\n\n return adj;\n}\n\n/**\n * @param {{id:number;forecastMethod:number}[]} selectedCallGroups\n * @param {string | number | Date} dt\n * @param {string} param\n * @param {Date} nowDt\n * @param {Map} specialDaysMap\n * @param {{ historicWeeks: number; occupacyFte: number; }} forecastOptions\n * @param {Map>} forecastAdjustmentmap\n * @param {Map} historicDataMap\n * @param {import(\"@/stores/dn-forecast-ai-data.js\").ForecastDataMap} aiForecastMap\n * @param {Date} [latestImportDate]\n */\nexport function getChartSerie(selectedCallGroups, dt, param, nowDt, specialDaysMap, forecastOptions, forecastAdjustmentmap,historicDataMap,aiForecastMap, latestImportDate) {\n\n let shortDate = getShortDate(new Date(dt));\n\n let nocArray = Array(96).fill(0);\n let htArray = Array(96).fill(0);\n\n let returnArray = [];\n\n for (let a = 0; a < selectedCallGroups.length; a++) {\n let key = selectedCallGroups[a].id + '_' + shortDate;\n let nocData = [];\n let htData = [];\n if (param == 'noc' || param == 'aht' || param == 'fte') {\n let seriesData = {};\n if (historicDataMap.has(key)) {\n seriesData = historicDataMap.get(key);\n\n nocData = seriesData.nocData;\n htData = seriesData.ahtData.map(function(x, index) {\n return x * nocData[index];\n });\n }\n } else {\n const x = getForcastXX(new Date(dt), nowDt, specialDaysMap, forecastOptions.historicWeeks, selectedCallGroups[a], historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate);\n nocData = x.noc;\n htData = x.ht;\n }\n\n //if day is 23 hours due to day shortening\n if(nocData.length0? (htArray[index] / x):0;\n });\n break;\n case 'fte':\n case 'ffte':\n scaleindex=2;\n returnArray = htArray.map(function(x) {\n return x / (900*(forecastOptions.occupacyFte/100));\n });\n break;\n default:\n break;\n }\n\n return {\n label: param,\n dt: dt,\n parameterData: returnArray,\n scaleIndex: scaleindex\n };\n}\n\n/**\n * @param {Date} dt\n * @param {Map} specialDaysMap\n */\nexport function getDaytype(dt, specialDaysMap) {\n const key = getShortDate(dt);\n const daytype = specialDaysMap.get(key);\n if (daytype === undefined)\n return 0;\n\n return daytype;\n}\n\n/* calculate avg for hisoric data */\n/**\n * @param {string | number} acgr\n * @param {Date} dt\n * @param {number} occupancyFte\n * @param {Map} historicDataMap\n */\nfunction getDayData(acgr, dt, occupancyFte,historicDataMap) {\n let key = acgr + '_' + getShortDate(dt);\n if (historicDataMap.has(key)) {\n let x = historicDataMap.get(key);\n let noc = 0;\n let ht = 0;\n for (let i = 0; i <= 95; i++) {\n noc += x.nocData[i];\n ht += x.ahtData[i] * x.nocData[i];\n }\n return { weekdayindex: dt.getDay(), dt: dt, fte: ht / (96*900*(occupancyFte/100)), ffte: 0, noc: parseInt(noc), fnoc: 0, aht: (noc>0)?(ht / noc):0, faht: 0, nocRms: 0, isChecked: false };\n } else {\n return { weekdayindex: dt.getDay(), dt: dt, fte: 0, ffte: 0, noc: 0, fnoc: 0, aht: 0, faht: 0, nocRms: 0, isChecked: false };\n }\n}\n\n/**\n * @param {Map} callStatsWeekMap\n * @param {{ selectedCallGroups: {id:number}[]; focusedDaytyp: { id: number; system: boolean; }; }} forecastOptions\n * @param {Map} specialDaysMap\n */\nexport function getCallStatsWeek(callStatsWeekMap, forecastOptions, specialDaysMap) {\n if (callStatsWeekMap) {\n const callGroups = forecastOptions.selectedCallGroups;\n let returnArray = [];\n if (callGroups.length > 0) {\n const numberOfRows = callStatsWeekMap.get(callGroups[0].id).filter(isValidWeekRow).length;\n\n if (callGroups.length == 1) {\n returnArray = callStatsWeekMap.get(callGroups[0].id).filter(isValidWeekRow);\n } else {\n for (let j = 0; j < numberOfRows; j++) {\n let weekdata = [];\n for (let d = 0; d <= 6; d++) {\n weekdata.push(getEmptyDayData(d))\n }\n returnArray.push({ week: '', weekdata: weekdata });\n }\n for (let j = 0; j < numberOfRows; j++) {\n for (let i = 0; i < callGroups.length; i++) {\n const callStatWeekData = callStatsWeekMap.get(callGroups[i].id).filter(isValidWeekRow);\n for (let d = 0; d <= 6; d++) {\n returnArray[j].weekdata[d] = addWeeks(returnArray[j].weekdata[d], callStatWeekData[j].weekdata[d]);\n }\n }\n\n returnArray[j].week = callStatsWeekMap.get(callGroups[0].id).filter(isValidWeekRow)[j].week\n }\n }\n\n return returnArray;\n } else {\n return [];\n }\n }\n\n function isValidWeekRow(item) {\n let returnValue = false;\n for (let i = 0; i < 7; i++) {\n if (item.weekdata[i].dt != null) {\n if (forecastOptions.focusedDaytyp.id == specialDaysMap.get(getShortDate(item.weekdata[i].dt)) ||\n forecastOptions.focusedDaytyp.system) {\n returnValue = true;\n }\n }\n }\n return returnValue;\n }\n function addWeeks(item1, item2) {\n /* TODO Skulle det gÃ¥ snabbare om man inte skapade ett nytt objekt? */\n return {\n weekdayindex: item1.weekdayindex,\n dt: item2.dt,\n fte: item1.fte + item2.fte,\n ffte: item1.ffte + item2.ffte,\n noc: item1.noc + item2.noc,\n fnoc: item1.fnoc + item2.fnoc,\n aht: item1.noc + item2.noc > 0 ? (item1.noc * item1.aht + item2.aht * item2.noc) / (item1.noc + item2.noc) : 0,\n faht: item1.fnoc + item2.fnoc > 0 ? (item1.fnoc * item1.faht + item2.faht * item2.fnoc) / (item1.fnoc + item2.fnoc) : 0,\n nocRms: item1.nocRms + item2.nocRms,\n isChecked: false\n };\n }\n function getEmptyDayData(weekdayInedx) {\n return {\n weekdayindex: weekdayInedx,\n dt: null,\n fte: 0,\n ffte: 0,\n noc: 0,\n fnoc: 0,\n aht: 0,\n faht: 0,\n nocRms: 0,\n isChecked: false\n };\n }\n}\n\n/**\n * @param {{type:string,forecast:boolean}} kind \n * @param {Map} callsData \n * @param {Date} dt \n * @param {Array} [selectedCallGroups=[]] \n * @param {object} [selectedAdjustmentRow=null] \n */\nexport function exportToFile(kind, callsData, dt, selectedCallGroups = [], selectedAdjustmentRow = null) {\n const callsDataToExport = callsData instanceof Map ? callsData : new Map(callsData);\n const formattedDate = getShortDate(dt);\n let csvContent = \"\";\n let filename = \"\";\n\n if (kind.type === 'row') {\n if (!selectedAdjustmentRow?.acgr?.id) {\n console.error(\"Invalid selected row data.\");\n return;\n }\n\n const rowId = selectedAdjustmentRow.acgr.id;\n if (!callsDataToExport.has(rowId)) {\n console.error(`No data found in the map for row ID: ${rowId}`);\n return;\n }\n\n const entry = callsDataToExport.get(rowId);\n const maxLength = Math.max(entry.noc.length, entry.ht.length);\n const emptyColumns = new Array(maxLength).fill(\"\").join(\",\");\n const csvHeader = `callgroup,date,param,${emptyColumns}\\n`;\n const csvRows = [\n `${rowId},${formattedDate},noc,${entry.noc.join(\",\")}`,\n `${rowId},${formattedDate},ht,${entry.ht.join(\",\")}`\n ];\n\n csvContent = csvHeader + csvRows.join(\"\\n\");\n if(kind.forecast){\n filename = `simTree forecast noc&ht for callgroup ${rowId} ${formattedDate}.csv`;\n } else {\n filename = `simTree actual noc&ht for callgroup ${rowId} ${formattedDate}.csv`;\n }\n\n } else if (kind.type === 'day') {\n if (!selectedCallGroups.length) {\n console.error(\"No selected callgroup provided.\");\n return;\n }\n\n const csvHeader = `callgroup,date,param,values\\n`;\n let csvRows = [];\n\n for (const callGroup of selectedCallGroups) {\n if (callsDataToExport.has(callGroup.id)) {\n const entry = callsDataToExport.get(callGroup.id);\n csvRows.push(`${callGroup.id},${formattedDate},noc,${entry.noc.join(\",\")}`);\n csvRows.push(`${callGroup.id},${formattedDate},ht,${entry.ht.join(\",\")}`);\n } else {\n console.warn(`No data found for callgroup ID: ${callGroup.id}`);\n }\n }\n\n csvContent = csvHeader + csvRows.join(\"\\n\");\n if(kind.forecast){\n filename = `simTree forecast noc&ht on ${formattedDate}.csv`;\n } else {\n filename = `simTree actual noc&ht on ${formattedDate}.csv`;\n }\n\n } else {\n console.error(\"Invalid export type.\");\n }\n\n const blob = new Blob([csvContent], { type: \"text/csv\" });\n const url = URL.createObjectURL(blob);\n const downloadAnchor = document.createElement(\"a\");\n downloadAnchor.href = url;\n downloadAnchor.download = filename;\n document.body.appendChild(downloadAnchor);\n downloadAnchor.click();\n document.body.removeChild(downloadAnchor);\n URL.revokeObjectURL(url);\n}\n/**\n * @param {string} type\n * @param {object} [selectedAdjustmentRow=null] \n */\n\nexport function importFromCsv(type,selectedAdjustmentRow){\n console.log(\"Import triggered\");\n return new Promise((resolve, reject) => { \n const fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".csv\";\n fileInput.style.display = \"none\";\n fileInput.addEventListener(\"change\", async (event) => {\n const file = event.target.files[0];\n if (!file) return;\n\n try {\n let fileContent = await file.text();\n const lines = fileContent.split(\"\\n\").map(line => line.trim()).filter(line => line);\n \n if (lines.length < 2) {\n console.error(\"Invalid CSV format.\");\n return;\n }\n\n const importedCallsData = new Map();\n\n for (let i = 1; i < lines.length; i++) {\n const cols = lines[i].split(\",\");\n\n if (cols.length < 3) continue; \n\n const callgroup = parseInt(cols[0]);\n const param = cols[2].trim();\n const values = cols.slice(3).map(Number);\n if (!importedCallsData.has(callgroup)) {\n importedCallsData.set(callgroup, { noc: [], ht: [] });\n }\n\n importedCallsData.get(callgroup)[param] = values;\n }\n if(type==='row'){\n let row = selectedAdjustmentRow;\n row.copiedNocAht = importedCallsData.values().next().value;\n row.baseNoc = parseInt(row.copiedNocAht.noc.reduce((sum, val) => sum + val, 0));\n resolve(row);\n } else {\n resolve(importedCallsData);\n }\n\n } catch (error) {\n reject(error);\n }\n});\n document.body.appendChild(fileInput);\n fileInput.click();\n setTimeout(() => fileInput.remove(), 1000); \n})\n}\n","import { getDayDiff, getStartOfDay } from '@/shared/dn-shared-helper.js';\n\n/**\n * @param {any[]} array\n * @param {number} factor\n */\nexport function condence(array, factor, round = true) {\n let returnArray = []\n if (array) {\n for (let i = 0; i < array.length; i++) {\n let s = 0\n let nullCounter = 0\n for (let j = 0; j < factor; j++) {\n if (array[i] === null) { nullCounter += 1 }//if no calls sl is null\n else { s += array[i] }\n if (j > 0) { i++ }\n }\n if (nullCounter == factor) { returnArray.push(null) }\n else {\n if (round) { returnArray.push(Math.round(s / factor)) } else { returnArray.push(s / factor) }\n }\n }\n }\n return returnArray\n}\n\n/**\n * Chart resolution\n * @param {number} numberOfDays\n */\nexport function getDisplayResolutionFactor(numberOfDays) {\n let displayResolutionFactor = 1;\n if (numberOfDays <= 2) {\n displayResolutionFactor = 1;\n } else if (numberOfDays <= 7) {\n displayResolutionFactor = 2;\n } else if (numberOfDays <= 28) {\n displayResolutionFactor = 4;\n } else {\n displayResolutionFactor = 24;\n }\n return displayResolutionFactor;\n}\n\n/**\n * @param {Date[]} intervalMinusOneDay\n */\nexport function getNumberOfDaysFromIntervalMinusOne(intervalMinusOneDay) {\n return 1 + getDayDiff(intervalMinusOneDay[1], intervalMinusOneDay[0])\n}\n\n/**\n * @param {Date} dt\n */\nexport function getElapsedTimeString(dt) {\n let elapsed = Math.floor((Date.now() - dt.getTime()) / 1000);\n if (elapsed < 1) { return 'now';}\n let unit = 'second';\n if (elapsed >= 60) {\n elapsed = Math.floor(elapsed / 60);\n unit = 'minute';\n if (elapsed >= 60) {\n elapsed = Math.floor(elapsed / 60);\n unit = 'hour';\n if (elapsed >= 24) {\n elapsed = Math.floor(elapsed / 24);\n unit = 'day';\n }\n }\n }\n\n if (elapsed > 1) {\n unit = unit + 's';\n }\n\n return `${elapsed} ${unit} ago`;\n}\n\n/**\n * @param {Date} dt\n * @param {number} empid\n */\nexport function getSelectionKey(dt, empid) {\n return getStartOfDay(dt).getTime() + '_' + empid;\n}\n\n/**\n * @param {string | number | Date} dt\n * @param {number} weekStartDay\n */\nexport function getStartOfWeek(dt, weekStartDay = 0) {\n let d = new Date(dt);\n d = new Date(d.getFullYear(), d.getMonth(), d.getDate());\n let dayIndex = d.getDay() - weekStartDay;\n if (dayIndex < 0) { dayIndex += 7; }\n d.setDate(d.getDate() - dayIndex);\n return d;\n}\n\n/**\n * @param {{id:number}[]} idObjList\n */\nexport function getUniqueNegativeId(idObjList) {\n let id = 0;\n for (const idObj of idObjList) {\n id = Math.min(id, idObj.id);\n }\n return id - 1;\n}\n\n/**\n * Checks if the second array is a subset of the first.\n * @param {any[]} sortedArray\n * @param {any[]} sortedArray2\n */\nexport function isSubset(sortedArray, sortedArray2) {\n if (sortedArray.length >= sortedArray2.length) {\n let i = 0;\n for (const value of sortedArray2) {\n while (i < sortedArray.length && sortedArray[i] != value) {\n i += 1;\n }\n if (i >= sortedArray.length) {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n/**\n * @param {any[]} array\n */\nexport function shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\n /**\n * @param {Intl.LocalesArgument} lang\n * @param {Array} dtRange\n * @param {Number} incrementPerQuarter //tested with 1 or 3 (15 or 5 min)\n * @param {String} hourFormat\n */\n export function timeRangeInformation(lang, dtRange, incrementPerQuarter, hourFormat) {\n const st = dtRange[0];\n const fi = dtRange[1];\n if (st > 0 || fi < 96*incrementPerQuarter) {\n let options = { hour: 'numeric', minute: '2-digit' };\n if(hourFormat == \"24\"){\n options.hour12 = false;\n } else if(hourFormat == \"12\"){\n options.hour12 = true;\n }\n let dtFormat = new Intl.DateTimeFormat(lang, options);\n const zero = new Date(2000, 0, 1);\n const ticksPerInterval = 1000 * 60 * 15/incrementPerQuarter;\n const stDate = new Date(zero.getTime() + ticksPerInterval * st);\n const fiDate = new Date(zero.getTime() + ticksPerInterval * fi);\n return `${dtFormat.format(stDate)} - ${dtFormat.format(fiDate)}`;\n }\n return '';\n }","import { LoginInfo } from '@/model/dn-login.js';\n\nconst rememberCredentialsKey = 'rememberCredentials'\nconst credentialsKey = 'credentials'\nconst simulationSettingsKey = 'simulationSettings'\nconst lastForcastOptionsKey = 'lastForcastOptionsKey'\nconst lastScheduleOptionsKey = 'lastScheduleOptionsKey'\nconst lastAgentScheduleOptionsKey = 'lastAgentScheduleOptionsKey'\nconst lastSettingsOptionsKey = 'lastSettingsOptionsKey'\nconst scheduleColumnIdsKey = 'scheduleColumnIdsKey'\nconst languageKey = 'languageKey'\nconst timeKey = 'timeKey'\nconst loginInfoKey = 'loginKey';\nconst currentCCKey = 'currentCCId';\nconst lastSortOptionKey = 'lastSortOptionKey';\nconst requestFilterKey = 'requestFilterKey';\nconst employeeDisplaySettingsKey= 'employeeDisplaySettingsKey';\nconst virtualScrollerOptions = 'virtualScrollerOptions';\nexport const TABLE_COLUMN_SCHEDULE_KEY= 'dn-state-schtabel-local'\n\n/** @type {null|LoginInfo} */\nlet _loginInfo = null;\n\n/** @type {null|Boolean} */\nlet _rememberCredentials = null;\n\n/** @type {null|number} */\nlet _currentCCId = null;\n\nexport function clearLocalStorage() {\n localStorage.clear();\n}\n\nexport function getCurrentCCId() {\n if (_currentCCId == null) {\n const id = localStorage.getItem(currentCCKey);\n if (id != null) {\n _currentCCId = parseInt(id);\n }\n }\n\n return _currentCCId;\n}\n\n/**\n * @param {number} id\n */\nexport function setCurrentCCId(id) {\n _currentCCId = id;\n if (getRememberCredentials())\n localStorage.setItem(currentCCKey, id.toString());\n}\n\nexport function removeCurrentCCId() {\n _currentCCId = null;\n localStorage.removeItem(currentCCKey);\n}\n\nexport function getLoginInfo() {\n if (_loginInfo === null) {\n const loginInfo = getJSONFromLocalStorage(loginInfoKey);\n if (loginInfo !== null) {\n _loginInfo = new LoginInfo(loginInfo);\n }\n }\n return _loginInfo;\n}\n\nexport function removeLoginInfo() {\n window.localStorage.removeItem(loginInfoKey);\n _loginInfo = null;\n}\n\n/**\n * @param {import(\"../model/dn-login\").LoginInfo} loginInfo\n */\nexport function setLoginInfo(loginInfo) {\n if (getRememberCredentials() && loginInfo.customerSchema.length > 0)\n localStorage.setItem(loginInfoKey, JSON.stringify(loginInfo.toStore()));\n _loginInfo = loginInfo;\n}\n\n//Simulation settings\nexport function getSimulationSettings() {\n return getJSONFromLocalStorage(simulationSettingsKey);\n}\nexport function setSimulationSettings(simulationSettings) {\n localStorage.setItem(simulationSettingsKey, JSON.stringify(simulationSettings));\n}\nexport function removeSimulationSettings() {\n localStorage.removeItem(simulationSettingsKey);\n}\n\n//Remeber Credentials (checkbox)\nexport function getRememberCredentials() {\n if (_rememberCredentials === null) {\n const value = localStorage.getItem(rememberCredentialsKey);\n if(value=== null){ _rememberCredentials = false; }\n else{ _rememberCredentials = value === 'true';}\n }\n\n return _rememberCredentials;\n}\n/**\n * @param {Boolean} rememberCredentials\n */\nexport function setRememberCredentials(rememberCredentials) {\n _rememberCredentials = rememberCredentials;\n localStorage.setItem(rememberCredentialsKey, rememberCredentials.toString());\n}\n\n//Credentials\nexport function getCredentials() {\n return getJSONFromLocalStorage(credentialsKey);\n}\n\nexport function removeCredentials() {\n localStorage.removeItem(credentialsKey);\n}\n\n//LastForcastOptions\nexport function getLastForcastOptions() {\n return getJSONFromLocalStorage(lastForcastOptionsKey);\n}\n\nexport function setLastForcastOptions(lastForcastOptions) {\n localStorage.setItem(lastForcastOptionsKey, JSON.stringify(lastForcastOptions));\n}\n\n//LastScheduleOptions\nexport function getLastScheduleOptions() {\n return getJSONFromLocalStorage(lastScheduleOptionsKey);\n}\nexport function setLastScheduleOptions(lastScheduleOptions) {\n localStorage.setItem(lastScheduleOptionsKey, JSON.stringify(lastScheduleOptions));\n}\n\n//LastAgentScheduleOptions\nexport function getLastAgentScheduleOptions() {\n return getJSONFromLocalStorage(lastAgentScheduleOptionsKey);\n}\nexport function setLastAgentScheduleOptions(lastAgentScheduleOptions) {\n localStorage.setItem(lastAgentScheduleOptionsKey, JSON.stringify(lastAgentScheduleOptions));\n}\n\n//LastSettingsOptions\nexport function getLastSettingsOptions() {\n return getJSONFromLocalStorage(lastSettingsOptionsKey);\n}\nexport function setLastSettingsOptions(lastSettingsOptions) {\n localStorage.setItem(lastSettingsOptionsKey, JSON.stringify(lastSettingsOptions));\n}\n\n//requestFilterOptions\nexport function getRequestFilterOptions() {\n return getJSONFromLocalStorage(requestFilterKey);\n}\nexport function setRequestFilterOptions(RequestFilterOptions) {\n localStorage.setItem(requestFilterKey, JSON.stringify(RequestFilterOptions));\n}\n\n//employeeDisplaySettings\nexport function getEmployeeDisplaySettings() {\n return getJSONFromLocalStorage(employeeDisplaySettingsKey);\n}\nexport function setEmployeeDisplaySettings(employeeDisplaySettings) {\n localStorage.setItem(employeeDisplaySettingsKey, JSON.stringify(employeeDisplaySettings));\n}\n\n/** @returns {number[]} */\nexport function getScheduleColumnIds() {\n return getJSONFromLocalStorage(scheduleColumnIdsKey);\n}\n/**\n * @param {number[]} scheduleColumnIds\n */\nexport function setScheduleColumnIds(scheduleColumnIds) {\n localStorage.setItem(scheduleColumnIdsKey, JSON.stringify(scheduleColumnIds));\n}\n\n//Language\nexport function getLanguage() {\n return getJSONFromLocalStorage(languageKey);\n}\nexport function setLanguage(language) {\n localStorage.setItem(languageKey, JSON.stringify(language));\n}\nexport function removeLanguage() {\n localStorage.removeItem(languageKey);\n}\n\n//Time setting\nexport function getTimeDisplaySetting() {\n return getJSONFromLocalStorage(timeKey);\n}\nexport function setTimeDisplaySetting(timeDisplay) {\n localStorage.setItem(timeKey, JSON.stringify(timeDisplay));\n}\nexport function removeTimeDisplaySetting() {\n localStorage.removeItem(timeKey);\n}\n\n//lastSortOption\nexport function getLastSortOption() {\n return getJSONFromLocalStorage(lastSortOptionKey);\n}\nexport function setLastSortOption(lastSortOption) {\n localStorage.setItem(lastSortOptionKey, JSON.stringify(lastSortOption));\n}\n\nexport function removeScheduleColumnsWidths() {\n localStorage.removeItem(TABLE_COLUMN_SCHEDULE_KEY);\n}\n\n//Virtual scroll\nexport function getVirtualScrollSetting(){\n return getJSONFromLocalStorage(virtualScrollerOptions);\n \n}\nexport function setVirtualScrollSetting(option){\n localStorage.setItem(virtualScrollerOptions, JSON.stringify(option));\n}\nexport function removeVirtualScrollSetting(){\n localStorage.removeItem(virtualScrollerOptions);\n}\n\n/**\n * @param {string} key\n */\nfunction getJSONFromLocalStorage(key) {\n const value = localStorage.getItem(key);\n if (value === null)\n return null;\n return JSON.parse(value)\n}","\nvar moment = require(\"moment-timezone\");\nimport * as dnLocalStorage from './dn-localStorage.js';\nimport { getNumberOfDaysFromIntervalMinusOne, getStartOfWeek,getElapsedTimeString } from './dn-helper.js';\nimport { addDays, getStartOfDay } from '@/shared/dn-shared-helper.js';\nimport * as dn_uiHelper from \"@/js/dn-uihelper.js\";\nimport * as dnModel from '@/model/dn-model.js';\nimport { useDataStore } from \"@/stores/dataStore.js\";\nimport { createSchedule, getEmpWorkMap,getEmpBreakMap, getShiftBounds,getEmpWorkArray } from '#shared/dn-employee-schedule';\nimport { useScheduleStore } from '@/stores/scheduleStore.js';\nimport { Task } from '@/shared/dn-task.js';\nimport { TASK_KIND } from '@/shared/dn-tasktype.js'\nimport variables from \"@/assets/css/variables.module.scss\"; \n\n/**\n* @typedef {{\n*selectedRequests:import(\"@/model/dn-schedule-request.js\").ScheduleRequest[];\n*selectedEmpDays:{empSchedule:import(\"#shared/dn-employee-schedule\").EmployeeSchedule; dt:Date}[],saveReqired:boolean,selectGostShiftWarning:boolean,action:string}} PostGhostShifts\n*/\n\n\nexport function getTimeNow(){\n let loginInfo = dnLocalStorage.getLoginInfo();\n if(loginInfo && loginInfo.customerSchema == 'demo'){return moment([2022,4,3]).toDate()}\n if(loginInfo && loginInfo.customerSchema.substring(0,5)=='demo2'){return moment([2023,8,10]).toDate()}\n return moment(new Date()).startOf('day').toDate()\n}\n\nexport function getInitialDateInterval(){\n const scheduleStore = useScheduleStore();\n //Whole days in local timezone\n return [getTimeNow(),addDays(getTimeNow(),scheduleStore.scheduleOptions.numberOfDaysInSchedule-1)]\n}\n\nexport function getSpecialTaskType(subtype) {\n let x = {}\n const dataStore = useDataStore();\n dataStore.taskTypeMap.forEach(element => { if (element.subtype == subtype) { x = element } })\n return x;\n}\n\n/**\n * Calculate bounderies of a workShiftFiltered, presented as a Task with tasktype null\n * @param {Date} dt\n * @param {import(\"@/shared/dn-task.js\").Task[]} possibleTasks tasks that connect over midnight\n * @param {{absences:import(\"#shared/dn-employee-schedule\").DeletableDateInterval[];breaks:import(\"#shared/dn-employee-schedule\").DeletableDateInterval[];payments:import(\"#shared/dn-employee-schedule\").DeletableDateInterval[]}} schedule\n */\nexport function getShift(dt, possibleTasks, schedule = undefined) {\n const shift = getShiftBounds(dt, possibleTasks, schedule);\n return new Task({empid:null, st:shift.st, fi:shift.fi, tasktypeId:null});\n}\n\n/**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule[]} schedule\n * @param {Map} taskTypeMap\n * @param {Date} dt\n * @param {import(\"@/model/dn-employee-cc.js\").EmployeeCallcenters} employeeCallcenters\n * @param {number} ccId\n * @param {number[]} [taskTypeIds]\n */\nexport function getEmpWorkSum(schedule, taskTypeMap, dt, employeeCallcenters, ccId, taskTypeIds=null) {\n const length = 96;\n const empWorkMap = getEmpWorkMap(schedule, taskTypeMap, dt, 1, length, employeeCallcenters, ccId, taskTypeIds);\n const dtKey = dn_uiHelper.getShortDate(dt);\n /** @type {number[]} */\n const empSumArray = Array(length).fill(0)\n for (const pair of empWorkMap) {\n const empWork = pair[1].get(dtKey)\n for (let i = 0; i < length; i++) {\n empSumArray[i] += empWork[i]\n }\n }\n\n return empSumArray;\n}\n\n/**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule[]} schedule\n * @param {Date} dt\n * @param {import(\"@/model/dn-employee-cc.js\").EmployeeCallcenters} employeeCallcenters\n * @param {number} ccId\n * @param {number[]} [taskTypeIds]\n */\nexport function getEmpBreakSum(schedule, dt, employeeCallcenters, ccId, taskTypeIds=null) {\n const length = 96;\n const empBreakMap = getEmpBreakMap(schedule, dt, 1, length, employeeCallcenters, ccId);\n const dtKey = dn_uiHelper.getShortDate(dt);\n /** @type {number[]} */\n const empSumBreakArray = Array(length).fill(0)\n for (const pair of empBreakMap) {\n const empBreak = pair[1].get(dtKey)\n for (let i = 0; i < length; i++) {\n empSumBreakArray[i] += empBreak[i]\n }\n }\n\n return empSumBreakArray;\n}\n\n/**\n * @param {string | Date} st\n * @param {string | Date} fi\n * @param {number} ttid\n * @param {number} empid\n * @returns {import(\"@/shared/dn-task.js\").Task}\n */\nexport function getTask(st, fi, ttid, empid = null) {\n /** @type {import(\"@/shared/dn-task.js\").TaskDto} */\n const dto = { empid, st, fi, tasktypeId: ttid };\n if (empid) {\n return useScheduleStore().scheduleTasks.add(dto);\n } else {\n return new Task(dto);\n }\n}\n\n/**\n * @param {Date} dt\n */\nexport function get24hourShift(dt) {\n return {\n st: new Date(dt),\n fi: new Date(dt.getTime() + 24 * 60 * 60 * 1000),\n dur: 24\n };\n}\n\n /**\n * @param {dnModel.Task} t\n * @param {{st:Date;fi:Date}[]} workShiftFiltered\n */\n export function moveEntireShift(t,workShiftFiltered){\n let change = moment.duration( moment(t.st).diff(t.lastSt )).asHours();\n if (t.tasktypeId==null){\n\n for(let i=1;i= focusedShift.st && t.fi <= focusedShift.fi)&&(!t.isToDelete);\n }\n}\n\nexport function validateAndCorrectWorkShift(activeTask,empTasks,dt){\n const dataStore = useDataStore();\n //active task\n let tt = dataStore.taskTypeMap.get(activeTask.tasktypeId)\n let st=moment(activeTask.st);//all operations using moment.js\n let fi= moment(activeTask.fi);\n let lastSt=moment(activeTask.lastSt);\n let lastFi= moment(activeTask.lastFi);\n let focusedShift = getShiftBounds(dt, empTasks.tasks);\n\n \n\n if(tt){\n let taskList=getTaskList(empTasks,focusedShift,tt.type);//updated taskList\n for (let i = 0; i < taskList.length; i++) {\n if(taskList[i]!=activeTask){\n let tti = dataStore.taskTypeMap.get(taskList[i].tasktypeId)\n if(tti){\n let sti =moment(taskList[i].st)\n let fii =moment(taskList[i].fi)\n if(st.isSameOrBefore(sti)&&fi.isSameOrAfter(fii)){\n removeTask(taskList[i])\n }\n if(st.isBefore(fii)&&fi.isSameOrAfter(fii)&&st.isAfter(sti)){\n taskList[i].fi=st.toDate()\n }\n\n if(st.isAfter(sti)&&fi.isBefore(fii)&&tt!=tti){\n taskList[i].fi=st.toDate();\n empTasks.tasks.push(getTask(fi.toDate(),fii.toDate(),tti.id,empTasks.emp._id));\n break;\n }\n\n \n if(st.isAfter(sti)&&fi.isBefore(fii)){\n removeTask(activeTask)\n }\n\n\n if(st.isSameOrBefore(sti)&&fi.isAfter(sti)&&fi.isBefore(fii)){\n taskList[i].st=fi.toDate()\n }\n //Conected tasks\n if(fii.isSame(lastSt)&&st.isAfter(fii)){\n if(tt!=tti){taskList[i].fi=st.toDate();}\n }\n if(sti.isSame(lastFi)){\n if(fii){\n let stj =moment(taskList[j].st)\n let fij =moment(taskList[j].fi)\n if(stj.isBefore(sti)&&fij.isAfter(sti)&&fij.isBefore(fii)){\n taskList[j].fi=sti.toDate()\n }\n if(stj.isBefore(sti)&&fij.isSame(sti)&&taskList[j].tasktypeId==taskList[i].tasktypeId){\n taskList[i].st=stj.toDate()\n removeTask(taskList[j])\n }\n if(stj.isSame(sti)&&stj.isAfter(sti)&&taskList[j].tasktypeId==taskList[i].tasktypeId){\n removeTask(taskList[j])\n }\n if(stj.isBefore(fii)&&fij.isAfter(fii)&&stj.isAfter(sti)){\n taskList[j].st=fii.toDate()\n }\n if(stj.isSame(fii)&&fij.isAfter(fii)&&taskList[j].tasktypeId==taskList[i].tasktypeId){\n taskList[i].fi=fij.toDate()\n removeTask(taskList[j])\n }\n if(fij.isSame(fii)&&stj.isBefore(fii)&&taskList[j].tasktypeId==taskList[i].tasktypeId){\n removeTask(taskList[j])\n }\n if(stj.isAfter(sti)&&fij.isBefore(fii)){\n removeTask(taskList[j])\n }\n }\n }\n }\n //}\n}\n\nfunction removeTask(x){\n x.toDelete()\n}\n}\n\nexport function getShiftText(shift, refDate){\n let shiftText = \"\";\n if(shift.tasks.length>0){\n const timeInterval = Math.abs((shift.tasks[shift.tasks.length-1].fi-shift.tasks[0].st))\n if(shift.cmd){\n shiftText=moment(refDate).add(shift.tasks[0].st,'minutes').format('HH:mm')+ \" \"+\n shift.name + \" (\"+\n Math.round(timeInterval/60,2)+ \" h)\" + \" cmd: ctrl \" + shift.cmd\n } else {\n shiftText=moment(refDate).add(shift.tasks[0].st,'minutes').format('HH:mm')+ \" \"+\n shift.name + \" (\"+\n Math.round(timeInterval/60,2)+ \" h)\"\n }\n\n }\n return shiftText\n}\n\nexport function getSelectionKey(dt,empid){\n return moment(dt).startOf('day')+'_'+empid\n}\nexport function getEmpDt(dt,emp){\n return {emp:emp,dt: moment(dt).startOf('day').date}\n}\nexport function getDateKey(dt){\n return moment(dt).date.yyyymmdd()\n}\n\n/**\n * @param {string} selectionKey\n */\nexport function getRequestForSchedule(selectionKey) {\n const keyParts = selectionKey.split('_');\n const employeeId = Number(keyParts[1]);\n const ts = Number(keyParts[0]);\n const scheduleStore = useScheduleStore();\n const filter = scheduleStore.scheduleRequestSettings;\n const scheduleOptions = scheduleStore.scheduleOptions;\n const future = scheduleOptions.dateInterval[1] ? addDays(scheduleOptions.dateInterval[1], 1) : new Date();\n const selectedEmpId = scheduleOptions.selectedEmpId;\n let scheduleRequest = scheduleStore.scheduleRequestData.bySelectionKey.get(selectionKey);\n let isPoster = false;\n let countOrOrder = 0;\n if (scheduleRequest && scheduleRequest.kind === dnModel.REQUEST_KIND.post) {\n isPoster = scheduleRequest.employees[0].employeeId === employeeId;\n if (isPoster) {\n countOrOrder = scheduleRequest.employees.length - 2;\n } else {\n countOrOrder = scheduleRequest.employees.findIndex(x => x.employeeId === employeeId) - 1;\n }\n if (!isPoster) {\n if (scheduleRequest.approved === false) {\n scheduleRequest = undefined;\n } else if (scheduleRequest.approved === true && scheduleRequest.employees[1].employeeId !== employeeId) { \n scheduleRequest = undefined;\n }\n }\n }\n\n const isAgentLogin = useDataStore().currentUser.isAgent;\n if (scheduleRequest) {\n if (!(scheduleRequest.kind === dnModel.REQUEST_KIND.post || scheduleRequest.isFilterOk(filter, future, selectedEmpId) || isAgentLogin)) {\n scheduleRequest = undefined;\n }\n }\n \n const availEmpRequests = scheduleStore.availabilityRequests.getByEmp(employeeId);\n /** @type {import(\"@/model/dn-request-item.js\").RequestItem} */\n let requestItem = scheduleRequest; \n if (availEmpRequests) {\n const now = getTimeNow();\n const requestOnDay = availEmpRequests.byDate.get(ts);\n if (requestOnDay) {\n for (const r of requestOnDay) {\n if (!isAgentLogin) {\n if (!r.isFilterOk(filter, future, selectedEmpId, scheduleStore.employees.list, now)) {\n continue;\n }\n }\n let best = requestItem === undefined;\n if (!best) {\n if (requestItem.isOpen === r.isOpen) {\n best = r.created < requestItem.created;\n } else {\n best = r.isOpen;\n }\n }\n if (best) {\n requestItem = r;\n scheduleRequest = undefined;\n } \n }\n }\n }\n\n if (!requestItem) { return undefined; }\n\n let kind = dnModel.REQUEST_KIND.availability;\n if (scheduleRequest) {\n kind = scheduleRequest.kind;\n }\n\n return { isPoster, countOrOrder, kind, requestItem};\n}\n\n/**\n * @param {number} numberOfDays\n * @param {Date} stDate\n * @param {dnModel.Task[]} scheduleTasks\n * @param {dnModel.Employee[]} employees\n * @param {boolean} includeInactive\n */\nexport function getSchedule(numberOfDays, stDate, scheduleTasks, employees, includeInactive) {\n const dataStore = useDataStore();\n const taskTypes = dataStore.taskTypes;\n return createSchedule({numberOfDays, st:stDate}, scheduleTasks, taskTypes, employees, includeInactive)\n}\n\n/**\n * @param {number} empId\n * @returns {import(\"#shared/dn-employee-schedule\").EmployeeSchedule}\n */\nexport function getScheduleFromStore(empId) {\n const schedules = useScheduleStore().schedule.list;\n for (let i = 0; i < schedules.length; i++) {\n if (schedules[i].emp.id == empId) {\n return schedules[i]\n }\n }\n return undefined;\n}\n\nexport function getScheduleRowIndex(empid) {\n let index = 0;\n const currentSortMap = useScheduleStore().scheduleOptions.currentSortMap;\n for (let keySortMap of currentSortMap.keys()) {\n let value = currentSortMap.get(keySortMap)\n if (empid == value.id) { index = keySortMap }\n }\n return index\n}\n\n/**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} schedule\n */\nexport function workShiftDetails(schedule){\n const dataStore = useDataStore();\n const locale = dataStore.language;\n const timeZone = dataStore.currentUser.timezoneUI;\n const dtFormat = new Intl.DateTimeFormat(locale, { hour: 'numeric', minute: '2-digit', timeZone });\n /** @type {import(\"#shared/dn-date-interval\").DateInterval} */\n const di = schedule.dateInterval;\n const dt = di.st;\n const nextDt = di.fi;\n const shiftBounds = getShiftBounds(di.st, schedule.tasks);\n\n let details =[]\n for (const t of schedule.absences) {\n if(t.st.getTime() >= dt.getTime() && t.st.getTime() < nextDt.getTime()){ details.push(getTaskText(t))}\n }\n for (const t of schedule.tasks) {\n if(t.st.getTime() >= shiftBounds.st.getTime() && t.st.getTime() < shiftBounds.fi.getTime()){ details.push(getTaskText(t))}\n }\n for (const t of schedule.breaks) {\n if(t.st.getTime() >= shiftBounds.st.getTime() && t.st.getTime() < shiftBounds.fi.getTime()){ details.push(getTaskText(t))}\n }\n for (const t of schedule.payments) {\n if(t.st.getTime() >= dt.getTime() && t.st.getTime() < nextDt.getTime()){ details.push(getTaskText(t))}\n }\n\n return(details)\n\n /**\n * @param {dnModel.Task} t\n */\n function getTaskText(t){\n const dataStore = useDataStore();\n let tt = dataStore.taskTypeMap.get(t.tasktypeId)\n return tt.name+`: ${dtFormat.format(t.st)} - ${dtFormat.format(t.fi)}`;\n }\n}\n\nexport function arrangeReportWeekDayStart(type,list,date){\n const weekDayNum = date.getDay();\n let steadyCols = list.slice(0,3);\n let weekDaysCols = list.slice(3);\n let completeWeek;\n if(type == 'table'){\n completeWeek = [{name:'sun','width':400}].concat(weekDaysCols.concat(weekDaysCols));\n return steadyCols.concat(completeWeek.slice(weekDayNum,weekDayNum+7))\n }\n if(type == 'weekDayData'){\n completeWeek = steadyCols.concat(weekDaysCols.concat(list));\n return completeWeek.slice(weekDayNum,weekDayNum+7)\n }\n else if(type == 'pdfFormating' || type == 'csvFormating'){\n completeWeek = [{name:'sun',width:300}].concat(weekDaysCols.concat(weekDaysCols));\n return steadyCols.concat(completeWeek.slice(weekDayNum,weekDayNum+7));\n }\n}\n\nexport function getAgentAppRowHeight() {\n return parseInt((window.innerHeight-350)/7)\n}\n\n/**\n * @param {Date} dt\n */\nexport function scheduleIsPublished(dt) {\n return dt <= getLatestPublishedDate();\n}\nexport function erliestRequestDate(){\n const dataStore = useDataStore();\n return addDays(getTimeNow(),dataStore.generalEmpAppSettings.requestClosedNumberOfDays)\n}\n\nexport function getLatestPublishedDate() {\n const nowDt = getTimeNow();\n const dataStore = useDataStore();\n const generalEmpAppSettings = dataStore.generalEmpAppSettings;\n const weekDay = generalEmpAppSettings.publishingWeekDay\n const numberOfDays = generalEmpAppSettings.publishingNumberOfDays\n let latestDate= new Date()\n if(generalEmpAppSettings.publishingFixedDate){\n latestDate=generalEmpAppSettings.publishingFixedDate\n }else{\n let daysToAdd\n if (nowDt.getDay() <= weekDay) {\n daysToAdd = weekDay - 8;\n } else {\n daysToAdd = weekDay - 1;\n }\n latestDate = addDays(getStartOfWeek(nowDt), numberOfDays + daysToAdd);\n }\n \n return latestDate\n}\n\n/**\n * @param {Date[]} dateInterval\n */\nexport function scheduleisAllowedToOptimize(dateInterval){\n const currentUser = useDataStore().currentUser;\n return !currentUser.isSupervisor||(currentUser.isSupervisor) && dateInterval[1] <=dn_uiHelper.addDays( getLatestPublishedDate(),0)\n}\n\n\n/**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} r\n */\nexport function scheduleRowIsIncluded(r){\n const scheduleStore = useScheduleStore();\n //if(!scheduleStore.scheduleOptions.scheduleFilter.show){return true}\n let filter=scheduleStore.scheduleOptions.scheduleFilter\n let fi=dn_uiHelper.addDays(scheduleStore.scheduleOptions.dateInterval[1],1)\n let isIncludedByName=false\n let isIncludedBySkill=false\n let isIncludedByTag = false\n let isIncludedByTask = false\n\n if(filter.searchText.length>0){\n if( r.emp.name.toLowerCase().includes(filter.searchText.toLowerCase())){isIncludedByName=true}\n }else{isIncludedByName=true}\n\n\n if(filter.callGroups.length>0){\n for(let c=0;c0){\n for(let t=0;t x.tasktypeId === filter.taskTypes[t].id&& x.st0 ){isIncludedByTask=true}\n }\n }else{isIncludedByTask=true}\n\n if(filter.tagIds.length>0){\n for(let t=0;t r.emp.id==scheduleOptions.selectedEmpId)\n returnValue=(filterdSched2.length==1)\n }\n return returnValue&&(dt>=scheduleOptions.dateInterval[0]&&dt<=scheduleOptions.dateInterval[1])\n}\n\nexport function getSelectionKeysVisible(){\n const dataStore = useDataStore();\n const currentCC = dataStore.currentCC;\n const scheduleStore = useScheduleStore();\n const schedule=scheduleStore.schedule.list;\n const scheduleOptions = scheduleStore.scheduleOptions\n const filterdSched=schedule.filter(scheduleRowIsIncluded)\n const visibleKeys=[]\n for (let key of scheduleOptions.selection.keys()) {\n let v=scheduleOptions.selection.get(key)\n if(v.dt>=scheduleOptions.dateInterval[0]&&v.dt<=scheduleOptions.dateInterval[1]){\n if(filterdSched.filter(r => r.emp.id==v.emp.id).length==1){\n const ccId = dataStore.employeeCallcenters.getCCByDate(v.emp, v.dt);\n if (ccId === currentCC.id) {\n visibleKeys.push(key);\n }\n }\n }\n }\n return visibleKeys\n}\n\nexport function selectionIsOk(selection){\n let returnValue = {supervisorCheck:true,postedShiftCheck:true}\n const currentUser = useDataStore().currentUser;\n const scheduleStore = useScheduleStore();\n //const selection = scheduleStore.scheduleOptions.selection\n const scheduleRequests =scheduleStore.scheduleRequestData\n\n if(currentUser.isSupervisor){\n\n for (let key of selection.keys()) {\n let v=selection.get(key)\n if(v.dt>getLatestPublishedDate()){\n returnValue.supervisorCheck= false\n }\n }\n }\n\n for (let key of selection.keys()) {\n let v=selection.get(key)\n if(v.emp.ghost){\n let sr =scheduleRequests.bySelectionKey.get(key) \n if (sr&&(sr.kind === dnModel.REQUEST_KIND.post && (sr.approved === null || sr.isPending))) {\n returnValue.postedShiftCheck=false\n }\n }\n }\n\n return returnValue\n }\n\n\n/**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule[]} schedule\n * @param {{dateInterval:Date[], selection:Map}} scheduleOptions\n */\nexport function getSelection(schedule, scheduleOptions) {\n const dataStore = useDataStore();\n const currentCC = dataStore.currentCC;\n const filteredSchedule = schedule.filter(scheduleRowIsIncluded)\n /** @type {Map} */\n const byEmpId = new Map();\n\n for (let key of scheduleOptions.selection.keys()) {\n let v = scheduleOptions.selection.get(key)\n if (v.dt >= scheduleOptions.dateInterval[0] && v.dt <= scheduleOptions.dateInterval[1]) {\n const empSchedule = filteredSchedule.find(r => r.emp.id === v.emp.id);\n if (empSchedule !== undefined) {\n const ccId = dataStore.employeeCallcenters.getCCByDate(v.emp, v.dt);\n if (ccId === currentCC.id) {\n let empSelection = byEmpId.get(v.emp.id);\n if (empSelection === undefined) {\n empSelection = {empSchedule: empSchedule, dates:[]};\n byEmpId.set(v.emp.id, empSelection);\n }\n empSelection.dates.push(v.dt);\n }\n }\n }\n }\n\n const result = [];\n for (const empSelection of byEmpId.values()) {\n empSelection.dates.sort((a, b) => a.getTime() - b.getTime());\n result.push(empSelection)\n }\n\n return result;\n}\n\n\n/**\n * @param {Date} dt\n * @param {string[]} [changedDates]\n */\nexport function addToChangedDatedInclNext(dt, changedDates = []) {\n let dtKey = dn_uiHelper.getShortDate(dt);\n if (!changedDates.includes(dtKey)) { changedDates.push(dtKey); }\n dtKey = dn_uiHelper.getShortDate(dn_uiHelper.addDays(dt, 1));\n if (!changedDates.includes(dtKey)) { changedDates.push(dtKey); }\n return changedDates;\n}\n\nexport function saveLocalScheduleSettings(){\n const scheduleStore = useScheduleStore();\n const opt = scheduleStore.scheduleOptions;\n const insp = scheduleStore.inspectorPanel;\n if (opt.dateInterval.length === 0)\n return;\n let localScheduleOptions ={\n //dateInterval:this.scheduleOptions.dateInterval,\n showServiceLevel:opt.showServiceLevel,\n showOccupancyChart:opt.showOccupancyChart,\n showWorkChart:opt.showWorkChart,\n showRequestTile:opt.showRequestTile,\n showEmployeeOccupancy:opt.showEmployeeOccupancy,\n autoSimulate:opt.autoSimulate,\n autoKeyFigures:opt.autoKeyFigures,\n numberOfSimIterations:opt.numberOfSimIterations,\n numberOfDaysInSchedule:getNumberOfDaysFromIntervalMinusOne(opt.dateInterval),\n workChartHeight:opt.workChartHeight,\n chartDisplayTarget:opt.chartDisplay.target,\n chartDisplayErlangC:opt.chartDisplay.erlangC,\n chartDisplaySmooth:opt.chartDisplay.smooth,\n chartDisplaychartInspector:opt.chartDisplay.chartInspector,\n chartDisplayFixedY:opt.chartDisplay.fixedY,\n chartDisplayFixedYvalue:opt.chartDisplay.fixedYvalue,\n chartDisplayServicelevelPercentForWarning:opt.chartDisplay.servicelevelPercentForWarning,\n\n chartDisplayBreaks:opt.chartDisplay.breaks,\n chartDisplayDeviationTooFewBars:opt.chartDisplay.deviationTooFewBars,\n chartDisplayDeviationTooManyBars:opt.chartDisplay.deviationTooManyBars,\n\n showLog:opt.adherence.showLog,\n showWorkWarnings:opt.adherence.showWorkWarnings,\n showBreakWarnings:opt.adherence.showBreakWarnings,\n showAdherenceWarnings:opt.adherence.showAdherenceWarnings,\n\n meetingLastTasktypeId:opt.meetingSettings.meetingLastTasktypeId,\n meetingLastStartMinute:opt.meetingSettings.lastStartMinute,\n meetingLastStartMinuteMax:opt.meetingSettings.lastStartMinuteMax,\n meetingLastOnlyOnShift:opt.meetingSettings.onlyOnShift,\n meetingLastFlexStart:opt.meetingSettings.flexStart,\n meetingLastDurationMinute:opt.meetingSettings.lastDurationMinute,\n\n notifyOnScheduleChange:opt.notifications.onScheduleChange,\n indicatorsHighlightBeforeSave:opt.scheduleIndicators.highlightBeforeSave,\n indicatorsUnsavedIndicators:opt.scheduleIndicators.unsavedIndicators,\n\n showInRotation:opt.adherence.showInRotation,\n inspectorPanelTimespan:insp.timespan,\n inspectorHideTimeSpan:insp.hideTimeSpan,\n inspectorServiceLevel:insp.serviceLevel,\n }\n console.log('saved settings')\n dnLocalStorage.setLastScheduleOptions(localScheduleOptions)\n saveLocalRequestFilterOptions()\n }\n\n export function saveLocalEmployeeDisplaySettings(){\n const scheduleStore = useScheduleStore();\n const opt = scheduleStore.employeeDisplaySettings;\n\n let localEmployeeDisplaySettings ={\n workTimeWarning:opt.workTimeWarning,\n skillsWarning:opt.skillsWarning,\n shiftWarning:opt.shiftWarning,\n switchIdWarning:opt.switchIdWarning,\n hasMobileApp:opt.hasMobileApp,\n breakWarnings:opt.breakWarnings,\n }\n dnLocalStorage.setEmployeeDisplaySettings(localEmployeeDisplaySettings)\n }\n\n\n function saveLocalRequestFilterOptions(){\n const scheduleStore = useScheduleStore();\n const opt = scheduleStore.scheduleRequestSettings;\n if (scheduleStore.scheduleOptions.dateInterval.length === 0)\n return;\n let localRequestFilterOptions ={\n //dateInterval:this.scheduleOptions.dateInterval,\n showSick:opt.showSick,\n showVacation:opt.showVacation,\n showFree:opt.showFree,\n showWork:opt.showWork,\n showPending:opt.showPending,\n showHistoric:opt.showHistoric,\n showFuture:opt.showFuture,\n showBasedOnSelection:opt.showBasedOnSelection,\n showApproved:opt.showApproved,\n showRejected:opt.showRejected,\n tagId:opt.tagId\n }\n dnLocalStorage.setRequestFilterOptions(localRequestFilterOptions)\n }\n\n export const INFOTYPE = createInfoTypeEnum();\n export const DRAWKIND = createDrawTaskKindEnum();\n export const TEAMSCHEDULEKIND = createTeamScheduleKindEnum();\n\n\n\nfunction createInfoTypeEnum() {\n const enumObject = {\n shift: 0,\n warningFromTaskBar: 1,\n warningFromRow: 2,\n publishedDayIndicator:3,\n erliestRequestIndicator: 4,\n skillsInfo:5,\n shiftFromTaskBar:6,\n unAvailabilityOtherCC:7,\n chartInfo:8\n };\n return Object.freeze(enumObject);\n};\n\n function createDrawTaskKindEnum() {\n const enumObject = {\n unavailable: 0,\n otherCC: 1,\n hasChanges:2,\n none:3\n };\n\n return Object.freeze(enumObject);\n};\n\nfunction createTeamScheduleKindEnum() {\n const enumObject = {\n none: 0,\n barSchedule: 1,\n textSchedule:2\n };\n\nreturn Object.freeze(enumObject);\n};\nexport function taskChangeInfo(userId,ts){\n\n let userInitials =\"\"\n let userName =\"\"\n let colorId=1\n let timeText =\"\"\n let users = useDataStore().users\n if(users){\n let user =users.find(item => item.id === userId)\n if(user){\n if(user.colorId&&user.colorId>0){colorId=user.colorId}\n userInitials=dn_uiHelper.suggestUserInitials(user)\n if(user.name&&user.name.length>0){userName=user.name}\n else{userName=user.email}\n }else{\n userInitials=\"SA\"\n colorId=9\n userName=\"super admin\"\n }\n timeText = getElapsedTimeString(ts)\n }\n\n return {colorId:colorId,timeText:timeText,userInitials:userInitials,userName:userName}\n\n}\n\n\nexport function getWorkShiftWithDeleted(empTasks){\n let focusedDate=empTasks.focusedDate\n let workShiftWithDeleted = []\n /** @type {{st:Date;fi:Date}} */\nlet focusedShift=null\nif(empTasks&&empTasks.tasks){ \n focusedShift=getShiftBounds(focusedDate, empTasks.tasks, empTasks)\n workShiftWithDeleted =empTasks.absences.filter(isInShiftWithDeleted)\n .concat(empTasks.tasks.filter(isInShiftWithDeleted))\n .concat(empTasks.breaks.filter(isInShiftWithDeleted))\n .concat(empTasks.payments.filter(isInShiftWithDeleted))\n}\n\n return workShiftWithDeleted\n\n function isInShiftWithDeleted(t) {\n let st_day=focusedDate\n let fi_day=dn_uiHelper.addDays(st_day,1)\n let st_shift=focusedShift.st\n let fi_shift=focusedShift.fi\n return (((t.st >= st_shift && t.fi <= fi_shift)||(t.st >= st_day && t.fi <= fi_day))&&t.tasktypeId);\n }\n}\n\n\nexport function changeInfo(empTasks){\n let workShiftWithDeleted =getWorkShiftWithDeleted(empTasks)\n return changeInfoFromTaskList(workShiftWithDeleted)\n}\n\n export function changeInfoFromTaskList(taskList){\n let maxDt = new Date(1970,1,1)\n let latestTask = null\n const dataStore=useDataStore()\n \n \n for(let i=0;imaxDt){\n maxDt=task.updated\n latestTask = task \n } \n }\n \n if(latestTask){\n return taskChangeInfo(latestTask.userId,latestTask.updated)\n }else{\n return {colorId:1,timeText:'',userInitials:'?',userName:''}\n }\n }\n\n export function getPublishedScheduleTasksWithChanges(){\n const dataStore = useDataStore();\n const scheduleStore= useScheduleStore();\n const scheduleTasksInStore = scheduleStore.scheduleTasks.list;\n \n const returnList=[]\n for (let i = 0; i < scheduleTasksInStore.length; i++) {\n const t = scheduleTasksInStore[i]\n \n if (t.st <= addDays(getLatestPublishedDate(), 1)) {\n if ((t.isToDelete||t.hasChanges)) {\n let ttKind = dataStore.taskTypeMap.get(t.tasktypeId).kind;\n let excludeTask = false\n if(ttKind==TASK_KIND.inRotation||ttKind==TASK_KIND.log){excludeTask=true}\n if(!excludeTask){returnList.push(t)}}\n }\n }\n return returnList\n }\n\n export function selectionHasGhost(){\n const scheduleStore= useScheduleStore();\n const schedule =scheduleStore.schedule.list\n const selection = getSelection(schedule, scheduleStore.scheduleOptions);\n\n for (const empSelection of selection) {\n const empSchedule = empSelection.empSchedule;\n if (empSchedule.emp.ghost) {\n return true\n }\n }\n return false\n }\n\n /**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule[]} schedule\n */\n export function openPostShifts() {\n if (!selectionIsOk(useScheduleStore().scheduleOptions.selection)) { return null }\n const scheduleStore= useScheduleStore();\n const schedule =scheduleStore.schedule.list\n\n /** @type {Map} */\n const scheduleRequests = useScheduleStore().scheduleRequestData.items;\n \n const byEmp = new Map();\n for (const sr of scheduleRequests) {\n if (sr.kind === dnModel.REQUEST_KIND.post && (sr.approved === null || sr.isPending)) {\n const employeeId = sr.employees[0].employeeId;\n let requests = byEmp.get(employeeId);\n if (!requests) {\n requests = [];\n byEmp.set(employeeId, requests);\n }\n requests.push(sr);\n }\n }\n\n const selection = getSelection(schedule, scheduleStore.scheduleOptions);\n \n /** @type {PostGhostShifts} */\n const postGhostShifts = { selectedRequests: [], selectedEmpDays: [],saveReqired:false,selectGostShiftWarning:false,action:'' };\n for (const empSelection of selection) {\n const empSchedule = empSelection.empSchedule;\n if (empSchedule.emp.ghost) {\n for (const t of empSchedule.tasks.concat(empSchedule.breaks)) {\n if (t.hasChanges) {\n postGhostShifts.saveReqired=true\n /* this.$toast.add({\n severity: 'info',\n detail: this.$t('schedule.save-schedule-before-posting-shifts'),\n life: 3000 });\n return; */\n }\n }\n const requests = byEmp.get(empSchedule.emp.id);\n /** @type {Map} */\n const byDate = new Map();\n if (requests) {\n for (const sr of requests) {\n const dt = getStartOfDay(sr.employees[0].starts[0]);\n byDate.set(dt.getTime(), sr);\n }\n }\n \n for (const dt of empSelection.dates) {\n const shiftBounds = getShiftBounds(dt, empSchedule.tasks);\n if (shiftBounds.st < shiftBounds.fi) {\n const sr = byDate.get(dt.getTime());\n if (sr) {\n postGhostShifts.selectedRequests.push(sr);\n } else {\n postGhostShifts.selectedEmpDays.push({empSchedule, dt});\n }\n }\n }\n }\n }\n \n if (postGhostShifts.selectedEmpDays.length === 0 && postGhostShifts.selectedRequests.length === 0) {\n postGhostShifts.selectGostShiftWarning=true\n /* this.$toast.add({\n severity: 'info',\n detail: this.$t('schedule.select-ghost-shifts-to-post-delete-post'),\n life: 3000 });\n return; */\n }\n \n return postGhostShifts;\n }\n\n function getIndicatorPoints(x){\n let p = (x+1)+',0 '\n +(x+12)+',0 '\n +(x+1)+',11 '\n +(x+1)+',0 '\n \n return p//\"0,12 10,12 5,5 0,12\"\n //let p = x+',22 '+(x+10)+',22 '+(x+5)+',13 '+x+',22'\n }\n \n export function getUnsavedIndicator(svgns,x){\n let indicatorPolyline = null\n \n indicatorPolyline = document.createElementNS(svgns,\"polyline\");\n indicatorPolyline.setAttributeNS(null, \"points\", getIndicatorPoints(x));\n indicatorPolyline.setAttributeNS(null, \"fill\", variables.warning)\n\n return indicatorPolyline\n \n }\n\n export function selectionHasChanges(){\n let returnValue = false\n const sheduleOptions=useScheduleStore().scheduleOptions\n const selectionList = getSelection(useScheduleStore().schedule.list, sheduleOptions);\n for (const empSelection of selectionList) {\n const empTasks = empSelection.empSchedule;\n for (const dt of empSelection.dates) {\n if(shiftHasChanges(dt,empTasks)){\n returnValue = true\n break\n }\n }\n }\n return returnValue\n }\n\n export function shiftHasChanges(dt,empTasks){\n const shift24 = get24hourShift(dt);\n const shift =getShiftBounds(shift24.st,empTasks.tasks, empTasks,true)\n const allTasks= empTasks.tasks.concat(empTasks.breaks).concat(empTasks.absences)\n const tasks = allTasks.filter(x =>x.hasChanges && x.st >=shift.st && x.st x.hasChanges && x.st >=shift.st && x.st 0\n }\n\n\n /**\n * @param {Date} dt\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} empTasks\n */\n export function shiftRevert(dt,empTasks){\n useScheduleStore().scheduleTasks.removeUnsavedDeletedTasks()\n const shift24 = get24hourShift(dt);\n const shift =getShiftBounds(shift24.st,empTasks.tasks, empTasks,true)\n const allTasks= empTasks.tasks.concat(empTasks.breaks).concat(empTasks.absences)\n const tasks = allTasks.filter(x =>x.hasChanges && x.st >=shift.st && x.st 0) {\n workFactor = workFactor * adherancePercent / 100;\n }\n return this.msSinceEpoch + 1000 * (this.wait + this.ht / (workFactor));\n }\n\n tostring() {\n let str = this.empId > 0 ? (' Answered by: ' + this.empId + ' ht: ' + Math.round(this.ht)) : \" ABANDONNED after\"\n return 'at ' + this.timeStampEnd(100) + str + ' wait: ' + this.wait + ' call group: ' + this.callGroupId\n }\n}\n\nexport class SimData {\n /**\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n * @param {{id:number}[]} emps\n * @param {number} length\n */\n constructor(callGroups, emps, length) {\n /** @private @readonly @type {import(\"@/model/dn-callgroup.js\").CallGroup[]} */\n this._callGroups = callGroups;\n /** @readonly @type {number} */\n this.length = length;\n /** \n * key=callGroupId, values in array is null if no forecast, -1 if no planned.\n * @readonly @type {Map} \n */\n this.slMap = new Map // key=callGroupId\n /** @private @readonly @type {Map} */\n this._slTotalMap = new Map // key=callGroupId\n this._waitTotalMap = new Map // key=callGroupId\n /** @private @readonly @type {Map} */\n this._waitMap = new Map// key=callGroupId\n /** @private @readonly @type {Map} */\n this._waitWithinMap = new Map// key=callGroupId\n this._queueAvgMap = new Map // key=callGroupId [calls in que],[]\n /** @private @readonly @type {Map} */\n this._occupancyEmpMap = this.getInitiatedOccupancyMap(emps)//key=empId,value [seconds of work]\n this.initiateValueMap(this.slMap)\n this.initateTotalsValueMap(this._slTotalMap)\n this.initiateArrayMap(this._waitMap)\n this.initateTotalsArrayMap(this._waitTotalMap)\n this.initiateValueMap(this._queueAvgMap)\n this.initiateValueMap(this._waitWithinMap)\n }\n\n get slTotalMap() { return this._slTotalMap }\n\n get waitTotalMap() { return this._waitTotalMap }\n\n get waitMap() { return this._waitMap }\n\n get waitWithinMap() { return this._waitWithinMap }\n\n get queueAvgMap() { return this._queueAvgMap }\n\n get occupancyEmpMap() { return this._occupancyEmpMap }\n\n /**\n * @param {number} id\n */\n getCallGroup(id) {\n return this._callGroups.find(x => x.id === id);\n }\n\n /**\n * @private\n * @param {Map} xMap\n */\n initiateArrayMap(xMap) {\n let intervalItems = Array(this.length)\n for (let i = 0; i < this.length; i++) { intervalItems[i] = [] }\n xMap.set(0, intervalItems)\n for (let a = 0; a < this._callGroups.length; a++) {\n let intervalItems = Array(this.length)\n for (let i = 0; i < this.length; i++) { intervalItems[i] = [] }\n xMap.set(this._callGroups[a].id, intervalItems)\n }\n }\n\n /**\n * @private\n * @param {Map} xMap\n */\n initiateValueMap(xMap) {\n let intervalItems = Array(this.length)//key0 contains total\n for (let i = 0; i < this.length; i++) { intervalItems[i] = 0 }\n xMap.set(0, intervalItems)\n for (let a = 0; a < this._callGroups.length; a++) {\n let intervalItems = Array(this.length)\n for (let i = 0; i < this.length; i++) { intervalItems[i] = 0 }\n xMap.set(this._callGroups[a].id, intervalItems)\n }\n }\n\n /**\n * @private\n * @param {Map} xMap\n */\n initateTotalsArrayMap(xMap) {\n xMap.set(0, [])//key0 contains total\n for (let a = 0; a < this._callGroups.length; a++) {\n xMap.set(this._callGroups[a].id, [])\n }\n }\n\n /**\n * @private\n * @param {Map} xMap\n */\n initateTotalsValueMap(xMap) {\n xMap.set(0, 0)//key0 contains total\n for (let a = 0; a < this._callGroups.length; a++) {\n xMap.set(this._callGroups[a].id, 0)\n }\n }\n\n /**\n * @private\n * @param {{id:number}[]} emps\n */\n getInitiatedOccupancyMap(emps) {\n /** @type {Map} */\n const xMap = new Map //key0 contains total all emps\n let intervalItems = Array(this.length)\n for (let i = 0; i < this.length; i++) { intervalItems[i] = 0 }\n xMap.set(0, intervalItems)\n\n for (let e = 0; e < emps.length; e++) {\n let intervalItems = Array(this.length)\n for (let i = 0; i < this.length; i++) { intervalItems[i] = 0 }\n xMap.set(emps[e].id, intervalItems)\n }\n return xMap\n }\n}\n","import { condence, getDisplayResolutionFactor, getNumberOfDaysFromIntervalMinusOne, shuffleArray } from \"@/js/dn-helper.js\";\nimport { addDays, getShortDate } from '@/shared/dn-shared-helper.js';\nimport { getForcastOnInterval, getForcastXX } from './dn-forecast.js';\nimport { getEmpWorkArray, getEmpWorkMap } from \"#shared/dn-employee-schedule\";\nimport { TASK_KIND } from \"@/shared/dn-tasktype.js\";\nimport { simulationData } from \"@/stores/dn-simulation-data.js\";\nimport * as dnSimModel from './dn-simulation-model.js';\n/**\n* @typedef {{avgQueue:boolean; datesWithChanges:any[]; employeeOccupancy:boolean; forceUpdate:boolean; numberOfSimIterations:number; occ:boolean; sl:boolean; waitWithin:boolean}} OutputSpec\n*/\n\nconst _maxWaitBeforeAbandonn = 600\nconst _numberOfSecondsPerDay = 24 * 60 * 60\n\nexport class SimState {\n\n /**\n * @param {import(\"@/shared/dn-tasktype.js\").TaskTypes} taskTypes\n * @param {Date} dateNow\n * @param {Map>} forecastAdjustmentmap\n * @param {{ historicWeeks: number; adherancePercent: number; }} forecastOptions\n * @param {Map} historicDataMap,\n * @param {Map} aiForecastMap,\n * @param {{ handlingTimePercent: number; handlingTimeVariationPercent: number; callsPercent: number; }} simulationSettings\n * @param {Map} specialDaysMap\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n * @param {Date} latestImportDate\n * @param {import(\"@/model/dn-employee-cc.js\").EmployeeCallcenters} employeeCallcenters\n * @param {number} ccId\n * @param {number|null} affinity\n */\n constructor(taskTypes, dateNow, forecastAdjustmentmap, forecastOptions, historicDataMap,aiForecastMap, simulationSettings, specialDaysMap, callGroups, latestImportDate, employeeCallcenters, ccId, affinity = null) {\n /** @type {number|null} */\n this.affinity = affinity;\n /** @readonly @type {Map} */\n this.affinityTaskTypeById = new Map(taskTypes.list.filter(x => x.affinity === affinity && x.kind === TASK_KIND.task).map(x => [x.id, x]));\n /** @readonly @type {number|null} best task type to plan */\n this.taskTypeId = null;\n let maxWork = -1;\n for (const tt of this.affinityTaskTypeById.values()) {\n if (tt.work > maxWork) {\n maxWork = tt.work;\n this.taskTypeId = tt.id;\n }\n }\n /** @readonly @type {{ handlingTimePercent: number; handlingTimeVariationPercent: number; callsPercent: number; }} */\n this.simulationSettings = simulationSettings;\n /** @readonly @type {Date} */\n this.dateNow = dateNow;\n /** @readonly @type {Map>} */\n this.forecastAdjustmentmap = forecastAdjustmentmap;\n /** @readonly @type {Date} */\n this.latestImportDate = latestImportDate;\n /** @readonly @type {Map} */\n this.specialDaysMap = specialDaysMap;\n /** @readonly @type {Map} */\n this.taskTypeById = taskTypes.byId;\n /** @readonly @type {Map} */\n this.historicDataMap = historicDataMap;\n /** @readonly @type {Map} */\n this.aiForecastMap = aiForecastMap;\n /** @readonly @type {{ historicWeeks: number; adherancePercent: number; }} */\n this.forecastOptions = forecastOptions;\n /** @readonly @type {import(\"@/model/dn-callgroup.js\").CallGroup[]} */\n this.callGroups = callGroups.filter(x => x.affinity === affinity);\n /** @readonly @type {import(\"@/model/dn-employee-cc.js\").EmployeeCallcenters} */\n this.employeeCallcenters = employeeCallcenters;\n /** @readonly @type {number} */\n this.ccId = ccId;\n }\n}\n\nexport class SimParameters {\n /**\n * @param {SimState} simState\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule[]} schedule\n * @param {{id:number}[]} emps\n * @param {Date} simSt\n * @param {number} length\n */\n constructor(simState, schedule, emps, simSt, length) {\n this.dayForcast = simState.callGroups.map(function (x) {\n return {\n acgr: x,\n forc: getForcastOnInterval(simSt, length, simState.dateNow, simState.specialDaysMap, simState.forecastOptions.historicWeeks, x, simState.historicDataMap, simState.aiForecastMap, simState.forecastAdjustmentmap, simState.latestImportDate)\n }\n })\n /** @readonly @type {any[]} */\n this.daySchedule = schedule.map(function (x) {\n return {\n emp: { id: x.emp.id, skills: x.emp.skills, occupiedUntil: 0 }, scheduleInfoArray: getEmpWorkArray(x, simSt, simState.affinityTaskTypeById, length, simState.employeeCallcenters, simState.ccId)\n }\n });\n /** @readonly @type {import(\"@/model/dn-callgroup.js\").CallGroup[]} */\n this.callGroups = simState.callGroups;\n /** @readonly @type {{id:number}[]} */\n this.emps = emps;\n /** @readonly @type {number} */\n this.length = length;\n /** @readonly @type {Date} */\n this.simSt = simSt;\n /** @readonly @type {{ handlingTimePercent: number; handlingTimeVariationPercent: number; callsPercent: number; }} */\n this.simulationSettings = simState.simulationSettings;\n /** @readonly @type {{adherancePercent: number}} */\n this.forecastOptions = simState.forecastOptions;\n }\n}\n\n/**\n * @param {SimParameters} params\n * @param {number} numberOfIterations\n */\nexport function getSimResult(params, numberOfIterations) {\n\n const simData = new dnSimModel.SimData(params.callGroups, params.emps, params.length);\n const simStTime = params.simSt.getTime();\n for (let i = 0; i < numberOfIterations; i++) {\n for (const ds of params.daySchedule) {\n ds.emp.occupiedUntil = simStTime;\n }\n\n const calls = simulate(params.simSt, params.daySchedule, params.dayForcast, params.callGroups, params.simulationSettings, params.forecastOptions.adherancePercent);\n addSimData(simData, calls, params.simSt, numberOfIterations, params.daySchedule);\n }\n\n return getSimulationResult(params, simData);\n}\n\n\n/**\n * @param {{ emps: {id:number}[]; callGroups: import(\"@/model/dn-callgroup.js\").CallGroup[]; daySchedule: any[]; }} params\n */\nfunction getEmptySimDay(params) {\n const length = 96;\n const simData = new dnSimModel.SimData(params.callGroups, params.emps, length);\n return getSimulationResult(params, simData);\n}\n\n/**\n * @param {string} dtKey\n * @param {number|null} affinityId\n */\nfunction getSimulationDataKey(dtKey, affinityId) {\n return dtKey + '_' + affinityId;\n}\n\n/**\n * @param {OutputSpec} outputSpec\n * @param {SimState} simState\n * @param {{dateInterval:Date[]}} scheduleOptions\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule[]} schedule\n * @param {?function(number):void} callbackSiminfo\n */\nexport function getSimData(outputSpec, simState, scheduleOptions, schedule, callbackSiminfo = null) {\n const length = 96;\n let simData = {}\n const numberOfDays = getNumberOfDaysFromIntervalMinusOne(scheduleOptions.dateInterval)\n let dt = new Date\n const emps = schedule.map(function (x) { return x.emp });\n const numberOfIterations = outputSpec.numberOfSimIterations\n const simulationDataMap = simulationData.simulationDataMap;\n\n // var t0 = performance.now()\n for (let d = 0; d < numberOfDays; d++) {\n if (callbackSiminfo) { callbackSiminfo((d + 1) * 100 / numberOfDays) }\n dt = addDays(new Date(scheduleOptions.dateInterval[0]), d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n const dtKey = getShortDate(dt);\n const key = getSimulationDataKey(dtKey, simState.affinity);\n\n if (!simulationDataMap.has(key) || outputSpec.forceUpdate || outputSpec.datesWithChanges.includes(dtKey)) {\n let simDay;\n if (numberOfIterations > 0) {\n const simParameters = new SimParameters(simState, schedule, emps, dt, length);\n simDay = getSimResult(simParameters, numberOfIterations);\n } else {\n const x = { emps: emps, callGroups: simState.callGroups, daySchedule: [] };\n simDay = getEmptySimDay(x);\n }\n simulationDataMap.set(key, simDay)\n }\n }\n\n if (outputSpec.sl) {\n simData.serviceLevelDisplayData = getServicelevelDisplayData(simState.affinity, scheduleOptions.dateInterval[0], numberOfDays, simState);\n }\n if (outputSpec.occ) {\n const numberOfDays = getNumberOfDaysFromIntervalMinusOne(scheduleOptions.dateInterval)\n let empWorkMap = getEmpWorkMap(schedule, simState.affinityTaskTypeById, scheduleOptions.dateInterval[0], numberOfDays, length, simState.employeeCallcenters, simState.ccId);\n let x = getOccupancyAndWorkChartData(scheduleOptions.dateInterval[0], numberOfDays, empWorkMap, emps, length, simState);\n simData.occChartData = x.occData;\n simData.workChartData = x.workData;\n simData.work = x.totWork;\n simData.occ = x.totOcc;\n }\n\n /* if(outputSpec.sickAndVaccationSummary){\n let data=getSickAndVaccationSummary(daySchedule,taskTypeMap)\n simData.numberOfSick=x.numberOfSick;\n simData.numberOfVacation=x.numberOfVacation;\n } */\n\n\n if (outputSpec.avgQueue) {\n simData.avgQueueData = getQueueChartData(scheduleOptions.dateInterval[0], numberOfDays, simState);\n }\n if (outputSpec.waitWithin) {\n simData.waitWithinData = getWaitWithinData(scheduleOptions.dateInterval[0], numberOfDays, simState);\n }\n if (outputSpec.employeeOccupancy) {\n simData.employeeOccupancyData = getEmployeeOccupancyData(scheduleOptions.dateInterval[0], numberOfDays, emps, length, simState);\n }\n // var t1 = performance.now()\n // console.log(\"Timer \" + (t1 - t0) + \" milliseconds.\")\n return simData\n}\n\n/**\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n */\nfunction getDataByAffinity(callGroups, emplyeesByAffinity) {\n /** @type {Map} */\n const callGroupsByAffinity = new Map();\n for (const cg of callGroups) {\n let cgData = callGroupsByAffinity.get(cg.affinity);\n if (cgData === undefined) {\n cgData = [];\n callGroupsByAffinity.set(cg.affinity, cgData);\n }\n cgData.push(cg);\n }\n\n const byAffinity = [];\n for (const [affinity, cgs] of callGroupsByAffinity) {\n byAffinity.push({ affinity, callGroups: cgs, slTarget: getAvgSlSetting(cgs), fantomDefaultSkills: cgs.map(function (x) { return x.id }), filteredEmpsByAffinity: emplyeesByAffinity.get(affinity) });\n }\n\n return byAffinity;\n}\n\n/**\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n * @param {any[]} employees\n * @param {any[]} affinities\n */\nfunction getEmployeesByAffinity(callGroups, employees, affinities) {\n const hasAffinities = affinities != null && affinities.length > 0\n\n /** @type {Map} */\n const returnMap = new Map()\n\n if (hasAffinities) {\n\n //prepare data structure\n /** @type {Map} */\n const cgMap = new Map();\n let hasCallgroupWithNoAffinity = false;\n for (const cg of callGroups) {\n cgMap.set(cg.id, cg.affinity);\n if (cg.affinity === null) {\n hasCallgroupWithNoAffinity = true;\n }\n }\n if (hasCallgroupWithNoAffinity) {\n returnMap.set(null, []);\n }\n\n for (const affinity of affinities) {\n returnMap.set(affinity.id, []);\n }\n\n //load arrys with emps connected to each affinity\n for (const emp of employees) {\n for (const s of emp.skills) {\n let a = cgMap.get(s)\n let empArray = returnMap.get(a)\n if (empArray && !empArray.includes(emp)) { empArray.push(emp) }\n }\n }\n } else {\n returnMap.set(null, employees)\n }\n return returnMap\n}\n\n/**\n * @param {any} simulationSettings\n * @param {{ dateInterval: Date[]; }} scheduleOptions\n * @param {any[]} employees\n * @param {{ historicWeeks: number; adherancePercent: number}} forecastOptions\n * @param {Map} specialDaysMap\n * @param {Date} dateNow\n * @param {Map>} forecastAdjustmentmap\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n * @param {Map} historicDataMap\n * @param {import(\"@/stores/dn-forecast-ai-data.js\").ForecastDataMap} aiForecastMap\n * @param {boolean} forceUpdate\n * @param {number|null} affinityId\n * @param {Date} latestImportDate\n * @param {any[]} affinities\n * @param {number} [numberOfIterations]\n */\nexport function getTarget(simulationSettings, scheduleOptions, employees,\n forecastOptions, specialDaysMap, dateNow, forecastAdjustmentmap,\n callGroups, historicDataMap,aiForecastMap, forceUpdate, affinityId, latestImportDate, affinities, numberOfIterations = 1) {\n //function may be called before data are fully loaded\n if (employees.length === 0 || historicDataMap.size === 0) { return []; }\n\n // var t0 = performance.now()\n /** @type {number[]} */\n let returnArray = [];\n\n const numberOfDays = getNumberOfDaysFromIntervalMinusOne(scheduleOptions.dateInterval);\n const adheranceFactor = 100 / forecastOptions.adherancePercent;\n if (!simulationData.emplyeesByAffinity || forceUpdate) {\n simulationData.emplyeesByAffinity = getEmployeesByAffinity(callGroups, employees, affinities);\n }\n let byAffinity;\n const targetDataMap = simulationData.targetDataMap;\n for (let d = 0; d < numberOfDays; d++) {\n const dt = addDays(new Date(scheduleOptions.dateInterval[0]), d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n let dtKey = getShortDate(dt);\n\n if (!targetDataMap.has(dtKey) || forceUpdate) {\n /** @type {Map}} */\n const targetByAffinity = new Map();\n if (byAffinity === undefined) {\n byAffinity = getDataByAffinity(callGroups, simulationData.emplyeesByAffinity);\n }\n\n for (const affinityData of byAffinity) {\n if (affinityData.filteredEmpsByAffinity.length === 0) { continue; }\n /** @type {number[]} */\n const target = new Array(96).fill(0)\n const dayForcast = affinityData.callGroups.map(function (x) {\n return {\n acgr: x,\n forc: getForcastXX(new Date(dt), dateNow, specialDaysMap, forecastOptions.historicWeeks, x, historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate)\n }\n })\n\n for (let i = 0; i < numberOfIterations; i++) {\n for (let q = 0; q < 96; q++) {\n //expand the quarter with a factor to get at least 100 calls to simulate\n let timeRangeInQuarters = getTimeRangeInQuartersForTargetSim(dayForcast, q)\n let calls = generateQuarterCallsTarget(dt, dayForcast, affinityData.callGroups, simulationSettings, q, timeRangeInQuarters)\n\n if (calls.length == 0) {\n target[q] = 0\n } else {\n\n //detrmin initial possible target range based on Erlang C and after one iteration based on previous iterations\n //let targetRange = []\n // if (i == 0 || target[q] < 10) {\n //const erlangA = getErlangA(dayForcast, q);\n // targetRange = [erlangA, erlangA * 3];\n const minTarget = getErlangCTargetWeighted(dayForcast, q);\n const maxTarget = getErlangCTargetSum(dayForcast, q);\n const targetRange = [Math.floor(minTarget), Math.ceil(maxTarget)];\n\n // } else {\n // if (i === 1)\n // targetRange = [(target[q] / (i) * 0.8), (target[q] / (i) * 1.2)];\n // else\n // targetRange = [(target[q] / (i) * 0.9), (target[q] / (i) * 1.1)];\n // }\n //narrow posible target range by half in each iteration\n let slLow = 0;\n let slHigh = 100;\n let hasCalculated = [targetRange[0] === 0, false];\n do {\n let testNumberOfAgent = undefined;\n if (targetRange[1] - targetRange[0] < 3) {\n if (!hasCalculated[0]) {\n testNumberOfAgent = targetRange[0];\n hasCalculated[0] = true;\n } else if (!hasCalculated[1]) {\n testNumberOfAgent = targetRange[1];\n hasCalculated[1] = true;\n }\n }\n if (testNumberOfAgent === undefined)\n testNumberOfAgent = Math.round((targetRange[0] + targetRange[1]) / 2);\n\n let emps = []\n for (let e = 0; e < testNumberOfAgent; e++) { emps.push(getFantom(dt, affinityData)) }\n const waitData = getWaitData(emps, calls, q, timeRangeInQuarters, affinityData.callGroups, dt);\n let slQuarter = getTargetServiceLevel(waitData, calls, affinityData.slTarget)\n if (slQuarter < affinityData.slTarget.slPercent) {\n slLow = slQuarter\n targetRange[0] = testNumberOfAgent;\n hasCalculated[0] = true;\n } else {\n slHigh = slQuarter;\n targetRange[1] = testNumberOfAgent;\n hasCalculated[1] = true;\n }\n\n } while (!hasCalculated[0] || !hasCalculated[1] || (targetRange[1] - targetRange[0] > 2))\n const weight = (slHigh - affinityData.slTarget.slPercent) / (slHigh - slLow);\n let weighted = weight * targetRange[0] + (1 - weight) * targetRange[1];\n weighted = Math.max(minTarget, Math.min(maxTarget, weighted));\n target[q] += Math.max(1, weighted);\n }\n }\n }\n\n for (let q = 0; q < 96; q++) {\n target[q] = target[q] * adheranceFactor / numberOfIterations\n }\n\n targetByAffinity.set(affinityData.affinity, target);\n\n targetDataMap.set(dtKey, targetByAffinity)\n //validation data\n /* for(let p=0;p<96;p++){\n let noc =0\n let ht=0\n let aht=0\n for(let a = 0;a0){aht=ht/noc}\n console.log(noc+';'+aht+';'+target[p])\n } */\n\n }\n }\n let targetSum;\n const dayTargetByAffinity = targetDataMap.get(dtKey);\n if (dayTargetByAffinity !== undefined) {\n if (affinityId !== null) {\n targetSum = dayTargetByAffinity.get(affinityId);\n } else if (dayTargetByAffinity.size === 1) {\n for (const dayTarget of dayTargetByAffinity.values()) {\n targetSum = dayTarget;\n }\n } else {\n targetSum = new Array(96).fill(0);\n for (const dayTarget of dayTargetByAffinity.values()) {\n for (let q = 0; q < 96; q++) {\n targetSum[q] += dayTarget[q];\n }\n }\n }\n } else {\n targetSum = new Array(96).fill(0);\n }\n\n returnArray = returnArray.concat(targetSum);\n }\n\n // console.log(t0 - performance.now())\n return returnArray;\n\n\n /**\n * @param {number[]} waitData\n * @param {any[]} calls\n * @param {{ slPercent?: number; slWithin: any; min?: number; max?: number; }} slTarget\n */\n function getTargetServiceLevel(waitData, calls, slTarget) {\n let slQuarter = 0\n let x = waitData.filter(d => d <= slTarget.slWithin).length\n if (x > 0) { slQuarter = Math.round(100 * x / waitData.length) } else { slQuarter = 0 }\n if (calls.length == 0) { slQuarter = 100 }\n return slQuarter\n }\n\n /**\n * @param {any[]} emps\n * @param {dnSimModel.Call[]} calls\n * @param {number} q\n * @param {number} timeRangeInQuarters\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n * @param {Date} daySt\n */\n function getWaitData(emps, calls, q, timeRangeInQuarters, callGroups, daySt) {\n let waitData = []\n\n //arange emps by skill in a Map\n /** @type {Map} */\n let empsBySkillMap = new Map\n for (let a = 0; a < callGroups.length; a++) {\n const callGroupId = callGroups[a].id;\n let filteredEmps = emps.filter(e => e.skills.includes(callGroupId))\n empsBySkillMap.set(callGroupId, filteredEmps)\n }\n\n //set initial occupied time to start of day\n for (let ex = 0; ex < emps.length; ex++) {\n emps[ex].occupiedUntil = daySt.getTime();\n }\n\n const excludeStartup = daySt.getTime() + 1000 * ((q + (3 * timeRangeInQuarters / 15)) * 15 * 60);\n for (let c = 0; c < calls.length; c++) {\n let empWithLongestWait = getEmpWithLongestWait(empsBySkillMap.get(calls[c].callGroupId), calls[c])\n if (empWithLongestWait) {\n const diff = (empWithLongestWait.occupiedUntil - calls[c].msSinceEpoch) / 1000\n if (diff < _maxWaitBeforeAbandonn) {\n calls[c].wait = diff > 0 ? diff : 0;\n empWithLongestWait.occupiedUntil = calls[c].timeStampEnd(100)//adherence is applied after target calculation\n } else {\n calls[c].wait = _maxWaitBeforeAbandonn\n }\n } else { calls[c].wait = _maxWaitBeforeAbandonn }\n\n //Exclude first minutes to avoid startup effect\n if (calls[c].msSinceEpoch > excludeStartup) {\n waitData.push(calls[c].wait)\n }\n }\n return waitData\n\n function getEmpWithLongestWait(emps, call) {\n let maxDiff = 10000000\n let indexFound = -1\n for (let ex = 0; ex < emps.length; ex++) {\n const diff = emps[ex].occupiedUntil - call.msSinceEpoch;\n if (diff < maxDiff) {\n indexFound = ex\n maxDiff = diff\n }\n }\n //To be discussed:If I understand this correctly the routing of calls is defined so that the work is spread out evenly. Perhaps alternative one could stop and give the call to the first how has no wait time.\n return emps[indexFound]\n }\n }\n\n //create a fantom agent with random skills following skill profile of contavt center\n function getFantom(dt, affinityData) {\n let randomEmpId = Math.floor(Math.random() * affinityData.filteredEmpsByAffinity.length)\n let fantom = null\n if (affinityData.filteredEmpsByAffinity[randomEmpId].skills.length > 0) {\n fantom = { occupiedUntil: dt.getTime(), skills: affinityData.filteredEmpsByAffinity[randomEmpId].skills }\n } else {\n fantom = { occupiedUntil: dt.getTime(), skills: affinityData.fantomDefaultSkills }\n }\n return fantom\n }\n}\n\n\n//if fixedNumberOfcalls>1, this number of calls are generated each q. the time range is prolonged so that the same density of calls are produced\n/**\n * @param {Date} simSt\n * @param {any[]} dayForcast\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n * @param {{ handlingTimePercent: number; handlingTimeVariationPercent: number; }} simulationSettings\n * @param {number} q\n * @param {number} timeRangeInQuarters\n */\nfunction generateQuarterCallsTarget(simSt, dayForcast, callGroups, simulationSettings, q, timeRangeInQuarters) {\n let returnValue = []\n for (let a = 0; a < dayForcast.length; a++) {\n let aht = dayForcast[a].forc.noc[q] == 0 ? 0 : dayForcast[a].forc.ht[q] / dayForcast[a].forc.noc[q]\n aht = aht * ((100 + simulationSettings.handlingTimePercent) / 100)\n let ht = aht * (1 + (Math.random() - 0.5) * (2 * simulationSettings.handlingTimeVariationPercent / 100))\n //if(q==0){console.log(timeRangeInQuarters+ ' ' +dayForcast[a].forc.noc[q])}\n for (let i = 0; i < dayForcast[a].forc.noc[q] * timeRangeInQuarters; i++) {\n const secondsToAdd = q * 15 * 60 + Math.random() * 15 * 60 * timeRangeInQuarters;\n const c = new dnSimModel.Call(simSt.getTime() + secondsToAdd * 1000, ht, callGroups[a].id)\n returnValue.push(c)\n }\n //if(q==0){ console.log('q: '+q+ ' calls: '+ returnValue.length)}\n }\n return returnValue.sort(function (a, b) { return a.msSinceEpoch - b.msSinceEpoch; });\n}\n\n/**\n* @param {{acgr: import(\"@/model/dn-callgroup.js\").CallGroup, forc: {ht:number[], noc:number[]}}[]} dayForcast\n* @param {number} q\n*/\nfunction getErlangA(dayForcast, q) {\n let returnValue = 0\n for (let a = 0; a < dayForcast.length; a++) {\n returnValue += dayForcast[a].forc.ht[q]\n }\n\n return returnValue / 900;\n}\n/**\n* @param {{acgr: import(\"@/model/dn-callgroup.js\").CallGroup, forc: {ht:number[], noc:number[]}}[]} dayForcast\n* @param {number} q\n*/\nfunction getErlangCTargetWeighted(dayForcast, q) {\n let ht = 0;\n let noc = 0;\n let slPercent = 100;\n let slWithin = 0;\n for (let a = 0; a < dayForcast.length; a++) {\n const df = dayForcast[a];\n if (df.forc.noc[q] > 0) {\n ht += df.forc.ht[q];\n noc += df.forc.noc[q];\n slPercent = Math.min(slPercent, df.acgr.slPercent);\n slWithin = Math.max(slWithin, df.acgr.slWithin);\n }\n }\n\n const e = ht / 900;\n const aht = noc == 0 ? 0 : ht / noc;\n return getErlangCTarget(e, aht, slWithin, slPercent);\n}\n\n/**\n* @param {{acgr: import(\"@/model/dn-callgroup.js\").CallGroup, forc: {ht:number[], noc:number[]}}[]} dayForcast\n* @param {number} q\n*/\nfunction getErlangCTargetSum(dayForcast, q) {\n let sum = 0\n for (let a = 0; a < dayForcast.length; a++) {\n const df = dayForcast[a];\n const e = df.forc.ht[q] / 900;\n const aht = df.forc.noc[q] == 0 ? 0 : df.forc.ht[q] / df.forc.noc[q];\n sum += getErlangCTarget(e, aht, df.acgr.slWithin, df.acgr.slPercent)\n }\n\n return sum;\n}\n\n\n/**\n * @param {Date} dt\n * @param {Date} dateNow\n * @param {Map} specialDaysMap\n * @param {any} forecastOptions\n * @param {Map} historicDataMap\n * @param {Map} aiForecastMap\n * @param {Map>} forecastAdjustmentmap\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroupsToInclude\n * @param {Date} latestImportDate\n */\nexport function getErlangCTargetArray(dt, dateNow, specialDaysMap, forecastOptions, historicDataMap,aiForecastMap, forecastAdjustmentmap, callGroupsToInclude, latestImportDate) {\n const minArray = new Array(96).fill(0);\n const maxArray = new Array(96).fill(0);\n\n /** @type {Map} */\n const cgByAffinity = new Map();\n for (const cg of callGroupsToInclude) {\n let cgs = cgByAffinity.get(cg.affinity)\n if (cgs === undefined) {\n cgs = [];\n cgByAffinity.set(cg.affinity, cgs);\n }\n cgs.push(cg);\n }\n\n const adherenceFactor = forecastOptions.adherancePercent / 100;\n for (const callGroups of cgByAffinity.values()) {\n const totForc = { noc: new Array(96).fill(0), ht: new Array(96).fill(0) }\n let slSetting = getAvgSlSetting(callGroups)\n /** @type {number[]} */\n const sum = new Array(96).fill(0);\n for (let a = 0; a < callGroups.length; a++) {\n let forc = getForcastXX(new Date(dt), dateNow, specialDaysMap, forecastOptions.historicWeeks, callGroups[a], historicDataMap,aiForecastMap, forecastAdjustmentmap, latestImportDate)\n for (let q = 0; q < 96; q++) {\n const e = forc.ht[q] / 900;\n const aht = forc.noc[q] == 0 ? 0 : forc.ht[q] / forc.noc[q];\n totForc.ht[q] += forc.ht[q]\n totForc.noc[q] += forc.noc[q]\n sum[q] += getErlangCTarget(e, aht, callGroups[a].slWithin, callGroups[a].slPercent) / adherenceFactor;\n }\n }\n for (let q = 0; q < 96; q++) {\n if (sum[q] > 0) {\n maxArray[q] += Math.max(1.0, sum[q]);\n }\n const e = totForc.ht[q] / 900;\n const aht = totForc.noc[q] == 0 ? 0 : totForc.ht[q] / totForc.noc[q];\n minArray[q] += getErlangCTarget(e, aht, slSetting.slWithin, slSetting.slPercent) / adherenceFactor;\n }\n }\n\n return { minArray, maxArray };\n}\n\n\nfunction getTimeRangeInQuartersForTargetSim(dayForcast, q) {\n let timeRangeInQuarters = 1\n let forcSum = 0\n for (let a = 0; a < dayForcast.length; a++) { forcSum += dayForcast[a].forc.noc[q] }\n if (forcSum > 0) { timeRangeInQuarters = 60 / forcSum }\n if (timeRangeInQuarters < 1.5) { timeRangeInQuarters = 1.5 }\n return timeRangeInQuarters\n}\n\n/**\n * @param {Date} simSt\n * @param {{emp:{id:number, skills:number[], occupiedUntil: number}, scheduleInfoArray:number[]}[]} daySchedule\n * @param {{ acgr: import(\"@/model/dn-callgroup.js\").CallGroup; forc: { noc: number[]; ht: number[]; }}[]} dayForcast\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n * @param {{ handlingTimePercent: number; handlingTimeVariationPercent: number; callsPercent: number; }} simulationSettings\n * @param {number} adherancePercent\n */\nfunction simulate(simSt, daySchedule, dayForcast, callGroups, simulationSettings, adherancePercent) {\n let calls = generateQuarterCalls(simSt, dayForcast, simulationSettings)\n\n if (!simulationData.callGroupPrioInfoMap) { loadCallGroupPrioInfo(callGroups) }\n const maxPrioSecondInQueue = simulationData.callGroupPrioMax\n const callGroupPrioInfoMap = simulationData.callGroupPrioInfoMap\n\n let lastQuarter = -1\n\n /** @type {Map} */\n const daySchedulesQuarterBySkillMap = new Map();\n shuffleArray(daySchedule);\n\n for (let c = 0; c < calls.length; c++) {\n const call = calls[c]\n const q = Math.floor((calls[c].msSinceEpoch - simSt.getTime()) / (1000 * 60 * 15));\n if (q != lastQuarter) {\n for (let a = 0; a < callGroups.length; a++) {\n let callGroupId = callGroups[a].id\n let filteredDaySchedules = daySchedule.filter(d => d.emp.skills.includes(callGroupId) && d.scheduleInfoArray[q] > 0)\n\n daySchedulesQuarterBySkillMap.set(callGroupId, filteredDaySchedules)\n }\n lastQuarter = q\n }\n\n if (maxPrioSecondInQueue > 0) {\n for (let i = 1; i < 100; i++) {\n if (i + c < calls.length) {\n const callX = calls[i + c]\n let qx = Math.floor((callX.msSinceEpoch - simSt.getTime()) / (1000 * 60 * 15))\n if (qx == lastQuarter) {\n if (!callX.processed && (callX.msSinceEpoch - call.msSinceEpoch) < callGroupPrioInfoMap.get(callX.callGroupId) * 1000) {\n processCall(callX, qx)\n }\n }\n }\n }\n }\n if (!call.processed) { processCall(call, q) }\n }\n //if(calls[c].callGroupId==1&&calls[c].empId>0){ console.log(calls[c].tostring())}\n return calls\n\n function processCall(call, q) {\n //DaySchedules relevant for the actual quarter and skill\n let skilledAndWorkingDayScheduls = daySchedulesQuarterBySkillMap.get(call.callGroupId)\n if (skilledAndWorkingDayScheduls && skilledAndWorkingDayScheduls.length > 0) {\n const empDayScheduleWithMaxWait = getDayScheduleWithLowestWait(skilledAndWorkingDayScheduls, call);\n if (empDayScheduleWithMaxWait !== undefined) {\n const diff = (empDayScheduleWithMaxWait.emp.occupiedUntil - call.msSinceEpoch) / 1000;\n if (diff < _maxWaitBeforeAbandonn) {\n call.wait = diff > 0 ? diff : 0;\n call.empId = empDayScheduleWithMaxWait.emp.id;\n empDayScheduleWithMaxWait.emp.occupiedUntil = call.timeStampEnd(adherancePercent, empDayScheduleWithMaxWait.scheduleInfoArray[q])\n } else {\n call.wait = _maxWaitBeforeAbandonn\n }\n } else {\n call.wait = _maxWaitBeforeAbandonn;\n }\n } else {\n call.wait = _maxWaitBeforeAbandonn\n }\n call.processed = true\n //console.log(call.tostring());\n }\n\n\n /**\n * @param {{emp:{id:number, skills:number[], occupiedUntil: number}, scheduleInfoArray:number[]}[]} skilledAndWorkingDayScheduls\n * @param {dnSimModel.Call} call\n */\n function getDayScheduleWithLowestWait(skilledAndWorkingDayScheduls, call) {\n let maxDiff = Number.MAX_VALUE;\n let indexFound = -1\n for (let ex = 0; ex < skilledAndWorkingDayScheduls.length; ex++) {\n let diff = skilledAndWorkingDayScheduls[ex].emp.occupiedUntil - call.msSinceEpoch\n if (maxDiff === null || diff < maxDiff) {\n indexFound = ex\n maxDiff = diff\n }\n }\n\n //To be discussed:If I understand this correctly the routing of calls is defined so that the work is spread out evenly. Perhaps alternative one could stop and give the call to the first how has no wait time.\n return skilledAndWorkingDayScheduls[indexFound]\n }\n\n}\n/**\n * @param {dnSimModel.SimData} simDay\n * @param {dnSimModel.Call[]} calls\n * @param {Date} simSt\n * @param {number} numberOfIterations\n * @param {{emp:{id:number}, scheduleInfoArray:number[]}[]} daySchedule\n */\nfunction addSimData(simDay, calls, simSt, numberOfIterations, daySchedule) {\n const length = simDay.length;\n const msPerIndex = 1000 * 60 * 15;\n const msTot = msPerIndex * length;\n\n //Prepare wait&ht data\n for (let c = 0; c < calls.length; c++) {\n const iCallStart = Math.floor(length * (calls[c].msSinceEpoch - simSt.getTime()) / msTot);\n simDay.waitMap.get(0)[iCallStart].push(calls[c].wait)\n simDay.waitMap.get(calls[c].callGroupId)[iCallStart].push(calls[c].wait)\n simDay.waitTotalMap.get(0).push(calls[c].wait)\n simDay.waitTotalMap.get(calls[c].callGroupId).push(calls[c].wait)\n if (calls[c].empId) {\n let ixTalkStart = length * (calls[c].msSinceEpoch + calls[c].wait * 1000 - simSt.getTime()) / msTot\n let iTalkStart = Math.floor(ixTalkStart)\n let x = calls[c].ht\n //long calls are distributed over several periods\n do {\n let xPart = 0\n if (x < (iTalkStart + 1 - ixTalkStart) * msPerIndex) { xPart = x } else { xPart = (iTalkStart + 1 - ixTalkStart) * msPerIndex }\n x = x - xPart\n if (iTalkStart < length) { simDay.occupancyEmpMap.get(calls[c].empId)[iTalkStart] += xPart / numberOfIterations }\n iTalkStart += 1\n ixTalkStart = iTalkStart\n } while (x > 0);\n }\n }\n\n //set zero occupancy if no work\n for (let ex = 0; ex < daySchedule.length; ex++) {\n let occupArray = simDay.occupancyEmpMap.get(daySchedule[ex].emp.id)\n let workArray = daySchedule[ex].scheduleInfoArray\n for (let q = 0; q < length; q++) {\n if (workArray[q] == 0) { occupArray[q] = 0 }\n }\n }\n}\n\n\n/**\n * @param {{callGroups:import(\"@/model/dn-callgroup.js\").CallGroup[];emps:{id:number}[];daySchedule:any[]}} params\n * @param {dnSimModel.SimData} simDay\n */\nfunction getSimulationResult(params, simDay) {\n const callGroups = params.callGroups;\n const emps = params.emps;\n const numberOfDayIntervals = simDay.length;\n const numberOfSecondsPerInterval = 900;\n //if(!callGroups){return simDay}\n let callGroupIds = callGroupIdsWith0(callGroups)\n\n //Sl total\n for (let a = 0; a < callGroupIds.length; a++) {\n let slWithin = (a == 0) ? getAvgSlSetting(callGroups).slWithin : callGroups[a - 1].slWithin\n let waitsData = simDay.waitTotalMap.get(callGroupIds[a])\n if (waitsData.length > 0) {\n if (waitsData.filter(d => d <= slWithin).length > 0) {\n simDay.slTotalMap.set(callGroupIds[a], Math.round(100 * waitsData.filter(d => d <= slWithin).length / waitsData.length))\n }\n }\n\n\n //Sl and waitqueue\n for (let i = 0; i < numberOfDayIntervals; i++) {\n let waitsData2 = simDay.waitMap.get(callGroupIds[a])[i].sort(function (x, y) { return x - y });\n if (waitsData2.length > 0) {\n if (waitsData2.filter(d => d <= slWithin).length > 0) {\n simDay.slMap.get(callGroupIds[a])[i] =100 * waitsData2.filter(d => d <= slWithin).length / waitsData2.length;\n }\n\n simDay.queueAvgMap.get(callGroupIds[a])[i] = waitsData2.reduce((a, b) => a + b, 0) / (_numberOfSecondsPerDay / numberOfDayIntervals);\n simDay.waitWithinMap.get(callGroupIds[a])[i] = waitsData2[Math.round(waitsData2.length * 80 / 100)];\n }\n else {\n simDay.slMap.get(callGroupIds[a])[i] = null//if forcast is zero\n }\n }\n\n //Zero coverage NOT reported on total or department level\n if(a!=0){\n let slArray = simDay.slMap.get(callGroupIds[a])\n if (slArray.includes(0)) {\n for (let i = 0; i < slArray.length; i++) {\n if (slArray[i] == 0) {\n if (params.daySchedule.filter(d => d.emp.skills.includes(callGroupIds[a]) && d.scheduleInfoArray[i] > 0).length == 0) {\n slArray[i] = -1\n }\n }\n }\n }\n }\n }\n\n //Occupancy data\n let occData = simDay.occupancyEmpMap.get(0)\n for (let e = 0; e < emps.length; e++) {\n let occEmpData = simDay.occupancyEmpMap.get(emps[e].id)\n for (let i = 0; i < numberOfDayIntervals; i++) {//calls over interval border\n if (occEmpData[i] > numberOfSecondsPerInterval && i < numberOfDayIntervals - 1) {\n //console.log((emps[e].id + '-'+ occEmpData[i]))\n occEmpData[i + 1] += occEmpData[i] - numberOfSecondsPerInterval\n occEmpData[i] = numberOfSecondsPerInterval\n }\n occData[i] += occEmpData[i]\n }\n }\n\n return simDay\n}\n\n/** \n * @typedef {{ acgrid: number|null, affinity: number|null, name: string, slMin: number, slAvg: number, slMax: number, slPeneltyScore: number, slData: any[],\n * slSetting: { slPercent: number, slWithin: number, min: number, max: number } }} ServicelevelDisplayData\n */\n\n/**\n * @param {number|null} affinity\n * @param {string | number | Date} stDt\n * @param {number} numberOfDays\n * @param {SimState} simState\n */\nfunction getServicelevelDisplayData(affinity, stDt, numberOfDays, simState) {\n\n const callGroups = simState.callGroups;\n let callGroupIds = callGroupIdsWith0(callGroups)\n /** @type {ServicelevelDisplayData[]} */\n const returnArray = [];\n let displayResolutionFactor = getDisplayResolutionFactor(numberOfDays)\n\n returnArray.push({ acgrid: null, affinity, name: \"Service level\", slMin: 0, slAvg: 0, slMax: 0,slPeneltyScore:0, slData: [], slSetting: getAvgSlSetting(callGroups) })\n for (let a = 0; a < callGroups.length; a++) {\n returnArray.push({\n acgrid: callGroups[a].id, affinity, name: callGroups[a].name.slice(0, 10), slMin: 0, slAvg: 0, slMax: 0,slPeneltyScore:0, slData: [],\n slSetting: { slPercent: callGroups[a].slPercent, slWithin: callGroups[a].slWithin, min: callGroups[a].slPercent - 30, max: 100 }\n })\n }\n\n let dt = new Date\n for (let d = 0; d < numberOfDays; d++) {\n dt = addDays(new Date(stDt), d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n let dtKey = getShortDate(dt);\n const key = getSimulationDataKey(dtKey, simState.affinity);\n const simDay = simulationData.simulationDataMap.get(key)\n for (let a = 0; a < callGroupIds.length; a++) {\n returnArray[a].slData = returnArray[a].slData.concat(simDay.slMap.get(callGroupIds[a]))\n //returnArray[a].slData = returnArray[a].slData.concat(condence(simDay.slMap.get(callGroupIds[a]), displayResolutionFactor))\n returnArray[a].slAvg += Math.round(simDay.slTotalMap.get(callGroupIds[a]))\n }\n }\n //console.log(returnArray);\n\n if(numberOfDays>0){\n for (let a = 0; a < callGroupIds.length; a++) {\n returnArray[a].slMin = Math.min(...returnArray[a].slData.filter(d =>d!==null ))\n returnArray[a].slMax = Math.max(...returnArray[a].slData)\n returnArray[a].slAvg = (numberOfDays == 0) ? 0 : Math.round(returnArray[a].slAvg / numberOfDays)\n returnArray[a].slPeneltyScore = (returnArray[a].slData.filter(d =>d==-1 ).length*10+returnArray[a].slData.filter(d =>d===0 ).length*5+returnArray[a].slData.filter(d =>d>0&&d>} empWorkMap\n * @param {any[]} emps\n * @param {number} resolution\n * @param {SimState} simState\n */\nfunction getOccupancyAndWorkChartData(stDt, numberOfDays, empWorkMap, emps, resolution, simState) {\n /** @type {ChartData[]} */\n const returnArrayOcc = [];\n /** @type {ChartData[]} */\n const returnArrayWork = []\n let occArray = []\n let workArray = []\n let occWorkArray = []\n let totWork = 0\n let totOccWork = 0\n let totOcc = 0\n let displayResolutionFactor = getDisplayResolutionFactor(numberOfDays)\n\n let dt = new Date\n for (let d = 0; d < numberOfDays; d++) {\n dt = addDays(new Date(stDt), d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n let dtKey = getShortDate(dt);\n let empSumArray = Array(resolution).fill(0)\n const key = getSimulationDataKey(dtKey, simState.affinity);\n const simDay = simulationData.simulationDataMap.get(key);\n for (let e = 0; e < emps.length; e++) {\n let empWork = empWorkMap.get(emps[e].id).get(dtKey)\n let empOccArray = simDay.occupancyEmpMap.get(emps[e].id)\n for (let i = 0; i < resolution; i++) {\n if (empWork[i] == 0) { empOccArray[i] = 0 } //set zero occupancy if no work\n empSumArray[i] += empWork[i]\n }\n }\n\n occWorkArray = occWorkArray.concat(condence(simDay.occupancyEmpMap.get(0), displayResolutionFactor))\n workArray = workArray.concat(condence(empSumArray, displayResolutionFactor))\n }\n for (let i = 0; i < occWorkArray.length; i++) {\n totOccWork += occWorkArray[i]\n totWork += workArray[i] / 4\n occArray.push(workArray[i] > 0 ? Math.round(100 * occWorkArray[i] / (workArray[i] * (_numberOfSecondsPerDay / resolution))) : 0)\n occWorkArray[i] = occWorkArray[i] / (_numberOfSecondsPerDay / resolution)\n }\n if (totWork > 0) { totOcc = 100 * (totOccWork / (60 * 60)) / totWork }\n returnArrayOcc.push({ label: \"Occupancy\", dt: null, parameterData: occArray, scaleIndex: 0 })\n returnArrayWork.push({ label: \"Work\", dt: null, parameterData: workArray, scaleIndex: 0 })\n returnArrayWork.push({ label: \"Occ Work\", dt: null, parameterData: occWorkArray, scaleIndex: 0 })\n return { occData: returnArrayOcc, workData: returnArrayWork, totWork: totWork, totOcc: totOcc }\n}\n\n/**\n * @param {string | number | Date} stDt\n * @param {number} numberOfDays\n * @param {SimState} simState\n */\nfunction getQueueChartData(stDt, numberOfDays, simState) {\n\n const callGroups = simState.callGroups;\n let callGroupIds = callGroupIdsWith0(callGroups)\n /** @type {ChartData[]} */\n const returnArrayAvg = []\n let queueAvgArray = new Array(callGroupIds.length).fill([])\n\n let displayResolutionFactor = getDisplayResolutionFactor(numberOfDays)\n let dt = new Date\n for (let d = 0; d < numberOfDays; d++) {\n dt = addDays(new Date(stDt), d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n let dtKey = getShortDate(dt);\n const key = getSimulationDataKey(dtKey, simState.affinity);\n let simDay = simulationData.simulationDataMap.get(key)\n for (let a = 0; a < callGroupIds.length; a++) {\n queueAvgArray[a] = queueAvgArray[a].concat(condence(simDay.queueAvgMap.get(callGroupIds[a]), displayResolutionFactor))\n }\n }\n\n for (let a = 0; a < callGroupIds.length; a++) {\n if (a == 0) {\n returnArrayAvg.push({ label: \"All\", dt: null, parameterData: queueAvgArray[a], scaleIndex: 0 })\n } else {\n returnArrayAvg.push({ label: callGroups[a - 1].name.slice(0, 10), dt: null, parameterData: queueAvgArray[a], scaleIndex: 0 })\n }\n }\n return returnArrayAvg\n}\n\n/**\n * @param {string | number | Date} stDt\n * @param {number} numberOfDays\n * @param {SimState} simState\n */\nfunction getWaitWithinData(stDt, numberOfDays, simState) {\n const callGroups = simState.callGroups;\n let callGroupIds = callGroupIdsWith0(callGroups)\n /** @type {ChartData[]} */\n const returnArray = [];\n let waitWithinArray = new Array(callGroupIds.length).fill([])\n\n let displayResolutionFactor = getDisplayResolutionFactor(numberOfDays)\n let dt = new Date\n for (let d = 0; d < numberOfDays; d++) {\n dt = addDays(new Date(stDt), d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n let dtKey = getShortDate(dt);\n const key = getSimulationDataKey(dtKey, simState.affinity);\n let simDay = simulationData.simulationDataMap.get(key)\n for (let a = 0; a < callGroupIds.length; a++) {\n waitWithinArray[a] = waitWithinArray[a].concat(condence(simDay.waitWithinMap.get(callGroupIds[a]), displayResolutionFactor))\n }\n }\n\n for (let a = 0; a < callGroupIds.length; a++) {\n if (a == 0) {\n returnArray.push({ label: \"All\", dt: null, parameterData: waitWithinArray[a], scaleIndex: 0 })\n } else {\n returnArray.push({ label: callGroups[a - 1].name.slice(0, 10), dt: null, parameterData: waitWithinArray[a], scaleIndex: 0 })\n }\n }\n return returnArray\n}\n\n/** \n * @typedef {Map} EmployeeOccupancyData\n */\n\n/**\n * Get calculated occupancy per employee\n * @param {string | number | Date} stDt\n * @param {number} numberOfDays\n * @param {any[]} emps\n * @param {number} resolution\n * @param {SimState} simState\n */\nfunction getEmployeeOccupancyData(stDt, numberOfDays, emps, resolution, simState) {\n /** @type {EmployeeOccupancyData} */\n const occupancyEmpMap = new Map\n for (let e = 0; e < emps.length; e++) { occupancyEmpMap.set(emps[e].id, []) }\n let displayResolutionFactor = getDisplayResolutionFactor(numberOfDays)\n\n //data from each day\n let dt = new Date\n for (let d = 0; d < numberOfDays; d++) {\n dt = addDays(new Date(stDt), d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n let dtKey = getShortDate(dt);\n const key = getSimulationDataKey(dtKey, simState.affinity);\n let simDay = simulationData.simulationDataMap.get(key);\n for (let e = 0; e < emps.length; e++) {\n let occEmp = occupancyEmpMap.get(emps[e].id)\n occEmp = occEmp.concat(condence(simDay.occupancyEmpMap.get(emps[e].id), displayResolutionFactor))\n occupancyEmpMap.set(emps[e].id, occEmp)\n }\n }\n\n //Calcualte occupancy from busy seconds\n for (let e = 0; e < emps.length; e++) {\n let occEmp = occupancyEmpMap.get(emps[e].id)\n occEmp = occEmp.map(function (x) { return x / (_numberOfSecondsPerDay / resolution) });\n occupancyEmpMap.set(emps[e].id, occEmp)\n }\n\n return occupancyEmpMap\n}\n\n//HELPER FUNCTIONS\nfunction callGroupIdsWith0(callGroups) {\n return [0].concat(callGroups.map(function (obj) {\n return obj.id;\n }))\n}\n\n/**\n * @param {import(\"@/model/dn-callgroup.js\").CallGroup[]} callGroups\n */\nfunction getAvgSlSetting(callGroups) {\n let sumP = 0;\n let sumS = 0;\n for (let a = 0; a < callGroups.length; a++) {\n sumP += callGroups[a].slPercent\n sumS += callGroups[a].slWithin\n }\n if (callGroups.length > 0 && sumP > 0 && sumS > 0) {\n return { slPercent: Math.round(sumP / callGroups.length), slWithin: Math.round(sumS / callGroups.length), min: Math.round(sumP / callGroups.length) - 30, max: 100 }\n } else {\n return { slPercent: 80, slWithin: 20, min: 50, max: 100 }\n }\n}\n\n/**\n * @param {Date} simSt\n * @param {{ acgr: import(\"@/model/dn-callgroup.js\").CallGroup; forc: { noc: number[]; ht: number[]; }}[]} dayForcast\n * @param {{ handlingTimePercent: number; handlingTimeVariationPercent: number; callsPercent: number; }} simulationSettings\n */\nfunction generateQuarterCalls(simSt, dayForcast, simulationSettings) {\n /** @type {dnSimModel.Call[]} */\n const returnValue = [];\n if (dayForcast.length === 0) {\n return returnValue;\n }\n\n const length = dayForcast[0].forc.ht.length;\n for (let q = 0; q < length; q++) {\n for (const df of dayForcast) {\n let aht = df.forc.noc[q] == 0 ? 0 : df.forc.ht[q] / df.forc.noc[q]\n aht = aht * ((100 + simulationSettings.handlingTimePercent) / 100)\n const ht = aht * (1 + (Math.random() - 0.5) * (2 * simulationSettings.handlingTimeVariationPercent / 100))\n for (let i = 0; i < df.forc.noc[q] * (100 + simulationSettings.callsPercent) / 100; i++) {\n const secondsToAdd = q * 15 * 60 + Math.random() * 15 * 60;\n const c = new dnSimModel.Call(simSt.getTime() + secondsToAdd * 1000, ht, df.acgr.id)\n returnValue.push(c)\n }\n }\n }\n return returnValue.sort(function (a, b) { return a.msSinceEpoch - b.msSinceEpoch; });\n}\n\n/**\n * @param {number} e\n * @param {number} m\n */\nfunction getErlangB(e, m) {\n let invB = 1;\n for (let i = 1; i <= m; i++) {\n invB = 1 + invB * i / e;\n }\n return 1 / invB;\n}\n\n/**\n * @param {number} e\n * @param {number} m\n */\nfunction getErlangC(e, m) {\n const erlB = getErlangB(e, m);\n return m * erlB / (m - e * (1 - erlB));\n}\n\n/**\n * @param {number} e\n * @param {number} m\n * @param {number} aht\n * @param {number} slWithin\n */\nfunction getServiceLevel(e, m, aht, slWithin) {\n if (m < e)\n return 0;\n const erlC = getErlangC(e, m);\n const sl = 1 - erlC * Math.exp(-(m - e) * (slWithin / aht));\n if (sl < 0)\n return 0;\n return 100 * sl;\n}\n\n/**\n * @param {number} e\n * @param {number} aht\n * @param {number} slWithin\n * @param {number} slPercent\n */\nfunction getErlangCTarget(e, aht, slWithin, slPercent) {\n if (e <= 0 || slPercent <= 0)\n return 0;\n let m = Math.floor(e);\n let sl = 0;\n let slLast = 0;\n while (sl < slPercent) {\n m++;\n slLast = sl;\n sl = getServiceLevel(e, m, aht, slWithin);\n }\n\n return m - (sl - slPercent) / (sl - slLast);\n}\n\nfunction loadCallGroupPrioInfo(callGroups) {\n let callGroupPrioInfoMap = new Map\n let maxPrioSecondInQueue = 0\n for (let i = 0; i < callGroups.length; i++) {\n if (callGroups[i].prioSecondsInQueue > maxPrioSecondInQueue) { maxPrioSecondInQueue = callGroups[i].prioSecondsInQueue }\n /* if(callGroups[i].id==9||callGroups[i].id==10||callGroups[i].id==12){\n callGroupPrioInfoMap.set(callGroups[i].id,15)\n maxPrioSecondInQueue=60\n } */\n callGroupPrioInfoMap.set(callGroups[i].id, callGroups[i].prioSecondsInQueue)\n }\n simulationData.callGroupPrioInfoMap = callGroupPrioInfoMap\n simulationData.callGroupPrioMax = maxPrioSecondInQueue\n}","import { getStartOfWeek } from '@/js/dn-helper.js';\r\nimport { getShortDate as getShortDate2, getStartOfDay } from '@/shared/dn-shared-helper.js';\r\nimport moment from \"moment\";\r\nimport { useDataStore } from \"@/stores/dataStore.js\";\r\n\r\n/**\r\n * @param {string | number | Date} dt\r\n * @param {number} days\r\n */\r\nexport function addDays(dt, days) {\r\n return moment(dt).add(days,'days').toDate()\r\n}\r\n\r\n/**\r\n * @param {Date} st\r\n * @param {Date} fi\r\n */\r\nexport function getDurationInMinutes(st, fi) {\r\n return Math.round((fi.getTime() - st.getTime()) / 60000);\r\n}\r\n\r\n/**\r\n* @param {Date} dt\r\n*/\r\nexport function formatMMDDYYY(dt) {\r\nreturn moment(dt).format('MM/DD/YYYY')\r\n}\r\n\r\nDate.prototype.yyyymmdd = function() {\r\n return getShortDate(this);\r\n};\r\n\r\nDate.prototype.mmdd = function() {\r\n var mm = this.getMonth() + 1; // getMonth() is zero-based\r\n var dd = this.getDate();\r\n return [(mm > 9 ? '' : '0') + mm, (dd > 9 ? '' : '0') + dd].join('-');\r\n};\r\n\r\n/**\r\n * @param {Date} dt\r\n */\r\nexport function getShortDate(dt) {\r\n return getShortDate2(dt);\r\n}\r\n\r\n/**\r\n * @param {string | number | Date} dt\r\n */\r\nexport function getStartOfWeekUI(dt) {\r\n const dataStore = useDataStore();\r\n return getStartOfWeek(dt, dataStore.generalEmpAppSettings.weekStartDay);\r\n}\r\n\r\n/**\r\n * @param {Date} dt\r\n */\r\nexport function getWeekdayNarrow(dt) {\r\n return dt.toLocaleDateString(useDataStore().language, { weekday: 'narrow' });\r\n}\r\n\r\n/**\r\n * @param {Date} dt\r\n */\r\n export function getWeekdayLong(dt) {\r\n return dt.toLocaleDateString(useDataStore().language, { weekday: 'long' });\r\n}\r\n\r\nexport function getWeekDays(dt){\r\n let returnValue=[]\r\n for(let d=0;d<7;d++){\r\n returnValue.push(getWeekdayLong(addDays(dt, d)))\r\n }\r\n return returnValue\r\n}\r\n\r\n/**\r\n * @param {string | number | Date} startDay\r\n */\r\nexport function getWeekDaysWithInfo(startDay) {\r\n const days = [];\r\n for (let d = 0; d < 7; d++) {\r\n const dt = addDays(startDay, d);\r\n const day = dt.getDay();\r\n days.push({ day, name: getWeekdayLong(dt), isWeekend: day === 0 || day === 6 });\r\n }\r\n return days\r\n}\r\n\r\nexport function GetToday() {\r\n var d = new Date();\r\n return new Date(d.getFullYear(), d.getMonth(), d.getDate());\r\n}\r\n\r\n/**\r\n * @param {Date} dt\r\n * @param {string} locale\r\n * @param {string} [timeZone]\r\n * \r\n */\r\nfunction getShortTime(dt, locale, timeZone = undefined) {\r\n const dataStore = useDataStore();\r\n const hourFormat = dataStore.hourFormat;\r\n\r\n   /** @type {Intl.DateTimeFormatOptions} */\r\n let optionsTime = { hour: 'numeric', minute: '2-digit', timeZone };\r\n if(hourFormat == \"24\"){\r\n optionsTime.hour12 = false;\r\n } else if (hourFormat == \"12\"){\r\n optionsTime.hour12 = true;\r\n }\r\n return dt.toLocaleTimeString(locale, optionsTime);\r\n}\r\n\r\n/**\r\n * @param {Date} dt\r\n */\r\nexport function ShortTime(dt) {\r\n const dataStore = useDataStore();\r\n const locale = dataStore.language;\r\n const timeZone = dataStore.currentUser.timezoneUI;\r\n return getShortTime(dt, locale, timeZone);\r\n}\r\n\r\n/**\r\n * @param {number} minutes\r\n */\r\nexport function getShortTimeMinutes(minutes) {\r\n const dataStore = useDataStore();\r\n const locale = dataStore.language;\r\n const dt = new Date(new Date(2000, 0, 1).getTime() + minutes * 60 * 1000);\r\n return getShortTime(dt, locale);\r\n}\r\n\r\n/**\r\n * @param {number} quarter\r\n */\r\nexport function getShortTimeQuarterHour(quarter) {\r\n return getShortTimeMinutes(15 * quarter);\r\n}\r\n\r\n/**\r\n * @param {Date} dt\r\n */\r\nexport function formatTimeAsDuration(dt) {\r\n return dt.toLocaleTimeString(\"se-SE\", { hour12: false, hour: 'numeric', minute: '2-digit' });\r\n}\r\n\r\nexport function getDateFormat(){\r\n if(useDataStore().language=='en-US'){return 'dd/mm/yy'}else{return 'yy-mm-dd'}\r\n}\r\n\r\nexport function getMonthLong(date){\r\n const dt = new Date(date)\r\n return new Intl.DateTimeFormat('en-US', { month: 'long' }).format(dt);\r\n}\r\n\r\n// This script is released to the public domain and may be used, modified and\r\n// distributed without restrictions. Attribution not necessary but appreciated.\r\n// Source: https://weeknumber.net/how-to/javascript\r\n\r\n// Returns the ISO week of the date.\r\nDate.prototype.getWeekNumber = function() {\r\n let date = getStartOfDay(this);\r\n // Thursday in current week decides the year.\r\n date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);\r\n // January 4 is always in week 1.\r\n var week1 = new Date(date.getFullYear(), 0, 4);\r\n // Adjust to Thursday in week 1 and count number of weeks from date to week1.\r\n return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000\r\n - 3 + (week1.getDay() + 6) % 7) / 7);\r\n}\r\n\r\n// Returns the four-digit year corresponding to the ISO week of the date.\r\nDate.prototype.getWeekYear = function() {\r\n var date = new Date(this.getTime());\r\n date.setDate(date.getDate() + 3 - (date.getDay() + 6) % 7);\r\n return date.getFullYear();\r\n}\r\n\r\nexport function isMobile() {\r\n if (\r\n/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\r\n navigator.userAgent\r\n)\r\n) {\r\nreturn true;\r\n} else {\r\nreturn false;\r\n}\r\n}\r\n\r\nexport function suggestUserInitials(user){\r\n let userInitials = \"\"\r\n if(user.initials&&user.initials!=undefined&&user.initials.length>0){userInitials=user.initials}\r\n else if(user.name&&user.name.length>0){userInitials=user.name.substring(0,2)}\r\n else{userInitials=user.email.substring(0,2)}\r\n return userInitials\r\n}\r\n\r\n\r\n","const UNDO_STATE = createUndoState();\nlet revCounter = 0\nconst revisionMap = new Map()\nlet lastIncrementUndoOrRedo = UNDO_STATE.undo\nlet newSelectionPending = false\n\n\nexport function incrementUndoRevision(direct=false){\n if(direct){\n if(revCounter0){newSelectionPending = true}\n } \n}\n\n//undo\nexport function decrementUndoRevision(){ \n if(revisionMap.has(revCounter)){\n if(revCounter>0){\n if(lastIncrementUndoOrRedo == UNDO_STATE.undo){revCounter--} \n }\n lastIncrementUndoOrRedo = UNDO_STATE.undo\n }\n}\n\nexport function resetUndo(){\n revCounter = 0\n revisionMap.clear\n newSelectionPending = false\n}\n\n\nexport function addUndoTransaction(id,st,fi,tasktypeId,isNew=null,isDeleted=null){\n if(id==-1){return}\n if(newSelectionPending){\n revCounter=revisionMap.size\n newSelectionPending = false}\n \n if(!revisionMap.has(revCounter)){revisionMap.set(revCounter,{undo:new Map(),redo:new Map()})}\n else if(revCounter 0 &&revisionMap.get(revCounter).redo.size>0)\n let undoDataExist =(revisionMap.size > 0 &&revisionMap.get(revCounter).undo.size>0)\n \n if(redoDataExist){\n if(lastIncrementUndoOrRedo==UNDO_STATE.redo){canRedo= revCounter=0}\n else {canUndo= revCounter>0 }\n }\n return {undo:canUndo,redo:canRedo}\n\n}\n\n\nfunction createUndoState() {\n const enumObject = {\n none: 0,\n undo: 1,\n redo: 2,\n };\n \n return Object.freeze(enumObject);\n }\n\n\n \n\n\n","import variables from \"@/assets/css/variables.module.scss\";\n// @ts-check\nimport { COLORS } from \"./dn-colors\";\n\n/**\n * @param {string} schemecolor\n */\nexport function getColorFromName(schemecolor) {\n /** @type {string} */\n let returnColor = variables.stroke1\n switch (schemecolor) {\n case COLORS.stroke1:\n returnColor = variables.stroke1;\n break;\n case COLORS.stroke2:\n returnColor = variables.stroke2;\n break;\n case COLORS.stroke3:\n returnColor = variables.stroke3;\n break;\n case COLORS.stroke4:\n returnColor = variables.stroke4;\n break;\n case COLORS.stroke5:\n returnColor = variables.stroke5;\n break;\n case COLORS.stroke6:\n returnColor = variables.stroke6;\n break;\n case COLORS.stroke7:\n returnColor = variables.stroke7;\n break;\n case COLORS.stroke8:\n returnColor = variables.stroke8;\n break;\n case COLORS.stroke9:\n returnColor = variables.stroke9;\n break;\n case COLORS.primary:\n returnColor = variables.primary;\n break;\n case COLORS.lightinfo:\n returnColor = variables.lightinfo;\n break;\n case COLORS.lightdanger:\n returnColor = variables.lightdanger;\n break;\n case 'light':\n returnColor = variables.light;\n break;\n case 'grey':\n returnColor = variables.grey;\n break;\n case 'dark':\n returnColor = variables.dark;\n break;\n case 'warning':\n returnColor = variables.warning;\n break;\n case 'success':\n returnColor = variables.success;\n break;\n case 'danger':\n returnColor = variables.danger;\n break;\n case 'free':\n returnColor = variables.free;\n break;\n default:\n returnColor = variables.primary;\n break;\n }\n\n return returnColor\n}","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n","import { render } from \"./AvatarSelector.vue?vue&type=template&id=c54221ac&scoped=true\"\nimport script from \"./AvatarSelector.vue?vue&type=script&lang=js\"\nexport * from \"./AvatarSelector.vue?vue&type=script&lang=js\"\n\nimport \"./AvatarSelector.vue?vue&type=style&index=0&id=c54221ac&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-c54221ac\"]])\n\nexport default __exports__","import { render } from \"./Header.vue?vue&type=template&id=65566ac0&scoped=true\"\nimport script from \"./Header.vue?vue&type=script&lang=js\"\nexport * from \"./Header.vue?vue&type=script&lang=js\"\n\nimport \"./Header.vue?vue&type=style&index=0&id=65566ac0&scoped=true&lang=scss\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-65566ac0\"]])\n\nexport default __exports__","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import { render } from \"./MobileNavbarItem.vue?vue&type=template&id=9a6e136a&scoped=true\"\nimport script from \"./MobileNavbarItem.vue?vue&type=script&lang=js\"\nexport * from \"./MobileNavbarItem.vue?vue&type=script&lang=js\"\n\nimport \"./MobileNavbarItem.vue?vue&type=style&index=0&id=9a6e136a&scoped=true&lang=scss\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-9a6e136a\"]])\n\nexport default __exports__","import { render } from \"./MobileNavbarFooter.vue?vue&type=template&id=096ecdea&scoped=true\"\nimport script from \"./MobileNavbarFooter.vue?vue&type=script&lang=js\"\nexport * from \"./MobileNavbarFooter.vue?vue&type=script&lang=js\"\n\nimport \"./MobileNavbarFooter.vue?vue&type=style&index=0&id=096ecdea&scoped=true&lang=scss\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-096ecdea\"]])\n\nexport default __exports__","import { render } from \"./Footer.vue?vue&type=template&id=1b53ffea\"\nimport script from \"./Footer.vue?vue&type=script&lang=js\"\nexport * from \"./Footer.vue?vue&type=script&lang=js\"\n\nimport \"./Footer.vue?vue&type=style&index=0&id=1b53ffea&lang=scss\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n","import { render } from \"./Guide.vue?vue&type=template&id=78348fee&scoped=true\"\nimport script from \"./Guide.vue?vue&type=script&lang=js\"\nexport * from \"./Guide.vue?vue&type=script&lang=js\"\n\nimport \"./Guide.vue?vue&type=style&index=0&id=78348fee&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-78348fee\"]])\n\nexport default __exports__","import { render } from \"./App.vue?vue&type=template&id=7037eea7\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\n\nimport \"./App.vue?vue&type=style&index=0&id=7037eea7&lang=scss\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { forecastData } from '@/stores/dn-forecast-data.js';\nimport { forecastAiData } from '@/stores/dn-forecast-ai-data.js';\nimport { simulationData } from \"@/stores/dn-simulation-data.js\";\nimport { specialDayData } from '@/stores/dn-special-day-data.js';\nimport { useDataStore } from \"@/stores/dataStore.js\";\nimport { useFileImportStore } from \"@/stores/fileImportStore.js\";\nimport { useForecastStore } from '@/stores/forecastStore.js';\nimport { usePortfolioStore } from \"@/stores/portfolioStore.js\";\nimport { useReportStore } from \"@/stores/reportStore.js\";\nimport { useScheduleStore } from '@/stores/scheduleStore.js';\n\nexport function resetStores() {\n forecastData.reset();\n specialDayData.reset();\n forecastAiData.reset();\n simulationData.reset();\n useDataStore().$reset();\n useFileImportStore().$reset();\n useForecastStore().$reset();\n usePortfolioStore().$reset();\n useReportStore().$reset();\n useScheduleStore().$reset();\n}","import { createRouter, createWebHistory, createWebHashHistory } from \"vue-router\";\nimport { getLoginInfo } from '@/js/dn-localStorage.js';\nimport { externalLogin, updateAccessToken } from \"./js/dn-fetch\";\nimport { useDataStore } from \"@/stores/dataStore.js\";\nimport { useForecastStore } from \"@/stores/forecastStore.js\";\nimport { useScheduleStore } from \"@/stores/scheduleStore.js\";\nimport { resetStores } from \"@/stores/dn-store\";\n\nconst routes = [\n {\n path: \"/\",\n name: \"portfolio\",\n component: () => import(\"./views/Portfolio.vue\"),\n },\n {\n path: \"/admin\",\n name: \"admin\",\n component: () => import(\"./views/AdminView.vue\"),\n },\n {\n path: \"/login\",\n name: \"login\",\n component: () => import(\"./views/Login.vue\"),\n },\n {\n path: \"/forecast\",\n name: \"forecast\",\n component: () => import(\"./views/Forecast.vue\"),\n },\n {\n path: \"/schedule\",\n name: \"schedule\",\n component: () => import(\"./views/Schedule.vue\"),\n },\n {\n path: \"/report\",\n name: \"report\",\n component: () => import(\"./views/Report.vue\"),\n },\n {\n path: \"/settings\",\n name: \"settings\",\n component: () => import(\"./views/Settings.vue\"),\n },\n {\n path: \"/agenthomescr\",\n name: \"agenthomescr\",\n component: () => import(\"./views/AgentHomeScr.vue\"),\n },\n {\n path: \"/trade\",\n name: \"trade\",\n component: () => import(\"./views/AgentTrade.vue\"),\n },\n {\n path: \"/super-admin\",\n name: \"super-admin\",\n component: () => import(\"./views/SuperAdminView.vue\"),\n },\n {\n path: \"/employees\",\n name: \"employees\",\n component: () => import(\"./views/Employees.vue\"),\n },\n {\n path: \"/invoice\",\n name: \"invoice\",\n component: () => import(\"./views/Invoice.vue\"),\n },\n {\n path: \"/team-schedule\",\n name: \"team-schedule\",\n component: () => import(\"./views/AgentTeamSchedule.vue\"),\n },\n {\n path: \"/agent-stats\",\n name: \"agent-stats\",\n component: () => import(\"./views/AgentStats.vue\"),\n },\n {\n path: \"/user\",\n name: \"user\",\n component: () => import(\"./views/User.vue\"),\n }\n];\n\nexport function createAppRouter() {\n const router = createRouter({\n history: createWebHashHistory(),\n routes,\n });\n\n router.beforeEach((to, from, next) => {\n const externalPath = '/external/';\n if (to.path.startsWith(externalPath)) {\n const afterExternalLogin = (isAgent) => {\n if (isAgent === true) {\n next({ name: \"agenthomescr\" });\n } else if (isAgent === false) {\n next({ name: \"\" });\n }\n else {\n next({ name: \"login\" })\n }\n };\n const key = to.path.slice(externalPath.length);\n externalLogin(key, afterExternalLogin);\n return;\n }\n const loginInfo = getLoginInfo();\n if (loginInfo === null && to.name !== \"login\") {\n next({ name: \"login\" });\n }\n else if (from.name === \"login\") {\n init();\n next();\n }\n else if (to.name === \"login\") {\n if (loginInfo === null) {\n resetStores();\n next();\n } else if (loginInfo.isAgent) {\n next({ name: \"agenthomescr\" });\n } else if (loginInfo.isSuperAdmin) {\n next({ name: \"super-admin\" });\n } else {\n next({ name: \"portfolio\" });\n }\n }\n else if (to.name === \"portfolio\" && loginInfo.isAgent) {\n next({ name: \"agenthomescr\" });\n }\n else if (to.name === \"portfolio\" && loginInfo.isSuperAdmin) {\n next({ name: \"super-admin\" });\n }\n else {\n const dataStore = useDataStore();\n if (!dataStore.currentUser) { initUser() };\n next();\n }\n }\n );\n\n router.afterEach((to, from) => {\n if (from.name === null) {\n if (hasRefreshed()) {\n const dataStore = useDataStore();\n dataStore.refreshedDueToError = true;\n }\n \n } \n else {\n if (from.name === 'settings'){\n const dataStore = useDataStore();\n dataStore.loadRelevantInvoiceStatus()}\n }\n if (hasRefreshed()) {\n window.sessionStorage.setItem('refreshed-due-to-error', 'false');\n const dataStore = useDataStore();\n dataStore.refreshedDueToError = false; \n }\n\n\n \n if(hasNotCheckedInvoiceStatus()){\n useDataStore().loadRelevantInvoiceStatus\n }\n })\n\n router.onError(err => {\n if (err.name === 'ChunkLoadError') {\n if (!hasRefreshed()) {\n window.sessionStorage.setItem('refreshed-due-to-error', 'true');\n window.location.reload();\n }\n }\n })\n\n return router;\n}\n\nfunction hasRefreshed() {\n return window.sessionStorage.getItem('refreshed-due-to-error') === 'true';\n}\n\nfunction hasNotCheckedInvoiceStatus() {\n return ((new Date().getTime()-useDataStore().lastRelevantInvoiceStatuscheck.getTime())>1000*60*60*24)\n}\n\nasync function initUser() {\n const loginInfo = getLoginInfo();\n if (loginInfo.needRefresh())\n await updateAccessToken(loginInfo);\n\n const dataStore = useDataStore();\n await dataStore.loadCurrentUser();\n if (!loginInfo.isSuperAdmin)\n init()\n}\n\nasync function init() {\n const loginInfo = getLoginInfo();\n if (loginInfo.isSuperAdmin)\n return;\n const dataStore = useDataStore();\n await dataStore.init();\n dataStore.loadDateNow();\n const scheduleStore = useScheduleStore();\n const forecastStore = useForecastStore();\n forecastStore.forecastOptions.forecastIsLoaded = false;\n scheduleStore.loadLocalAgentScheduleOptions();\n scheduleStore.loadSimulationSettings();\n dataStore.loadGeneralSettings();\n dataStore.loadAffinities();\n dataStore.loadCallCenters().then(() => {\n scheduleStore.loadCurrentCCData();\n });\n dataStore.loadHolidays();\n \n dataStore.loadRelevantInvoiceStatus();\n dataStore.loadAgreements();\n if (!loginInfo.isAgent) {\n \n forecastStore.initForecast();\n dataStore.loadTagUsage();\n }\n}","import { createApp } from 'vue/dist/vue.esm-bundler.js';\r\nimport App from \"./App.vue\";\r\nimport { createAppRouter } from '@/router.js';\r\nimport { createPinia } from 'pinia';\r\nimport { i18n } from '@/i18n.js';\r\n\r\n//Primevue\r\nimport PrimeVue from 'primevue/config';\r\nimport Accordion from 'primevue/accordion';\r\nimport AccordionTab from 'primevue/accordiontab';\r\nimport AutoComplete from 'primevue/autocomplete';\r\nimport Button from 'primevue/button';\r\nimport Calendar from 'primevue/calendar';\r\nimport Card from 'primevue/card';\r\nimport Checkbox from 'primevue/checkbox';\r\nimport Column from 'primevue/column';\r\nimport ConfirmationService from 'primevue/confirmationservice';\r\nimport ConfirmDialog from 'primevue/confirmdialog';\r\nimport DataTable from 'primevue/datatable';\r\nimport Dialog from 'primevue/dialog';\r\nimport Dropdown from 'primevue/dropdown';\r\nimport FileUpload from 'primevue/fileupload';\r\nimport FloatLabel from 'primevue/floatlabel';\r\nimport IconField from 'primevue/iconfield';\r\nimport InlineMessage from 'primevue/inlinemessage';\r\nimport InputGroup from 'primevue/inputgroup';\r\nimport InputGroupAddon from 'primevue/inputgroupaddon';\r\nimport InputIcon from 'primevue/inputicon';\r\nimport InputNumber from 'primevue/inputnumber';\r\nimport InputSwitch from 'primevue/inputswitch';\r\nimport InputText from 'primevue/inputtext';\r\nimport Listbox from 'primevue/listbox';\r\nimport Message from 'primevue/message';\r\nimport MultiSelect from 'primevue/multiselect';\r\nimport Panel from 'primevue/panel';\r\nimport Password from 'primevue/password';\r\nimport ProgressBar from 'primevue/progressbar';\r\nimport RadioButton from 'primevue/radiobutton';\r\nimport ScrollPanel from 'primevue/scrollpanel';\r\nimport ContextMenu from 'primevue/contextmenu';\r\nimport Splitter from 'primevue/splitter';\r\nimport SplitterPanel from 'primevue/splitterpanel';\r\nimport PanelMenu from 'primevue/panelmenu';\r\n\r\n\r\nimport SelectButton from 'primevue/selectbutton';\r\nimport Slider from 'primevue/slider';\r\nimport SplitButton from 'primevue/splitbutton';\r\nimport TabPanel from 'primevue/tabpanel';\r\nimport TabView from 'primevue/tabview';\r\nimport Tag from 'primevue/tag';\r\nimport Textarea from 'primevue/textarea';\r\nimport Toast from 'primevue/toast';\r\nimport ToastService from 'primevue/toastservice';\r\nimport Tooltip from 'primevue/tooltip';\r\nimport TreeTable from 'primevue/treetable';\r\nimport OverlayPanel from 'primevue/overlaypanel';\r\nimport Rating from 'primevue/rating';\r\nimport TieredMenu from 'primevue/tieredmenu';\r\nimport Menubar from 'primevue/menubar';\r\nimport Sidebar from 'primevue/sidebar';\r\n\r\nimport '@/assets/themes/lara-light-purple/theme.css'\r\nimport 'primeicons/primeicons.css'\r\n\r\nconst app = createApp(App);\r\n\r\nconst pinia = createPinia();\r\napp.use(pinia);\r\napp.use(i18n);\r\napp.use(PrimeVue, {});\r\napp.use(ToastService)\r\n\r\n//PrimeVue components\r\napp.component('Accordion', Accordion);\r\napp.component('AccordionTab', AccordionTab);\r\napp.component('AutoComplete', AutoComplete);\r\napp.component('Calendar', Calendar);\r\napp.component('Card', Card);\r\napp.component('Checkbox', Checkbox);\r\napp.component('Column', Column);\r\napp.component('ConfirmDialog', ConfirmDialog);\r\napp.component('ContextMenu', ContextMenu);\r\napp.component('DataTable', DataTable);\r\napp.component('FileUpload', FileUpload);\r\napp.component('IconField', IconField);\r\napp.component('InlineMessage', InlineMessage);\r\napp.component('InputGroup', InputGroup);\r\napp.component('InputGroupAddon', InputGroupAddon);\r\napp.component('InputIcon', InputIcon);\r\napp.component('InputNumber', InputNumber);\r\napp.component('InputSwitch', InputSwitch);\r\napp.component('InputText', InputText)\r\napp.component('Listbox', Listbox)\r\n\r\napp.component('MultiSelect', MultiSelect);\r\napp.component('Panel', Panel);\r\napp.component('Password', Password);\r\napp.component('ProgressBar', ProgressBar);\r\napp.component('PvButton', Button);\r\napp.component('PvDialog', Dialog);\r\napp.component('PvDropdown', Dropdown);\r\napp.component('PvFloatLabel', FloatLabel);\r\napp.component('PvMessage', Message);\r\napp.component('PvSelectButton', SelectButton);\r\napp.component('RadioButton', RadioButton);\r\napp.component('ScrollPanel', ScrollPanel);\r\napp.component('SelectButton', SelectButton);\r\napp.component('Slider', Slider);\r\napp.component('SplitButton', SplitButton);\r\napp.component('Splitter', Splitter);\r\napp.component('SplitterPanel', SplitterPanel);\r\napp.component('PanelMenu', PanelMenu);\r\n\r\napp.component('TabPanel', TabPanel);\r\napp.component('TabView', TabView);\r\napp.component('Tag', Tag);\r\napp.component('Textarea', Textarea);\r\napp.component('Toast', Toast);\r\napp.component('TreeTable', TreeTable);\r\napp.component('PvOverlayPanel', OverlayPanel);\r\napp.component('PvRating', Rating);\r\napp.component('PvTieredMenu', TieredMenu);\r\napp.component('PvMenubar', Menubar);\r\napp.component('Sidebar', Sidebar);\r\n\r\napp.directive('tooltip', Tooltip);\r\n\r\nconst router = createAppRouter();\r\napp.use(router);\r\napp.use(ConfirmationService);\r\n\r\napp.mount('#app');\r\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\r\n\r\n/**\r\n* @typedef {{id:number; name:string;}} AffinityDto\r\n*/\r\n\r\n/**\r\n * @param {{ id: number; }} affinity\r\n */\r\nasync function deleteAffinity(affinity) {\r\n return await fetchAndCheckJson(`affinity/${affinity.id}`, 'DELETE');\r\n}\r\n\r\nexport async function getAffinities() {\r\n /** @type {AffinityDto[]} */\r\n const rows = await fetchAndCheckJson(`affinity`, 'GET');\r\n return rows.map(x => new Affinity(x));\r\n}\r\n\r\n/**\r\n * @param {Affinity} affinity\r\n */\r\nasync function patchAffinity(affinity) {\r\n return await fetchAndCheckJson(`affinity/${affinity.id}`, 'PATCH', affinity.toDto());\r\n}\r\n\r\n/**\r\n * @param {Affinity} affinity\r\n */\r\nasync function postAffinity(affinity) {\r\n return await fetchAndCheckJson(`affinity`, 'POST', affinity.toDto());\r\n}\r\n\r\n/**\r\n * @param {Affinity[]} affinities\r\n */\r\nexport async function saveAffinityChanges(affinities) {\r\n for (const affinity of affinities) {\r\n if (affinity.isToDelete) {\r\n if (affinity.id > 0)\r\n await deleteAffinity(affinity);\r\n } else if (affinity.hasChanges) {\r\n if (affinity.id > 0) {\r\n await patchAffinity(affinity);\r\n } else {\r\n await postAffinity(affinity);\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport class Affinity {\r\n /**\r\n * @param {AffinityDto} dto\r\n */\r\n constructor(dto) {\r\n /** @type {number} */\r\n this.id = dto.id;\r\n /** @private @type {string} */\r\n this._name = dto.name;\r\n /** @private @type {boolean} */\r\n this._hasChanges = false;\r\n /** @private @type {boolean} */\r\n this._isToDelete = false;\r\n }\r\n\r\n get name() {\r\n return this._name;\r\n }\r\n\r\n set name(newValue) {\r\n if (this._name !== newValue) {\r\n this._name = newValue;\r\n this._hasChanges = true;\r\n }\r\n }\r\n\r\n get hasChanges() {\r\n return this._hasChanges;\r\n }\r\n\r\n get isToDelete() {\r\n return this._isToDelete;\r\n }\r\n\r\n copy() {\r\n return new Affinity(this.toDto());\r\n }\r\n\r\n toDelete() {\r\n this._hasChanges = true;\r\n this._isToDelete = true;\r\n }\r\n\r\n /** @returns {AffinityDto} */\r\n toDto() {\r\n return { id: this.id, name: this.name };\r\n }\r\n}\r\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { getSelectionKey } from '@/js/dn-helper.js';\nimport { getDateOfInstant } from '#shared/dn-timezone';\nimport { RequestItem } from '@/model/dn-request-item.js';\nimport { addDays, getShortDate, getStartOfDay, getQuarterHour } from '@/shared/dn-shared-helper.js';\nimport { TASK_SYSTEM_KIND } from '@/shared/dn-tasktype.js';\n\n/**\n* @typedef {{employeeId:number; st:Date; fi:Date; available:boolean; msg:string|null}} AvailabilityRequestPostDto\n*/\n\n/**\n* @typedef {AvailabilityRequestPostDto & {id:number; available:boolean; created:Date; updated:null|Date; approved:boolean|null; replyMsg:string|null, deleted:boolean|null}} AvailabilityRequestDto\n*/\n\n/**\n* @typedef {{approved?:boolean|null; replyMsg?:string|null}} AvailabilityRequestPatchDto\n*/\n\n/**\n * @param {number} st\n * @param {number} fi\n * @param {number} id employee or callcenter id\n * @param {boolean} idIsEmployee\n * @param {number} [ts]\n * @returns {Promise}\n */\nasync function getAvailabilityRequests(st, fi, id, idIsEmployee, ts = undefined) {\n let filter = ''\n if (fi) {\n filter += '&fi=' + fi;\n }\n if (ts) {\n filter += '&ts=' + ts;\n }\n\n return await fetchAndCheckJson(`availability-request?id=${id}&idIsEmployee=${idIsEmployee}&st=${st}${filter}`, 'GET');\n}\n\n/**\n * @param {AvailabilityRequestPostDto} data\n */\nexport async function postAvailabilityRequest(data) {\n /** @type {{id:number; created:string}} */\n const result = await fetchAndCheckJson(`availability-request`, 'POST', data);\n return result;\n}\n\n/**\n * @param {number} id\n * @param {AvailabilityRequestPatchDto} data\n */\nasync function patchAvailabilityRequest(id, data) {\n /** @type {{id:number; updated:string}} */\n const result = await fetchAndCheckJson(`availability-request/${id}`, 'PATCH', data);\n return result;\n}\n\n/**\n * @param {number} id\n */\nasync function deleteAvailabilityRequest(id) {\n /** @type {{id:number; updated:string}} */\n const result = await fetchAndCheckJson(`availability-request/${id}`, 'DELETE');\n return result;\n}\n\nexport class AvailabilityRequest extends RequestItem {\n /**\n * @param {AvailabilityRequestDto} dto\n */\n constructor(dto) {\n super(dto.id, isApprovedOrAutoApproved(dto), new Date(dto.created));\n /** @readonly @type {number} */\n this.employeeId = dto.employeeId;\n /** @readonly @type {Date} */\n this.st = new Date(dto.st);\n /** @readonly @type {Date} */\n this.fi = new Date(dto.fi);\n /** @readonly @type {boolean} */\n this.available = dto.available;\n /** @type {string} */\n this.msg = dto.msg;\n /** @type {string} */\n this.replyMsg = dto.replyMsg;\n /** @type {Date|null} */\n this.updated = dto.updated ? new Date(dto.updated) : null;\n }\n\n get employeesToDisplay() {\n return [{ starts: [this.st] }];\n }\n\n get iconName() {\n return this.available ? 'arrows_expand_vertical' : 'arrows_collapse_vertical';\n }\n\n get key() {\n return -this.id;\n }\n\n /**\n * @param {string} timezone\n * @returns {string[]}\n */\n getSelectionKeys(timezone) {\n const stLocal = getDateOfInstant(this.st, timezone);\n return [getSelectionKey(stLocal, this.employeeId)];\n }\n\n /** @returns {Date[]} */\n affectedScheduleInterval() {\n if (!this.available) {\n const st = getStartOfDay(this.st);\n const fi = getStartOfDay(this.fi);\n return [st, fi < this.fi ? addDays(fi, 1) : fi];\n }\n return [];\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n canDelete(employee = null) {\n if (employee) {\n return this.approved === null;\n }\n return this.approved !== null;\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n canReply(employee = null) {\n return !employee;\n }\n\n async deleteRequest() {\n await deleteAvailabilityRequest(this.id);\n }\n\n /**\n * @param {number} index\n */\n getEmployeeIdByIndex(index) { // eslint-disable-line no-unused-vars\n return this.employeeId;\n }\n\n getMsgToDisplay() {\n if (this.msg) {\n return this.msg;\n }\n\n return this.available ? 'available' : 'unavailable';\n }\n\n getReplyMsg() {\n return this.replyMsg;\n }\n\n /**\n * @param {{ id: number; }} employee\n * @returns {{id:number;msg:string}}\n */\n getReplyObj(employee) {\n return new AvailabilityRequestReply(this, employee !== undefined);\n }\n\n /**\n * @param {any} srEmp\n * @param {string} language\n * @param {string} timeZone\n * @returns {string[]}\n */\n getTasksInfo(srEmp, language, timeZone) { // eslint-disable-line no-unused-vars\n const dtFormat = new Intl.DateTimeFormat(language, { hour: 'numeric', minute: '2-digit', timeZone });\n return [`${dtFormat.format(this.st)} - ${dtFormat.format(this.fi)}`];\n }\n\n /**\n * @param {string} key\n * @param {string} timezone\n */\n hasSelectionKey(key, timezone) {\n const stLocal = getDateOfInstant(this.st, timezone);\n return getSelectionKey(stLocal, this.employeeId) === key;\n }\n\n /**\n * @param {{showAvailability:boolean;showUnavailability:boolean;showFuture:boolean;showBasedOnSelection:boolean;showApproved:boolean;showRejected:boolean;showHistoric:boolean;tagId:number}} filter\n * @param {Date} future\n * @param {number} selectedEmpId\n * @param {import(\"@/shared/dn-employee.js\").Employee[]} empList\n * @param {Date} now\n */\n isFilterOk(filter, future, selectedEmpId, empList, now) {\n\n let okByOthers = true\n let okByDate = true\n let okByTag= true\n\n if (this.approved === true) {\n if (!filter.showApproved) { okByOthers= false; }\n } else if (this.approved === false) {\n if (!filter.showRejected) { okByOthers= false; }\n }\n\n if (this.available) {\n if (!filter.showAvailability) { okByOthers= false; }\n } else {\n if (!filter.showUnavailability) { okByOthers= false; }\n }\n\n if (filter.showBasedOnSelection) {\n if (this.employeeId !== selectedEmpId) { okByOthers= false; }\n }\n\n if (!filter.showFuture) {\n if (this.st > future) { okByOthers= false; }\n }\n\n\n if(filter.tagId>0){\n okByTag=false\n let tagList= [filter.tagId]\n let emp= empList.find(x => x.id==this.employeeId)\n if (emp&&emp.hasAnyTag(tagList)) {\n okByTag=true\n }\n };\n \n if (addDays( this.st,this.days) < now && !filter.showHistoric) { okByDate = false }\n\n return okByOthers&&okByTag&&okByDate\n }\n\n /**\n * @private\n * @param {import(\"@/model/dn-schedule-task.js\").ScheduleTasks} scheduleTasks\n * @param {import(\"@/shared/dn-tasktype.js\").TaskTypes} taskTypes\n */\n syncWithSchedule(scheduleTasks, taskTypes) {\n const timeOffId = taskTypes.bySystemKind.get(TASK_SYSTEM_KIND.free).id;\n /** @type {import(\"@/shared/dn-task.js\").Task[]} */\n const timeOffTasks = [];\n let hasOverlappingShift = false;\n for (const task of scheduleTasks.list) {\n if (task.empid === this.employeeId && !task.isToDelete && task.overlaps(this.st, this.fi)) {\n if (task.tasktypeId === timeOffId) {\n timeOffTasks.push(task);\n } else {\n hasOverlappingShift = true;\n }\n }\n }\n\n if (hasOverlappingShift) {\n let modifed = false;\n if (this.approved) {\n if (timeOffTasks.length > 0) {\n const task = timeOffTasks[0];\n if (task.st > this.st) {\n task.st = this.st;\n modifed = true;\n }\n if (task.fi < this.fi) {\n task.fi = this.fi;\n modifed = true;\n }\n } else {\n scheduleTasks.add({ empid: this.employeeId, st: this.st, fi: this.fi, tasktypeId: timeOffId });\n modifed = true;\n }\n } else if (timeOffTasks.length > 0) {\n for (const task of timeOffTasks) {\n if (task.st < this.st) {\n if (task.fi > this.fi) {\n scheduleTasks.add({ empid: this.employeeId, st: this.fi, fi: task.fi, tasktypeId: timeOffId });\n }\n task.fi = this.st;\n } else if (task.fi > this.fi) {\n task.st = this.fi;\n } else {\n task.toDelete();\n }\n }\n modifed = true;\n }\n\n if (modifed) {\n /** @type {Set} */\n const affectedDates = new Set();\n let dt = this.st;\n while (dt < this.fi) {\n affectedDates.add(getShortDate(dt));\n dt = addDays(dt, 1);\n }\n\n return affectedDates;\n }\n }\n return undefined;\n }\n\n /** @returns {AvailabilityRequestDto} */\n toDto() {\n return {\n id: this.id, employeeId: this.employeeId, st: this.st, fi: this.fi, available: this.available,\n created: this.created, updated: this.updated, msg: this.msg, approved: this.approved, replyMsg: this.replyMsg, deleted: false\n };\n }\n\n /**\n * @param {import(\"@/model/dn-schedule-task.js\").ScheduleTasks} scheduleTasks\n * @param {import(\"@/shared/dn-tasktype.js\").TaskTypes} taskTypes\n * @param {import(\"@/shared/dn-employee.js\").Employee} employee\n * @param {boolean|null} approve\n * @param {{id:number;msg:string;numberOfStars?:number}} reply\n * @returns {Promise<{ok:boolean; affectedDates?:Set; toastMsg?:string;}>}\n */\n async toggleApproval(scheduleTasks, taskTypes, employee, approve, reply) { // eslint-disable-line no-unused-vars\n if (employee) {\n return { ok: false };\n }\n const approved = this.approved == approve ? null : approve;\n /** @type {AvailabilityRequestPatchDto} */\n const data = { approved: approved, replyMsg: this.replyMsg };\n const result = await patchAvailabilityRequest(this.id, data);\n this.approved = approved;\n this.updated = new Date(result.updated);\n /** @type {Set} */\n let affectedDates;\n if (!this.available) {\n affectedDates = this.syncWithSchedule(scheduleTasks, taskTypes);\n }\n return { ok: true, affectedDates };\n }\n}\n\n/**\n * @param {AvailabilityRequestDto} dto\n */\nfunction isApprovedOrAutoApproved(dto) {\n if (dto.approved === null && dto.available) {\n const created = new Date(dto.created);\n if (Date.now() - created.getTime() > 1000 * 60 * 60 * 24) {\n return true;\n }\n }\n\n return dto.approved;\n}\n\nclass AvailabilityRequestReply {\n /**\n * @param {AvailabilityRequest} ar\n * @param {boolean} isEmp\n */\n constructor(ar, isEmp) {\n /** @private @type {AvailabilityRequest} */\n this.ar = ar;\n /** @private @type {boolean} */\n this.isEmp = isEmp;\n }\n\n get id() {\n return this.ar.id;\n }\n\n get msg() {\n return this.isEmp ? this.ar.msg : this.ar.replyMsg;\n }\n\n set msg(value) {\n if (this.isEmp) {\n this.ar.msg = value;\n } else {\n this.ar.replyMsg = value;\n }\n }\n}\n\nexport class AvailabilityRequests {\n /**\n * @param {AvailabilityRequestDto[]} [dtoList]\n */\n constructor(dtoList = undefined) {\n /** @private @readonly @type {Map} */\n this.byId = new Map();\n /** @private @readonly @type {Map} */\n this.byEmp = new Map();\n if (dtoList) {\n this.setData(dtoList.map(x => new AvailabilityRequest(x)), false);\n }\n }\n\n get isLoaded() {\n return this.id !== undefined;\n }\n\n /**\n * @param {{showAvailability:boolean;showUnavailability:boolean;showFuture:boolean;showBasedOnSelection:boolean;showApproved:boolean;showRejected:boolean}} filter\n * @param {Date} future\n * @param {number} selectedEmpId\n * @param {import(\"@/shared/dn-employee.js\").Employee[]} empList\n * @param {Date} now\n */\n getByFilter(filter, future, selectedEmpId, empList, now) {\n /** @type {AvailabilityRequest[]} */\n const requests = [];\n for (const r of this.byId.values()) {\n if (r.isFilterOk(filter, future, selectedEmpId, empList, now)) {\n requests.push(r);\n }\n }\n return requests;\n }\n\n /**\n * @param {number} employeeId\n * @param {Date} dt\n * @returns {AvailabilityRequest[]}\n */\n getByEmpDate(employeeId, dt) {\n const empRequests = this.byEmp.get(employeeId);\n if (empRequests) {\n const dtRequests = empRequests.byDate.get(dt.getTime());\n if (dtRequests) {\n return dtRequests.slice();\n }\n }\n return [];\n }\n\n /** @param {Map} byEmp */\n getOkOnSelection(byEmp) {\n /** @type {AvailabilityRequestDto[]} */\n const l = [];\n for (const r of this.byId.values()) {\n if (r.isApproved) {\n const dates = byEmp.get(r.employeeId);\n if (dates) {\n l.push(r.toDto());\n }\n }\n }\n return l;\n }\n\n /**\n * @param {number} id\n * @param {boolean} idIsEmployee\n */\n init(id, idIsEmployee) {\n /** @private @type {number} */\n this.id = id;\n /** @private @type {boolean} */\n this.idIsEmployee = idIsEmployee;\n /** @private @type {number} */\n this.loadedStTime = null;\n /** @private @type {number} */\n this.updated = 0;\n this.byId.clear();\n }\n\n /**\n * @param {Date} st\n */\n async load(st) {\n const stTime = st.getTime();\n if (this.loadedStTime === null) {\n await this.getData(stTime);\n this.loadedStTime = stTime;\n } else if (this.loadedStTime > stTime) {\n await this.getData(stTime, this.loadedStTime);\n this.loadedStTime = stTime;\n }\n }\n\n async refresh() {\n if (this.loadedStTime === null) { return; }\n const ts = this.updated;\n await this.getData(this.loadedStTime, undefined, ts);\n }\n\n /**\n * @private\n * @param {number} st\n * @param {number} [fi]\n * @param {number} [ts]\n */\n async getData(st, fi = undefined, ts = undefined) {\n const updateUpdated = fi === undefined;\n const rows = await getAvailabilityRequests(st, fi, this.id, this.idIsEmployee, ts);\n /** @type {AvailabilityRequest[]} */\n const requests = [];\n for (const r of rows) {\n if (r.deleted) {\n this.byId.delete(r.id);\n const availEmp = this.byEmp.get(r.employeeId);\n if (availEmp) {\n availEmp.remove(r);\n }\n if (updateUpdated) {\n const updated = (new Date(r.updated)).getTime();\n if (this.updated < updated) {\n this.updated = updated;\n }\n }\n } else {\n requests.push(new AvailabilityRequest(r));\n }\n }\n\n this.setData(requests, updateUpdated);\n }\n\n /**\n * @param {number} employeeId\n */\n getByEmp(employeeId) {\n return this.byEmp.get(employeeId);\n }\n\n /**\n * @private\n * @param {AvailabilityRequest[]} rows\n * @param {boolean} updateUpdated\n */\n setData(rows, updateUpdated) {\n for (const r of rows) {\n this.byId.set(r.id, r);\n let availEmp = this.byEmp.get(r.employeeId);\n if (availEmp === undefined) {\n availEmp = new AvailabilityRequestEmployee();\n this.byEmp.set(r.employeeId, availEmp);\n }\n availEmp.set(r);\n if (updateUpdated) {\n const updated = r.updated !== null ? r.updated.getTime() : r.created.getTime();\n if (this.updated < updated) {\n this.updated = updated;\n }\n }\n }\n }\n}\n\nclass AvailabilityRequestEmployee {\n constructor() {\n /** @type {Map} */\n this.byDate = new Map();\n }\n\n /**\n * @param {Date} dt\n * @param {Date} nextDt\n * @param {{st:number;fi:number}[]} unavail\n */\n adjustQuarterHoursByDateUnavailability(dt, nextDt, unavail) {\n const startTime = getStartOfDay(dt).getTime();\n let requests = this.byDate.get(startTime);\n const endTime = getStartOfDay(nextDt).getTime();\n if (startTime !== endTime) {\n const request2 = this.byDate.get(endTime);\n if (request2) {\n if (requests) {\n requests = requests.concat(request2);\n } else {\n requests = request2;\n }\n }\n }\n if (requests) {\n for (const r of requests) {\n if (r.isApproved) {\n const st = r.st > dt ? getQuarterHour2(nextDt, r.st) : 0;\n const fi = r.fi < nextDt ? getQuarterHour2(nextDt,r.fi) : 96;\n addToIntervals(unavail, st, fi, r.available);\n }\n }\n }\n }\n\n /**\n * @param {Date} startDate\n * @param {import(\"#shared/dn-employee-schedule\").AvailabilityByDay} availabilityByDay\n */\n adjustQuarterHoursByDateAvailability(startDate, availabilityByDay) {\n for (let i = 0; i < availabilityByDay.length; i++) {\n const dayStart = addDays(startDate, i);\n const requests = this.byDate.get(dayStart.getTime());\n if (requests) {\n for (const r of requests) {\n if (r.isApproved) {\n const dayEnd = addDays(dayStart, 1);\n const st = getQuarterHourRelative(dayStart, dayEnd, r.st);\n const fi = getQuarterHourRelative(dayStart, dayEnd, r.fi);\n addToIntervals(availabilityByDay[i], st, fi, !r.available);\n }\n }\n }\n }\n }\n\n /**\n * @param {AvailabilityRequestDto} r\n */\n remove(r) {\n let dt = getStartOfDay(new Date(r.st));\n const fi = new Date(r.fi);\n while (dt < fi) {\n const dtTime = dt.getTime();\n const avails = this.byDate.get(dtTime);\n if (avails !== undefined) {\n const index = avails.findIndex(x => x.id === r.id);\n if (index >= 0) {\n avails.splice(index, 1);\n }\n }\n\n dt = addDays(dt, 1);\n }\n }\n\n /**\n * @param {AvailabilityRequest} ar\n */\n set(ar) {\n let dt = getStartOfDay(ar.st);\n while (dt < ar.fi) {\n const dtTime = dt.getTime();\n const avails = this.byDate.get(dtTime);\n if (avails === undefined) {\n this.byDate.set(dtTime, [ar]);\n } else {\n const index = avails.findIndex(x => x.id === ar.id);\n if (index >= 0) {\n avails[index] = ar;\n } else {\n avails.push(ar);\n }\n }\n\n dt = addDays(dt, 1);\n }\n }\n}\n\n/**\n * @param {{st:number; fi:number}[]} intervals\n * @param {number} st\n * @param {number} fi\n * @param {boolean} inverted\n */\nfunction addToIntervals(intervals, st, fi, inverted) {\n if (inverted) {\n let i = intervals.length - 1;\n while (i >= 0) {\n const interval = intervals[i];\n if (interval.st < fi && interval.fi > st) {\n if (interval.st < st) {\n if (interval.fi > fi) {\n intervals.push({ st: fi, fi: interval.fi });\n }\n interval.fi = st;\n } else {\n if (fi < interval.fi) {\n interval.st = fi;\n } else {\n intervals.splice(i, 1);\n }\n }\n }\n i--;\n }\n } else {\n let i = intervals.length - 1;\n while (i >= 0) {\n const interval = intervals[i];\n if (interval.st <= fi && interval.fi >= st) {\n interval.st = Math.min(interval.st, st);\n interval.fi = Math.max(interval.fi, fi);\n st = fi;\n break;\n }\n i--;\n }\n\n if (st < fi) {\n intervals.push({ st, fi });\n }\n }\n intervals.sort((a, b) => a.st - b.st);\n}\n\n/**\n * @param {Date} dayStart\n * @param {Date} dayEnd\n * @param {Date} dt\n */\nfunction getQuarterHourRelative(dayStart, dayEnd, dt) {\n if (dt < dayStart) {\n return getQuarterHour(dt) - 96;\n } else if (dt >= dayEnd) {\n return getQuarterHour(dt) + 96;\n }\n return getQuarterHour(dt);\n}\n\n/**\n * @param {Date} dayEnd\n * @param {Date} dt\n */\nfunction getQuarterHour2(dayEnd, dt) {\n const ms = dayEnd.getTime() - dt.getTime();\n return 96 - Math.round(ms / (15 * 60000));\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { isSubset } from '@/js/dn-helper.js';\nimport { getLocalOffset } from '#shared/dn-timezone';\nimport { fromISODate, getDayDiff, toISODate } from '@/shared/dn-shared-helper.js';\n\n/**\n* @typedef {{ id:number|null, stFi: number[]; st: string; weeks: number; employeeIdList:number[] }} AvailabilityDto\n*/\n\nexport class Availabilities {\n /**\n * @param {AvailabilityDto[]} dto\n */\n constructor(dto = undefined) {\n /** @private @type {AvailabilityDto[]} */\n this._dto = dto;\n }\n\n get dto() {\n return this._dto;\n }\n\n get byEmp() {\n if (this._byEmp === undefined) {\n /** @private @type {Map} */\n this._byEmp = new Map();\n for (const availability of this.items) {\n for (const employeeId of availability.employeeIdList) {\n this._byEmp.set(employeeId, availability);\n }\n }\n }\n\n return this._byEmp;\n }\n\n get isLoaded() {\n return this._dto !== undefined;\n }\n\n get items() {\n if (this._items === undefined) {\n /** @private @type {Availability[]} */\n this._items = this.dto.map(r => new Availability(fromISODate(r.st), r.weeks, r.stFi, r.employeeIdList, r.id));\n }\n return this._items;\n }\n\n clear() {\n this._dto = undefined;\n this._byEmp = undefined;\n this._items = undefined;\n }\n\n /**\n * @param {number} ccId\n */\n async load(ccId) {\n this.clear();\n /** @type {AvailabilityDto[]} */\n const rows = await fetchAndCheckJson('availability?ccId=' + ccId, 'GET');\n this._dto = rows;\n }\n}\n\nexport function clearAvailability(a) {\n a.weeks = 0\n a.intervals = []\n a.employeeIdList = []\n a.id = null\n}\n\nexport class Availability {\n /**\n * @param {number} id\n * @param {Date} st\n * @param {number} weeks\n * @param {number[]} stFi st and fi in quarter hours\n * @param {number[]} employeeIdList\n */\n constructor(st, weeks, stFi, employeeIdList, id = null) {\n /** @private @type {number|null} */\n this._id = id;\n /** @type {number} */\n this.weeks = weeks;\n /** @type {Date} */\n this.st = st;\n /** @type {number[]} quarter hours from start of period */\n this.stFi = stFi;\n /** @readonly @type {number[]} */\n this.employeeIdList = employeeIdList;\n }\n\n get id() {\n return this._id;\n }\n\n get availabilityUI() {\n let intervals = []\n\n for (let i = 0; i < this.stFi.length; i++) {\n intervals.push({ st: this.stFi[i], fi: this.stFi[i + 1] })\n i++\n }\n return { weeks: this.weeks, intervals: intervals, employeeIdList: this.employeeIdList, id: this.id }\n }\n\n /**\n * @param {Date} startDt\n * @param {string} timezone\n */\n getUnavailability(startDt, timezone) {\n const localOffsetQ = getLocalOffset(startDt, timezone) / 15;\n const unavailability = [0];\n for (let i = 0; i < this.stFi.length; i += 1) {\n const q = this.stFi[i] - localOffsetQ;\n unavailability.push(q);\n }\n const endQ = this.weeks * 7 * 96;\n const lastQ = this.stFi[this.stFi.length - 1] - localOffsetQ;\n unavailability.push(endQ)\n if (lastQ > endQ) { \n unavailability[0] = lastQ - endQ;\n }\n const firstQ = this.stFi[0] - localOffsetQ;\n if (firstQ < 0) {\n unavailability[unavailability.length-1] = endQ + firstQ;\n } \n return unavailability;\n }\n /**\n * @param {Date} dt\n */\n getDayIndex(dt) {\n const dayDiff = getDayDiff(dt, this.st);\n const days = this.weeks * 7;\n return dayDiff % days;\n }\n\n /**\n * @param {number} dayIndex\n */\n getByDayIndex(dayIndex) {\n if (this._byDayIndex === undefined) {\n const dayCount = this.weeks * 7;\n /** @private @type {import(\"#shared/dn-employee-schedule\").AvailabilityByDay} */\n this._byDayIndex = [];\n let j = 0;\n let daySt = 0;\n for (let i = 0; i < dayCount; i++) {\n let intervals = [];\n const dayFi = daySt + 96;\n while (j < this.stFi.length && this.stFi[j] < dayFi) {\n const fi = this.stFi[j + 1];\n if (fi > daySt) {\n intervals.push({ st: this.stFi[j] - daySt, fi: this.stFi[j + 1] - daySt });\n }\n if (fi > dayFi) { break; }\n j += 2;\n }\n\n this._byDayIndex.push(intervals);\n daySt = dayFi;\n }\n\n if (j < this.stFi.length) {\n this._byDayIndex[0].splice(0, 0, { st: this.stFi[j] - daySt, fi: this.stFi[j + 1] - daySt });\n }\n }\n return this._byDayIndex[dayIndex];\n }\n}\n\n/**\n * @param {number[]} checkedEmps\n */\nexport async function deleteAvailability(checkedEmps) {\n /** @type {AvailabilityDto} */\n const data = { id: null, st: '', weeks: 0, stFi: [], employeeIdList: checkedEmps };\n await fetchAndCheckJson('availability', 'POST', data);\n}\n\n/**\n * @param {number|null} id\n * @param {Date} st\n * @param {number} weeks\n * @param {number[]} stFi\n * @param {number[]} employeeIdList\n * @param {number[]} checkedEmps\n */\nexport async function saveAvailability(id, st, weeks, stFi, employeeIdList, checkedEmps) {\n checkedEmps.sort();\n employeeIdList.sort();\n if (!isSubset(checkedEmps, employeeIdList)) {\n id = null;\n }\n\n /** @type {AvailabilityDto} */\n const data = { id: id, st: toISODate(st), weeks: weeks, stFi: stFi, employeeIdList: checkedEmps };\n await fetchAndCheckJson('availability', 'POST', data);\n}\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { Skill } from '@/model/dn-skill.js';\nimport { getUniqueNegativeId } from '@/js/dn-helper.js';\nimport { addDays, fromISODate, toISODate } from '@/shared/dn-shared-helper.js';\n/**\n* @typedef {{ id?: number; interactions:number; aht:number, daysOfWeek:number[]|null; openHours:number[]|null}} SkillBODetailDto\n*/\n\n/**\n* @typedef {{ id?: number; schemecolor:string|null; minLength?:number|null;}} SkillBOTaskTypeDto\n*/\n\n/**\n* @typedef {import(\"@/model/dn-skill.js\").SkillDto & { taskType: SkillBOTaskTypeDto; st?:string|null; fi?:string|null; details:SkillBODetailDto[]}} SkillBODto\n*/\n\n/**\n* @typedef {{ target:number, openHours:number[]|null }} BOTargetDetail\n*/\n\n/**\n* @typedef {{ details:BOTargetDetail[] }} BOTargetDay\n*/\n\n/**\n* @typedef { {id:number; taskTypeId: number; minLength:number; affinity:number; optimizationPriority:number; targetByDay:BOTargetDay[] }} BOTarget\n*/\n\nexport class BackOfficeSkill extends Skill {\n /**\n * @param {SkillBODto} dto\n */\n constructor(dto) {\n super(dto);\n /** @private @type {SkillBOTaskTypeDto} */\n this.taskType = { id: dto.taskType.id, schemecolor: dto.taskType.schemecolor, minLength: dto.taskType.minLength };\n /** @readonly @type {BackOfficeSkillDetail[]} */\n this.details = dto.details.map(x => new BackOfficeSkillDetail(this, x));\n /** @private @type {Date} */\n this._stDate = fromISODate(dto.st);\n /** @private @type {Date} */\n this._fiDate = fromISODate(dto.fi);\n }\n\n get stDate() {\n return this._stDate;\n }\n\n set stDate(newValue) {\n this._stDate = newValue;\n this.markAsHasChanges();\n }\n\n get fiDate() {\n return this._fiDate;\n }\n\n set fiDate(newValue) {\n this._fiDate = newValue;\n this.markAsHasChanges();\n }\n\n get minLength() {\n return this.taskType.minLength;\n }\n\n set minLength(newValue) {\n const v = Number(newValue);\n if (Number.isNaN(v) || v < 0) { return; }\n this.taskType.minLength = v;\n this.markAsHasChanges();\n }\n\n get schemecolor() {\n return this.taskType.schemecolor;\n }\n\n set schemecolor(newValue) {\n this.taskType.schemecolor = newValue;\n this.markAsHasChanges();\n }\n\n addDetail() {\n const id = getUniqueNegativeId(this.details);\n this.details.push(new BackOfficeSkillDetail(this, { id, aht: 0, interactions: 1, daysOfWeek: null, openHours: null }));\n }\n\n toDto() {\n /** @type {SkillBODto} */ // @ts-ignore\n const dto = super.toDto();\n dto.st = toISODate(this.stDate);\n dto.fi = toISODate(this.fiDate);\n dto.taskType = this.taskType;\n dto.details = this.details.map(x => x.toDto());\n return dto;\n }\n}\n\nexport class BackOfficeSkillDetail {\n /**\n * @param {BackOfficeSkill} parent\n * @param {SkillBODetailDto} dto\n */\n constructor(parent, dto) {\n /** @private @type {BackOfficeSkill} */\n this.parent = parent;\n /** @readonly @type {number} */\n this.id = dto.id;\n /** @private @type {number} */\n this._aht = dto.aht;\n /** @private @type {number} */\n this._interactions = dto.interactions;\n /** @private @type {number[]} */\n this._daysOfWeek = dto.daysOfWeek ? dto.daysOfWeek : [0, 1, 2, 3, 4, 5, 6];\n /** @private @type {number[]} */\n this._openHours = dto.openHours ? dto.openHours : [0, 96];\n }\n\n get aht() {\n return this._aht;\n }\n\n set aht(newValue) {\n this._aht = newValue;\n this.parent.markAsHasChanges();\n }\n\n get interactions() {\n return this._interactions;\n }\n\n set interactions(newValue) {\n this._interactions = newValue;\n this.parent.markAsHasChanges();\n }\n\n get daysOfWeek() {\n return this._daysOfWeek;\n }\n\n set daysOfWeek(newValue) {\n this._daysOfWeek = newValue;\n this.parent.markAsHasChanges();\n }\n\n get openHours() {\n return this._openHours;\n }\n\n set openHours(newValue) {\n if (newValue[0] > newValue[1]) {\n const st = newValue[1];\n newValue[1] = newValue[0];\n newValue[0] = st;\n }\n this._openHours = newValue;\n this.parent.markAsHasChanges();\n }\n\n /**\n * @param {Intl.LocalesArgument} lang\n */\n openHoursInfo(lang) {\n const st = this.openHours[0];\n const fi = this.openHours[1];\n if (st > 0 || fi < 96) {\n const dtFormat = new Intl.DateTimeFormat(lang, { hour: 'numeric', minute: '2-digit' });\n const zero = new Date(2000, 0, 1);\n const ticksPerQ = 1000 * 60 * 15;\n const stDate = new Date(zero.getTime() + ticksPerQ * st);\n const fiDate = new Date(zero.getTime() + ticksPerQ * fi);\n return `${dtFormat.format(stDate)} - ${dtFormat.format(fiDate)}`;\n }\n return '';\n }\n\n /** @returns {SkillBODetailDto} */\n toDto() {\n const id = this.id >= 0 ? this.id : undefined;\n const daysOfWeek = this._daysOfWeek.length !== 7 ? this._daysOfWeek : null;\n return { id, aht: this._aht, interactions: this._interactions, daysOfWeek, openHours: this._openHours };\n }\n}\n\nexport class BackOfficeSkills {\n /**\n * @param {SkillBODto[]} [dtoList]\n */\n constructor(dtoList = undefined) {\n /** @private @type {SkillBODto[]} */\n this.dtoList = dtoList;\n }\n\n get hasBO() {\n return this.isLoaded && this.dtoList.length > 0;\n }\n\n get isLoaded() {\n return this.dtoList !== undefined;\n }\n\n /**\n * @param {number[]} [ccList]\n */\n createList(ccList = undefined) {\n return this.dtoList.filter(x => !ccList || ccList.length === 0 || ccList.includes(x.ccid)).map(x => new BackOfficeSkill(x));\n }\n\n /**\n * @param {number} ccId\n * @param {Date} st\n * @param {number} numberOfDays\n */\n getTargetByTaskType(ccId, st, numberOfDays) {\n /** @type {Map} */\n const byTaskTypeId = new Map();\n const fi = addDays(st, numberOfDays);\n for (const skillBO of this.dtoList) {\n if (skillBO.ccid === ccId && skillBO.details.length > 0) {\n const boSt = fromISODate(skillBO.st);\n const boFi = fromISODate(skillBO.fi);\n if ((!boSt || boSt < fi) && (!boFi || boFi > st)) {\n /** @type {BOTargetDay[]} */\n const targetByDay = Array(numberOfDays);\n for (let i = 0; i < numberOfDays; i++) {\n /** @type {BOTargetDay} */\n let boTargetDay = null;\n const dt = addDays(st, i);\n if ((!boSt || boSt <= dt) && (!boFi || boFi >= dt)) {\n const day = dt.getDay();\n /** @type {BOTargetDetail[]} */\n const details = [];\n for (const detail of skillBO.details) {\n if (!detail.daysOfWeek || detail.daysOfWeek.includes(day)) {\n /** @type {BOTargetDetail} */\n const targetDetail = { target: detail.interactions * detail.aht, openHours: detail.openHours };\n details.push(targetDetail);\n }\n }\n\n if (details.length > 0) {\n boTargetDay = { details };\n }\n }\n\n targetByDay[i] = boTargetDay;\n }\n /** @type {BOTarget} */\n const boTarget = {\n id: skillBO.id, taskTypeId: skillBO.taskType.id, minLength: skillBO.taskType.minLength,\n affinity: skillBO.affinityId, optimizationPriority: skillBO.optimizationPriority, targetByDay\n };\n byTaskTypeId.set(boTarget.taskTypeId, boTarget);\n }\n }\n }\n\n return byTaskTypeId;\n }\n\n async load() {\n this.dtoList = await fetchAndCheckJson(`bo`, 'GET');\n }\n}\n\n/**\n * @param {number} id\n * @param {number|null} ccId\n */\nexport function createBackOfficeSkill(id, ccId) {\n /** @type {SkillBOTaskTypeDto} */\n const taskType = { schemecolor: 'stroke4' };\n return new BackOfficeSkill({ id, name: '', ccid: ccId, taskType, details: [] });\n}\n\n/**\n * @param {{ toDto: () => SkillBODto; readonly id: number; readonly hasChanges: boolean; readonly isToDelete: boolean; }[]} skills\n */\nexport async function saveBackOfficeSkills(skills) {\n /** @type {SkillBODto[]} */\n const changed = [];\n /** @type {number[]} */\n const deleted = [];\n for (const skill of skills) {\n if (skill.isToDelete) {\n deleted.push(skill.id);\n } else if (skill.hasChanges) {\n changed.push(skill.toDto());\n }\n }\n\n if (deleted.length > 0 || changed.length > 0) {\n await fetchAndCheckJson(`bo`, 'POST', { deleted, changed });\n }\n}\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\r\n\r\nconst secondsPer5Min = 60 * 5;\r\n\r\n/**\r\n * @typedef {{\r\n * id: number;\r\n * minShiftDuration: number;\r\n * maxShiftDuration: number;\r\n * minWorkDuration: number;\r\n * tagId: number;\r\n * tasks: {tasktypeId: number, duration:number}[]\r\n * }} BreakSettingsDto\r\n */\r\n\r\n/**\r\n * @param {number} id\r\n */\r\nexport async function deleteBreakSettings(id) {\r\n return await fetchAndCheckJson(`break-settings/${id}`, 'DELETE');\r\n}\r\n\r\n/**\r\n * @return {Promise}\r\n */\r\nexport async function getBreakSettings() {\r\n return await fetchAndCheckJson('break-settings', 'GET').then(x => x.map(breakSettingsFromDto));\r\n}\r\n\r\n/**\r\n * @param {BreakSettings} bs\r\n */\r\nexport async function saveBreakSettings(bs) {\r\n let path = `break-settings`;\r\n if (bs.id < 0)\r\n return await fetchAndCheckJson(path, 'POST', bs.toDto()).then(x => {\r\n bs.id = x.id;\r\n bs.confirmChanges();\r\n });\r\n else\r\n return await fetchAndCheckJson(path + '/' + bs.id, 'PATCH', bs.toDto()).\r\n then(() => bs.confirmChanges());\r\n}\r\n\r\nexport class BreakSettings {\r\n /**\r\n * @param {number} id\r\n * @param {number} minShiftDuration\r\n * @param {number} maxShiftDuration\r\n * @param {number} minWorkDuration\r\n * @param {Array} tasks\r\n * @param {number|null} tagId\r\n */\r\n constructor(id, minShiftDuration, maxShiftDuration, minWorkDuration, tasks, tagId = null) {\r\n /** @type {number} values below 0 is interpreted as new break settings */\r\n this.id = id;\r\n /** @private @type {number} inclusive min shift length in 5 minute intervals */\r\n this._minShiftDuration = minShiftDuration;\r\n /** @private @type {number} inclusive max shift length in 5 minute intervals */\r\n this._maxShiftDuration = maxShiftDuration;\r\n /** @private @type {number} min work duration in 5 minute intervals */\r\n this._minWorkDuration = minWorkDuration;\r\n /** @private @type {Array} */\r\n this._tasks = tasks;\r\n /** @private @type {number|null} */\r\n this._tagId = tagId;\r\n /** @private @type {boolean} */\r\n this._hasChanges = false;\r\n /** @private @type {boolean} */\r\n this._isToDelete = false;\r\n /** @private @type {number|null} */\r\n this._unpaidDurationMinutes = null;\r\n }\r\n\r\n get minShiftDuration() {\r\n return this._minShiftDuration;\r\n }\r\n\r\n get minShiftDurationMinutes() {\r\n return 5 * this._minShiftDuration;\r\n }\r\n\r\n get minShiftDurationDate() {\r\n return unitToDate(this.minShiftDuration);\r\n }\r\n\r\n /**\r\n * @param {Date} newValue\r\n */\r\n set minShiftDurationDate(newValue) {\r\n this._minShiftDuration = dateToUnit(newValue);\r\n this.markAsHasChanges();\r\n }\r\n\r\n get maxShiftDuration() {\r\n return this._maxShiftDuration;\r\n }\r\n\r\n get maxShiftDurationMinutes() {\r\n return 5 * this._maxShiftDuration;\r\n }\r\n\r\n get maxShiftDurationDate() {\r\n return unitToDate(this.maxShiftDuration);\r\n }\r\n\r\n /**\r\n * @param {Date} newValue\r\n */\r\n set maxShiftDurationDate(newValue) {\r\n this._maxShiftDuration = dateToUnit(newValue)\r\n this.markAsHasChanges();\r\n }\r\n\r\n get minWorkDuration() {\r\n return this._minWorkDuration;\r\n }\r\n\r\n get minWorkDurationQ() {\r\n return Math.ceil(this._minWorkDuration / 3);\r\n }\r\n\r\n get minWorkDurationDate() {\r\n return unitToDate(this._minWorkDuration);\r\n }\r\n\r\n set minWorkDurationDate(newValue) {\r\n this._minWorkDuration = dateToUnit(newValue);\r\n this.markAsHasChanges();\r\n }\r\n\r\n get tagId() {\r\n return this._tagId;\r\n }\r\n set tagId(newValue) {\r\n this.markAsHasChanges();\r\n this._tagId = newValue\r\n }\r\n\r\n get tagIdSingle() {\r\n if (this.tagId === null)\r\n return [];\r\n return [this.tagId];\r\n }\r\n set tagIdSingle(newValue) {\r\n if (newValue.length === 0)\r\n this.tagId = null;\r\n else\r\n this.tagId = newValue[0];\r\n }\r\n\r\n get tasks() {\r\n return this._tasks;\r\n }\r\n\r\n set tasks(newValue) {\r\n this.markAsHasChanges();\r\n this._tasks = newValue\r\n }\r\n\r\n get hasChanges() {\r\n return this._hasChanges;\r\n }\r\n\r\n markAsHasChanges() {\r\n this._hasChanges = true;\r\n }\r\n\r\n confirmChanges() {\r\n this._hasChanges = false;\r\n }\r\n\r\n /**\r\n * Get average length in minutes betwwen breaks\r\n * @param {number} shiftLength shift length in minutes\r\n * @return {number}\r\n */\r\n avgWorkDuration(shiftLength) {\r\n const workIntervalCount = this.tasks.length + 1;\r\n let totalBreakDuration = 0;\r\n for (const bsTask of this.tasks) {\r\n totalBreakDuration += bsTask.duration;\r\n }\r\n\r\n return (shiftLength - 5 * totalBreakDuration) / workIntervalCount;\r\n }\r\n\r\n /**\r\n * @param {Map} taskTypeMap\r\n */\r\n calculateUnpaidDuration(taskTypeMap) {\r\n let unpaidDuration = 0;\r\n for (const t of this.tasks) {\r\n const tt = taskTypeMap.get(t.ttId);\r\n if (!tt.paidBreak) {\r\n unpaidDuration += t.duration;\r\n }\r\n }\r\n this._unpaidDurationMinutes = 5 * unpaidDuration;\r\n }\r\n\r\n get unpaidDurationMinutes() {\r\n return this._unpaidDurationMinutes;\r\n }\r\n\r\n get isToDelete() {\r\n return this._isToDelete;\r\n }\r\n\r\n get isMinMaxDurationOk() {\r\n return this.maxShiftDuration >= this.minShiftDuration;\r\n }\r\n\r\n get isValid() {\r\n if (this.isToDelete)\r\n return true;\r\n return this.isMinMaxDurationOk;\r\n }\r\n\r\n minPossibleDuration() {\r\n let sum = this.minWorkDuration;\r\n for (const t of this.tasks) {\r\n sum += this.minWorkDuration + t.duration;\r\n }\r\n\r\n return sum;\r\n }\r\n\r\n toDelete() {\r\n this._isToDelete = true\r\n }\r\n\r\n /**\r\n * @return {BreakSettingsDto}\r\n */\r\n toDto() {\r\n return {\r\n id: this.id,\r\n minShiftDuration: this.minShiftDuration * secondsPer5Min,\r\n maxShiftDuration: this.maxShiftDuration * secondsPer5Min,\r\n minWorkDuration: this.minWorkDuration * secondsPer5Min,\r\n tagId: this.tagId,\r\n tasks: this.tasks.map(x => x.toDto())\r\n };\r\n }\r\n}\r\n\r\nexport class BreakSettingsTask {\r\n /**\r\n * @param {number} ttId\r\n * @param {number} duration\r\n */\r\n constructor(ttId, duration) {\r\n /** @private @type {number} */\r\n this._ttId = ttId;\r\n /** @private @type {number} duration in 5 minute intervals*/\r\n this._duration = duration;\r\n }\r\n\r\n get duration() {\r\n return this._duration;\r\n }\r\n\r\n get durationDate() {\r\n return unitToDate(this._duration);\r\n }\r\n\r\n set durationDate(newValue) {\r\n this._duration = dateToUnit(newValue)\r\n }\r\n\r\n get ttId() {\r\n return this._ttId;\r\n }\r\n\r\n set ttId(newValue) {\r\n this._ttId = newValue\r\n }\r\n\r\n toDto() {\r\n return { tasktypeId: this.ttId, duration: this.duration * secondsPer5Min };\r\n }\r\n}\r\n\r\n\r\n/**\r\n * @param {BreakSettingsDto} bs\r\n */\r\nexport function breakSettingsFromDto(bs) {\r\n const bsTasks = [];\r\n for (const bsTask of bs.tasks) {\r\n bsTasks.push(new BreakSettingsTask(bsTask.tasktypeId, bsTask.duration / secondsPer5Min));\r\n }\r\n\r\n return new BreakSettings(bs.id, bs.minShiftDuration / secondsPer5Min,\r\n bs.maxShiftDuration / secondsPer5Min, bs.minWorkDuration / secondsPer5Min, bsTasks, bs.tagId);\r\n}\r\n\r\n/**\r\n * @param {BreakSettings[]} settings\r\n * @param {import(\"@/shared/dn-employee\").Employee} employee\r\n * @param {number[]} ccTagIdList\r\n */\r\nexport function getBreakSettingsByTag(settings, employee, ccTagIdList) {\r\n let filtered = filterByTag(employee.tagIds);\r\n if (filtered.length !== 0)\r\n return filtered;\r\n filtered = filterByTag(ccTagIdList);\r\n if (filtered.length !== 0)\r\n return filtered;\r\n\r\n return settings.filter(x => x.tagId === null);\r\n\r\n /**\r\n * @param { number[] } tagIds\r\n */\r\n function filterByTag(tagIds) {\r\n if (tagIds.length === 0)\r\n return [];\r\n\r\n return settings.filter(x => x.tagId !== null && tagIds.includes(x.tagId))\r\n }\r\n}\r\n\r\n/**\r\n * @param {BreakSettings[]} breakSettings\r\n * @param {number} durMinutes\r\n */\r\nexport function getBreakSettingsMinWork(breakSettings, durMinutes) {\r\n if (durMinutes <= 0)\r\n return 0;\r\n\r\n let work = durMinutes;\r\n for (const bs of breakSettings) {\r\n if (bs.minShiftDurationMinutes <= durMinutes && durMinutes <= bs.maxShiftDurationMinutes) {\r\n const workMinutes = durMinutes - bs.unpaidDurationMinutes;\r\n work = Math.min(work, workMinutes);\r\n }\r\n }\r\n return work;\r\n}\r\n\r\n/**\r\n * @param {BreakSettings[]} breakSettings\r\n * @param {number} durMinutes\r\n */\r\nexport function getBreakSettingsMaxWork(breakSettings, durMinutes) {\r\n if (durMinutes <= 0)\r\n return 0;\r\n\r\n let work = 0;\r\n for (const bs of breakSettings) {\r\n if (bs.minShiftDurationMinutes <= durMinutes && durMinutes <= bs.maxShiftDurationMinutes) {\r\n const workMinutes = durMinutes - bs.unpaidDurationMinutes;\r\n work = Math.max(work, workMinutes);\r\n }\r\n }\r\n if (work === 0) {\r\n work = durMinutes;\r\n }\r\n return work;\r\n}\r\n\r\n/**\r\n * @param {number} unit\r\n */\r\nfunction unitToDate(unit) {\r\n const minutes = (unit % 12) * 5;\r\n const hours = Math.floor(unit / 12);\r\n return new Date(2030, 1, 1, hours, minutes);\r\n}\r\n\r\n/**\r\n * @param {Date} time\r\n */\r\nfunction dateToUnit(time) {\r\n return time.getHours() * 12 + time.getMinutes() / 5;\r\n}\r\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\n/**\n* @typedef {{ id: number; name: string; description: string; tagIds: number[]; }} CallCenterDto\n*/\n\n/**\n * @param {CallCenter} c\n */\nasync function deleteCallCenter(c) {\n await fetchAndCheckJson(`callcenters/${c.id}`, 'DELETE');\n}\n\nexport async function getCallCenters() {\n /** @type {CallCenterDto[]} */\n const rows = await fetchAndCheckJson(`callcenters`, 'GET');\n return rows.map(r => new CallCenter(r.id, r.name, r.description, r.tagIds));\n}\n\n/**\n * @param {CallCenter} c\n */\nasync function saveCallCenter(c) {\n const id = await fetchAndCheckJson(`callcenters`, 'POST', c.toApi());\n c.id = id;\n}\n\n/**\n * @param {CallCenter[]} callCenters\n */\nexport async function saveCallCenterList(callCenters) {\n for (const c of callCenters) {\n if (c.isToDelete) {\n await deleteCallCenter(c);\n } else if (c.hasChanges) {\n await saveCallCenter(c);\n c.confirmChanges();\n }\n }\n}\n\nexport class CallCenter {\n /**\n * @param {number} id\n * @param {string} name\n * @param {string} description\n * @param {number[]} tagIds\n */\n constructor(id, name, description = '', tagIds = []) {\n /** @private @type {number} */\n this._id = id;\n /** @private @type {string} */\n this._name = name;\n /** @type {number[]} */\n this.tagIds = tagIds;\n /** @private @type {string} */\n this._description = description;\n this._hasChanges = id === -1;\n this._isToDelete = false;\n this._imgUrl = \"building_primarydark.svg\"\n }\n get id() {\n return this._id\n }\n\n set id(newValue) {\n this._id = newValue\n }\n\n get name() {\n return this._name\n }\n set name(newValue) {\n this._name = newValue\n this._hasChanges = true\n }\n\n get description() {\n return this._description\n }\n set description(newValue) {\n this._description = newValue\n this._hasChanges = true\n }\n\n get imgUrl() {\n return this._imgUrl\n }\n set imgUrl(newValue) {\n this._imgUrl = newValue\n this._hasChanges = true\n }\n get hasChanges() {\n return this._hasChanges\n }\n confirmChanges() { this._hasChanges = false }\n markAsHasChanges() {\n this._hasChanges = true;\n }\n\n get isToDelete() {\n return this._isToDelete\n }\n toDelete() { this._isToDelete = true }\n\n toApi() {\n return { id: this.id, name: this.name, description: this.description, tagIds: this.tagIds };\n }\n\n tostring() {\n return 'id: ' + this._id + ' name: ' + this._name + ' description: ' + this._description\n }\n}\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { Skill } from '@/model/dn-skill.js';\n\nfunction createForecastMethodEnum() {\n const enumObject = {\n average: 0,\n ai: 1\n };\n\n return Object.freeze(enumObject);\n}\n\nexport const FORCAST_METHOD_KIND = createForecastMethodEnum();\n\n/**\n* @typedef {{ switchId:number; id: number; tag1max:string|null; tag1min:string|null, tag2max:string|null; tag2min:string|null; tag3max:number|null; tag3min:number|null}} CallGroupConditionDto\n*/\n\n/**\n* @typedef {import(\"@/model/dn-skill.js\").SkillDto & { slpercent:number; slseconds:number; addWrap:number|null; prioSecondsInQueue?:number|null; forecastMethod:number; conditions?:CallGroupConditionDto[]}} CallGroupDto\n*/\n\n/**\n * @param {number} id\n * @param {number} defaultSwitchId\n * @param {number|null} ccId\n */\nexport function createCallGroup(id, defaultSwitchId, ccId) {\n const callGroup = new CallGroup({ id, name: '', slpercent: 0, slseconds: 0, ccid: ccId, addWrap: null,forecastMethod:0, conditions: [] });\n callGroup.setDefaultSwitchId(defaultSwitchId);\n return callGroup;\n}\n\n/**\n * @param {CallGroup[]} callgroups\n */\nexport async function mergeCallGroups(callgroups) {\n const itemsToDelete = []\n const promises = []\n for (let i = 0; i < callgroups.length; i++) {\n const c = callgroups[i];\n //New or changed callgroups\n if (c.isToDelete) {\n if (c.id >= 0)\n promises.push(fetchAndCheckJson(`callgroups/${c.id}`, 'DELETE'))\n itemsToDelete.push(c)\n } else if (c.hasChanges) {\n if (c.id < 0) {\n promises.push(fetchAndCheckJson(`callgroups`, 'POST', c.toApi()).then(result => c.confirmChanges(result)))\n }\n else {\n promises.push(fetchAndCheckJson(`callgroups/${c.id}`, 'PATCH', c.toApi()).then(result => c.confirmChanges(result)))\n }\n }\n }\n\n await Promise.all(promises);\n\n //Remove deleted callgrpoups from array\n for (let i = 0; i < itemsToDelete.length; i++) {\n const index = callgroups.indexOf(itemsToDelete[i]);\n callgroups.splice(index, 1);\n }\n}\n\n/**\n* @param {boolean} [includeConditions]\n* @param {number} [defaultSwitchId]\n*/\nexport async function getCallGroups(includeConditions = false, defaultSwitchId = undefined) {\n const cond = includeConditions ? '?includeConditions=1' : '';\n\n /** @type {CallGroupDto[]} */\n const result = await fetchAndCheckJson(`callgroups${cond}`, 'GET');\n const callGroups = result.map(x => new CallGroup(x));\n if (defaultSwitchId) {\n for (const cg of callGroups) {\n cg.setDefaultSwitchId(defaultSwitchId);\n }\n }\n return callGroups;\n}\n\nexport class CallGroup extends Skill {\n /**\n * @param {CallGroupDto} dto\n */\n constructor(dto) { \n super(dto);\n /** @private @type {number} */\n this._slPercent = dto.slpercent;\n /** @private @type {number} */\n this._slWithin = dto.slseconds;\n /** @private @type {number} */\n this._prioSecondsInQueue = dto.prioSecondsInQueue ? dto.prioSecondsInQueue : null;\n /** @private @type {number} */\n this._addWrap = dto.addWrap;\n /** @private @type {number} */\n this._forecastMethod = dto.forecastMethod;\n\n /** @type {CallGroupCondition[]} */\n let conditions;\n if (dto.conditions)\n conditions = dto.conditions.map(c => new CallGroupCondition(c));\n else\n conditions = [];\n\n /** @private @type {CallGroupCondition[]} */\n this._conditions = conditions.sort((a, b) => (a.tag1min > b.tag1min) ? 1 : ((b.tag1min > a.tag1min) ? -1 : 0));\n }\n\n get addWrapS() {\n if (this._addWrap)\n return this._addWrap / 1000;\n return null;\n }\n\n set addWrapS(newValue) {\n if (newValue)\n this._addWrap = Math.round(newValue * 1000);\n else\n this._addWrap = null;\n this.markAsHasChanges();\n }\n\n get slPercent() {\n return this._slPercent\n }\n\n set slPercent(newValue) {\n this._slPercent = newValue\n this.markAsHasChanges();\n }\n\n get prioSecondsInQueue() {\n return this._prioSecondsInQueue ? this._prioSecondsInQueue : 0;\n }\n\n set prioSecondsInQueue(newValue) {\n const v = Number(newValue);\n if (Number.isNaN(v)) { return; }\n this._prioSecondsInQueue = Math.round(v);\n this.markAsHasChanges();\n }\n\n get slWithin() {\n return this._slWithin\n }\n\n set slWithin(newValue) {\n this._slWithin = newValue\n this.markAsHasChanges();\n }\n\n get forecastMethod() {\n return this._forecastMethod\n }\n\n set forecastMethod(newValue) {\n this._forecastMethod = newValue\n this.markAsHasChanges();\n }\n\n get conditions() {\n return this._conditions\n }\n\n set conditions(newValue) {\n this._conditions = newValue\n this.markAsHasChanges();\n }\n\n get hasChanges() {\n return super.hasChanges || this._conditions.some(c => c.hasChanges || c.id == -1 || c.isToDelete);\n }\n\n /**\n * @param {number} switchId\n */\n setDefaultSwitchId(switchId) {\n /** @private @type {number} */\n this._defaultSwitchId = switchId;\n }\n\n addCondition() {\n let switchId = this._defaultSwitchId;\n if (this.conditions.length > 0) {\n switchId = this.conditions[this.conditions.length - 1].switchId;\n }\n\n this.conditions.push(new CallGroupCondition({ id: -1, switchId, tag1min: null, tag1max: null, tag2min: null, tag2max: null, tag3min: null, tag3max: null }));\n }\n\n /**\n * @param {{ newConditionIds?: any; id: number; }} result\n */\n confirmChanges(result) {\n let i = 0;\n for (const cond of this.conditions) {\n if (!cond.isToDelete && cond.hasChanges && cond.id == -1) {\n cond.id = result.newConditionIds[i];\n i++;\n }\n }\n\n super.confirmChanges(result);\n\n this._conditions = this._conditions.filter(x => !x.isToDelete);\n for (const cond of this._conditions) {\n cond.confirmChanges();\n }\n }\n\n /**\n * @param {CallGroupCondition} condition\n */\n deleteCondition(condition) {\n condition.toDelete();\n if (condition.id === -1) {\n const index = this.conditions.findIndex(x => x.isToDelete && x.id === -1);\n this.conditions.splice(index, 1);\n }\n }\n\n isValid() {\n return this.conditions.every(x => x.isValid());\n }\n\n toDelete() {\n super.toDelete();\n this.conditions.length = 0;\n }\n toApi() {\n let conditionsToDelete = [];\n let conditionsToInsert = [];\n let conditionsToUpdate = [];\n for (const cond of this.conditions) {\n if (cond.isToDelete) {\n if (cond.id !== -1) conditionsToDelete.push(cond.id);\n } else if (cond.hasChanges) {\n const toSave = { switchId: cond.switchId, tag1min: cond.tag1min, tag1max: cond.tag1max, tag2min: cond.tag2min, tag2max: cond.tag2max, tag3min: cond.tag3min, tag3max: cond.tag3max };\n if (cond.id == -1) {\n conditionsToInsert.push(toSave);\n }\n else {\n toSave.id = cond.id;\n conditionsToUpdate.push(toSave);\n }\n }\n }\n\n /** @type {import(\"@/model/dn-skill.js\").SkillDto & { slpercent:number; slseconds:number; addWrap:number|null; prioSecondsInQueue?:number|null;forecastMethod:Number; conditionsToInsert:any[]; conditionsToDelete?:number[]; conditionsToUpdate:any[]}} */\n // @ts-ignore\n const dto = super.toDto();\n dto.addWrap = this._addWrap;\n dto.prioSecondsInQueue = this._prioSecondsInQueue;\n dto.slpercent = this.slPercent;\n dto.slseconds = this.slWithin;\n dto.forecastMethod=this._forecastMethod;\n dto.conditionsToInsert = conditionsToInsert;\n dto.conditionsToDelete = conditionsToDelete;\n dto.conditionsToUpdate = conditionsToUpdate;\n\n return dto;\n }\n\n /** @returns {CallGroupDto} */\n toDto() {\n /** @type {CallGroupDto} */ // @ts-ignore\n const dto = super.toDto();\n dto.addWrap = this._addWrap;\n dto.prioSecondsInQueue = this._prioSecondsInQueue;\n dto.slpercent = this.slPercent;\n dto.slseconds = this.slWithin;\n dto.forecastMethod=this._forecastMethod\n return dto;\n }\n}\n\nclass CallGroupCondition {\n /**\n * @param {CallGroupConditionDto} dto\n */\n constructor(dto) {\n /** @private @type {number} */\n this._id = dto.id\n /** @private @type {number} */\n this._switchId = dto.switchId;\n /** @private @type {null|number|string} */\n this._tag1min = dto.tag1min\n /** @private @type {null|number|string} */\n this._tag1max = dto.tag1max\n /** @private @type {null|number|string} */\n this._tag2min = dto.tag2min\n /** @private @type {null|number|string} */\n this._tag2max = dto.tag2max\n /** @private @type {null|number|string} */\n this._tag3min = dto.tag3min\n /** @private @type {null|number|string} */\n this._tag3max = dto.tag3max\n /** @private @type {boolean} */\n this._hasChanges = false\n /** @private @type {boolean} */\n this._isToDelete = false\n }\n\n get id() {\n return this._id\n }\n set id(value) {\n this._id = value\n }\n\n get switchId() {\n return this._switchId\n }\n\n set switchId(newValue) {\n this.setValue('_switchId', newValue);\n }\n\n get tag1min() {\n return this._tag1min\n }\n\n set tag1min(newValue) {\n this.setValue('_tag1min', newValue);\n }\n\n get tag1max() {\n return this._tag1max\n }\n\n set tag1max(newValue) {\n this.setValue('_tag1max', newValue);\n }\n\n get tag2min() {\n return this._tag2min\n }\n\n set tag2min(newValue) {\n this.setValue('_tag2min', newValue);\n }\n\n get tag2max() {\n return this._tag2max\n }\n\n set tag2max(newValue) {\n this.setValue('_tag2max', newValue);\n }\n\n get tag3min() {\n return this._tag3min\n }\n\n set tag3min(newValue) {\n this.setValue('_tag3min', newValue);\n }\n\n get tag3max() {\n return this._tag3max\n }\n\n set tag3max(newValue) {\n this.setValue('_tag3max', newValue);\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {null|number|string} value\n */\n setValue(prop, value) {\n if (value === '')\n value = null;\n\n if (this[prop] !== value) {\n this[prop] = value;\n this._hasChanges = true;\n }\n }\n\n get hasChanges() {\n return this._hasChanges\n }\n confirmChanges() {\n this._hasChanges = false\n }\n\n get isToDelete() {\n return this._isToDelete\n }\n toDelete() { this._isToDelete = true }\n\n getTagMax(prop) {\n if (prop === 'tag3min' || prop === 'tag3max')\n return 2147483647;\n return 9007199254740990;\n }\n\n isValid() {\n return this.hasValidValue('tag1min') && this.hasValidValue('tag1max') &&\n this.hasValidValue('tag2min') && this.hasValidValue('tag2max') &&\n this.hasValidValue('tag3min') && this.hasValidValue('tag3max');\n }\n\n /**\n * @private\n * @param {string} prop\n */\n hasValidValue(prop) {\n let value = this[prop];\n if (value === null)\n return true;\n if (typeof (value) === 'string') {\n value = parseInt(value);\n }\n if (value >= 0 && value <= this.getTagMax(prop)) {\n return true;\n }\n\n return false;\n }\n}\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\n/**\n * @param {number} ccId\n */\nexport async function getCustomShifts(ccId) {\n /** @type {{id:number, name:string, tasks: any[], cmd:number}[]} */\n const rows = await fetchAndCheckJson(`customshifts?ccId=${ccId}`, 'GET');\n return rows.map(x => new CustomShift(null, x.id, x.name, x.tasks, ccId, x.cmd));\n}\n\nexport async function createNewCustomShift(newCustomShift) {\n await fetchAndCheckJson(`customshifts`, 'POST', { name: newCustomShift.name, ccid: newCustomShift.ccid, tasks: newCustomShift.tasks, cmd: newCustomShift.cmd }).then(id =>\n newCustomShift.id = id)\n}\n\nexport async function deleteCustomShift2(customShift) {\n await fetchAndCheckJson(`customshifts/${customShift.id}`, 'DELETE');\n}\n\nexport class CustomShift {\n constructor(usershift, id, name, tasks, contactcenterIds, cmd) {\n if (usershift) {\n this._id = usershift.id\n this._name = usershift.name\n this._tasks = []\n this._contactcenterIds = usershift.contactcenterIds\n this._cmd = usershift.cmd\n } else {\n this._id = id\n this._name = name\n this._tasks = tasks\n this._contactcenterIds = contactcenterIds\n this._cmd = cmd\n }\n this._hasChanges = false\n this._isToDelete = false\n }\n\n get id() {\n return this._id\n }\n\n get name() {\n return this._name\n }\n\n set name(newValue) {\n this._name = newValue\n this._hasChanges = true\n }\n\n get tasks() {\n return this._tasks\n }\n\n set tasks(newValue) {\n this._tasks = newValue\n this._hasChanges = true\n }\n\n get contactcenterIds() {\n return this._contactcenterIds\n }\n\n set contactcenterIds(newValue) {\n this._contactcenterIds = newValue\n this._hasChanges = true\n }\n\n get cmd() {\n return this._cmd\n }\n\n set cmd(newValue) {\n this._cmd = newValue\n this._hasChanges = true\n }\n\n get hasChanges() {\n return this._hasChanges\n }\n confirmChanges() { this._hasChanges = false }\n\n get isToDelete() {\n return this._isToDelete\n }\n toDelete() { this._isToDelete = true }\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { fromISODate, toISODate } from '@/shared/dn-shared-helper.js';\n\n/**\n * @param {{ email: string, password: string, userName: string, schema: string, customerName: string, \n * st: Date, tz: string, areaId: number, vat: string|null, address:string, person: string, useMode:number, useDepartments:boolean, initialLicenses: number,\n * paymentMethod:number , notify: boolean;countDays?:boolean;initialOverride?:boolean;authExternal?:boolean;\n * refreshTokenDays?:number; stripeId?:string;invoiceEmail?:string;note?:string; setUsers?:number}} data\n */\n\nexport async function addCustomer(data) {\n return await fetchAndCheckJson('customer', 'POST', data);\n}\n\n/**\n * @param {number} id\n * @param {boolean} connectUsers\n */\nexport async function copyCustomer(id, connectUsers) {\n return await fetchAndCheckJson('customer?copy=1', 'POST', { id, connectUsers });\n}\n\n/**\n * @param {string} schema\n */\nexport async function deleteCustomer(schema) {\n return await fetchAndCheckJson('customer/' + schema, 'DELETE');\n}\n\n/**\n * @return {Promise}\n */\nexport async function getCustomers() {\n return await fetchAndCheckJson('customer', 'GET').then(list => list.map(x => new Customer(x)));\n}\n\n/**\n * @param {{id: number; email?: string; schema: string; name?: string; timezone?: string; endTime?:Date?, \n * features?:{featureId:number, fee:number, st:string, fi:string}[], extraStorage?:number, areaId?:number, \n * initialLicenses?:number, vat?:string, address?:string, person?:string, useMode?:number, useDepartments?:boolean, paymentMethod?:number, \n * update?:boolean;countDays?:boolean;initialOverride?:boolean;authExternal?:boolean;refreshTokenDays?:number;stripeId?:string;invoiceEmail?:string;note?:string;setUsers?:number}} data\n */\n\nexport async function patchCustomer(data) {\n return await fetchAndCheckJson(`customer/${data.schema}`, 'PATCH', data);\n}\n\nexport class Customer {\n\n constructor(data) {\n /** @readonly @type {number} */\n this.id = data.id;\n /** @private @type {string} */\n this._name = data.name;\n /** @type {string} */\n this.schema = data.schema;\n /** @type {string} */\n this.timezone = data.timezone;\n /** @type {string} */\n this.version = data.version;\n /** @type {string} */\n this._email = data.email;\n /** @private @type {number} */\n this._areaId = data.areaId;\n /** @private @type {number} */\n this._initialLicenses = data.initialLicenses;\n /** @private @type {number} */\n this._extraStorage = data.extraStorage;\n /** @private @type {number} */\n this._paymentMethod = data.paymentMethod;\n /** @private @type {string} */\n this._vat = data.vat;\n /** @private @type {string} */\n this._address = data.address;\n /** @private @type {string} */\n this._person = data.person;\n /** @readonly @type {boolean} */\n this.tzOk = data.tzOk;\n /** @private @type {boolean|null} */\n this._countDays = data.countDays;\n /** @private @type {boolean|null} */\n this._initialOverride = data.initialOverride;\n /** @private @type {boolean|null} */\n this._authExternal = data.authExternal;\n /** @private @type {number|null} */\n this._refreshTokenDays = data.refreshTokenDays;\n /** @private @type {number|null} */\n this._useMode = data.useMode;\n /** @private @type {boolean|null} */\n this._useDepartments = data.useDepartments;\n /** @private @type {string|null} */\n this._stripeId = data.stripeId;\n /** @private @type {string} */\n this._invoiceEmail = data.invoiceEmail;\n /** @private @type {string} */\n this._note = data.note;\n /** @private @type {number|null} */\n this._setUsers = data.setUsers;\n\n /** @type {CustomerFeature[]} */\n this.features = CUSTOMER_FEATURE_KEYS.map((x, id) => new CustomerFeature(this, id));\n for (const apiRow of data.features) {\n this.features[apiRow.featureId].init(apiRow);\n }\n\n /** @type {boolean} */\n this.hasChanges = false;\n }\n\n get email() {\n return this._email;\n }\n\n set email(value) {\n this.setValue('_email', value);\n }\n\n get address() {\n return this._address;\n }\n\n set address(value) {\n this.setValue('_address', value);\n }\n\n get authExternal() {\n return this._authExternal;\n }\n\n set authExternal(value) {\n this.setValue('_authExternal', value);\n }\n\n get countDays() {\n return this._countDays;\n }\n\n set countDays(value) {\n this.setValue('_countDays', value);\n }\n\n get areaId() {\n return this._areaId;\n }\n\n set areaId(value) {\n this.setValue('_areaId', value);\n }\n\n get endTime() {\n return this.features[0].fi;\n }\n\n get hasSms() {\n return this.features[2].hasFeat();\n }\n\n get initialLicenses() {\n return this._initialLicenses;\n }\n\n set initialLicenses(value) {\n this.setValue('_initialLicenses', value);\n }\n\n get initialOverride() {\n return this._initialOverride;\n }\n\n set initialOverride(value) {\n this.setValue('_initialOverride', value);\n }\n\n get name() {\n return this._name;\n }\n\n set name(value) {\n this.setValue('_name', value);\n }\n\n get person() {\n return this._person;\n }\n\n set person(value) {\n this.setValue('_person', value);\n }\n\n get extraStorage() {\n return this._extraStorage;\n }\n\n set extraStorage(value) {\n this.setValue('_extraStorage', value);\n }\n\n get paymentMethod() {\n return this._paymentMethod;\n }\n\n set paymentMethod(value) {\n this.setValue('_paymentMethod', value);\n }\n\n get refreshTokenDays() {\n return this._refreshTokenDays;\n }\n\n set refreshTokenDays(value) {\n this.setValue('_refreshTokenDays', value);\n }\n\n get vat() {\n return this._vat;\n }\n\n set vat(value) {\n this.setValue('_vat', value);\n }\n\n get isInvoicesCreated() {\n return this.initialLicenses > 0 && this.features.some(x => x.fee > 0);\n }\n\n get useMode() {\n return this._useMode;\n }\n\n set useMode(value) {\n this.setValue('_useMode', value);\n }\n\n get useDepartments() {\n return this._useDepartments;\n }\n set useDepartments(value) {\n this.setValue('_useDepartments', value);\n }\n\n get stripeId() {\n return this._stripeId;\n }\n set stripeId(value) {\n this.setValue('_stripeId', value);\n }\n\n get invoiceEmail() {\n return this._invoiceEmail;\n }\n set invoiceEmail(value) {\n this.setValue('_invoiceEmail', value);\n }\n\n get note() {\n return this._note;\n }\n set note(value) {\n this.setValue('_note', value);\n }\n\n get setUsers() {\n return this._setUsers;\n }\n set setUsers(value) {\n this.setValue('_setUsers', value);\n }\n\n async save() {\n const data = {\n email: this.email,\n address: this.address,\n areaId: this.areaId,\n authExternal: this.authExternal,\n countDays: this.countDays,\n id: this.id,\n initialLicenses: this.initialLicenses,\n initialOverride: this.initialOverride,\n features: this.features.filter(x => x.st).map(x => x.toApi()),\n name: this.name,\n person: this.person,\n schema: this.schema,\n extraStorage: this.extraStorage,\n paymentMethod: this.paymentMethod,\n refreshTokenDays: this.refreshTokenDays,\n vat: this.vat,\n useMode: this.useMode,\n useDepartments: this.useDepartments,\n stripeId: this.stripeId,\n invoiceEmail: this.invoiceEmail,\n note: this.note,\n setUsers: this.setUsers ? this.setUsers : null\n };\n const result = await patchCustomer(data);\n this._stripeId = result.stripeId;\n this.hasChanges = false;\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {any} value\n */\n setValue(prop, value) {\n if (this[prop] !== value) {\n this[prop] = value;\n this.hasChanges = true;\n }\n }\n}\n\nclass CustomerFeature {\n /**\n * @param {Customer} parent\n * @param {number} featureId\n */\n constructor(parent, featureId) {\n /** @private @readonly @type {Customer} */\n this.parent = parent;\n /** @readonly @type {number} */\n this.featureId = featureId;\n /** @private @type {number} */\n this._fee = 0;\n /** @private @type {Date|null} */\n this._st = null;\n /** @private @type {Date|null} */\n this._fi = null;\n /** @private @type {boolean} */\n this._isInDB = false;\n }\n\n /**\n * @param {{ fee: number; st: string; fi: string |null; }} apiRow\n */\n init(apiRow) {\n this._isInDB = true;\n this._fee = apiRow.fee;\n this._st = fromISODate(apiRow.st);\n if (apiRow.fi !== null)\n this._fi = fromISODate(apiRow.fi);\n }\n\n canStartBeSetToNull(prop) {\n if (prop === 'st')\n return !this._isInDB;\n return true;\n }\n\n get fee() {\n return this._fee;\n }\n\n set fee(value) {\n this.setValue('_fee', value);\n }\n\n get fi() {\n return this._fi;\n }\n\n set fi(value) {\n this.setValue('_fi', value);\n }\n\n get st() {\n return this._st;\n }\n\n set st(value) {\n this.setValue('_st', value);\n }\n\n get name() {\n return CUSTOMER_FEATURE_KEYS[this.featureId];\n }\n\n hasFeat() {\n if (this.st === null)\n return false;\n\n const now = new Date();\n return this.st <= now && (this.fi === null || now <= this.fi)\n }\n\n toApi() {\n return {\n featureId: this.featureId,\n fee: this.fee,\n st: toISODate(this.st),\n fi: toISODate(this.fi),\n };\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {any} value\n */\n setValue(prop, value) {\n if (this[prop] !== value) {\n this[prop] = value;\n this.parent.hasChanges = true;\n }\n }\n}\n\nconst CUSTOMER_FEATURE_KEYS = Object.freeze(['main', 'storage', 'sms', 'adherence']);\n\nexport const CUSTOMER_FEATURE = Object.freeze({ main: 0, storage: 1, sms: 2, adherence: 3 });","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\n\nexport async function getDayTypes() {\n /** @type {{id:number;name:string;schemecolor:string;system:boolean}[]} */\n const result = await fetchAndCheckJson('daytypes', 'GET');\n return result.map(x => new DayType(null, x.id, x.name, x.schemecolor, x.system)).sort(function (a, b) {\n return b.system - a.system;\n });\n}\n\n/**\n * @param {DayType[]} daytypes\n */\nexport async function postDayTypes(daytypes) {\n return new Promise((resolve) => {\n let itemsToDelete = []\n let promesis = []\n for (let i = 0; i < daytypes.length; i++) {\n const dayType = daytypes[i];\n if (dayType.isToDelete) {\n promesis.push(fetchAndCheckJson(`daytypes/${dayType.id}`, 'DELETE'))\n itemsToDelete.push(dayType)\n } else if (daytypes[i].hasChanges) {\n if (daytypes[i].id == -1) {\n promesis.push(fetchAndCheckJson(`daytypes`, 'POST', { name: dayType.name, schemecolor: dayType.schemecolor }).then(x => dayType.id = x));\n } else {\n promesis.push(fetchAndCheckJson(`daytypes/${dayType.id}`, 'PUT', { name: dayType.name, schemecolor: dayType.schemecolor }));\n }\n\n dayType.confirmChanges();\n }\n }\n for (let i = 0; i < itemsToDelete.length; i++) {\n var index = daytypes.indexOf(itemsToDelete[i]);\n daytypes.splice(index, 1);\n }\n Promise.all(promesis).then(() => {\n resolve(daytypes);\n }).catch(error => {\n console.error(error.message)\n });\n });\n}\n\nexport class DayType {\n constructor(daytypes,id,name,schemecolor,system){\n if (daytypes){\n this._id = daytypes.id\n this._name = daytypes.name\n this._schemecolor = daytypes.schemecolor\n this._system = daytypes.system\n }\n else{\n this._id = id\n this._name = name\n this._schemecolor = schemecolor\n this._system = system\n }\n this._hasChanges = false\n this._isToDelete = false\n }\n\n get id() {\n return this._id\n }\n\n set id(newValue) {\n this._id = newValue\n }\n\n get system() {\n return this._system\n }\n\n set system(newValue) {\n this._system = newValue\n this._hasChanges = true\n }\n\n get name(){\n return this._name\n }\n\n set name(newValue){\n this._name = newValue\n this._hasChanges = true\n }\n\n get schemecolor(){\n return this._schemecolor\n }\n\n set schemecolor(newValue){\n this._schemecolor = newValue\n this._hasChanges = true\n }\n\n get hasChanges() {\n return this._hasChanges\n }\n confirmChanges(){this._hasChanges=false}\n\n get isToDelete() {\n return this._isToDelete\n }\n toDelete(){this._isToDelete=true}\n\n tostring(){\n return 'name:' + this._name + ' schemecolor: '+ this._schemecolor + 'system:' + this._system\n }\n}","\nimport { CUSTOMER_FEATURE } from '@/model/dn-customer';\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { addDays, getDayDiff, getShortDate, toISODate } from '@/shared/dn-shared-helper.js';\nimport { COLORS } from '@/js/dn-colors.js';\nimport * as dn_uiHelper from \"@/js/dn-uihelper.js\";\n\nconst MONTH_NAMES = getMonthNames();\n\nexport async function getInvoicesByYear() {\n /** @type {{id:number, year:number, month:number,info:{}}[]} */\n const invoices = await fetchAndCheckJson(`invoice?onlyRelevantStatus=0`, 'GET');\n const byYear = [];\n /** @type {null|{year:number, invoices:{id:number, month:number}[]}} */\n let data = null;\n for (const invoice of invoices) {\n if (data === null || data.year !== invoice.year) {\n data = { year: invoice.year, invoices: [] };\n byYear.push(data);\n }\n\n invoice.dt = new Date(invoice.dt)\n\n let info = getInvoiceStatusInfo(invoice)\n data.invoices.push({ id: invoice.id, month: invoice.month, info: info });\n }\n\n return byYear;\n}\n\nexport async function getRelevantWorstInvoiceStatus() {\n const relevantInvoiceStatuses = await fetchAndCheckJson(`invoice?onlyRelevantStatus=1`, 'GET');\n let worstStatus = 0\n for (let i = 0; i < relevantInvoiceStatuses.length; i++) {\n let invoice = relevantInvoiceStatuses[i]\n invoice.dt = new Date(invoice.dt)\n let x = getInvoiceStatusInfo(invoice);\n if (x.status > worstStatus && !(x.status == INVOICE_STATUS.paid || x.status == INVOICE_STATUS.removed)) { worstStatus = x.status }\n }\n return worstStatus\n}\n\nexport async function getInvoices() {\n /** @type {{id:number, year:number, month:number}[]} */\n const invoiceList = await fetchAndCheckJson('invoice', 'GET');\n let invoices = []\n for (let i = 0; i < invoiceList.length; i++) {\n let inv = invoiceList[i]\n inv.invoiceInfo = getInvoiceStatusInfo(inv)\n invoices.push(inv)\n }\n return invoices;\n}\n\n\n\n\n\n/**\n * @param {number} id\n */\nexport async function getInvoice(id) {\n const r = await fetchAndCheckJson('invoice/' + id, 'GET');\n let x = new Invoice(r);\n return x;\n}\n\n/**\n * @param {string} currency\n * @param {number} unit_amount\n * @param {string} itemName\n * @param {string} stripeId\n * @param {string} memo\n */\nexport async function getPaymentLink(currency, unit_amount, itemName, stripeId, memo) {\n const r = await fetchAndCheckJson('payment_link', 'POST', { currency: currency, unit_amount: unit_amount, itemName: itemName, stripeId: stripeId, memo: memo });\n return r;\n}\n\n/**\n * @param {number} id\n * @param {number} status\n * @param {string} paymentLink\n */\nexport async function updateInvoice(id, status = undefined, paymentLink = undefined, users = undefined, scheduled = undefined, payDt = null, paymentLinkId = undefined) {\n const result = await fetchAndCheckJson(`invoice/${id}`, 'PATCH', { status: status, paymentlink: paymentLink, users: users, scheduled: scheduled, payDt: toISODate(payDt), paymentLinkId: paymentLinkId });\n return result\n}\n\n/**\n * @param {number} year\n * @param {number} month\n */\nexport function getTitleDate(year, month) {\n return MONTH_NAMES[month - 1] + '-' + year;\n}\n\nexport function getInvoiceStatus(invoice) {\n\n let x = invoice.status\n if (x === null) { x = 0 }\n if (invoice.payDt && new Date(invoice.payDt) > new Date(\"1980-01-01\")) {\n return INVOICE_STATUS.paid\n }\n\n if (x == INVOICE_STATUS.removed) {\n return x\n } else {\n let dueDate = dn_uiHelper.addDays(new Date(invoice.dt), invoice.paymentTerms)\n let daysDue = (new Date().getTime() - dueDate.getTime()) / (1000 * 60 * 60 * 24) - 7\n if (daysDue < 0) { return x }\n else if (daysDue < 14) { return INVOICE_STATUS.due }\n else { return INVOICE_STATUS.overdue30 }\n }\n}\n\nexport function getInvoiceStatusInfo(i) {\n let status = getInvoiceStatus(i)\n switch (status) {\n case 0:\n return { text: \"\", color: COLORS.lightinfo, status: INVOICE_STATUS.initiated }\n break;\n case 1:\n return { text: \"released\", color: COLORS.lightinfo, status: INVOICE_STATUS.released }\n break;\n case 2:\n return { text: \"downloaded\", color: COLORS.stroke4, status: INVOICE_STATUS.downloaded }\n break;\n case 3:\n return { text: \"due\", color: COLORS.stroke2, status: INVOICE_STATUS.due }\n break;\n case 4:\n return { text: \"overdue\", color: COLORS.stroke3, status: INVOICE_STATUS.overdue30 }\n break;\n case 5:\n return { text: \"paid\", color: COLORS.stroke5, status: INVOICE_STATUS.paid }\n break;\n case 6:\n return { text: \"paid\", color: COLORS.dark, status: INVOICE_STATUS.removed }\n break;\n default:\n break;\n }\n}\n\nexport class Invoice {\n /**\n * @param {{id:number, year:number, month:number, customerId:number, customerName:string, extraStorage:number, currency:string, vat:string|null, address:string, person:string, users:number, scheduled:number, paymentTerms:number, paymentLink:string, status:number, payDt:Date, features:{featureId:number, fee:number; dayCount:number|null}[], \n * stripeId:string, paymentLinkId:string, invoiceEmail:string, note:string, customWork:array}} r\n */\n constructor(r) {\n const invoiceDate = new Date(r.year, r.month - 1);\n /** @type {number} */\n this.daysInMonth = getDayDiff(new Date(r.year, r.month), invoiceDate);\n this.invoiceNumber = r.id;\n this.customerNumber = r.customerId;\n this.invoiceDate = getShortDate(invoiceDate);\n this.customer = r.customerName;\n this.customerAdress = r.address;\n this.name = r.person;\n this.paymentTerms = r.paymentTerms;\n this._status = r.status;\n this.payDt = r.payDt;\n this.dueDate = getShortDate(addDays(invoiceDate, this.paymentTerms));\n this.licences = r.users + r.scheduled;\n this.stripeId = r.stripeId;\n this.paymentLinkId = r.paymentLinkId;\n this.invoiceEmail = r.invoiceEmail;\n this.note = r.note;\n /** @private @type {{featureId:number, fee:number; dayCount:number|null}[]} */\n this._features = r.features;\n let dayFactors = [];\n for (let index = 0; index < r.features.length; index++) {\n const feature = r.features[index];\n let fee = feature.fee;\n if (feature.dayCount !== null && feature.dayCount < this.daysInMonth) {\n dayFactors[feature.featureId] = feature.dayCount / this.daysInMonth;\n } else {\n dayFactors[feature.featureId] = 1;\n }\n if (feature.featureId === CUSTOMER_FEATURE.main) { this.licenceFee = fee }\n if (feature.featureId === CUSTOMER_FEATURE.storage) { this.storageFee = fee }\n if (feature.featureId === CUSTOMER_FEATURE.sms) { this.smsFee = fee }\n if (feature.featureId === CUSTOMER_FEATURE.adherence) { this.adherenceFee = fee }\n }\n this.storageAmount = r.extraStorage;\n this.currency = r.currency;\n if (this.currency == 'USD') {\n this.iban = 'SE6650000000050598297065';\n } else {\n this.iban = 'SE9550000000051671037391';\n }\n this.bic = 'ESSESESS';\n this.paymentLink = r.paymentLink;\n this.totalCustomWork = 0;\n if(r.customWork.length>0){\n for(let i=0;i 1000 * 60 * 60 * 22;\n }\n\n /**\n * @param {{ accessToken: string; refreshToken: string; }} authResult\n */\n setAuthRefreshResult(authResult) {\n this.timestamp = Date.now();\n this._accessToken = authResult.accessToken;\n this._refreshToken = authResult.refreshToken;\n }\n\n toStore() {\n return { accessToken: this.accessToken, refreshToken: this.refreshToken,\n customerSchema: this.customerSchema, loginKind: this._loginKind, timestamp: this.timestamp };\n }\n}\n\nconst LOGIN_KIND = createLoginKindEnum();\n\nfunction createLoginKindEnum() {\n const enumObject = {\n normal: 0,\n agent: 1,\n superAdmin: 2,\n };\n\n return Object.freeze(enumObject);\n}","// @ts-check\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { isSubset } from '@/js/dn-helper';\nimport { Shift } from '@/model/dn-shift.js';\n\n/**\n* @typedef {Object} OptimizableShiftDtoType\n* @property {number[]} dayList\n* @typedef {import(\"@/model/dn-shift.js\").ShiftDto & OptimizableShiftDtoType} OptimizableShiftDto\n*/\n\n/**\n* @typedef {{id:number|null, shifts:OptimizableShiftDto[], employeeIdList:number[]}} OptimizableShiftGroupDto\n*/\n\n/**\n * @param {number} ccId\n */\nexport async function getShiftBags(ccId) {\n /** @type {OptimizableShiftGroupDto[]} */\n const dto = await fetchAndCheckJson('optimizable-shift?ccId=' + ccId, 'GET');\n return new ShiftBags(dto);\n}\n\n/**\n * @param {OptimizableShiftGroupDto[]} rows\n */\nfunction createShiftBagByEmp(rows) {\n /** @type {Map} */\n const byEmpId = new Map();\n for (const r of rows) {\n const optimizableShiftGroup = new OptimizableShiftGroup(r);\n for (const employeeId of optimizableShiftGroup.employeeIdList) {\n byEmpId.set(employeeId, optimizableShiftGroup);\n }\n }\n return byEmpId;\n}\n\nexport class ShiftBags {\n /**\n * @param {OptimizableShiftGroupDto[]} dto\n */\n constructor(dto) {\n /** @readonly @type {OptimizableShiftGroupDto[]} */\n this.dto = dto;\n }\n\n get byEmp() {\n if (this._byEmp === undefined) {\n /** @private @type {Map} */\n this._byEmp = createShiftBagByEmp(this.dto);\n }\n\n return this._byEmp;\n }\n}\n\nexport class OptimizableShiftGroup {\n /**\n * @param {OptimizableShiftGroupDto} dto\n */\n constructor(dto) {\n /** @private @type {number|null} */\n this._id = dto.id;\n /** @type {OptimizableShift[]} */\n this.shifts = dto.shifts.map(s => new OptimizableShift(s));\n /** @readonly @type {number[]} */\n this.employeeIdList = dto.employeeIdList.slice();\n }\n\n get id() {\n return this._id;\n }\n\n clone() {\n return new OptimizableShiftGroup(this.toDto());\n }\n\n /**\n * @param {Date} dt\n * @param {import(\"@/model/dn-shift.js\").DayBounds} dayBounds\n * @param {Map} taskTypeMap\n */\n hasAllowedShifts(dt, dayBounds, taskTypeMap) {\n return this.shifts.some(x => x.isAllowed(dt, dayBounds, taskTypeMap));\n }\n\n /**\n * @param {Date} dt\n * @param {import(\"@/model/dn-shift.js\").DayBounds} dayBounds\n * @param {Map} taskTypeMap\n */\n getBounds(dt, dayBounds, taskTypeMap) {\n const bounds = { stMin: 96, fiMax: 0 };\n for (const shift of this.shifts) {\n if (shift.isAllowed(dt, dayBounds, taskTypeMap)) {\n shift.setMaxBounds(bounds, taskTypeMap);\n }\n }\n return bounds;\n }\n\n isValid() {\n return this.shifts.every(x => x.isValid());\n }\n\n /**\n * @param {number[]} checkedEmps\n */\n async save(checkedEmps) {\n const dto = this.toDto();\n checkedEmps.sort();\n this.employeeIdList.sort();\n if (!isSubset(checkedEmps, this.employeeIdList)) {\n dto.id = null;\n }\n\n if (dto.id === null) {\n for (const shift of dto.shifts) {\n shift.id = null;\n }\n }\n\n dto.employeeIdList = checkedEmps;\n await fetchAndCheckJson('optimizable-shift', 'POST', dto);\n }\n\n /** @returns {OptimizableShiftGroupDto} */\n toDto() {\n return {\n id: this.id,\n shifts: this.shifts.map(x => x.toDto()),\n employeeIdList: this.employeeIdList\n };\n }\n}\n\nexport class OptimizableShift extends Shift {\n /**\n * All units in quarter hours\n * @param {OptimizableShiftDto} data\n */\n constructor(data) {\n super(data)\n /** @type {number[]} If empty list is valid for all days. Values are Sunday = 0, Monday = 1, ... */\n this._dayList = (data.dayList === null || data.dayList.length === 0) ? [0, 1, 2, 3, 4, 5, 6] : data.dayList;\n }\n\n get dayList() {\n return this._dayList;\n }\n\n set dayList(value) {\n this.setValue('_dayList', value);\n }\n\n /**\n * @param {Date} dt\n * @param {import(\"@/model/dn-shift.js\").DayBounds} dayBounds\n * @param {Map} taskTypeMap\n */\n isAllowed(dt, dayBounds, taskTypeMap) {\n return this.isAllowedDate(dt) && this.isDayBoundsOk(dayBounds, taskTypeMap) && (this.isFix || this.stMin < this.fiMax);\n }\n\n /**\n * @private\n * @param {Date} dt\n */\n isAllowedDate(dt) {\n if (this.dayList.length === 0)\n return true;\n return this.dayList.includes(dt.getDay());\n }\n\n toDto() {\n /** @type {OptimizableShiftDto} */\n // @ts-ignore\n const dto = super.toDto();\n if (this._dayList.length === 7) {\n dto.dayList = [];\n } else {\n dto.dayList = this.dayList;\n }\n return dto;\n }\n}\n\n/**\n * @param {number} ttId\n */\nexport function createNewOptimizableShift(ttId) {\n return new OptimizableShift({ id: null, dayList: [], fixTasks: [], flexTasks: [{ st: 24, stSpan: 0, fi: 72, fiSpan: 0, dur: 48, durSpan: 0, step: 1, taskTypeId: ttId, kind: 0 }] });\n}\n\n/**\n * @param {number[]} checkedEmps\n */\nexport async function deleteShiftBag(checkedEmps) {\n /** @type {{id:number|null, shifts:OptimizableShiftDto[], employeeIdList:number[]}} */\n const data = {\n id: null,\n shifts: [],\n employeeIdList: checkedEmps\n };\n await fetchAndCheckJson('optimizable-shift', 'POST', data);\n}","export class RequestItem {\n /**\n * @param {number} id\n * @param {boolean|null} approved\n * @param {Date} created\n */\n constructor(id, approved, created) {\n /** @type {number} */\n this.id = id;\n /** @type {Date} */\n this.created = created;\n /** @type {boolean|null} */\n this.approved = approved;\n /** @private @type {boolean} */\n this._pending = false;\n }\n\n get days() {\n return 1;\n }\n\n get employeeCount() {\n return 1;\n }\n\n get employeesToDisplay() {\n return [];\n }\n\n get isRejected() {\n return this.approved === false;\n }\n\n get isApproved() {\n return this.approved === true;\n }\n\n get isOpen() {\n return !(this.isApproved || this.isRejected);\n }\n\n get isPending() {\n return this._pending;\n }\n\n get isPost() {\n return false;\n }\n\n get isTrade() {\n return false;\n }\n\n get iconName() {\n return '';\n }\n\n get key() {\n return this.id;\n }\n\n /**\n * @param {string} timezone\n * @returns {string[]}\n */\n getSelectionKeys(timezone) {\n return [];\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n canDelete(employee = null) { // eslint-disable-line no-unused-vars\n return false;\n }\n\n canEdit() {\n return false;\n }\n\n canEvaluate() {\n return false;\n }\n\n canReopen() {\n return false;\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n canReply(employee = null) { // eslint-disable-line no-unused-vars\n return false;\n }\n\n /**\n * @param {boolean} approved\n * @param {{ id: number; }| undefined} employee\n */\n canReplyWithAnswer(approved, employee) {\n if (!employee)\n return true;\n\n return this.canReplyWithAnswerEmp(approved, employee);\n }\n\n /**\n * @protected\n * @param {boolean} approved\n * @param {{ id: number; }} employee\n */\n canReplyWithAnswerEmp(approved, employee) { // eslint-disable-line no-unused-vars\n return false;\n }\n\n async deleteRequest() {\n }\n\n /**\n * @param {number} index\n */\n getEmployeeIdByIndex(index) { // eslint-disable-line no-unused-vars\n return 0;\n }\n\n getMsgToDisplay() {\n return '';\n }\n\n getReplyMsg() {\n return '';\n }\n\n /**\n * @param {number} index\n */\n getNumberOfStarsByIndex(index) { // eslint-disable-line no-unused-vars\n return 0;\n }\n\n /**\n * @param {{ id: number; }} employee\n * @returns {{id:number;msg:string;numberOfStars?:number}}\n */\n getReplyObj(employee) { // eslint-disable-line no-unused-vars\n return undefined;\n }\n\n /**\n * @param {any} srEmp\n * @param {string} language\n * @param {string} timeZone\n * @returns {string[]}\n */\n getTasksInfo(srEmp, language, timeZone) { // eslint-disable-line no-unused-vars\n return [];\n }\n\n /**\n * @param {string} key\n * @param {string} timezone\n */\n hasSelectionKey(key, timezone) { // eslint-disable-line no-unused-vars\n return false;\n }\n\n async reopen() {\n }\n\n setAsNonPending() {\n this._pending = false;\n }\n\n /** @protected */\n setPendingState() {\n this._pending = this.approved !== null;\n }\n\n /** @returns {Date[]} */\n affectedScheduleInterval() {\n return [];\n }\n\n /**\n * @param {import(\"@/model/dn-schedule-task.js\").ScheduleTasks} scheduleTasks\n * @param {import(\"@/shared/dn-tasktype.js\").TaskTypes} taskTypes\n * @param {import(\"@/shared/dn-employee.js\").Employee} employee\n * @param {boolean|null} approve\n * @param {{id:number;msg:string;numberOfStars?:number}} reply\n * @returns {Promise<{ok:boolean; affectedDates?:Set; toastMsg?:string;}>}\n */\n async toggleApproval(scheduleTasks, taskTypes, employee, approve, reply) { // eslint-disable-line no-unused-vars\n return { ok: false };\n }\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { isSubset } from '@/js/dn-helper';\nimport { Shift } from '@/model/dn-shift.js';\nimport {getShiftWorkTime} from '@/model/dn-shift.js';\nimport { fromISODate, getDayDiff, toISODate } from '@/shared/dn-shared-helper.js';\n\n/**\n* @typedef {{id?:number, st:string, weeks:number, employeeIdList:number[], days:{dayIndex:number, shiftId:number}[], shifts:import(\"@/model/dn-shift.js\").ShiftDto[]}} RotationDto\n*/\n\n/**\n* @typedef {Object} SaveRotationDtoType\n* @property {number[]} days\n* @typedef {import(\"@/model/dn-shift.js\").ShiftDto & SaveRotationDtoType} SaveRotationShiftDto\n*/\n\nfunction createNewRotation() {\n return new Rotation({ st: '2020-01-06', weeks: 0, shifts: [], employeeIdList: [], days: [] });\n}\n\n/**\n * @param {number} ccId\n * @returns {Promise}\n */\nexport async function getRotations(ccId) {\n const dto = await fetchAndCheckJson('rotation?ccId=' + ccId, 'GET');\n return new Rotations(dto);\n}\n\n/**\n * @param {RotationDto[]} rows\n */\nfunction createRotationByEmp(rows) {\n /** @type {Map} */\n const byEmpId = new Map();\n for (const r of rows) {\n const rotation = new Rotation(r);\n for (const employeeId of rotation.employeeIdList) {\n byEmpId.set(employeeId, rotation);\n }\n }\n\n return byEmpId;\n}\n\nexport class Rotations {\n /**\n * @param {RotationDto[]} dto\n */\n constructor(dto) {\n /** @readonly @type {RotationDto[]} */\n this.dto = dto;\n }\n\n get byEmp() {\n if (this._byEmp === undefined) {\n /** @private @type {Map} */\n this._byEmp = createRotationByEmp(this.dto);\n }\n\n return this._byEmp;\n }\n\n /**\n * @param {number} employeeId\n */\n create(employeeId) {\n const rotation = this.byEmp.get(employeeId);\n if (rotation) {\n for (const r of this.dto) {\n if (r.id === rotation.id) {\n return new Rotation(r);\n }\n }\n } else {\n return createNewRotation();\n }\n }\n}\n\nexport class Rotation {\n /**\n * @param {RotationDto} dto\n */\n constructor(dto) {\n /** @type {Map} */\n const byShiftId = new Map();\n for (const s of dto.shifts) {\n byShiftId.set(s.id, new Shift(s));\n }\n\n /** @type {Shift[]} */\n const shifts = new Array(dto.weeks * 7).fill(null);\n for (const d of dto.days) {\n shifts[d.dayIndex] = byShiftId.get(d.shiftId);\n }\n\n /** @private @type {number|null} */\n this._id = dto.id ? dto.id : null;\n /** @type {number} */\n this.weeks = dto.weeks;\n /** @type {Date} */\n this.st = fromISODate(dto.st);\n /** @type {Shift[]} */\n this.shifts = shifts;\n /** @readonly @type {number[]} */\n this.employeeIdList = dto.employeeIdList;\n }\n\n get id() {\n return this._id;\n }\n\n /**\n * @param {Date} dt\n */\n getShift(dt) {\n if (dt.getTime() < this.st.getTime())\n return null;\n const days = getDayDiff(dt, this.st);\n const index = days % (7 * this.weeks);\n return this.shifts[index];\n }\n\n /**\n * @param {Shift[]} shiftByDay\n * @param {number[]} checkedEmps\n */\n async save(shiftByDay, checkedEmps) {\n let id = this.id;\n checkedEmps.sort();\n if (!isSubset(checkedEmps, this.employeeIdList)) {\n id = null;\n }\n\n const shifts = [];\n /** @type {SaveRotationShiftDto[]} */\n const shiftDtos = [];\n for (let dayIndex = 0; dayIndex < shiftByDay.length; dayIndex++) {\n const s = shiftByDay[dayIndex];\n if (s && !s.isEmpty) {\n let found = false;\n for (let i = 0; i < shifts.length; i++) {\n const s2 = shifts[i];\n if (s.isEqual(s2)) {\n found = true;\n shiftDtos[i].days.push(dayIndex);\n break;\n }\n }\n\n if (!found) {\n shifts.push(s);\n /** @type {SaveRotationShiftDto} */\n // @ts-ignore\n const dto = s.toDto();\n dto.days = [dayIndex];\n shiftDtos.push(dto);\n }\n }\n }\n\n if (id === null) {\n for (const s of shiftDtos) {\n s.id = null;\n }\n } else {\n const idList = [];\n for (const s of shiftDtos) {\n if (s.id !== null) {\n if (idList.includes(s.id)) {\n s.id = null;\n } else {\n idList.push(s.id);\n }\n }\n }\n }\n\n const data = {\n id: id,\n st: toISODate(this.st),\n weeks: shiftByDay.length / 7,\n shifts: shiftDtos,\n employeeIdList: checkedEmps\n };\n await fetchAndCheckJson('rotation', 'POST', data);\n }\n\n /**\n * @param {Map} taskTypeMap\n * @param {import(\"@/model/dn-break-settings.js\").BreakSettings[]} breakSettings\n */\n getWeeklyWorkTime(breakSettings,taskTypeMap){\n if(breakSettings&&taskTypeMap){\n for(const bs of breakSettings){\n bs.calculateUnpaidDuration(taskTypeMap)\n }\n }\n let minWork =0 \n let maxWork =0\n let includeFlexShift=false\n for (const sh of this.shifts) {\n if(sh){\n let work = getShiftWorkTime(sh,taskTypeMap,breakSettings)\n minWork+=work.minWork\n maxWork+=work.maxWork\n if(work.includeFlexShift){includeFlexShift=true}\n }\n }\n if(this.weeks>1){\n minWork=minWork/this.weeks\n maxWork=maxWork/this.weeks\n }\n return {'minWork':minWork,'maxWork':maxWork,'includeFlexShift':includeFlexShift}\n }\n}\n\n/**\n * @param {number[]} checkedEmps\n */\nexport async function deleteRotation(checkedEmps) {\n /** @type {RotationDto} */\n const data = {\n id: null,\n st: toISODate(new Date()),\n days: [],\n weeks: 0,\n shifts: [],\n employeeIdList: checkedEmps\n };\n await fetchAndCheckJson('rotation', 'POST', data);\n}","import { EventBus } from \"@/js/dn-event-bus.js\";\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { getSelectionKey } from '@/js/dn-helper.js';\nimport { getTask, getTimeNow } from '@/js/dn-schedule-helper.js';\nimport { getDateOfInstant } from '#shared/dn-timezone';\nimport { getDurationInMinutes } from '@/js/dn-uihelper.js';\nimport { getShiftBounds } from \"#shared/dn-employee-schedule\";\nimport { RequestItem } from '@/model/dn-request-item.js';\nimport { addDays, getShortDate, getStartOfDay, sortDateIntervals } from '@/shared/dn-shared-helper.js';\nimport { Task } from '@/shared/dn-task';\nimport { TASK_KIND } from '@/shared/dn-tasktype.js';\nimport { useDataStore } from \"@/stores/dataStore.js\";\nimport { useScheduleStore } from \"@/stores/scheduleStore.js\";\n\nexport class ScheduleRequest extends RequestItem {\n\n /**\n * @param {ScheduleRequestEmployee[]} employees\n * @param {number} callCenterId\n * @param {number} kind\n * @param {number|null} days\n * @param {string} msg\n * @param {boolean|null} approved\n * @param {Date|undefined} created\n * @param {Date|undefined} updated\n */\n constructor(employees, callCenterId, kind, days = null, msg = '', approved = null, id = undefined, created = undefined, updated = undefined) {\n super(id, approved, created);\n /** @type {Date | undefined} */\n this.updated = updated;\n /** @readonly @type {ScheduleRequestEmployee[]} */\n this.employees = employees;\n /** @readonly @type {number} */\n this.callCenterId = callCenterId;\n /** @readonly @type {number} */\n this.kind = kind;\n /** @private @readonly @type {number} */\n this._days = days ? days : 1;\n /** @type {string} */\n this.msg = msg;\n /** @private @type {boolean} */\n this._evaluate = false;\n if (this.kind === REQUEST_KIND.post) {\n /** @type {Date} */\n let dt = undefined;\n for (const srEmp of this.employees) {\n for (const t of srEmp.tasks) {\n if (t.scheduleTask !== null && (dt === undefined || t.scheduleTask.st < dt)) {\n dt = t.scheduleTask.st;\n }\n }\n }\n for (const srEmp of this.employees) {\n srEmp.starts.push(dt);\n }\n } else {\n for (const srEmp of this.employees) {\n const dtFrom = getStartFrom(srEmp.employeeId);\n if (dtFrom !== undefined)\n srEmp.starts.push(dtFrom);\n const dtTo = getStartTo(srEmp);\n if (dtTo !== undefined)\n srEmp.starts.push(dtTo);\n }\n }\n\n function getStartFrom(employeeId) {\n let dt = undefined;\n for (const srEmp of employees) {\n if (srEmp.employeeId !== employeeId) {\n for (const t of srEmp.tasks) {\n if (t.scheduleTask !== null && t.scheduleTask.empId === employeeId && (dt === undefined || t.scheduleTask.st < dt)) {\n dt = t.scheduleTask.st;\n }\n }\n }\n }\n\n return dt;\n }\n\n function getStartTo(srEmp) {\n let dt = undefined;\n for (const t of srEmp.tasks) {\n if (dt === undefined || t.st < dt) {\n dt = t.st;\n }\n }\n\n return dt;\n }\n }\n\n get days() {\n return this._days\n }\n\n get employeeCount() {\n return this.employees.length;\n }\n\n get iconName() {\n switch (this.kind) {\n case REQUEST_KIND.post:\n return 'swap';\n case REQUEST_KIND.sick:\n return 'sick';\n case REQUEST_KIND.free:\n return 'free';\n case REQUEST_KIND.vacation:\n return 'vacation';\n case REQUEST_KIND.trade:\n return 'swap';\n case REQUEST_KIND.work:\n {\n if (this.isApproved) {\n return 'work_glad';\n } else if (this.isRejected) {\n return 'work_sad'\n }\n else {\n return 'work';\n }\n }\n }\n\n return 'work';\n }\n\n get isPost() {\n return this.kind === REQUEST_KIND.post;\n }\n\n get isRejected() {\n if (this.approved === null) {\n return this.employees.some(x => x.approved === false);\n }\n return this.approved == false\n }\n get isTrade() {\n if (this.employees.length <= 1)\n return false;\n let empIds = [];\n for (const srEmp of this.employees) {\n for (const srTask of srEmp.tasks) {\n if (srTask.scheduleTask !== null && !empIds.some(x => x === srTask.scheduleTask.empId)) {\n empIds.push(srTask.scheduleTask.empId);\n }\n }\n }\n\n return empIds.length > 1;\n }\n\n /** @returns {Date[]} */\n affectedScheduleInterval() {\n /** @type {Date} */\n let st;\n /** @type {Date} */\n let fi;\n for (const srEmp of this.employees) {\n for (const requestTask of srEmp.tasks) {\n if (requestTask.scheduleTask) {\n const t = requestTask.scheduleTask;\n if (!st || st < t.st) {\n st = t.st;\n }\n if (!fi || fi > t.fi) {\n fi = t.fi;\n }\n }\n }\n }\n if (st && fi) {\n return [getStartOfDay(st), getStartOfDay(fi)];\n }\n return [];\n }\n\n /**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} schedule\n */\n canBePicked(schedule) {\n if (this.approved !== null)\n return false;\n\n if (this.employees[0].employeeId === schedule.emp.id)\n return false;\n\n for (let index = 1; index < this.employees.length; index++) {\n if (this.employees[index].employeeId === null) {\n return this.possibleWithSchedule(schedule);\n }\n }\n\n return false;\n }\n get evaluate() {\n return this._evaluate\n }\n set evaluate(value) {\n this._evaluate = value\n }\n\n /**\n * @param {string} timezone\n * @returns {string[]}\n */\n getSelectionKeys(timezone) {\n const keys = [];\n const maxCount = this.approved === true ? 2 : this.employees.length;\n let count = 0;\n\n for (const srEmp of this.employees) {\n if (count >= maxCount) { break; }\n count += 1;\n if (srEmp.employeeId !== null) {\n for (const st of srEmp.starts) {\n const stLocal = getDateOfInstant(st, timezone);\n let d = 0;\n while (d < this.days) {\n const dt = d > 0 ? addDays(stLocal, d) : stLocal;\n const key = getSelectionKey(dt, srEmp.employeeId);\n if (!keys.includes(key)) { keys.push(key) }\n d++;\n }\n\n }\n }\n }\n return keys\n }\n\n canReopen() {\n return !this.isPending && !this.isOpen;\n }\n\n /**\n * @param {{ showSick: boolean; showVacation: boolean; showFree: boolean; showWork: boolean; showBasedOnSelection: boolean; showFuture: boolean; showHistoric: boolean; showPending: boolean; showApproved: boolean; showRejected: boolean;tagId: number }} filter\n * @param {Date} future\n * @param {number} selectedEmpId\n */\n isFilterOk(filter, future, selectedEmpId) {\n\n\n if (this.approved === null && !this.canReply()) {\n return false;\n }\n\n if (this.kind === REQUEST_KIND.sick) {\n if (!filter.showSick) { return false; }\n } else if (this.kind === REQUEST_KIND.vacation) {\n if (!filter.showVacation) { return false; }\n } else if (this.kind === REQUEST_KIND.free) {\n if (!filter.showFree) { return false; }\n } else if (this.kind === REQUEST_KIND.work || this.kind === REQUEST_KIND.trade || this.kind === REQUEST_KIND.post) {\n if (!filter.showWork) { return false; }\n }\n\n let okByDate = true\n let okBySelectedEmps = true\n if (filter.showBasedOnSelection) {\n okBySelectedEmps = false\n for (const srEmp of this.employees) {\n if (srEmp.employeeId === selectedEmpId) {\n okBySelectedEmps = true;\n break;\n }\n }\n }\n let okByTag= true\n if(filter.tagId>0){\n okByTag=false\n for (const srEmp of this.employees) {\n let tagList= [filter.tagId]\n let emp= useScheduleStore().employees.list.find(x => x.id==srEmp.employeeId)\n if (emp&&emp.hasAnyTag(tagList)) {\n okByTag=true\n }\n }\n };\n \n let dtRange = this.getDateRange()\n if (dtRange[0] > future && !filter.showFuture) { okByDate = false }\n if (dtRange[1] < getTimeNow() && !filter.showHistoric) { okByDate = false }\n\n let okByApproval = false;\n if (filter.showPending && this.isPending) { okByApproval = true }\n if (this.isApproved && filter.showApproved) { okByApproval = true }\n if (this.isRejected && filter.showRejected) { okByApproval = true }\n if (this.isOpen) { okByApproval = true }\n\n return okByApproval && okBySelectedEmps && okByDate&&okByTag;\n }\n\n /**\n * @private\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} schedule\n */\n possibleWithSchedule(schedule) {\n const di = schedule.dateInterval;\n const dt = di.byIndex ? di.byIndex(0).dtLocal : di.st;\n const employeeId = schedule.emp.id;\n for (const srEmp of this.employees) {\n if (srEmp.employeeId === employeeId || srEmp.employeeId === null) {\n let ok = false;\n if (di.byIndex) {\n for (const start of srEmp.starts) {\n if (start >= di.byIndex(0).dt && start < di.byIndex(1).dt) {\n ok = true;\n }\n }\n } else {\n for (const start of srEmp.starts) {\n if (start.getFullYear() === dt.getFullYear() && start.getMonth() === dt.getMonth() && start.getDate() === dt.getDate()) {\n ok = true;\n }\n }\n }\n\n if (!ok)\n return false;\n\n for (const srTask of srEmp.tasks) {\n for (const t of schedule.tasks) {\n if (t.overlaps(srTask.st, srTask.fi))\n return false;\n }\n }\n\n return true;\n }\n }\n\n return false;\n }\n /**\n * @param {string} key\n * @param {string} timezone\n */\n hasSelectionKey(key, timezone) {\n const maxCount = this.approved === true ? 2 : this.employees.length;\n let count = 0;\n for (const srEmp of this.employees) {\n if (count >= maxCount) { break; }\n count += 1;\n if (srEmp.employeeId !== null) {\n for (const st of srEmp.starts) {\n const stLocal = getDateOfInstant(st, timezone);\n let d = 0;\n while (d < this.days) {\n const dt = d > 0 ? addDays(stLocal, d) : stLocal;\n if (getSelectionKey(dt, srEmp.employeeId) === key)\n return true;\n d++;\n }\n }\n }\n }\n return false;\n }\n\n getDateRange() {\n let returnRange = [new Date(1970, 1, 1, 0, 0, 0, 0), new Date(2270, 1, 1, 0, 0, 0, 0)]\n for (const srEmp of this.employees) {\n for (const dt of srEmp.starts) {\n if (dt > returnRange[0]) { returnRange[0] = dt }\n const dtEnd = this.days > 1 ? addDays(dt, this.days - 1) : dt;\n if (dtEnd < returnRange[1]) { returnRange[1] = dtEnd }\n }\n }\n return returnRange\n }\n\n /** @private */\n clearPick() {\n if (this.kind === REQUEST_KIND.post) {\n const replyEmp = this.employees[1];\n replyEmp.employeeId = null;\n replyEmp.msg = '';\n replyEmp.numberOfStars = 0;\n }\n }\n\n /**\n * @param {import(\"@/shared/dn-task.js\").Task[]} scheduleTasks\n * @param {Set} affectedDates\n */\n approveToggle(scheduleTasks, affectedDates) {\n if (!this.isValid(scheduleTasks))\n return false;\n const revert = this.approved === true;\n if (revert) { this.clearPick(); }\n this.performChange(scheduleTasks, getTask, revert);\n this.addToAffectedDates(affectedDates);\n this.approved = revert ? null : true;\n this.evaluate = false;\n this.setPendingState();\n return true;\n }\n\n canEdit() {\n return this.isOpen && !this.isTrade;\n }\n\n /**\n * @param {number} index\n */\n getEmployeeIdByIndex(index) {\n return this.employees[index].employeeId;\n }\n\n /**\n * @param {number} index\n */\n getNumberOfStarsByIndex(index) {\n return this.employees[index].numberOfStars;\n }\n\n /**\n * @param {ScheduleRequestEmployee} picked\n */\n selectPickEmployee(picked) {\n const replyEmp = this.employees[1];\n replyEmp.employeeId = picked.employeeId;\n replyEmp.approved = true;\n replyEmp.msg = picked.msg;\n replyEmp.numberOfStars = picked.numberOfStars;\n }\n\n /**\n * @param {import(\"@/shared/dn-task.js\").Task[]} scheduleTasks\n * @param {Set} affectedDates\n */\n rejectToggle(scheduleTasks, affectedDates) {\n const revert = this.approved === false;\n if (this.approved === true) {\n if (!this.isValid(scheduleTasks))\n return false;\n this.clearPick();\n this.performChange(scheduleTasks, getTask, true);\n this.addToAffectedDates(affectedDates);\n }\n\n this.approved = revert ? null : false;\n this.evaluate = false\n this.setPendingState();\n return true;\n }\n\n async reopen() {\n await reopenScheduleRequest(this.id);\n this.approved = null;\n if (this.kind === REQUEST_KIND.post) {\n const replyEmp = this.employees[1];\n replyEmp.employeeId = null;\n replyEmp.msg = '';\n replyEmp.numberOfStars = 0;\n }\n const scheduleStore = useScheduleStore();\n await scheduleStore.refreshScheduleTasks();\n await scheduleStore.loadScheduleRequests(true);\n }\n\n /**\n * @param {import(\"@/shared/dn-task.js\").Task[] } scheduleTasks\n */\n isValid(scheduleTasks) {\n return this.employees.every(x => x.isValid(scheduleTasks));\n }\n\n /**\n * @private\n * @param {import(\"@/shared/dn-task.js\").Task[]} scheduleTasks\n * @param {(st: Date, fi: Date, ttid: number, empid: number) => import(\"@/shared/dn-task.js\").Task} createTask\n * @param {boolean} revert\n */\n performChange(scheduleTasks, createTask, revert = false) {\n for (const srEmp of this.employees) {\n if (revert)\n srEmp.revertChange();\n else\n srEmp.changedTasks = srEmp.performChange(scheduleTasks, createTask, this.days);\n }\n\n this.evaluate = false;\n }\n\n /**\n * @param {import(\"@/shared/dn-task.js\").Task[]} scheduleTasks\n */\n performChangeOnTasks(scheduleTasks) {\n if (!this.isValid(scheduleTasks))\n return false;\n for (const srEmp of this.employees) {\n srEmp.performChange(scheduleTasks, createTask, this.days);\n }\n\n return true;\n /**\n * @param {Date} st\n * @param {Date} fi\n * @param {number} ttid\n * @param {number} empid\n */\n function createTask(st, fi, ttid, empid) {\n let newTask = new Task({ empid, st, fi, tasktypeId: ttid });\n scheduleTasks.push(newTask);\n return newTask\n }\n }\n\n /**\n * @param {Map} taskTypeMap\n */\n getAffectedAffinities(taskTypeMap) {\n /** @type {Set} */\n const affinities = new Set();\n for (const srEmp of this.employees) {\n for (const requestTask of srEmp.tasks) {\n const tt = taskTypeMap.get(requestTask.tasktypeId);\n if (tt && tt.kind === TASK_KIND.task) {\n affinities.add(tt.affinity);\n }\n if (requestTask.scheduleTask && requestTask.scheduleTask.tasktypeId) {\n const tt = taskTypeMap.get(requestTask.scheduleTask.tasktypeId);\n if (tt && tt.kind === TASK_KIND.task) {\n affinities.add(tt.affinity);\n }\n }\n }\n }\n return affinities;\n }\n\n getAffectedDates() {\n /** @type {number[]} */\n const affectedDates = [];\n for (const srEmp of this.employees) {\n for (const requestTask of srEmp.tasks) {\n let dtTime = getStartOfDay(requestTask.st).getTime();\n if (!affectedDates.includes(dtTime))\n affectedDates.push(dtTime);\n dtTime = getStartOfDay(requestTask.fi).getTime();\n if (!affectedDates.includes(dtTime))\n affectedDates.push(dtTime);\n }\n }\n return affectedDates.map(x => new Date(x));\n }\n\n getAffectedIntervals() {\n /** @type {{st:number, fi:number}[]} */\n const intervals = [];\n for (const srEmp of this.employees) {\n for (const requestTask of srEmp.tasks) {\n intervals.push({ st: requestTask.st.getTime(), fi: requestTask.fi.getTime() })\n }\n }\n\n let i = 0;\n while (i < intervals.length - 1) {\n const interval1 = intervals[i];\n let j = i + 1;\n let modified = false;\n do {\n const interval2 = intervals[j];\n if (interval1.st < interval2.fi && interval1.fi > interval2.st) {\n interval1.st = Math.min(interval1.st, interval2.st);\n interval2.fi = Math.max(interval1.fi, interval2.fi);\n intervals.splice(j, 1);\n modified = true;\n break;\n }\n\n j += 1;\n } while (j < intervals.length);\n\n if (!modified)\n i += 1;\n }\n\n return intervals.map(x => { return { st: new Date(x.st), fi: new Date(x.fi) } });\n }\n\n /**\n * @private\n * @param {Set} affectedDates\n */\n addToAffectedDates(affectedDates) {\n for (const dt of this.getAffectedDates()) {\n affectedDates.add(getShortDate(dt));\n }\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n canDelete(employee = null) {\n if (this.canReply(employee)) {\n return false;\n }\n\n if (!employee) {\n return true;\n }\n\n if (this.employees[0].employeeId !== employee.id)\n return false;\n\n return this.approved === null;\n }\n\n canEvaluate() {\n return true;\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n canReply(employee = null) {\n if (this.approved !== null)\n return this.isPending;\n\n if (!employee) {\n if (this.kind === REQUEST_KIND.post) {\n return this.employees.length > 2;\n } else {\n for (const srEmp of this.employees) {\n if (!srEmp.approved) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n if (this.employees[0].employeeId === employee.id)\n return false;\n\n for (let index = 1; index < this.employees.length; index++) {\n if (this.employees[index].employeeId === employee.id || this.employees[index].employeeId === null) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * @param {boolean} approved\n * @param {{ id: number; }} employee\n */\n canReplyWithAnswerEmp(approved, employee) {\n if (this.kind === REQUEST_KIND.post) {\n for (const srEmp of this.employees) {\n if (srEmp.employeeId === employee.id) {\n return approved === false;\n }\n }\n return approved && this.approved === null;\n } else if (this.kind === REQUEST_KIND.trade) {\n return this.employees.some(x => x.approved !== approved && (x.employeeId === employee.id || x.employeeId === null));\n }\n\n return false;\n }\n\n async deleteRequest() {\n await deleteScheduleRequest(this);\n }\n\n /**\n * @param {number} employeeId\n */\n needsReply(employeeId) {\n if (this.approved !== null)\n return false;\n for (const srEmp of this.employees) {\n if (srEmp.employeeId === employeeId)\n return srEmp.approved === null;\n }\n\n return false;\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n getReplyObj(employee) {\n if (employee) {\n const srEmp = this.getEmployee(employee);\n return srEmp ? srEmp : new ScheduleRequestEmployee(employee.id, [], '', 0);\n } else {\n return this;\n }\n }\n\n /**\n * @param {{ id: number; }} employee\n */\n getEmployee(employee) {\n if (!employee)\n return null;\n\n return this.employees.find(x => x.employeeId === employee.id);\n }\n\n getMsgToDisplay() {\n const msg = this.employees[0].msg;\n if (msg)\n return msg;\n\n switch (this.kind) {\n case REQUEST_KIND.post:\n return 'posted shift';\n case REQUEST_KIND.sick:\n return 'sick';\n case REQUEST_KIND.free:\n return 'time off';\n case REQUEST_KIND.vacation:\n return 'vacation';\n case REQUEST_KIND.trade:\n return 'trade';\n }\n\n return 'work';\n }\n\n getReplyMsg() {\n return this.msg;\n }\n\n get employeesToDisplay() {\n if (this.employees.length <= 1 || this.isTrade)\n return this.employees;\n return [this.employees[1]];\n }\n\n pickEmployees() {\n return this.employees.slice(2);\n }\n\n /**\n * @param {ScheduleRequestEmployee} srEmp\n * @param {string} language\n * @param {string} timeZone\n */\n getTasksInfo(srEmp, language, timeZone) {\n const taskTypeMap = useDataStore().taskTypeMap;\n const dtFormat = new Intl.DateTimeFormat(language, { hour: 'numeric', minute: '2-digit', timeZone });\n\n let taskInfoList = [];\n if (this.employees.length > 1) {\n if (this.isTrade) {\n for (const srEmp2 of this.employees) {\n for (const t of srEmp2.tasks) {\n if (t.scheduleTask !== null && t.scheduleTask.empId === srEmp.employeeId) {\n const tt = taskTypeMap.get(t.tasktypeId);\n taskInfoList.push(getTaskString(t.scheduleTask.st, t.scheduleTask.fi, tt));\n }\n }\n }\n } else {\n for (const t of srEmp.tasks) {\n const tt = taskTypeMap.get(t.tasktypeId);\n taskInfoList.push(getTaskString(t.st, t.fi, tt));\n }\n }\n } else {\n for (const t of srEmp.tasks) {\n const tt = taskTypeMap.get(t.tasktypeId);\n if (t.scheduleTask !== null) {\n if (t.st.getTime() === t.fi.getTime()) {\n taskInfoList.push(getTaskString(t.scheduleTask.st, t.scheduleTask.fi, tt, false));\n } else if (tt.kind === TASK_KIND.break) {\n taskInfoList.push(getTaskString(t.scheduleTask.st, t.scheduleTask.fi, tt) + ' -> ' + getTaskString(t.st, t.fi, tt));\n } else {\n if (t.st.getTime() < t.scheduleTask.st.getTime()) {\n taskInfoList.push(getTaskString(t.st, t.scheduleTask.st, tt, true));\n } else if (t.st.getTime() > t.scheduleTask.st.getTime()) {\n taskInfoList.push(getTaskString(t.scheduleTask.st, t.st, tt, false));\n }\n\n if (t.fi.getTime() < t.scheduleTask.fi.getTime()) {\n taskInfoList.push(getTaskString(t.fi, t.scheduleTask.fi, tt, false));\n } else if (t.fi.getTime() > t.scheduleTask.fi.getTime()) {\n taskInfoList.push(getTaskString(t.scheduleTask.fi, t.fi, tt, true));\n }\n }\n } else {\n taskInfoList.push(getTaskString(t.st, t.fi, tt, true));\n }\n }\n }\n\n return taskInfoList;\n\n /**\n * @param {Date} st\n * @param {Date} fi\n * @param {import(\"@/shared/dn-tasktype.js\").TaskType} tt\n */\n function getTaskString(st, fi, tt, add = null) {\n let operation = '';\n if (add !== null) {\n operation = add ? '+ ' : '- ';\n }\n\n const opText = tt.name.substring(0, 2);\n if (tt.kind === TASK_KIND.break)\n return `${operation}${opText}: ${dtFormat.format(st)} (${getDurationInMinutes(st, fi)} min)`;\n return `${operation}${opText}: ${dtFormat.format(st)} - ${dtFormat.format(fi)}`;\n }\n }\n\n getApiReply() {\n const reply = { id: this.id, approved: this.approved, msg: this.msg };\n if (this.kind === REQUEST_KIND.post && this.approved) {\n const pickEmp = this.employees[1];\n reply.pick = { id: pickEmp.id, employeeId: pickEmp.employeeId, msg: pickEmp.msg, numberOfStars: pickEmp.numberOfStars };\n }\n return reply;\n }\n\n /**\n * @param {ScheduleRequest} other\n */\n needToBeRevertedBeforeUpdate(other) {\n if (!this.isPending || !this.isApproved)\n return false;\n\n for (const srEmp of this.employees) {\n const otherSREmp = other.employees.find(x => x.id === srEmp.id);\n if (otherSREmp.updated.getTime() !== srEmp.updated.getTime()) {\n if (srEmp.employeeId !== otherSREmp.employeeId || otherSREmp.approved !== srEmp.approved)\n return true;\n }\n }\n\n if (other.updated.getTime() !== this.updated.getTime()) {\n if (this.approved !== other.approved)\n return true;\n }\n\n return false;\n }\n\n /**\n * @param {import(\"@/model/dn-schedule-task.js\").ScheduleTasks} scheduleTasks\n * @param {import(\"@/shared/dn-tasktype.js\").TaskTypes} taskTypes\n * @param {import(\"@/shared/dn-employee.js\").Employee} employee\n * @param {boolean|null} approve\n * @param {{id:number;msg:string;numberOfStars?:number}} reply\n * @returns {Promise<{ok:boolean; affectedDates?:Set; toastMsg?:string}>}\n */\n async toggleApproval(scheduleTasks, taskTypes, employee, approve, reply) {\n if (employee) {\n return await this.sendReply(employee, approve, reply);\n }\n\n if (approve && this.kind === REQUEST_KIND.post && this.approved !== true) {\n if (this.employeeCount > 3) {\n EventBus.emit('selectScheduleRequestPick', this);\n return;\n }\n this.selectPickEmployee(this.employees[2]);\n }\n\n /** @type {Set} */\n const affectedDates = new Set();\n /** @type {boolean} */\n let ok;\n if (approve) {\n ok = this.approveToggle(scheduleTasks.list, affectedDates);\n } else {\n ok = this.rejectToggle(scheduleTasks.list, affectedDates);\n }\n\n return { ok, affectedDates };\n }\n\n /**\n * @private\n * @param {import(\"@/shared/dn-employee.js\").Employee} employee\n * @param {boolean|null} approved\n * @param {{id:number;msg:string;numberOfStars?:number;employeeId?:number;approved?:number}} reply\n */\n async sendReply(employee, approved, reply) {\n const srEmp = reply.id ? this.employees.find(x => x.id === reply.id) : reply;\n const isPick = this.kind === REQUEST_KIND.post;\n let toastMsg;\n if (isPick) {\n toastMsg = approved ? 'Shift picked' : 'Shift pick removed';\n } else {\n toastMsg = 'Trade has been ' + (approved ? 'accepted.' : 'rejected.');\n }\n\n let ok = true;\n try {\n let employeeId = employee.id;\n const data = { id: srEmp.id, kind: this.kind, employeeId: employeeId, approved: approved, msg: srEmp.msg, stars: srEmp.numberOfStars };\n await updateScheduleRequestEmployee(this.id, data);\n srEmp.employeeId = employeeId;\n srEmp.approved = approved;\n const scheduleStore = useScheduleStore();\n scheduleStore.loadScheduleRequests();\n if (approved && isPick)\n EventBus.emit(\"shiftPicked\");\n } catch (error) {\n toastMsg = 'Something went wrong.';\n ok = false;\n console.log(error);\n }\n return { toastMsg, ok };\n }\n\n /**\n * @param {ScheduleRequest} other\n */\n update(other) {\n if (other.id !== this.id)\n return;\n\n for (const srEmp of this.employees) {\n const otherSREmp = other.employees.find(x => x.id === srEmp.id);\n if (otherSREmp.updated.getTime() !== srEmp.updated.getTime()) {\n srEmp.approved = otherSREmp.approved;\n srEmp.numberOfStars = otherSREmp.numberOfStars;\n srEmp.employeeId = otherSREmp.employeeId;\n srEmp.msg = otherSREmp.msg;\n srEmp.updated = otherSREmp.updated;\n }\n }\n\n if (other.updated.getTime() !== this.updated.getTime()) {\n this.msg = other.msg;\n this.approved = other.approved;\n this.updated = other.updated;\n }\n }\n}\n\nexport class ScheduleRequestEmployee {\n\n /**\n * @param {number|null} employeeId\n * @param {ScheduleRequestTask[]} tasks\n * @param {string} msg\n * @param {number} numberOfStars\n */\n constructor(employeeId, tasks, msg, numberOfStars, approved = null, updated = undefined, id = undefined) {\n /** @type {number|null} */\n this.id = id;\n /** @type {number|null} */\n this.employeeId = employeeId;\n /** @type {Date | undefined} */\n this.updated = updated;\n /** @type {boolean | null} */\n this.approved = approved;\n /** @type {string} */\n this.msg = msg;\n /** @readonly @type {ScheduleRequestTask[]} */\n this.tasks = tasks;\n /** @type {number} */\n this.numberOfStars = numberOfStars;\n /** @readonly @type {Date[]} 1 or 2 elements. */\n this.starts = [];\n /** @type {import(\"@/shared/dn-task.js\").Task[]} */\n this.changedTasks = undefined;\n }\n\n revertChange() {\n for (const t of this.changedTasks) {\n if (t.id <0) {\n t.toDelete();\n } else {\n const requestTask = this.tasks.find(x => x.scheduleTask !== null && x.scheduleTask.id === t.id);\n t.resurrect();\n t.st = new Date(requestTask.scheduleTask.st);\n t.fi = new Date(requestTask.scheduleTask.fi);\n t.tasktypeId = requestTask.scheduleTask.tasktypeId;\n t.empid = requestTask.scheduleTask.empId;\n t.confirmChanges();\n }\n }\n\n this.changedTasks = undefined;\n }\n\n /**\n * @param {import(\"@/shared/dn-task.js\").Task[]} scheduleTasks\n */\n isValid(scheduleTasks) {\n for (const t of this.tasks) {\n if (t.scheduleTask !== null && !scheduleTasks.some(x => x.id === t.scheduleTask.id))\n return false;\n }\n return true;\n }\n\n /**\n * @param {import(\"@/shared/dn-task.js\").Task[]} scheduleTasks\n * @param {(st: Date, fi: Date, ttid: number, empid: number) => import(\"@/shared/dn-task.js\").Task} createTask\n * @param {number} days\n */\n performChange(scheduleTasks, createTask, days) {\n let changedTasks = [];\n for (let d = 0; d < days; d++) {\n for (const requestTask of this.tasks) {\n const st = d > 0 ? addDays(requestTask.st, d) : requestTask.st;\n const fi = d > 0 ? addDays(requestTask.fi, d) : requestTask.fi;\n let task;\n if (requestTask.scheduleTask === null) {\n task = createTask(st, fi, requestTask.tasktypeId, this.employeeId);\n } else {\n task = scheduleTasks.find(x => x.id === requestTask.scheduleTask.id);\n task.resurrect();\n task.st = new Date(st);\n task.fi = new Date(fi);\n task.tasktypeId = requestTask.tasktypeId;\n task.empid = this.employeeId;\n if (task.st.getTime() === task.fi.getTime()) {\n task.toDelete();\n }\n }\n\n changedTasks.push(task);\n }\n\n }\n\n return changedTasks;\n }\n}\n\nexport class ScheduleRequestTask {\n\n /**\n * @param {Date} st\n * @param {Date} fi\n * @param {number} tasktypeId\n * @param {null|ScheduleRequestScheduleTask} scheduleTask\n */\n constructor(st, fi, tasktypeId, scheduleTask = null) {\n /** @readonly @type {Date} */\n this.st = st;\n /** @readonly @type {Date} */\n this.fi = fi;\n /** @readonly @type {number} */\n this.tasktypeId = tasktypeId;\n /** @readonly @type {null|ScheduleRequestScheduleTask} */\n this.scheduleTask = scheduleTask;\n }\n}\n\nexport class ScheduleRequestScheduleTask {\n\n /**\n * @param {number} id\n * @param {number} empId,\n * @param {Date} st\n * @param {Date} fi\n * @param {number} tasktypeId\n */\n constructor(id, empId, st, fi, tasktypeId) {\n /** @readonly @type {number} */\n this.id = id;\n /** @readonly @type {number} */\n this.empId = empId;\n /** @readonly @type {Date} */\n this.st = st;\n /** @readonly @type {Date} */\n this.fi = fi;\n /** @readonly @type {number} */\n this.tasktypeId = tasktypeId;\n }\n}\n\n/**\n * @param {ScheduleRequest} scheduleRequest\n */\nasync function deleteScheduleRequest(scheduleRequest) {\n await fetchAndCheckJson(`schedule-request/${scheduleRequest.id}?updated=${scheduleRequest.updated.toISOString()}`, 'DELETE');\n}\n\n/**\n * @param {number[]} idList\n */\nexport async function deleteScheduleRequests(idList) {\n await fetchAndCheckJson(`schedule-request/0?list=${idList.join()}`, 'DELETE');\n}\n\n/**\n * @param {number} ccId\n * @param {number} employeeId\n * @param {boolean | undefined} onlyOpenRequests\n * @param {Date | undefined} st\n * @param {Date | undefined} fi\n * @return {Promise}\n */\nexport async function getScheduleRequest(ccId, employeeId = undefined, onlyOpenRequests = undefined, st = undefined, fi = undefined) {\n const employeeQuery = employeeId ? '&employeeId=' + employeeId : '';\n\n let openQuery = '';\n if (onlyOpenRequests)\n openQuery = '&open=1'\n\n let stQuery = '';\n if (st !== undefined)\n stQuery = '&st=' + st.toISOString();\n\n let fiQuery = '';\n if (fi != undefined)\n fiQuery = '&fi=' + fi.toISOString();\n\n return await fetchAndCheckJson(`schedule-request?ccId=${ccId}${employeeQuery}${openQuery}${stQuery}${fiQuery}`, 'GET').then(x => x.map(convertScheduleRequestFromApi));\n}\n\n/**\n * @param {number} id\n * @param {{id:number; kind:number; employeeId:number; approved: null|boolean; msg: string; stars: number}} data\n */\nasync function updateScheduleRequestEmployee(id, data) {\n await fetchAndCheckJson(`schedule-request/${id}`, 'PATCH', data);\n}\n\n/**\n * @param {number} id\n */\nasync function reopenScheduleRequest(id) {\n await fetchAndCheckJson(`schedule-request/${id}`, 'PATCH');\n}\n\n/**\n * @param {ScheduleRequest} scheduleRequest\n */\nexport async function patchScheduleRequestEdit(scheduleRequest) {\n await fetchAndCheckJson(`schedule-request/${scheduleRequest.id}?edit=1`, 'PATCH', convertScheduleRequestToApi(scheduleRequest));\n}\n\n/**\n * @param {ScheduleRequest} request\n * @return {Promise}\n */\nexport async function postScheduleRequest(request) {\n return await fetchAndCheckJson('schedule-request', 'POST', convertScheduleRequestToApi(request)).then(convertScheduleRequestFromApi);\n}\n\n/**\n * @param {ScheduleRequest[]} requests\n */\nexport async function postScheduleRequests(requests) {\n const data = requests.map(x => convertScheduleRequestToApi(x));\n return await fetchAndCheckJson('schedule-request?multiple=1', 'POST', data);\n}\n\n/**\n * @param {ScheduleRequest} r\n * @return {{approved:boolean|null; callCenterId:number; kind:number, days:number|null, msg:string, employees:{approved: boolean|null; employeeId:number;msg: string; stars: number;\n * tasks: ScheduleRequestTask[]}[]}}\n */\nfunction convertScheduleRequestToApi(r) {\n const employees = [];\n for (const re of r.employees) {\n employees.push({ approved: re.approved, employeeId: re.employeeId, msg: re.msg, stars: re.numberOfStars, tasks: re.tasks });\n }\n\n return { approved: r.approved, callCenterId: r.callCenterId, kind: r.kind, days: r.days, msg: r.msg, employees: employees };\n}\n\n/**\n * @param {{id:number; approved:boolean|null; kind: number, days:number|null; callCenterId:number; msg:string, created:string, updated:string,\n * employees:{id:number; approved: boolean|null; employeeId:number|null;msg: string; stars: number; updated: string;\n * tasks: { st:string, fi:string, tasktypeId:number, scheduleTask:null|{id:number, empId:number, st:string, fi:string, tasktypeId:number} }[]}[]}} r\n */\nfunction convertScheduleRequestFromApi(r) {\n const employees = [];\n for (const re of r.employees) {\n const tasks = [];\n for (const rt of re.tasks) {\n let scheduleTask = null;\n if (rt.scheduleTask) {\n scheduleTask = new ScheduleRequestScheduleTask(rt.scheduleTask.id, rt.scheduleTask.empId, new Date(rt.scheduleTask.st), new Date(rt.scheduleTask.fi), rt.scheduleTask.tasktypeId);\n }\n\n tasks.push(new ScheduleRequestTask(new Date(rt.st), new Date(rt.fi), rt.tasktypeId, scheduleTask));\n }\n\n employees.push(new ScheduleRequestEmployee(re.employeeId, tasks, re.msg, re.stars, re.approved, new Date(re.updated), re.id));\n }\n\n return new ScheduleRequest(employees, r.callCenterId, r.kind, r.days, r.msg, r.approved, r.id, new Date(r.created), new Date(r.updated));\n}\n\nexport const REQUEST_KIND = createRequestKindEnum();\n\nfunction createRequestKindEnum() {\n const enumObject = {\n unavailability: -3,\n availability: -2,\n pick: -1,\n work: 0,\n sick: 1,\n vacation: 2,\n post: 3,\n trade: 4,\n free: 5,\n isAvailabilityRequest: function (/** @type {number} */ kind) {\n return kind === this.availability || kind === this.unavailability;\n }\n };\n\n return Object.freeze(enumObject);\n}\n\n/**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} schedule\n * @param {Date} dt\n * @param {{ msg:string; stars:number; days:number|null; st: Date; fi: Date; }?} requestConfig\n */\nexport function createPostRequest(schedule, dt, requestConfig = undefined) {\n const original = getScheduleRequestBounds(schedule, dt)\n if (!requestConfig) {\n requestConfig = { msg: '', stars: 0, days: null, st: original.st, fi: original.fi };\n }\n const tasksToReduce = [];\n const publishedTasks = [];\n for (const t of original.tasks.concat(original.breaks)) {\n if (t.overlaps(original.st, original.fi)) {\n if (t.isContainedIn(original)) {\n publishedTasks.push(createScheduleRequestTask(t.st, t.fi, t));\n } else {\n const st = t.st < original.st ? original.st : t.st;\n const fi = t.fi > original.fi ? original.fi : t.fi;\n publishedTasks.push(new ScheduleRequestTask(st, fi, t.tasktypeId));\n\n const usedExistingTask = t.st < original.st;\n if (usedExistingTask) {\n tasksToReduce.push(createScheduleRequestTask(t.st, original.st, t));\n }\n\n if (t.fi > original.fi) {\n if (usedExistingTask) {\n tasksToReduce.push(new ScheduleRequestTask(original.fi, t.fi, t.tasktypeId));\n } else {\n tasksToReduce.push(createScheduleRequestTask(original.fi, t.fi, t));\n }\n }\n }\n }\n }\n\n return createRequestCommon(schedule, requestConfig, REQUEST_KIND.post, tasksToReduce, publishedTasks);\n}\n\n/**\n* @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} schedule\n* @param {{msg:string; stars:number; days:number|null; }} requestConfig\n* @param {number} requestKind\n* @param {ScheduleRequestTask[]} tasks\n* @param {ScheduleRequestTask[]|null} publishedTasks\n*/\nexport function createRequestCommon(schedule, requestConfig, requestKind, tasks, publishedTasks = null) {\n const employees = [];\n employees.push(new ScheduleRequestEmployee(schedule.emp.id, tasks, requestConfig.msg, requestConfig.stars, true));\n if (publishedTasks !== null) {\n employees.push(new ScheduleRequestEmployee(null, publishedTasks, '', 0));\n }\n\n return new ScheduleRequest(employees, schedule.emp.ccid, requestKind, requestConfig.days);\n}\n\n/**\n* @param {Date} st\n* @param {Date} fi\n* @param {import(\"@/shared/dn-task.js\").Task} t\n*/\nexport function createScheduleRequestTask(st, fi, t) {\n return new ScheduleRequestTask(st, fi, t.tasktypeId, new ScheduleRequestScheduleTask(t.id, t.empid, t.st, t.fi, t.tasktypeId));\n}\n\n/**\n* @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} employeeSchedule\n* @param {Date} dt\n*/\nexport function getScheduleRequestBounds(employeeSchedule, dt) {\n const shiftBounds = getShiftBounds(dt, employeeSchedule.tasks);\n const tasks = employeeSchedule.tasks.filter(t => t.st >= shiftBounds.st && t.st < shiftBounds.fi);\n sortDateIntervals(tasks);\n const breaks = employeeSchedule.breaks.filter(t => t.st >= shiftBounds.st && t.st < shiftBounds.fi);\n sortDateIntervals(breaks);\n const hasShift = shiftBounds.fi > shiftBounds.st;\n if (!hasShift) {\n shiftBounds.st = new Date(dt);\n shiftBounds.st.setMinutes(employeeSchedule.emp.absenceStart());\n shiftBounds.fi = new Date(shiftBounds.st.getTime() + employeeSchedule.emp.absenceDuration * 60000);\n }\n\n return { hasShift, st: shiftBounds.st, fi: shiftBounds.fi, tasks, breaks };\n}\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { fromISODate, toISODate } from '@/shared/dn-shared-helper.js';\n\nfunction createSettingsColumnsEnum() {\n const enumObject = {\n delete: 1,\n number: 2,\n date: 3,\n department: 4,\n cc: 5,\n text: 6,\n payrollRuleKind: 7,\n payrollRuleWeekLimit: 9,\n timeOfDay: 11,\n forecastMethod:12,\n checkbox: 13,\n };\n\n return Object.freeze(enumObject);\n}\n\nexport const SETTINGS_COLUMN_KIND = createSettingsColumnsEnum();\n\nfunction createSettingsDetailEnum() {\n const enumObject = {\n breakSetting: 1,\n callGroup: 2,\n bo: 3,\n payrollRule: 4,\n };\n\n return Object.freeze(enumObject);\n}\n\nexport const SETTINGS_DETAIL_KIND = createSettingsDetailEnum();\n\n/**\n* @typedef {{key:string; value:number}} SettingDto\n*/\n\nexport async function getSettings() {\n /** @type {SettingDto[]} */\n const rows = await fetchAndCheckJson(`settings`, 'GET');\n return rows;\n}\n\n/**\n * @param {SettingDto[]} data\n */\nexport async function postSettings(data) {\n if (data.length === 0) { return; }\n await fetchAndCheckJson(`settings`, 'POST', data);\n}\n\n/**\n * @param {boolean} value\n */\nexport async function saveReportCalendarDays(value) {\n await postSettings([{ key: GENERAL_SETTINGS.reportCalendarDays, value: value ? 1 : 0 }])\n}\n\n/**\n * @param {boolean} value\n */\nexport async function saveReportCsvSemicolon(value) {\n await postSettings([{ key: GENERAL_SETTINGS.reportCsvSemicolon, value: value ? 1 : 0 }])\n}\n\n/**\n * @param {number} value\n */\nexport async function savenumHoursWeeklyOvertime(value) {\n await postSettings([{ key: GENERAL_SETTINGS.numHoursWeeklyOvertime, value: value}])\n}\n\n/**\n * @param {boolean} value\n */\nexport async function saveWeekendAsHoliday(value) {\n await postSettings([{ key: GENERAL_SETTINGS.weekendAsHoliday, value: value ? 1 : 0}])\n}\n\nexport const GENERAL_SETTINGS = createGeneralSettingsEnum();\n\nfunction createGeneralSettingsEnum() {\n const enumObject = {\n historicWeeks: 'historicWeeks',\n forecastWeeks: 'forecastWeeks',\n numberOfHistoricSpecialDays: 'numberOfHistoricSpecialDays',\n occupacyFte: 'occupacyFte',\n adherancePercent: 'adherancePercent',\n percentOfAbandonsToInclude: 'percentOfAbandonsToInclude',\n adherenceBase: 'adherenceBase',\n graceMinutes: 'graceMinutes',\n adherenceLimit: 'adherenceLimit',\n overTargetFactor: 'overTargetFactor',\n closeGaps: 'closeGaps',\n noShiftsOutsideTarget: 'noShiftsOutsideTarget',\n reportCalendarDays: 'reportCalendarDays',\n reportCsvSemicolon:'reportCsvSemicolon',\n unScheduledBreakMinutes:'unScheduledBreakMinutes',\n numHoursWeeklyOvertime: 'numHoursWeeklyOvertime',\n weekendAsHoliday: 'weekendAsHoliday'\n };\n\n return Object.freeze(enumObject);\n}\n\nexport const GENERAL_EMPAPP_SETTINGS = createGeneralEmpSettingsEnum();\n/* ADDED ALLREQUESTSDISABLED */\nfunction createGeneralEmpSettingsEnum() {\n const enumObject = {\n publishingWeekDay: 'publishingWeekDay',\n publishingNumberOfDays: 'publishingNumberOfDays',\n publishingFixedDateMs: 'publishingFixedDateMs',\n allRequestsDisabled: 'allRequestsDisabled',\n requestClosedNumberOfDays: 'requestClosedNumberOfDays',\n requestvaccationClosedNumberOfDays: 'requestvaccationClosedNumberOfDays',\n sickRequestDisabled: 'sickRequestDisabled',\n tradeDisabled: 'tradeDisabled',\n hideTeamSchedule: 'hideTeamSchedule',\n showOnlyOwnTeam: 'showOnlyOwnTeam',\n weekStartDay: 'weekStartDay',\n statsPayrollCodes:'statsPayrollCodes',\n statsAdherence:'statsAdherence',\n statsDetailedAdherence:'statsDetailedAdherence',\n statsPayrollCodesPublishingNumberOfDays:'statsPayrollCodesPublishingNumberOfDays',\n };\n\n return Object.freeze(enumObject);\n}\n\nexport class GeneralOptions {\n constructor(forecastSetting, adherenceSetting, historicWeeks, forecastWeeks, numberOfHistoricSpecialDays, occupacyFte, \n adherancePercent, percentOfAbandonsToInclude, adherenceBase, graceMinutes, unScheduledBreakMinutes, \n adherenceLimit, numHoursWeeklyOvertime, weekendAsHoliday, closeGaps) {\n if (forecastSetting && adherenceSetting) {\n this._historicWeeks = forecastSetting.historicWeeks\n this._forecastWeeks = forecastSetting.forecastWeeks\n this._numberOfHistoricSpecialDays = forecastSetting.numberOfHistoricSpecialDays\n this._occupacyFte = forecastSetting.occupacyFte\n this._adherancePercent = forecastSetting.adherancePercent\n this._percentOfAbandonsToInclude = forecastSetting.percentOfAbandonsToInclude\n this._adherenceBase = adherenceSetting.adherenceBase\n this._graceMinutes = adherenceSetting.graceMinutes\n this._unScheduledBreakMinutes = adherenceSetting.unScheduledBreakMinutes\n this._closeGaps = adherenceSetting.closeGaps\n this._adherenceLimit = adherenceSetting.adherenceLimit\n this._numHoursWeeklyOvertime = adherenceSetting.numHoursWeeklyOvertime\n this._weekendAsHoliday = adherenceSetting.weekendAsHoliday\n }\n else {\n /** @private @type {number} */\n this._historicWeeks = historicWeeks;\n /** @private @type {number} */\n this._forecastWeeks = forecastWeeks;\n /** @private @type {number} */\n this._numberOfHistoricSpecialDays = numberOfHistoricSpecialDays;\n /** @private @type {number} */\n this._occupacyFte = occupacyFte;\n /** @private @type {number} */\n this._adherancePercent = adherancePercent;\n /** @private @type {number} */\n this._percentOfAbandonsToInclude = percentOfAbandonsToInclude;\n /** @private @type {number} */\n this._adherenceBase = adherenceBase;\n /** @private @type {number} */\n this._graceMinutes = graceMinutes;\n /** @private @type {number} */\n this._unScheduledBreakMinutes = unScheduledBreakMinutes;\n /** @private @type {number} */\n this._closeGaps = closeGaps;\n /** @private @type {number} */\n this._adherenceLimit = adherenceLimit;\n /** @private @type {number} */\n this._numHoursWeeklyOvertime = numHoursWeeklyOvertime;\n /** @private @type {boolean} */\n this._weekendAsHoliday = weekendAsHoliday;\n }\n /** @private @type {boolean} */\n this._hasChangesForecast = false;\n this._hasChangesAdherence = false;\n }\n\n get historicWeeks() {\n return this._historicWeeks\n }\n set historicWeeks(newValue) {\n if (this._historicWeeks !== newValue) {\n this._historicWeeks = newValue;\n this._hasChangesForecast = true;\n }\n }\n\n get forecastWeeks() {\n return this._forecastWeeks\n }\n set forecastWeeks(newValue) {\n if (this._forecastWeeks !== newValue) {\n this._forecastWeeks = newValue;\n this._hasChangesForecast = true;\n }\n }\n\n get numberOfHistoricSpecialDays() {\n return this._numberOfHistoricSpecialDays\n }\n set numberOfHistoricSpecialDays(newValue) {\n if (this._numberOfHistoricSpecialDays !== newValue) {\n this._numberOfHistoricSpecialDays = newValue;\n this._hasChangesForecast = true;\n }\n }\n\n get occupacyFte() {\n return this._occupacyFte\n }\n set occupacyFte(newValue) {\n if (this._occupacyFte !== newValue) {\n this._occupacyFte = newValue\n this._hasChangesForecast = true\n }\n }\n\n get adherancePercent() {\n return this._adherancePercent\n }\n set adherancePercent(newValue) {\n if (this._adherancePercent !== newValue) {\n this._adherancePercent = newValue\n this._hasChangesForecast = true\n }\n }\n\n get percentOfAbandonsToInclude() {\n return this._percentOfAbandonsToInclude\n }\n set percentOfAbandonsToInclude(newValue) {\n if (this._percentOfAbandonsToInclude !== newValue) {\n this._percentOfAbandonsToInclude = newValue\n this._hasChangesForecast = true\n }\n }\n\n get adherenceBase() {\n return this._adherenceBase\n }\n set adherenceBase(newValue) {\n if (this._adherenceBase !== newValue) {\n this._adherenceBase = newValue\n this._hasChangesAdherence = true\n }\n }\n\n get graceMinutes() {\n return this._graceMinutes\n }\n set graceMinutes(newValue) {\n if (this._graceMinutes !== newValue) {\n this._graceMinutes = newValue\n this._hasChangesAdherence = true\n }\n }\n\n get unScheduledBreakMinutes() {\n return this._unScheduledBreakMinutes\n }\n set unScheduledBreakMinutes(newValue) {\n if (this._unScheduledBreakMinutes !== newValue) {\n this._unScheduledBreakMinutes = newValue\n this._hasChangesAdherence = true\n }\n }\n\n get closeGaps() {\n return this._closeGaps\n }\n set closeGaps(newValue) {\n if (this._closeGaps !== newValue) {\n this._closeGaps = newValue\n this._hasChangesAdherence = true\n }\n }\n\n get adherenceLimit() {\n return this._adherenceLimit\n }\n set adherenceLimit(newValue) {\n if (this._adherenceLimit !== newValue) {\n this._adherenceLimit = newValue\n this._hasChangesAdherence = true\n }\n }\n\n get hasChanges() {\n return this._hasChangesForecast || this._hasChangesAdherence\n }\n\n get hasChangesForecast() {\n return this._hasChangesForecast\n }\n\n get hasChangesAdherence() {\n return this._hasChangesAdherence\n }\n confirmChanges() {\n this._hasChangesForecast = false\n this._hasChangesAdherence = false\n }\n\n get numHoursWeeklyOvertime() {\n return this._numHoursWeeklyOvertime\n }\n set numHoursWeeklyOvertime(newValue) {\n if (this._numHoursWeeklyOvertime !== newValue) {\n this._numHoursWeeklyOvertime = newValue\n }\n }\n\n get weekendAsHoliday() {\n return this._weekendAsHoliday\n }\n set weekendAsHoliday(newValue) {\n if (this._weekendAsHoliday !== newValue) {\n this._weekendAsHoliday = newValue\n }\n }\n\n}\n\nexport class GeneralEmpAppSettings {\n /**\n * @param {{ publishingWeekDay: number; publishingNumberOfDays: number; requestClosedNumberOfDays: number; requestvaccationClosedNumberOfDays: number\n * ; sickRequestDisabled: boolean; weekStartDay: number; publishingFixedDate: Date; allRequestsDisabled: boolean; tradeDisabled: boolean; hideTeamSchedule: boolean; showOnlyOwnTeam: boolean\n * ;statsPayrollCodes:boolean; statsAdherence:boolean; statsDetailedAdherence:boolean; statsPayrollCodesPublishingNumberOfDays:number }} setting\n */\n constructor(setting) {\n\n /** @private @type {number} */\n this._publishingWeekDay = setting.publishingWeekDay\n\n /** @private @type {number} */\n this._publishingNumberOfDays = setting.publishingNumberOfDays\n\n /** @private @type {Date} */\n this._publishingFixedDate = setting.publishingFixedDate\n\n /** @private @type {Boolean} */\n this._usePublishFixedDate = false\n if(setting.publishingFixedDate){this._usePublishFixedDate = true}\n\n /** @private @type {boolean} */\n this._allRequestsDisabled = setting.allRequestsDisabled\n\n /** @private @type {number} */\n this._requestClosedNumberOfDays = setting.requestClosedNumberOfDays\n\n /** @private @type {number} */\n this._requestvaccationClosedNumberOfDays = setting.requestvaccationClosedNumberOfDays\n\n /** @private @type {boolean} */\n this._sickRequestDisabled = setting.sickRequestDisabled\n\n /** @private @type {boolean} */\n this._tradeDisabled = setting.tradeDisabled\n\n /** @private @type {boolean} */\n this.hideTeamSchedule = setting.hideTeamSchedule\n\n /** @private @type {boolean} */\n this.statsPayrollCodes = setting.statsPayrollCodes\n\n /** @private @type {boolean} */\n this.statsAdherence = setting.statsAdherence\n\n /** @private @type {boolean} */\n this.statsDetailedAdherence = setting.statsDetailedAdherence\n\n /** @private @type {number} */\n this.statsPayrollCodesPublishingNumberOfDays = setting.statsPayrollCodesPublishingNumberOfDays\n\n /** @private @type {boolean} */\n this._showOnlyOwnTeam = setting.showOnlyOwnTeam\n\n /** @private @type {number} */\n this._weekStartDay = setting.weekStartDay\n\n /** @private @type {boolean} */\n this._hasChanges = false;\n }\n\n get publishingWeekDay() {\n return this._publishingWeekDay\n }\n set publishingWeekDay(newValue) {\n if (this._publishingWeekDay !== newValue) {\n this._publishingWeekDay = newValue\n this._hasChanges = true\n }\n }\n\n get publishingNumberOfDays() {\n return this._publishingNumberOfDays\n }\n set publishingNumberOfDays(newValue) {\n if (this._publishingNumberOfDays !== newValue) {\n this._publishingNumberOfDays = newValue\n this._hasChanges = true\n }\n }\n\n get publishingFixedDate() {\n return this._publishingFixedDate\n }\n set publishingFixedDate(newValue) {\n if (this._publishingFixedDate !== newValue) {\n this._publishingFixedDate = newValue\n this._hasChanges = true\n }\n }\n\n set publishingFixedDateNoChange(newValue) {\n this._publishingFixedDate = newValue\n }\n\n get usePublishFixedDate() {\n return this._usePublishFixedDate \n }\n set usePublishFixedDate(newValue) {\n if (this._usePublishFixedDate !== newValue) {\n this._usePublishFixedDate = newValue\n this._hasChanges = true\n }\n }\n\n get allRequestsDisabled() {\n return this._allRequestsDisabled\n }\n set allRequestsDisabled(newValue) {\n if (this._allRequestsDisabled !== newValue) {\n this._allRequestsDisabled = newValue\n this._hasChanges = true\n }\n }\n\n get requestClosedNumberOfDays() {\n return this._requestClosedNumberOfDays\n }\n set requestClosedNumberOfDays(newValue) {\n if (this._requestClosedNumberOfDays !== newValue) {\n this._requestClosedNumberOfDays = newValue\n this._hasChanges = true\n }\n }\n\n get requestvaccationClosedNumberOfDays() {\n return this._requestvaccationClosedNumberOfDays\n }\n set requestvaccationClosedNumberOfDays(newValue) {\n if (this._requestvaccationClosedNumberOfDays !== newValue) {\n this._requestvaccationClosedNumberOfDays = newValue\n this._hasChanges = true\n }\n }\n\n get sickRequestDisabled() {\n return this._sickRequestDisabled\n }\n set sickRequestDisabled(newValue) {\n if (this._sickRequestDisabled !== newValue) {\n this._sickRequestDisabled = newValue\n this._hasChanges = true\n }\n }\n\n get tradeDisabled() {\n return this._tradeDisabled\n }\n set tradeDisabled(newValue) {\n if (this._tradeDisabled !== newValue) {\n this._tradeDisabled = newValue\n this._hasChanges = true\n }\n }\n\n get hideTeamSchedule() {\n return this._hideTeamSchedule\n }\n set hideTeamSchedule(newValue) {\n if (this._hideTeamSchedule !== newValue) {\n this._hideTeamSchedule = newValue\n this._hasChanges = true\n }\n }\n\n get statsPayrollCodes() {\n return this._statsPayrollCodes\n }\n set statsPayrollCodes(newValue) {\n if (this._statsPayrollCodes !== newValue) {\n this._statsPayrollCodes = newValue\n this._hasChanges = true\n }\n }\n\n get statsAdherence() {\n return this._statsAdherence\n }\n set statsAdherence(newValue) {\n if (this._statsAdherence !== newValue) {\n this._statsAdherence = newValue\n this._hasChanges = true\n }\n }\n\n get statsDetailedAdherence() {\n return this._statsDetailedAdherence\n }\n set statsDetailedAdherence(newValue) {\n if (this._statsDetailedAdherence !== newValue) {\n this._statsDetailedAdherence = newValue\n this._hasChanges = true\n }\n }\n\n get statsPayrollCodesPublishingNumberOfDays() {\n return this._statsPayrollCodesPublishingNumberOfDays\n }\n set statsPayrollCodesPublishingNumberOfDays(newValue) {\n if (this._statsPayrollCodesPublishingNumberOfDays !== newValue) {\n this._statsPayrollCodesPublishingNumberOfDays = newValue\n this._hasChanges = true\n }\n }\n\n get showOnlyOwnTeam() {\n return this._showOnlyOwnTeam\n }\n set showOnlyOwnTeam(newValue) {\n if (this._showOnlyOwnTeam !== newValue) {\n this._showOnlyOwnTeam = newValue\n this._hasChanges = true\n }\n }\n\n get weekStartDay() {\n return this._weekStartDay;\n }\n set weekStartDay(newValue) {\n if (this._weekStartDay !== newValue) {\n this._weekStartDay = newValue\n this._hasChanges = true\n }\n }\n\n get hasChanges() {\n return this._hasChanges\n }\n confirmChanges() { this._hasChanges = false }\n}\n\nexport class HolidaySettings{\n /**\n * @param {number} id\n * @param {Date} date\n * @param {string} description\n */\n constructor(id, date, description) {\n /** @private @type {number} */\n this._id = id;\n /** @private @type {Date} */\n this._date = date;\n /** @private @type {string} */\n this._description = description;\n /** @private @type {boolean} */\n this._hasChanges = false;\n /** @private @type {boolean} */\n this._isToDelete = false;\n }\n\n get id(){\n return this._id\n }\n\n get date() {\n return this._date\n }\n\n set date(newValue) {\n this._date = newValue;\n this._hasChanges = true;\n }\n\n get description() {\n return this._description\n }\n\n set description(newValue) {\n this._description = newValue;\n this._hasChanges = true;\n }\n\n get hasChanges() {\n return this._hasChanges\n }\n confirmChanges(){this._hasChanges=false}\n\n get isToDelete() {\n return this._isToDelete\n }\n\n toDelete() {\n this._isToDelete = true\n }\n\n}\n\nexport async function getHolidays() {\n /** @type {{id:number;date:string;description:string}[]} */\n const result = await fetchAndCheckJson(`holiday`, 'GET');\n const holidays = result.map(x => new HolidaySettings(x.id, fromISODate(x.date),x.description));\n return holidays;\n}\n\n\n/**\n * @param {HolidaySettings[]} holidays\n */\nexport async function saveHolidays(holidays) {\n return new Promise((resolve) => {\n let itemsToDelete = []\n let promesis = []\n for (let i = 0; i < holidays.length; i++) {\n const holiday = holidays[i];\n if (holiday.isToDelete) {\n promesis.push(fetchAndCheckJson(`holiday/${holiday.id}`, 'DELETE'))\n itemsToDelete.push(holiday)\n } else if (holidays[i].hasChanges) {\n if (holidays[i].id == -1) {\n promesis.push(fetchAndCheckJson(`holiday`, 'POST', { date: toISODate(holiday.date), description: holiday.description }));\n } else {\n promesis.push(fetchAndCheckJson(`holiday/${holiday.id}`, 'PUT', { date: toISODate(holiday.date), description: holiday.description }));\n }\n holiday.confirmChanges();\n }\n }\n for (let i = 0; i < itemsToDelete.length; i++) {\n var index = holidays.indexOf(itemsToDelete[i]);\n holidays.splice(index, 1);\n }\n Promise.all(promesis).then(() => {\n resolve(holidays);\n }).catch(error => {\n console.error(error.message)\n });\n });\n}","import { getBreakSettingsMinWork, getBreakSettingsMaxWork } from '@/model/dn-break-settings.js';\nimport { TASK_KIND } from '@/shared/dn-tasktype.js';\n\n/**\n* @typedef {{maxDurQ:number; maxWorkMinutes:number; minStMinute:number; maxFiMinute:number; minStQ:number; maxFiQ:number; unavailabilites:{stQ:number;fiQ:number}[]\n* }} DayBounds\n*/\n\n/**\n * @typedef {{id?:number; automaticBreaks?:boolean; openForBO?: boolean;\n * fixTasks: null|{st:number, dur:number, taskTypeId:number}[];\n * flexTasks: null|{taskTypeId:number, st:number|null, stSpan:number|null, fi:number|null, fiSpan:number|null, dur:number|null, durSpan:number|null, step:number|null, kind:number}[]\n * }} ShiftDto Flex shift unit is quarter hours fix shift in minutes.\n*/\n\nexport class Shift {\n /**\n * All units in quarter hours\n * @param {ShiftDto} data\n */\n constructor(data) {\n /** @type {number|null} */\n this.id = data.id;\n /** @private @type {boolean|null} */\n this._automaticBreaks = data.automaticBreaks !== undefined ? data.automaticBreaks : null;\n /** @private @type {boolean|null} */\n this._openForBO = data.openForBO !== undefined ? data.openForBO : null;\n /** @private @type {{st:number, dur:number, taskTypeId:number}[]} */\n this._fixTasks = [];\n if (data.fixTasks) {\n for (const t of data.fixTasks) {\n this._fixTasks.push({ st: t.st, dur: t.dur, taskTypeId: t.taskTypeId });\n }\n }\n /** @private @type {number} */\n this._stMin = 0;\n /** @private @type {number} */\n this._stMax = 0;\n /** @private @type {number} */\n this._fiMin = 0;\n /** @private @type {number} */\n this._fiMax = 0;\n /** @private @type {number} */\n this._durMin = 0;\n /** @private @type {number} */\n this._durMax = 0;\n /** @private @type {number} */\n this._step = 1;\n /** @type {number|null} */\n this.taskTypeId = null;\n /** @type {number|null} */\n this.taskType2Id = null;\n /** @type {number} */\n this.dur2Min = 0;\n /** @type {number} */\n this.dur2Max = 0;\n\n if (data.flexTasks) {\n for (const flexTask of data.flexTasks) {\n if (flexTask.kind === 0) {\n this.taskTypeId = flexTask.taskTypeId;\n if (flexTask.st !== null) { this._stMin = flexTask.st; }\n if (flexTask.stSpan !== null) { this._stMax = this.stMin + flexTask.stSpan; }\n if (flexTask.fi !== null) { this._fiMin = flexTask.fi; }\n if (flexTask.fiSpan !== null) { this._fiMax = this.fiMin + flexTask.fiSpan; }\n if (flexTask.dur !== null) { this._durMin = flexTask.dur; }\n if (flexTask.durSpan !== null) { this._durMax = this.durMin + flexTask.durSpan; }\n if (flexTask.step !== null) { this._step = flexTask.step; }\n } else {\n this.taskType2Id = flexTask.taskTypeId;\n if (flexTask.dur !== null) { this.dur2Min = flexTask.dur; }\n if (flexTask.durSpan !== null) { this.dur2Max = this.dur2Min + flexTask.durSpan; }\n }\n }\n }\n\n /** @type {boolean} */\n this.hasTask2 = this.taskType2Id > 0\n /** @type {boolean} */\n this.flexSt = this.stMin !== this.stMax\n /** @type {boolean} */\n this.flexFi = this.fiMin !== this.fiMax\n /** @type {boolean} */\n this.flexDur = this.durMin !== this.durMax\n /** @type {boolean} */\n this.isFix = this.fixTasks.length !== 0;\n }\n\n get automaticBreaks() {\n if (!this.isFix) { return true; }\n return this._automaticBreaks === true;\n }\n\n set automaticBreaks(value) {\n this.setValue('_automaticBreaks', value);\n }\n\n get openForBO() {\n if (this.isFix) { return false; }\n return this._openForBO === true;\n }\n\n set openForBO(value) {\n this.setValue('_openForBO', value);\n }\n\n get fixTasks() {\n return this._fixTasks;\n }\n\n set fixTasks(value) {\n let hasChanged = value.length !== this._fixTasks.length;\n if (!hasChanged) {\n for (let i = 0; i < value.length; i++) {\n const t = value[i];\n const t2 = this._fixTasks[i];\n if (t.st !== t2.st || t.dur !== t2.dur || t.taskTypeId !== t2.taskTypeId) {\n hasChanged = true;\n break;\n }\n }\n }\n if (hasChanged) {\n this.setValue('_fixTasks', value);\n this._fixShift = undefined;\n }\n }\n\n get stMin() {\n return this._stMin;\n }\n set stMin(value) {\n this.setValue('_stMin', value);\n }\n\n get stMax() {\n return this._stMax;\n }\n set stMax(value) {\n this.setValue('_stMax', value);\n }\n\n get fiMin() {\n return this._fiMin;\n }\n set fiMin(value) {\n this.setValue('_fiMin', value);\n }\n\n get fiMax() {\n return this._fiMax;\n }\n set fiMax(value) {\n this.setValue('_fiMax', value);\n }\n\n get durMin() {\n return this._durMin;\n }\n set durMin(value) {\n this.setValue('_durMin', value);\n }\n\n get durMax() {\n return this._durMax;\n }\n set durMax(value) {\n this.setValue('_durMax', value);\n }\n\n get step() {\n return this._step;\n }\n set step(value) {\n this.setValue('_step', value);\n }\n\n /**\n * @protected\n * @param {string} prop\n * @param {any} value\n */\n setValue(prop, value) {\n if (value !== this[prop]) {\n /** @type {boolean} */\n this.hasChanges = true;\n this[prop] = value;\n }\n }\n\n /**\n * @param {Map} taskTypeMap\n */\n getFixShift(taskTypeMap) {\n if (!this._fixShift) {\n let paidWorkMinutes = 0;\n const breaks = [];\n const tasks = [];\n /** @type {{st:number;fi:number}[]} */\n const shiftBoundMinutes = [];\n let stMinute = 1440;\n let fiMinute = 0;\n let durMinutes = 0;\n for (const t of this.fixTasks) {\n const taskFiMinute = t.st + t.dur;\n durMinutes += t.dur;\n if (t.st < stMinute) { stMinute = t.st; }\n if (taskFiMinute > fiMinute) { fiMinute = taskFiMinute; }\n const tt = taskTypeMap.get(t.taskTypeId);\n const task = {\n stMinute: t.st,\n durMinute: t.dur,\n st: Math.round(t.st / 15),\n fi: Math.round(taskFiMinute / 15),\n tasktypeId: t.taskTypeId,\n workFactor: tt.work / 100,\n }\n\n if (tt.kind === TASK_KIND.break) {\n if (!tt.paidBreak) {\n paidWorkMinutes -= t.dur;\n }\n breaks.push(task);\n } else if (tt.kind === TASK_KIND.task) {\n paidWorkMinutes += t.dur;\n tasks.push(task);\n if (shiftBoundMinutes.length === 0 || shiftBoundMinutes[shiftBoundMinutes.length-1].fi !== t.st) {\n shiftBoundMinutes.push({st:t.st, fi:taskFiMinute});\n } else {\n shiftBoundMinutes[shiftBoundMinutes.length-1].fi = taskFiMinute;\n }\n }\n }\n\n const stMin = Math.round(stMinute / 15);\n const fiMax = Math.round(fiMinute / 15);\n\n /** @type {{st:number; fi:number; ttId:number; workFactor:number}[]} */\n const tasksWithoutBreaks = [];\n for (const t of tasks) {\n let nextSt = t.st;\n do {\n let st = nextSt;\n let fi = t.fi;\n for (const b of breaks) {\n if (b.fi > st && b.st < fi) {\n fi = b.st\n nextSt = b.fi;\n }\n }\n if (st < fi) {\n tasksWithoutBreaks.push({ st, fi, ttId: t.tasktypeId, workFactor: t.workFactor })\n if (nextSt < fi) {\n break;\n }\n }\n } while (nextSt < t.fi);\n }\n\n /** @private */\n this._fixShift = {\n paidWorkMinutes: paidWorkMinutes,\n tasks,\n breaks,\n stMinute,\n fiMinute,\n stMin,\n fiMax,\n durMinutes,\n shiftBoundMinutes,\n tasksWithoutBreaks,\n };\n }\n\n return this._fixShift;\n }\n\n /**\n * @param {number} value\n */\n isAllowedEnd(value) {\n if (value + 1 < this.fiMin)\n return false;\n\n if (this.step === 1)\n return true;\n\n return (1 + value - this.stMin) % this.step === 0;\n }\n\n get isEmpty() {\n if (this.isFix) {\n return this.fixTasks.length === 0;\n }\n return this.fiMax <= this.stMin;\n }\n\n /**\n * @param {DayBounds} dayBounds\n * @param {Map} taskTypeMap\n */\n isDayBoundsOk(dayBounds, taskTypeMap) {\n if (this.isFix) {\n const fixShift = this.getFixShift(taskTypeMap);\n if (this.automaticBreaks) {\n if (fixShift.durMinutes > dayBounds.maxDurQ * 15) { return false; }\n } else {\n if (fixShift.paidWorkMinutes > dayBounds.maxWorkMinutes) { return false; }\n }\n \n if (fixShift.stMinute < dayBounds.minStMinute) { return false; }\n if (fixShift.fiMinute > dayBounds.maxFiMinute) { return false; }\n for (const unavailability of dayBounds.unavailabilites) {\n for (const t of fixShift.tasks) {\n if (t.st < unavailability.fiQ && t.fi > unavailability.stQ) {\n return false;\n }\n }\n }\n\n return true;\n }\n\n if (this.durMin > dayBounds.maxDurQ) { return false; }\n if (dayBounds.minStQ > this.stMax) { return false; }\n if (dayBounds.maxFiQ < this.fiMin) { return false; }\n if (this.stMax < this.fiMin) {\n for (const unavailability of dayBounds.unavailabilites) {\n if (this.stMax < unavailability.fiQ && this.fiMin > unavailability.stQ) {\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * @param {{ stMin: number; fiMax: number; }} bounds\n * @param {Map} taskTypeMap\n */\n setMaxBounds(bounds, taskTypeMap) {\n let shift;\n if (this.isFix) {\n shift = this.getFixShift(taskTypeMap);\n } else {\n shift = this;\n }\n if (bounds.stMin > shift.stMin)\n bounds.stMin = shift.stMin;\n if (bounds.fiMax < shift.fiMax)\n bounds.fiMax = shift.fiMax;\n }\n\n /** @param {Shift} other */\n isEqual(other) {\n if (other.isFix !== this.isFix)\n return false;\n if (other.automaticBreaks !== this.automaticBreaks) {\n return false;\n }\n if (other.openForBO !== this.openForBO) {\n return false;\n }\n if (this.isFix) {\n if (this.fixTasks.length !== other.fixTasks.length)\n return false;\n for (let i = 0; i < this.fixTasks.length; i++) {\n const t = this.fixTasks[i];\n const t2 = other.fixTasks[i];\n if (t.st != t2.st || t.dur != t2.dur || t.taskTypeId !== t2.taskTypeId)\n return false;\n }\n return true;\n }\n\n if (this.hasTask2 != other.hasTask2) {\n return false;\n }\n\n if (this.hasTask2) {\n if (this.taskType2Id !== other.taskType2Id || this.dur2Min !== other.dur2Min || this.dur2Max !== other.dur2Max) {\n return false;\n }\n }\n\n return this.taskTypeId === other.taskTypeId && this.stMin === other.stMin && this.stMax === other.stMax &&\n this.fiMin === other.fiMin && this.fiMax === other.fiMax &&\n this.durMin === other.durMin && this.durMax === other.durMax && this.step === other.step;\n }\n\n isValid() {\n if (this.isFix)\n return true;\n\n return this.step >= 1\n && this.stMin >= 0 && this.stMin <= this.stMax && this.stMax < 96\n && this.fiMin >= 0 && this.fiMin <= this.fiMax\n && this.durMin <= this.durMax;\n }\n\n /** @returns {ShiftDto} */\n toDto() {\n const fixTasks = this.isFix ? this.fixTasks : [];\n /** @type {{taskTypeId:number, st:number|null, stSpan:number|null, fi:number|null, fiSpan:number|null, dur:number|null, durSpan:number|null, step:number|null, kind:number}[]} */\n const flexTasks = [];\n if (fixTasks.length === 0) {\n flexTasks.push({ taskTypeId: this.taskTypeId, st: this.stMin, fi: this.fiMin, dur: this.durMin, stSpan: this.stMax - this.stMin, fiSpan: this.fiMax - this.fiMin, durSpan: this.durMax - this.durMin, step: this.step, kind: 0 });\n if (this.hasTask2) {\n flexTasks.push({ taskTypeId: this.taskType2Id, st: null, fi: null, dur: this.dur2Min, stSpan: null, fiSpan: null, durSpan: this.dur2Max - this.dur2Min, step: null, kind: 1 });\n }\n }\n return {\n id: this.id,\n automaticBreaks: this._automaticBreaks,\n openForBO: this._openForBO,\n fixTasks: fixTasks,\n flexTasks: flexTasks,\n };\n }\n\n /**\n * @param {Map} taskTypeMap\n */\n getDurationText(taskTypeMap) {\n let hours = 0;\n if (this.isFix) {\n for (const t of this.fixTasks) {\n if (taskTypeMap.get(t.taskTypeId).type !== 'break') {\n hours += t.dur / 60;\n }\n }\n\n } else if (this.durMin === this.durMax) {\n hours = this.durMin / 4;\n } else {\n return this.durMin / 4 + ' - ' + this.durMax / 4 + ' h'\n }\n\n if (hours > 0) {\n return Math.round(100 * hours) / 100 + ' h';\n }\n return '';\n }\n}\n\n/**\n * @param {number} ttId\n */\nexport function createShift(ttId) {\n const shift = new Shift({ id: null, fixTasks: [], flexTasks: [] });\n shift.isFix = true;\n shift.taskTypeId = ttId;\n return shift;\n}\n\n\n/**\n * @param {Shift} sh\n * @param {Map} taskTypeMap\n * @param {import(\"@/model/dn-break-settings.js\").BreakSettings[]} breakSettings\n */\nexport function getShiftWorkTime(sh, taskTypeMap, breakSettings) {\n let minWork = 0\n let maxWork = 0\n let includeFlexShift = false\n if (sh) {\n if (sh.isFix) {\n let fixShift = sh.getFixShift(taskTypeMap)\n if (fixShift) {\n minWork += fixShift.paidWorkMinutes\n maxWork += fixShift.paidWorkMinutes\n }\n } else {\n includeFlexShift = true\n let durMin = sh.durMin * 15;\n let durMax = sh.durMax * 15;\n if (breakSettings && taskTypeMap) {\n durMin = getBreakSettingsMinWork(breakSettings, durMin);\n durMax = getBreakSettingsMaxWork(breakSettings, durMax);\n }\n minWork += durMin;\n maxWork += durMax;\n }\n }\n\n return { minWork, maxWork, includeFlexShift };\n}","/**\n* @typedef {{ id: number; ccid:number; name:string; description?:string; affinityId?:number|null; optimizationPriority?:number|null;}} SkillDto\n*/\n\nexport class Skill {\n /**\n * @param {SkillDto} dto\n */\n constructor(dto) {\n /** @private @type {number} */\n this._id = dto.id;\n /** @private @type {string} */\n this._name = dto.name;\n /** @private @type {string} */\n this._description = dto.description ? dto.description : null;\n /** @private @type {number} */\n this._optimizationPriority = dto.optimizationPriority ? dto.optimizationPriority : null;\n /** @private @type {number} */\n this._contactCenterId = dto.ccid;\n /** @private @type {number|null} */\n this._affinity = dto.affinityId ? dto.affinityId : null;\n /** @private @type {boolean} */\n this._hasChanges = false;\n /** @private @type {boolean} */\n this._isToDelete = false;\n }\n\n get id() {\n return this._id;\n }\n\n get numericSort() {\n let x = parseInt(this._name)\n return '00000000'.slice(0, 8 - x.toString().length) + x.toString() + this._name.slice(x.toString().length)\n }\n\n get affinity() {\n return this._affinity;\n }\n\n set affinity(newValue) {\n this._affinity = newValue;\n this.markAsHasChanges();\n }\n\n // should only be called if the affinity has been removed on the server.\n clearAffinity() {\n this._affinity = null;\n }\n\n get name() {\n return this._name;\n }\n\n set name(newValue) {\n this._name = newValue;\n this.markAsHasChanges();\n }\n\n get description() {\n return this._description;\n }\n\n set description(newValue) {\n this._description = newValue;\n this.markAsHasChanges();\n }\n\n get optimizationPriority() {\n return this._optimizationPriority ? this._optimizationPriority : 1;\n }\n\n set optimizationPriority(newValue) {\n const v = Number(newValue);\n if (Number.isNaN(v) || v < 1) { return; }\n this._optimizationPriority = Math.round(v);\n this.markAsHasChanges();\n }\n\n get contactCenterId() {\n return this._contactCenterId\n }\n\n set contactCenterId(newValue) {\n this._contactCenterId = newValue;\n this.markAsHasChanges();\n }\n\n get hasChanges() {\n return this._hasChanges;\n }\n\n /**\n * @param {{ id: number; }} result\n */\n confirmChanges(result) {\n this._id = result.id;\n this._hasChanges = false;\n }\n\n markAsHasChanges() {\n this._hasChanges = true;\n }\n\n get isToDelete() {\n return this._isToDelete;\n }\n\n toDelete() {\n this._isToDelete = true;\n this._hasChanges = this.id >= 0;\n }\n\n /** @returns {SkillDto} */\n toDto() {\n const id = this.id >= 0 ? this.id : undefined;\n return {\n id,\n ccid: this.contactCenterId,\n description: this.description,\n name: this.name,\n affinityId: this.affinity,\n optimizationPriority: this._optimizationPriority,\n };\n }\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\nexport const IMPORT_CONFIG_KIND = createImportConfigEnum();\n\n/**\n * @param {SwitchConfig[]} switchConfigs\n */\nexport function addNewSwitchConfig(switchConfigs) {\n let minId = 0;\n for (const sc of switchConfigs) {\n minId = Math.min(sc.id, minId);\n }\n\n switchConfigs.push(new SwitchConfig({ id: minId - 1, active: true, timezone: 'UTC', importConfigs: [] }));\n}\n\nfunction createImportConfigEnum() {\n const enumObject = {\n apiCalls: 0,\n startel: 1,\n peoplePraise: 2,\n apiAgentEvents: 3,\n fileImportCalls: 4,\n fileImportAgentEvents: 5,\n };\n\n return Object.freeze(enumObject);\n}\n\nexport function getImportConfigKinds() {\n /** @type {{id:number, name:string}[]} */\n const switchKinds = [];\n switchKinds.push({ id: IMPORT_CONFIG_KIND.apiCalls, name: 'simTree api' });\n switchKinds.push({ id: IMPORT_CONFIG_KIND.startel, name: 'startel cmc api' });\n switchKinds.push({ id: IMPORT_CONFIG_KIND.peoplePraise, name: 'People Praise' });\n switchKinds.push({ id: IMPORT_CONFIG_KIND.apiAgentEvents, name: 'simTree api' });\n switchKinds.push({ id: IMPORT_CONFIG_KIND.fileImportCalls, name: 'file import' });\n switchKinds.push({ id: IMPORT_CONFIG_KIND.fileImportAgentEvents, name: 'file import' });\n return switchKinds;\n}\n\n/**\n * @param {number} importConfigKind\n */\nfunction isImportOfCallData(importConfigKind) {\n switch (importConfigKind) {\n case IMPORT_CONFIG_KIND.apiCalls:\n case IMPORT_CONFIG_KIND.startel:\n case IMPORT_CONFIG_KIND.fileImportCalls:\n return true;\n default:\n return false;\n }\n}\n\n/**\n * @typedef {{switchId:number, kind:number, url:string|null, username:string|null, pwd:string|null, lastTime:Date|null, errorMsg?:string|null, calcWrap:boolean|null; minSystemHold:number|null}} ImportConfigtDto\n */\n\n/**\n * @typedef {{id:number;active:boolean;timezone:string; name?:string;importConfigs:ImportConfigtDto[]; deletedImportConfigKinds?:number[]}} SwitchConfigDto\n */\n\nexport async function getSwitches() {\n /** @type {SwitchConfigDto[]} */\n const switches = await fetchAndCheckJson(`switch-config`, 'GET');\n return switches.map(x => new SwitchConfig(x));\n}\n\n/**\n * @param {SwitchConfigDto} data\n */\nasync function postSwitch(data) {\n await fetchAndCheckJson(`switch-config`, 'POST', data);\n}\n\n/**\n * @param {SwitchConfigDto} data\n */\nasync function patchSwitch(data) {\n await fetchAndCheckJson(`switch-config/${data.id}`, 'PATCH', data);\n}\n\nexport class SwitchConfig {\n /**\n * @param {SwitchConfigDto} dto\n */\n constructor(dto) {\n /** @readonly @type {number} */\n this.id = dto.id;\n /** @private @type {string} */\n this._name = dto.name;\n /** @private @type {string} */\n this._timezone = dto.timezone;\n /** @private @type {boolean} */\n this._active = dto.active;\n /** @type {ImportConfigtDto[]} */\n this.importConfigs = dto.importConfigs;\n /** @private @type {Set} */\n this._deletedImportConfigKinds = new Set();\n /** @private @type {Map} */\n this._changedImportConfigs = new Map();\n /** last time for call data @type {Date|null} */\n let lastTime = null;\n for (const ic of dto.importConfigs) {\n if (ic.lastTime) {\n ic.lastTime = new Date(ic.lastTime);\n if (isImportOfCallData(ic.kind)) {\n if (lastTime === null || ic.lastTime < lastTime) {\n lastTime = ic.lastTime;\n }\n }\n }\n }\n\n /** @readonly @type {Date|null} */\n this.lastTime = lastTime;\n if (dto.id === null) {\n /** @private @type {boolean} */\n this._hasChanges = true;\n }\n }\n\n get active() {\n return this._active;\n }\n set active(value) {\n if (this._active !== value) {\n this._hasChanges = true;\n this._active = value;\n }\n }\n\n get hasChanges() {\n return this._hasChanges === true;\n }\n\n get name() {\n return this._name;\n }\n set name(value) {\n if (this._name !== value) {\n this._hasChanges = true;\n this._name = value;\n }\n }\n\n get timezone() {\n return this._timezone;\n }\n set timezone(value) {\n if (this._timezone !== value) {\n this._hasChanges = true;\n this._timezone = value;\n }\n }\n\n /**\n * @param {ImportConfigtDto} dto\n */\n addmportConfig(dto) {\n this.importConfigs.push(dto);\n this._changedImportConfigs.set(dto.kind, dto);\n this.markAsHasChanges();\n }\n\n copy() {\n return new SwitchConfig(this.toDto());\n }\n\n /**\n * @param {number} kind\n */\n deleteImportConfig(kind) {\n const index = this.importConfigs.findIndex(x => x.kind === kind);\n this._deletedImportConfigKinds.add(kind);\n this.importConfigs.splice(index, 1);\n this.markAsHasChanges();\n }\n\n /**\n * @param {ImportConfigtDto} dto\n */\n updateImportConfig(dto) {\n const index = this.importConfigs.findIndex(x => x.kind === dto.kind);\n this.importConfigs[index] = dto;\n this._changedImportConfigs.set(dto.kind, dto);\n this.markAsHasChanges();\n }\n\n /**\n * @param {boolean} calls\n */\n filteredImportConfigs(calls) {\n return this.importConfigs.filter(x => isImportOfCallData(x.kind) === calls);\n }\n\n /**\n * @param {{id:number, name:string}[]} all\n * @param {boolean} calls\n */\n possibleImportConfigsToAdd(all, calls) {\n return all.filter(x => isImportOfCallData(x.id) === calls && !this.importConfigs.some(y => y.kind === x.id));\n }\n\n markAsHasChanges() {\n this._hasChanges = true;\n }\n\n orderById() {\n return this.importConfigs.some(x => x.kind === IMPORT_CONFIG_KIND.startel);\n }\n\n /** @private @returns {SwitchConfigDto} */\n toDto() {\n const importConfigs = this.importConfigs.map(x => ({ ...x }));\n return { id: this.id, name: this.name, timezone: this.timezone, active: this.active, importConfigs }\n }\n\n /** @private */\n toSave() {\n /** @type {ImportConfigtDto[]} */\n const importConfigs = [];\n for (const ic of this._changedImportConfigs.values()) {\n importConfigs.push(ic);\n }\n\n /** @type {SwitchConfigDto} */\n const dto = { id: this.id, name: this.name, timezone: this.timezone, active: this.active, importConfigs };\n if (this._deletedImportConfigKinds.size > 0) {\n dto.deletedImportConfigKinds = Array.from(this._deletedImportConfigKinds);\n }\n\n return dto;\n }\n\n async save() {\n const dto = this.toSave();\n if (this.id <= 0) {\n await postSwitch(dto);\n } else {\n await patchSwitch(dto);\n }\n this._hasChanges = false;\n }\n}\n","import { COLORS } from '@/js/dn-colors.js';\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\n/**\n* @typedef {{id: number; name: string; colorId: number; abbr: string; }} TagDto\n*/\n\nexport class Tag {\n /**\n * @param {number|null} id\n * @param {string} name\n * @param {number} colorId\n * @param {string} abbr\n */\n constructor(id, name, colorId, abbr) {\n /** @readonly @type {number|null} */\n this.id = id;\n /** @private @type {string} */\n this._name = name;\n /** @type {number} */\n this._colorId = colorId;\n /** @private @type {string} */\n this._abbr = abbr;\n\n /** @private @type {boolean} */\n this._hasChanges = false;\n /** @private @type {boolean} */\n this._isToDelete = false;\n }\n\n get name() {\n return this._name;\n }\n\n set name(newValue) {\n this._name = newValue;\n this._hasChanges = true;\n }\n\n get colorId() {\n return this._colorId;\n }\n\n get abbr() {\n return this._abbr;\n }\n\n set abbr(newValue) {\n this._abbr = newValue;\n this._hasChanges = true;\n }\n\n clone() {\n return new Tag(this.id, this.name, this.colorId, this.abbr);\n }\n\n get schemecolor() {\n return COLORS.byId(this.colorId);\n }\n set schemecolor(value) {\n const colorId = COLORS.idBySchemecolor(value);\n if (colorId !== this.colorId) {\n this._colorId = colorId;\n this._hasChanges = true;\n }\n }\n\n get colorType() {\n return 'is-' + this.schemecolor;\n }\n\n get hasChanges() {\n return this._hasChanges;\n }\n get isToDelete() {\n return this._isToDelete;\n }\n toDelete() {\n this._isToDelete = true;\n this._hasChanges = true;\n }\n}\n\n/** @returns {Promise} */\nexport async function getTags() {\n return await fetchAndCheckJson('tag', 'GET');\n}\n\n/** @returns {Promise} */\nexport async function getTagUsage() {\n return await fetchAndCheckJson('tag-usage', 'GET');\n}\n\n/**\n * @param {Tag[]} tags\n */\nexport async function postTags(tags) {\n /** @type {{ delete: number[]; rows: {id: null|number, name:string, colorId:number, abbr:string}[]}} */\n let data = {\n delete: [],\n rows: []\n }\n for (const tag of tags) {\n if (tag.isToDelete) {\n if (tag.id !== null)\n data.delete.push(tag.id);\n } else if (tag.hasChanges) {\n data.rows.push({ id: tag.id, name: tag.name, colorId: tag.colorId, abbr: tag.abbr });\n }\n }\n\n await fetchAndCheckJson('tag', 'POST', data);\n}\n\n/**\n * @param {Map} tagById\n * @param {string} text\n * @param {number[]} disallowedTagIds\n */\nexport function getFilteredTags(tagById, text, disallowedTagIds = undefined) {\n /** @type {Tag[]} */\n const tags = [];\n const textToSeach = text.toLocaleLowerCase();\n for (const tag of tagById.values()) {\n if (disallowedTagIds !== undefined && disallowedTagIds.includes(tag.id))\n continue;\n if (textToSeach.length === 0 || tag.name.toLocaleLowerCase().indexOf(textToSeach) >= 0) {\n tags.push(tag);\n }\n }\n\n return tags;\n}\n\n/**\n * @param {TagDto[]} tags\n */\nexport function convertTagsFromAPI(tags) {\n return new Map(tags.map(convertTagFromAPI).map(x => [x.id, x]));\n}\n\n/**\n * @param {TagDto} tag\n */\nfunction convertTagFromAPI(tag) {\n return new Tag(tag.id, tag.name, tag.colorId, tag.abbr);\n}\n\nconst TAG_USAGE_DESCRIPTION = createTagUsageDescription();\n\nfunction createTagUsageDescription() {\n const tagUsageDescription = ['break settings'];\n return Object.freeze(tagUsageDescription);\n}\n\n/**\n * @param {number[]} tagIds\n * @param {number[][]} tagUsage\n */\nexport function getTagUsageWarnings(tagIds, tagUsage) {\n /** @type {{description: string, tagIds: number[]}[]} */\n const warnings = [];\n for (let i = 0; i < TAG_USAGE_DESCRIPTION.length; i++) {\n const used = tagUsage[i];\n const ids = tagIds.filter(id => used.includes(id));\n if (ids.length > 1) {\n warnings.push({ description: TAG_USAGE_DESCRIPTION[i], tagIds: ids })\n }\n }\n\n return warnings;\n}\n\n/**\n * @param {Map} tagById\n * @param {{description: string, tagIds: number[]}[]} tagUsageWarnings\n */\nexport function getTagsUsageTooltip(tagById, tagUsageWarnings) {\n if (tagUsageWarnings.length === 0)\n return '';\n\n return tagUsageWarnings.map(w => 'Conflicting ' + w.description + ': ' + w.tagIds.map(tagId => tagById.get(tagId).name).join(', ')).join(', ')\n}","import { employeeFromDto } from '@/shared/dn-employee.js';\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\nconst ACCESS_RIGHT = createAccessRightEnum();\n\n/**\n * @typedef {{id:number;admin:boolean;email:string;contactcenterIds?:number[];api:boolean;forecasting:string;name:string;reports:string;scheduling:string;settings:string;initials:string;colorId:number;tagIdList?:number[]}} UserDto\n */\n\n/**\n * @param {string} email\n * @param {boolean} api\n */\nexport function createNewUser(email, api) {\n if (api) {\n return new User({\n id: -1, admin: false, api: api, email: email,\n forecasting: '', name: 'API', reports: '', scheduling: '', settings: '', initials:null, colorId:null\n });\n }\n return new User({\n id: -1, admin: false, api: api, email: email,\n forecasting: 'w', name: '', reports: 'r', scheduling: 'w', settings: 'r', initials:null, colorId:null\n });\n}\n\nexport async function getUsers() {\n /** @type {UserDto[]} */\n const result = await fetchAndCheckJson('users', 'GET');\n return result.map(r => new User(r));\n}\n\nexport async function getCurrentUser() {\n const user = await fetchAndCheckJson('users?currentUser=1', 'GET');\n \n return new LoggedInUser(user);\n}\n\n/**\n * @param {number} id\n * @param {number} authMethod\n * @param {number} loginId\n * @param {string} secret\n * @param {number} reqNotify\n */\nexport async function patchUser(id, authMethod, loginId, secret, reqNotify = undefined) {\n /** @type {{ok:boolean}} */\n const result = await fetchAndCheckJson('users/' + id, 'PATCH', { authMethod, loginId, secret, reqNotify });\n return result.ok;\n}\n\n/**\n * @param {User[]} users\n */\nexport async function saveUsers(users) {\n const toDelete = [];\n const toCreate = [];\n const toPatch = [];\n for (const u of users) {\n if (u.isToDelete) {\n toDelete.push(u.id);\n } else if (u.hasChanges) {\n if (u.id === -1) {\n toCreate.push({\n name: u.name, email: u.email, password: u.pwd, contactCenterIds: u.contactcenterIds, tagIdList: u.tagIdList,\n forecasting: u.forecasting, scheduling: u.scheduling, reports: u.reports, settings: u.settings,\n notify: u.notify, notifyEmail: u.notifyEmail, api: u.api, initials: u.initials, colorId: u.colorId\n });\n } else {\n toPatch.push({\n id: u.id, name: u.name, email: u.email, contactCenterIds: u.contactcenterIds, tagIdList: u.tagIdList,\n forecasting: u.forecasting, scheduling: u.scheduling, reports: u.reports, settings: u.settings, initials: u.initials, colorId: u.colorId\n });\n }\n }\n }\n /**\n * @type {{created:{id:number, email:string, notifyResult:boolean|null}[], errors:{email:string; emailAlreadyExists:boolean;}[]}}\n */\n const result = await fetchAndCheckJson('users', 'POST', { toDelete: toDelete, toCreate: toCreate, toPatch: toPatch });\n let i = users.length - 1;\n while (i >= 0) {\n const u = users[i];\n if (u.isToDelete) {\n users.splice(i, 1);\n } else if (u.hasChanges) {\n if (u.id === -1) {\n for (const createdResult of result.created) {\n if (createdResult.email === u.email) {\n u.id = createdResult.id;\n break;\n }\n }\n }\n if (!result.errors.some(x => x.email === u.email)) {\n u.confirmChanges();\n }\n }\n\n i--;\n }\n\n return result;\n}\n\nexport class User {\n /**\n * @param {UserDto} user\n */\n constructor(user) {\n /** @type {number} */\n this.id = user.id;\n /** @private @type {string} */\n this._name = user.name;\n /** @private @type {string} */\n this._email = user.email\n /** @protected @type {number[]} */\n this._contactcenterIds = user.contactcenterIds ? user.contactcenterIds : [];\n /** @private @type {string} */\n this._forecasting = user.forecasting\n /** @private @type {string} */\n this._scheduling = user.scheduling\n /** @private @type {string} */\n this._reports = user.reports\n /** @private @type {string} */\n this._settings = user.settings\n /** @private @type {string} */\n this._initials = user.initials;\n /** @private @type {number} */\n this._colorId = user.colorId;\n /** @readonly @type {boolean} */\n this.admin = user.admin;\n /** @type {boolean} */\n this.api = user.api;\n /** @private @type {number[]} */\n this._tagIdList = user.tagIdList ? user.tagIdList : [];\n /** @private @type {string} */\n this._pwd = '';\n /** @private @type {boolean} */\n this._hasChanges = false;\n /** @private @type {boolean} */\n this._isToDelete = false;\n /** @type {boolean|undefined} */\n this.notify = undefined;\n /** @type {string|undefined} */\n this.notifyEmail = undefined;\n }\n\n get colorId() {\n return this._colorId;\n }\n set colorId(newValue) {\n this._colorId = newValue;\n this.markAsHasChanges();\n }\n\n get initials() {\n return this._initials;\n }\n set initials(newValue) {\n this._initials = newValue;\n this.markAsHasChanges();\n }\n\n get name() {\n return this._name\n }\n set name(newValue) {\n this._name = newValue\n this.markAsHasChanges();\n }\n\n get email() {\n return this._email\n }\n set email(newValue) {\n this._email = newValue\n this.markAsHasChanges();\n }\n\n get pwd() {\n return this._pwd\n }\n\n set pwd(newValue) {\n this._pwd = newValue\n this.markAsHasChanges();\n }\n\n get contactcenterIds() {\n return this._contactcenterIds\n }\n set contactcenterIds(newValue) {\n this._contactcenterIds = newValue\n this.markAsHasChanges();\n }\n\n get tagIdList() {\n return this._tagIdList;\n }\n set tagIdList(newValue) {\n this._tagIdList = newValue;\n this.markAsHasChanges();\n }\n\n getNumAccessRight(val) {\n let x = 0\n if (val == ACCESS_RIGHT.readonly) { x = 1 }\n if (val == ACCESS_RIGHT.write) { x = 2 }\n return x\n }\n getStringAccessRight(val) {\n let x = ACCESS_RIGHT.none\n if (val == 1) { x = ACCESS_RIGHT.readonly }\n if (val == 2) { x = ACCESS_RIGHT.write }\n return x\n }\n getNumAccessRightScheduling(val) {\n let x = 0\n if (val == ACCESS_RIGHT.readonly) { x = 1 }\n if (val == ACCESS_RIGHT.supervisor) { x = 2 }\n if (val == ACCESS_RIGHT.write) { x = 3 }\n return x\n }\n getStringAccessRightScheduling(val) {\n let x = ACCESS_RIGHT.none\n if (val == 1) { x = ACCESS_RIGHT.readonly }\n if (val == 2) { x = ACCESS_RIGHT.supervisor }\n if (val == 3) { x = ACCESS_RIGHT.write }\n return x\n }\n\n get schedulingNum() {\n return this.getNumAccessRightScheduling(this._scheduling)\n }\n get forecastingNum() {\n return this.getNumAccessRight(this._forecasting)\n }\n get settingsNum() {\n return this.getNumAccessRight(this._settings)\n }\n get reportsNum() {\n return this.getNumAccessRight(this._reports)\n }\n\n set forecastingNum(newValue) {\n this._forecasting = this.getStringAccessRight(newValue)\n this.markAsHasChanges();\n }\n\n set schedulingNum(newValue) {\n this._scheduling = this.getStringAccessRightScheduling(newValue)\n this.markAsHasChanges();\n }\n set reportsNum(newValue) {\n this._reports = this.getStringAccessRight(newValue)\n this.markAsHasChanges();\n }\n set settingsNum(newValue) {\n this._settings = this.getStringAccessRight(newValue)\n this.markAsHasChanges();\n }\n\n get scheduling() {\n return this._scheduling\n }\n get forecasting() {\n return this._forecasting\n }\n get settings() {\n return this._settings\n }\n get reports() {\n return this._reports\n }\n set forecasting(newValue) {\n this._forecasting = newValue\n this.markAsHasChanges();\n }\n\n set scheduling(newValue) {\n this._scheduling = newValue\n this.markAsHasChanges();\n }\n set reports(newValue) {\n this._reports = newValue\n this.markAsHasChanges();\n }\n set settings(newValue) {\n this._settings = newValue\n this.markAsHasChanges();\n }\n get hasChanges() {\n return this._hasChanges;\n }\n confirmChanges() {\n this._hasChanges = false;\n this.notify = undefined;\n }\n\n get isToDelete() {\n return this._isToDelete\n }\n markAsHasChanges() {\n this._hasChanges = true;\n }\n toDelete() { this._isToDelete = true }\n}\n\nexport class LoggedInUser extends User {\n constructor(user) {\n super(user)\n /** @type {boolean} */\n this.isSuperAdmin = user.isSuperAdmin;\n /** @private @type {import(\"../shared/dn-employee.js\").Employee|null} */\n this._employee = null;\n\n /** @type {string|null} */\n this.endTime = user.endTime;\n\n /** @type {number[]} */\n const features = user.features;\n\n /** @readonly @type {boolean} */\n this.sms = features.includes(2);\n\n /** @readonly @private @type {boolean} */\n this._adherence = features.includes(3);\n\n /** @type {number} */\n this.authMethod = user.authMethod !== null ? user.authMethod : 0;\n\n /** @type {boolean} */\n this.isEmail = user.isEmail !== false;\n\n /** @type {number} */\n this.useMode = user.useMode;\n\n /** @type {boolean} */\n this.useDepartments = user.useDepartments;\n\n /** @type {number} */\n this.reqNotify = user.reqNotify !== null ? user.reqNotify : 0;\n\n\n if (user.employee) {\n this.employee = employeeFromDto(user.employee);\n }\n\n /** @type {string} */\n const customerTimezone = user.customerTimezone;\n\n /** @readonly @type {string} */\n this.timezone = user.tzMode > 0 ? customerTimezone : null;\n\n /** @readonly @type {string} */\n this.timezoneUI = this.isAgent && user.tzMode === 2 ? customerTimezone : undefined;\n }\n\n get hasAdherence() {\n return this._adherence && !this._employee;\n }\n\n get hasAccessForecasting() {\n return this.forecasting !== ACCESS_RIGHT.none;\n }\n get hasAccessReports() {\n return this.reports !== ACCESS_RIGHT.none;\n }\n get hasAccessScheduling() {\n return this.scheduling !== ACCESS_RIGHT.none;\n }\n get hasAccessSettings() {\n return this.settings !== ACCESS_RIGHT.none;\n }\n\n get canEditForecasting() {\n return this.forecasting === ACCESS_RIGHT.write;\n }\n get canEditScheduling() {\n return (this.scheduling === ACCESS_RIGHT.write) || (this.scheduling === ACCESS_RIGHT.supervisor);\n }\n get canEditSettings() {\n return this.settings === ACCESS_RIGHT.write;\n }\n get isSupervisor() {\n return this.scheduling === ACCESS_RIGHT.supervisor;\n }\n\n get isAgent() {\n return this.employee !== null;\n }\n\n //if not null, agent login\n get employee() {\n return this._employee\n }\n set employee(newValue) {\n this._employee = newValue\n if (newValue)\n this._contactcenterIds = [newValue.ccid]\n }\n}\n\n/**\n * @param {string} current\n * @param {string} text\n */\nexport function getSecretFormatting(current, text) {\n let password2WithMask = '';\n let password2 = '';\n for (const c of text) {\n if (c >= '0' && c <= '9') {\n if (password2WithMask.length === 3) {\n password2WithMask += ' - '\n }\n password2WithMask += c;\n password2 += c;\n }\n }\n if (current === password2WithMask) {\n password2WithMask += ' ';\n }\n\n return { password2, password2WithMask };\n}\n\nfunction createAccessRightEnum() {\n const enumObject = {\n none: '',\n readonly: 'r',\n supervisor: 's',\n write: 'w',\n };\n\n return Object.freeze(enumObject);\n}\n","import { addDays } from '#shared/dn-shared-helper';\nimport { createSchedule } from \"#shared/dn-employee-schedule\";\n\n/**\n * @typedef {{ dayBefore:import(\"#shared/dn-timezone\").TimezoneDayInfo;day:import(\"#shared/dn-timezone\").TimezoneDayInfo;dayAfter:import(\"#shared/dn-timezone\").TimezoneDayInfo }} HolidayInfo\n */\n\n/**\n * @typedef {{adherenceOptions:{adherenceBase:number}; currentCC:{tagIds:number[]}; holidays:{ date: Date; }[]; generalEmpAppSettings:{weekStartDay:number}; taskTypes:import(\"#shared/dn-tasktype\").TaskTypes}} PayrollReportData\n */\n\n/**\n * @typedef {{numHoursWeeklyOvertime:number;weekendAsHoliday:boolean}} ReportOptions\n */\n\n/**\n * @typedef {{id?:number;payrollRuleId?:number;workType:number|null;taskTypes?:number[];stMinute:number|null;stDay:number|null;fiMinute:number|null;fiDay:number|null;subtract:boolean|null;shiftBounds:boolean}} PayrollRuleDetailDto\n */\n\n/**\n * @typedef {{id?:number;agreementId?:number;code:string;name:string;kind:number;weekLimitAbove:boolean|null;details?:PayrollRuleDetailDto[]}} PayrollRuleDto\n */\n\n/**\n * @typedef {{id:number;name:string;tagId:number|null;payrollPeriod:number;payrollPeriodShiftBounds:boolean;payrollRules?:PayrollRuleDto[];isReport?:boolean;kind:number}} AgreementDto\n */\n\n/**\n * @typedef {{empid:string;empName:string;code:string;payrollName:string;amount:number;unit:string}} PayrollReportRow\n */\n\nexport const AGREEMENT_KIND = createAgreementKind();\n\nfunction createAgreementKind() {\n const e = {\n payroll: 0,\n report: 1,\n accumulation: 2,\n };\n\n return Object.freeze(e);\n}\n\nexport const PAYROLL_RULE_KIND = createPayrollRuleKind();\n\nfunction createPayrollRuleKind() {\n const e = {\n hours: 0,\n dayCount: 1,\n /** @type {(t:(arg0:string) => string) => {id:number;name:string}[]} */\n getOptions: null\n };\n\n e.getOptions = function (t) {\n return [dd(e.hours, t('settings.hours')), dd(e.dayCount, t('settings.day-count'))];\n }\n\n return Object.freeze(e);\n}\n\nexport const PAYROLL_RULE_WORK_TYPE = createPayrollRuleWorkType();\n\nfunction createPayrollRuleWorkType() {\n const e = {\n paidWork: 0,\n attendance: 1,\n taskTypes: 2,\n flex: 3,\n };\n\n return Object.freeze(e);\n}\n\nexport const PAYROLL_RULE_DAY_KIND = createPayrollRuleDayKind();\n\nfunction createPayrollRuleDayKind() {\n const e = {\n sunday: 0,\n monday: 1,\n tuesday: 2,\n wednesday: 3,\n thursday: 4,\n friday: 5,\n saturday: 6,\n holiday: 7,\n dayBeforeHoliday: 8,\n dayAfterHoliday: 9,\n /** @type {(t:(arg0:string) => string) => {id:number;name:string}[]} */\n getOptions: null\n };\n\n e.getOptions = function (t) {\n const result = []\n for (let i = 0; i < 7; i++) {\n const dt = new Date(2024, 0, 7 + i);\n result.push(dd(i, dt.toLocaleDateString('en-US', { weekday: 'long' })));\n }\n result.push(dd(e.holiday, t('settings.holiday')));\n result.push(dd(e.dayBeforeHoliday, t('settings.day-before-holiday')));\n result.push(dd(e.dayAfterHoliday, t('settings.day-after-holiday')));\n\n return result;\n }\n\n return Object.freeze(e);\n}\n\nexport function getWeekLimitAboveOptions(t) {\n return [{ id: true, name: 'above' }, { id: false, name: 'below' }];\n}\n\n/**\n * @param {number} id\n * @param {string} name\n */\nfunction dd(id, name) {\n return { id, name };\n}\n\nexport class Agreements {\n constructor() {\n /** @type {Map} */\n this.byId = null;\n /** @private @type {Map} */\n this._byTagId = null;\n this.loadCounter = 0;\n }\n\n get byTagId() {\n if (this._byTagId === null && this.isLoaded) {\n /** @type {Map} */\n const byTagId = new Map();\n for (const dto of this.byId.values()) {\n if (dto.kind === AGREEMENT_KIND.payroll) {\n byTagId.set(dto.tagId, dto);\n }\n }\n this._byTagId = byTagId;\n }\n return this._byTagId;\n }\n\n get isLoaded() {\n return this.byId !== null;\n }\n\n get hasPayrollRules() {\n if (!this.isLoaded) { return undefined; }\n for (const agreement of this.byId.values()) {\n if (agreement.payrollRules.length > 0) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {number} kind\n * @returns {AgreementDto[]}\n */\n asList(kind) {\n if (this.byId) {\n /** @type {AgreementDto[]} */\n const list = [];\n for (const dto of this.byId.values()) {\n if (dto.kind === kind) {\n list.push(dto);\n }\n }\n return list;\n }\n return undefined;\n }\n\n /** @param {AgreementDto[]} dtoList */\n load(dtoList) {\n const byId = new Map();\n for (const dto of dtoList) {\n byId.set(dto.id, dto);\n }\n this.byId = byId;\n this._byTagId = null;\n this.loadCounter += 1;\n }\n\n /**\n * @private\n * @param {number[]} tagIdList\n * @param {AgreementDto} defaultAgreement\n */\n getByTagId(tagIdList, defaultAgreement = undefined) {\n const byTagId = this.byTagId;\n for (const tagId of tagIdList) {\n const dto = byTagId.get(tagId);\n if (dto) { return dto; }\n }\n if (defaultAgreement === undefined) {\n defaultAgreement = this._byTagId.get(null);\n if (defaultAgreement === undefined) {\n defaultAgreement = null;\n }\n }\n\n return defaultAgreement;\n }\n\n /**\n * @param {{tagIds:number[]}} employee\n * @param {{tagIds:number[]}} cc\n */\n getPayrollPeriod(employee, cc) {\n const defaultAgreement = this.getByTagId(cc.tagIds);\n const agreement = this.getByTagId(employee.tagIds, defaultAgreement);\n return agreement ? agreement.payrollPeriod : 0;\n }\n\n /**\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {import(\"#shared/dn-employee\").Employee[]} employees\n * @param {import(\"#shared/dn-task\").Task[]} scheduleTasks\n * @param {PayrollReportData} data\n * @param {ReportOptions} reportOptions\n * @param {AgreementDto} agreementToUse\n */\n getPayrollReportData(timeRange, employees, scheduleTasks, data, reportOptions, agreementToUse = null) {\n return this.getPayrollReportDataImpl(timeRange, employees, scheduleTasks, data, reportOptions, agreementToUse).rows;\n }\n\n /**\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {import(\"#shared/dn-employee\").Employee[]} employees\n * @param {import(\"#shared/dn-task\").Task[]} scheduleTasks\n * @param {PayrollReportData} data\n * @param {ReportOptions} reportOptions\n * @param {AgreementDto} agreementToUse\n */\n getPayrollReportDataOneRow(timeRange, employees, scheduleTasks, data, reportOptions, agreementToUse = null) {\n return this.getPayrollReportDataImpl(timeRange, employees, scheduleTasks, data, reportOptions, agreementToUse).oneRowReport;\n }\n\n /**\n * @private\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {import(\"#shared/dn-employee\").Employee[]} employees\n * @param {import(\"#shared/dn-task\").Task[]} scheduleTasks\n * @param {PayrollReportData} data\n * @param {ReportOptions} reportOptions\n * @param {AgreementDto} agreementToUse\n */\n getPayrollReportDataImpl(timeRange, employees, scheduleTasks, data, reportOptions, agreementToUse = null) {\n const cc = data.currentCC;\n const holidays = data.holidays;\n const taskTypes = data.taskTypes;\n const adherenceBase = data.adherenceOptions.adherenceBase;\n const weeklyLimit = reportOptions.numHoursWeeklyOvertime ? reportOptions.numHoursWeeklyOvertime : 40;\n const sortedHolidays = getSortedHolidays(timeRange, holidays, reportOptions.weekendAsHoliday);\n const timeRangeWeeks = timeRange.splitIntoWeeks(data.generalEmpAppSettings.weekStartDay);\n\n const defaultAgreement = agreementToUse ? agreementToUse : this.getByTagId(cc.tagIds);\n /** @type {import(\"#shared/dn-employee\").Employee[]} */\n const employeesWithAgreement = [];\n /** @type {Map} */\n const payrollRuleGroupsById = new Map();\n /** @type {Map} */\n const payrollRuleGroupsEmpId = new Map();\n\n for (const emp of employees) {\n const agreement = agreementToUse ? agreementToUse : this.getByTagId(emp.tagIds, defaultAgreement);\n if (agreement) {\n employeesWithAgreement.push(emp);\n let groups = payrollRuleGroupsById.get(agreement.id);\n if (groups === undefined) {\n groups = [];\n for (const dto of agreement.payrollRules) {\n /** @type {PayrollRuleCalcGroup} */\n let group = undefined;\n if (dto.code.length > 0) {\n group = groups.find(x => x.code === dto.code && x.kind === dto.kind);\n }\n if (!group) {\n group = new PayrollRuleCalcGroup(dto);\n groups.push(group);\n }\n if (dto.weekLimitAbove === null) {\n const payrollRule = new PayrollRuleCalc(taskTypes.byId, dto, timeRange, agreement.payrollPeriodShiftBounds, weeklyLimit, sortedHolidays, adherenceBase);\n group.payrollRules.push(payrollRule);\n } else {\n for (const tr of timeRangeWeeks) {\n const payrollRule = new PayrollRuleCalc(taskTypes.byId, dto, tr, agreement.payrollPeriodShiftBounds, weeklyLimit, sortedHolidays, adherenceBase);\n group.payrollRules.push(payrollRule);\n }\n }\n }\n for (const group of groups) {\n group.calcName();\n }\n\n payrollRuleGroupsById.set(agreement.id, groups);\n }\n payrollRuleGroupsEmpId.set(emp.id, groups);\n }\n }\n\n /** @type {import(\"@/components/Reporting/TableReport.vue\").ReportColumnDefinition[]} */\n const reportColumnDefinitions = [];\n for (const rules of payrollRuleGroupsById.values()) {\n for (const r of rules) {\n reportColumnDefinitions.push({ name: r.id.toString(), header: r.code, width: 50 });\n }\n }\n\n const schedules = createSchedule(timeRange, scheduleTasks, taskTypes, employeesWithAgreement, true);\n /** @type {PayrollReportRow[]} */\n const rows = [];\n /** @type {{empid:string;empName:string;[p:string]:any}[]} */\n const rows2 = [];\n /** @type {Map} */\n const row2ByEmp = new Map();\n\n for (const employeeSchedule of schedules) {\n const groups = payrollRuleGroupsEmpId.get(employeeSchedule.emp.id);\n const empid = employeeSchedule.emp.empid;\n const empName = employeeSchedule.emp.name;\n for (const payrollRuleGroup of groups) {\n let amount = 0;\n for (const payrollRule of payrollRuleGroup.payrollRules) {\n amount += payrollRule.getAmount(employeeSchedule)\n }\n if (amount !== 0) {\n amount = Math.round(10000 * amount) / 10000;\n const code = payrollRuleGroup.code;\n const payrollName = payrollRuleGroup.name;\n const unit = payrollRuleGroup.unit;\n rows.push({ empid, empName, code, payrollName, amount, unit });\n let row2 = row2ByEmp.get(employeeSchedule.emp.id);\n if (row2 === undefined) {\n row2 = { empid, empName };\n row2ByEmp.set(employeeSchedule.emp.id, row2)\n rows2.push(row2)\n }\n row2[payrollRuleGroup.id] = amount;\n }\n }\n }\n\n return { rows, oneRowReport: { reportColumnDefinitions, rows: rows2 } };\n }\n\n /**\n * @param {number} agreementId\n */\n remove(agreementId) {\n if (this.byId) {\n this.byId.delete(agreementId);\n this._byTagId = null;\n this.loadCounter += 1;\n\n }\n }\n}\n\nclass PayrollRuleCalc {\n /**\n * @param {Map} taskTypeById\n * @param {PayrollRuleDto} payrollRule\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {boolean} payrollPeriodShiftBounds\n * @param {number} weeklyLimit\n * @param {HolidayInfo[]} sortedHolidays\n * @param {number} adherenceBase\n */\n constructor(taskTypeById, payrollRule, timeRange, payrollPeriodShiftBounds, weeklyLimit, sortedHolidays, adherenceBase) {\n /** @type {string} */\n this.code = payrollRule.code;\n /** @type {string} */\n this.name = payrollRule.name;\n /** @type {number} */\n this.weeklyLimit = weeklyLimit;\n /** @type {boolean} */\n this.weeklyLimitAbove = payrollRule.weekLimitAbove;\n const unitDays = payrollRule.kind === PAYROLL_RULE_KIND.dayCount;\n const useShiftBounds = payrollRule.kind === PAYROLL_RULE_KIND.dayCount || payrollPeriodShiftBounds;\n\n /** @type {PayrollRuleDetail[]} */\n this.details = [];\n for (const detail of payrollRule.details) {\n if (detail.shiftBounds) {\n this.details.push(new PayrollRuleShiftBound(detail, taskTypeById, timeRange,\n sortedHolidays, adherenceBase, unitDays));\n } else {\n this.details.push(new PayrollRuleTime(detail, taskTypeById, timeRange,\n sortedHolidays, adherenceBase, unitDays, useShiftBounds));\n }\n }\n }\n\n /**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} employeeSchedule\n */\n getAmount(employeeSchedule) {\n let amount = 0;\n for (const d of this.details) {\n amount += d.getAmount(employeeSchedule);\n }\n if (this.weeklyLimitAbove === true) {\n amount = Math.max(0, amount - this.weeklyLimit);\n } else if (this.weeklyLimitAbove === false) {\n amount = Math.min(amount, this.weeklyLimit);\n }\n return amount;\n }\n}\n\nclass PayrollRuleDetail {\n /**\n * @param {PayrollRuleDetailDto} payrollRule\n * @param {Map} taskTypeById\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {boolean} unitDays\n * @param {number} adherenceBase\n */\n constructor(payrollRule, taskTypeById, timeRange, unitDays, adherenceBase) {\n /** @type {number} */\n this.adherenceBase = adherenceBase;\n /** @type {boolean} */\n this.calcAttendance = payrollRule.workType === PAYROLL_RULE_WORK_TYPE.attendance;\n /** @private @type {boolean} */\n this.calcFlex = payrollRule.workType === PAYROLL_RULE_WORK_TYPE.flex;\n /** @readonly @private @type {boolean} */\n this.subtract = payrollRule.subtract;\n /** @type {Map>} */\n this.taskTypesByKind = new Map();\n /** @type {boolean} */\n this.unitDays = unitDays;\n for (const taskTypeId of payrollRule.taskTypes) {\n const tt = taskTypeById.get(taskTypeId);\n let ttSet = this.taskTypesByKind.get(tt.kind);\n if (ttSet === undefined) {\n ttSet = new Set();\n this.taskTypesByKind.set(tt.kind, ttSet);\n }\n ttSet.add(tt.id);\n }\n /** @type {import(\"#shared/dn-date-interval\").DateInterval} */\n this.timeRange = timeRange;\n }\n\n /**\n * @protected\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} employeeSchedule\n */\n getInternalAmount(employeeSchedule) {\n return 0;\n }\n\n /**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} employeeSchedule\n */\n getAmount(employeeSchedule) {\n if (this.calcFlex && employeeSchedule.emp.agreedWorkWeek === null) {\n return 0;\n }\n let amount = this.getInternalAmount(employeeSchedule);\n if (this.calcFlex) {\n amount -= this.timeRange.numberOfDays * employeeSchedule.emp.agreedWorkWeek / (7 * 60);\n }\n if (this.subtract) {\n return -amount;\n }\n return amount;\n }\n}\n\nclass PayrollRuleTime extends PayrollRuleDetail {\n /**\n * @param {PayrollRuleDetailDto} payrollRule\n * @param {Map} taskTypeById\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {HolidayInfo[]} sortedHolidays\n * @param {number} adherenceBase\n * @param {boolean} unitDays\n * @param {boolean} useShiftBounds\n */\n constructor(payrollRule, taskTypeById, timeRange, sortedHolidays, adherenceBase, unitDays, useShiftBounds) {\n super(payrollRule, taskTypeById, timeRange, unitDays, adherenceBase);\n\n /** @type {boolean} */\n this.useShiftBounds = useShiftBounds;\n /** @readonly @type {{st:Date;fi:Date}[]} */\n this.timeToRemove = [];\n if (!this.useShiftBounds) {\n this.addTimeToRemove(addDays(timeRange.st, -1000), timeRange.st);\n const fi = timeRange.fi;\n this.addTimeToRemove(fi, addDays(fi, 1000));\n }\n if (payrollRule.stDay !== null && payrollRule.fiDay !== null) {\n if (payrollRule.stDay < 7) {\n let numberOfDays = timeRange.numberOfDays + 1;\n /** @type {Date} */\n let st = null;\n for (let i = -7; i < numberOfDays; i++) {\n const dayInfo = timeRange.byIndex(i);\n const day = dayInfo.dtLocal.getDay();\n if (st === null && payrollRule.fiDay === day) {\n if (payrollRule.fiMinute !== null) {\n st = timeRange.getDate(dayInfo, 0, payrollRule.fiMinute);\n } else {\n st = timeRange.byIndex(i + 1).dt;\n }\n }\n if (st !== null && payrollRule.stDay === day) {\n /** @type {Date} */\n let fi;\n if (payrollRule.stMinute !== null) {\n fi = timeRange.getDate(dayInfo, 0, payrollRule.stMinute);\n } else {\n fi = dayInfo.dt;\n }\n if (st < fi) {\n this.addTimeToRemove(st, fi);\n st = null;\n }\n }\n if (st === null && payrollRule.fiDay === day) {\n if (payrollRule.fiMinute !== null) {\n st = timeRange.getDate(dayInfo, 0, payrollRule.fiMinute);\n } else {\n st = timeRange.byIndex(i + 1).dt;\n }\n }\n }\n if (st !== null) {\n this.addTimeToRemove(st, addDays(timeRange.st, numberOfDays + 1000));\n }\n } else {\n if (isPayrollHolidaySettingsOk(payrollRule)) {\n let st = addDays(timeRange.st, -1000);\n let fi = null;\n for (const holiday of sortedHolidays) {\n fi = getHolidayTime(timeRange, holiday, payrollRule.stDay, payrollRule.stMinute);\n if (st < fi) {\n this.addTimeToRemove(st, fi);\n }\n st = getHolidayTime(timeRange, holiday, payrollRule.fiDay, payrollRule.fiMinute);\n }\n fi = addDays(timeRange.st, timeRange.numberOfDays + 1000);\n this.addTimeToRemove(st, fi);\n }\n }\n } else if (payrollRule.stMinute !== null && payrollRule.fiMinute !== null && payrollRule.stMinute !== payrollRule.fiMinute) {\n const overMidnight = payrollRule.fiMinute < payrollRule.stMinute;\n const startIndex = overMidnight ? 0 : -1;\n for (let i = startIndex; i <= timeRange.numberOfDays; i++) {\n const dayInfo = timeRange.byIndex(i);\n if (overMidnight) {\n const fi = timeRange.getDate(dayInfo, 0, payrollRule.fiMinute);\n const st = timeRange.getDate(dayInfo, 0, payrollRule.stMinute);\n this.addTimeToRemove(fi, st);\n } else {\n const nextDayInfo = timeRange.byIndex(i + 1);\n const fi = timeRange.getDate(dayInfo, 0, payrollRule.fiMinute);\n const nextDaySt = timeRange.getDate(nextDayInfo, 0, payrollRule.stMinute);\n this.addTimeToRemove(fi, nextDaySt);\n }\n }\n }\n }\n\n /**\n * @private\n * @param {Date} st\n * @param {Date} fi\n */\n addTimeToRemove(st, fi) {\n if (st < fi) {\n this.timeToRemove.push({ st, fi });\n }\n }\n\n /**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} employeeSchedule\n */\n getInternalAmount(employeeSchedule) {\n return employeeSchedule.getPayrollTime(this);\n }\n}\n\nclass PayrollRuleShiftBound extends PayrollRuleDetail {\n /**\n * @param {PayrollRuleDetailDto} payrollRule\n * @param {Map} taskTypeById\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {HolidayInfo[]} sortedHolidays\n * @param {number} adherenceBase\n * @param {boolean} unitDays\n */\n constructor(payrollRule, taskTypeById, timeRange, sortedHolidays, adherenceBase, unitDays) {\n super(payrollRule, taskTypeById, timeRange, unitDays, adherenceBase)\n\n const timeRangeFi = timeRange.fi;\n\n /** @type {{st:Date;fi:Date}[]} */\n this.timeIntervals = [];\n if (payrollRule.stDay !== null && payrollRule.fiDay !== null) {\n if (payrollRule.stDay < 7) {\n let numberOfDays = timeRange.numberOfDays + 1;\n /** @type {Date} */\n let st = null;\n for (let i = -7; i < numberOfDays; i++) {\n const dayInfo = timeRange.byIndex(i);\n const day = dayInfo.dtLocal.getDay();\n if (st === null && payrollRule.stDay === day) {\n if (payrollRule.stMinute !== null) {\n st = timeRange.getDate(dayInfo, 0, payrollRule.stMinute);\n } else {\n st = dayInfo.dt;\n }\n if (st < timeRange.st) { st = timeRange.st; }\n }\n if (st !== null && payrollRule.fiDay === day) {\n /** @type {Date} */\n let fi;\n if (payrollRule.fiMinute !== null) {\n fi = timeRange.getDate(dayInfo, 0, payrollRule.fiMinute);\n } else {\n fi = timeRange.byIndex(i + 1).dt;\n }\n if (fi > timeRangeFi) { fi = timeRangeFi; }\n this.addtimeIntervals(st, fi);\n st = null;\n }\n if (st === null && payrollRule.stDay === day) {\n if (payrollRule.stMinute !== null) {\n st = timeRange.getDate(dayInfo, 0, payrollRule.stMinute);\n } else {\n st = dayInfo.dt;\n }\n if (st < timeRange.st) { st = timeRange.st; }\n }\n }\n if (st !== null) {\n this.addtimeIntervals(st, timeRangeFi);\n }\n } else {\n if (isPayrollHolidaySettingsOk(payrollRule)) {\n /** @type {Date} */\n let st = null;\n /** @type {Date} */\n let fi = null;\n for (const holiday of sortedHolidays) {\n let newSt = getHolidayTime(timeRange, holiday, payrollRule.stDay, payrollRule.stMinute);\n if (newSt < timeRange.st) { newSt = timeRange.st; }\n if (fi) {\n if (fi < newSt) {\n this.addtimeIntervals(st, fi);\n st = newSt;\n }\n } else {\n st = newSt;\n }\n fi = getHolidayTime(timeRange, holiday, payrollRule.fiDay, payrollRule.fiMinute);\n if (fi > timeRangeFi) { fi = timeRangeFi; }\n }\n\n if (fi) {\n this.addtimeIntervals(st, fi);\n }\n }\n }\n } else if (payrollRule.stMinute !== null && payrollRule.fiMinute !== null && payrollRule.stMinute !== payrollRule.fiMinute) {\n const fiNextDay = payrollRule.fiMinute < payrollRule.stMinute;\n if (fiNextDay) {\n const dayInfo = timeRange.byIndex(0);\n const fi = timeRange.getDate(dayInfo, 0, payrollRule.fiMinute);\n this.addtimeIntervals(timeRange.st, fi);\n }\n for (let i = 0; i < timeRange.numberOfDays; i++) {\n const dayInfo = timeRange.byIndex(i);\n const st = timeRange.getDate(dayInfo, 0, payrollRule.stMinute);\n\n const fiDay = fiNextDay ? timeRange.byIndex(i + 1) : dayInfo;\n /** @type {Date} */\n let fi = timeRange.getDate(fiDay, 0, payrollRule.fiMinute);\n if (fi > timeRange.fi) {\n fi = timeRange.fi;\n }\n this.addtimeIntervals(st, fi);\n }\n } else {\n this.addtimeIntervals(timeRange.st, timeRangeFi);\n }\n }\n\n /**\n * @private\n * @param {Date} st\n * @param {Date} fi\n */\n addtimeIntervals(st, fi) {\n if (st < fi) {\n this.timeIntervals.push({ st, fi });\n }\n }\n\n /**\n * @param {import(\"#shared/dn-employee-schedule\").EmployeeSchedule} employeeSchedule\n */\n getInternalAmount(employeeSchedule) {\n return employeeSchedule.getPayrollShiftBound(this);\n }\n}\n\nclass PayrollRuleCalcGroup {\n /**\n * @param {PayrollRuleDto} payrollRule\n */\n constructor(payrollRule) {\n /** @readonly @type {number} */\n this.id = payrollRule.id;\n /** @readonly @type {string} */\n this.code = payrollRule.code;\n /** @type {string} */\n this.name = payrollRule.name;\n /** @readonly @type {number} */\n this.kind = payrollRule.kind;\n /** @readonly @type {string} */\n this.unit = payrollRule.kind === PAYROLL_RULE_KIND.dayCount ? 'days' : 'hours';\n /** @readonly @type {PayrollRuleCalc[]} */\n this.payrollRules = [];\n }\n\n calcName() {\n if (this.payrollRules.length <= 1) { return; }\n let name = this.name;\n for (const r of this.payrollRules) {\n if (name.length === 0 || r.name.startsWith(name)) { continue; }\n const length = Math.min(name.length, r.name.length)\n let count = 0;\n let newlength = 0;\n for (let i = 0; i < length; i++) {\n if (name[i] !== r.name[i]) { break; }\n if (name[i] === ' ') { newlength = count; }\n count += 1;\n }\n if (newlength !== length) {\n name = name.substring(0, newlength);\n }\n }\n\n if (name.length > 0) {\n this.name = name;\n } else {\n this.name = this.code;\n }\n }\n}\n\n/**\n * Get start time of holidays near the timerange\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {{ date: Date; }[]} holidays\n * @param {boolean} weekendAsHoliday\n */\nfunction getSortedHolidays(timeRange, holidays, weekendAsHoliday) {\n const dayBeforeInterval = timeRange.byIndex(-1);\n const dayAfterInterval = timeRange.byIndex(timeRange.numberOfDays + 1);\n\n /** @type {HolidayInfo[]} */\n const sortedHolidays = [];\n /** @type {Set} */\n const uniqueDays = weekendAsHoliday ? new Set() : undefined;\n for (const holiday of holidays) {\n const dtLocal = holiday.date;\n\n if (dtLocal >= dayBeforeInterval.dtLocal && dtLocal < dayAfterInterval.dtLocal) {\n const holidayInfo = createHolidayInfo(timeRange, dtLocal);\n sortedHolidays.push(holidayInfo);\n if (uniqueDays) {\n uniqueDays.add(holidayInfo.day.dtLocal.getTime());\n }\n }\n }\n if (weekendAsHoliday) {\n let dtLocal = dayBeforeInterval.dtLocal;\n while (dtLocal < dayAfterInterval.dtLocal) {\n const day = dtLocal.getDay();\n if ((day === 0 || day === 6) && !uniqueDays.has(dtLocal.getTime())) {\n const holidayInfo = createHolidayInfo(timeRange, dtLocal);\n sortedHolidays.push(holidayInfo);\n }\n dtLocal = addDays(dtLocal, 1);\n }\n }\n\n sortedHolidays.sort((a, b) => a.day.dtLocal.getTime() - b.day.dtLocal.getTime());\n return sortedHolidays;\n}\n\n/**\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {Date} dtLocal\n * @returns {HolidayInfo}\n */\nfunction createHolidayInfo(timeRange, dtLocal) {\n const dayBefore = timeRange.byDate(addDays(dtLocal, -1));\n const day = timeRange.byDate(dtLocal);\n const dayAfter = timeRange.byDate(addDays(dtLocal, 1));\n return { dayBefore, day, dayAfter };\n}\n\n/**\n * @param {import(\"#shared/dn-date-interval\").DateInterval} timeRange\n * @param {HolidayInfo} holidayInfo\n * @param {number} dayKind\n * @param {number} minutes\n */\nfunction getHolidayTime(timeRange, holidayInfo, dayKind, minutes) {\n if (dayKind === PAYROLL_RULE_DAY_KIND.dayBeforeHoliday) {\n return timeRange.getDate(holidayInfo.dayBefore, 0, minutes);\n } else if (dayKind === PAYROLL_RULE_DAY_KIND.holiday) {\n return timeRange.getDate(holidayInfo.day, 0, minutes);\n } else if (dayKind === PAYROLL_RULE_DAY_KIND.dayAfterHoliday) {\n return timeRange.getDate(holidayInfo.dayAfter, 0, minutes);\n }\n return undefined;\n}\n\n/**\n * @param {PayrollRuleDetailDto} payrollRuleDetail\n */\nfunction isPayrollHolidaySettingsOk(payrollRuleDetail) {\n const stDay = holidayDiff(payrollRuleDetail.stDay);\n const fiDay = holidayDiff(payrollRuleDetail.fiDay);\n if (stDay < fiDay) { return true; }\n if (stDay === fiDay && payrollRuleDetail.stMinute < payrollRuleDetail.fiMinute) {\n return true;\n }\n return false;\n}\n\n/**\n * @param {number} dayKind\n */\nfunction holidayDiff(dayKind) {\n switch (dayKind) {\n case PAYROLL_RULE_DAY_KIND.dayBeforeHoliday:\n return -1;\n case PAYROLL_RULE_DAY_KIND.holiday:\n return 0;\n case PAYROLL_RULE_DAY_KIND.dayAfterHoliday:\n return 1;\n default:\n return undefined;\n }\n}\n","import { addDays } from '#shared/dn-shared-helper';\nimport { getDateOfInstant, getDateTimezoneInfo, getDateTimeInTimezone } from \"#shared/dn-timezone\";\n\nexport class DateInterval {\n /**\n * @param {Date} date\n * @param {number} numberOfDays\n * @param {string} [timezone]\n */\n constructor(date, numberOfDays, timezone = undefined) {\n /** @readonly @private @type {string} */\n this.timezone = timezone;\n /** @readonly @type {number} */\n this.numberOfDays = numberOfDays;\n\n /** @readonly @private @type {{dt:Date;dtLocal:Date;shortDate:string}[]} */\n this.days = [];\n for (let i = 0; i < numberOfDays + 2; i++) {\n const dtLocal = addDays(date, i - 1);\n this.days.push(getDateTimezoneInfo(dtLocal, timezone));\n }\n\n //daylight saving correction in hours, if transition is within planning range\n /** @readonly @type {Map} */\n this.dayLightSavingCorrs = new Map();\n const stTime = this.st.getTime();\n for (let d = -1; d < this.numberOfDays + 1; d += 1) {\n const dayInfo = this.byIndex(d);\n const dt = dayInfo.dt;\n this.dayLightSavingCorrs.set(dayInfo.shortDate, dt.getTime() / (60 * 60 * 1000) - (d * 24) - Math.round(stTime / (60 * 60 * 1000)))\n }\n }\n\n get st() {\n return this.byIndex(0).dt;\n }\n\n get fi() {\n return this.byIndex(this.numberOfDays).dt;\n }\n\n /**\n * @param {number} index\n */\n byIndex(index) {\n const dayIndex = index + 1;\n if (dayIndex >= 0 && dayIndex < this.days.length) {\n return this.days[dayIndex];\n }\n const dtLocal = addDays(this.byIndex(0).dtLocal, index);\n return this.byDate(dtLocal);\n }\n\n /**\n * @param {Date} dtLocal\n */\n byDate(dtLocal) {\n return getDateTimezoneInfo(dtLocal, this.timezone);\n }\n\n /**\n * @param {import(\"#shared/dn-timezone\").TimezoneDayInfo} day\n * @param {number} hours\n * @param {number} minutes\n */\n getDate(day, hours, minutes) {\n if (hours === 0 && minutes === 0) {\n return day.dt;\n }\n return getDateTimeInTimezone(day, hours, minutes, this.timezone);\n }\n\n /**\n * @param {number} weekStartDay\n */\n splitIntoWeeks(weekStartDay) {\n /** @type {DateInterval[]} */\n const weeks = [];\n let st = this.byIndex(0).dtLocal;\n let day = st.getDay();\n let numberOfDays = 0;\n for (let i = 0; i < this.numberOfDays; i++) {\n day += 1;\n if (day > 6) { day = 0; }\n numberOfDays += 1;\n if (day === weekStartDay) {\n weeks.push(new DateInterval(st, numberOfDays, this.timezone));\n st = this.byIndex(i + 1).dtLocal;\n numberOfDays = 0;\n }\n }\n if (numberOfDays > 0) {\n weeks.push(new DateInterval(st, numberOfDays, this.timezone));\n }\n\n return weeks;\n }\n\n /**\n * @param {Date} dt\n */\n startOfDay(dt) {\n return getDateOfInstant(dt, this.timezone);\n }\n}\n","import { addDays, getDayDiff, getQuarterHour, getShortDate, getStartOfDay, sumDateIntervals } from '#shared/dn-shared-helper';\nimport { Task } from \"#shared/dn-task\";\nimport { TASK_KIND } from '#shared/dn-tasktype';\n\n/**\n * @typedef {{\n * days:{dt:Date; endOfDay:Date; day:number; isWeekend:boolean; weekIndex:number; tzDayInfo:import(\"#shared/dn-timezone\").TimezoneDayInfo}[];\n * weeks:Date[];\n * paidWorkInterval:{st:Date;numberOfWeeks:number;dayIndexSt:number;dayIndexFi:number;weekIndexSt:number;weekIndexFi:number}}\n * } CalcInfo\n */\n\n/**\n * @typedef {{st:number; fi:number}[][]} AvailabilityByDay\n */\n\n/**\n * @typedef {{st:Date; fi:Date; tasktypeId:number}} TaskSimple\n */\n\n/**\n * @typedef { { workInMinutes:number; workIntervals:TaskSimple[]}} BOEmpDayWork\n */\n\n/**\n * @typedef {{st:Date; fi:Date; isToDelete?:boolean}} DeletableDateInterval\n */\n\n/**\n * @typedef {{numberOfDays:number;st:Date;byIndex?:(index:number) => import(\"#shared/dn-timezone\").TimezoneDayInfo; getDate?:(day:import(\"#shared/dn-timezone\").TimezoneDayInfo, hours:number, minutes:number) => Date}} DateInterval\n */\n\nexport class EmployeeSchedule {\n /**\n * @param {Map} taskTypeById\n * @param {import(\"#shared/dn-employee\").Employee} emp\n * @param {import(\"#shared/dn-task\").Task[]} tasks\n * @param {DateInterval} dateInterval\n * @param {number} index\n * @param {CalcInfo|undefined} [calcInfo]\n * @param {AvailabilityByDay} [availabilityByDay]\n * @param {{boData:import(\"@/js/dn-bo-data.js\").BOData;plannedAndTarget:import(\"@/js/dn-planned-and-target.js\").PlannedAndTarget;}} [extra]\n */\n constructor(taskTypeById, emp, tasks, dateInterval, index, calcInfo = undefined, availabilityByDay = undefined, extra = undefined) {\n /** @readonly @private @type {Map} */\n this.taskTypeById = taskTypeById;\n /** @readonly @type {import(\"#shared/dn-employee\").Employee} */\n this.emp = emp;\n /** @readonly @type {import(\"#shared/dn-task\").Task[][]} */\n this.tasksByKind = [];\n for (let i = 0; i < 7; i++) {\n this.tasksByKind[i] = [];\n }\n /** @private @type {number|undefined} */\n this._paidwork = undefined;\n /** @type {number} */\n this.index = index;\n /** @type {Date} */\n this.focusedDate = dateInterval.st;\n /** @readonly @type {DateInterval} */\n this.dateInterval = dateInterval;\n\n if (calcInfo !== undefined) {\n /** @private @readonly @type {CalcInfo} */\n this.calcInfo = calcInfo;\n /** @private @readonly @type {{hasWork: boolean; shiftBounds: {st:Date; fi:Date}; work:number; workIntervals:import(\"@/js/dn-planned-and-target.js\").WorkInterval[]; boWork:BOEmpDayWork}[]} */\n this.byDay = Array(dateInterval.numberOfDays);\n /** @private @readonly @type {(undefined|number)[]} */\n this._paidWorkWeek = Array(calcInfo.weeks.length);\n /** @type {Map} */\n let boByTaskType = undefined;\n if (extra) {\n if (extra.boData.hasAny) {\n boByTaskType = extra.boData.filteredBySkills(this.emp.skills);\n if (boByTaskType.size === 0) {\n boByTaskType = undefined;\n }\n }\n if (extra.plannedAndTarget.hasAny) {\n /** @private @readonly @type {import(\"@/js/dn-planned-and-target.js\").PlannedAndTarget} */\n this.plannedAndTarget = extra.plannedAndTarget;\n }\n }\n if (boByTaskType) {\n /** @private @readonly @type {(undefined|number)[]} */\n this._boWorkWeek = Array(calcInfo.weeks.length);\n }\n\n /** @private @readonly @type {import(\"#shared/dn-task\").Task[]} */\n this.initialTasks = tasks;\n\n /** @private @readonly @type {AvailabilityByDay} */\n this.availabilityByDay = availabilityByDay;\n\n /** @private @readonly @type {Map} */\n this.boByTaskType = boByTaskType;\n }\n\n for (const task of tasks) {\n this.addTask(task);\n }\n\n if (this.boByTaskType) {\n for (let i = 0; i < dateInterval.numberOfDays; i++) {\n this.getDayByIndex(i);\n }\n }\n }\n\n get numberOfDays() {\n return this.dateInterval.numberOfDays;\n }\n\n get tasks() {\n return this.tasksByKind[TASK_KIND.task];\n }\n\n get breaks() {\n return this.tasksByKind[TASK_KIND.break];\n }\n\n get absences() {\n return this.tasksByKind[TASK_KIND.absence];\n }\n\n get payments() {\n return this.tasksByKind[TASK_KIND.payment];\n }\n\n get log() {\n return this.tasksByKind[TASK_KIND.log];\n }\n\n get inRotation() {\n return this.tasksByKind[TASK_KIND.inRotation];\n }\n\n get correction() {\n return this.tasksByKind[TASK_KIND.correction];\n }\n\n /**\n * @param {Date} dt\n * @param {(value: Task, index: number, array: Task[]) => value is Task} isInShift\n */\n copyForReplacement(dt, isInShift) {\n return new EmployeeSchedule(this.taskTypeById, this.emp, this.tasks.concat(this.breaks).filter(isInShift), {st:dt, numberOfDays:1}, -1);\n }\n\n /**\n * In calcMode use only this function for adding tasks\n * @private\n * @param {import(\"#shared/dn-task\").Task} task\n */\n addTask(task) {\n const tt = this.taskTypeById.get(task.tasktypeId);\n if (tt.kind >= 0 && tt.kind < this.tasksByKind.length) {\n const taskList = this.tasksByKind[tt.kind];\n taskList.push(task);\n }\n return null;\n }\n\n /**\n * @param {number} dayIndex\n * @param {{st:number, dur:number; taskTypeId:number}[]} tasks\n * @param {number} minutesPerUnit\n */\n addTasks(dayIndex, tasks, minutesPerUnit = 1) {\n const dayInfo = this.getDayInfo(dayIndex);\n let affectsnextday = false;\n for (const t of tasks) {\n const st = this.dateInterval.getDate(dayInfo.tzDayInfo, 0, t.st * minutesPerUnit);\n const fi = this.dateInterval.getDate(dayInfo.tzDayInfo, 0, (t.st + t.dur) * minutesPerUnit);\n if (st < fi) {\n const task = new Task({ empid: this.emp.id, st, fi, tasktypeId: t.taskTypeId });\n this.addTask(task);\n }\n if (fi > dayInfo.endOfDay) { affectsnextday = true; }\n }\n this.clearDayComputations(dayIndex);\n if (affectsnextday) { this.clearDayComputations(dayIndex + 1); }\n if (this.boByTaskType || this.plannedAndTarget) {\n this.getDayByIndex(dayIndex);\n if (affectsnextday) { this.getDayByIndex(dayIndex + 1); }\n }\n }\n\n get calcMode() {\n return this.calcInfo !== undefined;\n }\n\n /**\n * @private\n * @param {DateInterval} dateInterval\n * @param {boolean} calcPayment\n * @param {boolean} calendarDays\n */\n calculateWork(dateInterval, calcPayment = false, calendarDays = false) {\n let work = 0.0;\n if (this.calcMode && !calcPayment) {\n for (let d = 0; d < dateInterval.numberOfDays; d += 1) {\n const day = this.getDay(addDays(dateInterval.st, d));\n work += day.work;\n }\n } else {\n let daySt = dateInterval.st;\n for (let d = 0; d < dateInterval.numberOfDays; d += 1) {\n const dayFi = dateInterval.byIndex ? dateInterval.byIndex(d + 1).dt : addDays(daySt, 1);\n const shift = calendarDays ? { st: daySt, fi: dayFi } : this.getShiftBoundsByDate(daySt);\n work += this.calculateShiftPaidTime(shift, daySt, dayFi, calcPayment, calendarDays);\n daySt = dayFi;\n }\n }\n\n return Math.round(work * 100) / 100;\n }\n\n /**\n * @private\n * @param {{st:Date; fi:Date}} shift\n * @param {Date} daySt\n * @param {Date} dayFi\n * @param {boolean} [calcPayment]\n * @param {boolean} [calendarDays]\n */\n\n calculateShiftPaidTime(shift, daySt, dayFi, calcPayment = false, calendarDays = false) {\n /** @type {TaskSimple[]} */\n let tasks;\n /** @type {TaskSimple[]} */\n const breaks = [];\n\n if (shift.st < shift.fi) {\n const tasks2 = calcPayment ? this.payments : this.tasks;\n tasks = cutToBounds(tasks2.filter(x => !x.isToDelete), shift);\n\n for (const t of this.breaks) {\n if (!t.isToDelete && t.overlaps(shift.st, shift.fi)) {\n breaks.push(t);\n }\n }\n } else {\n tasks = [];\n }\n\n /** @type {TaskSimple[]} */\n let absences;\n if (calendarDays) {\n absences = cutToBounds(this.absences.filter(x => !x.isToDelete), shift);\n } else {\n absences = [];\n for (const t of this.absences) {\n if (!t.isToDelete && t.st >= daySt && t.st < dayFi) {\n absences.push(t);\n }\n }\n }\n\n return getWorkImpl(this.taskTypeById, { tasks, breaks, absences }, calcPayment);\n }\n\n /**\n * @private\n * @param {number} dayIndex\n * @returns {BOEmpDayWork} \n * \n */\n calculateBOWork(dayIndex) {\n const boByTaskType = this.boByTaskType;\n if (boByTaskType && boByTaskType.size > 0 && dayIndex >= 0) {\n const dayCalcInfo = this.getDayInfo(dayIndex);\n const st = dayCalcInfo.dt;\n const fi = dayCalcInfo.endOfDay;\n const boTasks = this.tasks.filter(x => !x.isToDelete && x.overlaps(st, fi) && boByTaskType.has(x.tasktypeId));\n\n if (boTasks.length > 0) {\n const intervals = cutToBounds(boTasks, { st, fi });\n const workIntervals = subtractTasks(intervals, this.breaks);\n if (workIntervals) {\n let workInMinutes = 0;\n const msPerMinute = 1000 * 60;\n for (const wi of workIntervals) {\n workInMinutes += (wi.fi.getTime() - wi.st.getTime()) / msPerMinute;\n const boSkillData = this.boByTaskType.get(wi.tasktypeId);\n boSkillData.addPlanned(dayIndex, wi, 1);\n }\n return { workInMinutes, workIntervals };\n }\n }\n }\n\n return null;\n }\n\n /**\n * @private\n * @param {number} dayIndex\n * \n */\n calculateWorkIntervals(dayIndex) {\n if (!this.plannedAndTarget || dayIndex < 0) { return undefined; }\n const dayCalcInfo = this.getDayInfo(dayIndex);\n const st = dayCalcInfo.dt;\n const fi = dayCalcInfo.endOfDay;\n /** @type {TaskSimple[]} */\n let taskIntervals = [];\n for (const t of this.tasks) {\n if (!t.isToDelete && t.overlaps(st, fi)) {\n const tt = this.taskTypeById.get(t.tasktypeId);\n if (tt.work > 0) {\n taskIntervals.push({ st: t.st, fi: t.fi, tasktypeId: t.tasktypeId });\n }\n }\n }\n\n /** @type {import(\"@/js/dn-planned-and-target.js\").WorkInterval[]} */\n const workIntervals = [];\n if (taskIntervals.length > 0) {\n taskIntervals = cutToBounds(taskIntervals, { st, fi });\n const breaksOnDay = this.breaks.filter(t => !t.isToDelete && t.overlaps(st, fi));\n taskIntervals = subtractTasks(taskIntervals, breaksOnDay);\n for (const t of taskIntervals) {\n const tt = this.taskTypeById.get(t.tasktypeId);\n const stQ = getQuarterHour(t.st);\n const fiQ = t.fi >= dayCalcInfo.endOfDay ? 96 : getQuarterHour(t.fi);\n workIntervals.push({ stQ, fiQ, work: tt.work / 100 });\n }\n this.plannedAndTarget.addPlanned(dayIndex, this.emp.skills, workIntervals, 1);\n }\n return workIntervals;\n }\n\n /**\n * @param {number} dayIndex\n */\n getDayInfo(dayIndex) {\n return this.calcInfo.days[dayIndex];\n }\n\n get optimizationInterval() {\n return this.calcInfo.paidWorkInterval;\n }\n\n get paidwork() {\n if (this._paidwork === undefined) {\n if (this.calcInfo) {\n const interval = this.calcInfo.paidWorkInterval;\n this.calculatePaidWork({numberOfDays:interval.numberOfWeeks * 7, st:interval.st});\n } else {\n this.calculatePaidWork(this.dateInterval);\n }\n }\n\n return this._paidwork;\n }\n\n /**\n * @param {number} weekIndex\n */\n paidWorkWeek(weekIndex) {\n let weekWork = this._paidWorkWeek[weekIndex];\n if (weekWork === undefined) {\n weekWork = this.calculateWork({numberOfDays:7, st:this.calcInfo.weeks[weekIndex]});\n this._paidWorkWeek[weekIndex] = weekWork;\n }\n return weekWork;\n }\n\n /**\n * @param {number} dayIndex\n * @param {{ st: Date; fi: Date; }} interval\n */\n removeBreaks(dayIndex, interval) {\n if (deleteTasksOnInterval(this.breaks, interval)) {\n const dayInfo = this.getDayInfo(dayIndex);\n this.clearDayComputations(dayIndex);\n const endsAtNextDay = interval.fi > dayInfo.endOfDay\n if (endsAtNextDay) {\n this.clearDayComputations(dayIndex + 1);\n }\n if (this.boByTaskType || this.plannedAndTarget) {\n this.getDayByIndex(dayIndex);\n if (endsAtNextDay) { this.getDayByIndex(dayIndex + 1); }\n }\n }\n }\n\n /**\n * @param {number} dayIndex\n */\n removeShift(dayIndex) {\n const interval = this.getDayByIndex(dayIndex).shiftBounds;\n if (interval.st.getTime() >= interval.fi.getTime())\n return;\n\n let changed = deleteTasksOnInterval(this.tasks, interval);\n changed = deleteTasksOnInterval(this.breaks, interval) || changed;\n changed = deleteTasksOnInterval(this.payments, interval) || changed;\n changed = deleteTasksOnInterval(this.absences, interval) || changed;\n if (changed) {\n const dayInfo = this.getDayInfo(dayIndex);\n this.clearDayComputations(dayIndex);\n if (interval.fi > dayInfo.endOfDay) {\n this.clearDayComputations(dayIndex + 1);\n }\n }\n }\n\n /**\n * @private\n * @param {number} dayIndex\n */\n clearDayComputations(dayIndex) {\n this._paidwork = undefined;\n if (!this.calcMode)\n return;\n\n if (dayIndex >= 0 && dayIndex < this.numberOfDays) {\n const dayData = this.byDay[dayIndex];\n if (dayData) {\n if (dayData.boWork) {\n for (const wi of dayData.boWork.workIntervals) {\n const boSkillData = this.boByTaskType.get(wi.tasktypeId);\n boSkillData.addPlanned(dayIndex, wi, -1);\n }\n }\n if (dayData.workIntervals && dayData.workIntervals.length > 0) {\n this.plannedAndTarget.addPlanned(dayIndex, this.emp.skills, dayData.workIntervals, -1);\n }\n }\n this.byDay[dayIndex] = undefined;\n const weekIndex = this.getDayInfo(dayIndex).weekIndex;\n this._paidWorkWeek[weekIndex] = undefined;\n if (this._boWorkWeek) {\n this._boWorkWeek[weekIndex] = undefined;\n }\n }\n }\n\n /**\n * @private\n * @param {Date} dt\n */\n getDay(dt) {\n const dayIndex = this.getDayIndex(dt);\n return this.getDayByIndex(dayIndex);\n }\n\n /**\n * @param {number} dayIndex\n */\n getDayByIndex(dayIndex) {\n if (dayIndex < 0 || dayIndex >= this.numberOfDays)\n return undefined;\n let dayData = this.byDay[dayIndex];\n if (dayData === undefined) {\n const dayInfo = this.getDayInfo(dayIndex);\n const shiftBounds = getShiftBounds(dayInfo.dt, this.tasks);\n const work = this.calculateShiftPaidTime(shiftBounds, dayInfo.dt, dayInfo.endOfDay);\n const boWork = this.calculateBOWork(dayIndex);\n const workIntervals = this.calculateWorkIntervals(dayIndex);\n dayData = {\n hasWork: work > 0,\n shiftBounds,\n work,\n workIntervals,\n boWork\n };\n this.byDay[dayIndex] = dayData;\n }\n return dayData;\n }\n\n /**\n * @private\n * @param {Date} dt\n */\n getDayIndex(dt) {\n return getDayDiff(dt, this.dateInterval.st);\n }\n\n /**\n * @private {number}\n */\n getAgreedWorkMinutesDiff() {\n const agreedWorkMinutes = this.agreedWorkMinutes;\n if (agreedWorkMinutes === null) { return null; }\n return agreedWorkMinutes - this.paidwork * 60;\n }\n\n /**\n * @private {number}\n */\n get agreedWorkMinutes() {\n if (this.emp.agreedWorkWeek === null) { return null; }\n const numberOfWeeks = this.calcInfo.paidWorkInterval.numberOfWeeks;\n const maxTotalWorkMinutes = this.emp.agreedWorkWeek * numberOfWeeks;\n return maxTotalWorkMinutes;\n }\n\n /**\n * @param {number} dayIndex\n * @param {import(\"@/model/dn-break-settings.js\").BreakSettings[]} breakSettings\n * @returns {import(\"@/model/dn-shift.js\").DayBounds}\n */\n getDayBounds(dayIndex, breakSettings) {\n const areedWorkMinutesLeft = this.getAgreedWorkMinutesDiff();\n let maxWorkMinutes = areedWorkMinutesLeft !== null ? areedWorkMinutesLeft : 1440;\n const weekIndex = this.getDayInfo(dayIndex).weekIndex;\n maxWorkMinutes = Math.min(maxWorkMinutes, this.getMaxWorkWeekLeft(weekIndex));\n let maxDurQ = Math.floor(getMaxDurForWork(breakSettings, maxWorkMinutes) / 15);\n\n let minStMinute = 0;\n const dt = this.getDayInfo(dayIndex).dt;\n const dayBefore = this.getDayByIndex(dayIndex - 1);\n if (dayBefore) {\n if (dayBefore.hasWork) {\n const afterNightRest = (dayBefore.shiftBounds.fi.getTime() - dt.getTime()) / 60000 + this.emp.nightRest;\n if (afterNightRest > minStMinute) {\n minStMinute = afterNightRest;\n }\n }\n }\n let maxFiMinute = 2880;\n const dayAfter = this.getDayByIndex(dayIndex + 1);\n if (dayAfter) {\n if (dayAfter.hasWork) {\n const beforeNightRest = (dayAfter.shiftBounds.st.getTime() - dt.getTime()) / 60000 - this.emp.nightRest;\n if (beforeNightRest < maxFiMinute) {\n maxFiMinute = beforeNightRest;\n }\n }\n }\n\n let minStQ = Math.ceil(minStMinute / 15);\n let maxFiQ = Math.floor(maxFiMinute / 15);\n /** @type {{stQ:number;fiQ:number}[]} */\n const unavailabilites = [];\n if (this.availabilityByDay !== undefined) {\n const availabilites = this.availabilityByDay[dayIndex];\n if (availabilites.length > 0) {\n if (minStQ < availabilites[0].st) {\n minStQ = availabilites[0].st;\n minStMinute = minStQ * 15;\n }\n if (maxFiQ > availabilites[availabilites.length - 1].fi) {\n maxFiQ = availabilites[availabilites.length - 1].fi;\n maxFiMinute = maxFiQ * 15;\n }\n\n if (availabilites.length > 1) {\n for (let i = 1; i < availabilites.length; i++) {\n const stQ = availabilites[i - 1].fi;\n const fiQ = availabilites[i].st;\n if (fiQ > minStQ && stQ < maxFiQ) {\n unavailabilites.push({ stQ, fiQ });\n }\n }\n }\n } else {\n maxDurQ = 0;\n maxWorkMinutes = 0;\n }\n }\n\n return { maxDurQ, maxWorkMinutes, minStMinute, maxFiMinute, minStQ, maxFiQ, unavailabilites };\n }\n\n /**\n * @param {number} dayIndex\n * @param {number} st\n * @param {number} fi\n */\n isAvailable(dayIndex, st, fi) {\n if (this.availabilityByDay === undefined) { return true; }\n const availabilityByDay = this.availabilityByDay[dayIndex];\n for (const interval of availabilityByDay) {\n if (interval.st <= st && fi <= interval.fi) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {number} dayIndex\n * @param {{maxWorkMinutes:number;maxWorkMinutesByWeekIndex:number[]}} [possibleWork]\n */\n getMinWorkLeft(dayIndex, possibleWork = undefined) {\n const weekIndex = this.getDayInfo(dayIndex).weekIndex;\n /** @type {number} */\n let workLeft = this.agreedWorkMinutes;\n if (workLeft !== null) {\n if (possibleWork !== undefined) {\n workLeft = Math.min(workLeft, possibleWork.maxWorkMinutes);\n }\n workLeft -= this.paidwork * 60;\n }\n const workLeftWeek = this.getMinWorkWeekLeft(weekIndex, possibleWork);\n if (workLeft !== null) {\n return Math.max(workLeft, workLeftWeek);\n }\n\n return workLeftWeek;\n }\n\n /**\n * @private\n * @param {number} weekIndex\n * @param {{maxWorkMinutesByWeekIndex:number[]}} [possibleWork]\n */\n getMinWorkWeekLeft(weekIndex, possibleWork = undefined) {\n let minWorkWeek = this.emp.minWorkWeek;\n if (minWorkWeek !== null) {\n if (possibleWork) {\n minWorkWeek = Math.min(minWorkWeek, possibleWork.maxWorkMinutesByWeekIndex[weekIndex]);\n }\n return minWorkWeek - this.paidWorkWeek(weekIndex) * 60;\n }\n return 0;\n }\n\n /**\n * @private\n * @param {number} weekIndex\n */\n getMaxWorkWeekLeft(weekIndex) {\n if (this.emp.maxWorkWeek !== null) {\n return this.emp.maxWorkWeek - this.paidWorkWeek(weekIndex) * 60;\n }\n return Number.POSITIVE_INFINITY;\n }\n\n /**\n * @param {{adherenceBase:number;taskTypesByKind:Map>;timeRange:import(\"#shared/dn-date-interval\").DateInterval; timeToRemove:{st:Date;fi:Date}[];unitDays:boolean;useShiftBounds:boolean;calcAttendance:boolean}} payrollRule\n */\n getPayrollTime(payrollRule) {\n const timeRange = payrollRule.timeRange;\n let timeToRemove = payrollRule.timeToRemove;\n if (payrollRule.useShiftBounds) {\n timeToRemove = timeToRemove.slice();\n let st = timeRange.st;\n let bounds = getShiftBounds2(timeRange.byIndex(-1).dt, st, this.tasks, this);\n if (bounds.st < bounds.fi && bounds.fi > st) {\n st = bounds.fi;\n }\n timeToRemove.push({ st: addDays(st, -1000), fi: st });\n\n let fi = timeRange.fi;\n bounds = getShiftBounds2(timeRange.byIndex(timeRange.numberOfDays - 1).dt, fi, this.tasks, this);\n if (bounds.st < bounds.fi && bounds.fi > fi) {\n fi = bounds.fi;\n }\n timeToRemove.push({ st: fi, fi: addDays(fi, 1000) });\n }\n\n /** @type {TaskSimple[]} */\n let tasks;\n if (payrollRule.taskTypesByKind.size > 0) {\n tasks = this.getPayrollTasks(payrollRule);\n if (payrollRule.unitDays) {\n tasks = subtractTasks(tasks, timeToRemove);\n return sumDays(tasks, timeRange);\n }\n } else if (payrollRule.unitDays) {\n if (payrollRule.calcAttendance) {\n const allAttendanceTasks = this.getAttendanceTasks(payrollRule.adherenceBase);\n const attendanceTasks = subtractTasks(allAttendanceTasks, timeToRemove);\n tasks = subtractTasks(this.tasks, timeToRemove).filter(x => !this.taskTypeById.get(x.tasktypeId).requiresLog);\n return sumDays(attendanceTasks.concat(tasks), timeRange);\n } else {\n tasks = subtractTasks(this.tasks, timeToRemove);\n /** @type {{st:Date, fi:Date}[]} */\n const toCount = [];\n for (let i = 0; i < timeRange.numberOfDays; i++) {\n const dt = timeRange.byIndex(i).dt;\n const nextDt = timeRange.byIndex(i + 1).dt;\n const bounds = getShiftBounds2(dt, nextDt, tasks, this);\n if (bounds.st < bounds.fi) {\n toCount.push(bounds);\n }\n }\n for (const t of subtractTasks(this.absences, timeToRemove)) {\n if (this.taskTypeById.get(t.tasktypeId).paidBreak) {\n toCount.push(t);\n }\n }\n return sumDays(toCount, timeRange);\n }\n } else if (payrollRule.calcAttendance) {\n const allAttendanceTasks = this.getAttendanceTasks(payrollRule.adherenceBase);\n const attendanceTasks = subtractTasks(allAttendanceTasks, timeToRemove);\n tasks = subtractTasks(this.tasks, timeToRemove);\n const breaks = subtractTasks(this.breaks, timeToRemove);\n return calculateAttendance(allAttendanceTasks, attendanceTasks, tasks, breaks, this.taskTypeById);\n } else {\n /** @type {TaskSimple[]} */\n const paidAbsence = [];\n /** @type {TaskSimple[]} */\n const toRemove = [];\n for (const t of this.breaks) {\n if (!this.taskTypeById.get(t.tasktypeId).paidBreak) {\n toRemove.push(t);\n }\n }\n for (const t of this.absences) {\n if (this.taskTypeById.get(t.tasktypeId).paidBreak) {\n paidAbsence.push(t);\n } else {\n toRemove.push(t);\n }\n }\n\n tasks = subtractTasks(this.tasks, toRemove);\n for (const t of subtractTasks(paidAbsence, this.tasks)) {\n tasks.push(t);\n }\n }\n\n tasks = subtractTasks(tasks, timeToRemove);\n return sumTasks(tasks);\n }\n\n /**\n * @private\n * @param {{ taskTypesByKind: Map>; unitDays: boolean; }} payrollRule\n */\n getPayrollTasks(payrollRule) {\n /** @type {TaskSimple[]} */\n const tasks = [];\n for (const [kind, ttSet] of payrollRule.taskTypesByKind) {\n let tasks2 = this.tasksByKind[kind].filter(x => ttSet.has(x.tasktypeId)).map(x => ({st: x.stCorrect, fi: x.fiCorrect, tasktypeId:x.tasktypeId}));\n if ((kind === TASK_KIND.task || kind === TASK_KIND.absence)) {\n /** @type {TaskSimple[]} */\n const toRemove = [];\n if (!payrollRule.unitDays) {\n for (const t of this.breaks) {\n if (!this.taskTypeById.get(t.tasktypeId).paidBreak) {\n toRemove.push(t);\n }\n }\n }\n if (kind === TASK_KIND.task) {\n for (const t of this.absences) {\n toRemove.push(t);\n }\n }\n tasks2 = subtractTasks(tasks2, toRemove);\n }\n tasks2 = subtractTasks(tasks2, tasks);\n for (const t of tasks2) {\n tasks.push(t);\n }\n }\n return tasks;\n }\n\n /**\n * @param {{adherenceBase:number;taskTypesByKind:Map>;timeRange:import(\"#shared/dn-date-interval\").DateInterval; timeIntervals:{st:Date;fi:Date}[];unitDays:boolean;calcAttendance:boolean}} payrollRule\n */\n getPayrollShiftBound(payrollRule) {\n const msPerHour = 1000 * 60 * 60;\n const timeRange = payrollRule.timeRange;\n let sum = 0;\n const allAttendanceTasks = payrollRule.calcAttendance ? this.getAttendanceTasks(payrollRule.adherenceBase) : undefined;\n const payrollTasks = payrollRule.taskTypesByKind.size > 0 ? this.getPayrollTasks(payrollRule) : undefined;\n for (let i = 0; i < timeRange.numberOfDays; i++) {\n const dt = timeRange.byIndex(i).dt;\n const nextDt = timeRange.byIndex(i + 1).dt;\n const shiftBounds = getShiftBounds2(dt, nextDt, this.tasks, this);\n if (shiftBounds.st < shiftBounds.fi) {\n let shiftOk = false;\n for (const ti of payrollRule.timeIntervals) {\n if (ti.st <= shiftBounds.st && shiftBounds.st < ti.fi) {\n shiftOk = true;\n break;\n }\n }\n if (shiftOk) {\n let value = 0;\n if (payrollRule.taskTypesByKind.size > 0) {\n for (const t of payrollTasks) {\n if (shiftBounds.st < t.fi && shiftBounds.fi > t.st) {\n value += (t.fi.getTime() - t.st.getTime()) / msPerHour;\n }\n }\n } else if (payrollRule.calcAttendance) {\n /** @type {TaskSimple[]} */\n const attendanceTasks = [];\n for (const t of allAttendanceTasks) {\n if (shiftBounds.st < t.fi && shiftBounds.fi > t.st) {\n attendanceTasks.push(t);\n }\n }\n /** @type {TaskSimple[]} */\n const tasks = [];\n for (const t of this.tasks) {\n if (shiftBounds.st < t.fi && shiftBounds.fi > t.st) {\n tasks.push(t);\n }\n }\n /** @type {TaskSimple[]} */\n const breaks = [];\n for (const t of this.breaks) {\n if (shiftBounds.st < t.fi && shiftBounds.fi > t.st) {\n breaks.push(t);\n }\n }\n value = calculateAttendance(allAttendanceTasks, attendanceTasks, tasks, breaks, this.taskTypeById);\n } else {\n value = this.calculateShiftPaidTime(shiftBounds, dt, nextDt);\n }\n\n if (value > 0) {\n if (payrollRule.unitDays) {\n sum += 1;\n } else {\n sum += value;\n }\n }\n }\n }\n }\n\n return sum;\n }\n\n /**\n * @param {number} dayIndex\n */\n isOkToWork(dayIndex) {\n return this.isEmpty(this.getDayInfo(dayIndex).dt) && this.isOkDaysInRow(dayIndex) && this.isOkWeekendsInRow(dayIndex);\n }\n\n /**\n * @private If days in row is ok if the given day is work.\n * @param {number} dayIndex\n */\n isOkDaysInRow(dayIndex) {\n if (this.emp.ghost) { return true; }\n const max = this.emp.maxDaysInRow;\n let count = 1;\n let d = dayIndex - 1;\n while (d >= 0) {\n if (this.getDayByIndex(d).hasWork) {\n count += 1;\n if (count > max)\n return false;\n } else {\n break;\n }\n d -= 1;\n }\n\n d = dayIndex + 1;\n while (d < this.numberOfDays) {\n if (this.getDayByIndex(d).hasWork) {\n count += 1;\n if (count > max)\n return false;\n } else {\n break;\n }\n d += 1;\n }\n\n return true;\n }\n\n /**\n * @private If weekend in row is ok if the given day is work.\n * @param {number} dayIndex\n */\n isOkWeekendsInRow(dayIndex) {\n if (this.emp.ghost) { return true; }\n const max = this.emp.maxWeekendsInRow;\n if (max === null || !this.getDayInfo(dayIndex).isWeekend) {\n return true;\n }\n\n let count = 1;\n let saturdayIndex = dayIndex;\n if (this.getDayInfo(dayIndex).day === 0) {\n saturdayIndex -= 1;\n }\n let d = saturdayIndex - 7;\n while (d >= -1) {\n if (this.getDayByIndex(d + 1).hasWork || (d >= 0 && this.getDayByIndex(d).hasWork)) {\n count += 1;\n if (count > max)\n return false;\n } else {\n break;\n }\n d -= 7;\n }\n\n d = saturdayIndex + 7;\n while (d < this.numberOfDays) {\n if (this.getDayByIndex(d).hasWork || (d + 1 < this.numberOfDays && this.getDayByIndex(d + 1).hasWork)) {\n count += 1;\n if (count > max)\n return false;\n } else {\n break;\n }\n d += 7;\n }\n\n return count <= max;\n }\n\n /**\n * @private\n * @param {number} dayIndex\n */\n isOkMinNightRest(dayIndex) {\n const minNightRest = this.emp.nightRest;\n if (minNightRest < 0) { return true; }\n const dayInfo = this.getDayByIndex(dayIndex);\n if (!dayInfo.hasWork) { return true; }\n const dayBefore = this.getDayByIndex(dayIndex - 1);\n if (dayBefore !== undefined && dayBefore.hasWork) {\n const nightRest = (dayInfo.shiftBounds.st.getTime() - dayBefore.shiftBounds.fi.getTime()) / 60000;\n if (nightRest < minNightRest) {\n return false;\n }\n }\n const dayAfter = this.getDayByIndex(dayIndex + 1);\n if (dayAfter !== undefined && dayAfter.hasWork) {\n const nightRest = (dayAfter.shiftBounds.st.getTime() - dayInfo.shiftBounds.fi.getTime()) / 60000;\n if (nightRest < minNightRest) {\n return false;\n }\n }\n\n return true;\n }\n\n checkRuleCompliance() {\n const agreedWorkDiff = this.getAgreedWorkMinutesDiff();\n let ok = true;\n if (agreedWorkDiff !== null) {\n if (agreedWorkDiff !== 0) { ok = false; }\n }\n\n const interval = this.calcInfo.paidWorkInterval;\n\n const weeks = [];\n for (let weekIndex = interval.weekIndexSt; weekIndex < interval.weekIndexFi; weekIndex++) {\n const minWorkWeekLeft = Math.max(0, this.getMinWorkWeekLeft(weekIndex));\n const maxWorkWeekViolation = Math.max(0, -this.getMaxWorkWeekLeft(weekIndex));\n if (minWorkWeekLeft > 0 || maxWorkWeekViolation > 0) {\n const weekStart = this.calcInfo.weeks[weekIndex];\n weeks.push({ weekStart, minWorkWeekLeft, maxWorkWeekViolation });\n ok = false;\n }\n }\n\n const days = [];\n for (let dayIndex = interval.dayIndexSt; dayIndex < interval.dayIndexFi; dayIndex++) {\n if (this.getDayByIndex(dayIndex).hasWork) {\n const dayInfo = this.getDayInfo(dayIndex);\n const isOkDaysInRow = this.isOkDaysInRow(dayIndex);\n const isOkWeekendsInRow = !dayInfo.isWeekend || this.isOkWeekendsInRow(dayIndex);\n const isOkMinNightRest = this.isOkMinNightRest(dayIndex);\n if (!isOkDaysInRow || !isOkWeekendsInRow || !isOkMinNightRest) {\n days.push({ dt: dayInfo.dt, isOkDaysInRow, isOkWeekendsInRow, isOkMinNightRest });\n ok = false;\n }\n }\n\n }\n\n return { employeeId: this.emp.id, ok, agreedWorkDiff, weeks, days };\n }\n\n /**\n * @private\n * @param {number} dayIndex\n */\n getBOWork(dayIndex) {\n const weekIndex = this.getDayInfo(dayIndex).weekIndex;\n let boWork = this._boWorkWeek[weekIndex];\n if (boWork === undefined) {\n boWork = 0;\n for (let i = 0; i < 7; i++) {\n const dayIndex = i + weekIndex * 7;\n const dayData = this.getDayByIndex(dayIndex);\n if (dayData.boWork) {\n boWork += dayData.boWork.workInMinutes;\n }\n }\n this._boWorkWeek[weekIndex] = boWork;\n }\n\n return boWork;\n }\n\n /**\n * @param {number} dayIndex\n */\n getBOWorkLeft(dayIndex) {\n if (this.emp.maxBOWeek) {\n return this.emp.maxBOWeek - this.getBOWork(dayIndex);\n }\n return undefined;\n }\n\n /**\n * @param {number} dayIndex\n * @param {{st:number, fi:number, ttId: number}} t\n */\n getBOScore(dayIndex, t) {\n if (this.boByTaskType) {\n const boSkillData = this.boByTaskType.get(t.ttId);\n if (boSkillData) {\n return boSkillData.getScore(dayIndex, t.st, t.fi);\n }\n }\n return -1;\n }\n\n /**\n * @param {number} dayIndex\n * @param {number} numberOfAgents\n */\n getBOTaskScore(dayIndex, numberOfAgents) {\n if (!this.boByTaskType) { return null; }\n const boWorkLeft = this.getBOWorkLeft(dayIndex);\n if (boWorkLeft <= 0) { return null; }\n /** @type {import(\"@/js/dn-optimize-shift\").SecondTaskScore[]} */\n const scores = [];\n for (const boSkillData of this.boByTaskType.values()) {\n const taskScore = boSkillData.getTaskScore(dayIndex, numberOfAgents, boWorkLeft);\n if (taskScore) {\n scores.push(taskScore);\n }\n }\n return scores;\n }\n\n /**\n * @param {number} dayIndex\n * @param {{id:number; optimizationPriority:number}} skill\n * @param {number} stQ\n * @param {number[]} arrayQ\n */\n getMinTargetScore(dayIndex, skill, stQ, arrayQ) {\n if (!this.plannedAndTarget) { return; }\n if (!this.emp.skills.includes(skill.id)) { return; }\n this.plannedAndTarget.setScores(dayIndex, skill, stQ, arrayQ)\n }\n\n /**\n * @private\n * @param {Date} dt\n */\n getShiftBoundsByDate(dt) {\n if (this.calcMode)\n return this.getDay(dt).shiftBounds;\n return getShiftBounds(dt, this.tasks);\n }\n\n /**\n * @param {DateInterval} dateInterval\n */\n calculatePaidWork(dateInterval) {\n this._paidwork = this.calculateWork(dateInterval);\n }\n\n /**\n * @param {{ st: Date; fi: Date; }} interval\n * @param {number} adherenceBase\n */\n getAttendance(interval, adherenceBase) {\n const allAttendanceTasks = this.getAttendanceTasks(adherenceBase);\n const attendanceTasks = cutToBounds(allAttendanceTasks, interval);\n const tasks = cutToBounds(this.tasks, interval);\n const breaks = cutToBounds(this.breaks, interval);\n return calculateAttendance(allAttendanceTasks, attendanceTasks, tasks, breaks, this.taskTypeById);\n }\n\n /**\n * @private\n * @param {number} adherenceBase\n * @returns {TaskSimple[]}\n */\n getAttendanceTasks(adherenceBase) {\n const attendanceTasks = adherenceBase === 1 ? this.inRotation : this.log;\n return attendanceTasks.map(x => ({ st: x.stCorrect, fi: x.fiCorrect, tasktypeId: x.tasktypeId }));\n }\n\n /**\n * @param {{ st: Date; fi: Date; }} interval\n */\n getLogTime(interval) {\n return calculateTimeInInterval(this.log, interval);\n }\n\n /**\n * @param {{ st: Date; fi: Date; }} interval\n */\n getRotationTime(interval) {\n return calculateTimeInInterval(this.inRotation, interval);\n }\n\n /**\n * @param {boolean} calendarDays\n */\n getPaidWork(calendarDays) {\n return this.calculateWork(this.dateInterval, false, calendarDays);\n }\n\n /**\n * @param {boolean} calendarDays\n */\n getOvertime(calendarDays) {\n return this.calculateWork(this.dateInterval, true, calendarDays);\n }\n\n /**\n * @param {Date} dt\n */\n hasWork(dt) {\n return this.getDay(dt).work > 0;\n }\n\n /**\n * @param {Date} dt\n */\n isEmpty(dt) {\n const fi = addDays(dt, 1);\n for (const t of this.tasks) {\n if (t.st >= dt && t.st < fi) {\n return false;\n }\n }\n\n for (const t of this.absences) {\n if (t.st >= dt && t.st < fi) {\n return false;\n }\n }\n\n return true;\n }\n\n getAddedOrDeletedTasks() {\n /** @type {Map} */\n const initialByKey = new Map();\n for (const t of this.initialTasks) {\n initialByKey.set(getKey(t), t);\n }\n\n /** @type {import(\"#shared/dn-task\").Task[]} */\n const added = [];\n compareWithInital(this.tasks);\n compareWithInital(this.breaks);\n compareWithInital(this.absences);\n\n /** @type {import(\"#shared/dn-task\").Task[]} */\n const deleted = [];\n for (const t of initialByKey.values()) {\n deleted.push(t);\n }\n\n return { added, deleted };\n\n /** @param {import(\"#shared/dn-task\").Task} t */\n function getKey(t) {\n return t.st.getTime() + '_' + t.tasktypeId;\n }\n\n /** @param {import(\"#shared/dn-task\").Task[]} tasks */\n function compareWithInital(tasks) {\n for (const t of tasks) {\n const key = getKey(t);\n const t2 = initialByKey.get(key);\n if (t2 !== undefined && t.fi.getTime() == t2.fi.getTime()) {\n initialByKey.delete(key);\n } else {\n added.push(t);\n }\n }\n }\n }\n}\n\nexport class EmployeeScheduleList {\n constructor() {\n /** @private @type {EmployeeSchedule[]} */\n this._list = [];\n }\n\n get list() {\n return this._list;\n }\n\n clear() {\n this._list = [];\n }\n\n /**\n * @param {number} numberOfDays\n * @param {Date} stDate\n * @param {Task[]} scheduleTasks\n * @param {import(\"#shared/dn-tasktype\").TaskTypes} taskTypes\n * @param {import(\"#shared/dn-employee\").Employee[]} employees\n * @param {boolean} includeInactive\n */\n load(numberOfDays, stDate, scheduleTasks, taskTypes, employees, includeInactive) {\n this._list = createSchedule({numberOfDays, st:stDate}, scheduleTasks, taskTypes, employees, includeInactive);\n }\n}\n\n/**\n * @param {TaskSimple[]} allAttendanceTasks\n * @param {TaskSimple[]} attendanceTasks\n * @param {TaskSimple[]} tasks\n * @param {TaskSimple[]} breaks\n * @param {Map} taskTypeMap\n */\nfunction calculateAttendance(allAttendanceTasks, attendanceTasks, tasks, breaks, taskTypeMap) {\n const attendanceBreaksTolerance = 1000 * 60 * 60 * 6;\n\n /** @type {{ st: Date; fi: Date; tasktypeId: number;}[]} */\n const paidBreaksOnLog = [];\n /** @type {{ st: Date; fi: Date; tasktypeId: number;}[]} */\n const unpaidBreaks = [];\n for (const br of breaks) {\n if (taskTypeMap.get(br.tasktypeId).paidBreak) {\n let hasBefore = false;\n let hasAfter = false;\n for (const t of allAttendanceTasks) {\n if (t.st < br.st && br.st.getTime() - t.fi.getTime() < attendanceBreaksTolerance) {\n hasBefore = true;\n }\n if (t.fi > br.fi && t.st.getTime() - br.fi.getTime() < attendanceBreaksTolerance) {\n hasAfter = true;\n }\n if (hasBefore && hasAfter) {\n paidBreaksOnLog.push(br);\n break;\n }\n }\n } else {\n unpaidBreaks.push(br);\n }\n }\n const noLogTasks = subtractTasks(tasks.filter(x => !taskTypeMap.get(x.tasktypeId).requiresLog), unpaidBreaks);\n return Math.round(100 * sumDateIntervals(attendanceTasks.concat(paidBreaksOnLog).concat(noLogTasks)) / (60 * 60 * 1000)) / 100;\n}\n\n/**\n * @param {import(\"#shared/dn-task\").Task[]} tasks\n * @param {{st:Date; fi:Date}} interval\n */\nfunction calculateTimeInInterval(tasks, interval) {\n const log = cutToBounds(tasks.map(x => ({ st: x.stCorrect, fi: x.fiCorrect, tasktypeId: x.tasktypeId })), interval);\n return Math.round(100 * sumDateIntervals(log) / (60 * 60 * 1000)) / 100;\n}\n\n/**\n* @param {import(\"#shared/dn-task\").Task[]} tasks\n* @param {{st:Date, fi:Date}} interval\n*/\nfunction deleteTasksOnInterval(tasks, interval) {\n let changed = false;\n for (let i = tasks.length - 1; i >= 0; i--) {\n const t = tasks[i];\n if (t.isContainedIn(interval)) {\n t.toDelete();\n tasks.splice(i, 1);\n changed = true;\n }\n }\n\n return changed;\n}\n\n/**\n * @typedef {{\n* availabilites:import(\"@/model/dn-availability\").Availabilities; \n* availabilityRequests:import(\"@/model/dn-availability-request\").AvailabilityRequests;\n* boData:import(\"@/js/dn-bo-data.js\").BOData;\n* callcenterId:number;\n* employeeCallcenters:import(\"@/model/dn-employee-cc\").EmployeeCallcenters;\n* plannedAndTarget: import(\"@/js/dn-planned-and-target.js\").PlannedAndTarget;\n* timezone: string;\n* }} CreateScheduleExtraParameter\n*/\n\n/**\n * @param {DateInterval} dateInterval Must start of a week if availabilites is not undefined\n * @param {import(\"#shared/dn-task\").Task[]} scheduleTasks\n * @param {import(\"#shared/dn-tasktype\").TaskTypes} taskTypes\n * @param {import(\"#shared/dn-employee\").Employee[]} employees\n * @param {boolean} includeInactive\n * @param {CreateScheduleExtraParameter} [extra] Don't make any changes from the outside to the task arrays in the returned objects if this is set.\n */\nexport function createSchedule(dateInterval, scheduleTasks, taskTypes, employees, includeInactive, extra = undefined) {\n const numberOfDays = dateInterval.numberOfDays;\n const stDate = dateInterval.st;\n const tasksByEmpId = getTasksByEmpId(numberOfDays, stDate, scheduleTasks, employees, includeInactive);\n /** @type {CalcInfo} */\n let calcInfo = undefined;\n /** @type {Map} */\n let availByEmp = undefined;\n /** @type {Date} */\n let fiDate = undefined;\n if (extra !== undefined) {\n availByEmp = new Map();\n const numberOfWeeks = Math.ceil(numberOfDays / 7);\n /** @type {{dt:Date; endOfDay:Date; day:number; isWeekend:boolean; weekIndex:number; tzDayInfo:import(\"#shared/dn-timezone\").TimezoneDayInfo}[]} */\n const days = [];\n let weekIndex = 0;\n for (let i = 0; i < numberOfDays; i++) {\n const tzDayInfo = dateInterval.byIndex(i);\n const dt = tzDayInfo.dt;\n const endOfDay = dateInterval.byIndex(i+1).dt;\n const day = dt.getDay();\n const isWeekend = day === 0 || day === 6;\n const dayData = { dt, endOfDay, day, isWeekend, weekIndex, tzDayInfo };\n days.push(dayData);\n\n if (i % 7 === 6) {\n weekIndex += 1;\n }\n }\n\n const weeks = []\n for (let i = 0; i < numberOfWeeks; i++) {\n weeks.push(addDays(stDate, 7 * i));\n }\n fiDate = addDays(stDate, numberOfWeeks * 7);\n const paidWorkInterval = { st: addDays(stDate, 7), numberOfWeeks: numberOfWeeks - 2, dayIndexSt: 7, dayIndexFi: 7 * (numberOfWeeks - 1), weekIndexSt: 1, weekIndexFi: numberOfWeeks - 1 };\n calcInfo = { days, weeks, paidWorkInterval };\n for (const availability of extra.availabilites.items) {\n /** @type {AvailabilityByDay} */\n const availByDay = []\n const dayCount = availability.weeks * 7;\n if (dayCount === 0) {\n continue;\n }\n\n let dayIndex = availability.getDayIndex(stDate);\n for (let i = 0; i < numberOfDays; i++) {\n availByDay.push(availability.getByDayIndex(dayIndex));\n dayIndex = (dayIndex + 1) % dayCount;\n }\n\n for (const empId of availability.employeeIdList) {\n availByEmp.set(empId, availByDay);\n }\n }\n }\n\n /** @type {EmployeeSchedule[]} */\n const schedule = [];\n for (const empTasks of tasksByEmpId.values()) {\n\n /** @type {AvailabilityByDay} */\n let availabilityByDay = undefined;\n if (availByEmp) {\n availabilityByDay = availByEmp.get(empTasks.employee.id);\n const arEmp = extra.availabilityRequests.getByEmp(empTasks.employee.id);\n if (arEmp) {\n availabilityByDay = createAvailabilityByDay(availabilityByDay, numberOfDays);\n arEmp.adjustQuarterHoursByDateAvailability(stDate, availabilityByDay);\n }\n\n const ec = extra.employeeCallcenters.getByEmp(empTasks.employee.id);\n if (ec) {\n const ccIntervals = ec.getOnInterval(empTasks.employee.ccid, stDate, fiDate, extra.callcenterId);\n if (ccIntervals.length > 0) {\n availabilityByDay = createAvailabilityByDay(availabilityByDay, numberOfDays);\n for (const ccInterval of ccIntervals) {\n let dt = getStartOfDay(ccInterval.st);\n let qSt = getQuarterHour(ccInterval.st);\n let nextDt = addDays(dt, 1);\n let dayIndex = getDayDiff(stDate, dt);\n while (dt < ccInterval.fi) {\n let nextNextDt = addDays(nextDt, 1);\n let qFi = 0;\n if (nextNextDt <= ccInterval.fi) {\n qFi = 96 * 2;\n } else if (nextDt <= ccInterval.fi) {\n qFi = 96 + getQuarterHour(ccInterval.fi);\n } else {\n qFi = getQuarterHour(ccInterval.fi);\n }\n\n const avails = availabilityByDay[dayIndex];\n let i = avails.length - 1;\n while (i >= 0) {\n const avail = avails[i];\n if (avail.st >= qSt && avail.fi <= qFi) {\n avails.splice(i, 1);\n } else if (avail.st < qSt && qFi < avail.fi) {\n avails.splice(i, 0, { st: qFi, fi: avail.fi });\n avail.fi = qSt;\n } else if (avail.st < qFi && avail.fi > qSt) {\n if (avail.st < qSt) {\n avail.fi = qSt;\n } else {\n avail.st = qFi;\n }\n }\n i--;\n }\n qSt = 0;\n dt = nextDt;\n nextDt = nextNextDt;\n dayIndex += 1;\n }\n }\n }\n }\n }\n\n schedule.push(new EmployeeSchedule(taskTypes.byId, empTasks.employee, empTasks.tasks, dateInterval, empTasks.index, calcInfo, availabilityByDay, extra))\n }\n return schedule;\n}\n\n/**\n * @param {AvailabilityByDay} availabilityByDay\n * @param {number} numberOfDays\n */\nfunction createAvailabilityByDay(availabilityByDay, numberOfDays) {\n if (availabilityByDay) {\n availabilityByDay = availabilityByDay.map(x => x.slice());\n } else {\n availabilityByDay = [];\n for (let i = 0; i < numberOfDays; i++) {\n availabilityByDay.push([{ st: 0, fi: 96 * 2 }]);\n }\n }\n return availabilityByDay;\n}\n\n/**\n * @param {TaskSimple[]} tasks\n * @param {{st:Date; fi:Date}} shift\n */\nexport function cutToBounds(tasks, shift) {\n /** @type {TaskSimple[]} */\n const shiftTasks = [];\n for (const t of tasks) {\n if (shift.st < t.fi && shift.fi > t.st) {\n if (t.st >= shift.st && t.fi <= shift.fi) {\n shiftTasks.push(t);\n } else {\n const taskCopy = { st: t.st, fi: t.fi, tasktypeId: t.tasktypeId };\n if (shift.st > taskCopy.st)\n taskCopy.st = shift.st;\n if (shift.fi < taskCopy.fi)\n taskCopy.fi = shift.fi;\n shiftTasks.push(taskCopy);\n }\n }\n }\n return shiftTasks;\n}\n\n/**\n * @param {Date} endDt\n * @param {DeletableDateInterval[]} tasks tasks should to be sorted\n * @param {boolean} ignoreToDelete\n */\nfunction getConnectedEnd(endDt, tasks,ignoreToDelete=false) {\n for (const task of tasks) {\n if ((!task.isToDelete||ignoreToDelete) && task.st <= endDt && task.fi > endDt) {\n endDt = task.fi;\n }\n }\n\n return endDt;\n}\n\n/**\n * @param {{ emp: import(\"#shared/dn-employee\").Employee; tasks: import(\"#shared/dn-task\").Task[]; breaks: import(\"#shared/dn-task\").Task[]; absences: import(\"#shared/dn-task\").Task[]; }} dayEmpSchedule\n * @param {Date} daySt\n * @param {Map} taskTypeMap only task kinds used\n * @param {number} length\n * @param {import(\"@/model/dn-employee-cc.js\").EmployeeCallcenters} employeeCallcenters\n * @param {number} ccId\n * @param {number[]} [taskTypeIds]\n */\nexport function getEmpWorkArray(dayEmpSchedule, daySt, taskTypeMap, length, employeeCallcenters, ccId, taskTypeIds = null) {\n /** @type {number[]} */\n const workArray = Array(length).fill(0);\n let tasks = []\n if (taskTypeIds !== null) { tasks = dayEmpSchedule.tasks.filter(t => taskTypeIds.includes(t.tasktypeId)) } else { tasks = dayEmpSchedule.tasks }\n\n if (tasks.length > 0) {\n const msPerIndex = 1000 * 60 * 15;\n for (const t of tasks) {\n if (!t.isToDelete) {\n const stQ = Math.max(0, Math.round((t.st.getTime() - daySt.getTime()) / msPerIndex));\n const fiQ = Math.min(length, (t.fi.getTime() - daySt.getTime()) / msPerIndex);\n if (taskTypeIds !== null) {\n for (let i = stQ; i < fiQ; i++) { workArray[i] = 1 }\n } else {\n const tt = taskTypeMap.get(t.tasktypeId);\n if (tt !== undefined) {\n const work = tt.work / 100;\n for (let i = stQ; i < fiQ; i++) { workArray[i] = work; }\n }\n }\n }\n }\n for (const t of dayEmpSchedule.breaks) {\n if (!t.isToDelete) {\n const stQ = Math.max(0, Math.round((t.st.getTime() - daySt.getTime()) / msPerIndex));\n const fiQ = Math.min(length, (t.fi.getTime() - daySt.getTime()) / msPerIndex);\n for (let i = stQ; i < fiQ; i++) { workArray[i] = 0 }\n }\n }\n for (const t of dayEmpSchedule.absences) {\n if (!t.isToDelete) {\n const stQ = Math.max(0, Math.round((t.st.getTime() - daySt.getTime()) / msPerIndex));\n const fiQ = Math.min(length, (t.fi.getTime() - daySt.getTime()) / msPerIndex);\n for (let i = stQ; i < fiQ; i++) { workArray[i] = 0 }\n }\n }\n\n const empCC = employeeCallcenters.getByEmp(dayEmpSchedule.emp.id);\n if (empCC) {\n const dayFi = addDays(daySt, 1);\n const ccIntervals = empCC.getOnInterval(dayEmpSchedule.emp.ccid, daySt, dayFi, ccId);\n for (const ccInterval of ccIntervals) {\n const stQ = ccInterval.st > daySt ? getQuarterHour(ccInterval.st) : 0;\n const fiQ = ccInterval.fi < dayFi ? getQuarterHour(ccInterval.fi) : 96;\n for (let i = stQ; i < fiQ; i++) { workArray[i] = 0; }\n }\n }\n }\n return workArray;\n}\n\n/**\n * @param {{ emp: import(\"#shared/dn-employee\").Employee; tasks: import(\"#shared/dn-task\").Task[]; breaks: import(\"#shared/dn-task\").Task[]; absences: import(\"#shared/dn-task\").Task[]; }} dayEmpSchedule\n * @param {Date} daySt\n * @param {number} length\n * @param {import(\"@/model/dn-employee-cc.js\").EmployeeCallcenters} employeeCallcenters\n * @param {number} ccId\n */\nfunction getEmpBreakArray(dayEmpSchedule, daySt, length, employeeCallcenters, ccId) {\n\n /** @type {number[]} */\n const breakArray = Array(length).fill(0);\n const msPerIndex = 1000 * 60 * 5;\n\n const breakArrayDetailed = Array(length * 3).fill(0);\n for (const t of dayEmpSchedule.breaks) {\n if (!t.isToDelete) {\n const stQ = Math.max(0, Math.round((t.st.getTime() - daySt.getTime()) / msPerIndex));\n const fiQ = Math.min(length * 3, (t.fi.getTime() - daySt.getTime()) / msPerIndex);\n for (let i = stQ; i < fiQ; i++) { breakArrayDetailed[i] = 1; }\n }\n }\n for (const t of dayEmpSchedule.absences) {\n if (!t.isToDelete) {\n const stQ = Math.max(0, Math.round((t.st.getTime() - daySt.getTime()) / msPerIndex));\n const fiQ = Math.min(length * 3, (t.fi.getTime() - daySt.getTime()) / msPerIndex);\n for (let i = stQ; i < fiQ; i++) { breakArrayDetailed[i] = 0; }\n }\n }\n for (let i = 0; i < length; i++) {\n breakArray[i] = (breakArrayDetailed[i * 3] + breakArrayDetailed[i * 3 + 1] + breakArrayDetailed[i * 3 + 2]) / 3\n }\n\n const empCC = employeeCallcenters.getByEmp(dayEmpSchedule.emp.id);\n if (empCC) {\n const dayFi = addDays(daySt, 1);\n const ccIntervals = empCC.getOnInterval(dayEmpSchedule.emp.ccid, daySt, dayFi, ccId);\n for (const ccInterval of ccIntervals) {\n const stQ = ccInterval.st > daySt ? getQuarterHour(ccInterval.st) : 0;\n const fiQ = ccInterval.fi < dayFi ? getQuarterHour(ccInterval.fi) : 96;\n for (let i = stQ; i < fiQ; i++) { breakArray[i] = 0; }\n }\n }\n\n return breakArray;\n}\n\n/**\n * @param {EmployeeSchedule[]} schedule\n * @param {Map} taskTypeMap\n * @param {Date} dtStart\n * @param {number} numberOfDays\n * @param {number} length\n * @param {import(\"@/model/dn-employee-cc.js\").EmployeeCallcenters} employeeCallcenters\n * @param {number} ccId\n * @param {number[]} [taskTypeIds]\n */\nexport function getEmpWorkMap(schedule, taskTypeMap, dtStart, numberOfDays, length, employeeCallcenters, ccId, taskTypeIds = null) {\n const emps = schedule.map(function (x) { return x.emp });\n /** @type {Map>} */\n const empWorkMap = new Map\n for (let e = 0; e < emps.length; e++) {\n empWorkMap.set(emps[e].id, new Map)\n }\n\n let dt = dtStart;\n let dtEnd = dtStart\n for (let d = 0; d < numberOfDays; d++) {\n dtEnd = addDays(dt, 1);\n const dtKey = getShortDate(dt);\n const daySchedule = schedule.map(function (x) { return { emp: x.emp, tasks: x.tasks.filter(isAtDt), breaks: x.breaks.filter(isAtDt), absences: x.absences.filter(isAtDt) } });\n for (const dayEmpSchedule of daySchedule) {\n const workArray = getEmpWorkArray(dayEmpSchedule, dt, taskTypeMap, length, employeeCallcenters, ccId, taskTypeIds);\n empWorkMap.get(dayEmpSchedule.emp.id).set(dtKey, workArray);\n }\n\n dt = dtEnd;\n }\n return empWorkMap;\n\n /**\n * @param {import(\"#shared/dn-task\").Task} t\n */\n function isAtDt(t) {\n return t.overlaps(dt, dtEnd);\n }\n}\n\n/**\n * @param {EmployeeSchedule[]} schedule\n * @param {Date} dtStart\n * @param {number} numberOfDays\n * @param {number} length\n * @param {import(\"@/model/dn-employee-cc\").EmployeeCallcenters} employeeCallcenters\n * @param {number} ccId\n */\nexport function getEmpBreakMap(schedule, dtStart, numberOfDays, length, employeeCallcenters, ccId) {\n const emps = schedule.map(function (x) { return x.emp });\n /** @type {Map>} */\n const empBreakMap = new Map\n for (let e = 0; e < emps.length; e++) {\n empBreakMap.set(emps[e].id, new Map)\n }\n\n let dt = dtStart;\n let dtEnd = dtStart\n for (let d = 0; d < numberOfDays; d++) {\n dtEnd = addDays(dt, 1);\n const dtKey = getShortDate(dt);\n const daySchedule = schedule.map(function (x) { return { emp: x.emp, tasks: x.tasks.filter(isAtDt), breaks: x.breaks.filter(isAtDt), absences: x.absences.filter(isAtDt) } });\n for (const dayEmpSchedule of daySchedule) {\n const breakArray = getEmpBreakArray(dayEmpSchedule, dt, length, employeeCallcenters, ccId);\n empBreakMap.get(dayEmpSchedule.emp.id).set(dtKey, breakArray);\n }\n\n dt = dtEnd;\n }\n return empBreakMap;\n\n /**\n * @param {import(\"#shared/dn-task\").Task} t\n */\n function isAtDt(t) {\n return t.overlaps(dt, dtEnd);\n }\n}\n\n/**\n * @param {Date} dt\n * @param {{tasks: DeletableDateInterval[]; absences: DeletableDateInterval[];}} schedule\n */\nexport function getMinShiftStart(dt, schedule) {\n const minTaskStart = getPossibleShiftStart(dt, schedule.tasks, true, true);\n const minAbsenceStart = getPossibleShiftStart(dt, schedule.absences, false, true);\n if (minTaskStart > dt)\n dt = minTaskStart;\n if (minAbsenceStart > dt) {\n dt = minAbsenceStart;\n }\n\n return new Date(dt);\n}\n\n/**\n * @param {Date} startDt\n * @param {DeletableDateInterval[]} tasks\n * @param {boolean} connectEnd\n * @param {boolean} addExtraTime\n */\nfunction getPossibleShiftStart(startDt, tasks, connectEnd = true, addExtraTime = false) {\n let hasTask = false;\n for (const task of tasks) {\n if (!task.isToDelete && task.st < startDt && startDt <= task.fi) {\n startDt = task.fi;\n hasTask = true;\n }\n }\n\n if (hasTask) {\n if (connectEnd)\n startDt = getConnectedEnd(startDt, tasks);\n if (addExtraTime)\n return new Date(startDt.getTime() + 1000 * 60 * 15);\n return startDt;\n }\n return startDt;\n}\n\n/**\n * @param {Date} dt\n * @param {DeletableDateInterval[]} tasks tasks that connect over midnight\n * @param {{absences:DeletableDateInterval[];breaks:DeletableDateInterval[];payments:DeletableDateInterval[]}} schedule\n * @param {boolean} ignoreToDelete\n */\nexport function getShiftBounds(dt, tasks, schedule = undefined,ignoreToDelete=false) {\n return getShiftBounds2(dt, addDays(dt, 1), tasks, schedule, ignoreToDelete);\n}\n\n/**\n * @param {Date} dt\n * @param {Date} dtEnd\n * @param {DeletableDateInterval[]} tasks tasks that connect over midnight\n * @param {{absences:DeletableDateInterval[];breaks:DeletableDateInterval[];payments:DeletableDateInterval[]}} schedule\n * @param {boolean} ignoreToDelete\n */\nexport function getShiftBounds2(dt, dtEnd, tasks, schedule = undefined, ignoreToDelete=false) {\n const shift = { st: new Date(8640000000000000), fi: new Date(-8640000000000000) }\n const startDt = getPossibleShiftStart(dt, tasks);\n\n setShiftBounds(shift, startDt, dtEnd, tasks,ignoreToDelete);\n if (schedule) {\n setShiftBounds(shift, startDt, dtEnd, schedule.absences,ignoreToDelete);\n setShiftBounds(shift, startDt, dtEnd, schedule.breaks,ignoreToDelete);\n setShiftBounds(shift, startDt, dtEnd, schedule.payments,ignoreToDelete);\n }\n\n shift.fi = getConnectedEnd(shift.fi, tasks,ignoreToDelete);\n return shift;\n}\n\n/**\n * @param {number} numberOfDays\n * @param {Date} stDate\n * @param {import(\"#shared/dn-task\").Task[]} scheduleTasks\n * @param {import(\"#shared/dn-employee\").Employee[]} employees\n * @param {boolean} includeInactive\n */\nfunction getTasksByEmpId(numberOfDays, stDate, scheduleTasks, employees, includeInactive) {\n const prevDate = addDays(stDate, -1);\n const fiDate = addDays(stDate, numberOfDays + 1);\n\n /** @type {Map} */\n const byEmpId = new Map();\n for (let e = 0; e < employees.length; e++) {\n if (employees[e].active || includeInactive) {\n byEmpId.set(employees[e].id, { index: e, employee: employees[e], tasks: [] });\n }\n }\n for (const task of scheduleTasks) {\n const employeeSchedule = byEmpId.get(task.empid);\n if (employeeSchedule !== undefined) {\n if ((task.isInDB || !task.isToDelete) && task.overlaps(prevDate, fiDate)) {\n employeeSchedule.tasks.push(task);\n }\n }\n }\n\n return byEmpId;\n}\n\n/**\n * @param {import(\"@/model/dn-break-settings.js\").BreakSettings[]} breakSettings\n * @param {number} workMinutes\n */\nfunction getMaxDurForWork(breakSettings, workMinutes) {\n if (workMinutes === 0)\n return 0;\n let max = workMinutes;\n for (const bs of breakSettings) {\n const dur = bs.unpaidDurationMinutes + workMinutes;\n if (dur > max && bs.minShiftDurationMinutes <= dur && dur <= bs.maxShiftDurationMinutes) {\n max = dur;\n }\n }\n\n return max;\n}\n\n/**\n * @param {Map} taskTypeMap\n * @param {{tasks:import(\"#shared/dn-task\").Task[]; breaks:import(\"#shared/dn-task\").Task[]; absences: import(\"#shared/dn-task\").Task[]}} empSchedule\n */\nexport function getWork(taskTypeMap, empSchedule) {\n const tasks = empSchedule.tasks.filter(x => !x.isToDelete);\n const breaks = empSchedule.breaks.filter(x => !x.isToDelete);\n const absences = empSchedule.absences.filter(x => !x.isToDelete);\n return getWorkImpl(taskTypeMap, { tasks, breaks, absences });\n}\n\n/**\n * @param {Map} taskTypeMap\n * @param {import(\"#shared/dn-task\").Task[]} tasks\n * @param {import(\"#shared/dn-task\").Task[]} toRemove\n */\n\nexport function getWorkFromTasks(taskTypeMap, tasks, toRemove) {\n const filteredTasks = tasks.filter(x => !x.isToDelete);\n if (filteredTasks.length === 0)\n return 0;\n\n const filteredToRemove = toRemove.filter(x => !x.isToDelete);\n return getWorkImplFromTasks(taskTypeMap, tasks, filteredToRemove);\n}\n\n/**\n * @param {Map} taskTypeMap\n * @param {{tasks:TaskSimple[]; breaks:TaskSimple[]; absences: TaskSimple[]}} empSchedule\n * @param {boolean} usePaid\n */\nfunction getWorkImpl(taskTypeMap, empSchedule, usePaid = false) {\n const tasks = empSchedule.tasks;\n /** @type {TaskSimple[]} */\n const paidAbsence = [];\n /** @type {TaskSimple[]} */\n const toRemove = [];\n for (const t of empSchedule.breaks) {\n if (!taskTypeMap.get(t.tasktypeId).paidBreak) {\n toRemove.push(t);\n }\n }\n for (const t of empSchedule.absences) {\n if (taskTypeMap.get(t.tasktypeId).paidBreak) {\n paidAbsence.push(t);\n } else {\n toRemove.push(t);\n }\n }\n let work = 0;\n if (tasks.length > 0) {\n const remains = subtractTasks(tasks, toRemove);\n if (usePaid) {\n const msPerHour = 1000 * 60 * 60;\n return remains.reduce((sum, t) => sum + (t.fi.getTime() - t.st.getTime()) / msPerHour * taskTypeMap.get(t.tasktypeId).paid / 100, 0);\n }\n work = sumTasks(remains);\n }\n\n if (paidAbsence.length > 0) {\n const remains = subtractTasks(paidAbsence, tasks);\n work += sumTasks(remains);\n }\n\n return work;\n}\n\n/**\n * @param {Map} taskTypeMap\n * @param {{st:Date; fi:Date; tasktypeId:number}[]} tasks\n * @param {{st:Date; fi:Date; tasktypeId:number}[]} toRemove\n */\nfunction getWorkImplFromTasks(taskTypeMap, tasks, toRemove) {\n if (tasks.length === 0)\n return 0;\n\n const filteredToRemove = toRemove.filter(x => !taskTypeMap.get(x.tasktypeId).paidBreak);\n const remains = subtractTasks(tasks, filteredToRemove);\n\n return sumTasks(remains);\n}\n\n\n/**\n * @param {{st:Date;}[]} tasks\n * @param {import(\"#shared/dn-date-interval\").DateInterval} dateInterval\n */\nfunction sumDays(tasks, dateInterval) {\n const days = new Set();\n for (const t of tasks) {\n days.add(dateInterval.startOfDay(t.st).getTime());\n }\n return days.size;\n}\n\n/**\n * @param {{st:Date; fi:Date}[]} tasks\n */\nfunction sumTasks(tasks) {\n const msPerHour = 1000 * 60 * 60;\n return tasks.reduce((sum, t) => sum + (t.fi.getTime() - t.st.getTime()) / msPerHour, 0);\n}\n\n/**\n * @param {{ fi: Date; st: Date; }} shift\n * @param {Date} dt\n * @param {Date} dtEnd\n * @param {{st:Date; fi:Date; isToDelete?:boolean}[]} tasks\n * @param {boolean} ignoreToDelete\n */\nfunction setShiftBounds(shift, dt, dtEnd, tasks, ignoreToDelete) {\n for (const task of tasks) {\n if ((!task.isToDelete||ignoreToDelete) && task.st >= dt && task.st < dtEnd) {\n if (task.st < shift.st) {\n shift.st = task.st;\n }\n if (task.fi > shift.fi) {\n shift.fi = task.fi;\n }\n }\n }\n}\n\n/**\n * @param {TaskSimple[]} toCount\n * @param {{st:Date; fi:Date}[]} toRemove\n */\nexport function subtractTasks(toCount, toRemove) {\n const remains = toCount.map(t => ({ st: t.st, fi: t.fi, tasktypeId: t.tasktypeId }));\n for (const s of toRemove) {\n let i = 0;\n while (i < remains.length) {\n const t = remains[i];\n if (s.st < t.fi && s.fi > t.st) {\n if (t.st < s.st) {\n if (s.fi < t.fi) {\n const newFi = t.fi;\n t.fi = s.st;\n remains.push({ st: s.fi, fi: newFi, tasktypeId: t.tasktypeId })\n } else {\n t.fi = s.st;\n }\n } else if (s.fi < t.fi) {\n t.st = s.fi;\n } else {\n remains.splice(i, 1);\n continue;\n }\n }\n i++;\n }\n\n if (remains.length === 0)\n break;\n }\n\n return remains;\n}\n","import { ModelObject } from '#shared/dn-model-object';\nimport { fromISODate, toISODate } from '#shared/dn-shared-helper';\n\n/**\n * @typedef {{ id: number; empid?: string; ccid: number; name: string; agreedWorkWeek?:number|null, minWorkWeek?:number|null, maxWorkWeek?:number|null, optimizationOrder?:number,\n* email?: string; notify?:boolean, switchid?: string; rotations?: number; skills?: number[]; active?: boolean; tagIds?: number[]; userid?: number|null; password?:string,\n* maxDaysInRow?:number|null, maxWeekendsInRow?:number|null, nightRest?:number|null, address1?:string|null, address2?:string|null, address3?:string|null, agreedSms?:boolean|null, phoneNum?:string|null,\n* ghost?:boolean; username?:string|null; birthDate?:string|null; hireDate?:string|null; terminationDate?:string|null; note?:string|null, maxBOWeek?:number|null;absenceDuration?:number|null;\n* availabilityId?:number|null;shiftBagId?:number|null;rotationId?:number|null\n* }} EmployeeDto\n*/\n\n/**\n* @typedef {{employeeId:number; added:number[]; removed:number[]}} EmployeeSkillDto\n*/\n\nexport class Employee extends ModelObject {\n /**\n * @param {EmployeeDto} dto\n */\n constructor(dto) {\n super(dto.id);\n /** @private @type {string|null} */\n this._empid = dto.empid ? dto.empid : null;\n /** @private @type {number|null} */\n this._ccid = dto.ccid;\n /** @private @type {string} */\n this._name = dto.name;\n /** @private @type {number|null} */\n this._agreedWorkWeek = dto.agreedWorkWeek ? dto.agreedWorkWeek : null;\n /** @private @type {number|null} */\n this._minWorkWeek = dto.minWorkWeek ? dto.minWorkWeek : null;\n /** @private @type {number|null} */\n this._maxWorkWeek = dto.maxWorkWeek ? dto.maxWorkWeek : null;\n /** @private @type {number} */\n this._optimizationOrder = dto.optimizationOrder ? dto.optimizationOrder : 0;\n /** @private @type {number|null} */\n this._maxDaysInRow = dto.maxDaysInRow ? dto.maxDaysInRow : null;\n /** @private @type {number|null} */\n this._maxWeekendsInRow = dto.maxWeekendsInRow ? dto.maxWeekendsInRow : null;\n /** @private @type {number|null} */\n this._nightRest = dto.nightRest ? dto.nightRest : null;\n /** @private @type {number|null} */\n this._maxBOWeek = dto.maxBOWeek ? dto.maxBOWeek : null;\n /** @private @type {number|null} */\n this._absenceDuration = dto.absenceDuration ? dto.absenceDuration : null;\n /** @private @type {string|null} */\n this._email = dto.email ? dto.email : null;\n /** @private @type {string|null} */\n this._username = dto.username ? dto.username : null;\n let switchid = dto.switchid ? dto.switchid : null;\n if (switchid !== null) {\n switchid = switchid.trim();\n if (switchid === '') {\n switchid = null;\n }\n }\n\n /** @private @type {string|null} */\n this._switchid = switchid;\n /** @private @type {number[]} */\n this._skills = dto.skills ? dto.skills : [];\n /** @private @type {boolean|null} */\n this._active = dto.active !== false;\n /** @private @type {string} */\n this._password = '';\n /** @private @type {number[]} */\n this._tagIds = dto.tagIds ? dto.tagIds : [];\n /** @private @type {string|null} */\n this._address1 = dto.address1 ? dto.address1 : null;\n /** @private @type {string|null} */\n this._address2 = dto.address2 ? dto.address2 : null;\n /** @private @type {string|null} */\n this._address3 = dto.address3 ? dto.address3 : null;\n /** @private @type {boolean|null} */\n this._agreedSms = dto.agreedSms ? dto.agreedSms : null;\n /** @private @type {string|null} */\n this._phoneNum = dto.phoneNum ? dto.phoneNum : null;\n /** @type {number|null|undefined} */\n this.userId = dto.userid;\n /** @type {boolean} */\n this.ghost = dto.ghost ? dto.ghost : false;\n\n /** @private @type {Date|null} */\n this._birthDate = dto.birthDate ? fromISODate(dto.birthDate) : null;\n /** @private @type {Date|null} */\n this._hireDate = dto.hireDate ? fromISODate(dto.hireDate) : null;\n /** @private @type {Date|null} */\n this._terminationDate = dto.terminationDate ? fromISODate(dto.terminationDate) : null;\n /** @private @type {string|null} */\n this._note = dto.note;\n\n /** @type {number} */\n this.changeVersion = 0;\n /** @type {boolean} */\n this.notify = false;\n /** @private @type {boolean} */\n this._separateUsername = this.userId && this.email !== this.username;\n /** @private @type {number[]} */\n this._warnings = []\n /** @private @type {boolean} */\n this._checked = false\n\n }\n\n clone() {\n const dto = this.toDto();\n dto.skills = this.skills.slice();\n dto.tagIds = this.tagIds.slice();\n return new Employee(dto);\n }\n\n get birthDate() {\n return this._birthDate;\n }\n\n set birthDate(newValue) {\n this.setEmpDateValue('_birthDate', newValue);\n }\n\n get hireDate() {\n return this._hireDate;\n }\n\n set hireDate(newValue) {\n this.setEmpDateValue('_hireDate', newValue);\n }\n\n get separateUsername() {\n return this._separateUsername;\n }\n\n set separateUsername(newValue) {\n this.setEmpValue('_separateUsername', newValue);\n }\n\n get terminationDate() {\n return this._terminationDate;\n }\n\n set terminationDate(newValue) {\n this.setEmpDateValue('_terminationDate', newValue);\n }\n\n get note() {\n return this._note;\n }\n\n set note(newValue) {\n this.setEmpValue('_note', newValue);\n }\n\n get empid() {\n return this._empid\n }\n\n set empid(newValue) {\n if (newValue === '') { newValue = null; }\n this.setEmpValue('_empid', newValue);\n }\n\n get ccid() {\n return this._ccid\n }\n\n set ccid(newValue) {\n this.setEmpValue('_ccid', newValue);\n }\n\n get name() {\n return this._name\n }\n\n set name(newValue) {\n this.setEmpValue('_name', newValue);\n }\n\n get agworkhours() {\n return getHours(this.agreedWorkWeek);\n }\n\n set agworkhours(value) {\n this.setHours('_agreedWorkWeek', value);\n }\n\n /** agreed work per week in minutes */\n get agreedWorkWeek() {\n if (this.isExtra)\n return null;\n return this._agreedWorkWeek;\n }\n\n set agreedWorkWeek(value) {\n this.setEmpValue('_agreedWorkWeek', value);\n }\n\n get minWorkWeek() {\n if (this.isExtra)\n return null;\n return this._minWorkWeek;\n }\n\n set minWorkWeek(newValue) {\n this.setEmpValue('_minWorkWeek', newValue);\n }\n\n get minWorkWeekHours() {\n return getHours(this.minWorkWeek);\n }\n\n set minWorkWeekHours(value) {\n this.setHours('_minWorkWeek', value);\n }\n\n get maxWorkWeek() {\n return this._maxWorkWeek;\n }\n\n set maxWorkWeek(newValue) {\n this.setEmpValue('_maxWorkWeek', newValue);\n }\n\n get maxWorkWeekHours() {\n return getHours(this.maxWorkWeek);\n }\n\n set maxWorkWeekHours(value) {\n this.setHours('_maxWorkWeek', value);\n }\n\n get maxBOWeek() {\n return this._maxBOWeek;\n }\n\n set maxBOWeek(newValue) {\n this.setEmpValue('_maxBOWeek', newValue);\n }\n\n get maxBOWeekHours() {\n return getHours(this.maxBOWeek);\n }\n\n /**\n * @param {number} value\n */\n set maxBOWeekHours(value) {\n this.setHours('_maxBOWeek', value);\n }\n\n get absenceDuration() {\n return this._absenceDuration ? this._absenceDuration : 480;\n }\n\n set absenceDuration(newValue) {\n this.setEmpValue('_absenceDuration', newValue);\n }\n\n get absenceDurationHours() {\n return getHours(this._absenceDuration);\n }\n\n /**\n * @param {number} value\n */\n set absenceDurationHours(value) {\n this.setHours('_absenceDuration', value);\n }\n\n absenceStart() {\n const dur = this.absenceDuration;\n return Math.max(0, 60 * Math.floor((60 * 12 - dur / 2) / 60));\n }\n\n get optimizationOrder() {\n if (this.ghost) { return 4; }\n return this._optimizationOrder;\n }\n\n set optimizationOrder(newValue) {\n this.setEmpValue('_optimizationOrder', newValue);\n }\n\n get maxDaysInRow() {\n if (this._maxDaysInRow === null) {\n return 4;\n }\n return this._maxDaysInRow;\n }\n\n set maxDaysInRow(newValue) {\n if (this.maxDaysInRow !== newValue) {\n this.setEmpValue('_maxDaysInRow', newValue);\n }\n }\n\n get maxWeekendsInRow() {\n return this._maxWeekendsInRow;\n }\n\n set maxWeekendsInRow(newValue) {\n this.setEmpValue('_maxWeekendsInRow', newValue);\n }\n\n /**\n * Gets the min night rest in minutes.\n * @returns {number}\n * */\n get nightRest() {\n if (this._nightRest === null) {\n if (this.ghost) { return 15; }\n return 11 * 60;\n }\n return this._nightRest;\n }\n\n set nightRest(value) {\n if (this.nightRest !== value) {\n this.setEmpValue('_nightRest', value);\n }\n }\n\n get nightRestHours() {\n return getHours(this.nightRest);\n }\n\n set nightRestHours(value) {\n this.setHours('_nightRest', value);\n }\n\n get email() {\n return this._email;\n }\n\n set email(newValue) {\n if (!newValue) { newValue = null; }\n this.setEmpValue('_email', newValue);\n }\n\n get username() {\n return this._username;\n }\n\n set username(newValue) {\n if (!newValue) { newValue = null; }\n this.setEmpValue('_username', newValue);\n }\n\n get switchid() {\n return this._switchid;\n }\n\n set switchid(newValue) {\n if (newValue !== null) {\n newValue = newValue.trim();\n if (newValue === '') {\n newValue = null;\n }\n }\n this.setEmpValue('_switchid', newValue);\n }\n\n get switchIdList() {\n if (this.switchid) {\n return this.switchid.split(';');\n }\n\n return [];\n }\n\n set switchIdList(idList) {\n if (idList.length === 0) {\n this.switchid = null;\n } else {\n this._switchid = idList.join(';');\n }\n }\n\n get skills() {\n return this._skills\n }\n\n set skills(newValue) {\n this.setEmpNumberArrayValue('_skills', newValue);\n }\n\n get tagIds() {\n return this._tagIds\n }\n\n set tagIds(newValue) {\n this.setEmpNumberArrayValue('_tagIds', newValue);\n }\n\n get active() {\n return this._active\n }\n\n set active(newValue) {\n this.setEmpValue('_active', newValue);\n }\n\n get password() {\n return this._password\n }\n\n set password(newValue) {\n if (newValue === '') { newValue = null; }\n this.setEmpValue('_password', newValue);\n }\n\n get isExtra() {\n return this.optimizationOrder !== 0;\n }\n\n set isExtra(newValue) {\n if (newValue) {\n this.optimizationOrder = 1;\n } else {\n this.optimizationOrder = 0;\n }\n }\n\n get address1() {\n return this._address1;\n }\n\n set address1(newValue) {\n if (newValue === '') { newValue = null; }\n this.setEmpValue('_address1', newValue);\n }\n\n get address2() {\n return this._address2;\n }\n\n set address2(newValue) {\n if (newValue === '') { newValue = null; }\n this.setEmpValue('_address2', newValue);\n }\n\n get address3() {\n return this._address3;\n }\n\n set address3(newValue) {\n if (newValue === '') { newValue = null; }\n this.setEmpValue('_address3', newValue);\n }\n\n get agreedSms() {\n return this._agreedSms;\n }\n\n set agreedSms(newValue) {\n this.setEmpValue('_agreedSms', newValue);\n }\n\n get phoneNum() {\n return this._phoneNum;\n }\n\n set phoneNum(newValue) {\n this.setEmpValue('_phoneNum', newValue);\n }\n\n set warnings(newValue) {\n this._warnings = newValue\n }\n get warnings() {\n return this._warnings\n }\n\n set checked(newValue) {\n this._checked = newValue\n }\n get checked() {\n return this._checked\n }\n\n hasChangesWorkTime() {\n return this.hasChangesPart(['_agreedWorkWeek', '_maxWorkWeek', '_minWorkWeek', '_optimizationOrder', '_maxBOWeek', '_absenceDuration']);\n }\n\n hasChangesTags() {\n return this.hasChangesPart(['_tagIds']);\n }\n\n hasChangesWorkDays() {\n return this.hasChangesPart(['_maxDaysInRow', '_maxWeekendsInRow', '_nightRest']);\n }\n\n hasChangesGeneral() {\n return this.hasChangesPart(['_name', '_empid', '_switchid', '_phoneNum', '_active', '_email', '_username',\n '_password', '_address1', '_address2', '_address3', '_birthDate', '_hireDate', '_separateUsername', '_terminationDate', '_note']);\n }\n\n /**\n * @param {number[]} skills\n */\n hasSameSkills(skills) {\n if (skills.length !== this.skills.length)\n return false;\n\n for (const skill of this.skills) {\n if (!skills.includes(skill))\n return false;\n }\n\n return true;\n }\n\n /**\n * @param {Employee} other\n */\n hasSameWorkTimes(other) {\n return !this.ghost && !other.ghost && other.agreedWorkWeek === this.agreedWorkWeek &&\n other.maxWorkWeek === this.maxWorkWeek &&\n other.minWorkWeek === this.minWorkWeek &&\n other.optimizationOrder === this.optimizationOrder &&\n other.maxBOWeek === this.maxBOWeek &&\n other._absenceDuration === this._absenceDuration;\n }\n\n /**\n * @param {Employee} other\n */\n hasSameWorkDaySettings(other) {\n return !this.ghost && !other.ghost && other.maxDaysInRow === this.maxDaysInRow &&\n other.maxWeekendsInRow === this.maxWeekendsInRow &&\n other.nightRest === this.nightRest;\n }\n\n /**\n * @param {Employee} other\n */\n copyWorkWorkDaySettings(other) {\n this.maxDaysInRow = other.maxDaysInRow;\n this.maxWeekendsInRow = other.maxWeekendsInRow;\n this.nightRest = other.nightRest;\n }\n\n /**\n * @param {Employee} other\n */\n copyWorkHours(other) {\n this.agreedWorkWeek = other.agreedWorkWeek;\n this.maxWorkWeek = other.maxWorkWeek;\n this.minWorkWeek = other.minWorkWeek;\n this.optimizationOrder = other.optimizationOrder;\n this.maxBOWeek = other.maxBOWeek;\n this.absenceDuration = other._absenceDuration;\n }\n\n isUsernameOk() {\n return !this.separateUsername || !this.username || this.username.length > 3\n }\n\n /**\n * @param {number[]} tagIdList\n */\n hasAnyTag(tagIdList) {\n if (tagIdList.length === 0) {\n return true;\n }\n for (const tagId of tagIdList) {\n if (this.tagIds.includes(tagId)) {\n return true;\n }\n }\n return false;\n }\n\n /** @returns {EmployeeSkillDto} */\n toEmployeeSkillDto() {\n if (this.originalMap !== undefined) {\n const original = this.originalMap.get('_skills');\n if (original) {\n /** @type {number[]} */\n const originalSkills = original.value;\n const added = [];\n for (const skillId of this.skills) {\n if (!originalSkills.includes(skillId)) {\n added.push(skillId);\n }\n }\n const removed = [];\n for (const skillId of originalSkills) {\n if (!this.skills.includes(skillId)) {\n removed.push(skillId);\n }\n }\n return { employeeId: this.id, added, removed };\n }\n }\n\n return undefined;\n }\n\n /**\n * @returns {EmployeeDto}\n */\n toDto(patchSave = false) {\n let username = this.username;\n if (!this.separateUsername) {\n if (this.userId) {\n username = this.email;\n } else {\n username = null;\n }\n }\n\n const dto = {\n id: this.id, empid: this.empid, ccid: this.ccid, name: this.name,\n agreedWorkWeek: this.agreedWorkWeek, maxBOWeek: this._maxBOWeek, absenceDuration: this._absenceDuration, minWorkWeek: this.minWorkWeek, maxWorkWeek: this.maxWorkWeek, optimizationOrder: this._optimizationOrder,\n maxDaysInRow: this._maxDaysInRow, maxWeekendsInRow: this._maxWeekendsInRow, nightRest: this._nightRest,\n email: this.email, notify: this.notify, switchid: this.switchid,\n active: this.active, password: this.password, tagIds: this.tagIds.slice(), userid: this.userId,\n address1: this._address1, address2: this._address2, address3: this._address3, agreedSms: this.agreedSms, phoneNum: this._phoneNum, ghost: this.ghost, username: username,\n birthDate: toISODate(this.birthDate), hireDate: toISODate(this.hireDate), terminationDate: toISODate(this.terminationDate), note: this.note\n };\n\n if (!patchSave) { // don't allow saving skills in patch\n dto.skills = this.skills.slice();\n }\n\n return dto;\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {Date} value\n */\n setEmpDateValue(prop, value) {\n if (this.setDateValue(prop, value)) {\n this.changeVersion += 1;\n }\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {string | number | boolean} value\n */\n setEmpValue(prop, value) {\n if (this.setValue(prop, value)) {\n this.changeVersion += 1;\n }\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {number[]} value\n */\n setEmpNumberArrayValue(prop, value) {\n if (this.setNumberArrayValue(prop, value)) {\n this.changeVersion += 1;\n }\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {any} value\n */\n setHours(prop, value) {\n let numberValue;\n switch (typeof (value)) {\n case 'number':\n numberValue = value;\n break;\n case 'string':\n numberValue = parseFloat(value);\n break;\n default:\n numberValue = null;\n break;\n }\n\n if (isNaN(numberValue)) {\n numberValue = null;\n }\n\n if (numberValue !== null) {\n numberValue *= 60;\n }\n\n this.setEmpValue(prop, numberValue);\n }\n\n workTimeOk() {\n if (this.agreedWorkWeek > 0) {\n if (this.minWorkWeek > 0) {\n if (this.minWorkWeek > this.agreedWorkWeek) {\n return false;\n }\n }\n if (this.maxWorkWeek > 0) {\n if (this.maxWorkWeek < this.agreedWorkWeek) {\n return false;\n }\n }\n }\n if (this.minWorkWeek > 0 && this.maxWorkWeek > 0) {\n if (this.minWorkWeek > this.maxWorkWeek) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * @param {EmployeeDto} dto\n */\nexport function employeeFromDto(dto) {\n return new Employee(dto);\n}\n\n/**\n * @param {number} value\n */\nfunction getHours(value) {\n return value ? value / 60 : null;\n}","export class ModelObject {\n /**\n * @param {number} id\n */\n constructor(id) {\n \n /** @protected @type {number} */\n this._id = id;\n\n /** @private @type {boolean} */\n this._hasChanges = this._id < 0;\n\n /** @private @type {boolean} */\n this._isToDelete = false;\n }\n\n /** @return {number} */\n get id() {\n return this._id;\n }\n set id(value) {\n this._id = value;\n }\n\n /** @return {boolean} */\n get isToDelete() {\n return this._isToDelete;\n }\n\n /** @return {boolean} */\n get hasChanges() {\n return this._hasChanges;\n }\n\n isInDB() {\n return this._id >= 0;\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {any} value\n * @param {(arg0: any) => any} [eqProjection]\n */\n setValueImpl(prop, value, eqProjection) {\n const originalValue = this[prop];\n let projOriginalValue = originalValue;\n let projValue = value;\n if (eqProjection) {\n projOriginalValue = eqProjection(originalValue);\n projValue = eqProjection(projValue);\n }\n\n const diff = projOriginalValue !== projValue;\n if (diff) {\n this[prop] = value;\n if (this.originalMap === undefined) {\n /** @type {Map} */\n this.originalMap = new Map();\n this.originalMap.set(prop, { value: originalValue, projValue: projOriginalValue });\n } else {\n const original = this.originalMap.get(prop);\n if (original === undefined) {\n this.originalMap.set(prop, { value: originalValue, projValue: projOriginalValue });\n } else if (original.projValue === projValue) {\n this.originalMap.delete(prop);\n }\n }\n this.setHasChanges();\n }\n return diff;\n }\n\n /**\n * @protected\n * @param {string} prop\n * @param {number|string|boolean} value\n */\n setValue(prop, value) {\n return this.setValueImpl(prop, value);\n }\n\n /**\n * @protected\n * @param {string} prop\n * @param {Date} value\n */\n setDateValue(prop, value) {\n return this.setValueImpl(prop, value, dateProj);\n }\n\n /**\n * @protected\n * @param {string} prop\n * @param {number[]} value\n */\n setNumberArrayValue(prop, value) {\n return this.setValueImpl(prop, value, numberArrayProj);\n }\n\n /**\n * @private\n * @param {string} prop\n * @param {any} value\n * @param {(arg0: any) => any} [eqProjection]\n */\n setOriginalValueImpl(prop, value, eqProjection) {\n let x = this[prop];\n let projValue = value;\n if (eqProjection) {\n x = eqProjection(x);\n projValue = eqProjection(value);\n }\n\n const diff = x !== projValue;\n if (diff) {\n if (this.originalMap === undefined || !this.originalMap.has(prop)) {\n this[prop] = value;\n } else {\n this.originalMap.set(prop, { value: value, projValue: projValue });\n }\n\n this.setHasChanges();\n } else {\n if (this.originalMap !== undefined && this.originalMap.has(prop)) {\n this.originalMap.delete(prop);\n this.setHasChanges();\n }\n }\n return diff;\n }\n\n /**\n * @protected\n * @param {string} prop\n * @param {number|string|boolean} value\n */\n setOriginalValue(prop, value) {\n return this.setOriginalValueImpl(prop, value);\n }\n\n /**\n * @protected\n * @param {string} prop\n * @param {Date} value\n */\n setOriginalDateValue(prop, value) {\n return this.setOriginalValueImpl(prop, value, dateProj);\n }\n\n /**\n * @param {{itemHasChanged:(hasChanges:boolean) => void; itemChanged?: (model:ModelObject) => void}} container\n */\n setContainer(container) {\n /** @private @type {{itemHasChanged:(hasChanges:boolean) => void; itemChanged?: (model:ModelObject) => void}} */\n this._container = container;\n }\n\n hasContainer(){ \n return this._container!==undefined\n }\n\n /** @protected */\n setHasChanges() {\n /** @type {boolean} */\n let hasChanges;\n if (this.id < 0) {\n hasChanges = !this.isToDelete;\n } else {\n hasChanges = this.isToDelete || (this.originalMap !== undefined && this.originalMap.size > 0);\n }\n if (this._container !== undefined && this._container.itemChanged !== undefined) {\n this._container.itemChanged(this);\n }\n if (this._hasChanges !== hasChanges) {\n this._hasChanges = hasChanges;\n if (this._container !== undefined) {\n this._container.itemHasChanged(hasChanges);\n }\n }\n }\n\n /**\n * @protected\n * @param {string[]} fields\n */\n hasChangesPart(fields) {\n if (this.originalMap !== undefined) {\n for (const field of fields) {\n if (this.originalMap.has(field)) { return true; }\n }\n }\n\n return false;\n }\n\n confirmChanges() {\n this.originalMap = undefined;\n this.setHasChanges();\n }\n\n revert() {\n if (this.originalMap !== undefined) {\n for (const [prop, original] of this.originalMap) {\n this[prop] = original.value;\n }\n this.confirmChanges();\n }\n }\n\n resurrect() {\n this._isToDelete = false;\n this.setHasChanges();\n }\n\n toDelete() {\n if (this.id < 0) {\n this.originalMap = undefined;\n }\n this._isToDelete = true;\n this.setHasChanges();\n }\n undoToDelete(){\n this._isToDelete = false;\n this.setHasChanges();\n }\n}\n\n/**\n * @param {Date|null} dt\n */\nfunction dateProj(dt) {\n return dt !== null ? dt.getTime() : null;\n}\n\n/**\n * @param {number[]} list\n */\nfunction numberArrayProj(list) {\n list.sort();\n return list.join('_');\n}","\n/**\n * @param {Date} dt\n * @param {number} days\n */\nexport function addDays(dt, days) {\n const result = new Date(dt)\n result.setDate(dt.getDate() + days)\n return result;\n}\n\n/**\n * @param {Date} dt1\n * @param {Date} dt2\n */\nexport function getDayDiff(dt1, dt2) {\n const diffTime = Math.abs(dt2.getTime() - dt1.getTime());\n const diffDays = Math.round(diffTime / (1000 * 60 * 60 * 24));\n return diffDays;\n}\n\n/**\n * convert string of format YYYY-MM-DD to Date with\n * @param {string} isoDate\n */\nexport function fromISODate(isoDate) {\n if (!isoDate)\n return null;\n return new Date(isoDate + 'T00:00:00');\n}\n\n/**\n * @param {Date} dt\n */\nexport function getQuarterHour(dt) {\n return dt.getHours() * 4 + Math.round(dt.getMinutes() / 15);\n}\n\n/**\n * @param {Date} dt\n */\nexport function getShortDate(dt) {\n var mm = dt.getMonth() + 1; // getMonth() is zero-based\n var dd = dt.getDate();\n return [dt.getFullYear(), (mm > 9 ? '' : '0') + mm, (dd > 9 ? '' : '0') + dd].join('-');\n}\n\n/**\n * @param {Date} dt\n */\nexport function getStartOfDay(dt) {\n var startOfDay = new Date(dt);\n startOfDay.setHours(0, 0, 0, 0);\n return startOfDay;\n}\n\n/**\n * Sorts all intervals in place.\n * @param {{st:Date; fi:Date}[]} dateIntervals\n */\nexport function sortDateIntervals(dateIntervals) {\n dateIntervals.sort((a, b) => {\n let diff = a.st.getTime() - b.st.getTime();\n if (diff === 0) {\n diff = b.fi.getTime() - a.fi.getTime();\n }\n return diff;\n });\n}\n\n/**\n * @param {{st:Date; fi:Date}[]} dateIntervals\n */\nexport function sumDateIntervals(dateIntervals) {\n sortDateIntervals(dateIntervals)\n let sum = 0;\n let lastTime = 0;\n for (const interval of dateIntervals) {\n let stMs = interval.st.getTime();\n let fiMs = interval.fi.getTime();\n if (lastTime > stMs) {\n stMs = lastTime;\n }\n if (stMs < fiMs) {\n sum += fiMs - stMs;\n lastTime = fiMs;\n }\n }\n return sum;\n}\n\n/**\n * convert local time to a string of format YYYY-MM-DD\n * @param {Date} date\n */\nexport function toISODate(date) {\n if (!date)\n return null;\n return date.toLocaleDateString('sv-SE', { year: 'numeric', month: 'numeric', day: 'numeric' });\n}\n","import { ModelObject } from '#shared/dn-model-object';\n\n/**\n* @typedef {{id?:number; empid:number; st:string|Date; fi:string|Date|null; tasktypeId:number; comment?:string; reasonCode?:string; corrSt?:number; corrFi?:number;userId?:number;updated?:string|Date}} TaskDto\n*/\n\nconst msPerMinute = 60 * 1000;\nconst msPerHours = 60 * msPerMinute;\nconst msPerNormalDay = 24 * msPerHours;\nlet negativeId = -1\n\n/**\n * @param {TaskDto} dto\n */\nfunction getNegativeId(dto) {\n let returnValue = -1;\n if (dto.empid) {\n negativeId = negativeId - 1;\n returnValue = negativeId;\n }\n return returnValue;\n}\n\nexport class Task extends ModelObject {\n /**\n * @param {TaskDto} dto\n */\n constructor(dto) {\n super(dto.id ? dto.id : getNegativeId(dto))\n /** @private @type {number} */\n this._empid = dto.empid;\n /** @private @type {Date} */\n this._st = convertToDate(dto.st);\n /** @private @type {Date|null} */\n this._fi = convertToDate(dto.fi);\n /** @type {string} */\n this._comment = convertToString(dto.comment);\n /** @private @type {number} */\n this._tasktypeId = dto.tasktypeId;\n /** @private @type {number} */\n this._corrSt = convertToNumber(dto.corrSt);\n /** @private @type {number} */\n this._corrFi = convertToNumber(dto.corrFi);\n /** @private @type {string|undefined} */\n this._reasonCode = dto.reasonCode;\n /** @private @type {Date} */\n this._updated = dto.updated ? new Date(dto.updated) : null;\n /** @private @type {number} */\n this._userId = dto.userId;\n\n /** @private @type {Date} */\n this._lastSt = this._st\n\n /** @private @type {Date|null} */\n this._lastFi = this._fi\n\n /** @private @type {number} */\n this._logStToggleIndex = 0\n\n /** @private @type {number} */\n this._logFiToggleIndex = 0\n }\n\n /**\n * @param {TaskDto} dto\n */\n update(dto) {\n this._id = dto.id;\n this.setOriginalValue('_empid', dto.empid)\n this.setOriginalDateValue('_st', convertToDate(dto.st));\n this.setOriginalDateValue('_fi', convertToDate(dto.fi));\n this.setOriginalValue('_tasktypeId', dto.tasktypeId);\n this.setOriginalValue('_comment', convertToString(dto.comment));\n this.setOriginalValue('_corrSt', convertToNumber(dto.corrSt));\n this.setOriginalValue('_corrFi', convertToNumber(dto.corrFi));\n this._reasonCode = dto.reasonCode ? dto.reasonCode : undefined;\n this._updated = dto.updated ? new Date(dto.updated) : null;\n this._userId = dto.userId;\n this.setHasChanges();\n }\n\n get updated() {\n return this._updated;\n }\n\n get userId() {\n return this._userId;\n }\n\n get empid() {\n return this._empid\n }\n\n set empid(value) {\n this.setValue('_empid', value);\n }\n\n /**\n * @return {Date}\n */\n get st() {\n return this._st\n }\n\n set st(newValue) {\n const oldValue = this._st;\n if (this.setDateValue('_st', newValue)) {\n this._lastSt = oldValue;\n }\n }\n\n /**\n * @return {Date}\n */\n get fi() {\n if (this._fi === null) {\n const now = new Date();\n if (now.getTime() - this._st.getTime() > msPerNormalDay) {\n this._fi = new Date(this._st.getTime() + msPerNormalDay);\n } else {\n return new Date(msPerMinute * Math.round(now.getTime() / msPerMinute))\n }\n }\n return this._fi;\n }\n set fi(newValue) {\n const oldValue = this._fi;\n if (this.setDateValue('_fi', newValue)) {\n this._lastFi = oldValue;\n }\n }\n\n get stCorrect() {\n return this.corrSt !== 0 ? new Date(60000 * this.corrSt + this.st.getTime()) : this.st;\n }\n set stCorrect(newValue) {\n this.corrSt = (newValue.getTime() - this.st.getTime()) / 60000\n }\n\n get fiCorrect() {\n return this.corrFi !== 0 ? new Date(60000 * this.corrFi + this.fi.getTime()) : this.fi;\n }\n set fiCorrect(newValue) {\n this.corrFi = (newValue.getTime() - this.fi.getTime()) / 60000\n }\n\n get stCorrectTime() {\n return this.st.getTime() + 60000 * this.corrSt;\n }\n\n get fiCorrectTime() {\n return this.fi.getTime() + 60000 * this.corrFi;\n }\n\n get tasktypeId() {\n return this._tasktypeId;\n }\n\n set tasktypeId(newValue) {\n this.setValue('_tasktypeId', newValue);\n }\n\n get dur() {\n return (this.fi.getTime() - this.st.getTime()) / msPerHours;\n }\n set dur(newValue) {\n this.fi = new Date(msPerHours * newValue + this.st.getTime());\n }\n\n get durationDate() {\n const durHours = (this.fi.getTime() - this.st.getTime()) / msPerHours;\n return unitToDate(durHours);\n }\n set durationDate(newValue) {\n const durHours = dateToUnit(newValue)\n this.fi = new Date(msPerHours * durHours + this.st.getTime());\n }\n\n /**\n * @return {Date}\n */\n get lastSt() {\n return this._lastSt;\n }\n\n /**\n * @return {Date}\n */\n get lastFi() {\n return this._lastFi;\n }\n\n /**\n * @return {string}\n */\n get comment() {\n return this._comment;\n }\n\n set comment(newValue) {\n this.setValue('_comment', newValue);\n }\n\n get reasonCode() {\n return this._reasonCode;\n }\n\n /**\n * @return {number}\n */\n get corrSt() {\n return this._corrSt;\n }\n\n set corrSt(newValue) {\n this.setValue('_corrSt', newValue);\n }\n\n /**\n * @return {number}\n */\n get corrFi() {\n return this._corrFi;\n }\n\n set corrFi(newValue) {\n this.setValue('_corrFi', newValue);\n }\n\n /**\n * @return {number}\n */\n get logStToggleIndex() {\n return this._logStToggleIndex\n }\n\n set logStToggleIndex(newValue) {\n this._logStToggleIndex = newValue\n }\n\n /**\n * @return {number}\n */\n get logFiToggleIndex() {\n return this._logFiToggleIndex\n }\n\n set logFiToggleIndex(newValue) {\n this._logFiToggleIndex = newValue\n }\n\n revertTo(st, fi, tasktypeId, isNew, isDeleted) {\n if (isDeleted) { super.undoToDelete(); }\n else if (isNew) { super.toDelete(); }\n else {\n if (st) { this.setDateValue('_st', st); }\n if (fi) { this.setDateValue('_fi', fi) }\n if (tasktypeId) { this.setValue('_tasktypeId', tasktypeId) }\n }\n }\n\n redoRevertTo(st, fi, tasktypeId, isNew, isDeleted) {\n if (isDeleted) { super.toDelete(); }\n else if (isNew) { super.undoToDelete(); }\n else {\n if (st) { this.setDateValue('_st', st); }\n if (fi) { this.setDateValue('_fi', fi) }\n if (tasktypeId) { this.setValue('_tasktypeId', tasktypeId) }\n }\n }\n\n /**\n * @param {{st:Date, fi:Date}} interval\n */\n contains(interval) {\n return this.stCorrectTime <= interval.st.getTime() && interval.fi.getTime() <= this.fiCorrectTime;\n }\n\n copy() {\n return new Task(this.toDto());\n }\n\n /**\n * @param {{st:Date, fi:Date}} interval\n */\n isContainedIn(interval) {\n return !this.isToDelete && this.stCorrectTime >= interval.st.getTime() && interval.fi.getTime() >= this.fiCorrectTime;\n }\n\n /**\n * @param {Date} st\n * @param {Date} fi\n */\n overlaps(st, fi) {\n return (st.getTime() < this.fiCorrectTime && fi.getTime() > this.stCorrectTime);\n }\n\n /** @returns {TaskDto} */\n toDto() {\n /** @type {TaskDto} */\n const t = {\n empid: this.empid,\n st: this._st,\n fi: this._fi,\n tasktypeId: this.tasktypeId,\n }\n\n if (this.id > 0) { t.id = this.id; }\n if (this.corrSt !== 0) { t.corrSt = this.corrSt; }\n if (this.corrFi !== 0) { t.corrFi = this.corrFi; }\n if (this.comment) { t.comment = this.comment; }\n if (this.reasonCode) { t.reasonCode = this.reasonCode; }\n\n return t;\n }\n\n adjustLogCorrection() {\n if (this.corrSt !== 0 && this._fi !== null && this._st.getTime() === this._fi.getTime()) {\n const msDay = this.st.getTime();\n const msPerMin = 60 * 1000;\n const st = new Date(msDay + msPerMin * this.corrSt);\n this.st = st;\n this.fi = st;\n this.corrFi = this.corrFi - this.corrSt;\n this.corrSt = 0;\n }\n }\n}\n\n/**\n * @param {string|null|undefined} text\n */\nfunction convertToString(text) {\n return text ? text : '';\n}\n\n/**\n * @param {Date|string|null} dt\n */\nfunction convertToDate(dt) {\n if (dt) {\n return new Date(dt);\n }\n return null;\n}\n\n/**\n * @param {number|null|undefined} number\n */\nfunction convertToNumber(number) {\n return number ? number : 0;\n}\n\n/**\n * @param {number} unit\n */\nfunction unitToDate(unit) {\n const hours = Math.floor(unit);\n const minutes = (unit - hours) * 60;\n return new Date(2030, 1, 1, hours, minutes);\n}\n\n/**\n * @param {Date} time\n */\nfunction dateToUnit(time) {\n return time.getHours() + time.getMinutes() / 60;\n}\n","/**\n* @typedef {{id:number; name:string; paid:number; schemecolor:string|null; work:number; kind:number; systemKind?:number|null; affinityId?:number|null; requiresLog?:boolean|null; bo?:boolean }} TaskTypeDto\n*/\n\nexport const TASK_SYSTEM_KIND = createTaskSystemKind();\nfunction createTaskSystemKind() {\n const enumObject = {\n operator: 0,\n shortBreak: 1,\n longBreak: 2,\n vacation: 3,\n sick: 4,\n free: 5,\n overtime: 6,\n log: 7,\n inRotation: 8,\n correction: 9,\n };\n\n return Object.freeze(enumObject);\n}\n\nexport const TASK_KIND = createTaskKind();\nfunction createTaskKind() {\n const enumObject = {\n task: 0,\n break: 1,\n absence: 2,\n payment: 3,\n log: 4,\n inRotation: 5,\n correction: 6,\n };\n\n return Object.freeze(enumObject);\n}\n\n/**\n * @param {number} kind\n */\nfunction getKindAsType(kind) {\n switch (kind) {\n case TASK_KIND.task:\n return 'task';\n case TASK_KIND.break:\n return 'break';\n case TASK_KIND.absence:\n return 'absence';\n case TASK_KIND.payment:\n return 'payment';\n }\n\n return '';\n}\n\n/**\n * @param {number|null} systemKind\n */\nfunction getSystemKindAsSubtype(systemKind) {\n if (systemKind === null)\n return '';\n switch (systemKind) {\n case TASK_SYSTEM_KIND.operator:\n return 'op';\n case TASK_SYSTEM_KIND.shortBreak:\n return 'sb';\n case TASK_SYSTEM_KIND.longBreak:\n return 'lb';\n case TASK_SYSTEM_KIND.vacation:\n return 'v';\n case TASK_SYSTEM_KIND.sick:\n return 's';\n case TASK_SYSTEM_KIND.free:\n return 'f';\n case TASK_SYSTEM_KIND.overtime:\n return 'ot';\n }\n\n return '';\n}\n\nexport class TaskTypes {\n constructor() {\n /** @type {TaskTypeDto[]} */\n this.dtoList = [];\n }\n\n get isLoaded() {\n return this.dtoList.length !== 0;\n }\n\n get list() {\n if (this._list === undefined) {\n /** @private @type {TaskType[]} */\n this._list = this.dtoList.map(x => new TaskType(x));\n }\n return this._list;\n }\n\n get byId() {\n if (this._byId === undefined) {\n /** @type {Map} */\n const map = new Map();\n for (const tt of this.list) {\n map.set(tt.id, tt);\n }\n /** @private @type {Map} */\n this._byId = map;\n }\n return this._byId;\n }\n\n get bySystemKind() {\n if (this._bySystemKind === undefined) {\n /** @type {Map} */\n const map = new Map();\n for (const tt of this.list) {\n if (tt.systemKind !== null) {\n map.set(tt.systemKind, tt);\n }\n }\n /** @private @type {Map} */\n this._bySystemKind = map;\n }\n return this._bySystemKind;\n }\n\n /**\n * @param {TaskTypeDto[]} dtoList\n */\n init(dtoList) {\n this.dtoList = dtoList;\n this._list = undefined;\n this._byId = undefined;\n this._bySystemKind = undefined;\n }\n}\n\nexport class TaskType {\n /**\n * @param {TaskTypeDto} dto\n */\n constructor(dto) {\n /** @private @type {number} */\n this._id = dto.id\n /** @private @type {string} */\n this._name = dto.name\n /** @private @type {number} */\n this._work = dto.work\n /** @private @type {string} */\n this._schemecolor = getSchemeColor(dto);\n /** @private @readonly @type {string} */\n this._type = getKindAsType(dto.kind);\n /** @private @readonly @type {string} */\n this._subtype = getSystemKindAsSubtype(dto.systemKind)\n /** @private @type {number} */\n this._paid = dto.paid\n /** @readonly @type {number} */\n this.kind = dto.kind;\n /** @readonly @type {number| null} */\n this.systemKind = dto.systemKind !== undefined ? dto.systemKind : null;\n /** @private @type {number|null} */\n this._affinity = dto.affinityId !== undefined ? dto.affinityId : null;\n /** @private @type {boolean} */\n this._hasChanges = this._id === -1;\n /** @private @type {boolean} */\n this._isToDelete = false;\n /** @private @type {boolean} */\n this._requiresLog = dto.requiresLog !== undefined && dto.requiresLog !== null ? dto.requiresLog : true;\n /** @readonly @type {boolean} */\n this.bo = dto.bo;\n }\n\n get id() {\n return this._id\n }\n\n set id(newValue) {\n this._id = newValue\n }\n\n get affinity() {\n return this._affinity;\n }\n\n set affinity(newValue) {\n this._affinity = newValue;\n this._hasChanges = true;\n }\n\n // should only be called if the affinity has been removed on the server.\n clearAffinity() {\n this._affinity = null;\n }\n\n get system() {\n return this.systemKind !== null;\n }\n\n get name() {\n return this._name\n }\n\n set name(newValue) {\n this._name = newValue\n this._hasChanges = true\n }\n\n get work() {\n return this._work\n }\n\n set work(newValue) {\n this._work = newValue\n this._hasChanges = true\n }\n\n //string with name of color\n get schemecolor() {\n return this._schemecolor\n }\n set schemecolor(newValue) {\n this._schemecolor = newValue\n /** @private @type {undefined|string} */\n this._color = undefined;\n this._hasChanges = true\n }\n\n /**\n * real color\n * @param {(schemecolor: string) => string} getColorFromName\n */\n getColor(getColorFromName) {\n if (this._color === undefined) {\n this._color = getColorFromName(this._schemecolor);\n }\n return this._color;\n }\n\n get type() {\n return this._type\n }\n\n get subtype() {\n return this._subtype\n }\n\n get paidBreak() {\n return this.paid !== 0;\n }\n\n set paidBreak(newValue) {\n if (newValue) {\n this.paid = 100;\n }\n else {\n this.paid = 0;\n }\n }\n\n get paid() {\n return this._paid\n }\n\n set paid(newValue) {\n this._paid = newValue;\n this._hasChanges = true;\n }\n\n get requiresLog() {\n return this._requiresLog\n }\n\n set requiresLog(newValue) {\n this._requiresLog = newValue;\n this._hasChanges = true;\n }\n\n get hasChanges() {\n return this._hasChanges\n }\n confirmChanges() {\n this._hasChanges = false\n }\n\n get isToDelete() {\n return this._isToDelete\n }\n toDelete() {\n this._isToDelete = true;\n this._hasChanges = true;\n }\n\n /** @returns {TaskTypeDto} */\n toDto() {\n return {\n id: this.id, name: this.name, work: this.work, schemecolor: this.schemecolor, paid: this.paid,\n kind: this.kind, systemKind: this.systemKind, affinityId: this.affinity, requiresLog: this.requiresLog\n };\n }\n}\n\n/**\n * @param {TaskTypeDto} dto\n */\nfunction getSchemeColor(dto) {\n if (dto.schemecolor !== null)\n return dto.schemecolor;\n if (dto.systemKind === TASK_SYSTEM_KIND.free) {\n return 'free'\n }\n return 'lightinfo';\n}\n","import moment from 'moment-timezone';\nimport { getShortDate, getStartOfDay } from '#shared/dn-shared-helper';\n\n/** @typedef {{dt:Date;dtLocal:Date;shortDate:string}} TimezoneDayInfo*/\n\n/**\n * @param {Date} dt\n * @param {string} timezone\n */\nexport function getLocalOffset(dt, timezone) {\n if (!timezone) { return 0; }\n const localUTCOffset = moment(dt).utcOffset();\n const tzUTCOffset = moment.tz(dt, timezone).utcOffset()\n return tzUTCOffset - localUTCOffset;\n}\n\n/**\n * Gets the start of the day in the given timezone\n * @param {Date} dtLocal Only the date part is used \n * @param {string} timezone\n * @returns {TimezoneDayInfo}\n */\nexport function getDateTimezoneInfo(dtLocal, timezone) {\n const shortDate = getShortDate(dtLocal);\n const dt = timezone ? moment.tz(shortDate, timezone).toDate() : dtLocal;\n return { dt, dtLocal, shortDate };\n}\n\n/**\n * @param {TimezoneDayInfo} day\n * @param {number} hours\n * @param {number} minutes\n * @param {string} timezone\n */\nexport function getDateTimeInTimezone(day, hours, minutes, timezone) {\n if (minutes > 60) {\n const h = Math.floor(minutes / 60);\n hours += h;\n minutes -= 60 * h;\n }\n if (timezone) {\n return moment.tz(day.shortDate, timezone).hours(hours).minutes(minutes).toDate();\n }\n const dt = new Date(day.dtLocal);\n dt.setHours(hours, minutes);\n return dt;\n}\n\n/**\n * @param {Date} dt\n * @param {string} timezone\n */\nexport function getTimeOfDay(dt, timezone) {\n /** @type {number} */\n let hours;\n /** @type {number} */\n let minutes;\n if (timezone) {\n const m = moment.tz(dt, timezone);\n hours = m.hours();\n minutes = m.minutes();\n } else {\n hours = dt.getHours();\n minutes = dt.getMinutes();\n }\n return { hours, minutes };\n}\n\n/**\n * @param {Date} dt\n * @param {string} timezone\n */\nexport function getDateOfInstant(dt, timezone) {\n if (timezone) {\n const m = moment.tz(dt, timezone);\n return new Date(m.year(), m.month(), m.date());\n } else {\n return getStartOfDay(dt);\n }\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { addDays } from '@/shared/dn-shared-helper.js';\n\n/**\n* @typedef {{employeeId:number; st:string, fi:string; callcenterId:number}} EmployeeCallcenterRow\n*/\n\n/**\n* @typedef {{employeeId:number; intervals:{st:string;fi:string}[]; callcenterId:number}} EmployeeCallcenterDto\n*/\n\n/**\n* @typedef {{st:Date;fi:Date;callcenterId:number}} CallcenterInterval\n*/\n\n/**\n* @typedef {{employeeId:number; ccIntervals:CallcenterInterval[]}} EmployeeCallcenterEmpDto\n*/\n\nexport class EmployeeCallcenters {\n /** \n * @param {EmployeeCallcenterEmpDto[]} [empCCToList]\n */\n constructor(empCCToList = undefined) {\n /** @private @type {Map} */\n this._byEmployeeId = undefined;\n if (empCCToList !== undefined) {\n this._byEmployeeId = new Map();\n for (const ec of empCCToList) {\n this._byEmployeeId.set(ec.employeeId, new EmployeeCallcenter(ec.ccIntervals));\n }\n }\n }\n\n get isLoaded() {\n return this._byEmployeeId !== undefined;\n }\n\n /**\n * @param {number} employeeId\n */\n getByEmp(employeeId) {\n if (!this.isLoaded) { return undefined; }\n return this._byEmployeeId.get(employeeId);\n }\n\n /**\n * @param {{id:number,ccid:number}} emp\n * @param {Date} dt start of the day\n */\n getCCByDate(emp, dt) {\n const empCC = this.getByEmp(emp.id);\n if (empCC) {\n const midday = new Date(dt.getFullYear(), dt.getMonth(), dt.getDate(), 12);\n return empCC.getCCByDate(emp.ccid, midday);\n }\n\n return emp.ccid;\n }\n\n async load() {\n const records = await getEmployeeCallcenter();\n this.init(records);\n }\n\n /**\n * @param {EmployeeCallcenterRow[]} records\n */\n init(records) {\n /** @private @type {Map} */\n const byEmployeeId = new Map();\n for (const r of records) {\n let ec = byEmployeeId.get(r.employeeId);\n if (ec === undefined) {\n ec = new EmployeeCallcenter();\n byEmployeeId.set(r.employeeId, ec);\n }\n ec.add(r);\n }\n this._byEmployeeId = byEmployeeId;\n }\n\n /**\n * @param {number} employeeId\n * @param {Date[]} dates\n * @param {number} callcenterId\n */\n async save(employeeId, dates, callcenterId) {\n dates.sort((a, b) => a.getTime() - b.getTime());\n\n /** @type {{st:Date;fi:Date}[]} */\n const intervals = [];\n for (const d of dates) {\n const n = intervals.length;\n if (n === 0 || intervals[n - 1].fi.getTime() < d.getTime()) {\n intervals.push({ st: d, fi: addDays(d, 1) });\n } else {\n intervals[n - 1].fi = addDays(d, 1);\n }\n }\n\n /** @type {EmployeeCallcenterDto} */\n const data = { employeeId: employeeId, intervals: [], callcenterId };\n for (const i of intervals) {\n data.intervals.push({ st: i.st.toISOString(), fi: i.fi.toISOString() });\n }\n await postEmployeeCallcenter(data);\n await this.load();\n }\n\n toDto() {\n /** @type {EmployeeCallcenterEmpDto[]} */\n const empCCList = [];\n for (const [employeeId, ec] of this._byEmployeeId) {\n empCCList.push({ employeeId, ccIntervals: ec.getListCopy() });\n }\n return empCCList;\n }\n}\n\nclass EmployeeCallcenter {\n /**\n * @param {CallcenterInterval[]} [list]\n */\n constructor(list = []) {\n /** @private @readonly @type {CallcenterInterval[]} sorted by st*/\n this._list = list;\n }\n\n /**\n * @param {EmployeeCallcenterRow} dto\n */\n add(dto) {\n this._list.push({ st: new Date(dto.st), fi: new Date(dto.fi), callcenterId: dto.callcenterId });\n }\n\n /**\n * @param {number} defaultId\n * @param {Date} dt\n */\n getCCByDate(defaultId, dt) {\n for (const r of this._list) {\n if (r.st <= dt && dt < r.fi) {\n return r.callcenterId;\n }\n }\n return defaultId;\n }\n\n getListCopy() {\n return this._list.slice();\n }\n\n /**\n * @param {number} defaultId\n * @param {Date} st\n * @param {Date} fi\n * @param {number} excludeId\n */\n getOnInterval(defaultId, st, fi, excludeId) {\n /** @type {CallcenterInterval[]} */\n const intervals = [];\n let last = st;\n for (const r of this._list) {\n if (r.fi > last) {\n if (r.st < fi) {\n if (last < r.st) {\n addToIntervals(r.st, defaultId);\n }\n if (r.fi < fi) {\n addToIntervals(r.fi, r.callcenterId);\n } else {\n addToIntervals(fi, r.callcenterId);\n }\n } else {\n break;\n }\n }\n }\n if (last < fi) {\n addToIntervals(fi, defaultId);\n }\n return intervals;\n /**\n * @param {Date} fiInterval\n * @param {number} callcenterId\n */\n function addToIntervals(fiInterval, callcenterId) {\n if (excludeId !== callcenterId) {\n intervals.push({ st: last, fi: fiInterval, callcenterId });\n }\n last = fiInterval;\n }\n }\n}\n\n/**\n * @returns {Promise}\n */\nasync function getEmployeeCallcenter() {\n return await fetchAndCheckJson(`employee-callcenter`, 'GET');\n}\n\n/**\n * @param {EmployeeCallcenterDto} data\n */\nasync function postEmployeeCallcenter(data) {\n return await fetchAndCheckJson(`employee-callcenter`, 'POST', data);\n}\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\n/**\n* @typedef {{\n* employeeCallcenters:import(\"@/model/dn-employee-cc\").EmployeeCallcenterRow[];\n* tasktypes:import(\"@/shared/dn-tasktype.js\").TaskTypeDto[];\n* tags:import(\"@/model/dn-tag.js\").TagDto[];\n* }} InitialData\n*/\n\n/** @returns {Promise} */\nexport async function getInitialData() {\n return await fetchAndCheckJson(`initial-data`, 'GET');\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\n\n/**\n * @param {number} id\n */\nexport async function deleteAgreement(id) {\n await fetchAndCheckJson('agreement/' + id, 'DELETE');\n}\n\n/**\n * @param {import(\"@/shared/dn-tasktype.js\").TaskType} taskType\n */\nexport async function deleteTaskType(taskType) {\n return await fetchAndCheckJson(`tasktypes/${taskType.id}`, 'DELETE');\n}\n\nexport async function getAgreements() {\n /** @type {import(\"#shared/dn-agreement\").AgreementDto[]} */\n const dtoList = await fetchAndCheckJson('agreement', 'GET');\n return dtoList;\n}\n\nexport async function getTaskTypes() {\n /** @type {import(\"@/shared/dn-tasktype.js\").TaskTypeDto[]} */\n const dtoList = await fetchAndCheckJson(`tasktypes`, 'GET');\n return dtoList;\n}\n\n/**\n * @param {import(\"@/shared/dn-tasktype.js\").TaskType} taskType\n */\nexport async function patchTaskType(taskType) {\n return await fetchAndCheckJson(`tasktypes/${taskType.id}`, 'PATCH', taskType.toDto());\n}\n\n/**\n * @param {import(\"@/model/dn-agreement-edit.js\").SaveAgreementDto[]} agreementsToSave\n */\nexport async function postAgreements(agreementsToSave) {\n await fetchAndCheckJson('agreement', 'POST', agreementsToSave);\n}\n\n/**\n * @param {import(\"@/shared/dn-tasktype.js\").TaskType} taskType\n */\nexport async function postTaskType(taskType) {\n return await fetchAndCheckJson(`tasktypes`, 'POST', taskType.toDto());\n}\n","import { defineStore } from 'pinia';\nimport { shallowReactive } from 'vue';\nimport { getAffinities } from '@/model/dn-affinity.js';\nimport { Agreements } from '#shared/dn-agreement';\nimport { getBreakSettings } from '@/model/dn-break-settings.js';\nimport { getLanguageCode } from '@/i18n.js';\nimport { BackOfficeSkills } from '@/model/dn-bo.js';\nimport { getCallCenters } from '@/model/dn-callcenter.js';\nimport { getCallGroups } from '@/model/dn-callgroup.js';\nimport { getDayTypes } from '@/model/dn-daytype.js';\nimport { EmployeeCallcenters } from '@/model/dn-employee-cc.js';\nimport { getInitialData } from \"@/model/dn-initial-data.js\";\nimport { deleteAgreement, deleteTaskType, getAgreements, getTaskTypes, patchTaskType, postAgreements, postTaskType } from '@/js/dn-fetch-data.js';\nimport { getCurrentCCId, removeCurrentCCId, setCurrentCCId, removeLoginInfo, getTimeDisplaySetting, setTimeDisplaySetting } from '@/js/dn-localStorage.js';\nimport { getInitialDateInterval } from \"@/js/dn-schedule-helper.js\";\nimport { GENERAL_SETTINGS, GENERAL_EMPAPP_SETTINGS, getSettings, postSettings, getHolidays } from '@/model/dn-setting.js';\nimport { getRelevantWorstInvoiceStatus } from '@/model/dn-invoice.js';\nimport { getSwitches } from '@/model/dn-switch.js';\nimport { convertTagsFromAPI, getTags, getTagUsage } from '@/model/dn-tag.js';\nimport { TaskTypes } from '@/shared/dn-tasktype.js';\nimport { getCurrentUser, getUsers } from '@/model/dn-user.js';\nimport { useForecastStore } from '@/stores/forecastStore.js';\nimport { useReportStore } from \"@/stores/reportStore.js\";\n\nexport const useDataStore = defineStore('data', {\n state: () => ({\n adherenceOptions: { adherenceBase: 0, graceMinutes: 3, adherenceLimit: 90, unScheduledBreakMinutes:20, closeGaps:3 },\n /** @type {import(\"@/model/dn-affinity.js\").Affinity[]} */\n affinities:null,\n agreements:shallowReactive(new Agreements()),\n backOfficeSkills: shallowReactive(new BackOfficeSkills()),\n /** @type {import(\"@/model/dn-break-settings.js\").BreakSettings[]} */\n breakSettings: null,\n /** @type {import(\"@/model/dn-callcenter\").CallCenter[]} */\n callCenters: null,\n /** @type {import(\"@/model/dn-callgroup.js\").CallGroup[]} */\n callGroups: [],\n /** @type {import(\"@/model/dn-callcenter\").CallCenter} */\n currentCC: null,\n /** @type {import(\"@/model/dn-user.js\").LoggedInUser} */\n currentUser: null,\n /** @type {Date} */\n dateNow: null,\n /** @type {import(\"@/model/dn-daytype\").DayType[]} */\n dayTypes: null,\n employeeCallcenters: shallowReactive(new EmployeeCallcenters()),\n generalEmpAppSettings: {\n publishingWeekDay: 0,\n publishingNumberOfDays: 7,\n allRequestsDisabled: false,\n publishingFixedDate: null,\n requestClosedNumberOfDays: 2,\n requestvaccationClosedNumberOfDays: 60,\n sickRequestDisabled: false,\n tradeDisabled: false,\n hideTeamSchedule: false,\n showOnlyOwnTeam: false,\n weekStartDay: 0,\n statsPayrollCodes:false,\n statsAdherence:false,\n statsDetailedAdherence:false,\n statsPayrollCodesPublishingNumberOfDays:0,\n },\n generalSettingsLoaded: false,\n /** @type {string} */\n language: null,\n refreshedDueToError: false,\n relevantInvoiceStatus:0,\n lastRelevantInvoiceStatuscheck:new Date(\"1970-01-01\"),\n planningSettings: {\n noShiftsOutsideTarget: true,\n overTargetFactor: 0,\n },\n /** @type {readonly import(\"@/model/dn-switch.js\").SwitchConfig[]} */\n switches: null,\n /** @type {Map} */\n tagById: null,\n /** @type {number[][]} */\n tagUsage: null,\n taskTypes: shallowReactive(new TaskTypes()),\n userGuide: {\n display: false,\n },\n /** @type {import(\"@/model/dn-user.js\").User[]} */\n users: null,\n /** @type {import(\"@/model/dn-setting.js\").HolidaySettings[]} */\n holidays: null,\n hourFormat: \"\"\n }),\n getters: {\n getMode(){\n //0 for normal, 1 for basic\n if(this.currentUser == null) { return null; }\n \n return this.currentUser.useMode;\n },\n empTabs() {\n if (this.getMode === 0) {\n //full func\n return {\n general: 0,\n skillsMatrix: 1,\n rotations:2,\n availability: 3,\n shifts:4\n };\n } else{\n //basic\n return {\n general: 0,\n rotations:1,\n availability: 2\n };\n }\n },\n callCentersRelevant() { \n let callgroups=this.callGroupsAllowed\n let ccIds=[]\n for(let i=0;i ccIds.includes(x.id))\n },\n callCentersAllowed() {\n const callCenters = this.callCenters;\n if (this.currentUser === null || callCenters === null) { return []; }\n const idList = this.currentUser.contactcenterIds;\n if (idList.length === 0) { return callCenters; }\n return callCenters.filter(c => idList.includes(c.id));\n },\n /** @returns {import(\"@/model/dn-callgroup.js\").CallGroup[]} */\n callGroupsAllowed() {\n const currentUser = this.currentUser;\n if (currentUser === null) { return []; }\n if (currentUser.contactcenterIds.length === 0) {\n // @ts-ignore\n return this.callGroups;\n }\n // @ts-ignore\n return this.callGroups.filter(x => currentUser.contactcenterIds.includes(x.contactCenterId));\n },\n /** @returns {import(\"@/model/dn-callgroup.js\").CallGroup[]} */\n callGroupsCurrentCC() {\n const currentCC = this.currentCC;\n if (currentCC === null) { return []; }\n return this.callGroups.filter(x => x.contactCenterId === currentCC.id);\n },\n skillsCurrentCC() {\n const currentCC = this.currentCC;\n /** @type {import(\"@/model/dn-skill.js\").Skill[]} */\n const skills = [];\n if (currentCC && this.backOfficeSkills.isLoaded) {\n const ccId = currentCC.id;\n for (const skill of this.callGroups) {\n if (skill.contactCenterId === ccId) {\n skills.push(skill);\n }\n }\n for (const skill of this.backOfficeSkills.createList([ccId])) {\n skills.push(skill);\n }\n }\n return skills;\n },\n /** @returns {import(\"@/model/dn-daytype\").DayType} */\n dayTypeDefault() {\n return this.dayTypes !== null ? this.dayTypes[0] : undefined;\n },\n latestImportDate() {\n const switches = this.switches;\n if (switches === null) { return null; }\n let dt = new Date();\n for (let i = 0; i < switches.length; i++) {\n if (switches[i].lastTime) {\n if (switches[i].lastTime < dt) { dt = new Date(switches[i].lastTime) }\n }\n }\n return dt;\n },\n /** @returns {import(\"@/shared/dn-tasktype.js\").TaskType[]} */\n taskTypeList() {\n return this.taskTypes.list;\n },\n /** @returns {Map} */\n taskTypeMap() {\n return this.taskTypes.byId;\n },\n },\n actions: {\n /**\n * @param {number} id\n */\n async deleteAgreement(id) {\n await deleteAgreement(id);\n this.agreements.remove(id);\n },\n async init() {\n const initialData = await getInitialData();\n this.employeeCallcenters.init(initialData.employeeCallcenters);\n this.taskTypes.init(initialData.tasktypes);\n this.tagById = convertTagsFromAPI(initialData.tags);\n },\n async loadAffinities() {\n this.affinities = await getAffinities();\n },\n async loadBreakSettings() {\n this.breakSettings = await getBreakSettings();\n },\n async loadCallCenters() {\n this.callCenters = await getCallCenters();\n const currentUser = this.currentUser;\n let currentCCId;\n if (currentUser.employee) {\n currentCCId = currentUser.employee.ccid;\n } else {\n currentCCId = getCurrentCCId();\n }\n\n const cc = this.callCenters.find(x => x.id == currentCCId);\n this.currentCC = cc ? cc : null;\n },\n async loadHolidays() {\n this.holidays = await getHolidays();\n },\n async loadRelevantInvoiceStatus() { \n this.relevantInvoiceStatus = await getRelevantWorstInvoiceStatus();\n this.lastRelevantInvoiceStatuscheck=new Date()\n },\n logOut() {\n removeLoginInfo();\n removeCurrentCCId();\n this.currentUser = null;\n },\n /**\n * @param {import(\"@/model/dn-callcenter\").CallCenter} cc\n */\n setCurrentCC(cc) {\n this.currentCC = cc;\n setCurrentCCId(cc.id);\n },\n async loadAgreements() {\n const dtoList = await getAgreements();\n await this.agreements.load(dtoList);\n },\n async loadCallGroups() {\n this.callGroups = await getCallGroups();\n },\n async loadCurrentUser() {\n this.currentUser = await getCurrentUser();\n },\n loadDateNow() {\n this.dateNow = getInitialDateInterval()[0];\n },\n async loadDayTypes() {\n this.dayTypes = await getDayTypes();\n },\n loadLanguage() {\n this.language = getLanguageCode();\n },\n setHourFormat(format){\n this.hourFormat = format;\n setTimeDisplaySetting(format);\n },\n loadHourFormat() {\n this.hourFormat = getTimeDisplaySetting();\n },\n async loadGeneralSettings() {\n const forecastStore = useForecastStore();\n const forecastOptions = forecastStore.forecastOptions;\n const adherenceOptions = this.adherenceOptions;\n const reportStore = useReportStore();\n const reportOptions = reportStore.reportOptions;\n const generalEmpAppSettings = this.generalEmpAppSettings;\n const rows = await getSettings();\n for (const r of rows) {\n switch (r.key) {\n case GENERAL_SETTINGS.historicWeeks:\n forecastOptions.historicWeeks = r.value;\n break;\n case GENERAL_SETTINGS.forecastWeeks:\n forecastOptions.forecastWeeks = r.value;\n break;\n case GENERAL_SETTINGS.numberOfHistoricSpecialDays:\n forecastOptions.numberOfHistoricSpecialDays = r.value;\n break;\n case GENERAL_SETTINGS.occupacyFte:\n forecastOptions.occupacyFte = r.value;\n break;\n case GENERAL_SETTINGS.adherancePercent:\n forecastOptions.adherancePercent = r.value;\n break;\n case GENERAL_SETTINGS.percentOfAbandonsToInclude:\n forecastOptions.percentOfAbandonsToInclude = r.value;\n break;\n case GENERAL_SETTINGS.adherenceBase:\n adherenceOptions.adherenceBase = r.value;\n break;\n case GENERAL_SETTINGS.graceMinutes:\n adherenceOptions.graceMinutes = r.value;\n break;\n case GENERAL_SETTINGS.unScheduledBreakMinutes:\n adherenceOptions.unScheduledBreakMinutes = r.value;\n break;\n case GENERAL_SETTINGS.closeGaps:\n adherenceOptions.closeGaps = r.value;\n break;\n case GENERAL_SETTINGS.adherenceLimit:\n adherenceOptions.adherenceLimit = r.value;\n break;\n case GENERAL_SETTINGS.overTargetFactor:\n this.planningSettings.overTargetFactor = r.value;\n break;\n case GENERAL_SETTINGS.noShiftsOutsideTarget:\n this.planningSettings.noShiftsOutsideTarget = r.value !== 0;\n break;\n case GENERAL_SETTINGS.reportCalendarDays:\n reportOptions.reportCalendarDays = r.value !== 0;\n break;\n case GENERAL_SETTINGS.reportCsvSemicolon:\n reportOptions.reportCsvSemicolon = r.value !== 0;\n break;\n case GENERAL_SETTINGS.numHoursWeeklyOvertime:\n reportOptions.numHoursWeeklyOvertime = r.value;\n break;\n case GENERAL_SETTINGS.weekendAsHoliday:\n reportOptions.weekendAsHoliday = r.value !== 0;\n break; \n case GENERAL_EMPAPP_SETTINGS.publishingWeekDay:\n generalEmpAppSettings.publishingWeekDay = r.value;\n break;\n case GENERAL_EMPAPP_SETTINGS.publishingNumberOfDays:\n generalEmpAppSettings.publishingNumberOfDays = r.value;\n break;\n case GENERAL_EMPAPP_SETTINGS.publishingFixedDateMs:\n if(r.value){\n generalEmpAppSettings.publishingFixedDate = new Date(r.value*1000);\n }\n break;\n case GENERAL_EMPAPP_SETTINGS.requestClosedNumberOfDays:\n generalEmpAppSettings.requestClosedNumberOfDays = r.value;\n break;\n case GENERAL_EMPAPP_SETTINGS.allRequestsDisabled:\n generalEmpAppSettings.allRequestsDisabled = r.value > 0;\n break;\n case GENERAL_EMPAPP_SETTINGS.requestvaccationClosedNumberOfDays:\n generalEmpAppSettings.requestvaccationClosedNumberOfDays = r.value;\n break;\n case GENERAL_EMPAPP_SETTINGS.sickRequestDisabled:\n generalEmpAppSettings.sickRequestDisabled = r.value > 0;\n break;\n case GENERAL_EMPAPP_SETTINGS.tradeDisabled:\n generalEmpAppSettings.tradeDisabled = r.value > 0;\n break;\n //ADDED\n case GENERAL_EMPAPP_SETTINGS.hideTeamSchedule:\n generalEmpAppSettings.hideTeamSchedule = r.value > 0;\n break;\n case GENERAL_EMPAPP_SETTINGS.showOnlyOwnTeam:\n generalEmpAppSettings.showOnlyOwnTeam = r.value > 0;\n break;\n case GENERAL_EMPAPP_SETTINGS.weekStartDay:\n generalEmpAppSettings.weekStartDay = r.value;\n break;\n\n case GENERAL_EMPAPP_SETTINGS.statsPayrollCodes:\n generalEmpAppSettings.statsPayrollCodes = r.value > 0;\n break; \n case GENERAL_EMPAPP_SETTINGS.statsAdherence:\n generalEmpAppSettings.statsAdherence =r.value > 0;\n break; \n case GENERAL_EMPAPP_SETTINGS.statsDetailedAdherence:\n generalEmpAppSettings.statsDetailedAdherence = r.value > 0;\n break; \n case GENERAL_EMPAPP_SETTINGS.statsPayrollCodesPublishingNumberOfDays:\n generalEmpAppSettings.statsPayrollCodesPublishingNumberOfDays = r.value;\n break; \n }\n }\n this.generalSettingsLoaded = true;\n },\n async loadSwitches() {\n const switches = await getSwitches();\n this.switches = Object.freeze(switches);\n },\n async loadTags() {\n const tags = await getTags();\n this.tagById = convertTagsFromAPI(tags);\n },\n async loadTagUsage() {\n this.tagUsage = await getTagUsage();\n },\n async loadTaskTypes() {\n const dtoList = await getTaskTypes();\n this.taskTypes.init(dtoList);\n },\n async initUsers() {\n if (this.users !== null) { return; }\n this.users = await getUsers();\n },\n /**\n * @param {import(\"@/model/dn-agreement-edit.js\").SaveAgreementDto[]} agreementsToSave\n */\n async saveAgreements(agreementsToSave) {\n await postAgreements(agreementsToSave);\n await this.loadAgreements();\n },\n /**\n * @param {import(\"@/model/dn-setting\").GeneralEmpAppSettings} generalEmpAppSettings\n */\n async saveGeneralEmpAppSettings(generalEmpAppSettings) {\n const storedSettings = this.generalEmpAppSettings;\n /** @type {import(\"@/model/dn-setting.js\").SettingDto[]} */\n const data = [];\n\n if (generalEmpAppSettings.hasChanges) {\n if (generalEmpAppSettings.publishingWeekDay != storedSettings.publishingWeekDay) {\n storedSettings.publishingWeekDay = generalEmpAppSettings.publishingWeekDay\n data.push({ key: GENERAL_EMPAPP_SETTINGS.publishingWeekDay, value: generalEmpAppSettings.publishingWeekDay });\n }\n if (generalEmpAppSettings.publishingNumberOfDays != storedSettings.publishingNumberOfDays) {\n storedSettings.publishingNumberOfDays = generalEmpAppSettings.publishingNumberOfDays\n data.push({ key: GENERAL_EMPAPP_SETTINGS.publishingNumberOfDays, value: generalEmpAppSettings.publishingNumberOfDays });\n }\n const publishingFixedDate = generalEmpAppSettings.usePublishFixedDate ? generalEmpAppSettings.publishingFixedDate : null;\n if (publishingFixedDate !== storedSettings.publishingFixedDate) {\n storedSettings.publishingFixedDate = publishingFixedDate;\n let value =null\n if(publishingFixedDate){value=Math.round(generalEmpAppSettings.publishingFixedDate.getTime()/1000)}\n data.push({ key: GENERAL_EMPAPP_SETTINGS.publishingFixedDateMs, value: value });\n }\n if (generalEmpAppSettings.allRequestsDisabled != storedSettings.allRequestsDisabled) {\n storedSettings.allRequestsDisabled = generalEmpAppSettings.allRequestsDisabled;\n const x = generalEmpAppSettings.allRequestsDisabled ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.allRequestsDisabled, value: x });\n }\n if (generalEmpAppSettings.requestClosedNumberOfDays != storedSettings.requestClosedNumberOfDays) {\n storedSettings.requestClosedNumberOfDays = generalEmpAppSettings.requestClosedNumberOfDays\n data.push({ key: GENERAL_EMPAPP_SETTINGS.requestClosedNumberOfDays, value: generalEmpAppSettings.requestClosedNumberOfDays });\n }\n if (generalEmpAppSettings.requestvaccationClosedNumberOfDays != storedSettings.requestvaccationClosedNumberOfDays) {\n storedSettings.requestvaccationClosedNumberOfDays = generalEmpAppSettings.requestvaccationClosedNumberOfDays\n data.push({ key: GENERAL_EMPAPP_SETTINGS.requestvaccationClosedNumberOfDays, value: generalEmpAppSettings.requestvaccationClosedNumberOfDays });\n }\n if (generalEmpAppSettings.sickRequestDisabled != storedSettings.sickRequestDisabled) {\n storedSettings.sickRequestDisabled = generalEmpAppSettings.sickRequestDisabled;\n const x = generalEmpAppSettings.sickRequestDisabled ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.sickRequestDisabled, value: x });\n }\n if (generalEmpAppSettings.tradeDisabled != storedSettings.tradeDisabled) {\n storedSettings.tradeDisabled = generalEmpAppSettings.tradeDisabled;\n const x = generalEmpAppSettings.tradeDisabled ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.tradeDisabled, value: x });\n }\n if (generalEmpAppSettings.hideTeamSchedule != storedSettings.hideTeamSchedule) {\n storedSettings.hideTeamSchedule = generalEmpAppSettings.hideTeamSchedule;\n const x = generalEmpAppSettings.hideTeamSchedule ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.hideTeamSchedule, value: x });\n } \n if (generalEmpAppSettings.showOnlyOwnTeam != storedSettings.showOnlyOwnTeam) {\n storedSettings.showOnlyOwnTeam = generalEmpAppSettings.showOnlyOwnTeam;\n const x = generalEmpAppSettings.showOnlyOwnTeam ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.showOnlyOwnTeam, value: x });\n } \n if (generalEmpAppSettings.weekStartDay != storedSettings.weekStartDay) {\n storedSettings.weekStartDay = generalEmpAppSettings.weekStartDay\n data.push({ key: GENERAL_EMPAPP_SETTINGS.weekStartDay, value: generalEmpAppSettings.weekStartDay });\n }\n\n if (generalEmpAppSettings.statsPayrollCodes != storedSettings.statsPayrollCodes) {\n storedSettings.statsPayrollCodes = generalEmpAppSettings.statsPayrollCodes;\n const x = generalEmpAppSettings.statsPayrollCodes ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.statsPayrollCodes, value: x });\n }\n if (generalEmpAppSettings.statsAdherence != storedSettings.statsAdherence) {\n storedSettings.statsAdherence = generalEmpAppSettings.statsAdherence;\n const x = generalEmpAppSettings.statsAdherence ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.statsAdherence, value: x });\n }\n if (generalEmpAppSettings.statsDetailedAdherence != storedSettings.statsDetailedAdherence) {\n storedSettings.statsDetailedAdherence = generalEmpAppSettings.statsDetailedAdherence;\n const x = generalEmpAppSettings.statsDetailedAdherence ? 1 : 0;\n data.push({ key: GENERAL_EMPAPP_SETTINGS.statsDetailedAdherence, value: x });\n }\n if (generalEmpAppSettings.statsPayrollCodesPublishingNumberOfDays != storedSettings.statsPayrollCodesPublishingNumberOfDays) {\n storedSettings.statsPayrollCodesPublishingNumberOfDays = generalEmpAppSettings.statsPayrollCodesPublishingNumberOfDays\n data.push({ key: GENERAL_EMPAPP_SETTINGS.statsPayrollCodesPublishingNumberOfDays, value: generalEmpAppSettings.statsPayrollCodesPublishingNumberOfDays });\n }\n\n generalEmpAppSettings.confirmChanges();\n }\n await postSettings(data);\n },\n async saveGeneralSettings(generalOptions) {\n const forecastStore = useForecastStore();\n const storedForecastSettings = forecastStore.forecastOptions;\n const storedAdherenceSettings = this.adherenceOptions;\n /** @type {import(\"@/model/dn-setting.js\").SettingDto[]} */\n const data = [];\n let needsReloadOfForecast = generalOptions.hasChangesForecast\n\n if (generalOptions.hasChanges) {\n if (generalOptions.historicWeeks != storedForecastSettings.historicWeeks) {\n storedForecastSettings.historicWeeks = generalOptions.historicWeeks\n data.push({ key: GENERAL_SETTINGS.historicWeeks, value: generalOptions.historicWeeks });\n }\n if (generalOptions.forecastWeeks != storedForecastSettings.forecastWeeks) {\n storedForecastSettings.forecastWeeks = generalOptions.forecastWeeks\n data.push({ key: GENERAL_SETTINGS.forecastWeeks, value: generalOptions.forecastWeeks });\n }\n if (generalOptions.numberOfHistoricSpecialDays != storedForecastSettings.numberOfHistoricSpecialDays) {\n storedForecastSettings.numberOfHistoricSpecialDays = generalOptions.numberOfHistoricSpecialDays\n data.push({ key: GENERAL_SETTINGS.numberOfHistoricSpecialDays, value: generalOptions.numberOfHistoricSpecialDays });\n }\n if (generalOptions.occupacyFte != storedForecastSettings.occupacyFte) {\n storedForecastSettings.occupacyFte = generalOptions.occupacyFte\n data.push({ key: GENERAL_SETTINGS.occupacyFte, value: generalOptions.occupacyFte });\n }\n if (generalOptions.adherancePercent != storedForecastSettings.adherancePercent) {\n storedForecastSettings.adherancePercent = generalOptions.adherancePercent\n data.push({ key: GENERAL_SETTINGS.adherancePercent, value: generalOptions.adherancePercent });\n }\n if (generalOptions.percentOfAbandonsToInclude != storedForecastSettings.percentOfAbandonsToInclude) {\n storedForecastSettings.percentOfAbandonsToInclude = generalOptions.percentOfAbandonsToInclude\n data.push({ key: GENERAL_SETTINGS.percentOfAbandonsToInclude, value: generalOptions.percentOfAbandonsToInclude });\n }\n if (generalOptions.adherenceLimit != storedAdherenceSettings.adherenceLimit) {\n storedAdherenceSettings.adherenceLimit = generalOptions.adherenceLimit\n data.push({ key: GENERAL_SETTINGS.adherenceLimit, value: generalOptions.adherenceLimit });\n }\n if (generalOptions.graceMinutes != storedAdherenceSettings.graceMinutes) {\n storedAdherenceSettings.graceMinutes = generalOptions.graceMinutes\n data.push({ key: GENERAL_SETTINGS.graceMinutes, value: generalOptions.graceMinutes });\n }\n if (generalOptions.unScheduledBreakMinutes != storedAdherenceSettings.unScheduledBreakMinutes) {\n storedAdherenceSettings.unScheduledBreakMinutes = generalOptions.unScheduledBreakMinutes\n data.push({ key: GENERAL_SETTINGS.unScheduledBreakMinutes, value: generalOptions.unScheduledBreakMinutes });\n }\n if (generalOptions.closeGaps != storedAdherenceSettings.closeGaps) {\n storedAdherenceSettings.closeGaps = generalOptions.closeGaps\n data.push({ key: GENERAL_SETTINGS.closeGaps, value: generalOptions.closeGaps });\n }\n if (generalOptions.adherenceBase != storedAdherenceSettings.adherenceBase) {\n storedAdherenceSettings.adherenceBase = generalOptions.adherenceBase\n data.push({ key: GENERAL_SETTINGS.adherenceBase, value: generalOptions.adherenceBase });\n }\n generalOptions.confirmChanges();\n }\n\n await postSettings(data);\n if (needsReloadOfForecast) {\n forecastStore.reloadForecastAndHistoricData();\n }\n return;\n\n },\n /**\n * @param {import(\"@/js/dn-optimize\").PlanningSettings} settings\n */\n async savePlanningSettings(settings) {\n /** @type {import(\"@/model/dn-setting.js\").SettingDto[]} */\n const data = [];\n if (settings.noShiftsOutsideTarget !== this.planningSettings.noShiftsOutsideTarget) {\n this.planningSettings.noShiftsOutsideTarget = settings.noShiftsOutsideTarget;\n data.push({ key: GENERAL_SETTINGS.noShiftsOutsideTarget, value: settings.noShiftsOutsideTarget ? 1 : 0 });\n }\n if (settings.overTargetFactor !== this.planningSettings.overTargetFactor) {\n this.planningSettings.overTargetFactor = settings.overTargetFactor;\n data.push({ key: GENERAL_SETTINGS.overTargetFactor, value: settings.overTargetFactor });\n }\n if (data.length > 0) {\n await postSettings(data);\n }\n },\n /**\n * @param {import(\"@/shared/dn-tasktype.js\").TaskType[]} tasktypes\n */\n async saveTaskTypes(tasktypes) {\n let itemsToDelete = []\n let changeTaskTypes = []\n let promises = []\n for (let i = 0; i < tasktypes.length; i++) {\n if (tasktypes[i].isToDelete) {\n promises.push(deleteTaskType(tasktypes[i]))\n changeTaskTypes.push(tasktypes[i])\n itemsToDelete.push(tasktypes[i])\n } else if (tasktypes[i].hasChanges) {\n if (tasktypes[i].id == -1) {\n promises.push(postTaskType(tasktypes[i]))\n changeTaskTypes.push(tasktypes[i])\n }\n else {\n promises.push(patchTaskType(tasktypes[i]))\n changeTaskTypes.push(tasktypes[i])\n }\n }\n }\n for (let i = 0; i < itemsToDelete.length; i++) {\n var index = tasktypes.indexOf(itemsToDelete[i]);\n tasktypes.splice(index, 1);\n }\n\n const values = await Promise.all(promises);\n for (let i = 0; i < changeTaskTypes.length; i++) {\n if (changeTaskTypes[i].id == -1) {\n changeTaskTypes[i].id = values[i].id\n }\n changeTaskTypes[i].confirmChanges();\n }\n\n await this.loadTaskTypes();\n },\n }\n});\n","import { useDataStore } from './dataStore';\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { addDays, getShortDate, getStartOfDay, getQuarterHour } from '@/shared/dn-shared-helper.js';\n\n/** @typedef {{callGroupId:number;dt:string|Date;calls:number[];callTime:number[];dstQ:number|null;dstShift:number|null}} ForecastPredictionDto*/\n\n/** @typedef {Map} ForecastDataMap */\n\nclass ForecastAiData {\n constructor() {\n /** @private @type {ForecastDataMap} */\n this._forecastDataMap = new Map();\n }\n\n get forecastDataMap() {\n return this._forecastDataMap;\n }\n\n /**\n * @param {{ forecastWeeks: number }} forecastOptions\n */\n async loadAiForecastData(forecastOptions) {\n const msPerQ = 1000 * 60 * 15;\n const dataStore = useDataStore();\n const st = dataStore.dateNow;\n /** @type {ForecastDataMap} */\n const forecastDataMap = new Map();\n const fi = addDays(st, (forecastOptions.forecastWeeks + 1) * 7)\n const forecastPredictions = await getForecastPrediction(st, fi);\n\n for (const p of forecastPredictions) {\n let dt = new Date(p.dt);\n const startOfDay = getStartOfDay(dt);\n let forecast = getOrCreateForcast(p.callGroupId, startOfDay, forecastDataMap);\n let q = getQuarterHour(dt);\n let i = 0;\n let hasShifted = false;\n while (i < 96) {\n forecast.nocData[q] = p.calls[i];\n forecast.ahtData[q] = p.callTime[i];\n if (p.dstQ && p.dstQ === i && !hasShifted) {\n i += p.dstShift;\n hasShifted = true;\n }\n i += 1;\n dt = new Date(dt.getTime() + msPerQ);\n q = getQuarterHour(dt);\n if (q === 0) {\n forecast = getOrCreateForcast(p.callGroupId, dt, forecastDataMap);\n }\n }\n }\n\n this._forecastDataMap = forecastDataMap;\n return true;\n }\n\n reset() {\n this._forecastDataMap = new Map();\n }\n\n}\n\nexport const forecastAiData = new ForecastAiData();\n\n/**\n * @param {number} callGroupId\n * @param {Date} dt\n * @param {ForecastDataMap} forecastDataMap\n */\nfunction getOrCreateForcast(callGroupId, dt, forecastDataMap) {\n const key = callGroupId + '_' + getShortDate(dt);\n let forecast = forecastDataMap.get(key);\n if (!forecast) {\n /** @type {number[]} */\n const nocData = new Array(96).fill(0);\n /** @type {number[]} */\n const ahtData = new Array(96).fill(0);\n forecast = { dt, acgr: callGroupId, nocData, ahtData };\n forecastDataMap.set(key, forecast);\n }\n return forecast;\n}\n\n/**\n * @param {Date} st\n * @param {Date} fi\n */\nasync function getForecastPrediction(st, fi) {\n /** @type {ForecastPredictionDto[]} */\n const rows = await fetchAndCheckJson(`forecast-prediction?st=${st.getTime()}&fi=${fi.getTime()}`, 'GET');\n return rows;\n}","import { getStartOfWeek } from '@/js/dn-helper.js';\nimport { addDays, getShortDate } from '@/shared/dn-shared-helper.js';\nimport { getCallStatistics } from '@/js/dn-call-statistics.js';\nimport { getDaytype } from '@/js/dn-forecast.js';\n\nclass ForecastData {\n constructor() {\n /** @private @type {Map} */\n this._historicDataMap = new Map();\n }\n\n get historicDataMap() {\n return this._historicDataMap;\n }\n\n /**\n * @param {Date} focusDt\n * @param {{ historicWeeks: number; historicFocusDate: Date; percentOfAbandonsToInclude: number; }} forecastOptions\n * @param {{id:number}[]} dayTypes\n * @param {Map} specialDaysMap\n */\n async loadHistoricData(focusDt, forecastOptions, dayTypes, specialDaysMap) {\n if (forecastOptions.historicFocusDate !== null) {\n focusDt = forecastOptions.historicFocusDate;\n }\n /** @type {Map} */\n const historicDataMap = new Map();\n const startDate = getStartOfWeek(addDays(focusDt, -forecastOptions.historicWeeks * 7)); /* mon or sun of the youngset week */\n const ipoa = forecastOptions.percentOfAbandonsToInclude;\n const result = await getCallStatistics({startTimeUTC:startDate, quarters: (forecastOptions.historicWeeks + 1) * 7 * 96, ipoa});\n if (result.isCalculating)\n return false;\n\n const msPerQuarterHour = 1000 * 60 * 15;\n for (const histData of result.data) {\n for (let d = 0; d < (forecastOptions.historicWeeks + 1) * 7; d++) {\n const dt = addDays(startDate, d)\n //supporting daylight saving transition\n const nextDt = addDays(startDate, d + 1);\n const quarterAtDayEnd = Math.round((nextDt.getTime() - startDate.getTime()) / msPerQuarterHour);\n const quarterAtDaystart = Math.round((dt.getTime() - startDate.getTime()) / msPerQuarterHour);\n const key = histData.cgId + '_' + getShortDate(dt);\n const noc = histData.noc.slice(quarterAtDaystart, quarterAtDayEnd)\n const aht = histData.ht.slice(quarterAtDaystart, quarterAtDayEnd)\n\n let xVal = {\n dt: dt,\n acgr: histData.cgId,\n dayType: getDaytype(dt, specialDaysMap),\n nocData: noc,\n ahtData: aht\n };\n\n historicDataMap.set(key, daysavingTransitionCorrection(xVal))\n }\n }\n\n const ok = await this.loadHistoricDataSpecialDays(dayTypes, startDate, forecastOptions, historicDataMap, specialDaysMap);\n if (!ok) {\n return false;\n }\n\n this._historicDataMap = historicDataMap;\n return true;\n }\n\n /**\n * @private\n * @param {{id:number}[]} dayTypes\n * @param {Date} startDate\n * @param {{ historicWeeks: number; historicFocusDate: Date; percentOfAbandonsToInclude: number; }} forecastOptions\n * @param {Map} historicDataMap\n * @param {Map} specialDaysMap\n */\n async loadHistoricDataSpecialDays(dayTypes, startDate, forecastOptions, historicDataMap, specialDaysMap) {\n const ipoa = forecastOptions.percentOfAbandonsToInclude;\n let counterMap = new Map();\n for (let i = 0; i < dayTypes.length; i++) { counterMap.set(dayTypes[i].id, 0) }\n\n /** @type {{st:Date;quarters:number}[]} */\n const intervals = [];\n for (let d2 = 0; d2 < 365 * 6; d2++) { //earlier then the normal x weeks of data\n let dt2 = addDays(startDate, -d2)\n let dayTypeId = getDaytype(dt2, specialDaysMap)\n if (dayTypeId > 0 && counterMap.get(dayTypeId) < 10) { //dates with specialDay and only the 10 latest\n intervals.push({st:dt2, quarters:96});\n let count = counterMap.get(dayTypeId)\n counterMap.set(dayTypeId, count + 1)\n }\n }\n\n const csResult = await getCallStatistics({intervals, ipoa});\n if (csResult.isCalculating)\n return false;\n for (const dr of csResult.list) {\n const dt2 = new Date(dr.st);\n const dayTypeId = getDaytype(dt2, specialDaysMap)\n const dt = getShortDate(dt2);\n for (const histData of dr.data) {\n let key2 = histData.cgId + '_' + dt;\n let xVal = {\n dt: dt2,\n acgr: histData.cgId,\n dayType: dayTypeId,\n nocData: histData.noc,\n ahtData: histData.ht\n };\n\n historicDataMap.set(key2, daysavingTransitionCorrection(xVal))\n }\n }\n\n return true;\n }\n\n reset() {\n this._historicDataMap = new Map();\n }\n}\n\nexport const forecastData = new ForecastData();\n\n/**\n * @param {{ dt: Date; acgr: number; dayType: number; nocData: number[]; ahtData: number[]; }} xVal\n */\nfunction daysavingTransitionCorrection(xVal) {\n if (xVal.nocData.length > 96) {\n xVal.nocData = xVal.nocData.slice(0, 96)\n xVal.ahtData = xVal.ahtData.slice(0, 96)\n }\n if (xVal.nocData.length == 92) {\n for (let i = 0; i < 4; i++) {\n xVal.nocData.push(0)\n xVal.ahtData.push(0)\n }\n }\n return xVal\n}","class SimulationData {\n constructor() {\n /** @private @type {Map} */\n this._simulationDataMap = new Map();\n /** @private @type {Map>} */\n this._targetDataMap = new Map();\n /** @private @type {Map} */\n this._emplyeesByAffinity = null\n /** @private @type {Map} */\n this._callGroupPrioInfoMap = null\n /** @type {number} */\n this.callGroupPrioMax = 0\n }\n\n get simulationDataMap() {\n return this._simulationDataMap;\n }\n\n get targetDataMap() {\n return this._targetDataMap;\n }\n\n get emplyeesByAffinity(){\n return this._emplyeesByAffinity\n }\n set emplyeesByAffinity(value){\n this._emplyeesByAffinity=value\n }\n\n get callGroupPrioInfoMap(){\n return this._callGroupPrioInfoMap\n }\n set callGroupPrioInfoMap(value){\n this._callGroupPrioInfoMap=value\n }\n\n\n\n reset() {\n this._simulationDataMap = new Map();\n this._targetDataMap = new Map();\n this._emplyeesByAffinity = null\n this._callGroupPrioInfoMap=null\n this.callGroupPrioMax=0\n }\n}\n\nexport const simulationData = new SimulationData();","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { getShortDate } from '@/shared/dn-shared-helper.js';\n\nclass SpecialDayData {\n constructor() {\n /** @private @type {Map} */\n this._specialDaysMap = new Map();\n }\n\n get specialDaysMap() {\n return this._specialDaysMap;\n }\n\n async loadSpecialDays() {\n /** @type {{dt:string;dtid:number}[]} */\n const rows = await fetchAndCheckJson(`specialday`, 'GET');\n /** @type {Map} */\n const daytypeMap = new Map();\n for (const r of rows) {\n daytypeMap.set(r.dt, r.dtid);\n }\n this._specialDaysMap = daytypeMap;\n }\n\n /**\n * @param {Date} dt\n * @param {number} dtid\n * @param {boolean} system\n */\n async saveSpecialDay(dt, dtid, system) {\n const dtString = getShortDate(dt);\n if (system && this._specialDaysMap.has(dtString)) {\n this._specialDaysMap.delete(dtString);\n } else {\n this._specialDaysMap.set(dtString, dtid);\n }\n const id = dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate();\n if (!system) {\n await fetchAndCheckJson(`specialday/${id}`, 'PUT', { dtid });\n }\n else {\n await fetchAndCheckJson(`specialday/${id}`, 'DELETE');\n }\n }\n\n reset() {\n this._specialDaysMap = new Map();\n }\n}\n\nexport const specialDayData = new SpecialDayData();\n","/** @readonly @enum {number} */\nconst CALL_STATE = createCallStates();\n/** @readonly @enum {number} */\nconst CALL_TRACKER_REPORT_TYPE = createCallTrackerReportTypes();\n/** @readonly @enum {number} */\nconst CALL_TYPE = createCallTypes();\n\n/**\n * A call segment.\n * @typedef {Object} CallTrackerEvent\n * @property {string} stamp\n * @property {number} callType - A {@link CALL_TYPE} value.\n * @property {number} callState - A {@link CALL_STATE} value.\n * @property {string} initials\n * @property {number} stationNumber\n * @property {number} type - A {@link CALL_TRACKER_TYPE} value. Can vary during call\n * @property {string} value\n */\n\n/**\n * @typedef {Object} GenesisCallDto\n * @property {number} callId\n * @property {CallTrackerEvent[]} events\n * @property {number} clientNumber\n */\n\n/**\n * @typedef {Object} GenesisCallTrackerReport\n * @property {string} start\n * @property {number} [switchId]\n * @property {GenesisCallDto[]} calls\n */\n\n/**\n * @param {string[]} lines\n * @returns {GenesisCallTrackerReport}\n */\nexport function parseGenesisCallTrackerTsv(lines) {\n /** @type {GenesisCallDto[]} */\n const calls = [];\n let index = 0;\n let start = '';\n\n while (index < lines.length) {\n const r = splitTabLine(lines[index]);\n index += 1;\n if (r[0] === 'Start Date:') {\n start = r[1];\n } else if (r[0] === 'Stamp') {\n break;\n }\n }\n\n while (true) {\n const r = parseCall(lines, index);\n if (r) {\n calls.push(r.call)\n index = r.endIndex + 1;\n } else {\n break;\n }\n }\n\n return { start, calls };\n}\n\n/**\n * @param {string[]} lines\n * @param {number} startIndex\n * @returns {{call:GenesisCallDto; endIndex:number}}\n */\nfunction parseCall(lines, startIndex) {\n const client = splitTabLine(lines[startIndex]);\n if (client.length !== 3) { return undefined; }\n let clientNumber = Number(client[0]);\n if (Number.isNaN(clientNumber)) {\n clientNumber = null;\n }\n const callId = Number(splitTabLine(lines[startIndex + 1])[1]);\n /** @type {CallTrackerEvent[]} */\n const events = [];\n let i = startIndex + 4;\n\n while (lines[i].length > 0) {\n const segment = splitTabLine(lines[i]);\n const stamp = segment[0];\n const type = parseEnum(CALL_TRACKER_REPORT_TYPE, segment[1]);\n const value = segment[2];\n const callType = parseEnum(CALL_TYPE, segment[3]);\n const initials = segment[5];\n const callState = parseEnum(CALL_STATE, segment[6]);\n const stationNumber = Number(segment[8]);\n\n events.push({ stamp, type, callType, initials, callState, stationNumber, value });\n i += 1;\n }\n\n return { call: { callId, clientNumber, events }, endIndex: i };\n}\n\nfunction createCallTypes() {\n const enumObject = {\n Undefined: 0,\n Secretarial: 1, // regular inbound\n Checkin: 2,\n Fetch: 3,\n Scheduled: 4,\n IVR: 5,\n WebScript: 6,\n VoiceMail: 7,\n AutoCall: 8,\n Announcement: 9,\n MergeComm: 10,\n PageConfirmation: 11,\n SmartPaging: 12,\n ChangeClient: 13,\n AgentAudio: 14,\n Rauland: 15,\n AutoAttendant: 16,\n ListingLookup: 17,\n Dispatch: 18, //include\n ParkOrbit: 19,\n VMCallBack: 20,\n Cue: 21, //include\n Repeat: 22, //include\n ConfBridge: 23,\n Orbit: 24,\n Elevator: 25,\n Pers: 26,\n };\n\n return Object.freeze(enumObject);\n}\n\nfunction createCallStates() {\n const enumObject = {\n Unknown: 0,\n Disposed: 1,\n Disc: 2,\n Ring: 3,\n Talk: 4,\n Talk1: 5,\n Talk2: 6,\n Conference: 7,\n Hold: 8,\n InProgress: 9,\n VoiceMail: 10,\n OutboundQueue: 11,\n Auto: 12,\n AutoHold: 13,\n Patch: 14,\n Bridge: 15,\n MaxStates: 16,\n };\n\n return Object.freeze(enumObject);\n}\n\nfunction createCallTrackerReportTypes() {\n const enumObject = {\n None: 0,\n 'New Call': 1, // *\n 'End Call': 2, // *\n Distribute: 3, // *\n Answered: 4, // *\n Hold: 5, // *\n 'Auto Answer': 6, // *\n 'Dial Start': 7, // *\n 'Dial End': 8, // *\n Overdial: 9, //\n 'Agent Hang Up': 10, // *\n 'System Hang Up': 10, // * kanske\n 'Hung Up': 11, // *\n Change: 12, // *\n Reassign: 13,\n Park: 14, // *\n Conference: 15, // *\n Patch: 16, // *\n Transfer: 17,\n 'Digit Menu Entry': 18, // *\n 'Speech Rec': 19,\n 'Send To Op': 20,\n 'Screen Start & Stop': 21, // kanske 'var SmartPage'\n 'Send To vm': 22, // *\n 'Script Action': 23,\n Abandon: 24, // *\n 'Switch Error': 25,\n Orbit: 26,\n 'Bridge Add': 27,\n 'Bridge Del': 28,\n Voci: 29,\n 'AI Insight': 30,\n Limited: 31,\n 'Disc Alert & override': 32, // *\n 'Logger Start & Stop': 33, // *\n 'Video Recording': 34,\n 'Invalid Source': 35,\n 'Hold Alert': 36,\n };\n\n return Object.freeze(enumObject);\n}\n\n/**\n * @param {Readonly} enumObj\n * @param {string} name\n */\nfunction parseEnum(enumObj, name) {\n /** @type {number} */\n let value = enumObj[name];\n if (value === undefined) {\n let indexOfLeft = name.indexOf('[');\n let indexOfRight = name.indexOf(']');\n if (indexOfLeft >= 0 && indexOfRight > indexOfLeft) {\n value = Number(name.substring(indexOfLeft + 1, indexOfRight));\n if (Number.isNaN(value)) {\n value = null;\n }\n } else {\n value = null;\n }\n }\n return value;\n}\n\n/**\n * @param {string} line\n */\nfunction splitTabLine(line) {\n const r = line.split('\\t');\n for (let i = 0; i < r.length; i++) {\n if (r[i].length > 1 && r[i][0] === '\"') {\n r[i] = r[i].substring(1, r[i].length - 1);\n }\n\n }\n return r;\n}","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { parseGenesisCallTrackerTsv } from './dn-genesis.js';\nvar moment = require(\"moment-timezone\");\n\n/**\n * @typedef {{callid:number|string;timestamp:string;wrap:string|number,talk:string|number;tag1:string|number;tag2:string|number;tag3:string|number;abandon:string|number;switchId?:number}} ImportCallDto\n */\n\n/**\n * @param {string[]} lines\n * @param {number} callImportFileType\n * @param {number} switchId\n * @param {{ (progress: any): void; (arg0: number): void; }} updateProgress\n */\nexport async function importCallsFile(lines, callImportFileType, switchId, updateProgress) {\n let startIndex = 0;\n let data = [];\n /** @type {string} */\n let start;\n let batchSize = 10000;\n let resultData = lines;\n\n if (callImportFileType == CALL_FILETYPE.infinity || callImportFileType == CALL_FILETYPE.isoDate) {\n // if (lines[0].toLowerCase() == 'callid;timestamp;wrap;talk;tag1;tag2;tag3;abandons')\n // startIndex = 1;\n\n /**is this optimized? */\n const requiredHeaders = ['callid', 'timestamp', 'wrap', 'talk', 'tag1', 'tag2', 'tag3', 'abandons'];\n if (lines.length > 0) {\n let headers = lines[0].toLowerCase().split(';');\n headers = headers.map(header => header.replace(/\\s+/g, ''));\n const hasAllHeaders = requiredHeaders.every(header => headers.includes(header)); /**handle import file with header doesnt follow the format indexes */\n if (hasAllHeaders) {\n startIndex = 1;\n const headerIndexMap = headers.reduce((acc, header, index) => {\n acc[header] = index;\n return acc;\n }, {});\n resultData = lines.slice(0)\n .map(line => line.replace(/ /g, ''))\n .filter(rec => rec !== '') \n .map(rec => {\n const values = rec.split(/[;,]/);\n const cleanedValues = requiredHeaders.map(header => values[headerIndexMap[header]] || '');\n return cleanedValues.join(';');\n }); \n }\n }\n\n for (let i = startIndex; i < resultData.length; i++) {\n const line = resultData[i].replace(/\\s+/g, '');\n const callData = line.split(';');\n if (callData.length === 1)\n continue;\n\n if (callData.length !== 8)\n throw new Error(`Number of fields error on line ${i}`);\n\n const callid = parseInt(callData[0]);\n if (!isNonNegative32Bit(callid)) {\n throw new Error(`Invalid callid on line ${i}`);\n }\n\n let timestamp = \"\"\n if (callImportFileType == CALL_FILETYPE.infinity) {\n const minutes = parseInt(callData[1]);\n\n if (!(minutes >= 6000000 && minutes < 68000000)) {\n throw new Error(`Bad formatting of timestamp on line ${i}`);\n }\n\n //the timestamp from text file should be minutes from 1899-12-31 in customer time zone\n //36819360 - 60 * 24 is number of minutes from 1899-12-31 to 1970-01-01\n const dt = new Date((minutes - 36819360 + 60 * 24) * 1000 * 60);\n timestamp = dt.toISOString()\n timestamp = timestamp.substring(0, timestamp.length - 1);\n } else if (callImportFileType == CALL_FILETYPE.isoDate) {\n if (isNaN(Date.parse(callData[1]))) {\n throw new Error(`Bad formatting of timestamp on line ${i}`);\n }\n timestamp = callData[1]\n }\n\n const wrap = parseInt(callData[2]);\n if (!is32Bit(wrap)) {\n throw new Error(`wrap error on line ${i}`);\n }\n\n const talk = parseInt(callData[3]);\n if (!isNonNegative32Bit(talk)) {\n throw new Error(`talk error on line ${i}`);\n }\n\n const tag1 = Number(emptyToNull(callData[4]));\n if (!Number.isInteger(tag1)) {\n throw new Error(`tag1 not number error on line ${i}`);\n }\n if (tag1 != null && !isNonNegative64Bit(tag1)) {\n throw new Error(`tag1 error on line ${i}`);\n }\n\n const tag2 = Number(emptyToNull(callData[5]));\n if (!Number.isInteger(tag2)) {\n throw new Error(`tag2 not number error on line ${i}`);\n }\n if (tag2 != null && !isNonNegative64Bit(tag2)) {\n throw new Error(`tag2 error on line ${i}`);\n }\n\n /** @type {null|string|number} */\n let tag3 = emptyToNull(callData[6]);\n\n if (!Number.isInteger(Number(tag3))) {\n throw new Error(`tag3 not number error on line ${i}`);\n }\n\n if (tag3 !== null) {\n tag3 = parseInt(tag3);\n if (!isNonNegative32Bit(tag3)) {\n throw new Error(`tag3 error on line ${i}`);\n }\n }\n\n const abandon = parseInt(callData[7]);\n if (!(abandon === 0 || abandon === 1)) {\n throw new Error(`abandon expects 0 or 1 error on line ${i}`);\n }\n\n data.push({\n callid: callid,\n timestamp: timestamp,\n wrap: wrap,\n talk: talk,\n tag1: tag1,\n tag2: tag2,\n tag3: tag3,\n abandon: abandon,\n switchId: switchId\n })\n }\n } else if (callImportFileType == CALL_FILETYPE.genesisLS) {\n\n const columnMap = new Map //genesis\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]//.replace(/ /g, '');\n const callData = line.split(';');\n\n if (callData.length === 1)\n continue;\n\n //Read columns\n if (i == 0) {\n for (let c = 0; c < callData.length; c++) {\n let col = callData[c]\n if (col == \"startTime\") { columnMap.set(c, col) }\n if (col == \"externalId\") { columnMap.set(c, col) }\n if (col == \"talk\") { columnMap.set(c, col) }\n if (col == \"wrapup\") { columnMap.set(c, col) }\n if (col == \"mark1\") { columnMap.set(c, col) }\n if (col == \"callType\") { columnMap.set(c, col) }\n }\n } else {\n let callid = 0\n let wrap\n let talk\n let tag1\n let timestamp = \"\"\n let abandon = 0\n\n for (let c = 0; c < callData.length; c++) {\n if (columnMap.has(c)) {\n let col = columnMap.get(c)\n if (col == \"startTime\") {\n if (isNaN(Date.parse(callData[c]))) {\n throw new Error(`Bad formatting of timestamp on line ${i}`);\n }\n timestamp = moment(new Date(callData[c])).format(\"YYYY-MM-DD HH:mm:ss\");\n timestamp = timestamp.substring(0, 10) + 'T' + timestamp.substring(11, 19) + '.000'\n }\n if (col == \"externalId\") {\n callid = parseInt(callData[c]);\n if (!isNonNegative32Bit(callid)) {\n throw new Error(`Invalid callid on line ${i}`);\n }\n }\n if (col == \"talk\") {\n talk = 1000 * parseInt(callData[c]);\n if (!isNonNegative32Bit(talk)) {\n throw new Error(`talk error on line ${i}`);\n }\n }\n if (col == \"wrapup\") {\n wrap = 1000 * parseInt(callData[c]);\n if (!is32Bit(wrap)) {\n throw new Error(`wrap error on line ${i}`);\n }\n }\n if (col == \"mark1\") {\n tag1 = Number(emptyToNull(callData[c]));\n if (!Number.isInteger(tag1)) {\n throw new Error(`tag1 not number error on line ${i}`);\n }\n if (tag1 != null && !isNonNegative64Bit(tag1)) {\n throw new Error(`tag1 error on line ${i}`);\n }\n }\n if (col == \"callType\") {\n if (parseInt(callData[c]) == 3) { abandon = 1 } else { abandon = 0 }\n if (!(abandon === 0 || abandon === 1)) {\n throw new Error(`abandon expects 0 or 1 error on line ${i}`);\n }\n }\n }\n\n }\n\n data.push({\n callid: callid,\n timestamp: timestamp,\n wrap: wrap,\n talk: talk,\n tag1: tag1,\n tag2: 0,\n tag3: 0,\n abandon: abandon,\n switchId: switchId\n })\n }\n }\n } else if (callImportFileType === CALL_FILETYPE.genesisCallTracker) {\n batchSize = 1000;\n const report = parseGenesisCallTrackerTsv(lines);\n start = report.start;\n data = report.calls;\n }\n\n if (data.length === 0)\n throw new Error('No calls to import found');\n\n let result;\n const total = data.length;\n let left = data.length;\n do {\n let batch;\n if (left <= batchSize) {\n batch = data;\n left = 0;\n } else {\n batch = data.splice(0, batchSize);\n left = data.length;\n }\n if (callImportFileType === CALL_FILETYPE.genesisCallTracker) {\n /** @type {import(\"@/js/dn-genesis.js\").GenesisCallTrackerReport} */\n const batchedReport = { start, switchId, calls: batch };\n result = await fetchAndCheckJson(`import-calls?kind=${CALL_FILETYPE.genesisCallTracker}&file=1`, 'POST', batchedReport);\n } else {\n result = await fetchAndCheckJson('import-calls?file=1', 'POST', batch);\n }\n\n updateProgress(1 - left / total);\n } while (left > 0);\n\n return result;\n}\n\n/**\n * @param {number} number\n */\nfunction isNonNegative32Bit(number) {\n return number >= 0 && number <= 2147483647;\n}\n\n/**\n * @param {number} number\n */\nfunction is32Bit(number) {\n return number >= -2147483648 && number <= 2147483647;\n}\n\nfunction isNonNegative64Bit(numberAsString) {\n const number = parseInt(numberAsString);\n return number >= 0 || number <= 9007199254740990\n}\n\n/**\n * @param {string} value\n */\nfunction emptyToNull(value) {\n if (value.length === 0) {\n return null;\n }\n return value;\n}\nexport const CALL_FILETYPE = createCallFileTypeEnum();\n\nfunction createCallFileTypeEnum() {\n const enumObject = {\n isoDate: 0,\n infinity: 1,\n genesisLS: 2,\n genesisCallTracker: 3,\n\n };\n\n return Object.freeze(enumObject)\n}\n\n","import { defineStore } from 'pinia';\nimport { importAgentEventsCsv } from '@/js/dn-agent-event.js';\nimport { importCallsFile } from \"@/js/dn-import-calls.js\";\n\nexport const useFileImportStore = defineStore('fileImport', {\n state: () => ({\n callImportFileType: 0,\n dropFiles: [],\n fileImportInfo: {\n context: [],\n nofImported: 0,\n error: false,\n fileName: \"\"\n },\n importCallsLoadingStatus: 0,\n lastImportFileSetting:{\n lastCallImportFile:0,\n lastAgentImportFile:0 //not in use\n },\n }),\n getters: {\n },\n actions: {\n /**\n * Import calls or agent events csv files.\n * @param {{ blob:Blob; fileCount:number; agentEvents:boolean; callImportFileType:number; switchId:number}} fileInfo\n */\n async executeCsvImport(fileInfo) {\n const blob = fileInfo.blob;\n const dropFileLengh = fileInfo.fileCount;\n const startProgress = this.importCallsLoadingStatus;\n try {\n const updateProgress = progress => {\n if (startProgress + 100 * progress / dropFileLengh < 100) {\n this.importCallsLoadingStatus = startProgress + 100 * progress / dropFileLengh;\n } else { this.importCallsLoadingStatus = 100 }\n };\n\n let content = await blob.text();\n content = content.replace(/(\\r)/gm, '')\n if (fileInfo.agentEvents || fileInfo.callImportFileType !== 3) {\n content = content.replace(/,/g, ';').replace(/\"/g, '');\n }\n \n const lines = content.split('\\n');\n if (fileInfo.agentEvents) {\n await importAgentEventsCsv(lines, fileInfo.switchId, updateProgress);\n } else {\n await importCallsFile(lines, fileInfo.callImportFileType, fileInfo.switchId, updateProgress);\n }\n\n const fileImportInfo = this.fileImportInfo;\n fileImportInfo.nofImported += 1;\n fileImportInfo.fileName = blob.name\n fileImportInfo.context.push({msg:'File ' + blob.name + ': ' + (lines.length - 1) + ' rows',severity:\"success\"});\n } catch (error) {\n const fileImportInfo = this.fileImportInfo;\n fileImportInfo.error = true;\n fileImportInfo.fileName = blob.name\n fileImportInfo.context.push({msg:'File ' + blob.name + ': ' + error,severity:\"error\"});\n }\n },\n }\n}\n);\n","import { defineStore } from 'pinia';\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { forecastData } from '@/stores/dn-forecast-data.js';\nimport { forecastAiData } from '@/stores/dn-forecast-ai-data.js';\nimport { specialDayData } from '@/stores/dn-special-day-data.js';\nimport { useDataStore } from './dataStore';\nimport { getAllWeekData, getCallStatsWeek, getChartData, updateForecastInAllWeekData } from '@/js/dn-forecast.js';\nimport { getLastForcastOptions,setLastForcastOptions } from '@/js/dn-localStorage';\n\nlet _isLoadingHistoricData = false;\nlet _isLoadingAiForecast = false;\n\nexport const useForecastStore = defineStore('forecast', {\n state: () => ({\n callStatsWeek: [],\n callStatsWeekMap: new Map(),\n chartData: [],\n /** @type {Map>} */\n forecastAdjustmentmap: new Map(),\n forecastOptions: {\n selectedParameters: ['noc'],\n compareWithForecast: true,\n /**@type {{id: number; system: boolean; }}; */\n focusedDaytyp: { id: undefined, system: undefined },\n /** @type {{id:number;forecastMethod:number}[]} */\n selectedCallGroups: [],\n selectedCallCenters: [],\n selectedDates: [],\n adjustmentDate: null,\n adjustmentDialogShow:false,\n historicWeeks: 6,\n forecastWeeks: 3,\n numberOfHistoricSpecialDays: 10,\n occupacyFte: 90,\n adherancePercent: 89,\n forecastIsLoaded: false,\n /** @type {Date} */\n historicFocusDate: null,\n compareSencitivity: 0,\n percentOfAbandonsToInclude: 50,\n useAiForecast:true,\n aiForecastIsLoaded: false,\n copiedData:null,\n },\n }),\n actions: {\n /* initial fetch of callstatsWeek */\n fetchForecast() {\n const dataStore = useDataStore();\n const dayTypes = dataStore.dayTypes;\n this.callStatsWeekMap = getAllWeekData(\n dataStore.dateNow, this.forecastOptions, specialDayData.specialDaysMap, forecastData.historicDataMap, dataStore.callGroupsAllowed, dayTypes);\n },\n async initForecast() {\n const dataStore = useDataStore();\n const forecastStore = useForecastStore();\n const promises = []\n promises.push(dataStore.loadDayTypes())\n promises.push(dataStore.loadCallGroups())\n promises.push(specialDayData.loadSpecialDays());\n promises.push(dataStore.loadSwitches());\n promises.push(dataStore.backOfficeSkills.load());\n await Promise.all(promises)\n forecastStore.loadLocalForcastOptions(); //dependent on callGroups\n await forecastStore.loadForecastAdjustment();\n await forecastStore.reloadForecastAndHistoricData();\n },\n\n async reloadAiForecast() {\n if (_isLoadingAiForecast)\n return;\n const dataStore = useDataStore();\n if (dataStore.dateNow === null) { return; }\n _isLoadingAiForecast = true;\n try {\n \n this.forecastOptions.aiForecastIsLoaded = false;\n let ok = false;\n do {\n ok = await forecastAiData.loadAiForecastData(this.forecastOptions);\n if (ok) {\n this.forecastOptions.aiForecastIsLoaded = true;\n this.fetchForecast();\n this.updateForecast();\n } else {\n await new Promise((resolve) => { setTimeout(() => resolve(null), 30000); });\n }\n } while (!ok);\n } catch (error) {\n console.log(error);\n } finally {\n _isLoadingAiForecast = false;\n }\n },\n\n async reloadForecastAndHistoricData() {\n if (_isLoadingHistoricData)\n return;\n const dataStore = useDataStore();\n if (dataStore.dateNow === null) { return; }\n _isLoadingHistoricData = true;\n try {\n const dayTypes = dataStore.dayTypes;\n this.forecastOptions.forecastIsLoaded = false;\n let ok1 = false;\n let ok2= false;\n do {\n ok1 = await forecastData.loadHistoricData(dataStore.dateNow, this.forecastOptions, dayTypes, specialDayData.specialDaysMap);\n if(this.forecastOptions.useAiForecast){\n ok2 = await forecastAiData.loadAiForecastData(this.forecastOptions);\n }else{ok2=true}\n if (ok1&&ok2) {\n this.forecastOptions.forecastIsLoaded = true;\n this.fetchForecast();\n this.updateForecast();\n } else {\n await new Promise((resolve) => { setTimeout(() => resolve(null), 30000); });\n }\n } while (!(ok1&&ok2));\n } catch (error) {\n console.log(error);\n } finally {\n _isLoadingHistoricData = false;\n }\n },\n /* recalculate callstatsWeek with updated forecast */\n updateForecast() { \n const dataStore = useDataStore();\n this.callStatsWeekMap = updateForecastInAllWeekData(this.callStatsWeekMap, dataStore.dateNow, this.forecastOptions, specialDayData.specialDaysMap,\n this.forecastAdjustmentmap, forecastData.historicDataMap,forecastAiData.forecastDataMap, dataStore.callGroupsAllowed, dataStore.latestImportDate);\n this.callStatsWeek = getCallStatsWeek(this.callStatsWeekMap, this.forecastOptions, specialDayData.specialDaysMap)\n },\n /* Recalcualte CallStatweek with new selection of callgroups and focused daytype */\n updateCallStatsWeek() {\n this.callStatsWeek = getCallStatsWeek(this.callStatsWeekMap, this.forecastOptions, specialDayData.specialDaysMap)\n },\n async loadForecastAdjustment() {\n const dataStore = useDataStore();\n /** @type {{dt:string; adj:number;cgid:number;quarterRange:null|[number,number];static_noc:null|number[];static_ht:null|number[]}[]} */\n const rows = await fetchAndCheckJson(`forecastadjustment`, 'GET');\n const callGroups = dataStore.callGroupsAllowed;\n /** @type {Map>} */\n const adjustmentMap = new Map();\n for (let i = 0; i < rows.length; i++) {\n const key = rows[i].dt.substring(0, 10);\n /** @type {Map} */\n let dayMap;\n if (adjustmentMap.has(key)) {\n dayMap = adjustmentMap.get(key)\n } else {\n dayMap = new Map()\n adjustmentMap.set(key, dayMap);\n }\n const rec = rows[i]\n for (let a = 0; a < callGroups.length; a++) {\n if (callGroups[a].id == rec.cgid) {\n let staticData = null\n const qr = rec.quarterRange ? rec.quarterRange : [0,96];\n if (rec.static_noc&&rec.static_ht){staticData={noc:rec.static_noc,ht:rec.static_ht}}\n dayMap.set(rec.cgid, {nocAdj:rec.adj,quarterRange:qr,copiedNocAht:staticData});\n }\n }\n }\n this.forecastAdjustmentmap = adjustmentMap;\n },\n loadLocalForcastOptions() {\n const dataStore = useDataStore();\n const forecastOptions = this.forecastOptions\n let localForecastOptions = getLastForcastOptions()\n if (localForecastOptions && localForecastOptions.selectedAcGrIds) {\n let selectedCallGroups = []\n const callGroups = dataStore.callGroupsAllowed;\n for (let i = 0; i < localForecastOptions.selectedAcGrIds.length; i++) {\n for (let a = 0; a < callGroups.length; a++) {\n if (localForecastOptions.selectedAcGrIds[i] == callGroups[a].id) {\n selectedCallGroups.push(callGroups[a])\n }\n }\n }\n\n forecastOptions.selectedParameters = localForecastOptions.selectedParameters\n forecastOptions.compareWithForecast = localForecastOptions.compareWithForecast\n forecastOptions.selectedCallGroups = selectedCallGroups\n if(localForecastOptions.selectedCallCenters){forecastOptions.selectedCallCenters=localForecastOptions.selectedCallCenters}else{forecastOptions.selectedCallCenters=[]}\n }\n\n const dayTypes = dataStore.dayTypes;\n dayTypes.forEach((dt) => {\n if (dt.system) { forecastOptions.focusedDaytyp = dt }\n })\n },\n saveLocalForecastOptions(){\n let localForecastOptions = {\n selectedParameters: this.forecastOptions.selectedParameters,\n compareWithForecast: this.forecastOptions.compareWithForecast,\n //selectedCallGroups:this.forecastOptions.selectedCallGroups,\n selectedAcGrIds: this.forecastOptions.selectedCallGroups.map(function (x) { return x.id }),\n selectedDates: this.forecastOptions.selectedDates,\n selectedCallCenters:this.forecastOptions.selectedCallCenters\n \n }\n setLastForcastOptions(localForecastOptions)\n },\n setChartData() {\n const dataStore = useDataStore();\n this.chartData = getChartData(this.forecastOptions, specialDayData.specialDaysMap, dataStore.dateNow, this.forecastAdjustmentmap, forecastData.historicDataMap,forecastAiData.forecastDataMap, dataStore.latestImportDate);\n },\n }\n});\n","import { defineStore } from 'pinia';\nimport { addDays } from '@/shared/dn-shared-helper.js';\nimport { getSimData, SimState } from '@/js/dn-simulation.js';\nimport { getEmployees } from '@/js/dn-fetch-employee.js';\nimport { createSchedule } from '#shared/dn-employee-schedule';\nimport { getScheduleTasks } from '@/js/dn-fetch-schedule.js';\nimport { useDataStore } from '@/stores/dataStore.js';\nimport { forecastData } from '@/stores/dn-forecast-data.js';\nimport { forecastAiData } from '@/stores/dn-forecast-ai-data.js';\nimport { specialDayData } from '@/stores/dn-special-day-data.js';\nimport { useForecastStore } from '@/stores/forecastStore.js';\nimport { useScheduleStore } from \"@/stores/scheduleStore.js\";\n\nexport const usePortfolioStore = defineStore('portfolio', {\n state: () => ({\n callCenterKeyFigures: [],\n callCenterKeyFiguresLoadingStatus: 0,\n }),\n actions: {\n clearCallCenterKeyFigures() {\n this.callCenterKeyFigures = [];\n this.callCenterKeyFiguresLoadingStatus = 0;\n },\n /**\n * @param {Date} startDate\n */\n async fetchCallcenterKeyFigures(startDate) {\n const dataStore = useDataStore();\n this.callCenterKeyFiguresLoadingStatus = 0;\n let callCenterKeyFifures = []\n /** @type {{avgQueue:boolean; datesWithChanges:any[]; employeeOccupancy:boolean; forceUpdate:boolean; numberOfSimIterations:number; occ:boolean; sl:boolean; waitWithin:boolean}} */\n const outputSpec = { forceUpdate: true, datesWithChanges: [], sl: true, occ: true, avgQueue: false, waitWithin: false, employeeOccupancy: false, numberOfSimIterations: 1 }\n\n const taskTypeMap = dataStore.taskTypeMap\n\n /** @type {{id:number}[]} */\n const activeCallCenters = dataStore.callCentersAllowed;\n\n for (let c = 0; c < activeCallCenters.length; c++) {\n let cc = activeCallCenters[c]\n\n let data = { occ: [], sl: [], work: [], vacation: [], sick: [], employees: [] }\n for (let d = 0; d < 7; d++) {\n const dateInterval = { numberOfDays: 1, st: addDays(startDate, d) }\n const scheduleOptions = { dateInterval: [addDays(startDate, d), addDays(startDate, d)], }\n const x = await getCCSimData(cc, dateInterval, outputSpec, scheduleOptions);\n data.occ.push(x.simdata.occ)\n data.sl.push(x.simdata.slAvg)\n data.work.push(x.simdata.work)\n data.vacation.push(x.vacation)\n data.sick.push(x.sick)\n data.employees.push(x.employees)\n this.callCenterKeyFiguresLoadingStatus += 100 / (activeCallCenters.length * 7)\n }\n callCenterKeyFifures.push(data)\n }\n\n this.callCenterKeyFigures = callCenterKeyFifures;\n\n /**\n * @param {{ id: number; }} cc\n * @param {{ st: Date; numberOfDays: number; }} dateInterval\n * @param {{ avgQueue: boolean; datesWithChanges: any[]; employeeOccupancy: boolean; forceUpdate: boolean; numberOfSimIterations: number; occ: boolean; sl: boolean; waitWithin: boolean; }} outputSpec\n * @param {{ dateInterval: Date[]; }} scheduleOptions\n */\n async function getCCSimData(cc, dateInterval, outputSpec, scheduleOptions) {\n const dataStore = useDataStore();\n const forecastStore = useForecastStore();\n const scheduleStore = useScheduleStore();\n const taskTypes = dataStore.taskTypes;\n return await new Promise((resolve) => {\n let promises = []\n promises.push(getEmployees(cc.id))\n promises.push(getScheduleTasks([dateInterval], cc.id))\n Promise.all(promises).then((values) => {\n /** @type {import(\"@/shared/dn-employee.js\").Employee[]} */ // @ts-ignore\n let employees = values[0]\n /** @type {import(\"@/shared/dn-task.js\").Task[]} */ // @ts-ignore\n let scheduleTasks = values[1]\n //calculate sick and vacation\n const schedule = createSchedule({numberOfDays:1, st: dateInterval.st}, scheduleTasks, taskTypes, employees, false);\n let numberOfSick = 0\n let numberOfVacation = 0\n for (let e = 0; e < schedule.length; e++) {\n if (schedule[e].absences.length > 0) {\n let absTask = schedule[e].absences[0]\n let tt = taskTypeMap.get(absTask.tasktypeId)\n if (tt.subtype == 's') { ++numberOfSick }\n if (tt.subtype == 'v') { ++numberOfVacation }\n }\n }\n const callGroups = dataStore.callGroups;\n const ccCallGroups = callGroups.filter((cg) => cg.contactCenterId == cc.id);\n const affinities = new Set();\n for (const cg of ccCallGroups) {\n affinities.add(cg.affinity);\n }\n\n let occ = 0;\n let slAvg = 0;\n let work = 0;\n for (const affinity of affinities) {\n const simState = new SimState(taskTypes, dataStore.dateNow, forecastStore.forecastAdjustmentmap,\n forecastStore.forecastOptions, forecastData.historicDataMap,forecastAiData.forecastDataMap, scheduleStore.simulationSettings,\n specialDayData.specialDaysMap, ccCallGroups, dataStore.latestImportDate, dataStore.employeeCallcenters, cc.id, affinity);\n const simData = getSimData(\n outputSpec,\n simState,\n scheduleOptions,\n schedule,\n );\n occ += simData.occ;\n slAvg += simData.serviceLevelDisplayData[0].slAvg;\n work += simData.work;\n }\n\n if (affinities.size > 0) {\n occ = occ / affinities.size;\n slAvg = slAvg / affinities.size;\n }\n\n let data = { simdata: { occ, slAvg, work }, sick: numberOfSick, vacation: numberOfVacation, employees: employees.length }\n resolve(data)\n })\n })\n }\n },\n }\n});","import { defineStore } from 'pinia';\r\nimport { useDataStore } from './dataStore';\r\n\r\nexport const useReportStore = defineStore('report', {\r\n state: () => ({\r\n reportOptions: {\r\n /** @type {number} */\r\n agreementID: undefined,\r\n includePaidBreaks: false,\r\n /** @type {number} */\r\n numHoursWeeklyOvertime: null,\r\n payrollReportOneRow: false,\r\n reportCalendarDays: false,\r\n reportCsvSemicolon: false,\r\n reportDatePicker: new Date(0),\r\n /** @type {number[]} */\r\n reportFilter:[],\r\n reportKind: 0,\r\n reportTimeRangePicker: [],\r\n selectedEmp: null,\r\n selectedTasks: new Set(),\r\n selectedTasktype:null,\r\n separateColumns: false,\r\n weekendAsHoliday: false,\r\n },\r\n }),\r\n actions: {\r\n toggleSelectedTask(task){\r\n if(!task.checked) {\r\n this.reportOptions.selectedTasks.add(task.id)\r\n }\r\n else{\r\n this.reportOptions.selectedTasks.delete(task.id)\r\n }\r\n },\r\n selectedTasktoString(){\r\n if (this.reportOptions.selectedTasks.size == 0) {\r\n return \"No tasks selected\"\r\n }\r\n let thisTaskname = \"\";\r\n let stringArray = []\r\n let taskTypesMap = useDataStore().taskTypes.byId\r\n for (const taskTypeID of this.reportOptions.selectedTasks) {\r\n thisTaskname = taskTypesMap.get(taskTypeID).name\r\n stringArray.push(thisTaskname)\r\n }\r\n\r\n return stringArray.join(\", \");\r\n }\r\n }\r\n});\r\n","import { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { getUniqueNegativeId,timeRangeInformation } from '@/js/dn-helper.js';\nimport { useDataStore } from '@/stores/dataStore';\n\n\n/**\n* @typedef {{id: number,daysOfWeek: number[], blackHours:[number,number],grade:number,taskTypeId:number}} BreakBlackoutDto\n*/\n\n/**\n* @typedef {{\n* callcenterId: number;\n* spreadFactor: number;\n* avoidSimultanousBreaksFactor: number;\n* numberOfIterations: number;\n* breakStartQuarterHours:boolean;\n* blackouts: BreakBlackoutDto[]\n* }} BreakOptimizationSettingsDto\n*/\n\nexport class BreakOptimizationSettings {\n /**\n * @param {BreakOptimizationSettingsDto} dto\n */\n constructor(dto) {\n /** @private @type {number} */\n this.callcenterId = dto.callcenterId;\n /** @private @type {number} */\n this._spreadFactor = dto.spreadFactor;\n /** @private @type {number} */\n this._avoidSimultanousBreaksFactor = dto.avoidSimultanousBreaksFactor;\n /** @private @type {number} */\n this._numberOfIterations = dto.numberOfIterations;\n /** @private @type {boolean} */\n this._breakStartQuarterHours = dto.breakStartQuarterHours;\n /** @private @type {BreakOptimizationSettingDetail[]} */\n this._blackouts = []\n for (const blackout of dto.blackouts) {\n this._blackouts.push(new BreakOptimizationSettingDetail(this, blackout));\n }\n }\n\n get spreadFactor() {\n return this._spreadFactor;\n }\n set spreadFactor(newValue) {\n this.markAsHasChanges();\n this._spreadFactor = newValue;\n }\n\n get avoidSimultanousBreaksFactor() {\n return this._avoidSimultanousBreaksFactor;\n }\n set avoidSimultanousBreaksFactor(newValue) {\n this.markAsHasChanges();\n this._avoidSimultanousBreaksFactor = newValue;\n }\n\n get numberOfIterations() {\n return this._numberOfIterations;\n }\n set numberOfIterations(newValue) {\n this.markAsHasChanges();\n this._numberOfIterations = newValue\n }\n\n get breakStartQuarterHours() {\n return this._breakStartQuarterHours;\n }\n set breakStartQuarterHours(newValue) {\n this.markAsHasChanges();\n this._breakStartQuarterHours = newValue\n }\n\n get blackouts() {\n return this._blackouts;\n }\n\n get hasChanges() {\n return this._hasChanges;\n }\n\n addBlackout() {\n const id = getUniqueNegativeId(this.blackouts);\n this.blackouts.push(new BreakOptimizationSettingDetail(this, { id, daysOfWeek: [0, 1, 2, 3, 4, 5, 6], blackHours: [17*12, 18*12], grade: 30, taskTypeId: null }));\n }\n\n /**\n * @param {{ id: number; }} row\n */\n deleteBlackout(row) {\n const index = this.blackouts.findIndex(x => x.id === row.id);\n this.blackouts.splice(index, 1);\n this.markAsHasChanges();\n }\n\n markAsHasChanges() {\n this._hasChanges = true;\n }\n\n confirmChanges() {\n this._hasChanges = false;\n }\n\n async save() {\n await fetchAndCheckJson(`break-optimization-settings`, 'POST', this.toDto());\n this.confirmChanges();\n }\n\n /** @returns {BreakOptimizationSettingsDto} */\n toDto() {\n return {\n callcenterId: this.callcenterId, spreadFactor: this._spreadFactor,\n avoidSimultanousBreaksFactor: this._avoidSimultanousBreaksFactor, numberOfIterations: this._numberOfIterations,\n breakStartQuarterHours: this._breakStartQuarterHours, blackouts: this._blackouts.map(x => x.toDto())\n };\n }\n}\n\nexport class BreakOptimizationSettingDetail {\n /**\n * @param {BreakOptimizationSettings} parent\n * @param {BreakBlackoutDto} dto\n */\n constructor(parent, dto) {\n /** @private @type {number} */\n this._id = dto.id;\n /** @private @type {number[]} */\n this._daysOfWeek = dto.daysOfWeek;\n /** @private @type {[number,number]} */\n this._blackHours = dto.blackHours;\n /** @private @type {number} */\n this._grade = dto.grade;\n /** @private @type {number} */\n this._taskTypeId = dto.taskTypeId;\n /** @private @type {BreakOptimizationSettings} */\n this.parent = parent;\n }\n\n get id() {\n return this._id;\n }\n\n get daysOfWeek() {\n return this._daysOfWeek;\n }\n set daysOfWeek(newValue) {\n this.parent.markAsHasChanges();\n this._daysOfWeek = newValue\n }\n\n get blackHours() {\n return this._blackHours;\n }\n set blackHours(newValue) {\n this.parent.markAsHasChanges();\n this._blackHours = newValue\n }\n\n get blackGrade() {\n return this._grade;\n }\n set blackGrade(newValue) {\n this.parent.markAsHasChanges();\n this._grade = newValue;\n }\n\n get taskTypeId() {\n return this._taskTypeId;\n }\n set taskTypeId(newValue) {\n this.parent.markAsHasChanges();\n this._taskTypeId = newValue;\n }\n\n /**\n * @param {Intl.LocalesArgument} lang\n */\n blackHoursInfo(lang) {\n const hourFormat = useDataStore().hourFormat;\n return timeRangeInformation(lang,this.blackHours,3, hourFormat);\n }\n\n /** @returns {BreakBlackoutDto} */\n toDto() {\n /** @type {[number, number]} */\n const blackHours = [this.blackHours[0],this.blackHours[1]];\n return { id: this.id, daysOfWeek: this.daysOfWeek.slice(), blackHours, grade: this._grade, taskTypeId: this.taskTypeId };\n }\n}\n\n/**\n * @param {number} callcenterId\n */\nexport async function getBreakOptimizationSettings(callcenterId) {\n /** @type {BreakOptimizationSettingsDto} */\n let dto = await fetchAndCheckJson(`break-optimization-settings?ccId=${callcenterId}`, 'GET');\n if (!dto) {\n dto = {\n callcenterId, breakStartQuarterHours: true,\n spreadFactor: 50, avoidSimultanousBreaksFactor: 50, numberOfIterations: 1, blackouts: []\n };\n }\n return new BreakOptimizationSettings(dto);\n}","\nexport class EmployeeContext {\n constructor() {\n /** @private @type {Set} */\n this.highlightedEmpIds = new Set();\n /** @private @type {number[]} */\n this._checkedEmpIds = [];\n /** @private @type {number} */\n this._activeTab = 0;\n /** @type {number} */\n this.previousTab = 0;\n /** @type {string} */\n this.selectedSection = 'general';\n /** @private @type {boolean} */\n this._hasCheckedNotHighlighted = false;\n /** @private @type {boolean} */\n this._hasModifiedData = false;\n /** @private @type {number} */\n this._modifedDataTab = 0;\n /** @type {null|import(\"@/shared/dn-employee.js\").Employee} */\n this.selectedEmp = null;\n }\n\n get activeTab() {\n return this._activeTab;\n }\n set activeTab(value) {\n this.previousTab = this._activeTab;\n this._activeTab = value;\n }\n\n get checkedEmpIds() {\n return this._checkedEmpIds;\n }\n set checkedEmpIds(value) {\n /** @type {number[]} */\n this.oldCheckedEmpIds = this._checkedEmpIds;\n this._checkedEmpIds = value;\n this.calcHasCheckedNotHighlighted();\n }\n\n get hasCheckedNotHighlighted() {\n return this._hasCheckedNotHighlighted;\n }\n\n get hasModifiedData() {\n return this._hasModifiedData;\n }\n set hasModifiedData(value) {\n if (this._hasModifiedData !== value) {\n this._hasModifiedData = value;\n if (value) {\n this._modifedDataTab = this.activeTab;\n }\n }\n }\n\n get hasModifiedDataInOtherTab() {\n return this.hasModifiedData && this._modifedDataTab !== this.activeTab;\n }\n\n /** @private */\n calcHasCheckedNotHighlighted() {\n let newValue = false;\n for (const empid of this._checkedEmpIds) {\n if (!this.highlightedEmpIds.has(empid)) {\n newValue = true;\n break;\n }\n }\n\n if (this._hasCheckedNotHighlighted !== newValue) {\n this._hasCheckedNotHighlighted = newValue;\n }\n }\n\n /**\n * @param {number} empId\n */\n isHighlighted(empId) {\n return this.highlightedEmpIds.has(empId);\n }\n\n /**\n * @param {Iterable} empIds\n */\n setHighlighedEmps(empIds) {\n /** @type {Set} */\n this.oldHighlightedEmpIds = this.highlightedEmpIds;\n this.highlightedEmpIds = new Set(empIds);\n this.calcHasCheckedNotHighlighted();\n }\n\n revertModifiedData() {\n this.hasModifiedData = false;\n if (this.selectedEmp) {\n this.selectedEmp.revert();\n }\n }\n\n reset() {\n this.selectedEmp = null;\n this._checkedEmpIds = [],\n this.highlightedEmpIds = new Set([]);\n }\n}","\nexport class EmployeeList {\n constructor() {\n /** @private @type {boolean} */\n this._hasChanges = false;\n /** @private @type {import(\"@/shared/dn-employee.js\").Employee[]} */\n this._list = [];\n }\n\n get hasChanges() {\n return this._hasChanges;\n }\n\n get list() {\n return this._list\n }\n\n /**\n * @param {import(\"@/shared/dn-employee.js\").Employee} employee\n */\n add(employee) {\n employee.setContainer(this);\n const list = this.list.slice();\n const numberOfGhosts = list.filter(x => x.ghost ).length;\n\n let index =-1\n for(let i=0;iemployee.name.toLowerCase()){\n index=i\n break\n }\n }\n else{\n if(emp.name.toLowerCase()>employee.name.toLowerCase()){\n index=i\n break\n }\n }\n }\n\n if(index>-1){\n list.splice(index,0,employee)\n }\n else{\n if(employee.ghost){\n list.push(employee);\n }else{\n list.splice(list.length-numberOfGhosts,0,employee)\n }\n \n }\n this._list = list \n }\n\n /**\n * @param {number} employeeId\n */\n deleteEmployee(employeeId) {\n const employees = this.list.slice();\n const index = employees.findIndex(x => x.id === employeeId);\n employees.splice(index, 1);\n this._list = employees;\n this.setHasChanged();\n }\n\n /**\n * @param {import(\"@/shared/dn-employee.js\").Employee[]} employees\n */\n load(employees) {\n this._list = employees;\n for (const t of this._list) {\n t.setContainer(this)\n }\n this._hasChanges = false;\n }\n\n /**\n * @param {boolean} hasChanges\n */\n itemHasChanged(hasChanges) {\n if (hasChanges !== this._hasChanges) {\n if (hasChanges) {\n this._hasChanges = true;\n } else {\n this.setHasChanged();\n }\n }\n }\n\n /**\n * @param {number} id\n */\n getById(id) {\n const employees = this.list;\n let employee = {};\n for (let i = 0; i < employees.length; i++) {\n if (employees[i].id === id) {\n employee = employees[i]\n }\n }\n return employee\n }\n\n /** @private */\n setHasChanged() {\n this._hasChanges = this._list.some(x => x.hasChanges);\n }\n}","import { addUndoTransaction } from \"@/js/dn-undo.js\";\nimport { Task } from \"@/shared/dn-task.js\";\n\nexport class ScheduleTask extends Task {\n /**\n * @param {import(\"@/shared/dn-task.js\").TaskDto} dto\n */\n constructor(dto) {\n super(dto)\n }\n\n get st() {\n return super.st;\n }\n set st(newValue) {\n addUndoTransaction(this.id, this.st, null, null);\n super.st = newValue;\n }\n\n get fi() {\n return super.fi;\n }\n set fi(newValue) {\n addUndoTransaction(this.id, null, this.fi, null);\n super.fi = newValue;\n }\n\n get tasktypeId() {\n return super.tasktypeId;\n }\n set tasktypeId(newValue) {\n addUndoTransaction(this.id, null, null, this.tasktypeId);\n super.tasktypeId = newValue;\n }\n\n get dur() {\n return super.dur;\n }\n set dur(newValue) {\n addUndoTransaction(this.id, null, this.fi, null);\n super.dur = newValue;\n }\n\n get durationDate() {\n return super.durationDate;\n }\n set durationDate(newValue) {\n addUndoTransaction(this.id, null, this.fi, null);\n super.durationDate = newValue;\n }\n\n toDelete() {\n super.toDelete();\n addUndoTransaction(this.id, null, null, null, null, true);\n }\n}\n\nexport class ScheduleTasks {\n constructor() {\n /** @private @type {boolean} */\n this._hasChanges = false;\n /** @private @type {ScheduleTask[]} */\n this._list = null;\n }\n\n get hasChanges() {\n return this._hasChanges;\n }\n\n get isLoaded() {\n return this._list !== null;\n }\n\n get list() {\n return this._list;\n }\n\n /**\n * @param {import(\"@/shared/dn-task.js\").TaskDto} taskDto\n */\n add(taskDto) {\n const task = new ScheduleTask(taskDto);\n addUndoTransaction(task.id, null, null, null, true, null)\n task.setContainer(this);\n this.list.push(task);\n this._hasChanges = true;\n return task;\n }\n\n clear() {\n this._list = [];\n this._hasChanges = false;\n }\n\n /**\n * @param {boolean} hasChanges\n */\n itemHasChanged(hasChanges) {\n if (hasChanges !== this._hasChanges) {\n if (hasChanges) {\n this._hasChanges = true;\n } else {\n this.setItemHasChanges();\n }\n }\n }\n\n /**\n * @param {ScheduleTask[]} tasks\n */\n load(tasks) {\n for (const t of tasks) {\n t.setContainer(this)\n }\n\n this._list = tasks;\n this.setItemHasChanges();\n }\n\n setItemHasChanges() {\n this._hasChanges = this._list.some(x => x.hasChanges);\n }\n\n removeUnsavedDeletedTasks() {\n const scheduleTasks = this.list;\n for (let i = scheduleTasks.length - 1; i >= 0; i--) {\n if (scheduleTasks[i].isToDelete && scheduleTasks[i].id < 0) {\n scheduleTasks.splice(i, 1);\n }\n }\n }\n}\n","import { defineStore } from 'pinia';\nimport { shallowReactive } from 'vue';\nimport { useDataStore } from \"@/stores/dataStore.js\";\nimport { forecastData } from '@/stores/dn-forecast-data.js';\nimport { forecastAiData } from '@/stores/dn-forecast-ai-data.js';\nimport { specialDayData } from '@/stores/dn-special-day-data.js';\nimport { useForecastStore } from '@/stores/forecastStore.js';\nimport { Availabilities } from '@/model/dn-availability.js'\nimport { AvailabilityRequests } from '@/model/dn-availability-request';\nimport { getBreakOptimizationSettings } from '@/model/dn-break-optimization-settings';\nimport { EmployeeContext } from '@/model/dn-employee-context.js';\nimport { getAffintyIndicators } from \"@/js/dn-employee-helper.js\";\nimport { EmployeeList } from '@/model/dn-employee-list.js';\nimport { EmployeeScheduleList } from '#shared/dn-employee-schedule';\nimport { fetchAndCheckJson } from '@/js/dn-fetch.js';\nimport { getEmployees } from '@/js/dn-fetch-employee.js';\nimport { getTasks, getScheduleTasksSync, updateScheduleTasks } from '@/js/dn-fetch-schedule.js';\nimport { getNumberOfDaysFromIntervalMinusOne } from \"@/js/dn-helper.js\";\nimport { addDays, getDayDiff, getShortDate } from '@/shared/dn-shared-helper.js';\nimport { getRotations } from '@/model/dn-rotation.js';\nimport { getShiftBags } from '@/model/dn-optimizable-shift.js';\nimport columnDefinitions from \"@/jso/dn-column-definitions.json\";\nimport columnDefinitionsDetailed from \"@/jso/dn-column-definitions-detailed.json\";\nimport { getCustomShifts } from '@/model/dn-custom-shift.js';\nimport columnDefinitionsServiceLevel from \"@/jso/dn-serviceLevelColumns.json\";\nimport { getLatestPublishedDate } from \"@/js/dn-schedule-helper.js\";\nimport { getSimData, SimState } from '@/js/dn-simulation.js';\nimport { getCurrentCCId, getLastAgentScheduleOptions, getLastScheduleOptions, getRequestFilterOptions, getScheduleColumnIds, getEmployeeDisplaySettings, getSimulationSettings, setScheduleColumnIds } from '@/js/dn-localStorage';\nimport { getScheduleRequest } from '@/model/dn-schedule-request.js';\nimport { ScheduleTask, ScheduleTasks } from '@/model/dn-schedule-task.js';\nimport { EventBus } from \"@/js/dn-event-bus.js\";\nimport { DateInterval } from '#shared/dn-date-interval';\nimport {getRevisionMap,decrementUndoRevision,incrementUndoRevision,resetUndo,addRedoTransaction} from \"@/js/dn-undo.js\";\n\n\n/** \n * dateKeys already retrieved from database and up to date until given id:s\n * @type {{loaded:number[]; last?:{id:number;histId:number}}} \n */\nconst _scheduleTaskInfo = { loaded: [] };\n\nexport const useScheduleStore = defineStore('schedule', {\n state: () => ({\n affintyIndicatorsMap: null,\n availabilityRequests: new AvailabilityRequests(),\n availabilities: shallowReactive(new Availabilities()),\n /**@type {import(\"@/model/dn-break-optimization-settings.js\").BreakOptimizationSettings} */\n breakOptimizationSettings: null,\n customShifts: [],\n employeeContext: shallowReactive(new EmployeeContext()),\n employees: shallowReactive(new EmployeeList()),\n employeeDisplaySettings: {\n workTimeWarning: true,\n skillsWarning: true,\n shiftWarning: true,\n switchIdWarning: true,\n hasMobileApp: true,\n breakWarnings: true,\n multiEditSameValue: false\n },\n inspectorPanel: {\n timespan: 2.0,\n stQ: 0,\n runningStQ: 0,\n hideTimeSpan: false,\n serviceLevel: true,\n },\n loadCCData: false,\n pinnedRequestKey: 0,\n /** @type {import(\"@/model/dn-rotation\").Rotations} */\n rotations: null,\n schedule: shallowReactive(new EmployeeScheduleList()),\n scheduleColumnDefinitions: getScheduleColumnDefinitions(),\n scheduleColumnDefinitionsDetailed: getScheduleColumnDefinitionsDetailed(),\n scheduleOptions: {\n /** @type {Date[]} */\n dateInterval: [],\n /** @type {Map} */\n selection: new Map(), //key:getSelectionKey(dt,emp.empid) value:{emp:emp,dt:dt})\n currentSortMap: new Map(),//key:row index 0,1,2... value:emp\n /** @type {{st:number;fi:number;ttid:number}[][]} */\n copiedShifts: [],\n dragSelectionStart: {}, //{emp:emp,dt:dt}\n showServiceLevel: false,\n showDetailsInServiceLevel: false,\n showOccupancyChart: false,\n showAvgQueueChart: false,\n showWaitWithinChart: false,\n showWorkChart: false,\n showEmployeeOccupancy: false,\n showReplacementDialog: false,\n dispalySimulationSettings: false,\n showInactive: false,\n showDetailEdit: false,\n showRequestTile: false,\n selectedEmpId: 0,\n numberOfSimIterations: 1,\n autoSimulate: true,\n autoKeyFigures: false,\n numberOfDaysInSchedule: 7, //\n agentScheduleViewClock: true,\n agentScheduleDarkView: false,\n agentExpandedTeamView: false,\n agentAcceptedCookies: undefined,\n selectedDate: new Date(0),\n selectedDateInTeamSchedule: new Date(0),\n findReplacementSelected: false,\n scheduleFilter: { show: false, searchText: '', affinity: null, callGroups: [], taskTypes: [], tagIds: [], filterMsg: '', applyToChart: false,includeTerminated: false },\n chartDisplay: { erlangC: false, target: true, smooth: false, chartInspector: false, fixedY: false, fixedYvalue: 10, servicelevelPercentForWarning: 60, breaks: false,deviationTooFewBars:true,deviationTooManyBars:true },\n workChartHeight: 160,\n adherence: { showLog: false, showWorkWarnings: false, showBreakWarnings: false, showAdherenceWarnings: false, showInRotation: false },\n meetingSettings:{meetingLastTasktypeId:null,lastStartMinute:60*9,lastStartMinuteMax:60*16,lastDurationMinute:60,onlyOnShift:true,flexStart:false},\n notifications:{onScheduleChange:false},\n scheduleIndicators:{highlightBeforeSave:false,unsavedIndicators:false},\n saveButtonHovered:false,\n virtualScrollerOptions:{}//itemSize: 27\n },\n scheduleRequestData: {\n /** @type {Map} */\n byId: new Map(),\n /** @type {Map} */\n bySelectionKey: new Map(),\n /** @type {import(\"@/model/dn-schedule-request.js\").ScheduleRequest[]} */\n items: [],\n loaded: new Date(0),\n /** @type {number} */\n employeeId: null,\n /** @type {number} */\n ccId: null,\n },\n scheduleRequestSettings: {\n showSick: true,\n showVacation: true,\n showFree: true,\n showWork: true,\n showAvailability: false,\n showUnavailability: true,\n showPending: true,\n showFuture: false,\n showBasedOnSelection: false,\n showApproved: false,\n showRejected: false,\n showHistoric: false,\n tagId: 0\n },\n scheduleTasks: shallowReactive(new ScheduleTasks()),\n /** @type {number[]} */\n selectedScheduleColumnIds: [1, 2, 8, 9],\n serviceLevelColumnDefinitions: getServiceLevelColumnDefinitions(),\n /** @type {{ employeeOccupancyData:import(\"@/js/dn-simulation.js\").EmployeeOccupancyData; occChartData:any; serviceLevelDisplayData:any;byAffinity:any }} */\n simData: null,\n simulationStatus: 0,\n simulationSettings: {\n displaySLSencitivity: 4,\n callsPercent: 0,\n handlingTimePercent: 0,\n handlingTimeVariationPercent: 0,\n percetageOfCallsInWaitChart: 80,\n empOccTarget: [35, 80],\n },\n /** @type {import(\"@/model/dn-optimizable-shift\").ShiftBags} */\n shiftBags: null,\n }),\n getters: {\n scheduleDateInteval() {\n const user = useDataStore().currentUser;\n const dateArray = this.scheduleOptions.dateInterval;\n if (!user || dateArray.length === 0) { return undefined; }\n const numberOfDays = 1 + getDayDiff(dateArray[1], dateArray[0]);\n return new DateInterval(dateArray[0], numberOfDays, user.timezoneUI);\n },\n getAffintyIndicatorsMap() {\n if (!this.affintyIndicatorsMap) {\n this.affintyIndicatorsMap = getAffintyIndicators(this.employees.list, 100);\n }\n return this.affintyIndicatorsMap;\n },\n getNumberOfDaysInSchedule() {\n if (this.scheduleOptions.dateInterval.length === 0) { return 0; }\n return getNumberOfDaysFromIntervalMinusOne(this.scheduleOptions.dateInterval);\n },\n scheduleNeedsToSave() {\n const currentUser = useDataStore().currentUser;\n if (currentUser === null || !currentUser.canEditScheduling)\n return false;\n return this.scheduleRequestData.items.some(x => x.isPending) ||\n (this.scheduleTasks.hasChanges && this.scheduleTasks.list.some(x => x.hasChanges && isAllowedToSave(x))) ||\n this.employees.hasChanges;\n }\n\n },\n actions: {\n undo(){\n decrementUndoRevision()\n const revisionMap = getRevisionMap()\n const undoMap = revisionMap.undo\n const redoMap = revisionMap.redo\n let changedDates=[]\n \n for (let key of undoMap.keys()) {\n let v=undoMap.get(key)\n let t=this.scheduleTasks.list.find((item) => item.id === key);\n\n\n //a task not saved and deleted is not icluded in scheduleTasks.list\n //and can not be reverted\n\n if(t){\n if(v.isNew||v.isDeleted){\n addRedoTransaction(redoMap,t.id,t.st,t.fi,t.tasktypeId,!v.isNew,!v.isDeleted)\n }else{\n addRedoTransaction(redoMap,t.id,t.st,t.fi,t.tasktypeId,false,false)\n } \n \n t.revertTo(v.st,v.fi,v.tasktypeId,v.isNew,v.isDeleted)\n let dt = getShortDate(t.st)\n if(!changedDates.includes(dt)){changedDates.push(dt)}\n }\n \n EventBus.emit(\"schedulePerDtChange\",changedDates);\n }\n \n },\n\n redo(){\n incrementUndoRevision(true)\n const revisionMap = getRevisionMap()\n let changedDates=[]\n let redoMap = revisionMap.redo\n \n for (let key of redoMap.keys()) {\n let v=redoMap.get(key)\n let t=this.scheduleTasks.list.find((item) => item.id === key);\n t.revertTo(v.st,v.fi,v.tasktypeId,v.isNew,v.isDeleted)\n let dt = getShortDate(t.st)\n if(!changedDates.includes(dt)){changedDates.push(dt)}\n }\n EventBus.emit(\"schedulePerDtChange\",changedDates);\n \n },\n\n clearScheduleFilter() {\n const scheduleFilter = this.scheduleOptions.scheduleFilter;\n scheduleFilter.affinity = null;\n scheduleFilter.applyToChart = false;\n scheduleFilter.show = true;\n scheduleFilter.searchText = '';\n scheduleFilter.callGroups = [];\n scheduleFilter.taskTypes = [];\n scheduleFilter.tagIds = [];\n //scheduleFilter.filterMsg = '';\n },\n clearScheduleTasks() {\n _scheduleTaskInfo.loaded = [];\n _scheduleTaskInfo.last = undefined;\n this.scheduleTasks.clear();\n this.scheduleOptions.selection = new Map();\n this.scheduleOptions.selectedEmpId = 0;\n },\n /**\n * @param {import(\"@/js/dn-simulation.js\").OutputSpec} outputSpec\n */\n fetchSimData(outputSpec) {\n const dataStore = useDataStore();\n const forecastStore = useForecastStore();\n\n this.resetSimulationsStatus();\n\n const affinities = dataStore.affinities;\n const ccCallGroups = dataStore.callGroupsCurrentCC;\n const taskTypes = dataStore.taskTypes;\n /** @type {Set} */\n const affinintyIdSet = new Set();\n for (const cg of ccCallGroups) {\n affinintyIdSet.add(cg.affinity);\n }\n\n const schedule = this.schedule.list;\n const byAffinity = [];\n for (const affinityId of affinintyIdSet) {\n const simState = new SimState(taskTypes, dataStore.dateNow, forecastStore.forecastAdjustmentmap,\n forecastStore.forecastOptions, forecastData.historicDataMap,forecastAiData.forecastDataMap, this.simulationSettings,\n specialDayData.specialDaysMap, ccCallGroups, dataStore.latestImportDate, dataStore.employeeCallcenters, dataStore.currentCC.id, affinityId);\n const simData = getSimData(\n outputSpec,\n simState,\n this.scheduleOptions,\n schedule,\n (p) => { this.simulationStatus = p; },\n );\n byAffinity.push({ affinityId: affinityId, simData });\n }\n\n\n /** @type {import(\"@/js/dn-simulation.js\").ServicelevelDisplayData[]} */\n let serviceLevelDisplayData = undefined;\n if (outputSpec.sl) {\n if (byAffinity.length === 1) {\n serviceLevelDisplayData = byAffinity[0].simData.serviceLevelDisplayData;\n } else if (byAffinity.length > 1) {\n serviceLevelDisplayData = [];\n for (const r of byAffinity) {\n for (const sldd of r.simData.serviceLevelDisplayData) {\n if (sldd.acgrid === null) {\n const affinity = affinities.find(x => x.id === sldd.affinity)\n if (affinity) {\n sldd.name = 'SL ' + affinity.name;\n }\n }\n serviceLevelDisplayData.push(sldd);\n }\n }\n }\n }\n\n /** @type {import(\"@/js/dn-simulation.js\").EmployeeOccupancyData} */\n let employeeOccupancyData;\n if (outputSpec.employeeOccupancy) {\n if (byAffinity.length === 1) {\n employeeOccupancyData = byAffinity[0].simData.employeeOccupancyData;\n } else if (byAffinity.length > 1) {\n employeeOccupancyData = new Map();\n for (const r of byAffinity) {\n for (const [employeeId, occ] of r.simData.employeeOccupancyData) {\n let totOcc = employeeOccupancyData.get(employeeId);\n if (totOcc === undefined) {\n totOcc = new Array(occ.length).fill(0);\n employeeOccupancyData.set(employeeId, totOcc);\n }\n for (let i = 0; i < totOcc.length; i++) {\n totOcc[i] = totOcc[i] + occ[i];\n }\n }\n }\n }\n }\n\n /** @type {import(\"@/js/dn-simulation.js\").ChartData[]} */\n let occChartData = undefined;\n if (outputSpec.occ) {\n if (byAffinity.length === 1) {\n occChartData = byAffinity[0].simData.occChartData;\n } else if (byAffinity.length > 1) {\n occChartData = [];\n for (const r of byAffinity) {\n for (const cd of r.simData.occChartData) {\n if (r.affinityId) {\n const affinity = affinities.find(x => x.id === r.affinityId)\n if (affinity) {\n cd.label = 'Occ. ' + affinity.name;\n }\n }\n occChartData.push(cd)\n }\n }\n }\n }\n\n const simData = {\n employeeOccupancyData,\n occChartData,\n serviceLevelDisplayData,\n byAffinity\n };\n\n this.simData = simData;\n },\n async loadAvailabilities() {\n this.availabilities.load(useDataStore().currentCC.id);\n },\n /**\n * @param {number} ccId\n */\n async loadBreakOptimizationSettings(ccId) {\n this.breakOptimizationSettings = await getBreakOptimizationSettings(ccId);\n },\n async loadCurrentCCData() {\n const dataStore = useDataStore();\n if (!dataStore.employeeCallcenters.isLoaded) {\n dataStore.employeeCallcenters.load();\n }\n this.shiftBags = null;\n this.rotations = null;\n this.availabilities.clear();\n this.zeroSchedule();\n resetUndo()\n if (dataStore.currentCC) {\n const ccId = dataStore.currentCC.id;\n this.loadCCData = this.loadCCData || !dataStore.currentUser.isAgent;\n if (this.loadCCData) {\n this.availabilityRequests.init(ccId, false);\n } else {\n this.availabilityRequests.init(dataStore.currentUser.employee.id, true);\n }\n this.loadScheduleRequests();\n this.availabilities.load(ccId);\n if (!dataStore.currentUser.isAgent) {\n this.loadBreakOptimizationSettings(ccId);\n this.loadCustomShifts(ccId);\n this.loadShiftBags(ccId);\n this.loadRotations(ccId);\n }\n await this.loadEmployees(ccId);\n }\n },\n /**\n * @param {number} ccId\n */\n async loadEmployees(ccId) {\n const employees = await getEmployees(ccId);\n this.employees.load(employees);\n this.clearScheduleTasks();\n this.affintyIndicatorsMap = null;\n },\n /**\n * @param {number} ccId\n */\n async loadRotations(ccId) {\n this.rotations = await getRotations(ccId);\n },\n /**\n * @param {number} ccId\n */\n async loadShiftBags(ccId) {\n this.shiftBags = await getShiftBags(ccId);\n },\n /**\n * @param {number} ccId\n */\n async loadCustomShifts(ccId) {\n this.customShifts = await getCustomShifts(ccId);\n },\n loadLocalAgentScheduleOptions() {\n const scheduleOptions = this.scheduleOptions;\n const localAgentScheduleOptions = getLastAgentScheduleOptions()\n\n if (localAgentScheduleOptions && useDataStore().currentUser.isAgent) {\n scheduleOptions.agentScheduleViewClock = localAgentScheduleOptions.agentScheduleViewClock\n scheduleOptions.agentExpandedTeamView = localAgentScheduleOptions.agentExpandedTeamView\n scheduleOptions.agentScheduleDarkView = localAgentScheduleOptions.agentScheduleDarkView\n scheduleOptions.agentAcceptedCookies=localAgentScheduleOptions.agentAcceptedCookies\n } else {\n scheduleOptions.agentScheduleViewClock = true\n scheduleOptions.agentExpandedTeamView=false\n scheduleOptions.agentScheduleDarkView = false\n scheduleOptions.agentAcceptedCookies=undefined\n }\n },\n loadLocalScheduleOptions() {\n let scheduleOptions = this.scheduleOptions;\n let inspector = this.inspectorPanel;\n let localScheduleOptions = getLastScheduleOptions();\n if (localScheduleOptions) {\n scheduleOptions.showServiceLevel = localScheduleOptions.showServiceLevel\n scheduleOptions.showOccupancyChart = localScheduleOptions.showOccupancyChart\n scheduleOptions.showWorkChart = localScheduleOptions.showWorkChart\n if (localScheduleOptions.workChartHeight > 0) { scheduleOptions.workChartHeight = localScheduleOptions.workChartHeight }\n scheduleOptions.showRequestTile = localScheduleOptions.showRequestTile\n scheduleOptions.showEmployeeOccupancy = localScheduleOptions.showEmployeeOccupancy\n if (!localScheduleOptions.numberOfSimIterations || localScheduleOptions.numberOfSimIterations == 0) {\n scheduleOptions.numberOfSimIterations = 1\n } else { scheduleOptions.numberOfSimIterations = localScheduleOptions.numberOfSimIterations }\n scheduleOptions.autoSimulate = localScheduleOptions.autoSimulate\n scheduleOptions.autoKeyFigures = localScheduleOptions.autoKeyFigures\n scheduleOptions.numberOfDaysInSchedule = localScheduleOptions.numberOfDaysInSchedule\n if (scheduleOptions.numberOfDaysInSchedule > 7) { scheduleOptions.numberOfDaysInSchedule = 7 }\n scheduleOptions.chartDisplay.erlangC = localScheduleOptions.chartDisplayErlangC\n scheduleOptions.chartDisplay.smooth = localScheduleOptions.chartDisplaySmooth\n scheduleOptions.chartDisplay.target = localScheduleOptions.chartDisplayTarget\n scheduleOptions.chartDisplay.chartInspector = localScheduleOptions.chartDisplaychartInspector\n scheduleOptions.chartDisplay.fixedY = localScheduleOptions.chartDisplayFixedY\n if (localScheduleOptions.chartDisplayFixedYvalue && localScheduleOptions.chartDisplayFixedYvalue > 0) scheduleOptions.chartDisplay.fixedYvalue = localScheduleOptions.chartDisplayFixedYvalue\n if (localScheduleOptions.chartDisplayServicelevelPercentForWarning && localScheduleOptions.chartDisplayServicelevelPercentForWarning > 0) scheduleOptions.chartDisplay.servicelevelPercentForWarning = localScheduleOptions.chartDisplayServicelevelPercentForWarning\n\n if(localScheduleOptions.chartDisplayBreaks!==null){scheduleOptions.chartDisplay.breaks=localScheduleOptions.chartDisplayBreaks}\n if(localScheduleOptions.chartDisplayDeviationTooFewBars!==null){ scheduleOptions.chartDisplay.deviationTooFewBars=localScheduleOptions.chartDisplayDeviationTooFewBars}\n if(localScheduleOptions.chartDisplayDeviationTooManyBars!==null){ scheduleOptions.chartDisplay.deviationTooManyBars=localScheduleOptions.chartDisplayDeviationTooManyBars}\n\n \n \n scheduleOptions.adherence.showLog = localScheduleOptions.showLog\n scheduleOptions.adherence.showWorkWarnings = localScheduleOptions.showWorkWarnings\n scheduleOptions.adherence.showBreakWarnings = localScheduleOptions.showBreakWarnings\n scheduleOptions.adherence.showAdherenceWarnings = localScheduleOptions.showAdherenceWarnings\n scheduleOptions.adherence.showInRotation = localScheduleOptions.showInRotation\n\n scheduleOptions.meetingSettings.meetingLastTasktypeId = localScheduleOptions.meetingLastTasktypeId \n if(localScheduleOptions.meetingLastStartMinute){ scheduleOptions.meetingSettings.lastStartMinute = localScheduleOptions.meetingLastStartMinute}\n if(localScheduleOptions.meetingLastStartMinuteMax) {scheduleOptions.meetingSettings.lastStartMinuteMax = localScheduleOptions.meetingLastStartMinuteMax}\n if(localScheduleOptions.meetingLastOnlyOnShift){scheduleOptions.meetingSettings.onlyOnShift = localScheduleOptions.meetingLastOnlyOnShift}\n if(localScheduleOptions.meetingLastFlexStart){scheduleOptions.meetingSettings.flexStart = localScheduleOptions.meetingLastFlexStart}\n if(localScheduleOptions.meetingLastDurationMinute){scheduleOptions.meetingSettings.lastDurationMinute = localScheduleOptions.meetingLastDurationMinute}\n\n if(localScheduleOptions.notifyOnScheduleChange){ scheduleOptions.notifications.onScheduleChange = localScheduleOptions.notifyOnScheduleChange}\n\n if(localScheduleOptions.indicatorsHighlightBeforeSave){ scheduleOptions.scheduleIndicators.highlightBeforeSave = localScheduleOptions.indicatorsHighlightBeforeSave}\n if(localScheduleOptions.indicatorsUnsavedIndicators){ scheduleOptions.scheduleIndicators.unsavedIndicators = localScheduleOptions.indicatorsUnsavedIndicators}\n \n\n if (localScheduleOptions.inspectorPanelTimespan > 0) {\n inspector.timespan = localScheduleOptions.inspectorPanelTimespan\n inspector.hideTimeSpan = localScheduleOptions.inspectorHideTimeSpan\n \n inspector.serviceLevel = localScheduleOptions.inspectorServiceLevel\n }\n }\n this.loadLocalRequestOptions();\n this.loadScheduleColumnIds();\n this.loadEmployeeDisplaySettings();\n },\n loadLocalRequestOptions() {\n let scheduleRequestSettings = this.scheduleRequestSettings;\n let localRequestOptions = getRequestFilterOptions();\n if (localRequestOptions) {\n scheduleRequestSettings.showSick = localRequestOptions.showSick\n scheduleRequestSettings.showVacation = localRequestOptions.showVacation\n scheduleRequestSettings.showFree = localRequestOptions.showFree\n scheduleRequestSettings.showWork = localRequestOptions.showWork\n scheduleRequestSettings.showPending = localRequestOptions.showPending\n scheduleRequestSettings.showHistoric = localRequestOptions.showHistoric\n scheduleRequestSettings.showBasedOnSelection = localRequestOptions.showBasedOnSelection\n scheduleRequestSettings.showFuture = localRequestOptions.showFuture\n scheduleRequestSettings.showApproved = localRequestOptions.showApproved\n scheduleRequestSettings.showRejected = localRequestOptions.showRejected\n scheduleRequestSettings.tagId = localRequestOptions.tagId\n\n }\n },\n loadScheduleColumnIds() {\n const scheduleColumnIds = getScheduleColumnIds();\n if (scheduleColumnIds) {\n this.selectedScheduleColumnIds = scheduleColumnIds;\n }\n },\n loadEmployeeDisplaySettings() {\n const employeeDisplaySettings = getEmployeeDisplaySettings();\n if (employeeDisplaySettings) {\n this.employeeDisplaySettings = employeeDisplaySettings;\n }\n },\n async loadScheduleRequests(merge = false) {\n const currentUser = useDataStore().currentUser;\n if (currentUser === null) { return; }\n const currentData = this.scheduleRequestData;\n const scheduleRequestData = {\n byId: new Map(),\n bySelectionKey: new Map(),\n items: [],\n loaded: new Date(0),\n employeeId: null,\n ccId: null,\n };\n\n if (currentUser.isAgent) {\n if (!this.loadCCData)\n scheduleRequestData.employeeId = currentUser.employee.id;\n scheduleRequestData.ccId = currentUser.employee.ccid;\n } else {\n scheduleRequestData.ccId = getCurrentCCId();\n }\n\n if (scheduleRequestData.ccId) {\n const affectedDates = new Set();\n let items = await getScheduleRequest(scheduleRequestData.ccId, scheduleRequestData.employeeId);\n if (merge) {\n const toStore = [];\n for (const r of items) {\n const local = currentData.byId.get(r.id);\n if (local !== undefined) {\n if (local.needToBeRevertedBeforeUpdate(r)) {\n local.approveToggle(this.scheduleTasks.list, affectedDates);\n }\n local.update(r);\n toStore.push(local);\n } else {\n toStore.push(r);\n }\n }\n\n items = toStore;\n }\n\n scheduleRequestData.items = items;\n scheduleRequestData.byId = new Map(items.map(x => [x.id, x]));\n if (merge) {\n for (const r of currentData.byId.values()) {\n if (scheduleRequestData.byId.get(r.id) === undefined) {\n if (r.isPending && r.isApproved) {\n r.approveToggle(this.scheduleTasks.list, affectedDates);\n }\n }\n }\n }\n\n scheduleRequestData.bySelectionKey = calculateBySelectionKeyMap(scheduleRequestData.items, currentUser.timezoneUI);\n this.loadScheduleAfterScheduleRequest(affectedDates);\n }\n\n this.scheduleRequestData = scheduleRequestData;\n EventBus.emit(\"scheduleChange\");\n },\n loadSchedule() {\n const dataStore = useDataStore();\n /** @type {Date[]} */\n const dateInterval = this.scheduleOptions.dateInterval;\n if (dateInterval.length === 0)\n return;\n\n const numberOfDays = getNumberOfDaysFromIntervalMinusOne(dateInterval)\n const stDate = this.scheduleOptions.dateInterval[0];\n const scheduleTasks = this.scheduleTasks.list;\n const employees = this.employees.list;\n const taskTypes = dataStore.taskTypes;\n this.schedule.load(numberOfDays, stDate, scheduleTasks, taskTypes, employees, this.scheduleOptions.showInactive);\n for (const employeeSchedule of this.schedule.list) {\n employeeSchedule.calculatePaidWork({numberOfDays, st:stDate});\n }\n EventBus.emit('fetchScheduleCompleted');\n EventBus.emit(\"scheduleChange\");\n },\n /**\n * @param {Set} affectedDates\n */\n loadScheduleAfterScheduleRequest(affectedDates) {\n if (affectedDates.size === 0) { return; }\n this.loadSchedule();\n EventBus.emit(\"schedulePerDtChange\", Array.from(affectedDates));\n EventBus.emit(\"scheduleChangeUpdateTaskBars\");\n },\n /**\n * @param {Date[]} timeInterval\n */\n async loadScheduleTasks(timeInterval) {\n const dataStore = useDataStore();\n const numberOfDays = 2 + getNumberOfDaysFromIntervalMinusOne(timeInterval);\n const scheduleTasksToCommit = this.scheduleTasks.list;\n const st = addDays(timeInterval[0], -1);\n const dateIntervals = getTaskDateIntervalsNotYetRetrieved(st, numberOfDays);\n if (dateIntervals.length > 0) {\n const idIsEmp = !this.loadCCData;\n const id = idIsEmp ? dataStore.currentUser.employee.id : dataStore.currentCC.id;\n /** @type {import(\"@/shared/dn-task.js\").TaskDto[]} */\n let scheduleTasks;\n if (_scheduleTaskInfo.last) {\n scheduleTasks = await getTasks(dateIntervals, id, idIsEmp);\n } else {\n const last = { id: 0, histId: 0 };\n const tasksWithLast = await getScheduleTasksSync(dateIntervals, id, idIsEmp, last);\n scheduleTasks = tasksWithLast.tasks;\n _scheduleTaskInfo.last = tasksWithLast.last;\n }\n\n for (let i = 0; i < scheduleTasks.length; i++) {\n scheduleTasksToCommit.push(new ScheduleTask(scheduleTasks[i]))\n }\n\n this.scheduleTasks.load(scheduleTasksToCommit);\n }\n\n await this.availabilityRequests.load(timeInterval[0]);\n\n /**\n * @param {Date} st\n * @param {number} numberOfDays\n */\n function getTaskDateIntervalsNotYetRetrieved(st, numberOfDays) {\n const returnArray = []\n for (let d = 0; d < numberOfDays; d++) {\n const xSt = addDays(st, d); //eg:Wed Apr 01 2020 00:00:00 GMT+0200 (centraleuropeisk sommartid)\n let xNumberOfDays = 0\n let dtKey = xSt.getTime();\n if (!_scheduleTaskInfo.loaded.includes(dtKey)) {\n do {\n d++\n dtKey = addDays(st, d).getTime();\n xNumberOfDays++\n } while (!_scheduleTaskInfo.loaded.includes(dtKey) && d < numberOfDays)\n returnArray.push({ numberOfDays: xNumberOfDays, st: xSt })\n }\n }\n\n //update cach info\n for (let i = 0; i < returnArray.length; i++) {\n for (let d = 0; d < returnArray[i].numberOfDays; d++) {\n _scheduleTaskInfo.loaded.push(addDays(returnArray[i].st, d).getTime())\n }\n }\n\n return returnArray\n }\n },\n async refreshScheduleTasks() {\n const dataStore = useDataStore();\n\n _scheduleTaskInfo.loaded.sort();\n const dateIntervals = getLoadedDateIntervals();\n\n if (dateIntervals.length === 0) { return false; }\n const idIsEmp = !this.loadCCData;\n const id = idIsEmp ? dataStore.currentUser.employee.id : dataStore.currentCC.id;\n await this.availabilityRequests.refresh();\n const wasChanged = await updateScheduleTasks(dateIntervals, id, idIsEmp, _scheduleTaskInfo.last, this.scheduleTasks);\n this.scheduleTasks.setItemHasChanges();\n if (wasChanged) {\n this.loadSchedule();\n }\n },\n loadSimulationSettings() {\n const simulationSettings = getSimulationSettings();\n if (simulationSettings) {\n this.simulationSettings = simulationSettings;\n }\n },\n resetSimulationsStatus() {\n this.simulationStatus = 0;\n },\n saveScheduleColumnIds() {\n setScheduleColumnIds(this.selectedScheduleColumnIds);\n },\n \n\n async saveScheduleTasks() {\n await this.loadScheduleRequests(true);\n const scheduleTasksInStore = this.scheduleTasks.list;\n\n const scheduleRequests = this.scheduleRequestData.items;\n const changedRequests = scheduleRequests.filter(x => x.isPending);\n const hasChangedRequests = changedRequests.length > 0;\n console.log('saving scheduled tasks');\n\n /** @type {import(\"@/shared/dn-task.js\").Task[]} */\n const taskToCreate = [];\n /** @type {import(\"@/shared/dn-task.js\").Task[]} */\n const taskToUpdate = [];\n /** @type {import(\"@/shared/dn-task.js\").Task[]} */\n const taskToDelete = [];\n for (let i = 0; i < scheduleTasksInStore.length; i++) {\n if (isAllowedToSave(scheduleTasksInStore[i])) {\n if (!scheduleTasksInStore[i].isToDelete) {\n if (scheduleTasksInStore[i].hasChanges) {\n if (scheduleTasksInStore[i].id <0) {\n taskToCreate.push(scheduleTasksInStore[i])\n }\n else {\n taskToUpdate.push(scheduleTasksInStore[i])\n }\n }\n } else {\n taskToDelete.push(scheduleTasksInStore[i])\n }\n }\n }\n if (taskToCreate.length > 0 || taskToDelete.length > 0 || taskToUpdate.length > 0 || changedRequests.length > 0) {\n try {\n do {\n const createWeight = 6;\n const updateWeight = 7;\n const requestWeight = 50;\n let left = 50000;\n\n const deleteItems = taskToDelete.splice(0, Math.min(taskToDelete.length, left));\n const deleteBatch = deleteItems.map(x => x.id);\n left -= deleteBatch.length;\n\n const updateItems = taskToUpdate.splice(0, Math.min(taskToUpdate.length, Math.floor(left / updateWeight)));\n const updateBatch = updateItems.map(t => t.toDto());\n left -= updateBatch.length * updateWeight;\n\n const createItems = taskToCreate.splice(0, Math.min(taskToCreate.length, Math.floor(left / createWeight)));\n const createBatch = createItems.map(t => t.toDto());\n left -= createBatch.length * createWeight;\n\n const requestItems = changedRequests.splice(0, Math.min(changedRequests.length, Math.floor(left / requestWeight)));\n const requestBatch = requestItems.map(x => x.getApiReply());\n left -= requestBatch.length * requestWeight;\n\n const values = await fetchAndCheckJson(`scheduletasks`, 'POST',\n { create: createBatch, delete: deleteBatch, update: updateBatch, requestReplies: requestBatch });\n\n for (let i = 0; i < deleteItems.length; i++) {\n var index = scheduleTasksInStore.indexOf(deleteItems[i]);\n scheduleTasksInStore.splice(index, 1);\n }\n\n for (let i = 0; i < createItems.length; i++) {\n if (values[i].id === null) {\n createItems[i].toDelete();\n } else {\n createItems[i].id = values[i].id;\n createItems[i].confirmChanges();\n }\n }\n\n for (const t of updateItems) {\n t.confirmChanges();\n }\n\n for (const sr of requestItems) {\n sr.setAsNonPending();\n }\n\n } while (taskToCreate.length > 0 || taskToDelete.length > 0 || taskToUpdate.length > 0 || changedRequests.length > 0);\n\n if (hasChangedRequests) {\n await this.loadScheduleRequests(true);\n }\n await this.refreshScheduleTasks();\n } catch (error) {\n console.error(error.message)\n }\n }\n },\n setLoadCCData() {\n if (!this.loadCCData) {\n this.loadCCData = true;\n this.clearScheduleTasks();\n const cc = useDataStore().currentCC;\n if (cc) {\n this.availabilityRequests.init(cc.id, false);\n }\n }\n },\n /**\n * @param {number} id\n */\n toggleScheduleColumn(id) {\n const tmp = this.selectedScheduleColumnIds;\n const selectedColumns = [];\n let found = false;\n tmp.forEach(item => {\n if (item === id) {\n found = true;\n } else {\n selectedColumns.push(item);\n }\n });\n if (!found) {\n const column = this.scheduleColumnDefinitions.find((item) => item.id === id);\n selectedColumns.push(column.id);\n }\n selectedColumns.sort((a, b) => a - b);\n this.selectedScheduleColumnIds = selectedColumns;\n },\n zeroSchedule() {\n this.schedule.clear(); //force tableSchedule to reloag when filtering, needed for scheduleOptions.currentSortMap\n }\n }\n});\n\n/** @returns {{st:Date; numberOfDays:number}[]} */\nfunction getLoadedDateIntervals() {\n const dateIntervals = [];\n\n const msPerDay = 1000 * 60 * 60 * 24;\n /** @type {Date|null} */\n let st = null;\n let numberOfDays = 0;\n let last = 0;\n for (const msSinceEpoch of _scheduleTaskInfo.loaded) {\n if (st === null) {\n st = new Date(msSinceEpoch);\n numberOfDays = 1;\n } else if (Math.round((msSinceEpoch - last) / msPerDay) > 1) {\n dateIntervals.push({ st, numberOfDays });\n st = new Date(msSinceEpoch);\n numberOfDays = 1;\n } else {\n numberOfDays += 1;\n }\n last = msSinceEpoch;\n }\n if (st !== null) {\n dateIntervals.push({ st, numberOfDays });\n }\n return dateIntervals;\n}\n\nfunction getScheduleColumnDefinitions() {\n return columnDefinitions;\n}\n\nfunction getScheduleColumnDefinitionsDetailed() {\n return columnDefinitionsDetailed;\n}\n\nfunction getServiceLevelColumnDefinitions() {\n return columnDefinitionsServiceLevel;\n}\n\n/**\n * @param {import(\"@/model/dn-schedule-request.js\").ScheduleRequest[]} requests\n * @param {string} timezone\n */\nfunction calculateBySelectionKeyMap(requests, timezone) {\n //set a request map for easy access during schedule rendering\n\n /** @type {Map} */\n let requestMap = new Map()\n for (let i = 0; i < requests.length; i++) {\n let keys = requests[i].getSelectionKeys(timezone);\n\n for (let k = 0; k < keys.length; k++) {\n if (!requestMap.has(keys[k])) { requestMap.set(keys[k], requests[i]) }\n //one day may include several requests but the map only includes one item per key.\n //therefor the Map is giving prio to not handled requests\n else if (!requests[i].isApproved || !requests[i].isRejected) {\n requestMap.delete(keys[k])\n requestMap.set(keys[k], requests[i])\n }\n }\n }\n return requestMap;\n}\n\n/**\n * @param {{st:Date}} t\n */\nfunction isAllowedToSave(t) {\n const currentUser = useDataStore().currentUser;\n return !currentUser.isSupervisor || (currentUser.isSupervisor) && t.st <= addDays(getLatestPublishedDate(), 1)\n}","\r\n\r\n\r\n","import { render } from \"./UserAuthConfig.vue?vue&type=template&id=9b005832&scoped=true\"\nimport script from \"./UserAuthConfig.vue?vue&type=script&lang=js\"\nexport * from \"./UserAuthConfig.vue?vue&type=script&lang=js\"\n\nimport \"./UserAuthConfig.vue?vue&type=style&index=0&id=9b005832&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-9b005832\"]])\n\nexport default __exports__","\n\n \n \n \n ","import { render } from \"./Avatar.vue?vue&type=template&id=8fe8d498&scoped=true\"\nimport script from \"./Avatar.vue?vue&type=script&lang=js\"\nexport * from \"./Avatar.vue?vue&type=script&lang=js\"\n\nimport \"./Avatar.vue?vue&type=style&index=0&id=8fe8d498&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-8fe8d498\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./Button.vue?vue&type=template&id=5c5efb27&scoped=true\"\nimport script from \"./Button.vue?vue&type=script&lang=js\"\nexport * from \"./Button.vue?vue&type=script&lang=js\"\n\nimport \"./Button.vue?vue&type=style&index=0&id=5c5efb27&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-5c5efb27\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./Icon.vue?vue&type=template&id=ad2637cc&scoped=true\"\nimport script from \"./Icon.vue?vue&type=script&lang=js\"\nexport * from \"./Icon.vue?vue&type=script&lang=js\"\n\nimport \"./Icon.vue?vue&type=style&index=0&id=ad2637cc&scoped=true&lang=scss\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-ad2637cc\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./Modal.vue?vue&type=template&id=302dd778&scoped=true\"\nimport script from \"./Modal.vue?vue&type=script&lang=js\"\nexport * from \"./Modal.vue?vue&type=script&lang=js\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=302dd778&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-302dd778\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./RawData.vue?vue&type=template&id=ac3a0708&scoped=true\"\nimport script from \"./RawData.vue?vue&type=script&lang=js\"\nexport * from \"./RawData.vue?vue&type=script&lang=js\"\n\nimport \"./RawData.vue?vue&type=style&index=0&id=ac3a0708&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-ac3a0708\"]])\n\nexport default __exports__","\n\n\n\n","import { render } from \"./ColorIndicator.vue?vue&type=template&id=0fed999d&scoped=true\"\nimport script from \"./ColorIndicator.vue?vue&type=script&lang=js\"\nexport * from \"./ColorIndicator.vue?vue&type=script&lang=js\"\n\nimport \"./ColorIndicator.vue?vue&type=style&index=0&id=0fed999d&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\DeepNumbers\\\\GitLab\\\\answerccs\\\\node_modules\\\\vue-loader\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0fed999d\"]])\n\nexport default __exports__","var map = {\n\t\"./de.json\": [\n\t\t95894,\n\t\t894\n\t],\n\t\"./en.json\": [\n\t\t44174\n\t],\n\t\"./sv.json\": [\n\t\t28252,\n\t\t252\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__.t(id, 3 | 16);\n\t});\n}\nwebpackAsyncContext.keys = function() { return Object.keys(map); };\nwebpackAsyncContext.id = 72096;\nmodule.exports = webpackAsyncContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"js/\" + chunkId + \"-legacy.\" + {\"42\":\"2c5c9e98\",\"132\":\"6fdebf5d\",\"137\":\"9fbf47b3\",\"246\":\"05f58d75\",\"250\":\"0f0b0294\",\"252\":\"488d0469\",\"283\":\"38b6b41e\",\"310\":\"4cfcf8c7\",\"320\":\"28128b80\",\"323\":\"adfd4162\",\"332\":\"dc0fbe8b\",\"354\":\"cad2d09f\",\"392\":\"fcd2608d\",\"406\":\"34d7d353\",\"427\":\"62daf190\",\"436\":\"2d3a622c\",\"461\":\"4a5fc3db\",\"481\":\"f39aa38e\",\"516\":\"6c3868a8\",\"526\":\"3031e846\",\"544\":\"facab3dc\",\"550\":\"e5986448\",\"600\":\"7443f920\",\"696\":\"90fe550c\",\"768\":\"d47418a6\",\"772\":\"79e83736\",\"838\":\"453c6b9b\",\"864\":\"3510181e\",\"884\":\"0386178e\",\"894\":\"5d94a980\",\"917\":\"af982b01\",\"939\":\"d6b2625e\",\"961\":\"db34b233\",\"983\":\"e007424c\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"css/\" + chunkId + \".\" + {\"42\":\"ef8a4d21\",\"137\":\"64fcf30f\",\"283\":\"ee5cb5d3\",\"320\":\"13c62312\",\"332\":\"7222771b\",\"406\":\"199801c6\",\"427\":\"3f638877\",\"436\":\"f8b39790\",\"516\":\"1c0e066e\",\"600\":\"71787203\",\"768\":\"fb102d37\",\"864\":\"0c5599a3\",\"884\":\"2740c82f\",\"917\":\"ff646181\",\"939\":\"6be03fd7\",\"961\":\"a2743db4\"}[chunkId] + \".css\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var inProgress = {};\nvar dataWebpackPrefix = \"anser:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"\";","if (typeof document === \"undefined\") return;\nvar createStylesheet = function(chunkId, fullhref, oldTag, resolve, reject) {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tvar onLinkComplete = function(event) {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + realHref + \")\");\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tlinkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\tif (oldTag) {\n\t\toldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling);\n\t} else {\n\t\tdocument.head.appendChild(linkTag);\n\t}\n\treturn linkTag;\n};\nvar findStylesheet = function(href, fullhref) {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = function(chunkId) {\n\treturn new Promise(function(resolve, reject) {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, null, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t524: 0\n};\n\n__webpack_require__.f.miniCss = function(chunkId, promises) {\n\tvar cssChunks = {\"42\":1,\"137\":1,\"283\":1,\"320\":1,\"332\":1,\"406\":1,\"427\":1,\"436\":1,\"516\":1,\"600\":1,\"768\":1,\"864\":1,\"884\":1,\"917\":1,\"939\":1,\"961\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(function() {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, function(e) {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t524: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkanser\"] = self[\"webpackChunkanser\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [504], function() { return __webpack_require__(68966); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","SUPORTED_LANGUAGES","freeze","loadedLanguages","i18n","createI18n","locale","fallbackLocale","messages","getBrowserDefaultLanguage","languages","navigator","_step","_iterator","_createForOfIteratorHelper","s","n","done","lang","value","shortCode","getISO639Code","includes","err","f","splitted","split","getLanguageCode","getLanguage","browserLang","getSupportedCultures","loadSelectedLang","languageCode","loadLanguageAsync","_x","_loadLanguageAsync","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee","languague","wrap","_context","prev","next","global","abrupt","Promise","setI18nLanguage","concat","then","setLocaleMessage","default","push","stop","deleteAgentEvents","_x2","_x3","_deleteAgentEvents","st","fi","switchId","agentEvents","fetchAndCheckJson","toISOString","sent","getAgentEvents","_x4","_x5","_getAgentEvents","_callee2","limit","_context2","postAgentEvents","_x6","_x7","_postAgentEvents","_callee3","data","_context3","importAgentEventsCsv","_x8","_x9","_x10","_importAgentEventsCsv","_callee4","lines","updateProgress","startIndex","i","rowData","dto","reasonCode","batchSize","result","total","left","batch","_context4","toLowerCase","startsWith","length","timestamp","trim","kind","parseInt","employeeSwitchId","isNaN","Date","parse","splice","getCallStatistics","_getCallStatistics","recalculateCallGroups","_recalculateCallGroups","COLORS","createColorEnum","colorArray","colors","stroke1","stroke2","stroke3","stroke4","stroke5","stroke6","stroke7","stroke8","stroke9","primary","lightdanger","lightinfo","dark","byId","idBySchemecolor","name","findIndex","x","getSelectableColors","EMAIL_KIND","createEmailKind","NOTIFY_KIND","createNotifyKind","enumObject","message","invoiceReminder","customerInfo","resetPassword","invoiceReport","emailVerification","scheduleNotification","invoicePDF","email","sms","sendEmail","_sendEmail","eMailObject","sendSMS","_sendSMS","smsObject","correctedPhone","c","to","charCodeAt","sendEmailVerification","_sendEmailVerification","getSortedSkills","dataStore","useDataStore","skillsCurrentCC","sort","a","b","numericSort","getSkillsMatrix","scheduleStore","useScheduleStore","employees","list","skills","skillsMatrix","empid","ghost","Array","fill","emp","getSkillsMatrixColumns","sMinMax","setting","scheduleOptions","scheduleFilter","aId","affinity","paginatedSkillIds","filteredskills","filter","columnDefs","slice","description","numberOfSkillsColumns","saveSkillsMatrix","_saveSkillsMatrix","postEmployeeSkillDto","changedEmps","skillList","hasChanges","skillListOrg","_s5","_iterator5","_step5","toEmployeeSkillDto","postEmployeeSkill","confirmChanges","simulationData","reset","getEmpIdsSameTags","empids","arraysAreEqual","tagIds","a1","a2","isEqual","getAffinityInfoMap","affinities","hasAffinities","affinityInfoMap","Map","taskTypes","set","color","getColor","getColorFromName","getAffintyIndicators","emps","svgWidth","svgns","returnMap","callGroups","skillsInfoMap","get","empAffinitiyInfos","Set","add","size","indicators","counter","aInfo","ellipse","document","createElementNS","tagObject","type","INFOTYPE","skillsInfo","tag","setAttributeNS","variables","grey","getSkillsText","affintyInfo","callGroupsCurrentCC","skillInfoText","_step2","_iterator2","skill","t","_step3","_iterator3","getEmployeeWarning","fromOptDialog","undefined","warnings","currentUser","rotations","shiftBags","availabilities","employeeDisplaySettings","taskTypeMap","skillsWarning","byEmp","has","shiftWarning","hasAdherence","switchIdWarning","switchid","workTimeWarning","workTimeOk","breakSettingsIsLoaded","breakSettings","getBreakSettingsByTag","currentCC","_step4","_iterator4","bs","calculateUnpaidDuration","wwt","rotation","getWeeklyWorkTime","empMinMax","getMinMaxWeeklyWork","remainingWorkTime","minWork","min","maxWork","max","remainingWorkTimeAfterCyclicExist","sBag","weeks","shiftCombosOK","w","possibleShifts","d","shifts","sh","dayIsIncludedInShiftDaylist","dayList","getShiftWorkTime","empvaluatePossibleShiftCombosToMeetWorkTime","warningCountArray","shiftCount","errorShifts","avail","stOK","fiOK","durOK","shiftOKweek","ava","getDayAvailability","isFix","fixShift","getFixShift","tasks","doFit","shPart","aSpan","stMax","fiMin","durMin","weekDayFormat","Intl","DateTimeFormat","language","weekday","tempWarnings","dt","addDays","format","shiftFits","dayHasRotationShift","day","stFi","retuenValue","agreedWorkWeek","minWorkWeek","maxWorkWeek","shiftCombos","combine","intersect","res","_loop","duplicat","some","empSkillsRowIsIncluded","r","empRowIsIncluded","getById","isIncludedByName","isIncludedBySkill","isIncludedByTag","includeByTermination","searchText","includeTerminated","terminationDate","active","EventBus","mitt","deleteEmployee","_deleteEmployee","employeeId","getEmployeeCount","_getEmployeeCount","ccId","getEmployees","_getEmployees","contactCenterId","rows","employeeFromDto","patchEmployee","_patchEmployee","employee","toDto","emailAlreadyInUse","removeDuplicatedSwitchid","employeeSwitchConflicts","password","userId","postEmployee","_postEmployee","_callee5","extra","_args5","_context5","availabilityId","shiftBagId","rotationId","_postEmployeeSkill","_callee6","_context6","switchIdList","switchIdConflict","saveEmployees","_saveEmployees","_callee7","_context7","promises","all","catch","error","console","getScheduleTasks","_getScheduleTasks","dateIntervals","idIsEmp","_args","getTasks","Task","_getTasks","idParam","_args2","join","numberOfDays","getScheduleTasksSync","_getScheduleTasksSync","last","_args3","histId","getUniqueTaskDtoKey","tasktypeId","getTime","getUniqueTaskKey","updateScheduleTasks","_x11","_updateScheduleTasks","scheduleTasks","wasChanged","toDelete","currentById","unsavedByUniqueKey","_dto","updateOrInsert","update","key","removeUnsavedDeletedTasks","deleted","updated","apiPath","getApiPath","login","_login","userCredentials","credentials2","url","body","options","response","json","cause","msg","strategy","loginId","password2","method","headers","JSON","stringify","fetch","ok","status","log","statusText","t0","_lastUpdateAccessToken","updateAccessToken","_updateAccessToken","loginInfo","now","setTimeout","needRefresh","refreshToken","returnJson","setAuthRefreshResult","setLoginInfo","passwordReset","_passwordReset","accCredentials","username","newPassword","success","externalLogin","_externalLogin","afterExternalLogin","checkIfOk","LoginInfo","accessToken","customerSchema","user","schema","isAgent","getSchemas","getCustomerData","_getCustomerData","path","saveForecastAdjustment","_saveForecastAdjustment","adjustmentsToSave","importEmployeeData","_importEmployeeData","formData","getLoginInfo","Authorization","text","fetchAndCheck","_x12","_fetchAndCheck","_callee8","resource","_context8","emit","reject","getOptions","_x13","_x14","_fetchAndCheckJson","_callee9","_args9","_context9","getAllWeekData","nowDt","forecastOptions","specialDays","historicDataMap","dayTypes","returnData","startDate","historicFocusDate","getStartOfWeek","forecastWeeks","weekMap","historicWeeks","dtweekStart","wArray","dtx","getDayData","occupacyFte","getShortDate","dx","itr","histData","acgr","dtkey","weekdayindex","fte","ffte","noc","fnoc","aht","faht","nocRms","dayType","isChecked","getDay","itr2","weekList","val","weeknumber","getWeekNumber","getFullYear","week","weekdata","updateForecastInAllWeekData","callStatsWeekMap","specialDaysMap","forecastAdjustmentmap","aiForecastMap","latestImportDate","focusDt","dayData","forc","getForcastXX","reduce","ht","getRMS","keyx","yyyymmdd","seriesData","sq","nocData","index","Math","pow","sqRef","refRMS","sqrt","RMS","getChartData","dateNow","selectedCallGroups","dates","selectedDates","params","selectedParameters","returnValue","isForecast","getChartSerie","compareWithForecast","getForcastOnInterval","numberOfWeeks","indexesPerDay","startOfDay","getStartOfDay","msPerIndex","floor","lengthNextDay","lengthStartDay","forecast","nextDay","forecastNextDay","ignoreCopiedData","adjInfo","getAdj","daytype","getDaytype","nocSum","htSum","forecastMethod","ahtData","weekOffset","numberOfDysCounter","wx","daytypex","_loop2","copiedNocAht","nocAdj","adjustSeries","quarterRange","adj","qr","getForecastSetValue","parameter","setValue","minimum","maximum","adjMap","param","shortDate","nocArray","htArray","returnArray","_loop3","htData","diff","q","scaleindex","label","parameterData","scaleIndex","occupancyFte","getCallStatsWeek","numberOfRows","isValidWeekRow","j","getEmptyDayData","callStatWeekData","addWeeks","item","focusedDaytyp","system","item1","item2","weekdayInedx","exportToFile","callsData","selectedAdjustmentRow","callsDataToExport","formattedDate","csvContent","filename","_selectedAdjustmentRo","rowId","entry","maxLength","emptyColumns","csvHeader","csvRows","callGroup","warn","blob","Blob","URL","createObjectURL","downloadAnchor","createElement","href","download","appendChild","click","removeChild","revokeObjectURL","importFromCsv","fileInput","accept","style","display","addEventListener","_ref","event","file","fileContent","importedCallsData","cols","callgroup","values","row","target","files","line","Number","baseNoc","sum","remove","condence","array","factor","round","nullCounter","getDisplayResolutionFactor","displayResolutionFactor","getNumberOfDaysFromIntervalMinusOne","intervalMinusOneDay","getDayDiff","getElapsedTimeString","elapsed","unit","getSelectionKey","weekStartDay","getMonth","getDate","dayIndex","setDate","getUniqueNegativeId","idObjList","idObj","isSubset","sortedArray","sortedArray2","shuffleArray","random","temp","timeRangeInformation","dtRange","incrementPerQuarter","hourFormat","hour","minute","hour12","dtFormat","zero","ticksPerInterval","stDate","fiDate","rememberCredentialsKey","credentialsKey","simulationSettingsKey","lastForcastOptionsKey","lastScheduleOptionsKey","lastAgentScheduleOptionsKey","lastSettingsOptionsKey","scheduleColumnIdsKey","languageKey","timeKey","loginInfoKey","currentCCKey","lastSortOptionKey","requestFilterKey","employeeDisplaySettingsKey","virtualScrollerOptions","TABLE_COLUMN_SCHEDULE_KEY","_loginInfo","_rememberCredentials","_currentCCId","clearLocalStorage","localStorage","clear","getCurrentCCId","getItem","setCurrentCCId","getRememberCredentials","setItem","toString","removeCurrentCCId","removeItem","getJSONFromLocalStorage","removeLoginInfo","window","toStore","getSimulationSettings","setSimulationSettings","simulationSettings","removeSimulationSettings","setRememberCredentials","rememberCredentials","getCredentials","removeCredentials","getLastForcastOptions","setLastForcastOptions","lastForcastOptions","getLastScheduleOptions","setLastScheduleOptions","lastScheduleOptions","getLastAgentScheduleOptions","setLastAgentScheduleOptions","lastAgentScheduleOptions","getLastSettingsOptions","setLastSettingsOptions","lastSettingsOptions","getRequestFilterOptions","setRequestFilterOptions","RequestFilterOptions","getEmployeeDisplaySettings","setEmployeeDisplaySettings","getScheduleColumnIds","setScheduleColumnIds","scheduleColumnIds","setLanguage","getTimeDisplaySetting","setTimeDisplaySetting","timeDisplay","getLastSortOption","setLastSortOption","lastSortOption","removeScheduleColumnsWidths","getVirtualScrollSetting","setVirtualScrollSetting","option","removeVirtualScrollSetting","moment","require","getTimeNow","dnLocalStorage","toDate","substring","startOf","getInitialDateInterval","numberOfDaysInSchedule","getSpecialTaskType","subtype","forEach","element","getShift","possibleTasks","schedule","shift","getShiftBounds","getEmpWorkSum","employeeCallcenters","taskTypeIds","empWorkMap","getEmpWorkMap","dtKey","dn_uiHelper","empSumArray","pair","empWork","getEmpBreakSum","empBreakMap","getEmpBreakMap","empSumBreakArray","empBreak","getTask","ttid","get24hourShift","dur","moveEntireShift","workShiftFiltered","change","duration","lastSt","asHours","getTaskList","empTasks","focusedShift","taskList","isInShift","breaks","payments","absences","isToDelete","validateAndCorrectWorkShift","activeTask","tt","lastFi","tti","sti","fii","isSameOrBefore","isSameOrAfter","removeTask","isBefore","isAfter","_id","isSame","stj","fij","getShiftText","refDate","shiftText","timeInterval","abs","cmd","getRequestForSchedule","selectionKey","keyParts","ts","scheduleRequestSettings","future","dateInterval","selectedEmpId","scheduleRequest","scheduleRequestData","bySelectionKey","isPoster","countOrOrder","dnModel","post","approved","isAgentLogin","isFilterOk","availEmpRequests","availabilityRequests","getByEmp","requestItem","requestOnDay","byDate","best","isOpen","created","availability","getSchedule","includeInactive","createSchedule","getScheduleFromStore","empId","schedules","getScheduleRowIndex","currentSortMap","keySortMap","workShiftDetails","timeZone","timezoneUI","di","nextDt","shiftBounds","details","getTaskText","_step6","_iterator6","_step7","_iterator7","_step8","_iterator8","arrangeReportWeekDayStart","date","completeWeek","weekDayNum","steadyCols","weekDaysCols","width","getAgentAppRowHeight","innerHeight","scheduleIsPublished","getLatestPublishedDate","erliestRequestDate","generalEmpAppSettings","requestClosedNumberOfDays","daysToAdd","weekDay","publishingWeekDay","publishingNumberOfDays","latestDate","publishingFixedDate","scheduleisAllowedToOptimize","isSupervisor","scheduleRowIsIncluded","isIncludedByTask","singleSelectionIsVisible","show","filterdSched","filterdSched2","getSelectionKeysVisible","_step9","visibleKeys","_iterator9","selection","v","getCCByDate","selectionIsOk","supervisorCheck","postedShiftCheck","scheduleRequests","_step10","_iterator10","_step11","_iterator11","sr","isPending","getSelection","_step12","filteredSchedule","byEmpId","_iterator12","empSchedule","find","empSelection","_step13","_iterator13","addToChangedDatedInclNext","changedDates","saveLocalScheduleSettings","opt","insp","inspectorPanel","localScheduleOptions","showServiceLevel","showOccupancyChart","showWorkChart","showRequestTile","showEmployeeOccupancy","autoSimulate","autoKeyFigures","numberOfSimIterations","workChartHeight","chartDisplayTarget","chartDisplay","chartDisplayErlangC","erlangC","chartDisplaySmooth","smooth","chartDisplaychartInspector","chartInspector","chartDisplayFixedY","fixedY","chartDisplayFixedYvalue","fixedYvalue","chartDisplayServicelevelPercentForWarning","servicelevelPercentForWarning","chartDisplayBreaks","chartDisplayDeviationTooFewBars","deviationTooFewBars","chartDisplayDeviationTooManyBars","deviationTooManyBars","showLog","adherence","showWorkWarnings","showBreakWarnings","showAdherenceWarnings","meetingLastTasktypeId","meetingSettings","meetingLastStartMinute","lastStartMinute","meetingLastStartMinuteMax","lastStartMinuteMax","meetingLastOnlyOnShift","onlyOnShift","meetingLastFlexStart","flexStart","meetingLastDurationMinute","lastDurationMinute","notifyOnScheduleChange","notifications","onScheduleChange","indicatorsHighlightBeforeSave","scheduleIndicators","highlightBeforeSave","indicatorsUnsavedIndicators","unsavedIndicators","showInRotation","inspectorPanelTimespan","timespan","inspectorHideTimeSpan","hideTimeSpan","inspectorServiceLevel","serviceLevel","saveLocalRequestFilterOptions","saveLocalEmployeeDisplaySettings","localEmployeeDisplaySettings","hasMobileApp","breakWarnings","localRequestFilterOptions","showSick","showVacation","showFree","showWork","showPending","showHistoric","showFuture","showBasedOnSelection","showApproved","showRejected","tagId","createInfoTypeEnum","DRAWKIND","createDrawTaskKindEnum","TEAMSCHEDULEKIND","createTeamScheduleKindEnum","warningFromTaskBar","warningFromRow","publishedDayIndicator","erliestRequestIndicator","shiftFromTaskBar","unAvailabilityOtherCC","chartInfo","unavailable","otherCC","none","barSchedule","textSchedule","taskChangeInfo","userInitials","userName","colorId","timeText","users","getWorkShiftWithDeleted","focusedDate","workShiftWithDeleted","isInShiftWithDeleted","st_day","fi_day","st_shift","fi_shift","changeInfo","changeInfoFromTaskList","maxDt","latestTask","task","getPublishedScheduleTasksWithChanges","scheduleTasksInStore","returnList","ttKind","excludeTask","TASK_KIND","inRotation","selectionHasGhost","_step14","_iterator14","openPostShifts","_step15","items","_iterator15","requests","_step16","postGhostShifts","selectedRequests","selectedEmpDays","saveReqired","selectGostShiftWarning","action","_iterator16","_step17","_iterator17","_step18","_iterator18","starts","_step19","_iterator19","getIndicatorPoints","p","getUnsavedIndicator","indicatorPolyline","warning","selectionHasChanges","_step20","sheduleOptions","selectionList","_iterator20","_step21","_iterator21","shiftHasChanges","shift24","allTasks","shiftRevert","_step22","_iterator22","resurrect","revert","Call","msSinceEpoch","callGroupId","_classCallCheck","this","processed","_createClass","_wait","newValue","adherancePercent","workFactor","wait","str","timeStampEnd","SimData","_callGroups","slMap","_slTotalMap","_waitTotalMap","_waitMap","_waitWithinMap","_queueAvgMap","_occupancyEmpMap","getInitiatedOccupancyMap","initiateValueMap","initateTotalsValueMap","initiateArrayMap","initateTotalsArrayMap","xMap","intervalItems","_maxWaitBeforeAbandonn","_numberOfSecondsPerDay","SimState","affinityTaskTypeById","taskTypeId","work","taskTypeById","SimParameters","simState","simSt","dayForcast","daySchedule","occupiedUntil","scheduleInfoArray","getEmpWorkArray","getSimResult","numberOfIterations","simData","dnSimModel","simStTime","ds","calls","simulate","addSimData","getSimulationResult","getEmptySimDay","getSimulationDataKey","affinityId","getSimData","outputSpec","callbackSiminfo","simulationDataMap","forceUpdate","datesWithChanges","simDay","simParameters","sl","serviceLevelDisplayData","getServicelevelDisplayData","occ","getOccupancyAndWorkChartData","occChartData","occData","workChartData","workData","totWork","totOcc","avgQueue","avgQueueData","getQueueChartData","waitWithin","waitWithinData","getWaitWithinData","employeeOccupancy","employeeOccupancyData","getEmployeeOccupancyData","getDataByAffinity","emplyeesByAffinity","callGroupsByAffinity","cg","cgData","byAffinity","_step4$value","_slicedToArray","cgs","slTarget","getAvgSlSetting","fantomDefaultSkills","filteredEmpsByAffinity","getEmployeesByAffinity","cgMap","hasCallgroupWithNoAffinity","empArray","getTarget","adheranceFactor","targetDataMap","targetSum","targetByAffinity","affinityData","timeRangeInQuarters","getTimeRangeInQuartersForTargetSim","generateQuarterCallsTarget","minTarget","getErlangCTargetWeighted","maxTarget","getErlangCTargetSum","targetRange","ceil","slLow","slHigh","hasCalculated","testNumberOfAgent","getFantom","waitData","getWaitData","slQuarter","getTargetServiceLevel","slPercent","weight","weighted","dayTargetByAffinity","dayTarget","slWithin","daySt","empsBySkillMap","filteredEmps","ex","excludeStartup","empWithLongestWait","getEmpWithLongestWait","call","maxDiff","indexFound","randomEmpId","fantom","handlingTimePercent","handlingTimeVariationPercent","secondsToAdd","df","getErlangCTarget","getErlangCTargetArray","callGroupsToInclude","minArray","maxArray","cgByAffinity","adherenceFactor","totForc","slSetting","forcSum","generateQuarterCalls","callGroupPrioInfoMap","loadCallGroupPrioInfo","maxPrioSecondInQueue","callGroupPrioMax","lastQuarter","daySchedulesQuarterBySkillMap","_loop4","filteredDaySchedules","callX","qx","processCall","skilledAndWorkingDayScheduls","empDayScheduleWithMaxWait","getDayScheduleWithLowestWait","MAX_VALUE","msTot","iCallStart","waitMap","waitTotalMap","ixTalkStart","iTalkStart","xPart","occupancyEmpMap","occupArray","workArray","numberOfDayIntervals","numberOfSecondsPerInterval","callGroupIds","callGroupIdsWith0","_loop5","waitsData","slTotalMap","waitsData2","y","queueAvgMap","waitWithinMap","slArray","_loop6","_i2","occEmpData","stDt","acgrid","slMin","slAvg","slMax","slPeneltyScore","slData","_loop7","_a2","_toConsumableArray","resolution","returnArrayOcc","returnArrayWork","occArray","occWorkArray","totOccWork","empOccArray","returnArrayAvg","queueAvgArray","waitWithinArray","occEmp","obj","sumP","sumS","callsPercent","getErlangB","m","invB","getErlangC","erlB","getServiceLevel","erlC","exp","slLast","prioSecondsInQueue","days","getDurationInMinutes","formatMMDDYYY","getShortDate2","getStartOfWeekUI","getWeekdayNarrow","toLocaleDateString","getWeekdayLong","getWeekDays","getWeekDaysWithInfo","startDay","isWeekend","getShortTime","optionsTime","toLocaleTimeString","ShortTime","getShortTimeMinutes","minutes","getShortTimeQuarterHour","quarter","formatTimeAsDuration","getDateFormat","getMonthLong","month","isMobile","test","userAgent","suggestUserInitials","initials","prototype","mmdd","mm","dd","week1","getWeekYear","UNDO_STATE","createUndoState","revCounter","revisionMap","lastIncrementUndoOrRedo","undo","newSelectionPending","incrementUndoRevision","direct","redo","decrementUndoRevision","resetUndo","addUndoTransaction","isNew","isDeleted","delete","currentMap","addRedoTransaction","getRevisionMap","canUndoRedo","canUndo","canRedo","redoDataExist","undoDataExist","schemecolor","returnColor","light","danger","free","class","_createElementBlock","onKeydown","_cache","_withKeys","_withModifiers","$options","reSimulate","_normalizeClass","currentRoute","isDark","_createBlock","_component_Header","_createElementVNode","_hoisted_1","userGuide","_hoisted_2","_createVNode","_component_router_view","_component_Guide","$data","isLowHeight","_component_Footer","src","_imports_0","alt","ref","disabled","for","onClick","layOutChange","showExpireWarning","_component_PvMessage","severity","icon","expireMessage","refreshedDueToError","_ctx","$t","showSettings","relevantInvoiceStatus","_hoisted_3","_hoisted_4","_hoisted_5","_component_router_link","_hoisted_6","isNormalLogin","isPage","$event","goToView","forecastIsAvailable","_hoisted_7","_toDisplayString","showForecast","showSchedule","showReport","_hoisted_8","toggleMenubar","_normalizeStyle","isShowSidebar","checkInvoiceStatus","_hoisted_9","_hoisted_10","_hoisted_11","supervisorInfo","_hoisted_12","_hoisted_13","showCurrentTimezone","_hoisted_14","_hoisted_15","currentTimezone","showEmpFilter","_hoisted_16","_hoisted_17","_hoisted_18","filterMsg","showReadOnlyInfo","_hoisted_19","_hoisted_20","showAffintyDropDown","_hoisted_21","_component_PvDropdown","affinitySelection","optionValue","optionLabel","onChange","filterChange","pt","_withCtx","slotProps","getAffinityText","isCurrentCCSelected","_hoisted_22","_hoisted_23","_hoisted_24","toggleUserMenubar","_hoisted_25","isSuperAdmin","hasAccessSettings","settingsDialogVisible","logOut","_component_PvDialog","visible","modal","header","_hoisted_26","_Fragment","_renderList","tabMenu","tab","_hoisted_27","activeTab","tabKey","_hoisted_29","_hoisted_30","_component_TabView","activeIndex","navContainer","_component_TabPanel","_hoisted_31","_hoisted_32","_hoisted_33","_component_AvatarSelector","_hoisted_34","_component_InputSwitch","useVirtualScroll","_hoisted_35","_component_UserAuthConfig","section","_hoisted_36","_hoisted_37","_hoisted_38","selectedLanguage","placeholder","_hoisted_39","_hoisted_40","_hoisted_41","hourFormats","_hoisted_42","_component_PvButton","_component_Avatar","colorName","scrollHeight","panelClass","_component_ColorIndicator","_component_InputText","components","RawData","Avatar","ColorIndicator","props","computed","methods","getInitials","getColorId","mounted","watch","init","$emit","__exports__","Icon","Modal","Button","AvatarSelector","UserAuthConfig","activeSelectAvatar","screenWidth","innerWidth","xLargeBreakPoint","userData","useMode","getMode","hasAffinity","resolvedOptions","routeName","$route","employeeContext","useForecastStore","forecastIsLoaded","hasAccessForecasting","hasAccessReports","hasAccessScheduling","canEditScheduling","canEditSettings","canEditForecasting","fileImportInfo","useFileImportStore","scheduleNeedsSave","scheduleNeedsToSave","endTime","checkVirtualScrollSetting","hasChangeUser","saveUserSettings","saveUsers","itemSize","lazy","numToleratedItems","showLoader","loadRelevantInvoiceStatus","sel","usedAffinities","_this","dn_schedulehelper","$confirm","rejectLabel","acceptLabel","$router","page","_this2","hasModifiedData","revertModifiedData","handleClickOutsideMenu","$refs","rightMenu","contains","updateScreenWidth","handler","$toast","detail","fileName","life","nofImported","forecastStore","reloadForecastAndHistoricData","deep","newTab","oldTab","immediate","newUser","setHourFormat","beforeUnmount","removeEventListener","beforeDestroy","_component_MobileNavbarFooter","agentScheduleDarkView","_component_MobileNavbarItem","goto","canSeeTeam","canTrade","canSeeStats","$props","_component_Icon","String","Boolean","MobileNavbarItem","tradeDisabled","hideTeamSchedule","gs","statsAdherence","statsPayrollCodes","statsDetailedAdherence","MobileNavbarFooter","xmlns","height","viewBox","_component_IconField","iconPosition","_component_InputIcon","_component_ScrollPanel","_component_Accordion","expandIcon","collapseIcon","onTabClick","setTab","filteredGuideItems","_component_AccordionTab","parent","hideAccordionTab","_ref2","title","activeSubIndex","subchapters","subitem","subindex","_ref3","_ref4","openDialog","intro","steps","step","refMenu","link","_component_InlineSvg","videoSrc","followLink","_ref5","_ref6","_hoisted_28","dialogVisible","popupData","_hoisted_43","_hoisted_44","_hoisted_45","activePopupTab","currentTab","currentSubTab","InlineSvg","dnUserguides","foundSubchaps","chapter","foundSubChapter","guideFilter","subchap","searchOK","open","setSubTab","state","d_activeIndex","Header","Footer","Guide","admin","isLoggedIn","selectedAptId","sizeChange","setFirstDayOfWeek","$primevue","config","firstDayOfWeek","loadLanguage","loadHourFormat","loadLocalScheduleOptions","render","resetStores","forecastData","specialDayData","forecastAiData","$reset","usePortfolioStore","useReportStore","routes","component","createAppRouter","router","createRouter","history","createWebHashHistory","beforeEach","from","externalPath","initUser","afterEach","hasRefreshed","sessionStorage","hasNotCheckedInvoiceStatus","onError","location","reload","lastRelevantInvoiceStatuscheck","_initUser","loadCurrentUser","_init","loadDateNow","loadLocalAgentScheduleOptions","loadSimulationSettings","loadGeneralSettings","loadAffinities","loadCallCenters","loadCurrentCCData","loadHolidays","loadAgreements","initForecast","loadTagUsage","app","createApp","App","pinia","createPinia","use","PrimeVue","ToastService","Accordion","AccordionTab","AutoComplete","Calendar","Card","Checkbox","Column","ConfirmDialog","ContextMenu","DataTable","FileUpload","IconField","InlineMessage","InputGroup","InputGroupAddon","InputIcon","InputNumber","InputSwitch","InputText","Listbox","MultiSelect","Panel","Password","ProgressBar","Dialog","Dropdown","FloatLabel","Message","SelectButton","RadioButton","ScrollPanel","Slider","SplitButton","Splitter","SplitterPanel","PanelMenu","TabPanel","TabView","Tag","Textarea","Toast","TreeTable","OverlayPanel","Rating","TieredMenu","Menubar","Sidebar","directive","Tooltip","ConfirmationService","mount","deleteAffinity","_deleteAffinity","getAffinities","_getAffinities","Affinity","patchAffinity","_patchAffinity","postAffinity","_postAffinity","saveAffinityChanges","_saveAffinityChanges","finish","_name","_hasChanges","_isToDelete","getAvailabilityRequests","_getAvailabilityRequests","idIsEmployee","_args6","postAvailabilityRequest","_postAvailabilityRequest","patchAvailabilityRequest","_patchAvailabilityRequest","deleteAvailabilityRequest","_deleteAvailabilityRequest","AvailabilityRequest","_RequestItem","_inherits","_super","_createSuper","isApprovedOrAutoApproved","available","replyMsg","timezone","stLocal","getDateOfInstant","_deleteRequest","deleteRequest","AvailabilityRequestReply","srEmp","empList","okByOthers","okByDate","okByTag","showAvailability","showUnavailability","tagList","hasAnyTag","timeOffId","bySystemKind","TASK_SYSTEM_KIND","timeOffTasks","hasOverlappingShift","overlaps","modifed","affectedDates","_toggleApproval","approve","reply","syncWithSchedule","toggleApproval","RequestItem","ar","isEmp","AvailabilityRequests","dtoList","setData","empRequests","dtRequests","l","isApproved","loadedStTime","_load","stTime","getData","load","_refresh","refresh","_getData","updateUpdated","availEmp","_x15","AvailabilityRequestEmployee","unavail","startTime","request2","getQuarterHour2","addToIntervals","availabilityByDay","dayStart","dayEnd","getQuarterHourRelative","dtTime","avails","intervals","inverted","interval","getQuarterHour","ms","Availabilities","_byEmp","employeeIdList","_items","Availability","fromISODate","clearAvailability","startDt","localOffsetQ","getLocalOffset","unavailability","endQ","lastQ","firstQ","dayDiff","_byDayIndex","dayCount","dayFi","deleteAvailability","_deleteAvailability","checkedEmps","saveAvailability","_saveAvailability","toISODate","BackOfficeSkill","_Skill","taskType","minLength","BackOfficeSkillDetail","_assertThisInitialized","_stDate","_fiDate","markAsHasChanges","interactions","daysOfWeek","openHours","_get","_getPrototypeOf","Skill","_aht","_interactions","_daysOfWeek","_openHours","ticksPerQ","BackOfficeSkills","isLoaded","ccList","ccid","byTaskTypeId","skillBO","boSt","boFi","targetByDay","boTargetDay","targetDetail","boTarget","optimizationPriority","createBackOfficeSkill","saveBackOfficeSkills","_saveBackOfficeSkills","changed","secondsPer5Min","deleteBreakSettings","_deleteBreakSettings","getBreakSettings","_getBreakSettings","breakSettingsFromDto","saveBreakSettings","_saveBreakSettings","BreakSettings","minShiftDuration","maxShiftDuration","minWorkDuration","_minShiftDuration","_maxShiftDuration","_minWorkDuration","_tasks","_tagId","_unpaidDurationMinutes","unitToDate","dateToUnit","shiftLength","workIntervalCount","totalBreakDuration","bsTask","unpaidDuration","ttId","paidBreak","isMinMaxDurationOk","BreakSettingsTask","_ttId","_duration","bsTasks","settings","ccTagIdList","filtered","filterByTag","getBreakSettingsMinWork","durMinutes","minShiftDurationMinutes","maxShiftDurationMinutes","workMinutes","unpaidDurationMinutes","getBreakSettingsMaxWork","hours","time","getHours","getMinutes","deleteCallCenter","_deleteCallCenter","getCallCenters","_getCallCenters","CallCenter","saveCallCenter","_saveCallCenter","toApi","saveCallCenterList","_saveCallCenterList","callCenters","_description","_imgUrl","createForecastMethodEnum","average","ai","FORCAST_METHOD_KIND","createCallGroup","defaultSwitchId","CallGroup","slpercent","slseconds","addWrap","conditions","setDefaultSwitchId","mergeCallGroups","_mergeCallGroups","callgroups","itemsToDelete","_i","delegateYield","indexOf","getCallGroups","_getCallGroups","includeConditions","cond","_slPercent","_slWithin","_prioSecondsInQueue","_addWrap","_forecastMethod","CallGroupCondition","_conditions","tag1min","_defaultSwitchId","tag1max","tag2min","tag2max","tag3min","tag3max","newConditionIds","condition","every","isValid","conditionsToDelete","conditionsToInsert","conditionsToUpdate","toSave","_switchId","_tag1min","_tag1max","_tag2min","_tag2max","_tag3min","_tag3max","prop","hasValidValue","getTagMax","getCustomShifts","_getCustomShifts","CustomShift","createNewCustomShift","_createNewCustomShift","newCustomShift","deleteCustomShift2","_deleteCustomShift","customShift","usershift","contactcenterIds","_contactcenterIds","_cmd","addCustomer","_addCustomer","copyCustomer","_copyCustomer","connectUsers","deleteCustomer","_deleteCustomer","getCustomers","_getCustomers","Customer","patchCustomer","_patchCustomer","version","_email","_areaId","areaId","_initialLicenses","initialLicenses","_extraStorage","extraStorage","_paymentMethod","paymentMethod","_vat","vat","_address","address","_person","person","tzOk","_countDays","countDays","_initialOverride","initialOverride","_authExternal","authExternal","_refreshTokenDays","refreshTokenDays","_useMode","_useDepartments","useDepartments","_stripeId","stripeId","_invoiceEmail","invoiceEmail","_note","note","_setUsers","setUsers","features","CUSTOMER_FEATURE_KEYS","CustomerFeature","apiRow","featureId","hasFeat","fee","_save","save","_fee","_st","_fi","_isInDB","CUSTOMER_FEATURE","main","storage","getDayTypes","_getDayTypes","DayType","postDayTypes","_postDayTypes","daytypes","promesis","_schemecolor","_system","MONTH_NAMES","getMonthNames","getInvoicesByYear","_getInvoicesByYear","invoices","byYear","invoice","info","year","getInvoiceStatusInfo","getRelevantWorstInvoiceStatus","_getRelevantWorstInvoiceStatus","relevantInvoiceStatuses","worstStatus","INVOICE_STATUS","paid","removed","getInvoices","_getInvoices","invoiceList","inv","invoiceInfo","getInvoice","_getInvoice","Invoice","getPaymentLink","_getPaymentLink","currency","unit_amount","itemName","memo","updateInvoice","_updateInvoice","paymentLink","scheduled","payDt","paymentLinkId","paymentlink","getTitleDate","getInvoiceStatus","dueDate","paymentTerms","daysDue","due","overdue30","initiated","released","downloaded","invoiceDate","daysInMonth","invoiceNumber","customerNumber","customerId","customer","customerName","customerAdress","_status","licences","_features","dayFactors","feature","licenceFee","storageFee","smsFee","adherenceFee","storageAmount","iban","bic","totalCustomWork","customWork","round2","workHours","workRate","licenseTotal","smsTotal","adherenceTotal","storageTotal","creditCardFee","amount","monthFormat","monthNames","createInvoiceStatus","checkInvoicesStatus","_checkInvoicesStatus","_accessToken","_refreshToken","_loginKind","loginKind","LOGIN_KIND","normal","agent","superAdmin","authResult","createLoginKindEnum","getShiftBags","_getShiftBags","ShiftBags","createShiftBagByEmp","optimizableShiftGroup","OptimizableShiftGroup","OptimizableShift","dayBounds","isAllowed","bounds","stMin","fiMax","setMaxBounds","_Shift","_dayList","isAllowedDate","isDayBoundsOk","Shift","createNewOptimizableShift","fixTasks","flexTasks","stSpan","fiSpan","durSpan","deleteShiftBag","_deleteShiftBag","_pending","isRejected","canReplyWithAnswerEmp","_reopen","reopen","createNewRotation","Rotation","getRotations","_getRotations","Rotations","createRotationByEmp","byShiftId","shiftId","shiftByDay","shiftDtos","found","s2","_s","idList","_s2","isEmpty","includeFlexShift","deleteRotation","_deleteRotation","ScheduleRequest","callCenterId","_days","_evaluate","REQUEST_KIND","scheduleTask","dtFrom","getStartFrom","dtTo","getStartTo","sick","vacation","trade","empIds","srTask","requestTask","possibleWithSchedule","maxCount","count","canReply","okBySelectedEmps","getDateRange","okByApproval","byIndex","dtLocal","start","_step23","returnRange","_iterator23","_step24","_iterator24","dtEnd","replyEmp","numberOfStars","clearPick","performChange","addToAffectedDates","evaluate","setPendingState","isTrade","picked","reopenScheduleRequest","refreshScheduleTasks","loadScheduleRequests","createTask","_step25","_iterator25","revertChange","changedTasks","_step26","_iterator26","newTask","_step27","_iterator27","_step28","_iterator28","_step29","_iterator29","_step30","_iterator30","_step31","_iterator31","_step32","_iterator32","interval1","modified","interval2","_step33","_iterator33","getAffectedDates","_step34","_iterator34","_step35","_iterator35","deleteScheduleRequest","_step36","_iterator36","getEmployee","ScheduleRequestEmployee","taskInfoList","_step37","_iterator37","_step38","srEmp2","_iterator38","getTaskString","_step39","_iterator39","_step40","_iterator40","break","operation","opText","pickEmp","pick","other","_step41","_iterator41","otherSREmp","_ret","_typeof","sendReply","employeeCount","selectPickEmployee","approveToggle","rejectToggle","_sendReply","isPick","toastMsg","stars","updateScheduleRequestEmployee","_step42","_iterator42","_step43","_iterator43","_step44","_iterator44","_ret2","_this3","_step45","_iterator45","ScheduleRequestTask","ScheduleRequestScheduleTask","_deleteScheduleRequest","deleteScheduleRequests","_deleteScheduleRequests","getScheduleRequest","_getScheduleRequest","onlyOpenRequests","employeeQuery","openQuery","stQuery","fiQuery","_args7","convertScheduleRequestFromApi","_updateScheduleRequestEmployee","_reopenScheduleRequest","patchScheduleRequestEdit","_patchScheduleRequestEdit","_callee10","_context10","convertScheduleRequestToApi","postScheduleRequest","_x16","_postScheduleRequest","_callee11","request","_context11","postScheduleRequests","_x17","_postScheduleRequests","_callee12","_context12","_step46","_iterator46","re","_step47","_iterator47","_step48","_iterator48","rt","createRequestKindEnum","isAvailabilityRequest","createPostRequest","requestConfig","original","getScheduleRequestBounds","_step49","tasksToReduce","publishedTasks","_iterator49","isContainedIn","createScheduleRequestTask","usedExistingTask","createRequestCommon","requestKind","employeeSchedule","sortDateIntervals","hasShift","setMinutes","absenceStart","absenceDuration","createSettingsColumnsEnum","number","department","cc","payrollRuleKind","payrollRuleWeekLimit","timeOfDay","checkbox","SETTINGS_COLUMN_KIND","createSettingsDetailEnum","breakSetting","bo","payrollRule","SETTINGS_DETAIL_KIND","getSettings","_getSettings","postSettings","_postSettings","saveReportCalendarDays","_saveReportCalendarDays","GENERAL_SETTINGS","reportCalendarDays","saveReportCsvSemicolon","_saveReportCsvSemicolon","reportCsvSemicolon","savenumHoursWeeklyOvertime","_savenumHoursWeeklyOvertime","numHoursWeeklyOvertime","saveWeekendAsHoliday","_saveWeekendAsHoliday","weekendAsHoliday","createGeneralSettingsEnum","numberOfHistoricSpecialDays","percentOfAbandonsToInclude","adherenceBase","graceMinutes","adherenceLimit","overTargetFactor","closeGaps","noShiftsOutsideTarget","unScheduledBreakMinutes","GENERAL_EMPAPP_SETTINGS","createGeneralEmpSettingsEnum","publishingFixedDateMs","allRequestsDisabled","requestvaccationClosedNumberOfDays","sickRequestDisabled","showOnlyOwnTeam","statsPayrollCodesPublishingNumberOfDays","GeneralOptions","forecastSetting","adherenceSetting","_historicWeeks","_forecastWeeks","_numberOfHistoricSpecialDays","_occupacyFte","_adherancePercent","_percentOfAbandonsToInclude","_adherenceBase","_graceMinutes","_unScheduledBreakMinutes","_closeGaps","_adherenceLimit","_numHoursWeeklyOvertime","_weekendAsHoliday","_hasChangesForecast","_hasChangesAdherence","GeneralEmpAppSettings","_publishingWeekDay","_publishingNumberOfDays","_publishingFixedDate","_usePublishFixedDate","_allRequestsDisabled","_requestClosedNumberOfDays","_requestvaccationClosedNumberOfDays","_sickRequestDisabled","_tradeDisabled","_showOnlyOwnTeam","_weekStartDay","_hideTeamSchedule","_statsPayrollCodes","_statsAdherence","_statsDetailedAdherence","_statsPayrollCodesPublishingNumberOfDays","HolidaySettings","_date","getHolidays","_getHolidays","holidays","saveHolidays","_saveHolidays","holiday","_automaticBreaks","automaticBreaks","_openForBO","openForBO","_fixTasks","_stMin","_stMax","_fiMin","_fiMax","_durMin","_durMax","taskType2Id","dur2Min","dur2Max","flexTask","hasTask2","flexSt","flexFi","flexDur","durMax","hasChanged","t2","_fixShift","paidWorkMinutes","shiftBoundMinutes","stMinute","fiMinute","taskFiMinute","durMinute","tasksWithoutBreaks","nextSt","maxDurQ","maxWorkMinutes","minStMinute","maxFiMinute","unavailabilites","fiQ","stQ","minStQ","maxFiQ","createShift","_optimizationPriority","_contactCenterId","_affinity","IMPORT_CONFIG_KIND","createImportConfigEnum","addNewSwitchConfig","switchConfigs","minId","sc","SwitchConfig","importConfigs","apiCalls","startel","peoplePraise","apiAgentEvents","fileImportCalls","fileImportAgentEvents","getImportConfigKinds","switchKinds","isImportOfCallData","importConfigKind","getSwitches","_getSwitches","switches","postSwitch","_postSwitch","patchSwitch","_patchSwitch","_timezone","_active","_deletedImportConfigKinds","_changedImportConfigs","lastTime","ic","_objectSpread","deletedImportConfigKinds","abbr","_colorId","_abbr","getTags","_getTags","getTagUsage","_getTagUsage","postTags","_postTags","tags","getFilteredTags","tagById","disallowedTagIds","textToSeach","toLocaleLowerCase","convertTagsFromAPI","convertTagFromAPI","TAG_USAGE_DESCRIPTION","createTagUsageDescription","tagUsageDescription","getTagUsageWarnings","tagUsage","used","ids","getTagsUsageTooltip","tagUsageWarnings","ACCESS_RIGHT","createAccessRightEnum","createNewUser","api","User","forecasting","reports","scheduling","getUsers","_getUsers","getCurrentUser","_getCurrentUser","LoggedInUser","patchUser","_patchUser","authMethod","secret","reqNotify","_saveUsers","toCreate","toPatch","u","pwd","contactCenterIds","tagIdList","notify","notifyEmail","createdResult","errors","_forecasting","_scheduling","_reports","_settings","_initials","_tagIdList","_pwd","readonly","write","supervisor","getNumAccessRightScheduling","getStringAccessRightScheduling","getNumAccessRight","getStringAccessRight","_User","_employee","_adherence","isEmail","customerTimezone","tzMode","getSecretFormatting","current","password2WithMask","AGREEMENT_KIND","createAgreementKind","payroll","report","accumulation","PAYROLL_RULE_KIND","createPayrollRuleKind","PAYROLL_RULE_WORK_TYPE","createPayrollRuleWorkType","paidWork","attendance","flex","PAYROLL_RULE_DAY_KIND","createPayrollRuleDayKind","sunday","monday","tuesday","wednesday","thursday","friday","saturday","dayBeforeHoliday","dayAfterHoliday","getWeekLimitAboveOptions","Agreements","_byTagId","loadCounter","byTagId","agreement","payrollRules","defaultAgreement","getByTagId","payrollPeriod","timeRange","reportOptions","agreementToUse","getPayrollReportDataImpl","oneRowReport","adherenceOptions","weeklyLimit","sortedHolidays","getSortedHolidays","timeRangeWeeks","splitIntoWeeks","employeesWithAgreement","payrollRuleGroupsById","payrollRuleGroupsEmpId","groups","group","PayrollRuleCalcGroup","weekLimitAbove","PayrollRuleCalc","payrollPeriodShiftBounds","tr","calcName","reportColumnDefinitions","rules","rows2","row2ByEmp","empName","payrollRuleGroup","getAmount","payrollName","row2","agreementId","weeklyLimitAbove","unitDays","useShiftBounds","PayrollRuleShiftBound","PayrollRuleTime","PayrollRuleDetail","calcAttendance","workType","calcFlex","subtract","taskTypesByKind","ttSet","getInternalAmount","_PayrollRuleDetail","timeToRemove","addTimeToRemove","stDay","fiDay","dayInfo","isPayrollHolidaySettingsOk","getHolidayTime","overMidnight","nextDayInfo","nextDaySt","getPayrollTime","_PayrollRuleDetail2","_super2","timeRangeFi","timeIntervals","addtimeIntervals","newSt","fiNextDay","getPayrollShiftBound","newlength","dayBeforeInterval","dayAfterInterval","uniqueDays","holidayInfo","createHolidayInfo","dayBefore","dayAfter","dayKind","payrollRuleDetail","holidayDiff","DateInterval","getDateTimezoneInfo","dayLightSavingCorrs","getDateTimeInTimezone","EmployeeSchedule","calcInfo","tasksByKind","_paidwork","byDay","_paidWorkWeek","boByTaskType","boData","hasAny","filteredBySkills","plannedAndTarget","_boWorkWeek","initialTasks","addTask","getDayByIndex","absence","payment","correction","minutesPerUnit","getDayInfo","affectsnextday","tzDayInfo","endOfDay","clearDayComputations","calcPayment","calendarDays","calcMode","getShiftBoundsByDate","calculateShiftPaidTime","tasks2","cutToBounds","getWorkImpl","dayCalcInfo","boTasks","workIntervals","subtractTasks","workInMinutes","msPerMinute","wi","boSkillData","addPlanned","taskIntervals","breaksOnDay","paidWorkInterval","calculatePaidWork","weekIndex","weekWork","calculateWork","deleteTasksOnInterval","endsAtNextDay","boWork","getDayIndex","calculateBOWork","calculateWorkIntervals","hasWork","agreedWorkMinutes","paidwork","maxTotalWorkMinutes","areedWorkMinutesLeft","getAgreedWorkMinutesDiff","getMaxWorkWeekLeft","getMaxDurForWork","afterNightRest","nightRest","beforeNightRest","availabilites","possibleWork","workLeft","workLeftWeek","getMinWorkWeekLeft","maxWorkMinutesByWeekIndex","paidWorkWeek","POSITIVE_INFINITY","getShiftBounds2","getPayrollTasks","sumDays","allAttendanceTasks","getAttendanceTasks","attendanceTasks","requiresLog","toCount","calculateAttendance","paidAbsence","toRemove","sumTasks","_step14$value","stCorrect","fiCorrect","msPerHour","payrollTasks","shiftOk","ti","isOkDaysInRow","isOkWeekendsInRow","maxDaysInRow","maxWeekendsInRow","saturdayIndex","minNightRest","agreedWorkDiff","weekIndexSt","weekIndexFi","minWorkWeekLeft","maxWorkWeekViolation","weekStart","dayIndexSt","dayIndexFi","isOkMinNightRest","maxBOWeek","getBOWork","getScore","numberOfAgents","boWorkLeft","getBOWorkLeft","scores","taskScore","getTaskScore","arrayQ","setScores","calculateTimeInInterval","initialByKey","getKey","added","compareWithInital","EmployeeScheduleList","_list","attendanceBreaksTolerance","paidBreaksOnLog","unpaidBreaks","br","hasBefore","hasAfter","noLogTasks","sumDateIntervals","tasksByEmpId","getTasksByEmpId","availByEmp","availByDay","getByDayIndex","arEmp","createAvailabilityByDay","adjustQuarterHoursByDateAvailability","ec","ccIntervals","getOnInterval","callcenterId","ccInterval","qSt","nextNextDt","qFi","shiftTasks","taskCopy","getConnectedEnd","endDt","ignoreToDelete","dayEmpSchedule","empCC","getEmpBreakArray","breakArray","breakArrayDetailed","dtStart","isAtDt","getMinShiftStart","minTaskStart","getPossibleShiftStart","minAbsenceStart","connectEnd","addExtraTime","hasTask","setShiftBounds","prevDate","isInDB","getWork","getWorkFromTasks","filteredTasks","filteredToRemove","getWorkImplFromTasks","usePaid","_step50","_iterator50","remains","_step51","_iterator51","_step52","_iterator52","_step53","_iterator53","newFi","Employee","_ModelObject","_empid","_ccid","_agreedWorkWeek","_minWorkWeek","_maxWorkWeek","_optimizationOrder","optimizationOrder","_maxDaysInRow","_maxWeekendsInRow","_nightRest","_maxBOWeek","_absenceDuration","_username","_switchid","_skills","_password","_tagIds","_address1","address1","_address2","address2","_address3","address3","_agreedSms","agreedSms","_phoneNum","phoneNum","userid","_birthDate","birthDate","_hireDate","hireDate","_terminationDate","changeVersion","_separateUsername","_warnings","_checked","setEmpDateValue","setEmpValue","setHours","isExtra","setEmpNumberArrayValue","hasChangesPart","separateUsername","originalMap","originalSkills","skillId","patchSave","setDateValue","setNumberArrayValue","numberValue","parseFloat","ModelObject","eqProjection","originalValue","projOriginalValue","projValue","setHasChanges","setValueImpl","dateProj","numberArrayProj","setOriginalValueImpl","container","_container","itemChanged","itemHasChanged","fields","field","_step2$value","dt1","dt2","diffTime","diffDays","isoDate","stMs","fiMs","msPerHours","msPerNormalDay","negativeId","getNegativeId","convertToDate","_comment","convertToString","comment","_tasktypeId","_corrSt","convertToNumber","corrSt","_corrFi","corrFi","_reasonCode","_updated","_userId","_lastSt","_lastFi","_logStToggleIndex","_logFiToggleIndex","setOriginalValue","setOriginalDateValue","oldValue","durHours","stCorrectTime","fiCorrectTime","msDay","msPerMin","createTaskSystemKind","operator","shortBreak","longBreak","overtime","createTaskKind","getKindAsType","getSystemKindAsSubtype","systemKind","TaskTypes","TaskType","_byId","_bySystemKind","_work","getSchemeColor","_type","_subtype","_paid","_requiresLog","_color","localUTCOffset","utcOffset","tzUTCOffset","h","getTimeOfDay","EmployeeCallcenters","empCCToList","_byEmployeeId","EmployeeCallcenter","midday","records","getEmployeeCallcenter","byEmployeeId","_intervals","postEmployeeCallcenter","empCCList","getListCopy","defaultId","excludeId","fiInterval","_getEmployeeCallcenter","_postEmployeeCallcenter","getInitialData","_getInitialData","deleteAgreement","_deleteAgreement","deleteTaskType","_deleteTaskType","getAgreements","_getAgreements","getTaskTypes","_getTaskTypes","patchTaskType","_patchTaskType","postAgreements","_postAgreements","agreementsToSave","postTaskType","_postTaskType","defineStore","agreements","shallowReactive","backOfficeSkills","generalSettingsLoaded","planningSettings","getters","empTabs","general","callCentersRelevant","callGroupsAllowed","ccIds","callCentersAllowed","createList","dayTypeDefault","taskTypeList","actions","initialData","tasktypes","loadBreakSettings","_this4","_this5","currentCCId","_this6","_this7","setCurrentCC","_this8","loadCallGroups","_this9","_this10","loadDayTypes","_this11","_this12","reportStore","t1","loadSwitches","_this13","_callee13","_context13","loadTags","_this14","_callee14","_context14","_this15","_callee15","_context15","loadTaskTypes","_this16","_callee16","_context16","initUsers","_this17","_callee17","_context17","saveAgreements","_this18","_callee18","_context18","saveGeneralEmpAppSettings","_this19","_callee19","storedSettings","_context19","usePublishFixedDate","saveGeneralSettings","generalOptions","_this20","_callee20","storedForecastSettings","storedAdherenceSettings","needsReloadOfForecast","_context20","hasChangesForecast","savePlanningSettings","_this21","_callee21","_context21","saveTaskTypes","_this22","_callee22","changeTaskTypes","_context22","ForecastAiData","_forecastDataMap","_loadAiForecastData","msPerQ","forecastDataMap","forecastPredictions","hasShifted","getForecastPrediction","getOrCreateForcast","callTime","dstQ","dstShift","loadAiForecastData","_getForecastPrediction","ForecastData","_historicDataMap","_loadHistoricData","ipoa","msPerQuarterHour","quarterAtDayEnd","quarterAtDaystart","xVal","startTimeUTC","quarters","isCalculating","cgId","daysavingTransitionCorrection","loadHistoricDataSpecialDays","loadHistoricData","_loadHistoricDataSpecialDays","counterMap","d2","dayTypeId","csResult","dr","_dt","_dayTypeId","key2","SimulationData","_simulationDataMap","_targetDataMap","_emplyeesByAffinity","_callGroupPrioInfoMap","SpecialDayData","_specialDaysMap","_loadSpecialDays","daytypeMap","dtid","loadSpecialDays","_saveSpecialDay","dtString","saveSpecialDay","CALL_STATE","createCallStates","CALL_TRACKER_REPORT_TYPE","createCallTrackerReportTypes","CALL_TYPE","createCallTypes","parseGenesisCallTrackerTsv","splitTabLine","parseCall","endIndex","client","clientNumber","callId","events","segment","stamp","parseEnum","callType","callState","stationNumber","Undefined","Secretarial","Checkin","Fetch","Scheduled","IVR","WebScript","VoiceMail","AutoCall","Announcement","MergeComm","PageConfirmation","SmartPaging","ChangeClient","AgentAudio","Rauland","AutoAttendant","ListingLookup","Dispatch","ParkOrbit","VMCallBack","Cue","Repeat","ConfBridge","Orbit","Elevator","Pers","Unknown","Disposed","Disc","Ring","Talk","Talk1","Talk2","Conference","Hold","InProgress","OutboundQueue","Auto","AutoHold","Patch","Bridge","MaxStates","None","Distribute","Answered","Overdial","Change","Reassign","Park","Transfer","Abandon","Voci","Limited","enumObj","indexOfLeft","indexOfRight","importCallsFile","_importCallsFile","callImportFileType","resultData","requiredHeaders","hasAllHeaders","headerIndexMap","callData","callid","talk","tag1","tag2","tag3","abandon","columnMap","_line","_callData","col","_callid","_wrap","_talk","_tag","_timestamp","_abandon","_c","_col","batchedReport","CALL_FILETYPE","infinity","replace","acc","rec","cleanedValues","isNonNegative32Bit","is32Bit","emptyToNull","isInteger","isNonNegative64Bit","genesisLS","genesisCallTracker","numberAsString","createCallFileTypeEnum","dropFiles","context","importCallsLoadingStatus","lastImportFileSetting","lastCallImportFile","lastAgentImportFile","executeCsvImport","fileInfo","dropFileLengh","startProgress","content","_fileImportInfo","fileCount","progress","_isLoadingHistoricData","_isLoadingAiForecast","callStatsWeek","chartData","selectedCallCenters","adjustmentDate","adjustmentDialogShow","compareSencitivity","useAiForecast","aiForecastIsLoaded","copiedData","fetchForecast","loadLocalForcastOptions","loadForecastAdjustment","reloadAiForecast","updateForecast","ok1","ok2","updateCallStatsWeek","adjustmentMap","dayMap","staticData","cgid","static_noc","static_ht","localForecastOptions","selectedAcGrIds","saveLocalForecastOptions","setChartData","callCenterKeyFigures","callCenterKeyFiguresLoadingStatus","clearCallCenterKeyFigures","fetchCallcenterKeyFigures","callCenterKeyFifures","activeCallCenters","getCCSimData","_getCCSimData","numberOfSick","numberOfVacation","absTask","ccCallGroups","simdata","agreementID","includePaidBreaks","payrollReportOneRow","reportDatePicker","reportFilter","reportKind","reportTimeRangePicker","selectedEmp","selectedTasks","selectedTasktype","separateColumns","toggleSelectedTask","checked","selectedTasktoString","thisTaskname","stringArray","taskTypesMap","taskTypeID","BreakOptimizationSettings","_spreadFactor","spreadFactor","_avoidSimultanousBreaksFactor","avoidSimultanousBreaksFactor","_numberOfIterations","_breakStartQuarterHours","breakStartQuarterHours","_blackouts","blackouts","blackout","BreakOptimizationSettingDetail","blackHours","grade","_blackHours","_grade","_taskTypeId","getBreakOptimizationSettings","_getBreakOptimizationSettings","EmployeeContext","highlightedEmpIds","_checkedEmpIds","_activeTab","previousTab","selectedSection","_hasCheckedNotHighlighted","_hasModifiedData","_modifedDataTab","oldCheckedEmpIds","calcHasCheckedNotHighlighted","oldHighlightedEmpIds","EmployeeList","setContainer","numberOfGhosts","setHasChanged","ScheduleTask","_Task","_set","ScheduleTasks","taskDto","setItemHasChanges","_scheduleTaskInfo","loaded","affintyIndicatorsMap","breakOptimizationSettings","customShifts","multiEditSameValue","runningStQ","loadCCData","pinnedRequestKey","scheduleColumnDefinitions","getScheduleColumnDefinitions","scheduleColumnDefinitionsDetailed","getScheduleColumnDefinitionsDetailed","copiedShifts","dragSelectionStart","showDetailsInServiceLevel","showAvgQueueChart","showWaitWithinChart","showReplacementDialog","dispalySimulationSettings","showInactive","showDetailEdit","agentScheduleViewClock","agentExpandedTeamView","agentAcceptedCookies","selectedDate","selectedDateInTeamSchedule","findReplacementSelected","applyToChart","saveButtonHovered","selectedScheduleColumnIds","serviceLevelColumnDefinitions","getServiceLevelColumnDefinitions","simulationStatus","displaySLSencitivity","percetageOfCallsInWaitChart","empOccTarget","scheduleDateInteval","dateArray","getAffintyIndicatorsMap","getNumberOfDaysInSchedule","isAllowedToSave","undoMap","redoMap","revertTo","clearScheduleFilter","clearScheduleTasks","fetchSimData","resetSimulationsStatus","affinintyIdSet","sldd","_step8$value","cd","loadAvailabilities","loadBreakOptimizationSettings","zeroSchedule","loadCustomShifts","loadShiftBags","loadRotations","loadEmployees","localAgentScheduleOptions","inspector","loadLocalRequestOptions","loadScheduleColumnIds","loadEmployeeDisplaySettings","localRequestOptions","_arguments","merge","currentData","local","_r2","needToBeRevertedBeforeUpdate","calculateBySelectionKeyMap","loadScheduleAfterScheduleRequest","loadSchedule","loadScheduleTasks","scheduleTasksToCommit","tasksWithLast","getTaskDateIntervalsNotYetRetrieved","xSt","xNumberOfDays","getLoadedDateIntervals","saveScheduleColumnIds","saveScheduleTasks","changedRequests","hasChangedRequests","taskToCreate","taskToUpdate","taskToDelete","createWeight","updateWeight","requestWeight","deleteItems","deleteBatch","updateItems","updateBatch","createItems","createBatch","requestItems","requestBatch","_i3","getApiReply","create","requestReplies","setAsNonPending","setLoadCCData","toggleScheduleColumn","tmp","selectedColumns","column","msPerDay","columnDefinitions","columnDefinitionsDetailed","columnDefinitionsServiceLevel","requestMap","getSelectionKeys","k","_component_RadioButton","inputId","canSaveNotify","_component_Button","saveNotifyMethod","saveDisabled","isEmailDisabled","autocomplete","password2Formatted","maxlength","verificationNeeded","sendVerification","canSave","saveAuthMethod","loginFailed","hasHistory","backgroundColor","required","roundClass","buttonClass","buttonPaddingClass","fitdark","rounded","iconLeft","iconSize","_renderSlot","$slots","iconRight","expanded","loading","buttonRole","role","iconSrc","_icons","icons","arrow_back","arrows_collapse_vertical","arrows_expand_vertical","arrow_down","arrow_forward","arrow_up","arrow_left_right","arrow_right_short","arrow_right","arrow_left","box_arrow_in_down","box_arrow_up","building","calendar4_range","chat_left","chat_check2_square","chevron_up","chevron_down","chevron_left","chevron_right","clock","clock30","close","cup","deletex","columns","select","gear","grid","checkmark","friendlyGhost","list30","meter","meter_temp","more","edit","pin","pin_angel","phone","plus","search","sick_white","sick_thin","star","swap","compare_filled","compare_outline","_defineProperty","sizePx","onClose","footer","_component_PvAccordion","selectOnFocus","headerClass","_component_PvAccordionTab","isShowTitle","setColor","getSize","webpackAsyncContext","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","deferred","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","getter","__esModule","leafPrototypes","getProto","getPrototypeOf","__proto__","mode","ns","def","getOwnPropertyNames","definition","defineProperty","enumerable","chunkId","miniCssF","g","globalThis","Function","hasOwnProperty","inProgress","dataWebpackPrefix","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","timeout","nc","setAttribute","onScriptComplete","onerror","onload","clearTimeout","doneFns","parentNode","bind","head","Symbol","toStringTag","nmd","paths","children","createStylesheet","fullhref","oldTag","linkTag","rel","onLinkComplete","errorType","realHref","insertBefore","nextSibling","findStylesheet","existingLinkTags","dataHref","existingStyleTags","loadStylesheet","installedCssChunks","miniCss","cssChunks","baseURI","self","installedChunks","installedChunkData","promise","loadingEnded","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}