hl-core 0.0.10-beta.25 → 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) => {
@@ -991,22 +1001,6 @@ export class ApiClass {
991
1001
  url: `${this.pensionannuityNew.base}/SetEnpfSharedId/${sharedId}/${infoId}`,
992
1002
  });
993
1003
  },
994
- calcParentContractSums: async (data: any) => {
995
- return await this.axiosCall<void>({
996
- method: Methods.POST,
997
- baseURL: getStrValuePerEnv('efoBaseApi'),
998
- url: `${this.pensionannuityNew.base}/CalcParentContractSums`,
999
- data: data,
1000
- });
1001
- },
1002
- reCalculateRefund: async (data: any) => {
1003
- return await this.axiosCall<void>({
1004
- method: Methods.POST,
1005
- baseURL: getStrValuePerEnv('efoBaseApi'),
1006
- url: `${this.pensionannuityNew.base}/ReCalculateRefund`,
1007
- data: data,
1008
- });
1009
- },
1010
1004
  };
1011
1005
 
1012
1006
  externalServices = {
@@ -1101,16 +1095,6 @@ export class ApiClass {
1101
1095
  },
1102
1096
  });
1103
1097
  },
1104
- getFileNew: async (id: string) => {
1105
- return await this.axiosCall({
1106
- method: Methods.GET,
1107
- url: `${this.file.base}/api/GeneralSign/DownloadFile/${id}`,
1108
- responseType: 'arraybuffer',
1109
- headers: {
1110
- 'Content-Type': 'application/pdf',
1111
- },
1112
- });
1113
- },
1114
1098
  deleteFile: async (data: any) => {
1115
1099
  return await this.axiosCall<void>({
1116
1100
  method: Methods.POST,
@@ -1157,12 +1141,5 @@ export class ApiClass {
1157
1141
  data: data,
1158
1142
  });
1159
1143
  },
1160
- setActualEnpf: async (data: { processId: string; isOnlineEnpfAgreement: boolean }) => {
1161
- return await this.axiosCall<void>({
1162
- method: Methods.POST,
1163
- url: `${this.file.base}/api/GeneralSign/SetActualEnpfAgreement`,
1164
- data: data,
1165
- });
1166
- },
1167
1144
  };
1168
1145
  }
@@ -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')"
@@ -828,8 +828,7 @@ export default {
828
828
  const memberStore = useMemberStore();
829
829
  const whichForm = computed(() => route.query.tab as keyof typeof StoreMembers);
830
830
  const whichIndex = computed(() => route.query.i as string);
831
- const getMember = (whichForm: keyof typeof StoreMembers | 'slaveInsuredForm', whichIndex?: string) =>
832
- memberStore.getMemberFromStore(whichForm, Number((whichIndex ? whichIndex : '0') as string))!;
831
+ const getMember = (whichForm: keyof typeof StoreMembers, whichIndex?: string) => memberStore.getMemberFromStore(whichForm, Number((whichIndex ? whichIndex : '0') as string))!;
833
832
  const member = ref(getMember(whichForm.value, whichIndex.value));
834
833
  const selectedFamilyMember = ref<Api.GKB.BirthInfo>({});
835
834
  const isPanelOpen = ref<boolean>(false);
@@ -844,7 +843,7 @@ export default {
844
843
  const isPositionPanelOpen = ref<boolean>(false);
845
844
  const isPanelLoading = ref<boolean>(false);
846
845
  const isChangingMember = ref<boolean>(false);
847
- const isNonResident = computed(() => !useEnv().isProduction && dataStore.isPension && member.value.signOfResidency?.ids === '500011.2');
846
+ const isNonResident = computed(() => !useEnv().isProduction && dataStore.isPension && member.value.signOfResidency.ids === '500011.2');
848
847
  const familyDialog = ref<boolean>(false);
849
848
  const deletionDialog = ref<boolean>(false);
850
849
  const documentChooseDialog = ref<boolean>(false);
@@ -870,9 +869,7 @@ export default {
870
869
  const hasOtp = computed(() => member.value.otpCode && member.value.otpCode.length === useMask().otp.length);
871
870
  const isDisabled = computed(() => !memberStore.isStatementEditible(whichForm.value));
872
871
  const isTask = computed(() => route.params.taskId === '0' || dataStore.isTask());
873
- const isIinPhoneDisabled = computed(() =>
874
- dataStore.isPension ? !!member.value.hasAgreement && member.value.phoneNumber && member.value.phoneNumber.length == 11 && !!member.value.iin : member.value.hasAgreement,
875
- );
872
+ const isIinPhoneDisabled = computed(() => member.value.hasAgreement);
876
873
  const isFromGBD = computed(() => !!member.value.gosPersonData);
877
874
  const gbdDocuments = computed(() => {
878
875
  if (hasGBDFLDocSelection && !!member.value.gosPersonData && !!member.value.gosPersonData.documents) {
@@ -899,7 +896,6 @@ export default {
899
896
  case formStore.policyholdersRepresentativeFormKey:
900
897
  return route.params.taskId !== '0';
901
898
  default:
902
- if (route.query.tab === 'slaveInsuredForm') return true;
903
899
  return false;
904
900
  }
905
901
  };
@@ -1007,7 +1003,7 @@ export default {
1007
1003
  (whichForm.value === formStore.beneficiaryFormKey && member.value.iin !== formStore.policyholderForm.iin) ||
1008
1004
  (dataStore.isLifetrip && whichForm.value === formStore.insuredFormKey && member.value.isInsuredUnderage),
1009
1005
  );
1010
- const hasWorkPositionDict = dataStore.isBaiterek && dataStore.isEfoParent;
1006
+ const hasWorkPositionDict = dataStore.isBaiterek;
1011
1007
 
1012
1008
  const birthDateRule = computed(() => {
1013
1009
  const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
@@ -1086,13 +1082,12 @@ export default {
1086
1082
  case formStore.policyholderFormKey:
1087
1083
  return route.params.taskId === '0';
1088
1084
  case formStore.insuredFormKey:
1085
+ if (dataStore.isPension && formStore.applicationData.processCode === 19) return route.params.taskId === '0';
1089
1086
  return route.query.id === '0';
1090
1087
  case formStore.policyholdersRepresentativeFormKey:
1091
1088
  case formStore.beneficiaryFormKey:
1092
1089
  case formStore.beneficialOwnerFormKey:
1093
1090
  return route.query.id === '0';
1094
- default:
1095
- if (dataStore.isPension && formStore.applicationData.processCode === 2 && route.query.tab === 'slaveInsuredForm') return true;
1096
1091
  }
1097
1092
  };
1098
1093
  const otpCondition = computed(() => {
@@ -1527,7 +1522,6 @@ export default {
1527
1522
  };
1528
1523
 
1529
1524
  const getContragentClick = async (contragent: ContragentType) => {
1530
- isButtonLoading.value = true;
1531
1525
  await dataStore.serializeContragentData(member.value, contragent);
1532
1526
  fioChooseDialog.value = false;
1533
1527
  isButtonLoading.value = false;
@@ -1671,40 +1665,17 @@ export default {
1671
1665
  }
1672
1666
  }
1673
1667
  }
1674
- if (whichForm.value === formStore.insuredFormKey || memberFromApplicaiton.processInstanceId === formStore.applicationData.slave?.processInstanceId) {
1668
+ if (whichForm.value === formStore.insuredFormKey) {
1675
1669
  wasInsuredAction.value = true;
1676
1670
  if (dataStore.isPension) {
1677
- if (route.query.tab === 'slaveInsuredForm') {
1678
- formStore.applicationData.slave.pensionApp = {
1679
- ...formStore.applicationData.slave.pensionApp,
1680
- account: member.value.bankInfo.iik,
1681
- bankBik: member.value.bankInfo.bik,
1682
- bankBin: member.value.bankInfo.bankName.ids,
1683
- bankId: member.value.bankInfo.bankName.id,
1684
- bankName: member.value.bankInfo.bankName.nameRu,
1685
- guaranteedPeriod: formStore.applicationData.slave.pensionApp.guaranteedPeriod ?? 0,
1686
- amount: formStore.applicationData.slave.pensionApp.amount ?? 0,
1687
- compulsoryContractAmount: formStore.applicationData.slave.pensionApp.compulsoryContractAmount ?? 0,
1688
- voluntaryContractAmount: formStore.applicationData.slave.pensionApp.voluntaryContractAmount ?? 0,
1689
- ownFundsRaisAmount: formStore.applicationData.slave.pensionApp.ownFundsRaisAmount ?? 0,
1690
- compulsoryProfContractAmount: formStore.applicationData.slave.pensionApp.compulsoryProfContractAmount ?? 0,
1691
- };
1692
- } else {
1693
- formStore.applicationData.pensionApp = {
1694
- ...formStore.applicationData.pensionApp,
1695
- account: member.value.bankInfo.iik,
1696
- bankBik: member.value.bankInfo.bik,
1697
- bankBin: member.value.bankInfo.bankName.ids,
1698
- bankId: member.value.bankInfo.bankName.id,
1699
- bankName: member.value.bankInfo.bankName.nameRu,
1700
- guaranteedPeriod: formStore.applicationData.pensionApp.guaranteedPeriod ?? 0,
1701
- amount: formStore.applicationData.pensionApp.amount ?? 0,
1702
- compulsoryContractAmount: formStore.applicationData.pensionApp.compulsoryContractAmount ?? 0,
1703
- voluntaryContractAmount: formStore.applicationData.pensionApp.voluntaryContractAmount ?? 0,
1704
- ownFundsRaisAmount: formStore.applicationData.pensionApp.ownFundsRaisAmount ?? 0,
1705
- compulsoryProfContractAmount: formStore.applicationData.pensionApp.compulsoryProfContractAmount ?? 0,
1706
- };
1707
- }
1671
+ formStore.applicationData.pensionApp = {
1672
+ ...formStore.applicationData.pensionApp,
1673
+ account: member.value.bankInfo.iik,
1674
+ bankBik: member.value.bankInfo.bik,
1675
+ bankBin: member.value.bankInfo.bankName.ids,
1676
+ bankId: member.value.bankInfo.bankName.id,
1677
+ bankName: member.value.bankInfo.bankName.nameRu,
1678
+ };
1708
1679
  const data = {
1709
1680
  ...formStore.applicationData.pensionApp,
1710
1681
  transferContractCompany: formStore.applicationData.pensionApp.transferContractCompany?.nameRu ?? null,
@@ -1712,7 +1683,6 @@ export default {
1712
1683
  const isApplicationSaved = await dataStore.setApplication(data);
1713
1684
  if (isApplicationSaved === false) return;
1714
1685
  dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
1715
- await dataStore.saveMember(member.value, 'Client', memberFromApplicaiton);
1716
1686
  }
1717
1687
  }
1718
1688
  await router.replace({
@@ -1800,7 +1770,7 @@ export default {
1800
1770
  isSubmittingForm.value = false;
1801
1771
  return;
1802
1772
  }
1803
- if (formStore.applicationData.pensionApp && whichForm.value === 'insuredForm') {
1773
+ if (formStore.applicationData.pensionApp) {
1804
1774
  formStore.applicationData.pensionApp.account = member.value.bankInfo.iik;
1805
1775
  formStore.applicationData.pensionApp.bankBik = member.value.bankInfo.bik;
1806
1776
  formStore.applicationData.pensionApp.bankBin = member.value.bankInfo.bin;
@@ -1821,7 +1791,7 @@ export default {
1821
1791
  isSubmittingForm.value = false;
1822
1792
  return;
1823
1793
  }
1824
- if (formStore.applicationData.pensionApp && whichForm.value === 'insuredForm') {
1794
+ if (formStore.applicationData.pensionApp) {
1825
1795
  formStore.applicationData.pensionApp.account = member.value.bankInfo.iik;
1826
1796
  formStore.applicationData.pensionApp.bankBik = member.value.bankInfo.bik;
1827
1797
  formStore.applicationData.pensionApp.bankBin = member.value.bankInfo.bin;
@@ -2007,10 +1977,12 @@ export default {
2007
1977
  member.value.documentDate = reformatDate(userDocument.issueDate);
2008
1978
  member.value.documentExpire = reformatDate(userDocument.expireDate);
2009
1979
  }
1980
+
2010
1981
  // const filteredDocuments: DocumentItem[] = dataStore.getFilesByIIN(member.value.iin!.replace(/-/g, '')) as DocumentItem[];
2011
1982
  // if (filteredDocuments && filteredDocuments.length) memberDocument.value = filteredDocuments[0];
2012
1983
  }
2013
1984
  await setDefaultValues();
1985
+ if (Number(formStore.applicationData.processCode) === 4) dataStore.members.insuredApp.isMultiple = true;
2014
1986
  if (hasWorkPositionDict && member.value.positionCode === null) member.value.jobPosition = null;
2015
1987
  };
2016
1988
  onMounted(async () => {
@@ -2060,7 +2032,7 @@ export default {
2060
2032
  );
2061
2033
 
2062
2034
  const onIinInput = () => {
2063
- if (!!member.value.iin && member.value.iin.length === useMask().iin.length && memberSetting.value?.isMultiple === true) {
2035
+ if (!!member.value.iin && member.value.iin.length === useMask().iin.length && memberSetting.value.isMultiple === true) {
2064
2036
  const alreadyInStatement = formStore[whichForm.value as MultipleMember].findIndex((i: Member) => i.iin === member.value.iin);
2065
2037
  if (alreadyInStatement !== -1 && alreadyInStatement !== Number(whichIndex.value)) {
2066
2038
  dataStore.showToaster('error', dataStore.t('toaster.hasAlreadyMember'), 3000);
@@ -2124,17 +2096,15 @@ export default {
2124
2096
  );
2125
2097
  }
2126
2098
  if (dataStore.isPension) {
2127
- if (member.value.bankInfo) {
2128
- watch(
2129
- () => member.value.bankInfo.bankName,
2130
- val => {
2131
- if (val) {
2132
- member.value.bankInfo.bik = val.code as string;
2133
- member.value.bankInfo.bin = reformatIin(val.ids as string);
2134
- }
2135
- },
2136
- );
2137
- }
2099
+ watch(
2100
+ () => member.value.bankInfo.bankName,
2101
+ val => {
2102
+ if (val) {
2103
+ member.value.bankInfo.bik = val.code as string;
2104
+ member.value.bankInfo.bin = reformatIin(val.ids as string);
2105
+ }
2106
+ },
2107
+ );
2138
2108
  watch(
2139
2109
  () => member.value.isDisability,
2140
2110
  val => {