hl-core 0.0.8-beta.19 → 0.0.8-beta.20

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,7 +1,17 @@
1
1
  <template>
2
2
  <div class="pt-3 rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
3
3
  <div class="ml-5">
4
- <p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ title }}</p>
4
+ <div class="flex justify-between mr-5">
5
+ <p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ title }}</p>
6
+ <div
7
+ v-if="isMultiple && more && !isShort"
8
+ :class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple, disabled ? $libStyles.disabled : 'cursor-pointer']"
9
+ class="hidden lg:flex transition-all rounded-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
10
+ @click="!disabled && memberStore.addMember(whichForm)"
11
+ >
12
+ {{ $t('buttons.add') }}
13
+ </div>
14
+ </div>
5
15
  <p v-if="!!subtitle" :class="[$libStyles.greyText, $libStyles.textSimple]">{{ subtitle }}</p>
6
16
  </div>
7
17
  <div
@@ -61,7 +71,7 @@
61
71
  <div
62
72
  v-if="isMultiple && more && !isShort"
63
73
  :class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple, disabled ? $libStyles.disabled : 'cursor-pointer']"
64
- class="transition-all rounded-b-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90"
74
+ class="block lg:hidden transition-all rounded-b-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90"
65
75
  @click="!disabled && memberStore.addMember(whichForm)"
66
76
  >
67
77
  {{ $t('buttons.add') }}
@@ -10,11 +10,11 @@
10
10
  <i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
11
11
  ></base-panel-item>
12
12
  <base-panel-item v-if="$dataStore.isEFO" @click="changeBridge('lka')" class="cursor-pointer">
13
- {{ $t('labels.lkaLong') }}
14
- <i class="mdi mdi-card-account-details-outline text-2xl text-[#A0B3D8]"></i
13
+ {{ $t('labels.lkaLong') }}
14
+ <i class="mdi mdi-chevron-right text-2xl text-[#A0B3D8]"></i
15
15
  ></base-panel-item>
16
16
  <base-panel-item v-if="$dataStore.isLKA" @click="changeBridge('efo')" class="cursor-pointer">
17
- {{ $t('labels.efoLong') }}
17
+ {{ $t('labels.efoLong') }}
18
18
  <i class="mdi mdi-web text-2xl text-[#A0B3D8]"></i
19
19
  ></base-panel-item>
20
20
  <base-panel-item
@@ -26,17 +26,22 @@
26
26
  {{ panelItem.title }}
27
27
  <i v-if="panelItem.icon" class="mdi text-xl text-[#A0B3D8]" :class="[panelItem.icon]"></i>
28
28
  </base-panel-item>
29
- <base-panel-item @click="dialog = true" class="cursor-pointer">
30
- Выход
31
- <i class="mdi mdi-logout text-xl text-[#A0B3D8]"></i>
29
+ <base-panel-item v-if="hasHistory" @click="openHistory" class="cursor-pointer">
30
+ {{ $t('historyStatementsAndStatuses') }}
31
+ <i class="mdi mdi-history text-xl text-[#A0B3D8]"></i>
32
+ </base-panel-item>
33
+ <base-panel-item @click="dialogSignOut = true" class="cursor-pointer" :class="[$libStyles.redText]">
34
+ {{ $t('buttons.logout') }}
35
+ <i class="mdi mdi-logout text-xl"></i>
32
36
  </base-panel-item>
33
37
 
34
- <base-dialog v-model="dialog" :title="$t('dialog.exit')" :subtitle="$t('dialog.dataWillClear')" actions="default" @yes="logoutUser" @no="dialog = false"> </base-dialog
38
+ <base-dialog v-model="dialogSignOut" :title="$t('dialog.exit')" :subtitle="$t('dialog.dataWillClear')" actions="default" @yes="logoutUser" @no="dialogSignOut = false">
39
+ </base-dialog
35
40
  ></base-drawer>
36
41
  </template>
37
42
 
38
43
  <script lang="ts" setup>
39
- const dialog = ref(false);
44
+ const dialogSignOut = ref(false);
40
45
  const dataStore = useDataStore();
41
46
 
42
47
  const handleFontSize = (action: 'increase' | 'decrease') => {
@@ -50,10 +55,18 @@ const handleFontSize = (action: 'increase' | 'decrease') => {
50
55
  };
51
56
 
52
57
  const logoutUser = async () => {
53
- dialog.value = false;
58
+ dialogSignOut.value = false;
54
59
  await dataStore.logoutUser();
55
60
  };
56
61
 
62
+ const hasHistory = computed(() => {
63
+ return !dataStore.isLKA;
64
+ });
65
+
66
+ const openHistory = async () => {
67
+ dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.product);
68
+ };
69
+
57
70
  const changeBridge = async (toBridge: 'efo' | 'lka') => {
58
71
  const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
59
72
  if (!bridgeUrl) return;
@@ -111,6 +111,8 @@ export default defineComponent({
111
111
  case 'Insurance-Product':
112
112
  case 'Menu':
113
113
  case 'History':
114
+ case 'Main':
115
+ case 'taskId':
114
116
  return false;
115
117
  default:
116
118
  return true;
@@ -563,14 +563,39 @@ export default {
563
563
  return generalCondition && perMemberCondtion();
564
564
  });
565
565
 
566
- const hasGBDFL = computed(() => dataStore.controls.hasGBDFL && !hasGKB.value);
566
+ const hasGBDFL = computed(() => {
567
+ const perMemberCondition = () => {
568
+ switch (whichForm.value) {
569
+ case formStore.beneficiaryFormKey: {
570
+ if (dataStore.isKazyna || dataStore.isLiferenta) {
571
+ return !!member.value.iin;
572
+ }
573
+ if (dataStore.isBolashak || dataStore.isGons) {
574
+ return false;
575
+ }
576
+ return true;
577
+ }
578
+ case formStore.insuredFormKey:
579
+ case formStore.beneficiaryFormKey:
580
+ case formStore.beneficialOwnerFormKey:
581
+ case formStore.policyholdersRepresentativeFormKey:
582
+ return true;
583
+ default:
584
+ return true;
585
+ }
586
+ };
587
+ return dataStore.controls.hasGBDFL && perMemberCondition();
588
+ });
567
589
  const hasInsis = computed(() => dataStore.controls.hasInsis);
568
590
  const hasGKB = computed(() => {
569
- const byProductCondition = dataStore.isGons || dataStore.isBolashak;
570
591
  const perMemberCondition = () => {
571
592
  switch (whichForm.value) {
572
- case formStore.beneficiaryFormKey:
593
+ case formStore.beneficiaryFormKey: {
594
+ if (dataStore.isKazyna || dataStore.isLiferenta) {
595
+ return !member.value.iin;
596
+ }
573
597
  return member.value.id === 0;
598
+ }
574
599
  case formStore.policyholderFormKey:
575
600
  case formStore.insuredFormKey:
576
601
  case formStore.beneficialOwnerFormKey:
@@ -580,7 +605,7 @@ export default {
580
605
  return false;
581
606
  }
582
607
  };
583
- return dataStore.controls.hasGKB && !!dataStore.isTask() && byProductCondition && perMemberCondition();
608
+ return dataStore.controls.hasGKB && !!dataStore.isTask() && perMemberCondition();
584
609
  });
585
610
 
586
611
  const birthDateRule = computed(() => {
@@ -12,8 +12,8 @@ export const constants = Object.freeze({
12
12
 
13
13
  editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
14
14
  documentsLinkVisibleStatuses: ['DocumentsSignedFrom', 'UnderwriterForm', 'AffilationResolutionForm', 'Completed', 'InsurancePremiumOnlinePaid'],
15
- returnStatementStatuses: ['DocumentsSignedFrom', 'WaitingInsurancePremiumForm', 'UnderwriterForm'],
16
- cancelApplicationStatuses: ['StartForm', 'EditForm', 'WaitingInsurancePremiumForm', 'DocumentsSignedFrom'],
15
+ returnStatementStatuses: ['DocumentsSignedFrom', 'ContractSignedFrom', 'WaitingInsurancePremiumForm', 'UnderwriterForm'],
16
+ cancelApplicationStatuses: ['StartForm', 'EditForm', 'EditBeneficiaryForm', 'WaitingInsurancePremiumForm', 'DocumentsSignedFrom', 'ContractSignedFrom'],
17
17
  gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
18
18
  types: {
19
19
  string: 'string',
@@ -39,7 +39,7 @@ export class Styles {
39
39
  greyTextDark: string = 'text-[#9197A1]';
40
40
 
41
41
  // Red
42
- redText: string = 'text-[#FF897D]';
42
+ redText: string = 'text-[#FD2D39]';
43
43
  redBg: string = 'bg-[#FF897D]';
44
44
  redBgHover: string = 'hover:bg-[#ff9b91]';
45
45
  // Error
package/locales/en.json CHANGED
@@ -103,6 +103,8 @@
103
103
  "userLogin": "Login",
104
104
  "password": "Password",
105
105
  "login": "Log in",
106
+ "exit": "Exit",
107
+ "logout": "Log out",
106
108
  "save": "Save",
107
109
  "back": "Back",
108
110
  "sign": "Sign",
@@ -205,7 +207,7 @@
205
207
  "policyholderAndInsured": "Insured / Policyholder",
206
208
  "policyholderAndInsuredSame": "Insured / Policyholder are the same person",
207
209
  "insuredForm": "Insured",
208
- "beneficiaryForm": "Beneficiary",
210
+ "beneficiaryForm": "Beneficiary",
209
211
  "beneficialOwnerForm": "Beneficial Owner",
210
212
  "policyholdersRepresentativeForm": "Policyholder's Representative",
211
213
  "productConditions": "Product Conditions and Calculations",
@@ -222,6 +224,7 @@
222
224
  "requestedSumInsured": "Requested Sum Insured",
223
225
  "insurancePremiumPerMonth": "Insurance Premium per Month",
224
226
  "noStatementCalculator": "Cost calculator without entering data",
227
+ "calculator": "Calculator",
225
228
  "agreement": "Agreement",
226
229
  "clientsStatement": "Client's Statement",
227
230
  "document": "Document",
@@ -362,6 +365,8 @@
362
365
  "new": "Подать заявление"
363
366
  },
364
367
  "labels": {
368
+ "aml": "AML",
369
+ "amlLong": "Anti Money Laundering",
365
370
  "efoLong": "EFO",
366
371
  "efo": "EFO",
367
372
  "lkaLong": "LKA",