hl-core 0.0.10-beta.44 → 0.0.10-beta.45

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
@@ -488,6 +488,13 @@ export class ApiClass {
488
488
  url: `/${this.productUrl}/api/Application/IsRecalculate?processInstanceId=${id}`,
489
489
  });
490
490
  }
491
+ async checkCurrencyDate(id: string | number) {
492
+ return await this.axiosCall<boolean>({
493
+ method: Methods.GET,
494
+ url: '/Arm/api/Bpm/CheckCurrencyDate',
495
+ params: { processInstanceId: id },
496
+ });
497
+ }
491
498
  async setMember(whichMember: keyof typeof MemberCodes, data: any) {
492
499
  return await this.axiosCall({
493
500
  method: Methods.POST,
@@ -1151,7 +1158,7 @@ export class ApiClass {
1151
1158
  data: data,
1152
1159
  });
1153
1160
  },
1154
- generalGetFile: async (groupId: string, documentSignType: number) => {
1161
+ generalGetDoc: async (groupId: string, documentSignType: number) => {
1155
1162
  return await this.axiosCall<any>({
1156
1163
  method: Methods.GET,
1157
1164
  url: `${this.file.base}/api/GeneralSign/Group/${groupId}/${documentSignType} `,
@@ -1203,7 +1210,7 @@ export class ApiClass {
1203
1210
  data: data,
1204
1211
  });
1205
1212
  },
1206
- getFile: async (id: string) => {
1213
+ getDoc: async (id: string) => {
1207
1214
  return await this.axiosCall({
1208
1215
  method: Methods.GET,
1209
1216
  url: `${this.file.base}/api/Data/DownloadFile/${id}`,
@@ -1213,7 +1220,7 @@ export class ApiClass {
1213
1220
  },
1214
1221
  });
1215
1222
  },
1216
- getFileNew: async (id: string) => {
1223
+ getDocNew: async (id: string) => {
1217
1224
  return await this.axiosCall({
1218
1225
  method: Methods.GET,
1219
1226
  url: `${this.file.base}/api/GeneralSign/DownloadFile/${id}`,
@@ -28,6 +28,17 @@
28
28
  :rules="$rules.required"
29
29
  />
30
30
  </section>
31
+ <section
32
+ v-if="surveyType === 'critical' && ($dataStore.isBaiterek || $dataStore.isBolashak || $dataStore.isLiferenta)"
33
+ :class="[$styles.blueBgLight, $styles.rounded]"
34
+ class="mx-[10px] p-4 flex flex-col gap-4"
35
+ >
36
+ <base-form-text-section>
37
+ <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
38
+ 1. Келесі аурулармен бұрын ауырдыңыз ба немесе қазіргі кезде ауырып жүрсіз бе?/Болели ли Вы когда-нибудь или болеете в настоящий момент следующими заболеваниями?
39
+ </span>
40
+ </base-form-text-section>
41
+ </section>
31
42
  <section
32
43
  v-if="firstQuestions.filter(i => i.first.definedAnswers === 'Y').length"
33
44
  :class="[$styles.blueBgLight, $styles.rounded]"
@@ -40,7 +51,7 @@
40
51
  >
41
52
  <base-animation>
42
53
  <div
43
- v-if="question.first.answerName === 'Да' && question.second"
54
+ v-if="question.first.answerName?.includes('Да') && question.second"
44
55
  :class="[$styles.greenBg, $styles.whiteText, $styles.textSimple]"
45
56
  class="rounded-t-lg pl-6 py-1 cursor-pointer"
46
57
  @click="openFirstPanel(question)"
@@ -52,7 +63,7 @@
52
63
  {{ question.first.name }}
53
64
  <base-animation>
54
65
  <i
55
- v-if="question.first.answerName === 'Да' && question.second && question.second.length"
66
+ v-if="question.first.answerName?.includes('Да') && question.second && question.second.length"
56
67
  class="mdi mdi-chevron-right text-2xl cursor-pointer"
57
68
  @click="openFirstPanel(question)"
58
69
  ></i>
@@ -68,8 +79,8 @@
68
79
  :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
69
80
  inline
70
81
  >
71
- <v-radio label="Да" value="Да" />
72
- <v-radio label="Нет" value="Нет" />
82
+ <v-radio label="Иә/Да" value="Иә/Да" :value-comparator="(a: any, b: any) => String(a).includes('Да')" />
83
+ <v-radio label="Жоқ/Нет" value="Жоқ/Нет" :value-comparator="(a: any, b: any) => String(a).includes('Нет')" />
73
84
  </v-radio-group>
74
85
  </div>
75
86
  </base-form-text-section>
@@ -84,7 +95,26 @@
84
95
  :key="index"
85
96
  :class="[currentQuestion?.first.id === question.first.id && $dataStore.rightPanel.open ? $styles.greenBorder : '']"
86
97
  >
87
- <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between"> {{ question.first.name }} </span>
98
+ <base-animation>
99
+ <div
100
+ v-if="question.first.answerName?.includes('Да') && question.second"
101
+ :class="[$styles.greenBg, $styles.whiteText, $styles.textSimple]"
102
+ class="rounded-t-lg pl-6 py-1 cursor-pointer"
103
+ @click="openFirstPanel(question)"
104
+ >
105
+ {{ $dataStore.t('questionnaireType.pleaseAnswer', { text: question.second.length }) }}
106
+ </div>
107
+ </base-animation>
108
+ <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
109
+ {{ question.first.name }}
110
+ <base-animation>
111
+ <i
112
+ v-if="question.first.answerName?.includes('Да') && question.second && question.second.length"
113
+ class="mdi mdi-chevron-right text-2xl cursor-pointer"
114
+ @click="openFirstPanel(question)"
115
+ ></i>
116
+ </base-animation>
117
+ </span>
88
118
  <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
89
119
  <v-radio-group
90
120
  v-model="question.first.answerName"
@@ -95,12 +125,12 @@
95
125
  :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
96
126
  inline
97
127
  >
98
- <v-radio label="Да" value="Да" />
99
- <v-radio label="Нет" value="Нет" />
128
+ <v-radio label="Иә/Да" value="Иә/Да" :value-comparator="(a: any, b: any) => String(a).includes('Да')" />
129
+ <v-radio label="Жоқ/Нет" value="Жоқ/Нет" :value-comparator="(a: any, b: any) => String(a).includes('Нет')" />
100
130
  </v-radio-group>
101
131
  </div>
102
132
  <base-animation>
103
- <div v-if="question.first.answerName === 'Да'" :class="[$styles.whiteText, $styles.textSimple]">
133
+ <div v-if="question.first.answerName?.includes('Да')" :class="[$styles.whiteText, $styles.textSimple]">
104
134
  <base-form-input
105
135
  v-model="question.first.answerText"
106
136
  :label="$dataStore.t('labels.inDetails')"
@@ -252,11 +282,11 @@ export default defineComponent({
252
282
  const answerToAll = ref<boolean>(false);
253
283
  const firstPanel = ref<boolean>(false);
254
284
  const secondPanel = ref<boolean>(false);
255
- const filterType = ref<'Да' | 'Нет' | null>(null);
285
+ const filterType = ref<'Иә/Да' | 'Жоқ/Нет' | null>(null);
256
286
  const filterItems = [
257
287
  { title: 'Все', value: null },
258
- { title: 'Только «Да»', value: 'Да' },
259
- { title: 'Только «Нет»', value: 'Нет' },
288
+ { title: 'Только «Да»', value: 'Иә/Да' },
289
+ { title: 'Только «Нет»', value: 'Жоқ/Нет' },
260
290
  ];
261
291
  const surveyType = ref<'health' | 'critical'>('tab' in route.query && route.query.tab === 'criticalBase' ? 'critical' : 'health');
262
292
  const whichSurvey = computed(() =>
@@ -277,7 +307,9 @@ export default defineComponent({
277
307
 
278
308
  const whichMember = computed(() => ('member' in route.query && !!route.query.member ? (route.query.member as 'insured' | 'policyholder') : 'insured'));
279
309
  const isSecondRequired = computed(() => dataStore.controls.isSecondAnketaRequired);
280
- const firstQuestions = computed(() => (filterType.value !== null ? firstQuestionList.value.filter(i => i.first.answerName === filterType.value) : firstQuestionList.value));
310
+ const firstQuestions = computed(() =>
311
+ filterType.value !== null ? firstQuestionList.value.filter(i => i.first.answerName?.includes(filterType.value === 'Иә/Да' ? 'Да' : 'Нет')) : firstQuestionList.value,
312
+ );
281
313
  const scrollForm = (direction: 'up' | 'down') => {
282
314
  const scrollObject = { top: direction === 'up' ? 0 : screen.height * 10, behavior: 'smooth' };
283
315
  if (firstPanel.value) {
@@ -423,12 +455,12 @@ export default defineComponent({
423
455
  if (answerToAll.value) {
424
456
  firstQuestionList.value.forEach((question: AnketaBody, index: number) => {
425
457
  if (question.first.answerType === 'T' || question.first.answerType === 'D') {
426
- firstQuestionList.value![index].first.answerName = 'Нет' as AnswerName;
458
+ firstQuestionList.value![index].first.answerName = 'Жоқ/Нет' as AnswerName;
427
459
  }
428
460
  });
429
461
  for (const question of firstQuestionList.value) {
430
462
  const index = firstQuestionList.value.indexOf(question);
431
- await getDefinedAnswerId(question.first.id, 'Нет', index);
463
+ await getDefinedAnswerId(question.first.id, 'Жоқ/Нет', index);
432
464
  }
433
465
  } else {
434
466
  firstQuestionList.value.forEach((question: AnketaBody, index: number) => {
@@ -454,7 +486,7 @@ export default defineComponent({
454
486
  );
455
487
  firstQuestionList.value = formStore[whichSurvey.value]!.body;
456
488
  formStore[whichSurvey.value]!.type = surveyType.value;
457
- const negativeAnswer = firstQuestionList.value.every(i => i.first.answerName === 'Нет');
489
+ const negativeAnswer = firstQuestionList.value.every(i => i.first.answerName?.includes('Нет'));
458
490
  if (negativeAnswer) {
459
491
  answerToAll.value = true;
460
492
  }
@@ -488,7 +520,7 @@ export default defineComponent({
488
520
  () => firstQuestionList.value,
489
521
  value => {
490
522
  if (value) {
491
- const hasPositiveAnswer = value.some(i => (i.first.definedAnswers === 'Y' || i.first.definedAnswers === 'D') && i.first.answerName !== 'Нет');
523
+ const hasPositiveAnswer = value.some(i => (i.first.definedAnswers === 'Y' || i.first.definedAnswers === 'D') && !i.first.answerName?.includes('Нет'));
492
524
  answerToAll.value = !hasPositiveAnswer;
493
525
  }
494
526
  },
@@ -510,6 +542,7 @@ export default defineComponent({
510
542
  firstPanel,
511
543
  filterType,
512
544
  filterItems,
545
+ surveyType,
513
546
  secondPanel,
514
547
  currentQuestion,
515
548
  currentSecond,
@@ -199,10 +199,10 @@
199
199
  :disabled="documentLoading"
200
200
  :loading="documentLoading"
201
201
  text="Открыть"
202
- @click="getFile('view')"
202
+ @click="getDoc('view')"
203
203
  />
204
204
  </base-animation>
205
- <base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
205
+ <base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getDoc('download')" />
206
206
  <base-animation>
207
207
  <base-btn v-if="canDeleteFiles" :disabled="documentLoading" :loading="documentLoading" text="Удалить" @click="deletionDialog = true" />
208
208
  </base-animation>
@@ -478,11 +478,11 @@ export default defineComponent({
478
478
  },
479
479
  );
480
480
 
481
- const getFile = async (type: FileActions) => {
481
+ const getDoc = async (type: FileActions) => {
482
482
  if (currentDocument.value) {
483
483
  documentLoading.value = true;
484
484
  const fileExtension = currentDocument.value.fileName!.match(/\.([0-9a-z]+)(?:[\?#]|$)/i)![1];
485
- await dataStore.getFile(currentDocument.value, type, fileExtension);
485
+ await dataStore.getDoc(currentDocument.value, type, fileExtension);
486
486
  documentLoading.value = false;
487
487
  }
488
488
  };
@@ -672,7 +672,7 @@ export default defineComponent({
672
672
 
673
673
  // Functions
674
674
  getCode,
675
- getFile,
675
+ getDoc,
676
676
  openPanel,
677
677
  deleteFile,
678
678
  getDigitalDocument,
@@ -702,8 +702,8 @@
702
702
  </Teleport>
703
703
  <Teleport v-if="isDocumentOpen" to="#right-panel-actions">
704
704
  <div :class="[$styles.flexColNav]">
705
- <base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
706
- <base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
705
+ <base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getDoc('view')" />
706
+ <base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getDoc('download')" />
707
707
  </div>
708
708
  </Teleport>
709
709
  <Teleport v-if="isOtpPanelOpen && !member.hasAgreement" to="#right-panel-actions">
@@ -1414,11 +1414,11 @@ export default {
1414
1414
  }
1415
1415
  };
1416
1416
 
1417
- const getFile = async (type: FileActions) => {
1417
+ const getDoc = async (type: FileActions) => {
1418
1418
  if (memberDocument.value) {
1419
1419
  documentLoading.value = true;
1420
1420
  const fileExtension = memberDocument.value.fileName!.match(/\.([0-9a-z]+)(?:[\?#]|$)/i)![1];
1421
- await dataStore.getFile(memberDocument.value, type, fileExtension);
1421
+ await dataStore.getDoc(memberDocument.value, type, fileExtension);
1422
1422
  documentLoading.value = false;
1423
1423
  }
1424
1424
  };
@@ -1977,7 +1977,7 @@ export default {
1977
1977
  member.value.documentDate = reformatDate(userDocument.issueDate);
1978
1978
  member.value.documentExpire = reformatDate(userDocument.expireDate);
1979
1979
  }
1980
- // const filteredDocuments: DocumentItem[] = dataStore.getFilesByIIN(member.value.iin!.replace(/-/g, '')) as DocumentItem[];
1980
+ // const filteredDocuments: DocumentItem[] = dataStore.getDocsByIIN(member.value.iin!.replace(/-/g, '')) as DocumentItem[];
1981
1981
  // if (filteredDocuments && filteredDocuments.length) memberDocument.value = filteredDocuments[0];
1982
1982
  }
1983
1983
  await setDefaultValues();
@@ -2223,7 +2223,7 @@ export default {
2223
2223
  attachFile,
2224
2224
  attachDocumentReader,
2225
2225
  getDocumentReader,
2226
- getFile,
2226
+ getDoc,
2227
2227
  selectFamilyMember,
2228
2228
  closeFamilyDialog,
2229
2229
  openDeletionDialog,
@@ -2158,7 +2158,11 @@ export default defineComponent({
2158
2158
  dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
2159
2159
  await dataStore.getProcessPaymentPeriod();
2160
2160
  }
2161
- if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
2161
+ if (
2162
+ formStore.productConditionsForm.requestedSumInsured === null &&
2163
+ formStore.productConditionsForm.insurancePremiumPerMonth === null &&
2164
+ (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons')
2165
+ ) {
2162
2166
  await dataStore.getCurrencies();
2163
2167
  }
2164
2168
  if (whichProduct.value === 'halykkazyna') {
@@ -23,8 +23,8 @@
23
23
  >
24
24
  </base-content-block>
25
25
  <div class="flex flex-col gap-3" v-if="hasConditionsAction">
26
- <base-btn :text="$dataStore.t('confirm.yes')" :loading="loading" @click="handleTask" />
27
- <base-btn :btn="$styles.blueLightBtn" :loading="loading" :text="$dataStore.t('confirm.no')" @click="closePanel" />
26
+ <base-btn :text="$dataStore.t('confirm.yes')" :loading="$dataStore.isButtonsLoading" @click="handleTask" />
27
+ <base-btn :btn="$styles.blueLightBtn" :loading="$dataStore.isButtonsLoading" :text="$dataStore.t('confirm.no')" @click="closePanel" />
28
28
  </div>
29
29
  </div>
30
30
  </section>
@@ -41,7 +41,7 @@
41
41
  <div v-if="isScansDocuments" :class="[$styles.flexColNav]">
42
42
  <div v-if="isNewSign">
43
43
  <div class="flex flex-col gap-2">
44
- <base-btn v-for="file in signingFiles" :text="`Скачать ${file.fileName}`" :loading="$dataStore.isButtonsLoading" @click="getFileNew(file)" />
44
+ <base-btn v-for="file in signingFiles" :text="`Скачать ${file.fileName}`" :loading="$dataStore.isButtonsLoading" @click="getDocNew(file)" />
45
45
  <base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
46
46
  <base-file-input v-for="file in signingFiles" :label="`Вложить ${file.fileName}`" @input.prevent="onFileChangeScansNew($event, file)" @onClear="onClearFileNew(file)" />
47
47
  </base-form-section>
@@ -346,9 +346,9 @@ export default defineComponent({
346
346
  }
347
347
  };
348
348
 
349
- const getFileNew = async (file: any) => {
349
+ const getDocNew = async (file: any) => {
350
350
  const newFile = signOptions.value?.signIds.find((i: any) => i.fileType == file.fileType);
351
- if (newFile) await dataStore.getFileNew(newFile.id, 2, false, file.fileName);
351
+ if (newFile) await dataStore.getDocNew(newFile.id, 2, false, file.fileName);
352
352
  };
353
353
 
354
354
  const onFileChangeScansNew = async (event: InputEvent, file: any) => {
@@ -1013,7 +1013,7 @@ export default defineComponent({
1013
1013
  newSign,
1014
1014
  onFileChangeScansNew,
1015
1015
  onClearFileNew,
1016
- getFileNew,
1016
+ getDocNew,
1017
1017
  inSigningOrder,
1018
1018
  isNewSign,
1019
1019
  hasEpayPay,
@@ -327,10 +327,9 @@ class Person {
327
327
  getAgeByBirthDate() {
328
328
  const date = this.formatDate(this.birthDate);
329
329
  if (date) {
330
- const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
331
- if (new Date(date) < new Date(Date.now()) && age >= 0) {
332
- return age.toString();
333
- }
330
+ const birthDate = new Date(date);
331
+ const today = new Date();
332
+ return String(today.getFullYear() - birthDate.getFullYear() - (today < new Date(today.getFullYear(), birthDate.getMonth(), birthDate.getDate()) ? 1 : 0));
334
333
  } else {
335
334
  return null;
336
335
  }
package/locales/ru.json CHANGED
@@ -134,6 +134,7 @@
134
134
  "successfullyDocSent": "Отправка документа прошла успешно",
135
135
  "templateDownloaded": "Шаблон скачан",
136
136
  "templateSentToEmail": "Шаблона отправлен на почту",
137
+ "fileOnlyBelow3mb": "Максимальный размер документа для загрузки - 3 МБ.",
137
138
  "fileOnlyBelow5mb": "Максимальный размер документа для загрузки - 5 МБ.",
138
139
  "fileOnlyBelow10mb": "Максимальный размер документа для загрузки - 10 МБ.",
139
140
  "fileOnlyBelow20mb": "Максимальный размер документа для загрузки - 20 МБ.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.44",
3
+ "version": "0.0.10-beta.45",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -145,7 +145,7 @@ export const useDataStore = defineStore('data', {
145
145
  if (showError) this.showToaster('error', this.t('toaster.noUrl'));
146
146
  }
147
147
  },
148
- getFilesByIIN(iin: string) {
148
+ getDocsByIIN(iin: string) {
149
149
  return iin ? this.formStore.signedDocumentList.filter(file => file.iin === iin && file.fileTypeName === 'Удостоверение личности') : null;
150
150
  },
151
151
  async getNewAccessToken() {
@@ -279,12 +279,12 @@ export const useDataStore = defineStore('data', {
279
279
  await this.router.replace({ name: route.name });
280
280
  }
281
281
  },
282
- async getFile(file: DocumentItem, mode: string = 'view', fileType: string = 'pdf') {
282
+ async getDoc(file: DocumentItem, mode: string = 'view', fileType: string = 'pdf') {
283
283
  if (!file.id) return;
284
284
  try {
285
285
  this.isLoading = true;
286
286
  if (this.isPension) {
287
- await this.api.file.getFileNew(file.id).then((response: any) => {
287
+ await this.api.file.getDocNew(file.id).then((response: any) => {
288
288
  if (!['pdf', 'docx'].includes(fileType)) {
289
289
  const blob = new Blob([response], { type: `image/${fileType}` });
290
290
  const url = window.URL.createObjectURL(blob);
@@ -318,7 +318,7 @@ export const useDataStore = defineStore('data', {
318
318
  }
319
319
  });
320
320
  } else {
321
- await this.api.file.getFile(file.id).then((response: any) => {
321
+ await this.api.file.getDoc(file.id).then((response: any) => {
322
322
  if (!['pdf', 'docx'].includes(fileType)) {
323
323
  const blob = new Blob([response], { type: `image/${fileType}` });
324
324
  const url = window.URL.createObjectURL(blob);
@@ -358,10 +358,12 @@ export const useDataStore = defineStore('data', {
358
358
  this.isLoading = false;
359
359
  }
360
360
  },
361
- async deleteFile(data: DocumentItem) {
361
+ async deleteFile(data: DocumentItem, showToaster: boolean = true) {
362
362
  try {
363
363
  await this.api.file.deleteFile(data);
364
- this.showToaster('success', this.t('toaster.fileWasDeleted'), 3000);
364
+ if (showToaster) {
365
+ this.showToaster('success', this.t('toaster.fileWasDeleted'), 3000);
366
+ }
365
367
  } catch (err) {
366
368
  ErrorHandler(err);
367
369
  }
@@ -1616,16 +1618,19 @@ export const useDataStore = defineStore('data', {
1616
1618
  if (secondaryQuestions.status === 'fulfilled') {
1617
1619
  const baseAnketa = this.formStore[baseField];
1618
1620
  if (baseAnketa && baseAnketa.body && baseAnketa.body.length) {
1619
- baseAnketa.body.forEach(i => {
1620
- if (i.first.definedAnswers === 'Y' && i.second === null && secondaryQuestions.value) {
1621
- i.second = structuredClone(secondaryQuestions.value);
1621
+ const isSpecialSurvey = this.isBaiterek || this.isBolashak || this.isLiferenta;
1622
+ for (const i of baseAnketa.body) {
1623
+ if (i.second === null && secondaryQuestions.value) {
1624
+ i.second = isSpecialSurvey
1625
+ ? await this.api.getQuestionListSecondById(`${surveyType}second`, processInstanceId, insuredId, i.first.id)
1626
+ : structuredClone(secondaryQuestions.value);
1622
1627
  }
1623
1628
  if (i.first.definedAnswers === 'Y' && i.second && i.second.length) {
1624
1629
  i.second.forEach(second => {
1625
1630
  if (second.answerType === 'D') second.answerText = reformatDate(String(second.answerText));
1626
1631
  });
1627
1632
  }
1628
- });
1633
+ }
1629
1634
  }
1630
1635
  }
1631
1636
  } catch (err) {
@@ -2468,6 +2473,9 @@ export const useDataStore = defineStore('data', {
2468
2473
  this.formStore.applicationData.processCode === constants.products.halykkazynaap
2469
2474
  ? this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.premiumInCurrency)
2470
2475
  : this.getNumberWithSpaces(applicationData.policyAppDto.premiumInCurrency);
2476
+ if (applicationData.policyAppDto.currency === 'USD' && applicationData.policyAppDto.amount !== null && applicationData.policyAppDto.premium !== null) {
2477
+ this.currencies.usd = applicationData.policyAppDto.currencyExchangeRate;
2478
+ }
2471
2479
  }
2472
2480
  const riskGroup = this.riskGroup.find(item => {
2473
2481
  if (applicationData.policyAppDto.riskGroup == 0) {
@@ -2800,7 +2808,7 @@ export const useDataStore = defineStore('data', {
2800
2808
  await ncaLayerClient.connect();
2801
2809
  const activeTokens = await ncaLayerClient.getActiveTokens();
2802
2810
  const storageType = activeTokens[0] || NCALayerClient.fileStorageType;
2803
- const document = await this.getFileNew(groupId, signType, isXml);
2811
+ const document = await this.getDocNew(groupId, signType, isXml);
2804
2812
  if (isXml) {
2805
2813
  const signedAgreement = await ncaLayerClient.signXml(storageType, document, 'SIGNATURE', '');
2806
2814
  const data = new FormData();
@@ -2819,9 +2827,9 @@ export const useDataStore = defineStore('data', {
2819
2827
  return err.name === 'NCALayerError' ? null : ErrorHandler(err);
2820
2828
  }
2821
2829
  },
2822
- async getFileNew(groupId: string, documentSignType: number, xml: boolean, fileName?: string) {
2830
+ async getDocNew(groupId: string, documentSignType: number, xml: boolean, fileName?: string) {
2823
2831
  try {
2824
- let response: any = await this.api.file.generalGetFile(groupId, xml ? 5 : documentSignType);
2832
+ let response: any = await this.api.file.generalGetDoc(groupId, xml ? 5 : documentSignType);
2825
2833
  let blob;
2826
2834
  if (response.hasOwnProperty('data')) {
2827
2835
  const document = JSON.parse(response.data).Document;
package/types/index.ts CHANGED
@@ -139,8 +139,8 @@ export type EachAnketa = {
139
139
  };
140
140
 
141
141
  export enum AnswerName {
142
- Нет = 'Нет',
143
- Да = 'Да',
142
+ 'Жоқ/Нет' = 'Жоқ/Нет',
143
+ 'Иә/Да' = 'Иә/Да',
144
144
  }
145
145
 
146
146
  export enum AnswerType {