hl-core 0.0.10-beta.63 → 0.0.10-beta.65

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.
@@ -834,6 +834,9 @@ export class ProductConditions {
834
834
  contractEndDate: string | null;
835
835
  currency: Value;
836
836
  accureStartEducationCapital: boolean;
837
+ hasEnhancedGift: boolean | null;
838
+ isCalculated: boolean | null;
839
+ managerHelped: boolean;
837
840
 
838
841
  constructor(
839
842
  insuranceCase = null,
@@ -885,6 +888,9 @@ export class ProductConditions {
885
888
  contractEndDate = null,
886
889
  currency = new Value(),
887
890
  accureStartEducationCapital = false,
891
+ hasEnhancedGift = false,
892
+ isCalculated = false,
893
+ managerHelped = true,
888
894
  ) {
889
895
  this.requestedSumInsuredInDollar = null;
890
896
  this.insurancePremiumPerMonthInDollar = null;
@@ -940,6 +946,9 @@ export class ProductConditions {
940
946
  this.contractEndDate = contractEndDate;
941
947
  this.currency = currency;
942
948
  this.accureStartEducationCapital = accureStartEducationCapital;
949
+ this.hasEnhancedGift = hasEnhancedGift;
950
+ this.isCalculated = isCalculated;
951
+ this.managerHelped = managerHelped;
943
952
  }
944
953
 
945
954
  getSingleTripDays() {
@@ -1139,6 +1148,10 @@ export class DataStoreClass {
1139
1148
  sportsTypes: Value[];
1140
1149
  purposes: Value[];
1141
1150
  programType: Value[];
1151
+ checkWithESBD: boolean;
1152
+ isDirty: boolean;
1153
+ quitDialog: boolean;
1154
+ pendingTab: any;
1142
1155
  constructor() {
1143
1156
  this.projectConfig = null;
1144
1157
  this.filters = {
@@ -1342,6 +1355,10 @@ export class DataStoreClass {
1342
1355
  this.purposes = [];
1343
1356
  this.workTypes = [];
1344
1357
  this.sportsTypes = [];
1358
+ this.checkWithESBD = false;
1359
+ this.isDirty = false;
1360
+ this.quitDialog = false;
1361
+ this.pendingTab = null;
1345
1362
  }
1346
1363
  }
1347
1364
 
@@ -112,6 +112,7 @@ export const constants = Object.freeze({
112
112
  insuredsList: 34,
113
113
  questionnaireInsured: 35,
114
114
  invoicePayment: 36,
115
+ insuredsListDopik: 37,
115
116
  },
116
117
  fileTypes: {
117
118
  pdf: 'application/pdf',
@@ -23,6 +23,7 @@ export class Masks {
23
23
  spacedNumbers: string = '### ### ### ### ### ### ###';
24
24
  iin: string = '###-###-###-###';
25
25
  phone: string = '+7 (7##) ### ## ##';
26
+ phoneNonResident: string = '+###############';
26
27
  date: string = '##.##.####';
27
28
  post: string = '######';
28
29
  threeDigit: string = '###';
@@ -47,6 +48,16 @@ export const getNumber = (number: string) => {
47
48
  return number ? Number(number.replace(/\s/g, '')) : null;
48
49
  };
49
50
 
51
+ export const parseAmount = (value: number | string | null): number | null => {
52
+ if (value === null) return null;
53
+ if (typeof value === 'number') return value;
54
+
55
+ const normalized = value.replace(/\s+/g, '');
56
+ const num = Number(normalized);
57
+
58
+ return Number.isNaN(num) ? null : num;
59
+ };
60
+
50
61
  export const formatDate = (date: string) => {
51
62
  if (date) {
52
63
  const data = date.split('.');
@@ -821,9 +832,23 @@ export class RoleController {
821
832
  if (dataStore.isCritical || product === 'criticalillness') return this.isBranchDirector();
822
833
  return false;
823
834
  })();
824
- return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
835
+ return (
836
+ this.isManager() ||
837
+ this.isSalesManager() ||
838
+ this.isChiefSalesManager() ||
839
+ this.isChiefManagerNSZH() ||
840
+ this.isAgent() ||
841
+ this.isAgentMycar() ||
842
+ this.isManagerHalykBank() ||
843
+ this.isServiceManager() ||
844
+ this.isAgentAuletti() ||
845
+ hasAccessByProduct
846
+ );
825
847
  };
826
848
  isManager = () => this.isRole(constants.roles.Manager);
849
+ isSalesManager = () => this.isRole(constants.roles.SalesManager);
850
+ isChiefSalesManager = () => this.isRole(constants.roles.ChiefSalesManager);
851
+ isChiefManagerNSZH = () => this.isRole(constants.roles.ChiefManagerNSZH);
827
852
  isCompliance = () => this.isRole(constants.roles.Compliance);
828
853
  isAdmin = () => this.isRole(constants.roles.Admin);
829
854
  isJurist = () => this.isRole(constants.roles.Jurist);
@@ -869,6 +894,9 @@ export class RoleController {
869
894
  isTravelAgent = () => this.isRole(constants.roles.TravelAgent);
870
895
  isHR = () => this.isRole(constants.roles.HR);
871
896
  isReInsurer = () => this.isRole(constants.roles.ReInsurer);
897
+ isSanctioner1 = () => this.isRole(constants.roles.Sanctioner1);
898
+ isSanctioner2 = () => this.isRole(constants.roles.Sanctioner2);
899
+ isSanctioner3 = () => this.isRole(constants.roles.Sanctioner3);
872
900
  hasAccess = () => {
873
901
  const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn() || this.isDsuioOrv() || this.isAuditor();
874
902
  return {
@@ -888,9 +916,12 @@ export class RoleController {
888
916
  this.isHeadAdjuster() ||
889
917
  this.isArchivist() ||
890
918
  this.isSecurity() ||
919
+ this.isSanctioner1() ||
920
+ this.isSanctioner2() ||
921
+ this.isSanctioner3() ||
891
922
  baseAccessRoles,
892
923
  toReinsurance: this.isReInsurer() || this.isAdjuster() || this.isHeadAdjuster() || baseAccessRoles,
893
- toReporting: this.isServiceManager() || baseAccessRoles,
924
+ toReporting: this.isServiceManager() || this.isManager() || this.isSalesManager() || this.isChiefSalesManager() || this.isChiefManagerNSZH() || baseAccessRoles,
894
925
  toDSO:
895
926
  this.isUsns() ||
896
927
  this.isDsuio() ||
@@ -905,7 +936,12 @@ export class RoleController {
905
936
  this.isAccountantDirector() ||
906
937
  baseAccessRoles,
907
938
  toEFO:
939
+ this.isAgentAuletti() ||
940
+ this.isManagerAuletti() ||
908
941
  this.isManager() ||
942
+ this.isSalesManager() ||
943
+ this.isChiefSalesManager() ||
944
+ this.isChiefManagerNSZH() ||
909
945
  this.isAgent() ||
910
946
  this.isAgentMycar() ||
911
947
  this.isManagerHalykBank() ||
@@ -923,7 +959,7 @@ export class RoleController {
923
959
  this.isJurist() ||
924
960
  this.isAccountant() ||
925
961
  this.isBranchDirector() ||
926
- this.isRegionDirector() ||
962
+ this.isRegionDirector() ||
927
963
  this.isUSNSACCINS() ||
928
964
  this.isDsuio() ||
929
965
  this.isAdjuster() ||
@@ -942,6 +978,9 @@ export class RoleController {
942
978
  this.isHR() ||
943
979
  this.isNotAccumulativeSanctionerUSNS() ||
944
980
  this.isReInsurer() ||
981
+ this.isSanctioner1() ||
982
+ this.isSanctioner2() ||
983
+ this.isSanctioner3() ||
945
984
  baseAccessRoles,
946
985
  };
947
986
  };
@@ -43,7 +43,7 @@ const openSettings = async () => {
43
43
 
44
44
  const onLink = async (item: MenuItem) => {
45
45
  if (dataStore.menu.onLink) await dataStore.menu.onLink(item);
46
- if (!dataStore.filters.disabled(item)) dataStore.menu.selectedItem = item;
46
+ if (!dataStore.filters.disabled(item) && !dataStore.isDirty) dataStore.menu.selectedItem = item;
47
47
  };
48
48
 
49
49
  const onBack = async (item: MenuItem) => {
package/locales/kz.json CHANGED
@@ -915,7 +915,8 @@
915
915
  "searchQueryLen": "Лауазымды іздеу кем дегенде {len} таңбаларының сұранысы бойынша жүргізілуі керек",
916
916
  "fixInsSumLimit": "Тіркелген сома {sum}теңгеден аспауы тиіс",
917
917
  "invalidKazakhPassport": "Паспорт нөмері дұрыс емес",
918
- "lengthLimit": "Таңбалар шегі асып кетті. Ұзындығы {len} таңбадан аспайтын мәтінді енгізіңіз"
918
+ "lengthLimit": "Таңбалар шегі асып кетті. Ұзындығы {len} таңбадан аспайтын мәтінді енгізіңіз",
919
+ "dateIncorrect": "Күн дұрыс емес"
919
920
  },
920
921
  "code": "КЭС",
921
922
  "fontSize": "Қаріп өлшемі",
package/locales/ru.json CHANGED
@@ -29,7 +29,14 @@
29
29
  "memberCopy": "Ошибка при копировании данных участников",
30
30
  "memberSave": "Ошибка при сохранении данных участников",
31
31
  "notValidIik": "Некорректный ИИК",
32
- "exceedUploadLimitFile": "Размер файла превышает определенный лимит"
32
+ "401": "Ошибка авторизации. Пожалуйста, войдите в систему снова",
33
+ "403": "`Нет доступа на запрос: {text}",
34
+ "404": "Отсутствует запрашиваемый ресурс",
35
+ "exceedUploadLimitFile": "Размер файла превышает определенный лимит",
36
+ "serverError": "Произошла ошибка на сервере. Попробуйте позже",
37
+ "unknownError": "Произошла непредвиденная ошибка. Пожалуйста, перезагрузите страницу",
38
+ "timeout": "Время ожидания истекло. Проверьте соединение и повторите попытку",
39
+ "networkError": "Нет подключения к сети. Проверьте интернет и попробуйте снова",
33
40
  },
34
41
  "toaster": {
35
42
  "wrongFormatOf": "Некорректный формат \"{text}\"",
@@ -144,6 +151,7 @@
144
151
  "needAttachQuestionnaire": "Нужно вложить анкету для клиентов",
145
152
  "notZeroPremium": "Общая страховая премия не должен быть 0",
146
153
  "requiredFieldsLB": "Обязательные поля: №, Ф.И.О, Пол, Должность, Дата рождения, ИИН, Страховая сумма, Сектор экономики, Признак резеденства",
154
+ "requiredFieldsLBDopik": "Обязательные поля: №, Ф.И.О, Пол, Должность, Дата рождения, ИИН, Страховая сумма, Дата увольнения, Дата начала действия страховой защиты",
147
155
  "duplicateClient": "В списке присутствуют повторяющиеся клиенты",
148
156
  "notParsedDocument": "Не удалось получить данные",
149
157
  "successProfile": "Профиль успешно обновлен",
@@ -272,6 +280,7 @@
272
280
  "exit": "Вы действительно хотите выйти?",
273
281
  "exitApp": "Вы действительно хотите выйти? Данные будут очищены.",
274
282
  "dataWillClear": "Данные будут очищены",
283
+ "dataWillNotSave": "Данные не будут сохранены",
275
284
  "cancel": "Вы действительно хотите отменить заявку?",
276
285
  "clear": "Вы действительно хотите очистить данные участника?",
277
286
  "delete": "Вы действительно хотите удалить участника?",
@@ -895,11 +904,13 @@
895
904
  "sums": "Поле должно содержать только цифры",
896
905
  "iinRight": "ИИН/БИН должен состоять из 12 цифр",
897
906
  "onlySymbols": "Поле не должно содержать число",
898
- "phoneFormat": "Номер телефона должен содержать из 11 чисел",
907
+ "phoneFormat": "Номер телефона должен состоять из 11 цифр",
908
+ "phoneNonResidentFormat": "Телефон должен быть в международном формате + и от 8 до 15 цифр.",
899
909
  "date": "Неправильный формат даты",
900
910
  "age": "Поле должно быть только числом",
901
911
  "exceedDate": "Дата не должна превышать сегодняшнюю дату",
902
912
  "coverPeriod": "Минимальный срок страхования 5 лет",
913
+ "dateIncorrect": "Дата некорректна",
903
914
  "fillData": "Заполните данные",
904
915
  "requestedSumInsuredMycar": "Максимальная сумма не должна превышать 60 млн",
905
916
  "ageMycar": "Пороговое значение по возрасту с 21 по 65",
@@ -1063,7 +1074,7 @@
1063
1074
  "chooseChild": "Выберите ребёнка",
1064
1075
  "addChild": "Добавить ребёнка",
1065
1076
  "addBeneficiary": "Добавить выгодоприобретателя",
1066
- "educationFundConsent": "Согласен на начисление стартового образовательного капитала",
1077
+ "educationFundConsent": "Согласен на начисление стартового образовательного капитала"
1067
1078
  },
1068
1079
  "bankDetailsForm": {
1069
1080
  "title": "Банковские реквизиты",
@@ -1240,5 +1251,8 @@
1240
1251
  "attachNotification": "Вложить уведомление",
1241
1252
  "coverageFrom": "Период действия с",
1242
1253
  "coverageTo": "Период действия до",
1243
- "recoveredFrom": "Восстановлен с"
1254
+ "recoveredFrom": "Восстановлен с",
1255
+ "hint": {
1256
+ "needToFillPolicyholder": "Необходимо заполнить данные страхователя"
1257
+ }
1244
1258
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.63",
3
+ "version": "0.0.10-beta.65",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -1130,6 +1130,8 @@ export const useDataStore = defineStore('data', {
1130
1130
  conditionsData.policyAppDto.premiumInCurrency = getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
1131
1131
  conditionsData.policyAppDto.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
1132
1132
  conditionsData.policyAppDto.currencyExchangeRate = this.currencies.usd;
1133
+ conditionsData.policyAppDto.hasEnhancedGift = !!this.formStore.productConditionsForm.hasEnhancedGift;
1134
+ conditionsData.policyAppDto.managerHelped = this.formStore.productConditionsForm.managerHelped;
1133
1135
  }
1134
1136
  if (this.isGons) {
1135
1137
  conditionsData.policyAppDto.premiumInCurrency =
@@ -1276,8 +1278,10 @@ export const useDataStore = defineStore('data', {
1276
1278
  try {
1277
1279
  this.isLoading = loading;
1278
1280
  await this.api.setINSISWorkData(data);
1281
+ return true;
1279
1282
  } catch (err) {
1280
1283
  ErrorHandler(err);
1284
+ return false;
1281
1285
  } finally {
1282
1286
  this.isLoading = false;
1283
1287
  }
@@ -1940,6 +1944,8 @@ export const useDataStore = defineStore('data', {
1940
1944
  calculationData.premiumInCurrency = getNumber(String(this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar));
1941
1945
  calculationData.amountInCurrency = getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
1942
1946
  calculationData.currencyExchangeRate = this.currencies.usd;
1947
+ calculationData.hasEnhancedGift = this.formStore.productConditionsForm.hasEnhancedGift;
1948
+ calculationData.managerHelped = this.formStore.productConditionsForm.managerHelped;
1943
1949
  }
1944
1950
  if (this.isGons || product === 'gons') {
1945
1951
  calculationData.premiumInCurrency =
@@ -2007,7 +2013,11 @@ export const useDataStore = defineStore('data', {
2007
2013
  if (this.isLifeBusiness || product === 'lifebusiness' || this.isGns || product === 'gns') {
2008
2014
  this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpacesAfterComma(calculationResponse.mainPremiumWithCommission as number);
2009
2015
  this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.mainInsSum === 0 ? null : calculationResponse.mainInsSum);
2010
- this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
2016
+ const updatedCovers = calculationResponse.addCovers.map((item: any) => ({
2017
+ ...item,
2018
+ premium: 0,
2019
+ }));
2020
+ this.formStore.additionalInsuranceTermsWithout = updatedCovers;
2011
2021
  if (calculationResponse.agentCommission) {
2012
2022
  this.formStore.productConditionsForm.agentCommission = calculationResponse.agentCommission;
2013
2023
  }
@@ -2048,6 +2058,9 @@ export const useDataStore = defineStore('data', {
2048
2058
  this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar = this.getNumberWithSpaces(result.value / this.currencies.usd);
2049
2059
  }
2050
2060
  }
2061
+ if(this.isKazyna) {
2062
+ this.formStore.productConditionsForm.isCalculated = applicationData.policyAppDto.isCalculated;
2063
+ }
2051
2064
  if (this.formStore.productConditionsForm.insurancePremiumPerMonth != null) {
2052
2065
  this.formStore.productConditionsForm.requestedSumInsured = this.isGons ? this.getNumberWithSpacesAfterComma(result.value) : this.getNumberWithSpaces(result.value);
2053
2066
  this.formStore.productConditionsForm.insurancePremiumPerMonth = this.isGons
@@ -2111,6 +2124,9 @@ export const useDataStore = defineStore('data', {
2111
2124
  }
2112
2125
  this.isLoading = false;
2113
2126
  },
2127
+ async setIsNotCalculated(processInstanceId: string | number) {
2128
+ await this.api.setIsNotCalculated(processInstanceId);
2129
+ },
2114
2130
  async getDividendSchedule() {
2115
2131
  this.isLoading = true;
2116
2132
  try {
@@ -2533,6 +2549,9 @@ export const useDataStore = defineStore('data', {
2533
2549
  if (applicationData.policyAppDto.currency === 'USD' && applicationData.policyAppDto.amount !== null && applicationData.policyAppDto.premium !== null) {
2534
2550
  this.currencies.usd = applicationData.policyAppDto.currencyExchangeRate;
2535
2551
  }
2552
+ this.formStore.productConditionsForm.hasEnhancedGift = applicationData.policyAppDto.hasEnhancedGift;
2553
+ this.formStore.productConditionsForm.isCalculated = applicationData.policyAppDto.isCalculated;
2554
+ this.formStore.productConditionsForm.managerHelped = applicationData.policyAppDto.managerHelped ?? false;
2536
2555
  }
2537
2556
  const riskGroup = this.riskGroup.find(item => {
2538
2557
  if (applicationData.policyAppDto.riskGroup == 0) {
@@ -2949,6 +2968,7 @@ export const useDataStore = defineStore('data', {
2949
2968
  link.href = url;
2950
2969
  switch (documentType) {
2951
2970
  case constants.documentTypes.insuredsList:
2971
+ case constants.documentTypes.insuredsListDopik:
2952
2972
  link.setAttribute('download', 'РФ-ДС-028 Список застрахованных ГССЖ_ГНС, изд.1.xls');
2953
2973
  break;
2954
2974
  case constants.documentTypes.statement:
@@ -3275,7 +3295,8 @@ export const useDataStore = defineStore('data', {
3275
3295
  return false;
3276
3296
  }
3277
3297
  if (this.isInitiator()) {
3278
- await this.setINSISWorkData();
3298
+ const isSetInsisWorkData = await this.setINSISWorkData();
3299
+ if (isSetInsisWorkData === false) return false;
3279
3300
  }
3280
3301
  } else {
3281
3302
  this.isLoading = false;
@@ -3805,11 +3826,8 @@ export const useDataStore = defineStore('data', {
3805
3826
  'clientData.addTaxResidency',
3806
3827
  'clientData.gender',
3807
3828
  'clientData.placeOfBirth',
3808
- 'clientData.authoritedPerson.actualAddress',
3809
3829
  'clientData.authoritedPerson.bankInfo',
3810
3830
  'clientData.authoritedPerson.economySectorCode',
3811
- 'clientData.authoritedPerson.legalAddress',
3812
- 'clientData.authoritedPerson.taxResidentCountry',
3813
3831
  'clientData.authoritedPerson.addTaxResidency',
3814
3832
  ]);
3815
3833
  policyholder.clientData.authoritedPerson.gender = policyholder.clientData.authoritedPerson.gender.nameRu === 'Мужской' ? 1 : 2;
@@ -3846,10 +3864,13 @@ export const useDataStore = defineStore('data', {
3846
3864
  this.sendToParent(constants.postActions.toHomePage, this.t('toaster.noSuchProduct'));
3847
3865
  return;
3848
3866
  }
3849
-
3850
3867
  this.formStore.applicationData = applicationData;
3851
3868
  this.formStore.regNumber = applicationData.regNumber;
3852
- this.formStore.additionalInsuranceTerms = applicationData.addCoverDto;
3869
+ const updatedCovers = applicationData.addCoverDto.map((item: any) => ({
3870
+ ...item,
3871
+ premium: 0,
3872
+ }));
3873
+ this.formStore.additionalInsuranceTerms = updatedCovers;
3853
3874
  this.formStore.canBeClaimed = await this.api.isClaimTask(taskId);
3854
3875
  this.formStore.applicationTaskId = taskId;
3855
3876
  this.formStore.RegionPolicy.nameRu = applicationData.insisWorkDataApp.regionPolicyName;
@@ -4166,7 +4187,8 @@ export const useDataStore = defineStore('data', {
4166
4187
  const areValid = this.formStore.SaleChanellPolicy.nameRu && this.formStore.RegionPolicy.nameRu && this.formStore.ManagerPolicy.nameRu && this.formStore.AgentData.fullName;
4167
4188
  if (areValid) {
4168
4189
  if (this.isInitiator()) {
4169
- await this.setINSISWorkData();
4190
+ const isSetInsisWorkData = await this.setINSISWorkData();
4191
+ if (isSetInsisWorkData === false) return false;
4170
4192
  }
4171
4193
  } else {
4172
4194
  this.isLoading = false;
@@ -4243,6 +4265,18 @@ export const useDataStore = defineStore('data', {
4243
4265
  return null;
4244
4266
  }
4245
4267
  },
4268
+ async checkExistProcess(iin: string, processCode: number) {
4269
+ try {
4270
+ const response = await this.api.checkExistProcess(iin, processCode);
4271
+ if (!!response) {
4272
+ ErrorHandler(response);
4273
+ }
4274
+ return !!response;
4275
+ } catch (err) {
4276
+ ErrorHandler(err);
4277
+ return true;
4278
+ }
4279
+ },
4246
4280
  async checkIIN(iin: string) {
4247
4281
  try {
4248
4282
  const response = await this.api.checkIIN(iin);
@@ -4300,15 +4334,19 @@ export const useDataStore = defineStore('data', {
4300
4334
  },
4301
4335
  getClientData(clientData: GroupMember) {
4302
4336
  this.formStore.lfb.policyholder.clientData = clientData;
4303
- this.formStore.lfb.policyholder.clientData.authoritedPerson = clientData.authoritedPerson;
4304
4337
  this.formStore.lfb.policyholder.clientData.iin = reformatIin(clientData.iin);
4305
- this.formStore.lfb.policyholder.clientData.authoritedPerson.iin = reformatIin(clientData.authoritedPerson.iin);
4306
- this.formStore.lfb.policyholder.clientData.authoritedPerson.authorityDetails.date = reformatDate(clientData.authoritedPerson.authorityDetails.date as string);
4307
- this.formStore.lfb.policyholder.clientData.authoritedPerson.birthDate = reformatDate(clientData.authoritedPerson.birthDate) ?? '';
4308
- this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.issuedOn = reformatDate(clientData.authoritedPerson.identityDocument.issuedOn) ?? '';
4309
- this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.validUntil = reformatDate(clientData.authoritedPerson.identityDocument.validUntil) ?? '';
4338
+ this.formStore.lfb.policyholder.clientData.authoritedPerson = clientData.authoritedPerson;
4339
+ const person = this.formStore.lfb.policyholder.clientData.authoritedPerson;
4340
+ person.iin = reformatIin(clientData.authoritedPerson.iin);
4341
+ person.authorityDetails.date = reformatDate(clientData.authoritedPerson.authorityDetails.date as string);
4342
+ person.birthDate = reformatDate(clientData.authoritedPerson.birthDate) ?? '';
4343
+ person.identityDocument.issuedOn = reformatDate(clientData.authoritedPerson.identityDocument.issuedOn) ?? '';
4344
+ person.identityDocument.validUntil = reformatDate(clientData.authoritedPerson.identityDocument.validUntil) ?? '';
4310
4345
  const gender = this.gender.find((i: Value) => i.id === Number(clientData.authoritedPerson.gender));
4311
- this.formStore.lfb.policyholder.clientData.authoritedPerson.gender = gender ? gender : new Value();
4346
+ person.gender = gender ? gender : new Value();
4347
+ person.legalAddress ??= new Address();
4348
+ person.actualAddress ??= new Address();
4349
+ person.taxResidentCountry ??= new Value();
4312
4350
  },
4313
4351
  async getParentApplication(bin: string) {
4314
4352
  try {
package/store/rules.ts CHANGED
@@ -126,6 +126,14 @@ export const rules = {
126
126
  }
127
127
  },
128
128
  ],
129
+ phoneNonResidentFormat: [
130
+ (v: any) => {
131
+ if (v === null || v === '') {
132
+ return true;
133
+ }
134
+ return /^\+[1-9]\d{7,14}$/.test(v) ? true : t('rules.phoneNonResidentFormat');
135
+ },
136
+ ],
129
137
  date: [
130
138
  (v: any) => {
131
139
  if (v === null || v == '') return true;
@@ -335,4 +343,11 @@ export const rules = {
335
343
  }
336
344
  return true;
337
345
  },
346
+ checkDateIsAfterOrSame(v: any, minDate: string) {
347
+ if (!v || !minDate) return true;
348
+ const [d, m, y] = v.split('.');
349
+ const entered = new Date(Number(y), Number(m) - 1, Number(d));
350
+ const minNewDate = new Date(minDate);
351
+ return entered >= minNewDate || t('rules.dateIncorrect');
352
+ },
338
353
  };
package/types/enum.ts CHANGED
@@ -85,6 +85,9 @@ export enum PostActions {
85
85
 
86
86
  export enum Roles {
87
87
  Manager = 'Manager',
88
+ SalesManager = 'SalesManager',
89
+ ChiefSalesManager = 'ChiefSalesManager',
90
+ ChiefManagerNSZH = 'ChiefManagerNSZH',
88
91
  Admin = 'Admin',
89
92
  Jurist = 'Jurist',
90
93
  Underwriter = 'Underwriter',
@@ -130,6 +133,9 @@ export enum Roles {
130
133
  HR = 'HR',
131
134
  NotAccumulativeSanctionerUSNS = 'NotAccumulativeSanctionerUSNS',
132
135
  ReInsurer = 'ReInsurer',
136
+ Sanctioner1 = 'Sanctioner1',
137
+ Sanctioner2 = 'Sanctioner2',
138
+ Sanctioner3 = 'Sanctioner3',
133
139
  }
134
140
 
135
141
  export enum Statuses {
package/types/index.ts CHANGED
@@ -586,6 +586,9 @@ export type PolicyAppDto = {
586
586
  calcDate?: string;
587
587
  mainPremiumWithCommission?: number;
588
588
  accureStartEducationCapital?: boolean;
589
+ hasEnhancedGift?: boolean | null;
590
+ isCalculated?: boolean | null;
591
+ managerHelped?: boolean;
589
592
  };
590
593
 
591
594
  export type InsisWorkDataApp = {