hl-core 0.0.10-beta.66 → 0.0.10-beta.68

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 CHANGED
@@ -137,6 +137,13 @@ export class ApiClass {
137
137
  });
138
138
  }
139
139
 
140
+ async getEkkDisabilityGroup() {
141
+ return await this.axiosCall<Value[]>({
142
+ method: Methods.GET,
143
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500153',
144
+ });
145
+ }
146
+
140
147
  async getFamilyStatuses() {
141
148
  return await this.axiosCall<Value[]>({
142
149
  method: Methods.GET,
@@ -1143,6 +1150,18 @@ export class ApiClass {
1143
1150
  });
1144
1151
  }
1145
1152
 
1153
+ async saveDocumentIssuer(name: string, insisId: number) {
1154
+ return await this.axiosCall<void>({
1155
+ method: Methods.POST,
1156
+ baseURL: getStrValuePerEnv('efoBaseApiLocal'),
1157
+ url: `/documentparsingservice/SaveDocumentIssuer`,
1158
+ data: {
1159
+ name,
1160
+ insisId,
1161
+ },
1162
+ });
1163
+ }
1164
+
1146
1165
  pensionannuityNew = {
1147
1166
  base: '/pensionannuityNew',
1148
1167
  getEnpfRedirectUrl: async (id: string) => {
@@ -1217,8 +1236,8 @@ export class ApiClass {
1217
1236
  data: data,
1218
1237
  });
1219
1238
  },
1220
- getDigitalDocuments: async (data: { iin: string; processInstanceId: string; code: string }) => {
1221
- return await this.axiosCall<void>({
1239
+ getDigitalDocuments: async (data: { iin: string; code: string; processInstanceId?: string }) => {
1240
+ return await this.axiosCall<{ parsingResponseContent: string; digitalDocuments: any }>({
1222
1241
  method: Methods.POST,
1223
1242
  url: `${this.externalServices.base}/api/ExternalServices/DigitalDocuments`,
1224
1243
  data: data,
@@ -0,0 +1,139 @@
1
+ <template>
2
+ <div class="flex flex-col gap-[10px] w-full align-center">
3
+ <v-expansion-panels :flat="true">
4
+ <v-expansion-panel class="!rounded-[8px]">
5
+ <v-expansion-panel-title class="!text-[12px] border border-[#00000014]">
6
+ Как получить цифровой документ
7
+ </v-expansion-panel-title>
8
+ <v-expansion-panel-text class="text-[12px] text-[#464f60]">
9
+ 1. Выберите тип документа.<br /><br />
10
+ 2. Через приложение eGov mobile и другие приложения: <br />
11
+ • Откройте раздел "Цифровые документы". <br />
12
+ • Выберите нужный документ и откройте доступ. <br />
13
+ • Введите 6-значный код в поле «Код подтверждения». <br />
14
+ • Нажмите "Получить документ".<br /><br />
15
+ 3. Через SMS: <br />
16
+ • Нажмите "Отправить код". <br />
17
+ • Введите полученный SMS-код. <br />
18
+ • Нажмите "Получить документ".<br /><br />
19
+ 4. При ошибке нажмите <a href="javascript:void(0);" class="text-blue-600" @click.prevent="emit('updateDigitalDocuments')">обновить профиль</a><br />
20
+ </v-expansion-panel-text>
21
+ </v-expansion-panel>
22
+ </v-expansion-panels>
23
+ <div class="d-flex flex-col gap-0.5 w-full">
24
+ <base-rounded-select
25
+ v-model="documentType"
26
+ class="document-type-select"
27
+ :items="documentItems"
28
+ :readonly="$dataStore.isLifetrip"
29
+ :label="$dataStore.t('form.documentType')"
30
+ hide-details
31
+ />
32
+ <div class="digital-document-otp flex flex-col">
33
+ <base-otp-input
34
+ v-model="otpCode"
35
+ @keyup.enter.prevent="otpCode.length === otpLength && emitGetCode()"
36
+ />
37
+ <base-animation>
38
+ <span
39
+ v-if="!loading"
40
+ class="text-center cursor-pointer"
41
+ :class="[$styles.mutedText]"
42
+ @click="emitGetCode"
43
+ >
44
+ Не получили код?
45
+ <span class="underline underline-offset-2">Отправить код заново</span>
46
+ </span>
47
+ </base-animation>
48
+ </div>
49
+ </div>
50
+ <div class="w-full d-flex gap-4">
51
+ <base-btn
52
+ :disabled="loading"
53
+ :loading="loading"
54
+ :btn="$styles.whiteBorderBtn"
55
+ text="Отправить SMS-код"
56
+ @click="emitGetCode"
57
+ />
58
+ <base-btn
59
+ :disabled="loading"
60
+ :loading="loading"
61
+ text="Получить документ"
62
+ @click="emitGetDocument"
63
+ />
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <script setup lang="ts">
69
+ import type { DigitalDocTypes } from '../../types';
70
+
71
+ const props = defineProps({
72
+ documentItems: {
73
+ type: Array,
74
+ required: true,
75
+ },
76
+ loading: {
77
+ type: Boolean,
78
+ default: false,
79
+ },
80
+ otpLength: {
81
+ type: Number,
82
+ default: 6,
83
+ }
84
+ });
85
+ const emit = defineEmits(['getCode', 'getDigitalDocument', 'updateDigitalDocuments']);
86
+
87
+ const dataStore = useDataStore();
88
+ const documentType = ref<DigitalDocTypes | null>(null);
89
+ const otpCode = ref<string>('');
90
+
91
+ const emitGetCode = () => {
92
+ if (!documentType.value) {
93
+ dataStore.showToaster('error', 'Выберите тип документа', 3000);
94
+ return;
95
+ }
96
+
97
+ emit('getCode', documentType.value);
98
+ }
99
+
100
+ const emitGetDocument = () => {
101
+ if (!otpCode.value) {
102
+ dataStore.showToaster('error', 'Введите код подтверждения', 3000);
103
+ return;
104
+ }
105
+
106
+ emit('getDigitalDocument', otpCode.value);
107
+ }
108
+
109
+ const setDefaultValues = () => {
110
+ if(dataStore.isLifetrip) {
111
+ documentType.value = 'Passport';
112
+ }
113
+ }
114
+
115
+ onMounted(() => {
116
+ setDefaultValues()
117
+ })
118
+ </script>
119
+
120
+ <style scoped>
121
+ :deep(.v-otp-input__content) {
122
+ max-width: 360px;
123
+ gap: 12px!important;
124
+ }
125
+ .v-expansion-panel-title {
126
+ height: 60px!important;
127
+ }
128
+ .v-expansion-panel--active > .v-expansion-panel-title {
129
+ border-bottom-left-radius: inherit;
130
+ border-bottom-right-radius: inherit;
131
+ }
132
+ .document-type-select:deep(.v-field) {
133
+ height: 60px;
134
+ border: 1px solid #dadada!important;
135
+ }
136
+ .document-type-select:deep(.v-label.v-field-label--floating) {
137
+ top: 0;
138
+ }
139
+ </style>
@@ -573,8 +573,8 @@ export default defineComponent({
573
573
  return;
574
574
  }
575
575
  documentLoading.value = true;
576
- const response = await dataStore.getDigitalDocuments(currentIin.value, String(formStore.applicationData.processInstanceId), otpCode.value);
577
- if (response) {
576
+ const response = await dataStore.getDigitalDocuments(currentIin.value, otpCode.value, String(formStore.applicationData.processInstanceId));
577
+ if (response?.digitalDocuments?.responseCode === 'SUCCESS' && response?.parsingResponseContent) {
578
578
  await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
579
579
  getDigitalDocs();
580
580
  isDigitalDocOpen.value = false;
@@ -504,8 +504,8 @@
504
504
  v-model="member.documentIssuers"
505
505
  :value="member.documentIssuers?.nameRu"
506
506
  :label="$dataStore.t('form.documentIssuers')"
507
- :readonly="isDisabled || !!member.parsedDocument?.documentIssuer || isDataFromGov"
508
- :clearable="!isDisabled && !member.parsedDocument?.documentIssuer && !isDataFromGov"
507
+ :readonly="isDisabled || !!member.parsedDocument?.documentIssuer || (isDataFromGov && !documentIssuerIsEditable)"
508
+ :clearable="(!isDisabled && !member.parsedDocument?.documentIssuer && !isDataFromGov) || !!documentIssuerIsEditable"
509
509
  :rules="$rules.objectRequired"
510
510
  append-inner-icon="mdi mdi-chevron-right"
511
511
  @append="openPanel($dataStore.t('form.documentIssuers'), [], 'documentIssuers', $dataStore.getDocumentIssuers)"
@@ -693,24 +693,32 @@
693
693
  </Teleport>
694
694
  <Teleport v-if="isSearchOpen" to="#right-panel-actions">
695
695
  <div :class="[$styles.flexColNav]">
696
- <base-btn v-if="hasGBDFL" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromGBDFL')" @click="getContragentFromGBDFL" />
697
- <base-btn v-if="hasInsis" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromInsis')" @click="getContragent" />
698
- <base-btn v-if="hasGKB" :loading="isButtonLoading" :text="$dataStore.t('buttons.fromGKB')" @click="getFamilyInfo" />
699
- <base-btn v-if="isNonResident" :loading="isButtonLoading" :text="$dataStore.t('buttons.searchByFio')" @click="getContragent" />
700
- <base-form-section v-if="hasDocumentReader" class="!mt-0">
701
- <base-file-input
702
- :disabled="isDisabled"
703
- :clearable="!isDisabled"
704
- accept="image/*,.pdf"
705
- append="mdi-credit-card-scan-outline"
706
- :multiple="true"
707
- @onClear="imageDataList = []"
708
- @input="attachDocumentReader($event)"
709
- />
710
- </base-form-section>
711
- <base-animation>
712
- <base-btn v-if="hasDocumentReader && imageDataList && !!imageDataList.length" :loading="isButtonLoading" text="Получить данные" @click="getDocumentReader" />
713
- </base-animation>
696
+ <b class="d-block text-[14px] text-center">Получение персональных данных</b>
697
+ <b class="text-[12px]">Выберите тип:</b>
698
+ <div class="flex flex-col gap-[30px]">
699
+ <base-btn v-if="hasGBDFL" :loading="isButtonLoading" class="before-divider" :text="$dataStore.t('buttons.fromGBDFL')" @click="getContragentFromGBDFL" />
700
+ <base-btn v-if="hasInsis" :loading="isButtonLoading" class="before-divider" :text="$dataStore.t('buttons.fromInsis')" @click="getContragent" />
701
+ <div v-if="hasDigitalDocument" class="before-divider">
702
+ <small class="mb-1 d-block leading-tight">Внимание, выберите этот вариант если не приходит смс от 1414</small>
703
+ <base-btn :loading="isButtonLoading" :text="$dataStore.t('buttons.fromDD')" @click="startGettingDigitalDocument" />
704
+ </div>
705
+ <base-btn v-if="hasGKB" :loading="isButtonLoading" class="before-divider" :text="$dataStore.t('buttons.fromGKB')" @click="getFamilyInfo" />
706
+ <base-btn v-if="isNonResident" :loading="isButtonLoading" class="before-divider" :text="$dataStore.t('buttons.searchByFio')" @click="getContragent" />
707
+ <base-form-section v-if="hasDocumentReader" class="!mt-0 before-divider">
708
+ <base-file-input
709
+ :disabled="isDisabled"
710
+ :clearable="!isDisabled"
711
+ accept="image/*,.pdf"
712
+ append="mdi-credit-card-scan-outline"
713
+ :multiple="true"
714
+ @onClear="imageDataList = []"
715
+ @input="attachDocumentReader($event)"
716
+ />
717
+ </base-form-section>
718
+ <base-animation>
719
+ <base-btn v-if="hasDocumentReader && imageDataList && !!imageDataList.length" :loading="isButtonLoading" text="Получить данные" @click="getDocumentReader" />
720
+ </base-animation>
721
+ </div>
714
722
  </div>
715
723
  </Teleport>
716
724
  <Teleport v-if="isDocumentOpen" to="#right-panel-actions">
@@ -830,6 +838,24 @@
830
838
  @yes="discardAndContinue"
831
839
  @no="stayHere"
832
840
  />
841
+ <base-dialog
842
+ v-model="digitalDocumentDialog"
843
+ title="Получить цифровой документ"
844
+ subtitle="Выберите тип документа и введите код"
845
+ :icon="{ mdi: 'file-document', color: '#A0B3D8' }"
846
+ actions="digitalDocumentDialog"
847
+ :persistent="false"
848
+ >
849
+ <template #actions>
850
+ <base-digital-documents-dialog
851
+ :document-items="documentItems"
852
+ :loading="documentLoading"
853
+ @getCode="getCode"
854
+ @getDigitalDocument="getDigitalDocument"
855
+ @updateDigitalDocuments="updateDigitalDocuments"
856
+ />
857
+ </template>
858
+ </base-dialog>
833
859
  </section>
834
860
  <base-scroll-buttons @up="scrollForm('up')" @down="scrollForm('down')" />
835
861
  </template>
@@ -839,6 +865,7 @@ import { onBeforeRouteLeave } from 'vue-router';
839
865
  import { Value, DocumentItem, Member } from '../../composables/classes';
840
866
  import { uuid } from 'vue-uuid';
841
867
  import { StoreMembers, CoreEnums } from '../../types/enum';
868
+ import type { DigitalDocNames, DigitalDocTypes } from '../../types';
842
869
  import type { Api, ContragentType, Dicts, ESBDValidationType, FileActions, MultipleMember } from '../../types';
843
870
 
844
871
  export default {
@@ -911,6 +938,10 @@ export default {
911
938
  }
912
939
  return true;
913
940
  });
941
+ const documentIssuerIsEditable = computed(() => {
942
+ return documentIssuerNotFoundName.value;
943
+ });
944
+ const documentIssuerNotFoundName = ref<string>('');
914
945
  const familyDialog = ref<boolean>(false);
915
946
  const deletionDialog = ref<boolean>(false);
916
947
  const documentChooseDialog = ref<boolean>(false);
@@ -930,6 +961,12 @@ export default {
930
961
  const filteredRelationsData = ref<Value[]>(dataStore.relations);
931
962
  const currentPanelDeep = ref<string>();
932
963
  const currentPanelSubDeep = ref<string>();
964
+ const documentItems: Array<{ title: DigitalDocNames; value: DigitalDocTypes }> = [
965
+ { title: 'Удостоверение личности', value: 'IdentityCard' },
966
+ { title: 'Паспорт', value: 'Passport' },
967
+ { title: 'Вид на жительство иностранного гражданина', value: 'Vnzh' },
968
+ ];
969
+ const digitalDocumentDialog = ref<boolean>(false);
933
970
  const memberSetting = computed(() => dataStore.members[memberStore.getMemberApplicationCode(whichForm.value)!]);
934
971
  const hasOtp = computed(() => member.value.otpCode && member.value.otpCode.length === useMask().otp.length);
935
972
  const isDisabled = computed(() => !memberStore.isStatementEditible(whichForm.value));
@@ -1030,6 +1067,14 @@ export default {
1030
1067
  const hasDocumentReader = computed(() => {
1031
1068
  return !!member.value.hasAgreement && !!isTask.value && (dataStore.isAULETTI || dataStore.isAulettiParent);
1032
1069
  });
1070
+ const hasDigitalDocument = computed(() => {
1071
+ if (whichForm.value === formStore.beneficiaryFormKey && (dataStore.isBolashak || dataStore.isGons)) {
1072
+ return false;
1073
+ } else if (whichForm.value === formStore.insuredFormKey && dataStore.isLifetrip && member.value.isInsuredUnderage) {
1074
+ return false;
1075
+ }
1076
+ return true;
1077
+ })
1033
1078
  const hasMemberSearch = computed(() => showSaveButton.value && (hasGBDFL.value || hasGKB.value || hasInsis.value || hasDocumentReader.value));
1034
1079
  const hasMiddleName = computed(() => {
1035
1080
  if (dataStore.isLifetrip) {
@@ -1341,6 +1386,10 @@ export default {
1341
1386
  } else {
1342
1387
  // @ts-ignore
1343
1388
  member.value[currentPanel.value] = item.nameRu === null ? new Value() : item;
1389
+ if(currentPanel.value === 'documentIssuers' && documentIssuerIsEditable.value) {
1390
+ const id = Number(item.ids);
1391
+ dataStore.saveDocumentIssuer(documentIssuerNotFoundName.value, id);
1392
+ }
1344
1393
  }
1345
1394
  currentPanelDeep.value = '';
1346
1395
  currentPanelSubDeep.value = '';
@@ -2070,6 +2119,114 @@ export default {
2070
2119
  deletionDialog.value = false;
2071
2120
  };
2072
2121
 
2122
+ const startGettingDigitalDocument = () => {
2123
+ if (member.value.hasAgreement !== true) {
2124
+ dataStore.showToaster('error', dataStore.t('toaster.needAgreement'), 3000);
2125
+ dataStore.rightPanel.open = false;
2126
+ isSearchOpen.value = false;
2127
+ return;
2128
+ }
2129
+ if (!member.value.iin || member.value.iin.length !== useMask().iin.length || !member.value.phoneNumber || member.value.phoneNumber.length !== useMask().phone.length) {
2130
+ dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: 'Номер телефона, ИИН' }), 5000);
2131
+ dataStore.rightPanel.open = false;
2132
+ isSearchOpen.value = false;
2133
+ return;
2134
+ }
2135
+
2136
+ digitalDocumentDialog.value = true;
2137
+ }
2138
+
2139
+ const getCode = async (documentType: string) => {
2140
+ documentLoading.value = true;
2141
+ try {
2142
+ const response = await dataStore.getOnlineAccess(member.value.iin!, documentType);
2143
+ if (response) {
2144
+ dataStore.showToaster('success', dataStore.t('toaster.successOtp'), 3000);
2145
+ }
2146
+ } finally {
2147
+ documentLoading.value = false;
2148
+ }
2149
+ };
2150
+
2151
+ const getDigitalDocument = async (otpCode: string) => {
2152
+ documentLoading.value = true;
2153
+ try {
2154
+ const response = await dataStore.getDigitalDocuments(member.value.iin!, otpCode);
2155
+
2156
+ if (response?.parsingResponseContent) {
2157
+ const responseData = JSON.parse(response.parsingResponseContent);
2158
+
2159
+ if (
2160
+ member.value.iin &&
2161
+ responseData.iin &&
2162
+ reformatIin(responseData.iin) &&
2163
+ member.value.iin.length === useMask().iin.length &&
2164
+ reformatIin(responseData.iin).length === useMask().iin.length &&
2165
+ member.value.iin !== reformatIin(responseData.iin)
2166
+ ) {
2167
+ dataStore.showToaster('error', 'Не совпадают ИИН');
2168
+ documentLoading.value = false;
2169
+ return;
2170
+ }
2171
+
2172
+ if (responseData.iin) member.value.iin = reformatIin(responseData.iin);
2173
+ if (responseData.firstName) member.value.firstName = responseData.firstName;
2174
+ if (responseData.lastName) member.value.lastName = responseData.lastName;
2175
+ if (responseData.firstNameLatin && dataStore.isLifetrip) member.value.firstNameLat = responseData.firstNameLatin;
2176
+ if (responseData.lastNameLatin && dataStore.isLifetrip) member.value.lastNameLat = responseData.lastNameLatin;
2177
+ if (responseData.middleName) member.value.middleName = responseData.middleName;
2178
+ if (responseData.birthDate) member.value.birthDate = reformatDate(responseData.birthDate);
2179
+ if (responseData.sex) {
2180
+ const sex = responseData.sex.toUpperCase();
2181
+ const genderId = sex === 'M' ? 1 : 2;
2182
+ const gender = dataStore.gender.find(item => item.id === genderId);
2183
+ if (gender) member.value.gender = gender;
2184
+ }
2185
+ if (responseData.documentNumber) member.value.documentNumber = responseData.documentNumber;
2186
+ if (responseData.issueDate) member.value.documentDate = reformatDate(responseData.issueDate);
2187
+ if (responseData.expireDate) member.value.documentExpire = reformatDate(responseData.expireDate);
2188
+
2189
+ const documentIssuer = dataStore.documentIssuers.find(i => i.ids === responseData.givedById);
2190
+ if (documentIssuer) {
2191
+ member.value.documentIssuers = documentIssuer;
2192
+ } else {
2193
+ documentIssuerNotFoundName.value = responseData.givedBy;
2194
+ }
2195
+ }
2196
+
2197
+ if(response?.digitalDocuments?.responseCode === 'SUCCESS') {
2198
+ let fileTypeCode = '';
2199
+ switch (response.digitalDocuments.documentType.code) {
2200
+ case "IdentityCard":
2201
+ fileTypeCode = "1UDL";
2202
+ break;
2203
+ case "Passport":
2204
+ fileTypeCode = "PS";
2205
+ break;
2206
+ case "BirthCertificate":
2207
+ fileTypeCode = "SBI";
2208
+ break;
2209
+ case "Vnzh":
2210
+ fileTypeCode = "VNZ";
2211
+ break;
2212
+ default:
2213
+ fileTypeCode = "";
2214
+ break;
2215
+ }
2216
+ member.value.documentType = dataStore.documentTypes.find(item => item.ids === fileTypeCode) || new Value();
2217
+ }
2218
+ } finally {
2219
+ digitalDocumentDialog.value = false;
2220
+ dataStore.rightPanel.open = false;
2221
+ isSearchOpen.value = false;
2222
+ documentLoading.value = false;
2223
+ }
2224
+ };
2225
+
2226
+ const updateDigitalDocuments = () => {
2227
+ dataStore.updateDigitalDocumentsProfile(member.value.iin!)
2228
+ };
2229
+
2073
2230
  const onInit = async () => {
2074
2231
  // if (route.params.taskId === '0' || (route.params.taskId !== '0' && dataStore.isProcessEditable(formStore.applicationData.statusCode))) {
2075
2232
  // await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
@@ -2370,6 +2527,8 @@ export default {
2370
2527
  imageDataList,
2371
2528
  contragents,
2372
2529
  filteredRelationsData,
2530
+ documentItems,
2531
+ digitalDocumentDialog,
2373
2532
 
2374
2533
  // Computed
2375
2534
  whichForm,
@@ -2399,6 +2558,8 @@ export default {
2399
2558
  isNonResident,
2400
2559
  isDataFromGov,
2401
2560
  isChooseChild,
2561
+ documentIssuerIsEditable,
2562
+ hasDigitalDocument,
2402
2563
 
2403
2564
  // Rules
2404
2565
  ageRule,
@@ -2437,7 +2598,26 @@ export default {
2437
2598
  stayHere,
2438
2599
  discardAndContinue,
2439
2600
  getContragentClick,
2601
+ getCode,
2602
+ getDigitalDocument,
2603
+ startGettingDigitalDocument,
2604
+ updateDigitalDocuments,
2440
2605
  };
2441
2606
  },
2442
2607
  };
2443
2608
  </script>
2609
+
2610
+ <style scoped>
2611
+ .before-divider {
2612
+ position: relative;
2613
+ }
2614
+ .before-divider + .before-divider:before {
2615
+ content: '';
2616
+ position: absolute;
2617
+ top: -15px;
2618
+ left: 0;
2619
+ width: 100%;
2620
+ height: 1px;
2621
+ background-color: #e5e7eb;
2622
+ }
2623
+ </style>
@@ -1091,6 +1091,7 @@ export class DataStoreClass {
1091
1091
  documentIssuers: Value[];
1092
1092
  familyStatuses: Value[];
1093
1093
  disabilityGroups: Value[];
1094
+ ekkDisabilityGroups: Value[];
1094
1095
  relations: Value[];
1095
1096
  banks: Value[];
1096
1097
  transferContractCompanies: Value[];
@@ -1284,6 +1285,7 @@ export class DataStoreClass {
1284
1285
  this.documentIssuers = [];
1285
1286
  this.familyStatuses = [];
1286
1287
  this.disabilityGroups = [];
1288
+ this.ekkDisabilityGroups = [];
1287
1289
  this.relations = [];
1288
1290
  this.banks = [];
1289
1291
  this.transferContractCompanies = [];
@@ -916,6 +916,7 @@ export class RoleController {
916
916
  this.isHeadAdjuster() ||
917
917
  this.isArchivist() ||
918
918
  this.isSecurity() ||
919
+ this.isUnderwriter() ||
919
920
  this.isSanctioner1() ||
920
921
  this.isSanctioner2() ||
921
922
  this.isSanctioner3() ||
package/locales/ru.json CHANGED
@@ -33,10 +33,6 @@
33
33
  "403": "`Нет доступа на запрос: {text}",
34
34
  "404": "Отсутствует запрашиваемый ресурс",
35
35
  "exceedUploadLimitFile": "Размер файла превышает определенный лимит",
36
- "serverError": "Произошла ошибка на сервере. Попробуйте позже",
37
- "unknownError": "Произошла непредвиденная ошибка. Пожалуйста, перезагрузите страницу",
38
- "timeout": "Время ожидания истекло. Проверьте соединение и повторите попытку",
39
- "networkError": "Нет подключения к сети. Проверьте интернет и попробуйте снова"
40
36
  },
41
37
  "toaster": {
42
38
  "wrongFormatOf": "Некорректный формат \"{text}\"",
@@ -79,6 +75,10 @@
79
75
  "fillFormFieldError": "Нужно заполнить данные {text}",
80
76
  "fillOneFieldError": "Нужно заполнить одно из полей {text}",
81
77
  "notSavedMember": "Нужно сохранить актуальные данные {text}",
78
+ "serverError": "Произошла ошибка на сервере. Попробуйте позже",
79
+ "unknownError": "Произошла непредвиденная ошибка. Пожалуйста, перезагрузите страницу",
80
+ "timeout": "Время ожидания истекло. Проверьте соединение и повторите попытку",
81
+ "networkError": "Нет подключения к сети. Проверьте интернет и попробуйте снова",
82
82
  "copied": "Скопировано",
83
83
  "clientNotFound": "Контрагент с таким ИИН не обнаружен",
84
84
  "needCalculate": "Нужно рассчитать страховую премию",
@@ -161,7 +161,7 @@
161
161
  "notDigDoc": "Выданный документ не найден",
162
162
  "siblingRelationDoc": "Необходимо вложить документы, подтверждающие родственные связи между Страхователем и Выгодоприобретателем.\nВ случае, если степень родства Выгодоприобретателя выбрано:\n Полнородный брат/сестра или Неполнородный брат/сестра - Необходимо вложить 2 документа: Свидетельство о рождении Выгодоприобретателя и Свидетельство о рождении Страхователя",
163
163
  "grandchildRelationDoc": "Необходимо вложить документы, подтверждающие родственные связи между Страхователем и Выгодоприобретателем.\nВ случае, если степень родства Выгодоприобретателя выбрано:\n Внук/Внучка - Необходимо вложить 2 документа: Свидетельство о рождении Выгодоприобретателя и Свидетельство о рождении родителя (который является ребенком страхователя) Выгодоприобретателя",
164
- "missingDocuments": "Необходимо вложить документы доверенность представителя и сведения о представителе"
164
+ "missingDocuments": "Необходимо вложить документы доверенность представителя и сведения о представителе",
165
165
  },
166
166
  "notSignedContract": "Неподписанный Договор",
167
167
  "Contract": "Договор страхования",
@@ -215,6 +215,7 @@
215
215
  "fromInsis": "Информационная система INSIS",
216
216
  "fromGBDFL": "Государственная база данных физических лиц",
217
217
  "fromGKB": "Данные по ребенку Страхователя",
218
+ "fromDD": "Данные из цифрового документа",
218
219
  "sendSMS": "Отправить СМС",
219
220
  "sendOtp": "Отправить код подтверждения",
220
221
  "check": "Проверить",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.66",
3
+ "version": "0.0.10-beta.68",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -1499,6 +1499,9 @@ export const useDataStore = defineStore('data', {
1499
1499
  async getRelationTypes() {
1500
1500
  return await this.getFromApi('relations', 'getRelationTypes');
1501
1501
  },
1502
+ async getEkkDisabilityGroup() {
1503
+ return await this.getFromApi('ekkDisabilityGroups', 'getEkkDisabilityGroup');
1504
+ },
1502
1505
  async getBanks() {
1503
1506
  const makeCall = this.isLifeBusiness || this.isDas || this.isUU || this.isPension || this.isGns || this.isPrePension || this.isDSO || this.isCritical;
1504
1507
  if (makeCall) return await this.getFromApi('banks', 'getBanks');
@@ -1609,6 +1612,7 @@ export const useDataStore = defineStore('data', {
1609
1612
  this.getEconomicActivityType(),
1610
1613
  this.getAuthorityBasis(),
1611
1614
  this.getDisabilityGroups(),
1615
+ this.getEkkDisabilityGroup(),
1612
1616
  ]);
1613
1617
  },
1614
1618
  async getQuestionList(
@@ -2058,7 +2062,7 @@ export const useDataStore = defineStore('data', {
2058
2062
  this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar = this.getNumberWithSpaces(result.value / this.currencies.usd);
2059
2063
  }
2060
2064
  }
2061
- if(this.isKazyna) {
2065
+ if (this.isKazyna) {
2062
2066
  this.formStore.productConditionsForm.isCalculated = applicationData.policyAppDto.isCalculated;
2063
2067
  }
2064
2068
  if (this.formStore.productConditionsForm.insurancePremiumPerMonth != null) {
@@ -4217,15 +4221,14 @@ export const useDataStore = defineStore('data', {
4217
4221
  return null;
4218
4222
  }
4219
4223
  },
4220
- async getDigitalDocuments(iin: string, processInstanceId: string, code: string) {
4224
+ async getDigitalDocuments(iin: string, code: string, processInstanceId?: string) {
4221
4225
  try {
4222
4226
  const data = {
4223
4227
  iin: iin.replaceAll('-', ''),
4224
- processInstanceId: processInstanceId,
4228
+ ...(processInstanceId ? { processInstanceId } : {}),
4225
4229
  code: code.replace(/\s/g, ''),
4226
4230
  };
4227
- await this.api.externalServices.getDigitalDocuments(data);
4228
- return true;
4231
+ return await this.api.externalServices.getDigitalDocuments(data);
4229
4232
  } catch (err) {
4230
4233
  ErrorHandler(err);
4231
4234
  return null;
@@ -4358,6 +4361,14 @@ export const useDataStore = defineStore('data', {
4358
4361
  return ErrorHandler(err);
4359
4362
  }
4360
4363
  },
4364
+ async saveDocumentIssuer(name: string, insisId: number) {
4365
+ try {
4366
+ await this.api.saveDocumentIssuer(name, insisId);
4367
+ } catch (err) {
4368
+ ErrorHandler(err);
4369
+ return null;
4370
+ }
4371
+ },
4361
4372
  hasJobSection(whichForm: keyof typeof StoreMembers) {
4362
4373
  if (this.isLifetrip || this.isPension || this.isBalam || this.isBorrower || this.isTumar) return false;
4363
4374
  switch (whichForm) {
@@ -401,8 +401,8 @@ export const useMemberStore = defineStore('members', {
401
401
  this.dataStore.showToaster('error', this.dataStore.t('toaster.phoneNotFoundInBMG'), 3000);
402
402
  return { otpStatus };
403
403
  }
404
- if ('status' in err.response.data && !!err.response.data.status) {
405
- this.dataStore.showToaster('error', err.response.data.status, 3000);
404
+ if ('status' in err.response.data && !!err.response.data.status && err.response.data.status === 500) {
405
+ this.dataStore.showToaster('error', this.dataStore.t('toaster.serverError'), 3000);
406
406
  return { otpStatus };
407
407
  }
408
408
  }
package/types/index.ts CHANGED
@@ -984,3 +984,7 @@ export namespace Api {
984
984
  export namespace Dicts {
985
985
  export type WorkPosition = { workPositionClassCode: string; workPositionCode: string; workPositionName: string };
986
986
  }
987
+
988
+ export type DigitalDocNames = 'Удостоверение личности' | 'Паспорт' | 'Вид на жительство иностранного гражданина' |'Свидетельство о рождении';
989
+
990
+ export type DigitalDocTypes = 'IdentityCard' | 'Passport' | 'Vnzh' | 'BirthCertificate';