hl-core 0.0.9-beta.52 → 0.0.9-beta.53

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.
@@ -1,5 +1,11 @@
1
1
  <template>
2
2
  <section :class="[$styles.scrollPage]">
3
+ <base-form-section v-if="isUnderwriterDocuments" title="Загрузить документы для Андеррайтинга" class="mx-[10px] mt-[14px]">
4
+ <base-file-input :readonly="isDisabled || documentLoading" @input.prevent="onUnderFiles($event)" @onClear="onClearUnderFiles()" />
5
+ <base-animation>
6
+ <base-btn v-if="underDocumentsList && underDocumentsList.length" :loading="documentLoading" text="Загрузить" size="sm" class="mt-3" @click="uploadUnderFiles" />
7
+ </base-animation>
8
+ </base-form-section>
3
9
  <section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
4
10
  <base-content-block
5
11
  v-if="$dataStore.isInitiator() && !$dataStore.isPension && $dataStore.controls.hasChooseSign && formStore.applicationData.statusCode === 'ContractSignedFrom'"
@@ -25,10 +31,7 @@
25
31
  </div>
26
32
  </base-content-block>
27
33
  </section>
28
- <div
29
- v-if="(!formStore.signedDocumentList || !formStore.signedDocumentList.length)"
30
- class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6"
31
- >
34
+ <div v-if="!formStore.signedDocumentList || !formStore.signedDocumentList.length" class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6">
32
35
  <svg xmlns="http://www.w3.org/2000/svg" width="125" height="131" viewBox="0 0 125 131" fill="none" class="cursor-help">
33
36
  <path
34
37
  fill-rule="evenodd"
@@ -52,26 +55,26 @@
52
55
  <base-content-block :class="[$styles.textSimple]">
53
56
  <h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.statements') }}</h5>
54
57
  <div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
55
- <span class="ml-2">Заявления на {{ processCode == 1 ? 'страхование' : 'возврат' }}</span>
58
+ <span class="ml-2">Заявления на {{ processCode == 19 ? 'страхование' : 'возврат' }}</span>
56
59
  <i
57
60
  class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
58
61
  :class="[$styles.greenTextHover]"
59
- @click="$dataStore.generatePDFDocument(processCode == 1 ? 'PA_Statement' : 'PA_RefundStatement', '37')"
62
+ @click="$dataStore.generatePDFDocument(processCode == 19 ? 'PA_Statement' : 'PA_RefundStatement', '37')"
60
63
  ></i>
61
64
  </div>
62
65
  </base-content-block>
63
66
  <base-content-block :class="[$styles.textSimple]">
64
67
  <h5 class="text-center font-medium mb-4">{{ $dataStore.t('labels.contract') }}</h5>
65
68
  <div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
66
- <span class="ml-2">Договор {{ processCode == 1 ? 'страхования' : 'возврата' }}</span>
69
+ <span class="ml-2">Договор {{ processCode == 19 ? 'страхования' : 'возврата' }}</span>
67
70
  <i
68
71
  class="transition-all cursor-pointer mdi mdi-paperclip pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
69
72
  :class="[$styles.greenTextHover]"
70
- @click="$dataStore.generatePDFDocument(processCode == 1 ? 'PA_Contract' : 'PA_RefundAgreement', '38')"
73
+ @click="$dataStore.generatePDFDocument(processCode == 19 ? 'PA_Contract' : 'PA_RefundAgreement', '38')"
71
74
  ></i>
72
75
  </div>
73
76
  </base-content-block>
74
- <base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode !== 'StartForm' && processCode == 1">
77
+ <base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode !== 'StartForm' && processCode == 19">
75
78
  <h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.complianceFinMonitoring') }}</h5>
76
79
  <div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
77
80
  <span class="ml-2">{{ $dataStore.t('pension.complianceFinMonitoring') }}</span>
@@ -82,7 +85,7 @@
82
85
  ></i>
83
86
  </div>
84
87
  </base-content-block>
85
- <base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode === 'PreparationDossierForm' && processCode == 1">
88
+ <base-content-block :class="[$styles.textSimple]" v-if="formStore.applicationData.statusCode === 'PreparationDossierForm' && processCode == 19">
86
89
  <h5 class="text-center font-medium mb-4">{{ $dataStore.t('pension.dossierPA') }}</h5>
87
90
  <div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
88
91
  <span class="ml-2">{{ $dataStore.t('pension.dossierPA') }}</span>
@@ -99,13 +102,9 @@
99
102
  <div :class="[$styles.flexColNav]">
100
103
  <base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
101
104
  <base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
102
- <base-btn
103
- v-if="$dataStore.isPension && $dataStore.isProcessEditable(formStore.applicationData.statusCode)"
104
- :disabled="documentLoading"
105
- :loading="documentLoading"
106
- text="Удалить"
107
- @click="deletionDialog = true"
108
- />
105
+ <base-animation>
106
+ <base-btn v-if="canDeleteFiles" :disabled="documentLoading" :loading="documentLoading" text="Удалить" @click="deletionDialog = true" />
107
+ </base-animation>
109
108
  </div>
110
109
  </base-fade-transition>
111
110
  </Teleport>
@@ -123,6 +122,7 @@
123
122
 
124
123
  <script lang="ts">
125
124
  import { DocumentItem } from '../../composables/classes';
125
+ import { uuid } from 'vue-uuid';
126
126
 
127
127
  export default defineComponent({
128
128
  setup() {
@@ -149,6 +149,18 @@ export default defineComponent({
149
149
  action: '',
150
150
  text: '',
151
151
  });
152
+ const underDocumentsList = ref<
153
+ {
154
+ file: File;
155
+ fileName: string;
156
+ identifier: string;
157
+ fileTypeId: string;
158
+ fileTypeCode: string;
159
+ fileTypeName: string;
160
+ processInstanceId: string;
161
+ }[]
162
+ >([]);
163
+
152
164
  const object_list = computed(() => Object.values(formStore.signedDocumentList));
153
165
  const unSignedList = computed(() => document_list.value.filter((doc: DocumentItem) => doc.signed === false || doc.signed === null));
154
166
  const document_list = computed(() =>
@@ -161,6 +173,21 @@ export default defineComponent({
161
173
  const showContract = computed(
162
174
  () => formStore.applicationData && (formStore.applicationData.statusCode === 'Completed' || formStore.applicationData.statusCode === 'PreparationDossierForm'),
163
175
  );
176
+ const isUnderwriterDocuments = computed(
177
+ () =>
178
+ (dataStore.isAULETTI || dataStore.isAulettiParent) &&
179
+ dataStore.isInitiator() &&
180
+ formStore.applicationData &&
181
+ (formStore.applicationData.statusCode === 'StartForm' || formStore.applicationData.statusCode === 'EditForm'),
182
+ );
183
+ const canDeleteFiles = computed(() => {
184
+ const baseCondition = dataStore.isTask() && dataStore.isInitiator() && dataStore.isProcessEditable(formStore.applicationData.statusCode);
185
+ if (dataStore.isAULETTI || dataStore.isAulettiParent) {
186
+ return baseCondition && (currentDocument.value ? currentDocument.value.fileTypeCode === '46' : false);
187
+ }
188
+ if (dataStore.isPension) return baseCondition;
189
+ return false;
190
+ });
164
191
 
165
192
  const openPanel = async (document: DocumentItem) => {
166
193
  dataStore.rightPanel.title = document.fileTypeName!;
@@ -188,6 +215,48 @@ export default defineComponent({
188
215
  }
189
216
  };
190
217
 
218
+ const onUnderFiles = async (event: InputEvent) => {
219
+ if (event.target || event.dataTransfer) {
220
+ const files = event.target ? (event.target as HTMLInputElement).files : (event.dataTransfer as DataTransfer).files;
221
+ if (files !== null) {
222
+ const underDocumentType = dataStore.dicFileTypeList.find(i => i.code === '46');
223
+ Object.values(files).map(file => {
224
+ const uuidV4 = uuid.v4();
225
+ underDocumentsList.value.push({
226
+ file: file,
227
+ identifier: `${uuidV4}${file.name.substring(file.name.lastIndexOf('.'))}`,
228
+ processInstanceId: String(formStore.applicationData.processInstanceId),
229
+ fileTypeId: underDocumentType ? String(underDocumentType.id) : '',
230
+ fileTypeCode: underDocumentType ? String(underDocumentType.code) : '',
231
+ fileTypeName: underDocumentType ? String(underDocumentType.nameRu) : '',
232
+ fileName: file.name ? file.name : underDocumentType ? String(underDocumentType.nameRu) : '',
233
+ });
234
+ });
235
+ }
236
+ }
237
+ };
238
+
239
+ const onClearUnderFiles = () => {
240
+ underDocumentsList.value = [];
241
+ };
242
+
243
+ const uploadUnderFiles = async () => {
244
+ if (underDocumentsList.value) {
245
+ documentLoading.value = true;
246
+ await Promise.allSettled(
247
+ Object.values(underDocumentsList.value).map(async value => {
248
+ const formData = new FormData();
249
+ formData.append('file', value.file);
250
+ formData.append('fileData', JSON.stringify([{ ...value, file: undefined }]));
251
+ await dataStore.uploadFiles(formData, false);
252
+ }),
253
+ );
254
+ onClearUnderFiles();
255
+ await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
256
+ documentLoading.value = false;
257
+ }
258
+ };
259
+
191
260
  watch(
192
261
  () => document_list.value,
193
262
  () => {
@@ -246,16 +315,22 @@ export default defineComponent({
246
315
  signedContract,
247
316
  deletionDialog,
248
317
  processCode,
318
+ underDocumentsList,
249
319
 
250
320
  // Computed
251
321
  isDisabled,
252
322
  showContract,
323
+ canDeleteFiles,
324
+ isUnderwriterDocuments,
253
325
 
254
326
  // Functions
255
- openPanel,
256
327
  getFile,
257
- onFileChange,
328
+ openPanel,
258
329
  deleteFile,
330
+ onFileChange,
331
+ onUnderFiles,
332
+ uploadUnderFiles,
333
+ onClearUnderFiles,
259
334
  };
260
335
  },
261
336
  });
@@ -1359,7 +1359,7 @@ export default {
1359
1359
  if (whichForm.value == formStore.policyholderFormKey || (dataStore.isPension && whichForm.value == formStore.insuredFormKey)) {
1360
1360
  if (route.params.taskId === '0') {
1361
1361
  try {
1362
- const taskId = await dataStore.startApplication(member.value, dataStore.isPension ? (String(route.query.type) === 'joint' ? 4 : 1) : undefined);
1362
+ const taskId = await dataStore.startApplication(member.value, dataStore.isPension ? (String(route.query.type) === 'joint' ? 4 : 19) : undefined);
1363
1363
  if (typeof taskId === 'string') {
1364
1364
  await dataStore.getApplicationData(taskId, false, false, false, false);
1365
1365
  remoteIsInsured.value = formStore.applicationData.clientApp.isInsured;
@@ -9,7 +9,7 @@
9
9
  icon="mdi-alert text-[#FCB016]"
10
10
  ></base-message-block>
11
11
  <base-form-section
12
- v-if="isUnderwriterRole && $dataStore.hasClientAnketa && $dataStore.isClientAnketaCondition && whichProduct !== 'pensionannuity'"
12
+ v-if="isUnderwriterRole && $dataStore.hasClientAnketa && $dataStore.isClientAnketaCondition && whichProduct !== 'pensionannuitynew'"
13
13
  :title="$dataStore.t('policyholderForm')"
14
14
  >
15
15
  <base-form-input
@@ -36,7 +36,7 @@
36
36
  <base-form-input v-model="formStore.policyholderForm.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
37
37
  </base-form-section>
38
38
  <base-form-section
39
- v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuity'"
39
+ v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuitynew'"
40
40
  :title="$dataStore.t('insuredForm')"
41
41
  >
42
42
  <div v-for="(insured, index) of formStore.insuredForm" :key="index">
@@ -49,7 +49,7 @@
49
49
  </div>
50
50
  </base-form-section>
51
51
  <base-form-section
52
- v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuity'"
52
+ v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuitynew'"
53
53
  :title="$dataStore.t('recalculationInfo')"
54
54
  >
55
55
  <base-form-input
@@ -281,7 +281,7 @@
281
281
  @append="openPanel($dataStore.t('productConditionsForm.processGfot'), $dataStore.processGfot, 'processGfot', $dataStore.getProcessGfot)"
282
282
  />
283
283
  </base-form-section>
284
- <section v-if="whichProduct === 'pensionannuity'">
284
+ <section v-if="whichProduct === 'pensionannuitynew'">
285
285
  <base-form-section :title="$dataStore.t('pension.compulsoryAmount&Prof')">
286
286
  <base-form-input
287
287
  v-model="pensionCalculationParams.compulsoryContractAmount"
@@ -971,7 +971,7 @@ export default defineComponent({
971
971
  return isDisabled.value;
972
972
  });
973
973
  const hasDefault = computed(() => {
974
- if (whichProduct.value === 'lifetrip' || whichProduct.value === 'pensionannuity') {
974
+ if (whichProduct.value === 'lifetrip' || whichProduct.value === 'pensionannuitynew') {
975
975
  return false;
976
976
  }
977
977
  return true;
@@ -1078,7 +1078,7 @@ export default defineComponent({
1078
1078
  if (whichProduct.value === 'lifetrip') {
1079
1079
  // @ts-ignore
1080
1080
  calculatorForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
1081
- } else if (whichProduct.value === 'pensionannuity') {
1081
+ } else if (whichProduct.value === 'pensionannuitynew') {
1082
1082
  // @ts-ignore
1083
1083
  pensionForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
1084
1084
  } else {
@@ -1429,7 +1429,7 @@ export default defineComponent({
1429
1429
  } else {
1430
1430
  await dataStore.calculatePrice();
1431
1431
  }
1432
- } else if (whichProduct.value === 'pensionannuity') {
1432
+ } else if (whichProduct.value === 'pensionannuitynew') {
1433
1433
  if (
1434
1434
  pensionCalculationParams.value &&
1435
1435
  pensionCalculationParams.value.compulsoryProfContractAmount &&
@@ -1578,7 +1578,7 @@ export default defineComponent({
1578
1578
  if (dataStore.isCalculator) {
1579
1579
  clearFields();
1580
1580
  }
1581
- if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuity') {
1581
+ if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
1582
1582
  if (
1583
1583
  (dataStore.isCalculator || route.params.taskId === '0') &&
1584
1584
  productConditionsForm.requestedSumInsured === null &&
@@ -1633,7 +1633,7 @@ export default defineComponent({
1633
1633
  }, 0),
1634
1634
  );
1635
1635
  }
1636
- if (whichProduct.value === 'pensionannuity') {
1636
+ if (whichProduct.value === 'pensionannuitynew') {
1637
1637
  contractDate.value = reformatDate(formStore.applicationData.pensionApp.contractDate);
1638
1638
  dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
1639
1639
  transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
@@ -48,7 +48,7 @@
48
48
  </div>
49
49
  <div v-if="isScansDocuments" :class="[$styles.flexColNav]">
50
50
  <div v-if="$dataStore.isPension">
51
- <div v-if="processCode == 1">
51
+ <div v-if="processCode == 19">
52
52
  <div v-if="formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson' || formStore.applicationData.statusCode === 'ContractSignedFrom'">
53
53
  <base-btn :text="$dataStore.t('buttons.downloadContract')" :loading="$dataStore.isButtonsLoading" @click="$dataStore.generatePDFDocument('PA_Contract', '38')" />
54
54
  <base-form-section class="mt-4 flex flex-col !gap-2" :title="$dataStore.t('clients.attachScansSignDocs')">
@@ -88,7 +88,7 @@
88
88
  </base-form-section>
89
89
  </div>
90
90
  </div>
91
- <div v-else>
91
+ <div :class="[$styles.flexColNav]" v-else>
92
92
  <base-btn :text="$dataStore.t('buttons.downloadStatement')" @click="downloadTemplate(constants.documentTypes.statement, 'docx')" />
93
93
  <base-btn :text="$dataStore.t('buttons.downloadContract')" @click="downloadTemplate(constants.documentTypes.contract, 'doc')" />
94
94
  <base-btn :text="$dataStore.t('buttons.downloadApplication')" @click="downloadTemplate(constants.documentTypes.application1, 'vnd.ms-excel')" />
@@ -542,7 +542,7 @@ export default defineComponent({
542
542
  return true;
543
543
  });
544
544
  const isElectronicDisabled = computed(() => {
545
- if (dataStore.isGons) {
545
+ if (dataStore.isGons || dataStore.isLifeBusiness || dataStore.isGns) {
546
546
  return true;
547
547
  }
548
548
  if (formStore.applicationData.statusCode === 'ContractSignedByAuthorizedPerson') {
@@ -572,9 +572,6 @@ export default defineComponent({
572
572
  return true;
573
573
  }
574
574
  }
575
- if (dataStore.isLifeBusiness || dataStore.isGns) {
576
- return false;
577
- }
578
575
  return true;
579
576
  });
580
577
  const isQrXmlDisabled = computed(() => {
@@ -1590,6 +1590,11 @@ export class PhysGroupClass extends BaseGroupClass {
1590
1590
  placeOfBirth: Value;
1591
1591
  workDetails: { workplace: string; position: string; jobDuties: string };
1592
1592
  hasContactPerson: boolean;
1593
+ authorityDetails: {
1594
+ basis: Value;
1595
+ documentNumber: string | null;
1596
+ date: string | null;
1597
+ };
1593
1598
  constructor() {
1594
1599
  super();
1595
1600
  this.lastName = '';
@@ -1600,16 +1605,17 @@ export class PhysGroupClass extends BaseGroupClass {
1600
1605
  this.placeOfBirth = new Value();
1601
1606
  this.workDetails = { workplace: '', position: '', jobDuties: '' };
1602
1607
  this.hasContactPerson = false;
1608
+ this.authorityDetails = {
1609
+ basis: new Value(),
1610
+ documentNumber: null,
1611
+ date: null,
1612
+ };
1603
1613
  }
1604
1614
  }
1605
1615
 
1606
1616
  export class GroupMember extends PhysGroupClass {
1607
1617
  isLeader: boolean;
1608
- authorityDetails: {
1609
- basis: Value;
1610
- documentNumber: string | null;
1611
- date: string | null;
1612
- };
1618
+
1613
1619
  typeOfEconomicActivity: Value;
1614
1620
  activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1615
1621
  beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
@@ -1619,11 +1625,6 @@ export class GroupMember extends PhysGroupClass {
1619
1625
  super();
1620
1626
  // Client
1621
1627
  this.isLeader = false;
1622
- this.authorityDetails = {
1623
- basis: new Value(),
1624
- documentNumber: null,
1625
- date: null,
1626
- };
1627
1628
  this.typeOfEconomicActivity = new Value();
1628
1629
  this.activityTypes = [];
1629
1630
  this.beneficalOwnerQuest = [
@@ -17,6 +17,7 @@ export const constants = Object.freeze({
17
17
  amuletlife: 15,
18
18
  gns: 16,
19
19
  prepensionannuity: 18,
20
+ pensionannuitynew: 19,
20
21
  },
21
22
  amlProducts: {
22
23
  checkcontragent: 1,
package/locales/ru.json CHANGED
@@ -445,7 +445,8 @@
445
445
  "dateCreated": "Дата начала",
446
446
  "factEndDate": "Дата завершения",
447
447
  "decision": "Статус",
448
- "userFullName": "Исполнитель"
448
+ "userFullName": "Исполнитель",
449
+ "stage":"Этап"
449
450
  },
450
451
  "aml": {
451
452
  "contractSignDate": "Дата заключение контракта",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.9-beta.52",
3
+ "version": "0.0.9-beta.53",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -28,8 +28,8 @@
28
28
  "dev": "nuxt dev",
29
29
  "generate": "nuxt generate",
30
30
  "preview": "nuxt preview",
31
- "tk:all": "cd .. && cd amuletlife && yarn typecheck && cd .. && cd baiterek && yarn typecheck && cd .. && cd bolashak && yarn typecheck && cd .. && cd calc && yarn typecheck && cd .. && cd daskamkorlyk && yarn typecheck && cd .. && cd efo && yarn typecheck && cd .. && cd gons && yarn typecheck && cd .. && cd halykkazyna && yarn typecheck && cd .. && cd lifebusiness && yarn typecheck && cd .. && cd gns && yarn typecheck && cd .. && cd liferenta && yarn typecheck && cd .. && cd lifetrip && yarn typecheck && cd .. && cd pensionannuity && yarn typecheck && cd .. && cd prepensionannuity && yarn typecheck && cd .. && cd core",
32
- "i:all": "cd .. && cd amuletlife && yarn && cd .. && cd baiterek && yarn && cd .. && cd bolashak && yarn && cd .. && cd calc && yarn && cd .. && cd daskamkorlyk && yarn && cd .. && cd efo && yarn && cd .. && cd gons && yarn && cd .. && cd halykkazyna && yarn && cd .. && cd lifebusiness && yarn && cd .. && cd gns && yarn && cd .. && cd liferenta && yarn && cd .. && cd lifetrip && yarn && cd .. && cd pensionannuity && yarn && cd .. && cd prepensionannuity && yarn && cd .. && cd core",
31
+ "tk:all": "cd .. && cd amuletlife && yarn typecheck && cd .. && cd baiterek && yarn typecheck && cd .. && cd bolashak && yarn typecheck && cd .. && cd calc && yarn typecheck && cd .. && cd daskamkorlyk && yarn typecheck && cd .. && cd efo && yarn typecheck && cd .. && cd gons && yarn typecheck && cd .. && cd halykkazyna && yarn typecheck && cd .. && cd lifebusiness && yarn typecheck && cd .. && cd gns && yarn typecheck && cd .. && cd liferenta && yarn typecheck && cd .. && cd lifetrip && yarn typecheck && cd .. && cd pensionannuitynew && yarn typecheck && cd .. && cd prepensionannuity && yarn typecheck && cd .. && cd core",
32
+ "i:all": "cd .. && cd amuletlife && yarn && cd .. && cd baiterek && yarn && cd .. && cd bolashak && yarn && cd .. && cd calc && yarn && cd .. && cd daskamkorlyk && yarn && cd .. && cd efo && yarn && cd .. && cd gons && yarn && cd .. && cd halykkazyna && yarn && cd .. && cd lifebusiness && yarn && cd .. && cd gns && yarn && cd .. && cd liferenta && yarn && cd .. && cd lifetrip && yarn && cd .. && cd pensionannuitynew && yarn && cd .. && cd prepensionannuity && yarn && cd .. && cd core",
33
33
  "update:core": "git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main",
34
34
  "update:aml": "cd ../../aml/aml && yarn && cd ../checkcontract && yarn && cd ../checkcontragent && yarn && cd.. && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd ../efo/core",
35
35
  "update:lka": "cd .. && cd lka && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
@@ -51,7 +51,7 @@ export const useDataStore = defineStore('data', {
51
51
  isGons: state => state.product === 'gons',
52
52
  isKazyna: state => state.product === 'halykkazyna',
53
53
  isDas: state => state.product === 'daskamkorlyk',
54
- isPension: state => state.product === 'pensionannuity',
54
+ isPension: state => state.product === 'pensionannuitynew',
55
55
  isAmulet: state => state.product === 'amuletlife',
56
56
  isGns: state => state.product === 'gns',
57
57
  isCalculator: state => state.product === 'calculator',
@@ -256,6 +256,12 @@ export const useDataStore = defineStore('data', {
256
256
  isAdjuster() {
257
257
  return this.isRole(constants.roles.Adjuster);
258
258
  },
259
+ isDsoDirector() {
260
+ return this.isRole(constants.roles.DsoDirector);
261
+ },
262
+ isAccountantDirector() {
263
+ return this.isRole(constants.roles.AccountantDirector);
264
+ },
259
265
  isProcessEditable(statusCode?: keyof typeof Statuses) {
260
266
  const getEditibleStatuses = () => {
261
267
  const defaultStatuses = constants.editableStatuses;
@@ -1618,8 +1624,8 @@ export const useDataStore = defineStore('data', {
1618
1624
  delete query.processCodes;
1619
1625
  query.processCode = byOneProcess;
1620
1626
  }
1621
- if (byOneProcess === 1) {
1622
- query.processCodes = [1, 2, 4];
1627
+ if (byOneProcess === 19) {
1628
+ query.processCodes = [19, 2, 4];
1623
1629
  delete query.processCode;
1624
1630
  }
1625
1631
  const taskList = await this.api.getTaskList(
@@ -2511,7 +2517,7 @@ export const useDataStore = defineStore('data', {
2511
2517
  return [
2512
2518
  {
2513
2519
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
2514
- name: this.processCode == 1 ? 'PA_Statement' : 'PA_RefundStatement',
2520
+ name: this.processCode == 19 ? 'PA_Statement' : 'PA_RefundStatement',
2515
2521
  format: 'pdf',
2516
2522
  },
2517
2523
  {
@@ -2531,6 +2537,11 @@ export const useDataStore = defineStore('data', {
2531
2537
  ];
2532
2538
  default:
2533
2539
  return [
2540
+ {
2541
+ processInstanceId: String(this.formStore.applicationData.processInstanceId),
2542
+ name: 'Agreement',
2543
+ format: 'pdf',
2544
+ },
2534
2545
  {
2535
2546
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
2536
2547
  name: 'Statement',
@@ -2608,7 +2619,7 @@ export const useDataStore = defineStore('data', {
2608
2619
  return;
2609
2620
  }
2610
2621
  } else {
2611
- if (this.processCode === 1 || this.processCode === 2 || this.processCode === 3) {
2622
+ if (this.processCode === 19 || this.processCode === 2 || this.processCode === 4) {
2612
2623
  const result = await this.api.signBts(data);
2613
2624
  if (result.code === 0) this.formStore.signUrls = result.data;
2614
2625
  } else {
@@ -2642,7 +2653,7 @@ export const useDataStore = defineStore('data', {
2642
2653
  link.setAttribute('download', 'Договор страхования.pdf');
2643
2654
  break;
2644
2655
  case constants.documentTypes.application1:
2645
- link.setAttribute('download', 'Приложение №1.xls');
2656
+ link.setAttribute('download', 'Приложение №1.pdf');
2646
2657
  break;
2647
2658
  case constants.documentTypes.questionnaireInsured:
2648
2659
  link.setAttribute('download', 'Анкета Застрахованного.docx');
@@ -3383,7 +3394,6 @@ export const useDataStore = defineStore('data', {
3383
3394
  },
3384
3395
  async startApplicationV2(data: PolicyholderClass) {
3385
3396
  const policyholder = JSON.parse(JSON.stringify(data)) as any;
3386
- if (!policyholder.clientData.iin) return false;
3387
3397
  this.preparePersonData(policyholder);
3388
3398
  keyDeleter(policyholder as PolicyholderClass, [
3389
3399
  'clientData.beneficalOwnerQuest',
@@ -3460,7 +3470,7 @@ export const useDataStore = defineStore('data', {
3460
3470
  this.formStore.lfb.policyholder.clientData.iin = reformatIin(clientData.iin);
3461
3471
  this.formStore.lfb.policyholder.clientData.authoritedPerson.iin = reformatIin(clientData.authoritedPerson.iin);
3462
3472
  this.formStore.lfb.clientId = clientId;
3463
- this.formStore.lfb.policyholder.clientData.authorityDetails.date = reformatDate(clientData.authorityDetails.date);
3473
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.authorityDetails.date = reformatDate(clientData.authoritedPerson.authorityDetails.date);
3464
3474
  this.formStore.lfb.policyholder.clientData.authoritedPerson.birthDate = reformatDate(clientData.authoritedPerson.birthDate) ?? '';
3465
3475
  this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.issuedOn = reformatDate(clientData.authoritedPerson.identityDocument.issuedOn) ?? '';
3466
3476
  this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.validUntil = reformatDate(clientData.authoritedPerson.identityDocument.validUntil) ?? '';
@@ -3493,8 +3503,8 @@ export const useDataStore = defineStore('data', {
3493
3503
  if (accidentIncidents && accidentIncidents.length) {
3494
3504
  this.formStore.lfb.accidentIncidents = accidentIncidents;
3495
3505
  this.formStore.lfb.accidentIncidents.forEach(incident => {
3496
- incident.amount = incident.amount === 0 ? null : incident.amount;
3497
- incident.count = incident.count === 0 ? null : incident.count;
3506
+ incident.amount = incident.amount === 0 ? '' : incident.amount;
3507
+ incident.count = incident.count === 0 ? '' : incident.count;
3498
3508
  });
3499
3509
  }
3500
3510
 
@@ -3521,7 +3531,12 @@ export const useDataStore = defineStore('data', {
3521
3531
  },
3522
3532
  async saveAccidentIncidents(data: AccidentIncidents[]) {
3523
3533
  try {
3524
- const response = await this.api.saveAccidentIncidents(this.formStore.applicationData.processInstanceId, data);
3534
+ const dataCopy = JSON.parse(JSON.stringify(data));
3535
+ for (const incident of dataCopy) {
3536
+ incident.count = !!incident.count ? incident.count : 0;
3537
+ incident.amount = incident.amount ? incident.amount : 0;
3538
+ }
3539
+ const response = await this.api.saveAccidentIncidents(this.formStore.applicationData.processInstanceId, dataCopy);
3525
3540
  return response;
3526
3541
  } catch (err) {
3527
3542
  return ErrorHandler(err);
@@ -3610,6 +3625,7 @@ export const useDataStore = defineStore('data', {
3610
3625
  iin: reformatIin(client.iin),
3611
3626
  insSum: client.insuredPolicyData.insSum,
3612
3627
  premium: client.insuredPolicyData.premium,
3628
+ premiumWithLoad: client.insuredPolicyData.premiumWithLoad,
3613
3629
  hasAttachedFile: client.hasAttachedFile,
3614
3630
  };
3615
3631
  });
@@ -3863,7 +3879,9 @@ export const useDataStore = defineStore('data', {
3863
3879
  this.isBranchDirector() ||
3864
3880
  this.isUSNSACCINS() ||
3865
3881
  this.isDsuio() ||
3866
- this.isAdjuster(),
3882
+ this.isAdjuster() ||
3883
+ this.isDsoDirector() ||
3884
+ this.isAccountantDirector(),
3867
3885
  };
3868
3886
  },
3869
3887
  },
package/types/enum.ts CHANGED
@@ -95,6 +95,8 @@ export enum Roles {
95
95
  USNSACCINS = 'USNSACCINS',
96
96
  Dsuio = 'Dsuio',
97
97
  Adjuster = 'Adjuster',
98
+ DsoDirector = 'DsoDirector',
99
+ AccountantDirector = 'AccountantDirector',
98
100
  }
99
101
 
100
102
  export enum Statuses {
package/types/index.ts CHANGED
@@ -25,7 +25,7 @@ declare global {
25
25
  | 'daskamkorlyk'
26
26
  | 'amuletlife'
27
27
  | 'gns'
28
- | 'pensionannuity'
28
+ | 'pensionannuitynew'
29
29
  | 'dso'
30
30
  | 'uu'
31
31
  | 'auletti'
@@ -291,6 +291,7 @@ declare global {
291
291
  birthDate: string;
292
292
  insSum: number;
293
293
  premium?: number;
294
+ premiumWithLoad?: number;
294
295
  position?: string;
295
296
  lifeMultiply?: number;
296
297
  lifeAdditive?: number;
@@ -715,8 +716,8 @@ declare global {
715
716
  coverTypeId: string | null;
716
717
  coverTypeName: string | null;
717
718
  coverTypeCode: number | null;
718
- count: number | null;
719
- amount: number | null;
719
+ count: number | string;
720
+ amount: number | string;
720
721
  shortDescription: string | null;
721
722
  };
722
723