hl-core 0.0.9-beta.22 → 0.0.9-beta.24

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.
@@ -77,6 +77,6 @@ const hasHistory = computed(() => {
77
77
  });
78
78
 
79
79
  const openHistory = async () => {
80
- dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge ? '' : dataStore.product);
80
+ dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge || dataStore.isDSO ? '' : dataStore.product);
81
81
  };
82
82
  </script>
@@ -68,6 +68,39 @@
68
68
  </div>
69
69
  </base-form-text-section>
70
70
  </section>
71
+ <section
72
+ v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'D').length"
73
+ :class="[$styles.blueBgLight, $styles.rounded]"
74
+ class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
75
+ >
76
+ <base-form-text-section v-for="(question, index) in firstQuestionList.filter(i => i.first.definedAnswers === 'D')" :key="index">
77
+ <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between"> {{ question.first.name }} </span>
78
+ <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
79
+ <v-radio-group
80
+ v-model="question.first.answerName"
81
+ class="anketa-radio"
82
+ :true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
83
+ false-icon="mdi-radiobox-blank text-[#636363]"
84
+ :rules="$rules.required"
85
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
86
+ inline
87
+ >
88
+ <v-radio label="Да" value="Да" />
89
+ <v-radio label="Нет" value="Нет" />
90
+ </v-radio-group>
91
+ </div>
92
+ <base-fade-transition>
93
+ <div v-if="question.first.answerName === 'Да'" :class="[$styles.whiteText, $styles.textSimple]">
94
+ <base-form-input
95
+ v-model="question.first.answerText"
96
+ :label="$dataStore.t('labels.inDetails')"
97
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
98
+ :rules="$rules.required"
99
+ />
100
+ </div>
101
+ </base-fade-transition>
102
+ </base-form-text-section>
103
+ </section>
71
104
  </v-form>
72
105
  <div class="px-[14px]">
73
106
  <base-btn
@@ -197,6 +230,9 @@ export default defineComponent({
197
230
  }
198
231
  });
199
232
  }
233
+ if (question.first.definedAnswers === 'D' && question.first.answerName?.match(new RegExp('Нет', 'i')) && question.first.answerText) {
234
+ question.first.answerText = null;
235
+ }
200
236
  });
201
237
  }
202
238
  formStore[whichSurvey.value]!.type = surveyType.value;
@@ -354,7 +390,7 @@ export default defineComponent({
354
390
  () => firstQuestionList.value,
355
391
  value => {
356
392
  if (value) {
357
- const hasPositiveAnswer = value.some(i => i.first.definedAnswers === 'Y' && i.first.answerName !== 'Нет');
393
+ const hasPositiveAnswer = value.some(i => (i.first.definedAnswers === 'Y' || i.first.definedAnswers === 'D') && i.first.answerName !== 'Нет');
358
394
  answerToAll.value = !hasPositiveAnswer;
359
395
  }
360
396
  },
@@ -16,6 +16,7 @@ export const constants = Object.freeze({
16
16
  checkcontragent: 1,
17
17
  checkcontract: 2,
18
18
  },
19
+ extractedProducts: ['dso'],
19
20
  editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm],
20
21
  documentsLinkVisibleStatuses: [
21
22
  Statuses.DocumentsSignedFrom,
package/locales/ru.json CHANGED
@@ -21,6 +21,7 @@
21
21
  "memberSave": "Ошибка при сохранении данных участников"
22
22
  },
23
23
  "toaster": {
24
+ "wrongFormatOf": "Некорректный формат \"{text}\"",
24
25
  "shengenZoneCondition": "Для стран Шенгенской зоны может быть только один застрахованный",
25
26
  "noCurrency": "Отсутствует курс доллара",
26
27
  "membersLimit": "Количество этих участников превышено. Лимит составляет: {text}",
@@ -188,7 +189,8 @@
188
189
  "sendToSign": "Отправить на подпись",
189
190
  "downloadContract": "Скачать договор",
190
191
  "sendElectronically": "Отправить в электронном виде",
191
- "sendOnPaper": "Отправить на бумажном носителе"
192
+ "sendOnPaper": "Отправить на бумажном носителе",
193
+ "export": "Экспорт"
192
194
  },
193
195
  "dialog": {
194
196
  "title": "Подтверждение",
@@ -363,6 +365,13 @@
363
365
  "decision": "Статус",
364
366
  "userFullName": "Исполнитель"
365
367
  },
368
+ "dso": {
369
+ "project": "ДСО",
370
+ "generalInfo": "Общая информация",
371
+ "prevStatements": "Ранее оформленные заявки",
372
+ "title": "Сопровождение договоров/полисов",
373
+ "warningNSJ": "На данный момент сопровождение договоров/полисов только для НСЖ"
374
+ },
366
375
  "aml": {
367
376
  "contractSignDate": "Дата заключение контракта",
368
377
  "contractEndDate": "Дата завершения контракта",
@@ -406,7 +415,12 @@
406
415
  "opf": "Организационно-правовая форма",
407
416
  "checkType": "Тип проверки",
408
417
  "personType": "Тип клиента",
409
- "operationtype": "Тип операции"
418
+ "operationtype": "Тип операции",
419
+ "createRecord": "Сформировать отчет",
420
+ "export": "Экспорт",
421
+ "overlapType": "Тип совпадения",
422
+ "system": "Система",
423
+ "isActive": "Активен"
410
424
  },
411
425
  "agent": {
412
426
  "currency": "Валюта",
@@ -537,6 +551,7 @@
537
551
  "new": "Подать заявление"
538
552
  },
539
553
  "labels": {
554
+ "personId": "ИНСИС Id",
540
555
  "period": "Период",
541
556
  "currentPerf": "Текущие показатели",
542
557
  "premium": "Премия",
@@ -623,6 +638,7 @@
623
638
  "welcome": "Добро пожаловать",
624
639
  "information": "Дополнительные данные",
625
640
  "policyNumber": "Номер полиса",
641
+ "policyStartDate": "Начало полиса",
626
642
  "statusCode": "Статус заявки",
627
643
  "initiator": "Инициатор",
628
644
  "iin&bin": "ИИН/БИН",
@@ -631,7 +647,8 @@
631
647
  "policyholderLongName": "ФИО страхователя",
632
648
  "jsonObject": "JSON значение",
633
649
  "epayPage": "Страница на ePay",
634
- "checkWithDoc": "Сверьте с документом"
650
+ "checkWithDoc": "Сверьте с документом",
651
+ "inDetails": "Подробно"
635
652
  },
636
653
  "placeholders": {
637
654
  "login": "Логин",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.9-beta.22",
3
+ "version": "0.0.9-beta.24",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -48,6 +48,7 @@ export const useDataStore = defineStore('data', {
48
48
  isCalculator: state => state.product === 'calculator',
49
49
  isCheckContract: state => state.product === 'checkcontract',
50
50
  isCheckContragent: state => state.product === 'checkcontragent',
51
+ isDSO: state => state.product === 'dso',
51
52
  isEveryFormDisabled: state => Object.values(state.formStore.isDisabled).every(i => i === true),
52
53
  hasClientAnketa: state => state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
53
54
  isClientAnketaCondition: state =>
@@ -603,7 +604,7 @@ export const useDataStore = defineStore('data', {
603
604
  }
604
605
  },
605
606
  async saveContragent(user: Member, whichForm: keyof typeof StoreMembers | 'contragent', whichIndex: number | null, onlySaveAction: boolean = true) {
606
- if (this.isGons && user.iin && whichForm === 'beneficiaryForm') {
607
+ if (this.isGons && user.iin && whichForm === 'beneficiaryForm' && useEnv().isProduction) {
607
608
  const doesHaveActiveContract = await this.api.checkBeneficiariesInActualPolicy(user.iin.replace(/-/g, ''));
608
609
  if (doesHaveActiveContract) {
609
610
  this.showToaster('error', this.t('toaster.doesHaveActiveContract'), 6000);
@@ -2539,7 +2540,11 @@ export const useDataStore = defineStore('data', {
2539
2540
  if (!list || (list && list.length === 0)) return false;
2540
2541
  const isAnketaValid = ref<boolean>(true);
2541
2542
  list.forEach(i => {
2542
- if ((i.first.definedAnswers === 'N' && !i.first.answerText) || (i.first.definedAnswers === 'Y' && !i.first.answerName)) {
2543
+ if (
2544
+ (i.first.definedAnswers === 'N' && !i.first.answerText) ||
2545
+ (i.first.definedAnswers === 'Y' && !i.first.answerName) ||
2546
+ (i.first.definedAnswers === 'D' && !i.first.answerName?.match(new RegExp('Нет', 'i')) && !i.first.answerText)
2547
+ ) {
2543
2548
  isAnketaValid.value = false;
2544
2549
  return false;
2545
2550
  }
package/types/index.ts CHANGED
@@ -22,7 +22,8 @@ declare global {
22
22
  | 'mycar'
23
23
  | 'checkcontract'
24
24
  | 'checkcontragent'
25
- | 'daskamkorlyk';
25
+ | 'daskamkorlyk'
26
+ | 'dso';
26
27
  type MemberKeys = keyof ReturnType<typeof useFormStore>;
27
28
  type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
28
29
  type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
@@ -179,6 +180,7 @@ declare global {
179
180
  enum DefinedAnswers {
180
181
  N = 'N',
181
182
  Y = 'Y',
183
+ D = 'D',
182
184
  }
183
185
 
184
186
  type AnketaFirst = {