hl-core 0.0.10-beta.30 → 0.0.10-beta.32

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.
@@ -62,7 +62,7 @@ export const useMemberStore = defineStore('members', {
62
62
  }
63
63
  return false;
64
64
  },
65
- getMemberFromStore(whichForm: keyof typeof StoreMembers, whichIndex?: number): Member | null {
65
+ getMemberFromStore(whichForm: keyof typeof StoreMembers | 'slaveInsuredForm', whichIndex?: number): Member | null {
66
66
  switch (whichForm) {
67
67
  case this.formStore.policyholderFormKey:
68
68
  return this.formStore.policyholderForm;
@@ -70,6 +70,8 @@ export const useMemberStore = defineStore('members', {
70
70
  return this.formStore.policyholdersRepresentativeForm;
71
71
  case this.formStore.insuredFormKey:
72
72
  return this.formStore.insuredForm[whichIndex!];
73
+ case 'slaveInsuredForm':
74
+ return this.formStore.slaveInsuredForm;
73
75
  case this.formStore.beneficiaryFormKey:
74
76
  return this.formStore.beneficiaryForm[whichIndex!];
75
77
  case this.formStore.beneficialOwnerFormKey:
@@ -78,8 +80,11 @@ export const useMemberStore = defineStore('members', {
78
80
  return null;
79
81
  }
80
82
  },
81
- getMemberFromApplication(whichForm: keyof typeof StoreMembers, whichIndex?: number) {
82
- const id = whichForm !== 'policyholderForm' && whichForm !== 'policyholdersRepresentativeForm' ? this.formStore[whichForm][whichIndex!].id : this.formStore[whichForm].id;
83
+ getMemberFromApplication(whichForm: keyof typeof StoreMembers | 'slaveInsuredForm', whichIndex?: number) {
84
+ const id =
85
+ whichForm !== 'policyholderForm' && whichForm !== 'policyholdersRepresentativeForm' && whichForm !== 'slaveInsuredForm'
86
+ ? this.formStore[whichForm][whichIndex!]?.id
87
+ : this.formStore[whichForm]?.id;
83
88
  switch (whichForm) {
84
89
  case this.formStore.policyholderFormKey:
85
90
  return this.formStore.applicationData.clientApp;
@@ -89,6 +94,10 @@ export const useMemberStore = defineStore('members', {
89
94
  const inStore = this.formStore.applicationData.insuredApp.find((member: any) => member.insisId === id);
90
95
  return !!inStore ? inStore : false;
91
96
  }
97
+ case 'slaveInsuredForm': {
98
+ const inStore = this.formStore.applicationData.slave.insuredApp[0];
99
+ return !!inStore ? inStore : false;
100
+ }
92
101
  case this.formStore.beneficiaryFormKey: {
93
102
  const inStore = this.formStore.applicationData.beneficiaryApp.find((member: any) => member.insisId === id);
94
103
  return !!inStore ? inStore : false;
@@ -99,12 +108,14 @@ export const useMemberStore = defineStore('members', {
99
108
  }
100
109
  }
101
110
  },
102
- getMemberCode(whichForm: keyof typeof StoreMembers) {
111
+ getMemberCode(whichForm: keyof typeof StoreMembers | 'slaveInsuredForm') {
103
112
  switch (whichForm) {
104
113
  case this.formStore.policyholderFormKey:
105
114
  return MemberCodes.Client;
106
115
  case this.formStore.insuredFormKey:
107
116
  return MemberCodes.Insured;
117
+ case 'slaveInsuredForm':
118
+ return MemberCodes.Insured;
108
119
  case this.formStore.beneficiaryFormKey:
109
120
  return MemberCodes.Beneficiary;
110
121
  case this.formStore.beneficialOwnerFormKey:
package/store/rules.ts CHANGED
@@ -86,8 +86,8 @@ export const rules = {
86
86
  ageExceeds80ByDate: [(v: any) => Math.abs(new Date(Date.now() - new Date(formatDate(v)!).getTime()).getUTCFullYear() - 1970) <= 80 || t('rules.ageExceeds80')],
87
87
  sums: [
88
88
  (v: any) => {
89
- let str = v.replace(/\s/g, '');
90
- if (/^[0-9]+$/.test(str)) {
89
+ let str = String(v ?? '').replace(/\s/g, '');
90
+ if (!str || /^[0-9]+$/.test(str)) {
91
91
  return true;
92
92
  }
93
93
  return t('rules.sums');
package/types/enum.ts CHANGED
@@ -94,6 +94,7 @@ export enum Roles {
94
94
  HeadManager = 'HeadManager',
95
95
  AgentAuletti = 'AgentAuletti',
96
96
  USNS = 'USNS',
97
+ USNSsanctioner = 'USNSsanctioner',
97
98
  Accountant = 'Accountant',
98
99
  BranchDirector = 'BranchDirector',
99
100
  USNSACCINS = 'USNSACCINS',
@@ -128,6 +129,7 @@ export enum Statuses {
128
129
  ControllerDpForm = 'ControllerDpForm',
129
130
  ActuaryForm = 'ActuaryForm',
130
131
  DsoUsnsForm = 'DsoUsnsForm',
132
+ JuristForm = 'JuristForm',
131
133
  AccountantForm = 'AccountantForm',
132
134
  HeadManagerForm = 'HeadManagerForm',
133
135
  }
package/types/index.ts CHANGED
@@ -259,6 +259,8 @@ export interface ClientV2 {
259
259
  hasAttachedFile?: boolean;
260
260
  insrBeginDate?: string;
261
261
  insrEndDate?: string;
262
+ economySectorCode?: Value;
263
+ resident?: Value;
262
264
  }
263
265
 
264
266
  export type RecalculationResponseType = {