hl-core 0.0.9-beta.37 → 0.0.9-beta.38
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/api/base.api.ts +15 -0
- package/components/Form/FormData.vue +8 -0
- package/components/Layout/Header.vue +21 -0
- package/components/Menu/InfoMenu.vue +35 -0
- package/components/Menu/MenuNav.vue +15 -0
- package/components/Pages/MemberForm.vue +4 -4
- package/components/Panel/PanelHandler.vue +69 -8
- package/composables/classes.ts +11 -0
- package/composables/constants.ts +1 -0
- package/composables/index.ts +3 -3
- package/layouts/default.vue +3 -0
- package/locales/ru.json +2 -1
- package/package.json +2 -1
- package/store/data.store.ts +28 -8
package/api/base.api.ts
CHANGED
|
@@ -509,6 +509,14 @@ export class ApiClass {
|
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
+
async signQR(data: SignDataType[]) {
|
|
513
|
+
return await this.axiosCall({
|
|
514
|
+
method: Methods.POST,
|
|
515
|
+
url: '/File/api/Sign/SignQr',
|
|
516
|
+
data: data,
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
|
|
512
520
|
async generateDocument(data: SignDataType) {
|
|
513
521
|
return await this.axiosCall<void>({
|
|
514
522
|
method: Methods.POST,
|
|
@@ -661,6 +669,13 @@ export class ApiClass {
|
|
|
661
669
|
});
|
|
662
670
|
}
|
|
663
671
|
|
|
672
|
+
async checkAccountNumber(iik: string) {
|
|
673
|
+
return await this.axiosCall<boolean>({
|
|
674
|
+
method: Methods.GET,
|
|
675
|
+
url: `/Arm/api/Bpm/CheckAccountNumber?account=${iik}`,
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
|
|
664
679
|
async searchAgentByName(name: string) {
|
|
665
680
|
return await this.axiosCall<AgentData[]>({
|
|
666
681
|
method: Methods.GET,
|
|
@@ -50,6 +50,14 @@
|
|
|
50
50
|
</v-row>
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
|
+
<div
|
|
54
|
+
v-if="typeof block.headerBtn === 'object'"
|
|
55
|
+
:class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, block.disabled ? $styles.disabled : 'cursor-pointer']"
|
|
56
|
+
class="flex lg:hidden transition-all rounded-b-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90"
|
|
57
|
+
@click="!block.disabled && block.headerBtn.action()"
|
|
58
|
+
>
|
|
59
|
+
{{ block.headerBtn.text }}
|
|
60
|
+
</div>
|
|
53
61
|
</div>
|
|
54
62
|
</base-animation>
|
|
55
63
|
</template>
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
<header class="relative w-full min-h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$styles.blueBgLight, $styles.textSimple]">
|
|
3
3
|
<i v-if="hasBack" @click="$emit('onBack')" class="absolute left-5 mdi text-xl cursor-pointer transition-all" :class="[backIcon, backIconAnim]"></i>
|
|
4
4
|
<span class="mx-10">{{ title }}</span>
|
|
5
|
+
<i
|
|
6
|
+
v-if="hasInfo && infoItems && infoItems.length && infoItems.filter(i => (typeof i.show === 'boolean' ? i.show : true)).length"
|
|
7
|
+
class="mdi text-xl cursor-pointer transition-all opacity-70"
|
|
8
|
+
:class="[infoIcon, $styles.blueText]"
|
|
9
|
+
>
|
|
10
|
+
<base-info-menu :options="infoItems" @clicked="$dataStore.copyToClipboard($event, false)" />
|
|
11
|
+
</i>
|
|
5
12
|
<i
|
|
6
13
|
v-if="hasMore"
|
|
7
14
|
@click="$emit('onMore')"
|
|
@@ -13,6 +20,8 @@
|
|
|
13
20
|
</template>
|
|
14
21
|
|
|
15
22
|
<script lang="ts">
|
|
23
|
+
import { MenuItem } from '../../composables/classes';
|
|
24
|
+
|
|
16
25
|
export default defineComponent({
|
|
17
26
|
props: {
|
|
18
27
|
hasBack: {
|
|
@@ -35,6 +44,18 @@ export default defineComponent({
|
|
|
35
44
|
type: String,
|
|
36
45
|
default: 'mdi-dots-vertical',
|
|
37
46
|
},
|
|
47
|
+
hasInfo: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
infoIcon: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: '',
|
|
54
|
+
},
|
|
55
|
+
infoItems: {
|
|
56
|
+
type: Array as PropType<Array<MenuItem>>,
|
|
57
|
+
default: [],
|
|
58
|
+
},
|
|
38
59
|
title: {
|
|
39
60
|
type: String,
|
|
40
61
|
default: '',
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-menu
|
|
3
|
+
v-if="options && options.length && options.filter(i => (typeof i.show === 'boolean' ? i.show : true)).length"
|
|
4
|
+
open-on-click
|
|
5
|
+
activator="parent"
|
|
6
|
+
:close-on-content-click="false"
|
|
7
|
+
transition="scale-transition"
|
|
8
|
+
>
|
|
9
|
+
<base-form-text-section class="p-1 border-[1px] flex flex-col gap-3 elevation-3 w-[250px]">
|
|
10
|
+
<v-list lines="two" density="compact" class="!p-0">
|
|
11
|
+
<v-list-item v-for="(option, index) of options.filter(i => (typeof i.show === 'boolean' ? i.show : true))" :key="index" class="!px-3">
|
|
12
|
+
<v-list-item-title :class="[$styles.greenText]">{{ option.title }}</v-list-item-title>
|
|
13
|
+
<v-list-item-subtitle class="!opacity-50">{{ option.description }}</v-list-item-subtitle>
|
|
14
|
+
<template v-slot:append>
|
|
15
|
+
<v-btn color="#faae17" :icon="option.icon ? option.icon : 'mdi-content-copy'" variant="text" size="small" @click="$emit('clicked', option.title)"></v-btn>
|
|
16
|
+
</template>
|
|
17
|
+
</v-list-item>
|
|
18
|
+
</v-list>
|
|
19
|
+
</base-form-text-section>
|
|
20
|
+
</v-menu>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import { MenuItem } from '../../composables/classes';
|
|
25
|
+
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
emits: ['clicked'],
|
|
28
|
+
props: {
|
|
29
|
+
options: {
|
|
30
|
+
type: Array as PropType<Array<MenuItem>>,
|
|
31
|
+
default: [],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
:has-back="hasBack"
|
|
7
7
|
:back-icon="backIcon"
|
|
8
8
|
:has-more="hasMore"
|
|
9
|
+
:has-info="hasInfo"
|
|
10
|
+
:info-icon="infoIcon"
|
|
11
|
+
:info-items="infoItems"
|
|
9
12
|
:hide-more-on-lg="false"
|
|
10
13
|
:more-icon="moreIcon"
|
|
11
14
|
@onBack="$emit('onBack')"
|
|
@@ -68,6 +71,18 @@ export default defineComponent({
|
|
|
68
71
|
type: Boolean,
|
|
69
72
|
default: false,
|
|
70
73
|
},
|
|
74
|
+
hasInfo: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false,
|
|
77
|
+
},
|
|
78
|
+
infoIcon: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: '',
|
|
81
|
+
},
|
|
82
|
+
infoItems: {
|
|
83
|
+
type: Array as PropType<Array<MenuItem>>,
|
|
84
|
+
default: [],
|
|
85
|
+
},
|
|
71
86
|
backIcon: {
|
|
72
87
|
type: String,
|
|
73
88
|
default: 'mdi-arrow-left',
|
|
@@ -1338,12 +1338,12 @@ export default {
|
|
|
1338
1338
|
selectedIndex.value = index;
|
|
1339
1339
|
};
|
|
1340
1340
|
|
|
1341
|
-
const deleteMember = async (
|
|
1342
|
-
await memberStore.deleteMember(route.params.taskId as string, whichForm.value,
|
|
1341
|
+
const deleteMember = async () => {
|
|
1342
|
+
await memberStore.deleteMember(route.params.taskId as string, whichForm.value, selectedIndex.value);
|
|
1343
1343
|
const currentIndex = Number(whichIndex.value);
|
|
1344
|
-
if (
|
|
1344
|
+
if (selectedIndex.value <= currentIndex) {
|
|
1345
1345
|
const newIndex = ref<number>(currentIndex - 1 > 0 ? currentIndex - 1 : 0);
|
|
1346
|
-
await selectMember(newIndex.value,
|
|
1346
|
+
await selectMember(newIndex.value, selectedIndex.value === currentIndex ? true : undefined);
|
|
1347
1347
|
}
|
|
1348
1348
|
deletionDialog.value = false;
|
|
1349
1349
|
};
|
|
@@ -51,10 +51,13 @@
|
|
|
51
51
|
</div>
|
|
52
52
|
<div v-if="isQr" :class="[$styles.flexColNav]">
|
|
53
53
|
<base-form-section :title="''">
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
<base-loader v-if="isQrLoading" class="self-center m-5 opacity-70" />
|
|
55
|
+
<div v-if="qrUrl && !isQrLoading">
|
|
56
|
+
<img width="135" height="135" class="ma-auto" :src="qrUrl" alt="" />
|
|
57
|
+
<span :class="[$styles.textSimple]" class="mt-3 text-center d-block">{{ $dataStore.t('sign.scanQrCode') }}</span>
|
|
58
|
+
</div>
|
|
59
|
+
<base-btn class="mt-10" :loading="loading" :text="$dataStore.t('sign.copyEgov')" @click="$dataStore.copyToClipboard(urlCopy)" />
|
|
60
|
+
<base-btn :text="$dataStore.t('buttons.cancel')" :btn="$styles.whiteBtn" @click="closeQrPanel" />
|
|
58
61
|
</base-form-section>
|
|
59
62
|
</div>
|
|
60
63
|
</section>
|
|
@@ -165,6 +168,7 @@
|
|
|
165
168
|
|
|
166
169
|
<script lang="ts">
|
|
167
170
|
import { DocumentItem, Value } from '../../composables/classes';
|
|
171
|
+
import { HubConnectionBuilder } from '@microsoft/signalr';
|
|
168
172
|
|
|
169
173
|
export default defineComponent({
|
|
170
174
|
emits: ['task'],
|
|
@@ -180,6 +184,9 @@ export default defineComponent({
|
|
|
180
184
|
const isElectronicContract = ref<boolean>(true);
|
|
181
185
|
const email = ref<string>('');
|
|
182
186
|
const qrUrl = ref<string>('');
|
|
187
|
+
const connection = ref<any>(null);
|
|
188
|
+
const isQrLoading = ref<boolean>(false);
|
|
189
|
+
const urlCopy = ref<string>('');
|
|
183
190
|
|
|
184
191
|
const vForm = ref<any>();
|
|
185
192
|
const isSendNumberOpen = ref<boolean>(false);
|
|
@@ -472,17 +479,68 @@ export default defineComponent({
|
|
|
472
479
|
isScansDocuments.value = true;
|
|
473
480
|
}
|
|
474
481
|
if (type === 'qr') {
|
|
475
|
-
await
|
|
476
|
-
|
|
482
|
+
const result = (await dataStore.signDocument('qr')) as any;
|
|
483
|
+
if (result && result.data) {
|
|
484
|
+
const groupId = result.data[0].signatureDocumentGroupId;
|
|
485
|
+
await generateQR(groupId);
|
|
486
|
+
isQr.value = true;
|
|
487
|
+
}
|
|
477
488
|
}
|
|
478
489
|
loading.value = false;
|
|
479
490
|
};
|
|
480
491
|
|
|
481
492
|
// TODO Рефактор QR c npm
|
|
482
|
-
const generateQR = async () => {
|
|
493
|
+
const generateQR = async (groupId: string) => {
|
|
483
494
|
const uuid = crypto.randomUUID();
|
|
484
|
-
const qrValue = `${getValuePerEnv('qrGenUrl')}/${uuid}`;
|
|
495
|
+
const qrValue = `${getValuePerEnv('qrGenUrl')}/${uuid}/${groupId}`;
|
|
485
496
|
qrUrl.value = `https://api.qrserver.com/v1/create-qr-code/?size=135x135&data=${qrValue}`;
|
|
497
|
+
|
|
498
|
+
if (dataStore.isLifeBusiness) {
|
|
499
|
+
//для юр лиц
|
|
500
|
+
urlCopy.value = `https://egovbusiness.page.link/?link=${qrValue}?mgovSign&apn=kz.mobile.mgov.business&isi=1597880144&ibi=kz.mobile.mgov.business`;
|
|
501
|
+
} else {
|
|
502
|
+
//для физ лиц
|
|
503
|
+
urlCopy.value = `https://mgovsign.page.link/?link=${qrValue}?mgovSign&apn=kz.mobile.mgov&isi=1476128386&ibi=kz.egov.mobile`;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
await startConnection(uuid);
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
const startConnection = async (uuid: string) => {
|
|
510
|
+
connection.value = new HubConnectionBuilder().withUrl(`https://test-sign.halyklife.kz/qrhub/${uuid}`).withAutomaticReconnect().build();
|
|
511
|
+
try {
|
|
512
|
+
await connection.value.start();
|
|
513
|
+
console.log('SignalR connection started.');
|
|
514
|
+
connection.value.on('QR', async (message: any) => {
|
|
515
|
+
if (message === 'Opened') {
|
|
516
|
+
isQrLoading.value = true;
|
|
517
|
+
}
|
|
518
|
+
if (message === 'Signed') {
|
|
519
|
+
isQrLoading.value = false;
|
|
520
|
+
dataStore.showToaster('success', dataStore.t('sign.successQrSigned'));
|
|
521
|
+
qrUrl.value = '';
|
|
522
|
+
isQr.value = false;
|
|
523
|
+
dataStore.panel.open = false;
|
|
524
|
+
dataStore.panelAction = null;
|
|
525
|
+
await stopConnection();
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
} catch (err) {
|
|
529
|
+
console.error('Error starting SignalR connection:', err);
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
const closeQrPanel = async () => {
|
|
534
|
+
isQr.value = false;
|
|
535
|
+
isQrLoading.value = false;
|
|
536
|
+
await stopConnection();
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
const stopConnection = async () => {
|
|
540
|
+
if (connection.value) {
|
|
541
|
+
await connection.value.stop();
|
|
542
|
+
console.log('SignalR connection stopped.');
|
|
543
|
+
}
|
|
486
544
|
};
|
|
487
545
|
|
|
488
546
|
const generateDocument = async () => {
|
|
@@ -506,6 +564,8 @@ export default defineComponent({
|
|
|
506
564
|
isQr,
|
|
507
565
|
qrUrl,
|
|
508
566
|
scansFiles,
|
|
567
|
+
isQrLoading,
|
|
568
|
+
urlCopy,
|
|
509
569
|
|
|
510
570
|
// Functions
|
|
511
571
|
closePanel,
|
|
@@ -519,6 +579,7 @@ export default defineComponent({
|
|
|
519
579
|
onFileChangeScans,
|
|
520
580
|
sendFiles,
|
|
521
581
|
onClearFile,
|
|
582
|
+
closeQrPanel,
|
|
522
583
|
|
|
523
584
|
// Computed
|
|
524
585
|
buttonText,
|
package/composables/classes.ts
CHANGED
|
@@ -930,6 +930,9 @@ export class DataStoreClass {
|
|
|
930
930
|
loading: boolean;
|
|
931
931
|
backIcon: string;
|
|
932
932
|
moreIcon: string;
|
|
933
|
+
hasInfo: boolean;
|
|
934
|
+
infoIcon: string;
|
|
935
|
+
infoItems: MenuItem[];
|
|
933
936
|
onBack: any;
|
|
934
937
|
onLink: any;
|
|
935
938
|
selectedItem: MenuItem;
|
|
@@ -982,6 +985,7 @@ export class DataStoreClass {
|
|
|
982
985
|
economySectorCode: Value[];
|
|
983
986
|
economicActivityType: Value[];
|
|
984
987
|
gender: Value[];
|
|
988
|
+
authorityBasis: Value[];
|
|
985
989
|
fontSize: number;
|
|
986
990
|
isFontChangerOpen: boolean = false;
|
|
987
991
|
isLoading: boolean = false;
|
|
@@ -1094,6 +1098,9 @@ export class DataStoreClass {
|
|
|
1094
1098
|
loading: false,
|
|
1095
1099
|
backIcon: 'mdi-arrow-left',
|
|
1096
1100
|
moreIcon: 'mdi-dots-vertical',
|
|
1101
|
+
hasInfo: false,
|
|
1102
|
+
infoIcon: 'mdi-information-outline',
|
|
1103
|
+
infoItems: [],
|
|
1097
1104
|
onBack: {},
|
|
1098
1105
|
onLink: {},
|
|
1099
1106
|
selectedItem: new MenuItem(),
|
|
@@ -1155,6 +1162,7 @@ export class DataStoreClass {
|
|
|
1155
1162
|
this.economySectorCode = [];
|
|
1156
1163
|
this.economicActivityType = [];
|
|
1157
1164
|
this.gender = [new Value(0, null), new Value(1, 'Мужской'), new Value(2, 'Женский')];
|
|
1165
|
+
this.authorityBasis = [];
|
|
1158
1166
|
this.fontSize = 14;
|
|
1159
1167
|
this.isFontChangerOpen = false;
|
|
1160
1168
|
this.isLoading = false;
|
|
@@ -1245,6 +1253,7 @@ export class FormStoreClass {
|
|
|
1245
1253
|
isPolicyholderBeneficialOwner: boolean;
|
|
1246
1254
|
clientId: string | null;
|
|
1247
1255
|
insuredFile: any;
|
|
1256
|
+
isPanelInside: boolean;
|
|
1248
1257
|
};
|
|
1249
1258
|
additionalInsuranceTerms: AddCover[];
|
|
1250
1259
|
additionalInsuranceTermsWithout: AddCover[];
|
|
@@ -1302,6 +1311,7 @@ export class FormStoreClass {
|
|
|
1302
1311
|
isPolicyholderIPDL: boolean = false;
|
|
1303
1312
|
applicationData: {
|
|
1304
1313
|
processInstanceId: number | string;
|
|
1314
|
+
regNumber?: string;
|
|
1305
1315
|
statusCode?: keyof typeof Statuses;
|
|
1306
1316
|
clientApp?: any;
|
|
1307
1317
|
insuredApp?: any;
|
|
@@ -1357,6 +1367,7 @@ export class FormStoreClass {
|
|
|
1357
1367
|
accidentIncidents: [],
|
|
1358
1368
|
clientId: null,
|
|
1359
1369
|
insuredFile: null,
|
|
1370
|
+
isPanelInside: false,
|
|
1360
1371
|
};
|
|
1361
1372
|
this.additionalInsuranceTerms = [];
|
|
1362
1373
|
this.additionalInsuranceTermsWithout = [];
|
package/composables/constants.ts
CHANGED
package/composables/index.ts
CHANGED
|
@@ -295,9 +295,9 @@ export const getValuePerEnv = (which: WhichValuePerEnv) => {
|
|
|
295
295
|
};
|
|
296
296
|
} = {
|
|
297
297
|
qrGenUrl: {
|
|
298
|
-
production: 'mobileSign:https://test-sign.halyklife.kz/
|
|
299
|
-
development: 'mobileSign:https://test-sign.halyklife.kz/
|
|
300
|
-
test: 'mobileSign:https://test-sign.halyklife.kz/
|
|
298
|
+
production: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
|
|
299
|
+
development: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
|
|
300
|
+
test: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
|
|
301
301
|
},
|
|
302
302
|
};
|
|
303
303
|
return valuesPerEnv[which][useEnv().envMode as Envs];
|
package/layouts/default.vue
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
:back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
|
|
11
11
|
:more-icon="$dataStore.menu.moreIcon ?? 'mdi-dots-vertical'"
|
|
12
12
|
:has-more="'hasMore' in $route.meta ? !!$route.meta.hasMore : true"
|
|
13
|
+
:has-info="$dataStore.menu.hasInfo"
|
|
14
|
+
:info-icon="$dataStore.menu.infoIcon"
|
|
15
|
+
:info-items="$dataStore.menu.infoItems"
|
|
13
16
|
:class="{
|
|
14
17
|
// @ts-ignore
|
|
15
18
|
'!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
|
package/locales/ru.json
CHANGED
|
@@ -269,7 +269,8 @@
|
|
|
269
269
|
"showQR": "Показать QR-код",
|
|
270
270
|
"timer": "Вы создали счет на оплату, через 00:59 сек счет станет не активным",
|
|
271
271
|
"copyEgov": "Скопировать ссылку на подпись через Egov",
|
|
272
|
-
"scanQrCode": "Отсканируйте этот QR-код в приложении, чтобы осуществить подписание"
|
|
272
|
+
"scanQrCode": "Отсканируйте этот QR-код в приложении, чтобы осуществить подписание",
|
|
273
|
+
"successQrSigned": "Заявление и Договор подписаны Страхователем"
|
|
273
274
|
},
|
|
274
275
|
"questionnaireType": {
|
|
275
276
|
"byHealth": "Анкета по здоровью Застрахованного",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.38",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@intlify/unplugin-vue-i18n": "0.12.2",
|
|
53
53
|
"@mdi/font": "7.3.67",
|
|
54
|
+
"@microsoft/signalr": "^7.0.12",
|
|
54
55
|
"@nuxtjs/tailwindcss": "6.8.0",
|
|
55
56
|
"@pinia/nuxt": "0.4.11",
|
|
56
57
|
"@vuepic/vue-datepicker": "7.2.0",
|
package/store/data.store.ts
CHANGED
|
@@ -87,7 +87,7 @@ export const useDataStore = defineStore('data', {
|
|
|
87
87
|
console.log(err);
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
-
async copyToClipboard(text: unknown) {
|
|
90
|
+
async copyToClipboard(text: unknown, showError: boolean = true) {
|
|
91
91
|
if (typeof text === 'string' || typeof text === 'number') {
|
|
92
92
|
if (navigator.clipboard && window.isSecureContext) {
|
|
93
93
|
if (this.isBridge) {
|
|
@@ -113,7 +113,7 @@ export const useDataStore = defineStore('data', {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
} else {
|
|
116
|
-
this.showToaster('error', this.t('toaster.noUrl'));
|
|
116
|
+
if (showError) this.showToaster('error', this.t('toaster.noUrl'));
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
getFilesByIIN(iin: string) {
|
|
@@ -1361,7 +1361,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1361
1361
|
return await this.getFromApi('economySectorCode', 'getSectorCode');
|
|
1362
1362
|
},
|
|
1363
1363
|
async getEconomicActivityType() {
|
|
1364
|
-
if (this.isDas) return await this.getFromApi('economicActivityType', 'getEconomicActivityType');
|
|
1364
|
+
if (this.isLifeBusiness || this.isDas || this.isUU) return await this.getFromApi('economicActivityType', 'getEconomicActivityType');
|
|
1365
1365
|
},
|
|
1366
1366
|
async getFamilyStatuses() {
|
|
1367
1367
|
return await this.getFromApi('familyStatuses', 'getFamilyStatuses');
|
|
@@ -1370,7 +1370,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1370
1370
|
return await this.getFromApi('relations', 'getRelationTypes');
|
|
1371
1371
|
},
|
|
1372
1372
|
async getBanks() {
|
|
1373
|
-
if (this.isLifeBusiness || this.isDas) return await this.getFromApi('banks', 'getBanks');
|
|
1373
|
+
if (this.isLifeBusiness || this.isDas || this.isUU) return await this.getFromApi('banks', 'getBanks');
|
|
1374
1374
|
},
|
|
1375
1375
|
async getProcessIndexRate() {
|
|
1376
1376
|
if (this.processCode) {
|
|
@@ -1420,6 +1420,9 @@ export const useDataStore = defineStore('data', {
|
|
|
1420
1420
|
getGenderList() {
|
|
1421
1421
|
return this.gender;
|
|
1422
1422
|
},
|
|
1423
|
+
async getAuthorityBasis() {
|
|
1424
|
+
if (this.isDas || this.isLifeBusiness || this.isUU) return await this.getFromApi('authorityBasis', 'getArmDicts', 'DicAuthorityBasis');
|
|
1425
|
+
},
|
|
1423
1426
|
async getAllFormsData() {
|
|
1424
1427
|
await Promise.allSettled([
|
|
1425
1428
|
this.getCountries(),
|
|
@@ -1455,6 +1458,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1455
1458
|
this.getProcessGfot(),
|
|
1456
1459
|
this.getBanks(),
|
|
1457
1460
|
this.getEconomicActivityType(),
|
|
1461
|
+
this.getAuthorityBasis(),
|
|
1458
1462
|
]);
|
|
1459
1463
|
},
|
|
1460
1464
|
async getQuestionList(
|
|
@@ -2355,7 +2359,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2355
2359
|
this.formStore[whichForm][index].jobPlace = this.formStore.applicationData[whichMember][index].jobName;
|
|
2356
2360
|
}
|
|
2357
2361
|
},
|
|
2358
|
-
async signDocument() {
|
|
2362
|
+
async signDocument(type: string = 'electronic') {
|
|
2359
2363
|
try {
|
|
2360
2364
|
if (this.formStore.signUrls.length) {
|
|
2361
2365
|
return this.formStore.signUrls;
|
|
@@ -2386,9 +2390,14 @@ export const useDataStore = defineStore('data', {
|
|
|
2386
2390
|
}
|
|
2387
2391
|
};
|
|
2388
2392
|
const data = prepareSignDocuments();
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2393
|
+
if (type === 'qr') {
|
|
2394
|
+
const groupId = await this.api.signQR(data);
|
|
2395
|
+
return groupId;
|
|
2396
|
+
} else {
|
|
2397
|
+
const result = await this.api.signDocument(data);
|
|
2398
|
+
this.formStore.signUrls = result;
|
|
2399
|
+
return this.formStore.signUrls;
|
|
2400
|
+
}
|
|
2392
2401
|
} catch (err) {
|
|
2393
2402
|
ErrorHandler(err);
|
|
2394
2403
|
}
|
|
@@ -2416,6 +2425,9 @@ export const useDataStore = defineStore('data', {
|
|
|
2416
2425
|
case constants.documentTypes.application1:
|
|
2417
2426
|
link.setAttribute('download', 'Приложение №1.xls');
|
|
2418
2427
|
break;
|
|
2428
|
+
case constants.documentTypes.questionnaireInsured:
|
|
2429
|
+
link.setAttribute('download', 'Анкета Застрахованного.docx');
|
|
2430
|
+
break;
|
|
2419
2431
|
}
|
|
2420
2432
|
document.body.appendChild(link);
|
|
2421
2433
|
link.click();
|
|
@@ -3364,6 +3376,14 @@ export const useDataStore = defineStore('data', {
|
|
|
3364
3376
|
return null;
|
|
3365
3377
|
}
|
|
3366
3378
|
},
|
|
3379
|
+
async checkAccountNumber(iik: string) {
|
|
3380
|
+
try {
|
|
3381
|
+
const checked = await this.api.checkAccountNumber(iik);
|
|
3382
|
+
return checked;
|
|
3383
|
+
} catch (err) {
|
|
3384
|
+
return ErrorHandler(err);
|
|
3385
|
+
}
|
|
3386
|
+
},
|
|
3367
3387
|
async isCourseChanged(processInstanceId: string) {
|
|
3368
3388
|
try {
|
|
3369
3389
|
const response = await this.api.isCourseChanged(processInstanceId);
|