From a0acfbe25b95be4b32caa0d0fc8ceec4675e382c Mon Sep 17 00:00:00 2001 From: Lera24 Date: Tue, 24 Sep 2024 17:03:01 +0300 Subject: [PATCH 1/3] feature: add shift template page[WTEL-5079] --- package-lock.json | 621 +++++++++++++++++- package.json | 4 +- src/app/locale/en/en.js | 5 +- src/app/locale/ru/ru.js | 3 + src/app/locale/ua/ua.js | 3 + .../_internals/NavigationPages.lookup.js | 5 + src/app/router/_internals/RouteNames.enum.js | 1 + src/app/router/router.js | 3 + .../shift-templates/api/shiftTemplates.js | 107 +++ .../opened-shift-template-general.vue | 38 ++ .../opened-shift-template-template.vue | 123 ++++ .../components/opened-shift-template.vue | 124 ++++ .../components/the-shift-templates.vue | 174 +++++ .../ShiftTemplatesRouteName.enum.js | 6 + .../shift-templates/router/shift-templates.js | 40 ++ .../store/_internals/headers.js | 16 + .../shift-templates/store/shift-templates.js | 59 ++ src/modules/lookups/store/lookups.js | 3 + .../opened-chat-gateway-templates-tab.vue | 2 +- .../components/opened-chat-gateway.vue | 2 +- 20 files changed, 1323 insertions(+), 16 deletions(-) create mode 100644 src/modules/lookups/modules/shift-templates/api/shiftTemplates.js create mode 100644 src/modules/lookups/modules/shift-templates/components/opened-shift-template-general.vue create mode 100644 src/modules/lookups/modules/shift-templates/components/opened-shift-template-template.vue create mode 100644 src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue create mode 100644 src/modules/lookups/modules/shift-templates/components/the-shift-templates.vue create mode 100644 src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js create mode 100644 src/modules/lookups/modules/shift-templates/router/shift-templates.js create mode 100644 src/modules/lookups/modules/shift-templates/store/_internals/headers.js create mode 100644 src/modules/lookups/modules/shift-templates/store/shift-templates.js diff --git a/package-lock.json b/package-lock.json index 77400f7d5..f635bdd57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@vuelidate/validators": "^2.0.4", "@vueuse/core": "^11.0.3", "@webitel/flow-ui-sdk": "^0.1.14", - "@webitel/ui-sdk": "^24.10.11", + "@webitel/ui-sdk": "^24.10.20", "axios": "^1.7.7", "clipboard-copy": "^4.0.1", "cron-validator": "^1.3.1", @@ -34,7 +34,7 @@ "vue-router": "^4.4.3", "vue2-dropzone": "^3.6.0", "vuex": "^4.1.0", - "webitel-sdk": "^24.8.1" + "webitel-sdk": "^24.8.3" }, "devDependencies": { "@biomejs/biome": "^1.8.3", @@ -1446,6 +1446,57 @@ "win32" ] }, + "node_modules/@shikijs/core": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.17.7.tgz", + "integrity": "sha512-ZnIDxFu/yvje3Q8owSHaEHd+bu/jdWhHAaJ17ggjXofHx5rc4bhpCSW+OjC6smUBi5s5dd023jWtZ1gzMu/yrw==", + "peer": true, + "dependencies": { + "@shikijs/engine-javascript": "1.17.7", + "@shikijs/engine-oniguruma": "1.17.7", + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.2" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.17.7.tgz", + "integrity": "sha512-wwSf7lKPsm+hiYQdX+1WfOXujtnUG6fnN4rCmExxa4vo+OTmvZ9B1eKauilvol/LHUPrQgW12G3gzem7pY5ckw==", + "peer": true, + "dependencies": { + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2", + "oniguruma-to-js": "0.4.3" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.17.7.tgz", + "integrity": "sha512-pvSYGnVeEIconU28NEzBXqSQC/GILbuNbAHwMoSfdTBrobKAsV1vq2K4cAgiaW1TJceLV9QMGGh18hi7cCzbVQ==", + "peer": true, + "dependencies": { + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2" + } + }, + "node_modules/@shikijs/types": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.17.7.tgz", + "integrity": "sha512-+qA4UyhWLH2q4EFd+0z4K7GpERDU+c+CN2XYD3sC+zjvAr5iuwD1nToXZMt1YODshjkEGEDV86G7j66bKjqDdg==", + "peer": true, + "dependencies": { + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz", + "integrity": "sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==", + "peer": true + }, "node_modules/@sindresorhus/merge-streams": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", @@ -1488,6 +1539,24 @@ "integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==", "license": "MIT" }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "peer": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "peer": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/ms": { "version": "0.7.34", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", @@ -1506,6 +1575,12 @@ "undici-types": "~6.11.1" } }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "peer": true + }, "node_modules/@types/web-bluetooth": { "version": "0.0.20", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", @@ -1518,6 +1593,12 @@ "integrity": "sha512-W5FyScaZ+nLb0CXP/4UaRiNr042RwW/RnLUZYt0uwveZN8w+X1gtt0bYIg9oMzt5ODiU/aQV/kyCFv24wfNrXA==", "license": "MIT" }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "peer": true + }, "node_modules/@vitejs/plugin-vue": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.3.tgz", @@ -2131,9 +2212,9 @@ } }, "node_modules/@webitel/ui-sdk": { - "version": "24.10.11", - "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-24.10.11.tgz", - "integrity": "sha512-tM9Q6UD+4Ykzw7S27L7DEeMLwUgowPpSEMoI4V0bFXvUKRS8YCzS+I50n5jiCA3puvVjZSnnUR3U8r98YNgdDw==", + "version": "24.10.20", + "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-24.10.20.tgz", + "integrity": "sha512-B3wLjMwB4t5hbaK7aIr/p+Sf+1cz9fGmeukbuxPnNLHbz5fwGbR1BYAd0M+NiAt2FTWBvhMibOTwG/eT5CDU2Q==", "dependencies": { "@floating-ui/vue": "^1.0.1", "@morev/vue-transitions": "^3.0.2", @@ -2522,7 +2603,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, "license": "MIT" }, "node_modules/base": { @@ -2622,7 +2702,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -2936,6 +3015,16 @@ } ] }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/cfb": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", @@ -3004,6 +3093,26 @@ "node": ">=4" } }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", @@ -3201,6 +3310,16 @@ "node": ">= 0.8" } }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -3792,6 +3911,15 @@ "node": ">=0.4.0" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/des.js": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", @@ -3808,6 +3936,19 @@ "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==" }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "peer": true, + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/dezalgo": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", @@ -5094,6 +5235,42 @@ "node": ">= 0.4" } }, + "node_modules/hast-util-to-html": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz", + "integrity": "sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==", + "peer": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "peer": true, + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -5137,6 +5314,16 @@ "dev": true, "license": "MIT" }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/htmlparser2": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", @@ -6051,6 +6238,15 @@ "immediate": "~3.0.5" } }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "peer": true, + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/loader-utils": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", @@ -6144,6 +6340,12 @@ "dev": true, "license": "ISC" }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "peer": true + }, "node_modules/magic-string": { "version": "0.30.11", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", @@ -6203,6 +6405,29 @@ "node": ">=0.10.0" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "peer": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "peer": true + }, "node_modules/material-colors": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.6.tgz", @@ -6222,6 +6447,27 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", + "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "peer": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", @@ -6229,6 +6475,12 @@ "dev": true, "license": "CC0-1.0" }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "peer": true + }, "node_modules/merge-options": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-1.0.1.tgz", @@ -6264,6 +6516,95 @@ "node": ">= 0.6" } }, + "node_modules/micromark-util-character": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", + "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "peer": true, + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", + "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "peer": true + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", + "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "peer": true, + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", + "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "peer": true + }, + "node_modules/micromark-util-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", + "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "peer": true + }, "node_modules/micromatch": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", @@ -6959,6 +7300,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oniguruma-to-js": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz", + "integrity": "sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==", + "peer": true, + "dependencies": { + "regex": "^4.3.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -7385,6 +7738,16 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "license": "MIT" }, + "node_modules/property-information": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", + "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -7429,6 +7792,15 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/qrcode.vue": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-3.4.1.tgz", @@ -7566,6 +7938,12 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, + "node_modules/regex": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/regex/-/regex-4.3.2.tgz", + "integrity": "sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==", + "peer": true + }, "node_modules/regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -7950,6 +8328,20 @@ "node": ">=8" } }, + "node_modules/shiki": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.17.7.tgz", + "integrity": "sha512-Zf6hNtWhFyF4XP5OOsXkBTEx9JFPiN0TQx4wSe+Vqeuczewgk2vT4IZhF4gka55uelm052BD5BaHavNqUNZd+A==", + "peer": true, + "dependencies": { + "@shikijs/core": "1.17.7", + "@shikijs/engine-javascript": "1.17.7", + "@shikijs/engine-oniguruma": "1.17.7", + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -8169,6 +8561,16 @@ "dev": true, "license": "MIT" }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/split-on-first": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", @@ -8487,6 +8889,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "peer": true, + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -9171,6 +9587,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/tslib": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", @@ -9294,6 +9720,54 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typedoc": { + "version": "0.26.7", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.7.tgz", + "integrity": "sha512-gUeI/Wk99vjXXMi8kanwzyhmeFEGv1LTdTQsiyIsmSYsBebvFxhbcyAx7Zjo4cMbpLGxM4Uz3jVIjksu/I2v6Q==", + "peer": true, + "dependencies": { + "lunr": "^2.3.9", + "markdown-it": "^14.1.0", + "minimatch": "^9.0.5", + "shiki": "^1.16.2", + "yaml": "^2.5.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x" + } + }, + "node_modules/typedoc-github-theme": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/typedoc-github-theme/-/typedoc-github-theme-0.1.2.tgz", + "integrity": "sha512-GFwQeq+z4FMtA9u2+wBx/UvzaX6t3xueigv6Jrt1G8JQLLyYuFfWwE3ESuKzpLfDu1+29GK4n70GbIqFRG+gaw==", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "typedoc": "^0.26.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/typescript": { "version": "5.5.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", @@ -9308,6 +9782,12 @@ "node": ">=14.17" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "peer": true + }, "node_modules/ufo": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", @@ -9418,6 +9898,74 @@ "node": ">=0.10.0" } }, + "node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "peer": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "peer": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "peer": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "peer": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "peer": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unplugin": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.12.2.tgz", @@ -9614,6 +10162,34 @@ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", "license": "ISC" }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "peer": true, + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "peer": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vite": { "version": "5.4.3", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.3.tgz", @@ -9920,16 +10496,17 @@ } }, "node_modules/webitel-sdk": { - "version": "24.8.1", - "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-24.8.1.tgz", - "integrity": "sha512-abdjKyIX7OgykvRJwAAJiIZAyvCExGa9aA9obtXbSfQtMvrF9mTXVQFYv5STYWLQGgpU04Q8BSLp2nj+GSFOZQ==", + "version": "24.8.3", + "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-24.8.3.tgz", + "integrity": "sha512-NdRhJbCZZTg4JxxQCK6EgVLyeztO50tFn163dLHDhrb58reIECN8MKg7HPBkB8wghZhvBimKKDww6e/mQB+LdQ==", "dependencies": { "@types/webrtc": "~0.0.41", "deep-copy": "1.4.2", "ee-ts": "1.0.1", "json-refs": "3.0.13", "jssip": "=3.10.1", - "query-string": "7.0.0" + "query-string": "7.0.0", + "typedoc-github-theme": "0.1.2" }, "peerDependencies": { "axios": "^1.6.8", @@ -10247,6 +10824,18 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -10259,6 +10848,16 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } } } } diff --git a/package.json b/package.json index a4bc33085..df0111af6 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@vuelidate/validators": "^2.0.4", "@vueuse/core": "^11.0.3", "@webitel/flow-ui-sdk": "^0.1.14", - "@webitel/ui-sdk": "^24.10.11", + "@webitel/ui-sdk": "^24.10.20", "axios": "^1.7.7", "clipboard-copy": "^4.0.1", "cron-validator": "^1.3.1", @@ -40,7 +40,7 @@ "vue-router": "^4.4.3", "vue2-dropzone": "^3.6.0", "vuex": "^4.1.0", - "webitel-sdk": "^24.8.1" + "webitel-sdk": "^24.8.3" }, "devDependencies": { "@biomejs/biome": "^1.8.3", diff --git a/src/app/locale/en/en.js b/src/app/locale/en/en.js index adc52695e..e27b53f5e 100644 --- a/src/app/locale/en/en.js +++ b/src/app/locale/en/en.js @@ -465,6 +465,9 @@ export default { allowSupervisor: 'Supervisor can change this status', allowAgent: 'Agent can change this status', }, + shiftTemplates: { + shiftTemplates: 'Shift template | Shift templates', + }, }, routing: { routing: 'Routing', @@ -534,7 +537,7 @@ export default { }, chatGateways: { templates: { - templates: 'Templates', + templates: 'Template | Templates', title: "Workspace member's name", close: 'Chat complete message', join: 'Agent joining message', diff --git a/src/app/locale/ru/ru.js b/src/app/locale/ru/ru.js index fae81a5c2..a0c1d90c4 100644 --- a/src/app/locale/ru/ru.js +++ b/src/app/locale/ru/ru.js @@ -471,6 +471,9 @@ export default { allowSupervisor: 'Супервизор может изменять этот статус', allowAgent: 'Оператор может изменять этот статус', }, + shiftTemplates: { + shiftTemplates: 'Шаблон смен | Шаблоны смен', + }, }, routing: { routing: 'Маршрутизация', diff --git a/src/app/locale/ua/ua.js b/src/app/locale/ua/ua.js index 4e8a11543..1d358aeff 100644 --- a/src/app/locale/ua/ua.js +++ b/src/app/locale/ua/ua.js @@ -466,6 +466,9 @@ export default { allowSupervisor: 'Супервізор може змінювати статус', allowAgent: 'Оператор може змінювати статус', }, + shiftTemplates: { + shiftTemplates: 'Шаблон змін | Шаблони змін', + }, }, routing: { routing: 'Маршрутизація', diff --git a/src/app/router/_internals/NavigationPages.lookup.js b/src/app/router/_internals/NavigationPages.lookup.js index a1feceb82..ea3381e56 100644 --- a/src/app/router/_internals/NavigationPages.lookup.js +++ b/src/app/router/_internals/NavigationPages.lookup.js @@ -101,6 +101,11 @@ const nav = Object.freeze([ locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.MEDIA}`, route: 'media', }, + { + value: AdminSections.SHIFT_TEMPLATES, + locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.SHIFT_TEMPLATES}`, + route: 'shift-templates', + }, ], }, { diff --git a/src/app/router/_internals/RouteNames.enum.js b/src/app/router/_internals/RouteNames.enum.js index 72d65dd02..cd3e29f5f 100644 --- a/src/app/router/_internals/RouteNames.enum.js +++ b/src/app/router/_internals/RouteNames.enum.js @@ -25,6 +25,7 @@ export default Object.freeze({ COMMUNICATIONS: 'communications', PAUSE_CAUSE: 'agent-pause-cause', MEDIA: 'media', + SHIFT_TEMPLATES: 'shift-templates', // CONTACT-CENTER AGENTS: 'agents', diff --git a/src/app/router/router.js b/src/app/router/router.js index 583d89495..022748dd0 100755 --- a/src/app/router/router.js +++ b/src/app/router/router.js @@ -29,6 +29,8 @@ import AgentSkillsRoutes from "../../modules/lookups/modules/agent-skills/router import BucketsRoutes from "../../modules/lookups/modules/buckets/router/buckets.js"; import BlacklistsRoutes from "../../modules/lookups/modules/blacklists/router/blacklists.js"; import MediaRoutes from "../../modules/lookups/modules/media/router/media.js"; +import ShiftTemplates + from '../../modules/lookups/modules/shift-templates/router/shift-templates.js'; import CalendarsRoutes from "../../modules/lookups/modules/calendars/router/calendars.js"; import CommunicationsRoutes from "../../modules/lookups/modules/communications/router/communications.js"; import RegionsRoutes from "../../modules/lookups/modules/regions/router/regions.js"; @@ -107,6 +109,7 @@ const router = createRouter({ ...CommunicationsRoutes, ...RegionsRoutes, ...AgentPauseCauseRoutes, + ...ShiftTemplates, // ----------LOOKUPS END------------ // --------------CONTACT CENTER------------- diff --git a/src/modules/lookups/modules/shift-templates/api/shiftTemplates.js b/src/modules/lookups/modules/shift-templates/api/shiftTemplates.js new file mode 100644 index 000000000..79f6c6f32 --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/api/shiftTemplates.js @@ -0,0 +1,107 @@ +import { getDefaultGetListResponse, getDefaultGetParams } from '@webitel/ui-sdk/src/api/defaults/index.js'; +import applyTransform, { + camelToSnake, + merge, + notify, + sanitize, + snakeToCamel, + starToSearch, +} from '@webitel/ui-sdk/src/api/transformers/index.js'; +import { ShiftTemplateServiceApiFactory } from 'webitel-sdk'; + +import instance from '../../../../../app/api/instance'; +import configuration from '../../../../../app/api/openAPIConfig'; + +const shiftTemplateService = new ShiftTemplateServiceApiFactory(configuration, '', instance); + +const getShiftTemplateList = async (params) => { + const { search: q, page, size, sort, fields } = applyTransform(params, [ + merge(getDefaultGetParams()), + starToSearch(), + ]); + + try { + const response = await shiftTemplateService.searchShiftTemplate(q, page, size, sort, fields); + const { items, next } = applyTransform(response.data, [ + snakeToCamel(), + merge(getDefaultGetListResponse()), + ]); + return { + items, + next, + }; + } catch (err) { + throw applyTransform(err, [notify]); + } +}; + +const itemResponseHandler = (item) => { + const copy = { + ...item.item, + }; + + copy.times = copy.times.map((time) => ({ + ...time, + duration: time.end - time.start, + }), []); + + return copy; +}; + +const getShiftTemplate = async ({ itemId: id }) => { + + try { + const response = await shiftTemplateService.readShiftTemplate(id); + return applyTransform(response.data, [snakeToCamel(), itemResponseHandler]); + } catch (err) { + throw applyTransform(err, [notify]); + } +}; + +const fieldsToSend = ['name', 'description', 'times']; + +const addShiftTemplate = async ({ itemInstance }) => { + const item = applyTransform(itemInstance, [sanitize(fieldsToSend), camelToSnake()]); + try { + const response = await shiftTemplateService.createShiftTemplate({ item: { ...item } }); + return applyTransform(response.data, [snakeToCamel()]); + } catch (err) { + throw applyTransform(err, [notify]); + } +}; + +const updateShiftTemplate = async ({ itemInstance, itemId: id }) => { + const item = applyTransform(itemInstance, [sanitize(fieldsToSend), camelToSnake()]); + try { + const response = await shiftTemplateService.updateShiftTemplate(id, { item: { ...item }}); + return applyTransform(response.data, [snakeToCamel()]); + } catch (err) { + throw applyTransform(err, [notify]); + } +}; + +const deleteShiftTemplate = async ({ id }) => { + try { + const response = await shiftTemplateService.deleteShiftTemplate(id); + return applyTransform(response.data, []); + } catch (err) { + throw applyTransform(err, [notify]); + } +}; + +const getShiftTemplatesLookup = (params) => + getShiftTemplateList({ + ...params, + fields: params.fields || ['id', 'name'], + }); + +const ShiftTemplatesAPI = { + getList: getShiftTemplateList, + get: getShiftTemplate, + add: addShiftTemplate, + update: updateShiftTemplate, + delete: deleteShiftTemplate, + getLookup: getShiftTemplatesLookup, +} + +export default ShiftTemplatesAPI; diff --git a/src/modules/lookups/modules/shift-templates/components/opened-shift-template-general.vue b/src/modules/lookups/modules/shift-templates/components/opened-shift-template-general.vue new file mode 100644 index 000000000..e5a31aa0e --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/components/opened-shift-template-general.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/modules/lookups/modules/shift-templates/components/opened-shift-template-template.vue b/src/modules/lookups/modules/shift-templates/components/opened-shift-template-template.vue new file mode 100644 index 000000000..b2c5167d6 --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/components/opened-shift-template-template.vue @@ -0,0 +1,123 @@ + + + + + + diff --git a/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue b/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue new file mode 100644 index 000000000..a77486818 --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/modules/lookups/modules/shift-templates/components/the-shift-templates.vue b/src/modules/lookups/modules/shift-templates/components/the-shift-templates.vue new file mode 100644 index 000000000..c84cf5566 --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/components/the-shift-templates.vue @@ -0,0 +1,174 @@ + + + diff --git a/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js b/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js new file mode 100644 index 000000000..406238fc9 --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js @@ -0,0 +1,6 @@ +import RouteNames from '../../../../../../app/router/_internals/RouteNames.enum.js'; + +export default Object.freeze({ + GENERAL: `${RouteNames.SHIFT_TEMPLATES}-general`, + TEMPLATE: `${RouteNames.SHIFT_TEMPLATES}-template`, +}); diff --git a/src/modules/lookups/modules/shift-templates/router/shift-templates.js b/src/modules/lookups/modules/shift-templates/router/shift-templates.js new file mode 100644 index 000000000..3f66c3a4d --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/router/shift-templates.js @@ -0,0 +1,40 @@ +import RouteNames from "../../../../../app/router/_internals/RouteNames.enum.js"; +import {checkRouteAccess} from "../../../../../app/router/_internals/guards.js"; +import ShiftTemplatesRouteNameEnum + from './_internals/ShiftTemplatesRouteName.enum.js'; + +const ShiftTemplates = () => import('../components/the-shift-templates.vue'); +const OpenedShiftTemplate = () => import('../components/opened-shift-template.vue'); + +const OpenedShiftTemplateGeneral = () => import('../components/opened-shift-template-general.vue'); +const OpenedShiftTemplateTemplate = () => import('../components/opened-shift-template-template.vue'); + + +const ShiftTemplatesRoutes = [ + { + path: '/lookups/shift-templates', + name: RouteNames.SHIFT_TEMPLATES, + component: ShiftTemplates, + beforeEnter: checkRouteAccess, + }, + { + path: '/lookups/shift-templates/:id', + name: `${RouteNames.SHIFT_TEMPLATES}-card`, + redirect: {name: ShiftTemplatesRouteNameEnum.GENERAL}, + component: OpenedShiftTemplate, + beforeEnter: checkRouteAccess, + children: [ + { + path: 'general', + name: ShiftTemplatesRouteNameEnum.GENERAL, + component: OpenedShiftTemplateGeneral, + }, + { + path: 'template', + name: ShiftTemplatesRouteNameEnum.TEMPLATE, + component: OpenedShiftTemplateTemplate, + } + ], + }, +]; +export default ShiftTemplatesRoutes; diff --git a/src/modules/lookups/modules/shift-templates/store/_internals/headers.js b/src/modules/lookups/modules/shift-templates/store/_internals/headers.js new file mode 100644 index 000000000..ff2ea4fd7 --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/store/_internals/headers.js @@ -0,0 +1,16 @@ +import { SortSymbols } from '@webitel/ui-sdk/src/scripts/sortQueryAdapters'; + +export default [ + { + value: 'name', + locale: 'objects.name', + field: 'name', + sort: SortSymbols.NONE, + }, + { + value: 'description', + locale: 'objects.description', + field: 'description', + sort: SortSymbols.NONE, + }, +]; diff --git a/src/modules/lookups/modules/shift-templates/store/shift-templates.js b/src/modules/lookups/modules/shift-templates/store/shift-templates.js new file mode 100644 index 000000000..b1e300f89 --- /dev/null +++ b/src/modules/lookups/modules/shift-templates/store/shift-templates.js @@ -0,0 +1,59 @@ +import ObjectStoreModule from '../../../../../app/store/BaseStoreModules/StoreModules/ObjectStoreModule'; +import ShiftTemplatesAPI from '../api/shiftTemplates.js'; +import headers from './_internals/headers'; + +const resettableState = { + itemInstance: { + name: '', + description: '', + times: [], + }, +}; + +const actions = { + ADD_TEMPLATE: (context) => { + const pair = { start: 9 * 60, end: 20 * 60, duration : 11 * 60 }; + context.commit('ADD_TEMPLATE', pair); + context.commit('SET_ITEM_PROPERTY', { + prop: '_dirty', + value: true, + }); + }, + SET_TEMPLATE: (context, { index, prop, value }) => { + context.commit('SET_TEMPLATE', { + index, + prop, + value, + }); + context.commit('SET_ITEM_PROPERTY', { + prop: '_dirty', + value: true, + }); + }, + DELETE_TEMPLATE: (context, index) => { + context.commit('DELETE_TEMPLATE', index); + context.commit('SET_ITEM_PROPERTY', { + prop: '_dirty', + value: true, + }); + }, +} + +const mutations = { + ADD_TEMPLATE: (state, pair) => { + state.itemInstance.times.push(pair); + }, + SET_TEMPLATE: (state, { index, prop, value }) => { + state.itemInstance.times[index][prop] = value; + }, + DELETE_TEMPLATE: (state, index) => { + state.itemInstance.times.splice(index, 1); + }, +}; + +const shiftTemplates = new ObjectStoreModule({ resettableState, headers }) +.attachAPIModule(ShiftTemplatesAPI) +.generateAPIActions() +.getModule({ actions, mutations }); + +export default shiftTemplates; diff --git a/src/modules/lookups/store/lookups.js b/src/modules/lookups/store/lookups.js index 0e52ea65f..1edd5820b 100644 --- a/src/modules/lookups/store/lookups.js +++ b/src/modules/lookups/store/lookups.js @@ -6,6 +6,8 @@ import calendars from '../modules/calendars/store/calendars'; import communications from '../modules/communications/store/communications'; import media from '../modules/media/store/media'; import regions from '../modules/regions/store/regions'; +import shiftTemplates + from '../modules/shift-templates/store/shift-templates.js'; const modules = { skills, @@ -16,6 +18,7 @@ const modules = { communications, pauseCause, media, + shiftTemplates, }; export default { diff --git a/src/modules/routing/modules/chat-gateways/components/_shared/opened-chat-gateway-templates-tab.vue b/src/modules/routing/modules/chat-gateways/components/_shared/opened-chat-gateway-templates-tab.vue index 6762fcbfb..e1ec076d8 100644 --- a/src/modules/routing/modules/chat-gateways/components/_shared/opened-chat-gateway-templates-tab.vue +++ b/src/modules/routing/modules/chat-gateways/components/_shared/opened-chat-gateway-templates-tab.vue @@ -2,7 +2,7 @@

- {{ $t('objects.routing.chatGateways.templates.templates') }} + {{ $tc('objects.routing.chatGateways.templates.templates', 2) }}

diff --git a/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue b/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue index 280c80b3d..6c6bf72e5 100644 --- a/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue +++ b/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue @@ -318,7 +318,7 @@ export default { pathName: ChatGatewayRoutesName.GENERAL, }; const botTemplates = { - text: this.$t('objects.routing.chatGateways.templates.templates'), + text: this.$tc('objects.routing.chatGateways.templates.templates', 2), value: 'OpenedChatGatewayTemplates', pathName: ChatGatewayRoutesName.TEMPLATES, }; From 2da1402b6d88db00a4229c959ec154144e6a6093 Mon Sep 17 00:00:00 2001 From: Lera24 Date: Wed, 25 Sep 2024 14:32:08 +0300 Subject: [PATCH 2/3] fix: rename component and change in store page[WTEL-5079] --- .../opened-calendar-special-time.vue | 4 +- .../components/opened-calendar-work-week.vue | 7 +-- .../shift-templates/api/shiftTemplates.js | 4 +- ...te.vue => opened-shift-template-times.vue} | 49 ++++++++++++------- .../components/opened-shift-template.vue | 14 +++--- .../ShiftTemplatesRouteName.enum.js | 2 +- .../shift-templates/router/shift-templates.js | 8 +-- .../shift-templates/store/shift-templates.js | 43 +--------------- 8 files changed, 49 insertions(+), 82 deletions(-) rename src/modules/lookups/modules/shift-templates/components/{opened-shift-template-template.vue => opened-shift-template-times.vue} (67%) diff --git a/src/modules/lookups/modules/calendars/components/opened-calendar-special-time.vue b/src/modules/lookups/modules/calendars/components/opened-calendar-special-time.vue index bbf2c074a..955a82675 100644 --- a/src/modules/lookups/modules/calendars/components/opened-calendar-special-time.vue +++ b/src/modules/lookups/modules/calendars/components/opened-calendar-special-time.vue @@ -24,7 +24,7 @@ :disabled="disableUserInput" :value="minToSec(item.start)" format="hh:mm" - noLabel + no-label @input="setItemProp({prop: 'start', index, value: secToMin($event)})" /> @@ -33,7 +33,7 @@ :disabled="disableUserInput" :value="minToSec(item.end)" format="hh:mm" - noLabel + no-label @input="setItemProp({prop: 'end', index, value: secToMin($event)})" /> diff --git a/src/modules/lookups/modules/calendars/components/opened-calendar-work-week.vue b/src/modules/lookups/modules/calendars/components/opened-calendar-work-week.vue index db9a3238e..dc7421fd6 100644 --- a/src/modules/lookups/modules/calendars/components/opened-calendar-work-week.vue +++ b/src/modules/lookups/modules/calendars/components/opened-calendar-work-week.vue @@ -24,7 +24,7 @@ :disabled="disableUserInput" :value="minToSec(item.start)" format="hh:mm" - noLabel + no-label @input="setItemProp({ prop: 'start', index, value: secToMin($event)})" /> @@ -33,7 +33,7 @@ :disabled="disableUserInput" :value="minToSec(item.end)" format="hh:mm" - noLabel + no-label @input="setItemProp({prop: 'end', index, value: secToMin($event)})" /> @@ -81,7 +81,4 @@ export default { diff --git a/src/modules/lookups/modules/shift-templates/api/shiftTemplates.js b/src/modules/lookups/modules/shift-templates/api/shiftTemplates.js index 79f6c6f32..6fe7bc00c 100644 --- a/src/modules/lookups/modules/shift-templates/api/shiftTemplates.js +++ b/src/modules/lookups/modules/shift-templates/api/shiftTemplates.js @@ -5,7 +5,6 @@ import applyTransform, { notify, sanitize, snakeToCamel, - starToSearch, } from '@webitel/ui-sdk/src/api/transformers/index.js'; import { ShiftTemplateServiceApiFactory } from 'webitel-sdk'; @@ -17,7 +16,6 @@ const shiftTemplateService = new ShiftTemplateServiceApiFactory(configuration, ' const getShiftTemplateList = async (params) => { const { search: q, page, size, sort, fields } = applyTransform(params, [ merge(getDefaultGetParams()), - starToSearch(), ]); try { @@ -64,7 +62,7 @@ const addShiftTemplate = async ({ itemInstance }) => { const item = applyTransform(itemInstance, [sanitize(fieldsToSend), camelToSnake()]); try { const response = await shiftTemplateService.createShiftTemplate({ item: { ...item } }); - return applyTransform(response.data, [snakeToCamel()]); + return applyTransform(response.data, [snakeToCamel(), itemResponseHandler]); } catch (err) { throw applyTransform(err, [notify]); } diff --git a/src/modules/lookups/modules/shift-templates/components/opened-shift-template-template.vue b/src/modules/lookups/modules/shift-templates/components/opened-shift-template-times.vue similarity index 67% rename from src/modules/lookups/modules/shift-templates/components/opened-shift-template-template.vue rename to src/modules/lookups/modules/shift-templates/components/opened-shift-template-times.vue index b2c5167d6..061b53533 100644 --- a/src/modules/lookups/modules/shift-templates/components/opened-shift-template-template.vue +++ b/src/modules/lookups/modules/shift-templates/components/opened-shift-template-times.vue @@ -1,5 +1,5 @@ @@ -37,6 +38,7 @@ :disabled="disableUserInput" :value="minToSec(item.end)" format="hh:mm" + no-label :v="v.itemInstance.times.$each.$response.$data[index].end" @input="setEndTime({ index, value: secToMin($event) })" /> @@ -46,13 +48,14 @@ :value="minToSec(item.duration)" format="hh:mm" type="number" + no-label @input="setDuration({ index, value: secToMin($event) })" /> @@ -62,11 +65,12 @@ diff --git a/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue b/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue index a77486818..0cbf9e1b1 100644 --- a/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue +++ b/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue @@ -39,15 +39,15 @@ import { useVuelidate } from '@vuelidate/core'; import { required, maxLength, helpers, minValue, maxValue } from '@vuelidate/validators'; import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/openedObjectMixin/openedObjectMixin'; -import { requiredArrayValue, timerangeStartLessThanEnd } from '../../../../../app/utils/validators.js'; +import { requiredArrayValue } from '../../../../../app/utils/validators.js'; import General from './opened-shift-template-general.vue'; -import Template from './opened-shift-template-template.vue'; +import Times from './opened-shift-template-times.vue'; import ShiftTemplatesRouteNames from '../router/_internals/ShiftTemplatesRouteName.enum.js'; import RouteNames from '../../../../../app/router/_internals/RouteNames.enum.js'; export default { name: 'OpenedShiftTemplate', - components: { General, Template }, + components: { General, Times }, mixins: [openedObjectMixin], setup: () => ({ @@ -63,7 +63,6 @@ export default { times: { requiredArrayValue, $each: helpers.forEach({ - timerangeStartLessThanEnd, start: { required, minValue: minValue(0), @@ -74,6 +73,9 @@ export default { minValue: minValue(0), maxValue: maxValue(1440), }, + duration: { + minValue: minValue(1) + } }), } }, @@ -89,8 +91,8 @@ export default { }, { text: this.$tc('objects.routing.chatGateways.templates.templates', 1), - value: 'template', - pathName: ShiftTemplatesRouteNames.TEMPLATE + value: 'times', + pathName: ShiftTemplatesRouteNames.TIMES }, ]; return tabs; diff --git a/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js b/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js index 406238fc9..327260876 100644 --- a/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js +++ b/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js @@ -2,5 +2,5 @@ import RouteNames from '../../../../../../app/router/_internals/RouteNames.enum. export default Object.freeze({ GENERAL: `${RouteNames.SHIFT_TEMPLATES}-general`, - TEMPLATE: `${RouteNames.SHIFT_TEMPLATES}-template`, + TIMES: `${RouteNames.SHIFT_TEMPLATES}-times`, }); diff --git a/src/modules/lookups/modules/shift-templates/router/shift-templates.js b/src/modules/lookups/modules/shift-templates/router/shift-templates.js index 3f66c3a4d..56eee59b8 100644 --- a/src/modules/lookups/modules/shift-templates/router/shift-templates.js +++ b/src/modules/lookups/modules/shift-templates/router/shift-templates.js @@ -7,7 +7,7 @@ const ShiftTemplates = () => import('../components/the-shift-templates.vue'); const OpenedShiftTemplate = () => import('../components/opened-shift-template.vue'); const OpenedShiftTemplateGeneral = () => import('../components/opened-shift-template-general.vue'); -const OpenedShiftTemplateTemplate = () => import('../components/opened-shift-template-template.vue'); +const OpenedShiftTemplateTimes = () => import('../components/opened-shift-template-times.vue'); const ShiftTemplatesRoutes = [ @@ -30,9 +30,9 @@ const ShiftTemplatesRoutes = [ component: OpenedShiftTemplateGeneral, }, { - path: 'template', - name: ShiftTemplatesRouteNameEnum.TEMPLATE, - component: OpenedShiftTemplateTemplate, + path: 'times', + name: ShiftTemplatesRouteNameEnum.TIMES, + component: OpenedShiftTemplateTimes, } ], }, diff --git a/src/modules/lookups/modules/shift-templates/store/shift-templates.js b/src/modules/lookups/modules/shift-templates/store/shift-templates.js index b1e300f89..2a952f78f 100644 --- a/src/modules/lookups/modules/shift-templates/store/shift-templates.js +++ b/src/modules/lookups/modules/shift-templates/store/shift-templates.js @@ -10,50 +10,9 @@ const resettableState = { }, }; -const actions = { - ADD_TEMPLATE: (context) => { - const pair = { start: 9 * 60, end: 20 * 60, duration : 11 * 60 }; - context.commit('ADD_TEMPLATE', pair); - context.commit('SET_ITEM_PROPERTY', { - prop: '_dirty', - value: true, - }); - }, - SET_TEMPLATE: (context, { index, prop, value }) => { - context.commit('SET_TEMPLATE', { - index, - prop, - value, - }); - context.commit('SET_ITEM_PROPERTY', { - prop: '_dirty', - value: true, - }); - }, - DELETE_TEMPLATE: (context, index) => { - context.commit('DELETE_TEMPLATE', index); - context.commit('SET_ITEM_PROPERTY', { - prop: '_dirty', - value: true, - }); - }, -} - -const mutations = { - ADD_TEMPLATE: (state, pair) => { - state.itemInstance.times.push(pair); - }, - SET_TEMPLATE: (state, { index, prop, value }) => { - state.itemInstance.times[index][prop] = value; - }, - DELETE_TEMPLATE: (state, index) => { - state.itemInstance.times.splice(index, 1); - }, -}; - const shiftTemplates = new ObjectStoreModule({ resettableState, headers }) .attachAPIModule(ShiftTemplatesAPI) .generateAPIActions() -.getModule({ actions, mutations }); +.getModule(); export default shiftTemplates; From 7966788baf1a39f2573b01ec5a5e0915346e17b7 Mon Sep 17 00:00:00 2001 From: Lera24 Date: Wed, 25 Sep 2024 17:50:16 +0300 Subject: [PATCH 3/3] fix: rename enum[WTEL-4097] --- .../components/opened-shift-template.vue | 2 +- ...teName.enum.js => ShiftTemplatesRouteNames.enum.js} | 0 .../modules/shift-templates/router/shift-templates.js | 10 +++++----- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/modules/lookups/modules/shift-templates/router/_internals/{ShiftTemplatesRouteName.enum.js => ShiftTemplatesRouteNames.enum.js} (100%) diff --git a/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue b/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue index 0cbf9e1b1..70cb10490 100644 --- a/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue +++ b/src/modules/lookups/modules/shift-templates/components/opened-shift-template.vue @@ -42,7 +42,7 @@ import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/opene import { requiredArrayValue } from '../../../../../app/utils/validators.js'; import General from './opened-shift-template-general.vue'; import Times from './opened-shift-template-times.vue'; -import ShiftTemplatesRouteNames from '../router/_internals/ShiftTemplatesRouteName.enum.js'; +import ShiftTemplatesRouteNames from '../router/_internals/ShiftTemplatesRouteNames.enum.js'; import RouteNames from '../../../../../app/router/_internals/RouteNames.enum.js'; export default { diff --git a/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js b/src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteNames.enum.js similarity index 100% rename from src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteName.enum.js rename to src/modules/lookups/modules/shift-templates/router/_internals/ShiftTemplatesRouteNames.enum.js diff --git a/src/modules/lookups/modules/shift-templates/router/shift-templates.js b/src/modules/lookups/modules/shift-templates/router/shift-templates.js index 56eee59b8..af73b954c 100644 --- a/src/modules/lookups/modules/shift-templates/router/shift-templates.js +++ b/src/modules/lookups/modules/shift-templates/router/shift-templates.js @@ -1,7 +1,7 @@ import RouteNames from "../../../../../app/router/_internals/RouteNames.enum.js"; import {checkRouteAccess} from "../../../../../app/router/_internals/guards.js"; -import ShiftTemplatesRouteNameEnum - from './_internals/ShiftTemplatesRouteName.enum.js'; +import ShiftTemplatesRouteNames + from './_internals/ShiftTemplatesRouteNames.enum.js'; const ShiftTemplates = () => import('../components/the-shift-templates.vue'); const OpenedShiftTemplate = () => import('../components/opened-shift-template.vue'); @@ -20,18 +20,18 @@ const ShiftTemplatesRoutes = [ { path: '/lookups/shift-templates/:id', name: `${RouteNames.SHIFT_TEMPLATES}-card`, - redirect: {name: ShiftTemplatesRouteNameEnum.GENERAL}, + redirect: {name: ShiftTemplatesRouteNames.GENERAL}, component: OpenedShiftTemplate, beforeEnter: checkRouteAccess, children: [ { path: 'general', - name: ShiftTemplatesRouteNameEnum.GENERAL, + name: ShiftTemplatesRouteNames.GENERAL, component: OpenedShiftTemplateGeneral, }, { path: 'times', - name: ShiftTemplatesRouteNameEnum.TIMES, + name: ShiftTemplatesRouteNames.TIMES, component: OpenedShiftTemplateTimes, } ],