hl-core 0.0.7-beta.10 → 0.0.7-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Button/Btn.vue +7 -2
- package/components/Layout/Drawer.vue +12 -3
- package/components/Layout/SettingsPanel.vue +12 -2
- package/components/Menu/MenuNav.vue +27 -1
- package/composables/classes.ts +20 -6
- package/composables/constants.ts +10 -0
- package/composables/styles.ts +19 -7
- package/layouts/default.vue +21 -0
- package/package.json +9 -9
- package/store/data.store.js +65 -1
- package/store/messages.ts +2 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
type="button"
|
|
4
4
|
class="transition-all"
|
|
5
5
|
@click="$emit('clicked')"
|
|
6
|
-
:disabled="disabled"
|
|
6
|
+
:disabled="disabled || loading"
|
|
7
7
|
:class="[
|
|
8
8
|
disabled ? 'disabled' : '',
|
|
9
9
|
classes,
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
$libStyles[`btnH${$capitalize(size)}` as keyof typeof $libStyles],
|
|
12
12
|
]"
|
|
13
13
|
>
|
|
14
|
-
|
|
14
|
+
<base-loader v-if="loading" :size="24" color="#FFF" bg-color="" :width="2"></base-loader>
|
|
15
|
+
<span v-if="!loading">{{ text }}</span>
|
|
15
16
|
</button>
|
|
16
17
|
</template>
|
|
17
18
|
|
|
@@ -35,6 +36,10 @@ export default defineComponent({
|
|
|
35
36
|
type: Boolean,
|
|
36
37
|
default: false,
|
|
37
38
|
},
|
|
39
|
+
loading: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
38
43
|
btn: {
|
|
39
44
|
type: String,
|
|
40
45
|
default: new Styles().blueBtn,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
class="sm:!w-[400px] lg:!relative !right-0"
|
|
7
7
|
:class="[$dataStore[whichPanel].overlay ? 'lg:!hidden' : '', $dataStore[whichPanel].open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]']"
|
|
8
8
|
>
|
|
9
|
-
<base-header :title="panelTitle" :has-back="true" back-icon="mdi-close" class="justify-center" @onBack="
|
|
9
|
+
<base-header :title="panelTitle" :has-back="true" back-icon="mdi-close" class="justify-center" @onBack="closePanel"></base-header>
|
|
10
10
|
<div class="flex flex-col" id="panel-actions">
|
|
11
11
|
<slot></slot>
|
|
12
12
|
</div>
|
|
@@ -26,8 +26,17 @@ export default defineComponent({
|
|
|
26
26
|
default: 'panel',
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
-
setup() {
|
|
30
|
-
|
|
29
|
+
setup(props) {
|
|
30
|
+
const dataStore = useDataStore();
|
|
31
|
+
|
|
32
|
+
const closePanel = () => {
|
|
33
|
+
dataStore[props.whichPanel].open = false;
|
|
34
|
+
dataStore.panelAction = null;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
closePanel,
|
|
39
|
+
};
|
|
31
40
|
},
|
|
32
41
|
});
|
|
33
42
|
</script>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<base-drawer :panel-title="$dataStore.menu.title" which-panel="settings">
|
|
3
3
|
<base-panel-item>
|
|
4
|
-
<v-btn size="x-small" icon="mdi-minus" color="#A0B3D8" class="text-white" variant="flat"></v-btn>
|
|
4
|
+
<v-btn size="x-small" icon="mdi-minus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('decrease')"></v-btn>
|
|
5
5
|
Шрифт
|
|
6
|
-
<v-btn size="x-small" icon="mdi-plus" color="#A0B3D8" class="text-white" variant="flat"></v-btn>
|
|
6
|
+
<v-btn size="x-small" icon="mdi-plus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('increase')"></v-btn>
|
|
7
7
|
</base-panel-item>
|
|
8
8
|
<base-panel-item>
|
|
9
9
|
<v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')"></v-text-field>
|
|
@@ -26,6 +26,16 @@
|
|
|
26
26
|
const dialog = ref(false);
|
|
27
27
|
const dataStore = useDataStore();
|
|
28
28
|
|
|
29
|
+
const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
30
|
+
if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
|
|
31
|
+
if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
|
|
32
|
+
if (dataStore.isEFO) {
|
|
33
|
+
dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
|
|
34
|
+
} else {
|
|
35
|
+
dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
29
39
|
const logoutUser = async () => {
|
|
30
40
|
dialog.value = false;
|
|
31
41
|
await dataStore.logoutUser();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<aside class="w-full lg:w-1/4 bg-white flex flex-col border-r-2">
|
|
2
|
+
<aside class="w-full lg:w-1/4 bg-white flex flex-col border-r-2 relative">
|
|
3
3
|
<base-header
|
|
4
4
|
class="justify-center"
|
|
5
5
|
:title="title"
|
|
@@ -29,6 +29,32 @@
|
|
|
29
29
|
</div>
|
|
30
30
|
</base-fade-transition>
|
|
31
31
|
<slot name="end"></slot>
|
|
32
|
+
<slot name="actions"></slot>
|
|
33
|
+
<base-fade-transition>
|
|
34
|
+
<div
|
|
35
|
+
v-if="$dataStore.buttons && $dataStore.buttons.length"
|
|
36
|
+
class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[30%] w-full pr-4"
|
|
37
|
+
>
|
|
38
|
+
<div v-for="(item, index) of $dataStore.buttons" :key="index">
|
|
39
|
+
<transition
|
|
40
|
+
enter-active-class="animate__animated animate__fadeIn animate__faster"
|
|
41
|
+
leave-active-class="animate__animated animate__fadeOut animate__faster"
|
|
42
|
+
>
|
|
43
|
+
<base-btn
|
|
44
|
+
v-if="
|
|
45
|
+
'show' in item && typeof item.show === 'boolean'
|
|
46
|
+
? item.show
|
|
47
|
+
: true
|
|
48
|
+
"
|
|
49
|
+
:text="item.title!"
|
|
50
|
+
:btn="item.color"
|
|
51
|
+
:disabled="!!item.disabled"
|
|
52
|
+
@click="item.action"
|
|
53
|
+
>
|
|
54
|
+
</base-btn>
|
|
55
|
+
</transition>
|
|
56
|
+
</div></div
|
|
57
|
+
></base-fade-transition>
|
|
32
58
|
</section>
|
|
33
59
|
</aside>
|
|
34
60
|
</template>
|
package/composables/classes.ts
CHANGED
|
@@ -10,9 +10,13 @@ class MenuItemConfig {
|
|
|
10
10
|
hasLine?: boolean;
|
|
11
11
|
description?: string | null;
|
|
12
12
|
url?: string | null;
|
|
13
|
-
initial?:
|
|
13
|
+
initial?: any | null;
|
|
14
14
|
icon?: string | null;
|
|
15
|
-
action?: Function;
|
|
15
|
+
action?: Function | void;
|
|
16
|
+
disabled?: typeof computed;
|
|
17
|
+
color?: string;
|
|
18
|
+
show?: typeof computed;
|
|
19
|
+
|
|
16
20
|
constructor(
|
|
17
21
|
id: any = null,
|
|
18
22
|
title: string | null = null,
|
|
@@ -20,9 +24,12 @@ class MenuItemConfig {
|
|
|
20
24
|
hasLine?: boolean,
|
|
21
25
|
description?: string | null,
|
|
22
26
|
url?: string | null,
|
|
23
|
-
initial?:
|
|
27
|
+
initial?: any | null,
|
|
24
28
|
icon?: string | null,
|
|
25
|
-
action?: Function,
|
|
29
|
+
action?: Function | void,
|
|
30
|
+
disabled?: typeof computed,
|
|
31
|
+
color?: string,
|
|
32
|
+
show?: typeof computed,
|
|
26
33
|
) {
|
|
27
34
|
this.id = id;
|
|
28
35
|
this.title = title;
|
|
@@ -33,12 +40,15 @@ class MenuItemConfig {
|
|
|
33
40
|
this.initial = initial;
|
|
34
41
|
this.icon = icon;
|
|
35
42
|
this.action = action;
|
|
43
|
+
this.disabled = disabled;
|
|
44
|
+
this.color = color;
|
|
45
|
+
this.show = show;
|
|
36
46
|
}
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
export class MenuItem extends MenuItemConfig {
|
|
40
|
-
constructor({ id, title, link, hasLine, description, url, initial, icon, action }: MenuItemConfig = new MenuItemConfig()) {
|
|
41
|
-
super(id, title, link, hasLine, description, url, initial, icon, action);
|
|
50
|
+
constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show }: MenuItemConfig = new MenuItemConfig()) {
|
|
51
|
+
super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show);
|
|
42
52
|
}
|
|
43
53
|
}
|
|
44
54
|
|
|
@@ -768,6 +778,8 @@ export class DataStoreClass {
|
|
|
768
778
|
overlay: boolean;
|
|
769
779
|
items: MenuItem[];
|
|
770
780
|
};
|
|
781
|
+
buttons: MenuItem[];
|
|
782
|
+
panelAction: string | null;
|
|
771
783
|
panel: {
|
|
772
784
|
open: boolean;
|
|
773
785
|
overlay: boolean;
|
|
@@ -876,11 +888,13 @@ export class DataStoreClass {
|
|
|
876
888
|
overlay: false,
|
|
877
889
|
items: [],
|
|
878
890
|
};
|
|
891
|
+
this.buttons = [];
|
|
879
892
|
this.panel = {
|
|
880
893
|
open: false,
|
|
881
894
|
overlay: false,
|
|
882
895
|
title: '',
|
|
883
896
|
};
|
|
897
|
+
this.panelAction = null;
|
|
884
898
|
this.historyPageIndex = 1;
|
|
885
899
|
this.historyPageSize = 10;
|
|
886
900
|
this.historyTotalItems = 0;
|
package/composables/constants.ts
CHANGED
|
@@ -26,6 +26,8 @@ export const constants = Object.freeze({
|
|
|
26
26
|
agentMycar: 'AgentMycar',
|
|
27
27
|
analyst: 'Analyst',
|
|
28
28
|
upk: 'UPK',
|
|
29
|
+
financeCenter: 'FinanceCenter',
|
|
30
|
+
supervisor: 'Supervisor',
|
|
29
31
|
},
|
|
30
32
|
actions: {
|
|
31
33
|
accept: 'accept',
|
|
@@ -38,7 +40,15 @@ export const constants = Object.freeze({
|
|
|
38
40
|
},
|
|
39
41
|
yearCases: [2, 0, 1, 1, 1, 2],
|
|
40
42
|
yearTitles: ['год', 'года', 'лет'],
|
|
43
|
+
panelActions: {
|
|
44
|
+
accept: 'accept',
|
|
45
|
+
claim: 'claim',
|
|
46
|
+
return: 'return',
|
|
47
|
+
reject: 'reject',
|
|
48
|
+
rejectclient: 'rejectclient',
|
|
49
|
+
},
|
|
41
50
|
postActions: {
|
|
51
|
+
font: 'font',
|
|
42
52
|
route: 'route',
|
|
43
53
|
applicationCreated: 'applicationCreated',
|
|
44
54
|
clipboard: 'clipboard',
|
package/composables/styles.ts
CHANGED
|
@@ -5,10 +5,12 @@ export class Styles {
|
|
|
5
5
|
blackText: string = 'text-black';
|
|
6
6
|
bodyBg: string = '!bg-[#F5F5F5]';
|
|
7
7
|
|
|
8
|
+
whiteTextHover: string = 'hover:text-[#FFFFFF]';
|
|
8
9
|
// Blue
|
|
9
10
|
blueBg: string = 'bg-[#A0B3D8]';
|
|
10
11
|
blueBgHover: string = 'hover:bg-[#96abd6]';
|
|
11
12
|
blueBgLight: string = 'bg-[#F3F6FC]';
|
|
13
|
+
blueBgLightHover: string = 'hover:bg-[#F3F6FC]';
|
|
12
14
|
blueText: string = 'text-[#A0B3D8]';
|
|
13
15
|
blueTextLight: string = 'text-[#F3F6FC]';
|
|
14
16
|
|
|
@@ -27,11 +29,11 @@ export class Styles {
|
|
|
27
29
|
greyIconBg: string = 'bg-[#DADADA]';
|
|
28
30
|
greyBtnBg: string = 'bg-[#EEE6E6]';
|
|
29
31
|
greyBtnDisabledBg: string = 'bg-[#919191]';
|
|
30
|
-
|
|
32
|
+
blueLightBgHover: string = 'hover:bg-[#F3F6FC]';
|
|
31
33
|
// Red
|
|
32
|
-
redText: string = 'text-[#
|
|
33
|
-
redBg: string = 'bg-[#
|
|
34
|
-
|
|
34
|
+
redText: string = 'text-[#FF897D]';
|
|
35
|
+
redBg: string = 'bg-[#FF897D]';
|
|
36
|
+
redBgHover: string = 'hover:bg-[#ff9b91]';
|
|
35
37
|
// Error
|
|
36
38
|
errorBg: string = 'bg-[#FF5449]';
|
|
37
39
|
errorText: string = 'text-[#FF5449]';
|
|
@@ -48,17 +50,27 @@ export class Styles {
|
|
|
48
50
|
btnHSm: string = 'h-[40px]';
|
|
49
51
|
btnHMd: string = 'h-[60px]';
|
|
50
52
|
btnHLg: string = 'h-[60px]';
|
|
51
|
-
|
|
52
|
-
// Complex
|
|
53
53
|
greenBtn: string;
|
|
54
54
|
blueBtn: string;
|
|
55
|
+
redBtn: string;
|
|
56
|
+
whiteBtn: string;
|
|
57
|
+
blueLightBtn: string;
|
|
58
|
+
|
|
59
|
+
// Complex
|
|
60
|
+
flexColNav: string;
|
|
55
61
|
|
|
56
62
|
// Muted or disabled
|
|
57
63
|
mutedText: string = 'text-[#99A3B3]';
|
|
58
64
|
|
|
59
65
|
constructor() {
|
|
60
|
-
//
|
|
66
|
+
// Button
|
|
61
67
|
this.greenBtn = `${this.greenBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgHover}`;
|
|
68
|
+
this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
|
|
62
69
|
this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
|
|
70
|
+
this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
|
|
71
|
+
this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
|
|
72
|
+
|
|
73
|
+
// Complex
|
|
74
|
+
this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
|
|
63
75
|
}
|
|
64
76
|
}
|
package/layouts/default.vue
CHANGED
|
@@ -35,3 +35,24 @@ const openSettings = async () => {
|
|
|
35
35
|
dataStore.settings.open = true;
|
|
36
36
|
};
|
|
37
37
|
</script>
|
|
38
|
+
<style>
|
|
39
|
+
.mainpage,
|
|
40
|
+
label .v-label .v-field-label,
|
|
41
|
+
.v-field__input,
|
|
42
|
+
.v-label.v-field-label,
|
|
43
|
+
.v-field,
|
|
44
|
+
.v-input,
|
|
45
|
+
span,
|
|
46
|
+
header,
|
|
47
|
+
p {
|
|
48
|
+
font-size: v-bind('dataStore.fontSize + "px"') !important;
|
|
49
|
+
line-height: v-bind('dataStore.fontSize*1.5 + "px"') !important;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.v-input__details,
|
|
53
|
+
.v-messages__message {
|
|
54
|
+
font-size: v-bind('dataStore.fontSize*0.8 + "px"') !important;
|
|
55
|
+
line-height: v-bind('dataStore.fontSize*1 + "px"') !important;
|
|
56
|
+
padding-bottom: 3px;
|
|
57
|
+
}
|
|
58
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.7-beta.
|
|
3
|
+
"version": "0.0.7-beta.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
@@ -18,28 +18,28 @@
|
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "nuxt build",
|
|
21
|
-
"dev": "nuxt dev",
|
|
21
|
+
"dev": "nuxt clean && nuxt dev",
|
|
22
22
|
"generate": "nuxt generate",
|
|
23
23
|
"preview": "nuxt preview"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@nuxt/devtools": "^0.2
|
|
27
|
-
"nuxt": "^3.3.
|
|
26
|
+
"@nuxt/devtools": "^0.3.2",
|
|
27
|
+
"nuxt": "^3.3.3",
|
|
28
28
|
"prettier": "^2.8.4",
|
|
29
29
|
"typescript": "^4.9.5"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@mdi/font": "^7.1.96",
|
|
33
|
-
"@nuxtjs/tailwindcss": "^6.6.
|
|
34
|
-
"@pinia/nuxt": "^0.4.
|
|
33
|
+
"@nuxtjs/tailwindcss": "^6.6.5",
|
|
34
|
+
"@pinia/nuxt": "^0.4.8",
|
|
35
35
|
"animate.css": "^4.1.1",
|
|
36
|
-
"axios": "^1.3.
|
|
36
|
+
"axios": "^1.3.5",
|
|
37
37
|
"fast-xml-parser": "4.0.12",
|
|
38
38
|
"jwt-decode": "^3.1.2",
|
|
39
39
|
"maska": "1.5.0",
|
|
40
|
-
"pinia": "^2.0.
|
|
40
|
+
"pinia": "^2.0.34",
|
|
41
41
|
"v-idle-3": "^0.3.14",
|
|
42
42
|
"vue-toastification": "^2.0.0-rc.5",
|
|
43
|
-
"vuetify": "^3.1.
|
|
43
|
+
"vuetify": "^3.1.13"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/store/data.store.js
CHANGED
|
@@ -43,6 +43,12 @@ export const useDataStore = defineStore('data', {
|
|
|
43
43
|
sendToParent(action, value) {
|
|
44
44
|
window.parent.postMessage({ action: action, value: value }, '*');
|
|
45
45
|
},
|
|
46
|
+
sendToChild(action, value) {
|
|
47
|
+
const childFrame = document.getElementById('product-iframe');
|
|
48
|
+
if (childFrame && childFrame.contentWindow && childFrame.contentWindow.postMessage) {
|
|
49
|
+
childFrame.contentWindow.postMessage({ action: action, value: value }, '*');
|
|
50
|
+
}
|
|
51
|
+
},
|
|
46
52
|
getFilesByIIN(iin) {
|
|
47
53
|
return this.signedDocumentList.filter(file => file.iin === iin && file.fileTypeName === 'Удостоверение личности');
|
|
48
54
|
},
|
|
@@ -91,7 +97,18 @@ export const useDataStore = defineStore('data', {
|
|
|
91
97
|
this.refreshToken = response.refreshToken;
|
|
92
98
|
this.getUserRoles();
|
|
93
99
|
}
|
|
94
|
-
if (
|
|
100
|
+
if (
|
|
101
|
+
this.isManager() ||
|
|
102
|
+
this.isUnderwriter() ||
|
|
103
|
+
this.isAdmin() ||
|
|
104
|
+
this.isAgent() ||
|
|
105
|
+
this.isCompliance() ||
|
|
106
|
+
this.isAgentMycar() ||
|
|
107
|
+
this.isAnalyst() ||
|
|
108
|
+
this.isUpk() ||
|
|
109
|
+
this.isFinanceCenter() ||
|
|
110
|
+
this.isSupervisor()
|
|
111
|
+
) {
|
|
95
112
|
localStorage.setItem('accessToken', this.accessToken);
|
|
96
113
|
localStorage.setItem('refreshToken', this.refreshToken);
|
|
97
114
|
} else {
|
|
@@ -154,6 +171,13 @@ export const useDataStore = defineStore('data', {
|
|
|
154
171
|
isUpk() {
|
|
155
172
|
return this.isRole(constants.roles.upk);
|
|
156
173
|
},
|
|
174
|
+
isFinanceCenter() {
|
|
175
|
+
return this.isRole(constants.roles.financeCenter);
|
|
176
|
+
},
|
|
177
|
+
isSupervisor() {
|
|
178
|
+
return this.isRole(constants.roles.supervisor);
|
|
179
|
+
},
|
|
180
|
+
|
|
157
181
|
isProcessEditable(statusCode) {
|
|
158
182
|
return !!constants.editableStatuses.find(status => status === statusCode);
|
|
159
183
|
},
|
|
@@ -1816,6 +1840,46 @@ export const useDataStore = defineStore('data', {
|
|
|
1816
1840
|
return false;
|
|
1817
1841
|
}
|
|
1818
1842
|
},
|
|
1843
|
+
async handleTask(action, taskId, comment) {
|
|
1844
|
+
if (action && Object.keys(constants.actions).includes(action)) {
|
|
1845
|
+
switch (action) {
|
|
1846
|
+
case constants.actions.claim: {
|
|
1847
|
+
try {
|
|
1848
|
+
this.isLoading = true;
|
|
1849
|
+
await this.api.claimTask(this.formStore.applicationTaskId);
|
|
1850
|
+
await this.getApplicationData(taskId, false, false, false);
|
|
1851
|
+
this.showToaster('success', this.t('toaster.successOperation'), 3000);
|
|
1852
|
+
} catch (err) {
|
|
1853
|
+
console.log(err);
|
|
1854
|
+
if ('response' in err && err.response.data) {
|
|
1855
|
+
this.showToaster('error', err.response.data, 3000);
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
case constants.actions.reject:
|
|
1860
|
+
case constants.actions.return:
|
|
1861
|
+
case constants.actions.rejectclient:
|
|
1862
|
+
case constants.actions.accept: {
|
|
1863
|
+
try {
|
|
1864
|
+
await this.sendTask(taskId, action, comment);
|
|
1865
|
+
this.formStore.$reset();
|
|
1866
|
+
if (this.isEFO) {
|
|
1867
|
+
await this.router.push({ name: 'Insurance-Product' });
|
|
1868
|
+
} else {
|
|
1869
|
+
this.sendToParent(constants.postActions.toHomePage, this.t('toaster.successOperation') + 'SUCCESS');
|
|
1870
|
+
}
|
|
1871
|
+
} catch (err) {
|
|
1872
|
+
console.log(err);
|
|
1873
|
+
if ('response' in err && err.response.data) {
|
|
1874
|
+
this.showToaster('error', err.response.data, 3000);
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
} else {
|
|
1880
|
+
console.error('No handleTask action');
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1819
1883
|
async getInvoiceData(processInstanceId) {
|
|
1820
1884
|
try {
|
|
1821
1885
|
const response = await this.api.getInvoiceData(processInstanceId);
|
package/store/messages.ts
CHANGED