hl-core 0.0.10-beta.26 → 0.0.10-beta.27

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
@@ -975,6 +975,16 @@ export class ApiClass {
975
975
  });
976
976
  }
977
977
 
978
+ async getParentContractData(policyId: string) {
979
+ return await this.axiosCall<{ bin: string; name: string }>({
980
+ method: Methods.GET,
981
+ url: `/${this.productUrl}/api/Application/GetParentContractData`,
982
+ params: {
983
+ policyId,
984
+ },
985
+ });
986
+ }
987
+
978
988
  pensionannuityNew = {
979
989
  base: '/pensionannuityNew',
980
990
  getEnpfRedirectUrl: async (id: string) => {
@@ -139,31 +139,43 @@ export default defineComponent({
139
139
  (route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
140
140
  );
141
141
  const isSaleChanellReadonly = computed(() => {
142
- if (dataStore.isGons) return isReadonly.value && dataStore.isServiceManager();
142
+ if (!isReadonly.value) {
143
+ if (dataStore.isGons) return !dataStore.isServiceManager();
144
+ }
143
145
  return isReadonly.value;
144
146
  });
145
147
  const isRegionReadonly = computed(() => {
146
- if (dataStore.isGons) return isReadonly.value && (dataStore.isServiceManager() || dataStore.isAgent());
148
+ if (!isReadonly.value) {
149
+ if (dataStore.isGons) return !dataStore.isServiceManager() && !dataStore.isAgent();
150
+ }
147
151
  return isReadonly.value;
148
152
  });
149
153
  const isManagerReadonly = computed(() => {
150
- if (dataStore.isGons) return isReadonly.value && dataStore.isServiceManager();
154
+ if (!isReadonly.value) {
155
+ if (dataStore.isGons) return !dataStore.isServiceManager();
156
+ }
151
157
  return isReadonly.value;
152
158
  });
153
159
  const isAgentReadonly = computed(() => {
154
- if (dataStore.isGons || dataStore.isPension) return isReadonly.value && dataStore.isServiceManager();
160
+ if (!isReadonly.value) {
161
+ if (dataStore.isGons) return !dataStore.isServiceManager();
162
+ if (dataStore.isPension) return !dataStore.isManager();
163
+ }
155
164
  return isReadonly.value;
156
165
  });
157
166
  const isSaleChanellShown = computed(() => {
167
+ if (dataStore.isGons) return !dataStore.isAgent();
158
168
  return true;
159
169
  });
160
170
  const isRegionShown = computed(() => {
161
171
  return true;
162
172
  });
163
173
  const isManagerShown = computed(() => {
174
+ if (dataStore.isGons) return !dataStore.isAgent();
164
175
  return true;
165
176
  });
166
177
  const isAgentShown = computed(() => {
178
+ if (dataStore.isGons) return !dataStore.isAgent();
167
179
  if (dataStore.isPension) return dataStore.isServiceManager();
168
180
  return true;
169
181
  });
@@ -124,7 +124,7 @@
124
124
  <base-form-input v-model.trim="member.registrationStreet" :rules="$rules.required" :label="$dataStore.t('form.Street')" :readonly="disabled" :clearable="!disabled" />
125
125
  <base-form-input
126
126
  v-model.trim="member.registrationNumberHouse"
127
- :rules="$rules.required"
127
+ :rules="[...$rules.required, $rules.lengthLimit(member.registrationNumberHouse, 10)]"
128
128
  :label="$dataStore.t('form.NumberHouse')"
129
129
  :readonly="disabled"
130
130
  :clearable="!disabled"
@@ -417,7 +417,7 @@
417
417
  />
418
418
  <base-form-input
419
419
  v-model.trim="member.registrationNumberHouse"
420
- :rules="$rules.required"
420
+ :rules="[...$rules.required, $rules.lengthLimit(member.registrationNumberHouse, 10)]"
421
421
  :readonly="isDisabled"
422
422
  :clearable="!isDisabled"
423
423
  :label="$dataStore.t('form.NumberHouse')"
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </base-form-section>
58
58
  <base-form-section
59
- v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuitynew'"
59
+ v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns' && whichProduct !== 'pensionannuitynew' && whichProduct !== 'balam'"
60
60
  :title="$dataStore.t('recalculationInfo')"
61
61
  >
62
62
  <base-form-input
@@ -849,7 +849,8 @@ export default defineComponent({
849
849
  whichProduct.value === 'liferenta' ||
850
850
  whichProduct.value === 'lifebusiness' ||
851
851
  whichProduct.value === 'amuletlife' ||
852
- whichProduct.value === 'gns'
852
+ whichProduct.value === 'gns' ||
853
+ whichProduct.value === 'balam'
853
854
  ) {
854
855
  return false;
855
856
  }
@@ -18,6 +18,7 @@ export const constants = Object.freeze({
18
18
  gns: 16,
19
19
  prepensionannuity: 18,
20
20
  pensionannuitynew: 19,
21
+ balam: 21,
21
22
  },
22
23
  amlProducts: {
23
24
  checkcontragent: 1,
@@ -795,6 +795,9 @@ export class RoleController {
795
795
  isHeadOfDso = () => {
796
796
  return this.isRole(constants.roles.HeadOfDso);
797
797
  };
798
+ isUrsp = () => {
799
+ return this.isRole(constants.roles.URSP);
800
+ };
798
801
  hasAccess = () => {
799
802
  const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn();
800
803
  return {
@@ -830,7 +833,8 @@ export class RoleController {
830
833
  this.isDsoDirector() ||
831
834
  this.isAccountantDirector() ||
832
835
  this.isHeadAdjuster() ||
833
- this.isHeadOfDso(),
836
+ this.isHeadOfDso() ||
837
+ this.isUrsp(),
834
838
  };
835
839
  };
836
840
  }
package/locales/ru.json CHANGED
@@ -873,7 +873,8 @@
873
873
  "agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
874
874
  "checkDate": "Укажите корректную дату",
875
875
  "searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов",
876
- "fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг"
876
+ "fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг",
877
+ "lengthLimit": "Превышен лимит символов. Введите текст длиной не более {len} символов"
877
878
  },
878
879
  "code": "КСЭ",
879
880
  "fontSize": "Размер шрифта",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.26",
3
+ "version": "0.0.10-beta.27",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -63,6 +63,7 @@ export const useDataStore = defineStore('data', {
63
63
  isCheckContract: state => state.product === 'checkcontract',
64
64
  isCheckContragent: state => state.product === 'checkcontragent',
65
65
  isPrePension: state => state.product === 'prepensionannuity',
66
+ isBalam: state => state.product === 'balam',
66
67
  isDSO: state => state.product === 'dso',
67
68
  isUU: state => state.product === 'uu',
68
69
  hasClientAnketa: state => state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
@@ -2831,7 +2832,7 @@ export const useDataStore = defineStore('data', {
2831
2832
  },
2832
2833
  async validateAllMembers(taskId: string, localCheck: boolean = false) {
2833
2834
  const policyholderDoc = this.formStore.signedDocumentList.find(
2834
- i => i.iin === String(this.formStore.policyholderForm.iin).replaceAll('-', '') && (i.fileTypeCode === '1' || i.fileTypeCode === '2'),
2835
+ i => i.iin === String(this.formStore.policyholderForm.iin).replaceAll('-', '') && (i.fileTypeCode === '1' || i.fileTypeCode === '2' || i.fileTypeCode === '4'),
2835
2836
  );
2836
2837
  if (taskId === '0') {
2837
2838
  this.showToaster('error', this.t('toaster.needToRunStatement'), 2000);
@@ -3779,7 +3780,7 @@ export const useDataStore = defineStore('data', {
3779
3780
  }
3780
3781
  },
3781
3782
  hasJobSection(whichForm: keyof typeof StoreMembers) {
3782
- if (this.isLifetrip || this.isPension) return false;
3783
+ if (this.isLifetrip || this.isPension || this.isBalam) return false;
3783
3784
  switch (whichForm) {
3784
3785
  case this.formStore.beneficiaryFormKey:
3785
3786
  case this.formStore.beneficialOwnerFormKey:
package/store/rules.ts CHANGED
@@ -285,4 +285,10 @@ export const rules = {
285
285
  }
286
286
  return true;
287
287
  },
288
+ lengthLimit(v: any, limit: number) {
289
+ if (!!v && typeof v === 'string' && v.length <= limit) {
290
+ return true;
291
+ }
292
+ return t('rules.lengthLimit', { len: limit });
293
+ },
288
294
  };
package/types/enum.ts CHANGED
@@ -104,6 +104,7 @@ export enum Roles {
104
104
  AccountantDirector = 'AccountantDirector',
105
105
  ManagerAuletti = 'ManagerAuletti',
106
106
  HeadOfDso = 'HeadOfDso',
107
+ URSP = 'URSP',
107
108
  }
108
109
 
109
110
  export enum Statuses {
package/types/index.ts CHANGED
@@ -30,7 +30,8 @@ export type Projects =
30
30
  | 'uu'
31
31
  | 'auletti'
32
32
  | 'lka-auletti'
33
- | 'prepensionannuity';
33
+ | 'prepensionannuity'
34
+ | 'balam';
34
35
  export type MemberKeys = keyof ReturnType<typeof useFormStore>;
35
36
  export type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
36
37
  export type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';