hl-core 0.0.9-beta.1 → 0.0.9-beta.10

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.
Files changed (56) hide show
  1. package/api/index.ts +147 -147
  2. package/api/interceptors.ts +16 -14
  3. package/components/Button/Btn.vue +3 -3
  4. package/components/Complex/ContentBlock.vue +1 -1
  5. package/components/Complex/MessageBlock.vue +26 -0
  6. package/components/Complex/Page.vue +7 -1
  7. package/components/Complex/WhiteBlock.vue +7 -0
  8. package/components/Dialog/Dialog.vue +2 -2
  9. package/components/Dialog/FamilyDialog.vue +5 -5
  10. package/components/Form/FormBlock.vue +25 -27
  11. package/components/Form/FormSection.vue +2 -2
  12. package/components/Form/FormTextSection.vue +3 -3
  13. package/components/Form/FormToggle.vue +3 -3
  14. package/components/Form/ManagerAttachment.vue +55 -42
  15. package/components/Form/ProductConditionsBlock.vue +16 -16
  16. package/components/Input/EmptyFormField.vue +1 -1
  17. package/components/Input/FileInput.vue +0 -1
  18. package/components/Input/RoundedEmptyField.vue +5 -0
  19. package/components/Input/RoundedSelect.vue +13 -0
  20. package/components/Layout/Drawer.vue +2 -1
  21. package/components/Layout/Header.vue +1 -1
  22. package/components/Layout/SettingsPanel.vue +5 -9
  23. package/components/List/ListEmpty.vue +1 -1
  24. package/components/Menu/MenuHover.vue +1 -1
  25. package/components/Menu/MenuNav.vue +1 -1
  26. package/components/Menu/MenuNavItem.vue +4 -4
  27. package/components/Pages/Anketa.vue +12 -17
  28. package/components/Pages/Auth.vue +9 -9
  29. package/components/Pages/ContragentForm.vue +505 -0
  30. package/components/Pages/Documents.vue +5 -5
  31. package/components/Pages/InvoiceInfo.vue +1 -1
  32. package/components/Pages/MemberForm.vue +35 -28
  33. package/components/Pages/ProductAgreement.vue +1 -3
  34. package/components/Pages/ProductConditions.vue +13 -18
  35. package/components/Panel/PanelHandler.vue +20 -15
  36. package/components/Panel/PanelSelectItem.vue +3 -3
  37. package/components/Utilities/IconBorder.vue +17 -0
  38. package/composables/axios.ts +1 -1
  39. package/composables/classes.ts +5 -7
  40. package/composables/constants.ts +5 -0
  41. package/composables/index.ts +30 -4
  42. package/composables/styles.ts +19 -9
  43. package/configs/i18n.ts +0 -2
  44. package/layouts/default.vue +5 -2
  45. package/layouts/full.vue +1 -1
  46. package/locales/ru.json +62 -2
  47. package/nuxt.config.ts +1 -1
  48. package/package.json +12 -21
  49. package/pages/500.vue +2 -2
  50. package/pages/Token.vue +1 -0
  51. package/plugins/helperFunctionsPlugins.ts +6 -7
  52. package/store/data.store.ts +54 -37
  53. package/store/rules.ts +11 -2
  54. package/types/index.ts +40 -26
  55. package/components/Button/BtnIcon.vue +0 -47
  56. package/locales/kz.json +0 -585
@@ -39,12 +39,14 @@ export const useDataStore = defineStore('data', {
39
39
  isBaiterek: state => state.product === 'baiterek',
40
40
  isBolashak: state => state.product === 'bolashak',
41
41
  isMycar: state => state.product === 'mycar',
42
+ isLifeBusiness: state => state.product === 'lifebusiness',
42
43
  isLifetrip: state => state.product === 'lifetrip',
43
44
  isLiferenta: state => state.product === 'liferenta',
44
45
  isGons: state => state.product === 'gons',
45
46
  isKazyna: state => state.product === 'halykkazyna',
46
47
  isCalculator: state => state.product === 'calculator',
47
- isComplianceWindow: state => state.product === 'compliance',
48
+ isCheckContract: state => state.product === 'checkcontract',
49
+ isCheckContragent: state => state.product === 'checkcontragent',
48
50
  isEveryFormDisabled: state => Object.values(state.formStore.isDisabled).every(i => i === true),
49
51
  hasClientAnketa: state => state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
50
52
  isClientAnketaCondition: state =>
@@ -71,7 +73,7 @@ export const useDataStore = defineStore('data', {
71
73
  childFrame.contentWindow.postMessage({ action: action, value: value }, '*');
72
74
  }
73
75
  },
74
- copyToClipboard(text: any) {
76
+ copyToClipboard(text: unknown) {
75
77
  if (typeof text === 'string' || typeof text === 'number') {
76
78
  if (this.isBridge) {
77
79
  navigator.clipboard.writeText(String(text));
@@ -478,12 +480,15 @@ export const useDataStore = defineStore('data', {
478
480
  }
479
481
  if ('address' in user && user.address && user.address.length) {
480
482
  const userAddress = user.address[0];
481
- const country = this.countries.find(i => i.nameRu?.match(new RegExp(userAddress.countryName, 'i')));
483
+ const countryName = userAddress.countryName;
484
+ if (countryName) {
485
+ const country = this.countries.find(i => i.nameRu?.match(new RegExp(countryName, 'i')));
486
+ member.registrationCountry = country ? country : new Value();
487
+ }
482
488
  const province = this.states.find(i => i.ids === userAddress.stateCode);
483
489
  const localityType = this.localityTypes.find(i => i.nameRu === userAddress.cityTypeName);
484
490
  const city = this.cities.find(i => !!userAddress.cityName && i.nameRu === userAddress.cityName.replace('г.', ''));
485
491
  const region = this.regions.find(i => !!userAddress.regionCode && i.ids == userAddress.regionCode);
486
- member.registrationCountry = country ? country : new Value();
487
492
  member.registrationStreet = userAddress.streetName;
488
493
  member.registrationCity = city ? city : new Value();
489
494
  member.registrationNumberApartment = userAddress.apartmentNumber;
@@ -582,7 +587,7 @@ export const useDataStore = defineStore('data', {
582
587
  this.contragentList = [];
583
588
  }
584
589
  },
585
- async saveContragent(user: Member, whichForm: keyof typeof StoreMembers, whichIndex: number | null, onlySaveAction: boolean = true) {
590
+ async saveContragent(user: Member, whichForm: keyof typeof StoreMembers | 'contragent', whichIndex: number | null, onlySaveAction: boolean = true) {
586
591
  this.isLoading = !onlySaveAction;
587
592
  const hasInsisId = await this.alreadyInInsis(user);
588
593
  if (typeof hasInsisId === 'number') {
@@ -636,7 +641,7 @@ export const useDataStore = defineStore('data', {
636
641
  }))(user);
637
642
  const questionariesData: ContragentQuestionaries[] = Object.values(userQuestionnaires).map(question => {
638
643
  let questName = '';
639
- let questionId = parseInt(String(question.ids)).toString();
644
+ let questionId = parseInt(question.ids as string).toString();
640
645
  if (questionId === '500003') {
641
646
  questName = 'Код сектора экономики';
642
647
  } else if (questionId === '500011') {
@@ -659,11 +664,11 @@ export const useDataStore = defineStore('data', {
659
664
  user.addTaxResidency = new Value();
660
665
  }
661
666
  const addTaxResidency = userResponseQuestionnaires !== null ? userResponseQuestionnaires.find(i => i.questId === '507777') : undefined;
662
- if (user.addTaxResidency.nameRu !== null) {
667
+ if (user.addTaxResidency.nameRu !== null && user.addTaxResidency.ids) {
663
668
  questionariesData.push({
664
669
  id: addTaxResidency ? addTaxResidency.id : 0,
665
670
  contragentId: Number(user.id),
666
- questAnswer: String(user.addTaxResidency.ids ?? ''),
671
+ questAnswer: user.addTaxResidency.ids,
667
672
  questAnswerName: user.addTaxResidency.nameRu,
668
673
  questName: 'Указать если налоговое резиденство выбрано другое',
669
674
  questId: '507777',
@@ -735,7 +740,7 @@ export const useDataStore = defineStore('data', {
735
740
  issuerNameRu: user.documentIssuers.nameRu,
736
741
  note: null,
737
742
  number: user.documentNumber,
738
- type: user.documentType.ids ? String(user.documentType.ids) : '',
743
+ type: user.documentType.ids ? (user.documentType.ids as string) : undefined,
739
744
  typeName: user.documentType.nameRu,
740
745
  serial: null,
741
746
  verifyType: user.verifyType,
@@ -753,13 +758,13 @@ export const useDataStore = defineStore('data', {
753
758
  addressData.push({
754
759
  id: userResponseAddress !== null ? userResponseAddress[0].id : 0,
755
760
  contragentId: Number(user.id),
756
- countryCode: String(user.registrationCountry.ids ?? ''),
761
+ countryCode: user.registrationCountry.ids ?? undefined,
757
762
  countryName: user.registrationCountry.nameRu ?? '',
758
- stateCode: String(user.registrationProvince.ids ?? ''),
763
+ stateCode: user.registrationProvince.ids ?? undefined,
759
764
  stateName: user.registrationProvince.nameRu ?? '',
760
- cityCode: String(user.registrationCity.code ?? ''),
765
+ cityCode: user.registrationCity.code ?? undefined,
761
766
  cityName: user.registrationCity.nameRu ?? '',
762
- regionCode: String(user.registrationRegion.ids ?? ''),
767
+ regionCode: user.registrationRegion.ids ?? undefined,
763
768
  regionName: user.registrationRegion.nameRu,
764
769
  streetName: user.registrationStreet ?? '',
765
770
  kvartal: user.registrationQuarter,
@@ -784,8 +789,12 @@ export const useDataStore = defineStore('data', {
784
789
 
785
790
  const personId = await this.api.saveContragent(data);
786
791
  if (personId > 0) {
787
- await this.getContragentById(personId, whichForm, false, whichIndex);
788
- user.otpTokenId = null;
792
+ if (this.isLKA || whichForm === 'contragent') {
793
+ return personId;
794
+ } else {
795
+ await this.getContragentById(personId, whichForm, false, whichIndex);
796
+ user.otpTokenId = null;
797
+ }
789
798
  } else {
790
799
  return false;
791
800
  }
@@ -942,9 +951,9 @@ export const useDataStore = defineStore('data', {
942
951
  payPeriod: this.formStore.productConditionsForm.coverPeriod,
943
952
  annualIncome: this.formStore.productConditionsForm.annualIncome ? Number(this.formStore.productConditionsForm.annualIncome.replace(/\s/g, '')) : null,
944
953
  indexRateId: this.formStore.productConditionsForm.processIndexRate?.id
945
- ? String(this.formStore.productConditionsForm.processIndexRate.id)
946
- : String(this.processIndexRate.find(i => i.code === '0')?.id ?? ''),
947
- paymentPeriodId: String(this.formStore.productConditionsForm.paymentPeriod.id ?? ''),
954
+ ? this.formStore.productConditionsForm.processIndexRate.id ?? undefined
955
+ : this.processIndexRate.find(i => i.code === '0')?.id ?? undefined,
956
+ paymentPeriodId: this.formStore.productConditionsForm.paymentPeriod.id ?? undefined,
948
957
  lifeMultiply: formatProcents(this.formStore.productConditionsForm.lifeMultiply ?? ''),
949
958
  lifeAdditive: formatProcents(this.formStore.productConditionsForm.lifeAdditive ?? ''),
950
959
  adbMultiply: formatProcents(this.formStore.productConditionsForm.adbMultiply ?? ''),
@@ -962,9 +971,9 @@ export const useDataStore = defineStore('data', {
962
971
  }
963
972
  if (this.isLiferenta) {
964
973
  conditionsData.policyAppDto.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
965
- conditionsData.policyAppDto.annuityTypeId = String(this.formStore.productConditionsForm.typeAnnuityInsurance.id ?? '');
974
+ conditionsData.policyAppDto.annuityTypeId = (this.formStore.productConditionsForm.typeAnnuityInsurance.id as string) ?? undefined;
966
975
  conditionsData.policyAppDto.paymentPeriod = Number(this.formStore.productConditionsForm.termAnnuityPayments);
967
- conditionsData.policyAppDto.annuityPaymentPeriodId = String(this.formStore.productConditionsForm.periodAnnuityPayment.id ?? '');
976
+ conditionsData.policyAppDto.annuityPaymentPeriodId = (this.formStore.productConditionsForm.periodAnnuityPayment.id as string) ?? undefined;
968
977
  }
969
978
  return conditionsData;
970
979
  },
@@ -1052,11 +1061,11 @@ export const useDataStore = defineStore('data', {
1052
1061
  salesChannel: this.formStore.applicationData.insisWorkDataApp.salesChannel,
1053
1062
  salesChannelName: this.formStore.applicationData.insisWorkDataApp.salesChannelName,
1054
1063
  insrType: this.formStore.applicationData.insisWorkDataApp.insrType,
1055
- saleChanellPolicy: String(this.formStore.SaleChanellPolicy.ids ?? ''),
1064
+ saleChanellPolicy: (this.formStore.SaleChanellPolicy.ids as string) ?? undefined,
1056
1065
  saleChanellPolicyName: this.formStore.SaleChanellPolicy.nameRu ?? '',
1057
- regionPolicy: String(this.formStore.RegionPolicy.ids ?? ''),
1066
+ regionPolicy: (this.formStore.RegionPolicy.ids as string) ?? undefined,
1058
1067
  regionPolicyName: this.formStore.RegionPolicy.nameRu ?? '',
1059
- managerPolicy: String(this.formStore.ManagerPolicy.ids),
1068
+ managerPolicy: this.formStore.ManagerPolicy.ids as string,
1060
1069
  managerPolicyName: this.formStore.ManagerPolicy.nameRu ?? '',
1061
1070
  insuranceProgramType: this.formStore.applicationData.insisWorkDataApp.insuranceProgramType,
1062
1071
  };
@@ -1090,7 +1099,7 @@ export const useDataStore = defineStore('data', {
1090
1099
  async getFromApi(whichField: string, whichRequest: string, parameter?: any, reset: boolean = false): Promise<Value[]> {
1091
1100
  const storageValue = JSON.parse(localStorage.getItem(whichField) || 'null');
1092
1101
  const currentHour = new Date().getHours();
1093
- const currentMinutePart = Math.ceil((new Date().getMinutes() + 1) / 15);
1102
+ const currentMinutePart = Math.ceil((new Date().getMinutes() + 1) / (this.isLKA ? 60 : 15));
1094
1103
 
1095
1104
  const getDataCondition = () => {
1096
1105
  if (!storageValue) return true;
@@ -1206,13 +1215,14 @@ export const useDataStore = defineStore('data', {
1206
1215
  return await this.getFromApi('relations', 'getRelationTypes');
1207
1216
  },
1208
1217
  async getProcessIndexRate() {
1209
- return await this.getFromApi('processIndexRate', 'getProcessIndexRate', this.processCode);
1210
- },
1211
- async getProcessCoverTypeSum(type?: any) {
1212
- return await this.getFromApi('processCoverTypeSum', 'getProcessCoverTypeSum', type);
1218
+ if (this.processCode) {
1219
+ return await this.getFromApi('processIndexRate', 'getProcessIndexRate', this.processCode);
1220
+ }
1213
1221
  },
1214
1222
  async getProcessPaymentPeriod() {
1215
- return await this.getFromApi('processPaymentPeriod', 'getProcessPaymentPeriod', this.processCode);
1223
+ if (this.processCode) {
1224
+ return await this.getFromApi('processPaymentPeriod', 'getProcessPaymentPeriod', this.processCode);
1225
+ }
1216
1226
  },
1217
1227
  async getQuestionRefs(id?: string) {
1218
1228
  return await this.getFromApi('questionRefs', 'getQuestionRefs', id, true);
@@ -1224,7 +1234,9 @@ export const useDataStore = defineStore('data', {
1224
1234
  return await this.getFromApi('dicAnnuityTypeList', 'getDicAnnuityTypeList');
1225
1235
  },
1226
1236
  async getProcessAnnuityPaymentPeriod() {
1227
- return await this.getFromApi('processAnnuityPaymentPeriod', 'getProcessAnnuityPaymentPeriod', this.processCode);
1237
+ if (this.processCode) {
1238
+ return await this.getFromApi('processAnnuityPaymentPeriod', 'getProcessAnnuityPaymentPeriod', this.processCode);
1239
+ }
1228
1240
  },
1229
1241
  async getInsurancePay() {
1230
1242
  return await this.getFromApi('insurancePay', 'getInsurancePay');
@@ -1318,6 +1330,11 @@ export const useDataStore = defineStore('data', {
1318
1330
  getNumberWithSpaces(n: any) {
1319
1331
  return n === null ? null : Number((typeof n === 'string' ? n : n.toFixed().toString()).replace(/[^0-9]+/g, '')).toLocaleString('ru');
1320
1332
  },
1333
+ getNumberWithSpacesAfterComma(n: number) {
1334
+ let parts = n.toFixed(2).split('.');
1335
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
1336
+ return parts.join(',');
1337
+ },
1321
1338
  getNumberWithDot(n: any) {
1322
1339
  return n === null ? null : n.toLocaleString('ru', { maximumFractionDigits: 2, minimumFractionDigits: 2 }).replace(/,/g, '.');
1323
1340
  },
@@ -1514,9 +1531,9 @@ export const useDataStore = defineStore('data', {
1514
1531
  coverPeriod: Number(this.formStore.productConditionsForm.coverPeriod),
1515
1532
  payPeriod: Number(this.formStore.productConditionsForm.coverPeriod),
1516
1533
  indexRateId: this.formStore.productConditionsForm.processIndexRate?.id
1517
- ? String(this.formStore.productConditionsForm.processIndexRate.id)
1518
- : String(this.processIndexRate.find(i => i.code === '0')?.id),
1519
- paymentPeriodId: String(this.formStore.productConditionsForm.paymentPeriod.id),
1534
+ ? this.formStore.productConditionsForm.processIndexRate.id ?? undefined
1535
+ : this.processIndexRate.find(i => i.code === '0')?.id ?? undefined,
1536
+ paymentPeriodId: (this.formStore.productConditionsForm.paymentPeriod.id as string) ?? undefined,
1520
1537
  addCovers: this.formStore.additionalInsuranceTermsWithout,
1521
1538
  };
1522
1539
  if (this.isKazyna || product === 'halykkazyna') {
@@ -1526,9 +1543,9 @@ export const useDataStore = defineStore('data', {
1526
1543
  }
1527
1544
  if (this.isLiferenta) {
1528
1545
  calculationData.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
1529
- calculationData.annuityTypeId = String(this.formStore.productConditionsForm.typeAnnuityInsurance.id);
1546
+ calculationData.annuityTypeId = (this.formStore.productConditionsForm.typeAnnuityInsurance.id as string) ?? undefined;
1530
1547
  calculationData.paymentPeriod = Number(this.formStore.productConditionsForm.termAnnuityPayments);
1531
- calculationData.annuityPaymentPeriodId = String(this.formStore.productConditionsForm.periodAnnuityPayment.id);
1548
+ calculationData.annuityPaymentPeriodId = (this.formStore.productConditionsForm.periodAnnuityPayment.id as string) ?? undefined;
1532
1549
  }
1533
1550
  const calculationResponse = await this.api.calculateWithoutApplication(calculationData, this.isCalculator ? product : undefined);
1534
1551
  this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.amount);
@@ -1859,7 +1876,7 @@ export const useDataStore = defineStore('data', {
1859
1876
  },
1860
1877
  async handleTask(action: keyof typeof constants.actions | null, taskId: string, comment: string | null = null) {
1861
1878
  if (!this.formStore.applicationTaskId) return;
1862
- if (action && Object.keys(constants.actions).includes(action)) {
1879
+ if (action) {
1863
1880
  this.isButtonsLoading = true;
1864
1881
  switch (action) {
1865
1882
  case constants.actions.claim: {
@@ -2111,7 +2128,7 @@ export const useDataStore = defineStore('data', {
2111
2128
  }
2112
2129
  }
2113
2130
  } else {
2114
- if (this.formStore[localKey].some((i: any) => i.iin !== null)) {
2131
+ if (this.formStore[localKey].some(i => i.iin !== null)) {
2115
2132
  this.showToaster('error', this.t('toaster.notSavedMember', { text: text }), 3000);
2116
2133
  return false;
2117
2134
  }
package/store/rules.ts CHANGED
@@ -96,7 +96,11 @@ export const rules = {
96
96
  date: [
97
97
  (v: any) => {
98
98
  if (v === null || v == '') return true;
99
- if (/^(0[1-9]|1[0-9]|2[0-9]|3[0-1])(-|\.)(0[1-9]|1[0-2])(-|\.)(19[0-9]{2}|20[0-9][0-9])$/.test(v)) {
99
+ if (
100
+ /^(?:(?:(?:(?:0[1-9]|1[0-9]|2[0-8])[\.](?:0[1-9]|1[012]))|(?:(?:29|30|31)[\.](?:0[13578]|1[02]))|(?:(?:29|30)[\.](?:0[4,6,9]|11)))[\.](?:19|[2-3][0-9])\d\d)|(?:29[\.]02[\.](?:19|[2-3][0-9])(?:00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$/.test(
101
+ v,
102
+ )
103
+ ) {
100
104
  return true;
101
105
  } else {
102
106
  return t('rules.date');
@@ -108,8 +112,13 @@ export const rules = {
108
112
  age18ByDate: [(v: any) => Math.abs(new Date(Date.now() - new Date(formatDate(v)!).getTime()).getUTCFullYear() - 1970) >= 18 || t('rules.age18')],
109
113
  birthDate: [
110
114
  (v: any) => {
115
+ if (v === null || v == '') return true;
111
116
  if (new Date(formatDate(v)!) > new Date(Date.now())) return t('rules.exceedDate');
112
- if (/^(0[1-9]|1[0-9]|2[0-9]|3[0-1])(-|\.)(0[1-9]|1[0-2])(-|\.)(19[0-9]{2}|20[0-9][0-9])$/.test(v)) {
117
+ if (
118
+ /^(?:(?:(?:(?:0[1-9]|1[0-9]|2[0-8])[\.](?:0[1-9]|1[012]))|(?:(?:29|30|31)[\.](?:0[13578]|1[02]))|(?:(?:29|30)[\.](?:0[4,6,9]|11)))[\.](?:19|[2-3][0-9])\d\d)|(?:29[\.]02[\.](?:19|[2-3][0-9])(?:00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$/.test(
119
+ v,
120
+ )
121
+ ) {
113
122
  return true;
114
123
  } else {
115
124
  return t('rules.date');
package/types/index.ts CHANGED
@@ -4,7 +4,21 @@ export {};
4
4
 
5
5
  declare global {
6
6
  type EnvModes = 'development' | 'test' | 'vercel' | 'production';
7
- type Projects = 'aml' | 'baiterek' | 'bolashak' | 'calculator' | 'compliance' | 'efo' | 'gons' | 'halykkazyna' | 'liferenta' | 'lifetrip' | 'lka' | 'mycar';
7
+ type Projects =
8
+ | 'aml'
9
+ | 'baiterek'
10
+ | 'bolashak'
11
+ | 'calculator'
12
+ | 'efo'
13
+ | 'gons'
14
+ | 'halykkazyna'
15
+ | 'lifebusiness'
16
+ | 'liferenta'
17
+ | 'lifetrip'
18
+ | 'lka'
19
+ | 'mycar'
20
+ | 'checkcontract'
21
+ | 'checkcontragent';
8
22
  type MemberKeys = keyof ReturnType<typeof useFormStore>;
9
23
  type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
10
24
  type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
@@ -36,7 +50,7 @@ declare global {
36
50
  | 'time'
37
51
  | 'url'
38
52
  | 'week';
39
- type TaskListItem = {
53
+ interface TaskListItem {
40
54
  addRegNumber: string | number;
41
55
  applicationTaskId: string;
42
56
  dateCreated: string;
@@ -54,7 +68,7 @@ declare global {
54
68
  status: string;
55
69
  userId: string;
56
70
  userName: string;
57
- };
71
+ }
58
72
  type TaskHistory = {
59
73
  appointmentDate: string | null;
60
74
  comment: string | null;
@@ -229,8 +243,8 @@ declare global {
229
243
  premium: number | null;
230
244
  coverPeriod: number;
231
245
  payPeriod: number;
232
- indexRateId?: string | null;
233
- paymentPeriodId: string;
246
+ indexRateId?: string | number | null;
247
+ paymentPeriodId?: string;
234
248
  addCovers: AddCover[];
235
249
  };
236
250
 
@@ -367,14 +381,14 @@ declare global {
367
381
  contragentId: number;
368
382
  questId: string;
369
383
  questName: string;
370
- questAnswer: string | null;
384
+ questAnswer: string | number | null;
371
385
  questAnswerName: string | null;
372
386
  };
373
387
 
374
388
  type ContragentDocuments = {
375
389
  id: number;
376
390
  contragentId: number;
377
- type: string;
391
+ type?: string;
378
392
  typeName: string | null;
379
393
  serial: string | null;
380
394
  number: string | null;
@@ -392,23 +406,23 @@ declare global {
392
406
  type ContragentAddress = {
393
407
  id: number;
394
408
  contragentId: number;
395
- type: string;
396
- address: string;
397
- countryCode: string;
398
- countryName: string;
399
- stateCode: string;
400
- stateName: string;
401
- cityCode: string;
402
- cityName: string;
403
- regionCode: string | null;
404
- regionName: string | null;
405
- streetName: string;
406
- blockNumber: string;
407
- apartmentNumber: string;
408
- cityTypeId: number | null;
409
- cityTypeName: string;
410
- microRaion: string | null;
411
- kvartal: string | null;
409
+ type?: string;
410
+ address?: string;
411
+ countryCode?: string | number;
412
+ countryName?: string;
413
+ stateCode?: string | number;
414
+ stateName?: string;
415
+ cityCode?: string | number;
416
+ cityName?: string;
417
+ regionCode?: string | number |null;
418
+ regionName?: string | null;
419
+ streetName?: string;
420
+ blockNumber?: string;
421
+ apartmentNumber?: string;
422
+ cityTypeId?: number | null;
423
+ cityTypeName?: string;
424
+ microRaion?: string | null;
425
+ kvartal?: string | null;
412
426
  };
413
427
 
414
428
  type ContragentContacts = {
@@ -447,10 +461,10 @@ declare global {
447
461
  isSpokesman?: boolean;
448
462
  coverPeriod?: number | null;
449
463
  payPeriod?: number | null;
450
- indexRateId?: string;
464
+ indexRateId?: string | number;
451
465
  indexRateCode?: string;
452
466
  indexRateName?: string;
453
- paymentPeriodId?: string;
467
+ paymentPeriodId?: string | number;
454
468
  paymentPeriodName?: string;
455
469
  lifeMultiply?: number;
456
470
  lifeAdditive?: number;
@@ -1,47 +0,0 @@
1
- <template>
2
- <button
3
- type="button"
4
- class="transition-all"
5
- @click="$emit('clicked')"
6
- :disabled="disabled"
7
- :class="[
8
- disabled ? 'disabled' : '',
9
- classes,
10
- btn,
11
- $libStyles[`btnH${$capitalize(size)}` as keyof typeof $libStyles],
12
- ]"
13
- >
14
- <i class="mdi" :class="icon"></i>
15
- </button>
16
- </template>
17
-
18
- <script lang="ts">
19
- export default defineComponent({
20
- name: 'BaseBtnIcon',
21
- props: {
22
- icon: { type: String, default: 'mdi-arrow-right-variant' },
23
- size: {
24
- type: String,
25
- default: 'md',
26
- },
27
- classes: {
28
- type: String,
29
- default: '',
30
- },
31
- disabled: {
32
- type: Boolean,
33
- default: false,
34
- },
35
- btn: {
36
- type: String,
37
- default: new Styles().blueBtn,
38
- },
39
- },
40
- });
41
- </script>
42
-
43
- <style scoped>
44
- .disabled {
45
- opacity: 0.3;
46
- }
47
- </style>