hl-core 0.0.9-beta.26 → 0.0.9-beta.28

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
@@ -766,4 +766,11 @@ export class ApiClass {
766
766
  data: data,
767
767
  });
768
768
  }
769
+
770
+ async getProcessGfot(processCode: string | number) {
771
+ return await this.axiosCall<Value[]>({
772
+ method: Methods.GET,
773
+ url: `/Arm/api/Dictionary/ProcessGfot/${processCode}`,
774
+ });
775
+ }
769
776
  }
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <v-form class="dynamic-form">
3
+ <base-form-section v-for="(section, sectionIndex) in form.sections" :key="sectionIndex" class="rounded-lg" :title="section.title">
4
+ <base-dynamic-input :fields="section.fields" />
5
+ </base-form-section>
6
+ </v-form>
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ export default defineComponent({
11
+ props: {
12
+ form: {
13
+ type: Object as PropType<DynamicForm>,
14
+ required: true,
15
+ },
16
+ },
17
+ });
18
+ </script>
@@ -187,6 +187,15 @@ export default defineComponent({
187
187
  },
188
188
  );
189
189
 
190
+ onBeforeUnmount(() => {
191
+ if (!isReadonly.value) {
192
+ const areValid = !!formStore.SaleChanellPolicy.nameRu && !!formStore.RegionPolicy.nameRu && !!formStore.ManagerPolicy.nameRu && !!formStore.AgentData.fullName;
193
+ if (areValid) {
194
+ dataStore.setINSISWorkData(false);
195
+ }
196
+ }
197
+ });
198
+
190
199
  return {
191
200
  // State
192
201
  formStore,
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div v-for="(field, fieldIndex) in fields" :key="fieldIndex">
3
+ <base-text-input
4
+ v-if="field.type === 'text' || field.type === 'number'"
5
+ :control="field"
6
+ class="bg-[#fff]"
7
+ :class="{ 'rounded-t-lg': fieldIndex === 0 || fields[fieldIndex - 1].type !== 'text', 'rounded-b-lg': fieldIndex === fields.length - 1 }"
8
+ />
9
+ <base-switch-input v-if="field.type === 'switch'" :field="field" />
10
+ </div>
11
+ </template>
12
+
13
+ <script lang="ts">
14
+ export default defineComponent({
15
+ props: {
16
+ fields: {
17
+ type: Object as PropType<InputType[]>,
18
+ required: true,
19
+ },
20
+ },
21
+ });
22
+ </script>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <div class="base-switch-input p-4 bg-white rounded-lg mb-3">
3
+ <v-switch v-model="field.modelValue" v-bind="switchProps" />
4
+ </div>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ export default defineComponent({
9
+ name: 'asSwitchInput',
10
+ props: {
11
+ field: {
12
+ type: Object as PropType<SwitchInput>,
13
+ required: true,
14
+ },
15
+ },
16
+ setup(props) {
17
+ const switchProps = computed(() => {
18
+ return {
19
+ label: props.field.label,
20
+ direction: props.field.direction,
21
+ disabled: props.field.disabled,
22
+ hideDetails: true,
23
+ color: '#009C73',
24
+ };
25
+ });
26
+ return { switchProps };
27
+ },
28
+ });
29
+ </script>
30
+
31
+ <style>
32
+ .base-switch-input .v-switch label {
33
+ font-size: 14px !important;
34
+ font-weight: 400 !important;
35
+ line-height: 20px !important;
36
+ opacity: 1 !important;
37
+ }
38
+ .base-switch-input .v-switch__track {
39
+ background: white !important;
40
+ border: 1.1px solid #e5e5ea;
41
+ height: 19px !important;
42
+ width: 100px !important;
43
+ border-radius: 16px;
44
+ overflow: hidden;
45
+ }
46
+
47
+ .base-switch-input .switch-block .v-input--horizontal {
48
+ grid-template-areas: unset !important;
49
+ }
50
+
51
+ .base-switch-input .v-switch__thumb {
52
+ color: white;
53
+ width: 20px;
54
+ height: 20px;
55
+ }
56
+
57
+ .base-switch-input .v-selection-control--dirty .v-switch__track {
58
+ background: #2aa65c !important;
59
+ }
60
+
61
+ .base-switch-input .v-switch .v-selection-control {
62
+ min-height: unset !important;
63
+ }
64
+ </style>
@@ -0,0 +1,156 @@
1
+ <template>
2
+ <div class="base-text-input flex justify-between items-center pr-4 mb-[1px] bg-[#fff]">
3
+ <v-text-field v-model="control.modelValue" v-bind="textFieldProps" v-maska="mask">
4
+ <div v-if="hasSuffix" class="absolute top-[27px] left-[18px] flex items-center justify-center">
5
+ <p class="opacity-0 inline-block mr-[2px]">{{ control.modelValue }}</p>
6
+ <span>{{ suffix }}</span>
7
+ </div>
8
+ </v-text-field>
9
+ <v-icon v-if="control.iconName" :icon="`mdi cursor-pointer ${iconsList[control.iconName]}`" color="#A0B3D8" @click="onClickIcon" />
10
+ <vue-date-picker v-if="control.maska === 'date'" v-model="control.modelValue" v-bind="datePickerProps" @update:modelValue="$emit('update:modelValue', $event)">
11
+ <template #trigger>
12
+ <v-icon icon="mdi mdi-calendar-blank-outline cursor-pointer" color="#a0b3d8" />
13
+ </template>
14
+ </vue-date-picker>
15
+ </div>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ const iconsList: { [key: string]: string } = {
20
+ arrowRight: 'mdi-chevron-right',
21
+ search: 'mdi-magnify',
22
+ sms: 'mdi-message-text',
23
+ clear: 'mdi-close',
24
+ };
25
+
26
+ const suffixList: { [key: string]: string } = {
27
+ kzt: '₸',
28
+ usd: '$',
29
+ percent: '%',
30
+ };
31
+
32
+ export default defineComponent({
33
+ props: {
34
+ control: {
35
+ type: Object as PropType<InputType>,
36
+ required: true,
37
+ },
38
+ },
39
+ setup(props) {
40
+ const mask = computed(() => (props.control.maska ? useMask()[props.control.maska] : ''));
41
+
42
+ const textFieldProps = computed(() => {
43
+ return {
44
+ label: props.control.label,
45
+ placeholder: props.control.placeholder,
46
+ disabled: props.control.disabled,
47
+ maxLength: props.control.maxLength,
48
+ readonly: props.control.readonly || props.control.iconName === 'arrowRight',
49
+ };
50
+ });
51
+
52
+ const datePickerProps = computed(() => {
53
+ return {
54
+ locale: 'ru',
55
+ flow: ['calendar'],
56
+ modelType: 'dd.MM.yyyy',
57
+ enableTimePicker: false,
58
+ altPosition: () => ({ top: 0, left: -275 }),
59
+ clearable: false,
60
+ disabled: props.control.disabled,
61
+ readonly: props.control.readonly,
62
+ selectText: 'Выбрать',
63
+ cancelText: 'Закрыть',
64
+ offset: '-50',
65
+ class: 'max-w-max z-[10]',
66
+ closeOnScroll: true,
67
+ transitions: false,
68
+ };
69
+ });
70
+
71
+ const hasSuffix = computed(() => {
72
+ return props.control.suffix && props.control.type === 'number' && props.control.modelValue;
73
+ });
74
+
75
+ const suffix = computed(() => {
76
+ return hasSuffix.value ? suffixList[props.control.suffix!] : '';
77
+ });
78
+
79
+ const onClickIcon = () => {};
80
+
81
+ return {
82
+ // State
83
+ datePickerProps,
84
+ textFieldProps,
85
+ hasSuffix,
86
+ mask,
87
+ suffix,
88
+ iconsList,
89
+
90
+ // Functions
91
+ onClickIcon,
92
+ };
93
+ },
94
+ });
95
+ </script>
96
+ <style>
97
+ .base-text-input .v-field__append-inner i {
98
+ color: #a0b3d8 !important;
99
+ margin-left: 10px;
100
+ margin-right: 4px;
101
+ }
102
+ .base-text-input .v-field__append-inner {
103
+ margin-top: 12px;
104
+ cursor: pointer;
105
+ padding-right: 6px;
106
+ }
107
+ .base-text-input .v-field__outline,
108
+ .base-text-input .v-field__overlay,
109
+ .base-text-input .v-field__loader {
110
+ display: none !important;
111
+ }
112
+
113
+ .base-text-input .v-input__prepend {
114
+ padding-top: 0;
115
+ display: flex;
116
+ align-items: center;
117
+ }
118
+ .base-text-input .v-field__append-inner {
119
+ display: flex;
120
+ padding: 0;
121
+ align-items: center;
122
+ justify-content: center;
123
+ }
124
+
125
+ .base-text-input .v-file-input {
126
+ padding: 0px;
127
+ }
128
+ .base-text-input .v-messages,
129
+ .base-text-input .v-messages__message,
130
+ .base-text-input .v-input__details {
131
+ min-height: unset !important;
132
+ }
133
+ .base-text-input .v-messages__message {
134
+ transition: all 0.5s;
135
+ margin-bottom: 10px;
136
+ }
137
+ .base-text-input .v-input__details {
138
+ padding-bottom: 0 !important;
139
+ padding-top: 0 !important;
140
+ }
141
+ .base-text-input .dp__action_buttons button {
142
+ padding: 6px 9px;
143
+ height: unset;
144
+ }
145
+ .base-text-input .dp__action_select {
146
+ background: #a0b3d8;
147
+ color: white;
148
+ }
149
+ .base-text-input .dp__action_select:hover {
150
+ background: #97acd6;
151
+ }
152
+ .base-text-input .dp__active_date,
153
+ .base-text-input .dp__overlay_cell_active {
154
+ background: #a0b3d8;
155
+ }
156
+ </style>
@@ -71,13 +71,11 @@ const logoutUser = async () => {
71
71
  await dataStore.logoutUser();
72
72
  };
73
73
 
74
- const isProduction = import.meta.env.VITE_MODE === 'production';
75
-
76
74
  const hasHistory = computed(() => {
77
75
  return !dataStore.isLKA;
78
76
  });
79
77
 
80
78
  const openHistory = async () => {
81
- dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge || dataStore.isDSO ? '' : dataStore.product);
79
+ dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge || dataStore.isDSO || dataStore.isUU ? '' : dataStore.product);
82
80
  };
83
81
  </script>
@@ -114,7 +114,7 @@
114
114
  </section>
115
115
  <base-btn
116
116
  v-if="currentQuestion && currentQuestion.second && currentQuestion.second.length && firstPanel"
117
- class="!absolute z-10 my-[14px] self-center w-[96%] bottom-0"
117
+ class="!absolute z-10 my-[14px] self-center w-[96%] bottom-[-40px]"
118
118
  :text="$dataStore.t('buttons.save')"
119
119
  @click="submitSecondaryForm"
120
120
  />
@@ -629,7 +629,7 @@ export default {
629
629
  const isFromGBD = computed(() => !!member.value.gosPersonData);
630
630
  const showSaveButton = computed(() => {
631
631
  const generalCondition = !isDisabled.value && !!isTask.value && !!dataStore.isInitiator();
632
- const perMemberCondtion = () => {
632
+ const perMemberCondition = () => {
633
633
  switch (whichForm.value) {
634
634
  case formStore.policyholderFormKey:
635
635
  return true;
@@ -642,7 +642,7 @@ export default {
642
642
  return false;
643
643
  }
644
644
  };
645
- return generalCondition && perMemberCondtion();
645
+ return generalCondition && perMemberCondition();
646
646
  });
647
647
 
648
648
  const hasGBDFL = computed(() => {
@@ -741,7 +741,7 @@ export default {
741
741
 
742
742
  const birthDateRule = computed(() => {
743
743
  const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
744
- const byMemverAndProductRule = () => {
744
+ const byMemberAndProductRule = () => {
745
745
  if (whichForm.value === formStore.policyholderFormKey) {
746
746
  if (dataStore.isGons || dataStore.isBolashak || dataStore.isBaiterek) {
747
747
  return dataStore.rules.age18ByDate;
@@ -757,7 +757,7 @@ export default {
757
757
  }
758
758
  return [];
759
759
  };
760
- return baseDateRule.concat(byMemverAndProductRule());
760
+ return baseDateRule.concat(byMemberAndProductRule());
761
761
  });
762
762
  const ageRule = computed(() => {
763
763
  const baseAgeRule = dataStore.rules.numbers;
@@ -266,6 +266,16 @@
266
266
  append-inner-icon="mdi mdi-chevron-right"
267
267
  @append="openPanel($dataStore.t('productConditionsForm.agencyPart'), $dataStore.processTariff, 'processTariff', $dataStore.getProcessTariff)"
268
268
  />
269
+ <base-panel-input
270
+ v-if="hasProcessGfot"
271
+ v-model="productConditionsForm.processGfot"
272
+ :value="productConditionsForm.processGfot?.nameRu"
273
+ :readonly="isDisabledProcessGfot"
274
+ :clearable="!isDisabledProcessGfot"
275
+ :label="$dataStore.t('productConditionsForm.processGfot')"
276
+ append-inner-icon="mdi mdi-chevron-right"
277
+ @append="openPanel($dataStore.t('productConditionsForm.processGfot'), $dataStore.processTariff, 'processGfot', $dataStore.getProcessGfot)"
278
+ />
269
279
  </base-form-section>
270
280
  <base-form-section v-if="hasAnnuityPayments" :title="$dataStore.t('calculationAnnuityPayments')">
271
281
  <base-form-toggle
@@ -638,8 +648,13 @@ export default defineComponent({
638
648
  return isDisabled.value;
639
649
  });
640
650
  const requestedSumInsuredRule = computed(() => (!!productConditionsForm.requestedSumInsured ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
641
- const hasCalculated = computed(() => !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth);
642
651
  const amountAnnuityPayments = computed(() => (!!productConditionsForm.amountAnnuityPayments ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
652
+ const hasCalculated = computed(() => {
653
+ if (whichProduct.value === 'lifebusiness' && productConditionsForm.requestedSumInsured === null) {
654
+ return !!productConditionsForm.insurancePremiumPerMonth;
655
+ }
656
+ return !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth;
657
+ });
643
658
  const hasProcessIndexRate = computed(() => {
644
659
  if (whichProduct.value === 'gons' || whichProduct.value === 'halykkazyna' || whichProduct.value === 'liferenta' || whichProduct.value === 'lifebusiness') {
645
660
  return false;
@@ -730,6 +745,12 @@ export default defineComponent({
730
745
  }
731
746
  return false;
732
747
  });
748
+ const hasProcessGfot = computed(() => {
749
+ if (whichProduct.value === 'lifebusiness') {
750
+ return true;
751
+ }
752
+ return false;
753
+ });
733
754
  const coverPeriodRule = computed(() => {
734
755
  const baseCondition = dataStore.rules.required.concat(dataStore.rules.numbers);
735
756
  if (whichProduct.value === 'gons') {
@@ -777,6 +798,9 @@ export default defineComponent({
777
798
  if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
778
799
  return false;
779
800
  }
801
+ if (whichProduct.value === 'lifebusiness' && productConditionsForm.processGfot.id !== null) {
802
+ return true;
803
+ }
780
804
  return isDisabled.value;
781
805
  });
782
806
  const isDisabledSumDollar = computed(() => {
@@ -807,6 +831,12 @@ export default defineComponent({
807
831
  }
808
832
  return true;
809
833
  });
834
+ const isDisabledProcessGfot = computed(() => {
835
+ if (whichProduct.value === 'lifebusiness' && !!productConditionsForm.requestedSumInsured) {
836
+ return true;
837
+ }
838
+ return isDisabled.value;
839
+ });
810
840
  const formatTermValue = (term: number) => {
811
841
  if (term !== null) {
812
842
  const termNumber = Number(term);
@@ -887,7 +917,10 @@ export default defineComponent({
887
917
  additionalTerms.value[currentIndex.value].amount = 0;
888
918
  }
889
919
  if (termValue.value && termValue.value.coverTypeCode === 6) {
890
- coverPeriodValue.value = termValue.value.coverPeriodCode as string;
920
+ const res = await dataStore.getFromApi('DicCoverTypePeriod', 'getArmDicts', 'DicCoverTypePeriod');
921
+ panelList.value = filterList(res, '');
922
+ const coverPeriodName = panelList.value.find(i => i.id === String(termValue.value!.coverPeriodId));
923
+ if (coverPeriodName) coverPeriodValue.value = coverPeriodName.code as string;
891
924
  isPanelOpen.value = false;
892
925
  isTermsPanelOpen.value = false;
893
926
  isFixInsAmountPanelOpen.value = false;
@@ -895,8 +928,7 @@ export default defineComponent({
895
928
  dataStore.panelAction = null;
896
929
  dataStore.panel.open = true;
897
930
  isMultiplePanelOpen.value = false;
898
- const res = await dataStore.getFromApi('DicCoverTypePeriod', 'getArmDicts', 'DicCoverTypePeriod');
899
- panelList.value = filterList(res, '');
931
+ dataStore.panel.title = dataStore.t('clients.coveragePeriod');
900
932
  }
901
933
  }
902
934
  };
@@ -1028,7 +1060,7 @@ export default defineComponent({
1028
1060
  dataStore.panel.open = true;
1029
1061
  dataStore.panel.title = title;
1030
1062
  panelList.value = constants.fixInsAmount;
1031
- fixInsValue.value = amount;
1063
+ fixInsValue.value = String(amount);
1032
1064
  } else {
1033
1065
  dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
1034
1066
  }
@@ -1332,6 +1364,9 @@ export default defineComponent({
1332
1364
  if (!!productConditionsForm.requestedSumInsured) {
1333
1365
  whichSum.value = 'requestedSumInsured';
1334
1366
  }
1367
+ if (dataStore.isLifeBusiness && !productConditionsForm.requestedSumInsured) {
1368
+ whichSum.value = 'requestedSumInsured';
1369
+ }
1335
1370
  if (dataStore.isCalculator) {
1336
1371
  dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
1337
1372
  await dataStore.getProcessPaymentPeriod();
@@ -1474,6 +1509,7 @@ export default defineComponent({
1474
1509
  hasCalculated,
1475
1510
  hasAnnuityPayments,
1476
1511
  hasAgencyPart,
1512
+ hasProcessGfot,
1477
1513
  currencySymbolsAddTerm,
1478
1514
  amountAnnuityPayments,
1479
1515
  requestedSumInsuredLabel,
@@ -1486,6 +1522,7 @@ export default defineComponent({
1486
1522
  insurancePremiumPerMonthLabel,
1487
1523
  isDisabledCoverPeriod,
1488
1524
  hasDefault,
1525
+ isDisabledProcessGfot,
1489
1526
 
1490
1527
  // Rules
1491
1528
  coverPeriodRule,
@@ -318,7 +318,12 @@ export default defineComponent({
318
318
 
319
319
  const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
320
320
  const insurancePremiumPerMonth = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.insurancePremiumPerMonth));
321
- const requestedSumInsured = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured));
321
+ const requestedSumInsured = computed(() => {
322
+ if (dataStore.isLifeBusiness && formStore.productConditionsForm.requestedSumInsured === null) {
323
+ dataStore.getNumberWithSpaces(formStore.applicationData.policyAppDto!.mainInsSum);
324
+ }
325
+ return dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured);
326
+ });
322
327
  const price = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.calculatorForm.price));
323
328
  const insuredAmount = computed(() => formStore.productConditionsForm.calculatorForm.amount!.nameRu! + dataStore.currency);
324
329
  const hasConditionsInfo = computed(() => {
@@ -717,6 +717,7 @@ export class ProductConditions {
717
717
  termsOfInsurance: string | null;
718
718
  annualIncome: string | null;
719
719
  processIndexRate: Value;
720
+ processGfot: Value;
720
721
  requestedSumInsured: number | string | null;
721
722
  requestedSumInsuredInDollar: number | string | null;
722
723
  insurancePremiumPerMonth: number | string | null;
@@ -760,6 +761,7 @@ export class ProductConditions {
760
761
  termsOfInsurance = null,
761
762
  annualIncome = null,
762
763
  processIndexRate = new Value(),
764
+ processGfot = new Value(),
763
765
  requestedSumInsured = null,
764
766
  insurancePremiumPerMonth = null,
765
767
  establishingGroupDisabilityFromThirdYear = null,
@@ -806,6 +808,7 @@ export class ProductConditions {
806
808
  this.termsOfInsurance = termsOfInsurance;
807
809
  this.annualIncome = annualIncome;
808
810
  this.processIndexRate = processIndexRate;
811
+ this.processGfot = processGfot;
809
812
  this.requestedSumInsured = requestedSumInsured;
810
813
  this.insurancePremiumPerMonth = insurancePremiumPerMonth;
811
814
  this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
@@ -979,6 +982,7 @@ export class DataStoreClass {
979
982
  accessToken: string | null = null;
980
983
  refreshToken: string | null = null;
981
984
  processIndexRate: Value[];
985
+ processGfot: Value[];
982
986
  processPaymentPeriod: Value[];
983
987
  dicAnnuityTypeList: Value[];
984
988
  processAnnuityPaymentPeriod: Value[];
@@ -1064,6 +1068,7 @@ export class DataStoreClass {
1064
1068
  this.iframeLoading = false;
1065
1069
  this.hasLayoutMargins = true;
1066
1070
  this.processIndexRate = [];
1071
+ this.processGfot = [];
1067
1072
  this.processPaymentPeriod = [];
1068
1073
  this.dicAnnuityTypeList = [];
1069
1074
  this.processAnnuityPaymentPeriod = [];
@@ -1423,7 +1428,7 @@ export class MemberV2 {
1423
1428
  taxResidentCountry: Value;
1424
1429
  showTaxResidentCountry: string | null;
1425
1430
  };
1426
- identityCard: {
1431
+ identityCard?: {
1427
1432
  documentType: Value;
1428
1433
  documentNumber: string | null;
1429
1434
  series: string | null;
@@ -1452,12 +1457,12 @@ export class MemberV2 {
1452
1457
  typeOfEconomicActivity: string | null;
1453
1458
  };
1454
1459
  jurAddressIsActualAddress: boolean;
1455
- quests: {
1460
+ quests?: {
1456
1461
  order: number;
1457
1462
  text: string | null;
1458
1463
  answer: boolean | null;
1459
1464
  }[];
1460
- isLeader: boolean;
1465
+ isLeader?: boolean;
1461
1466
  // insuredPolicyData: {
1462
1467
  // insSum: 0;
1463
1468
  // insSumWithLoad: 0;
@@ -16,7 +16,7 @@ export const constants = Object.freeze({
16
16
  checkcontragent: 1,
17
17
  checkcontract: 2,
18
18
  },
19
- extractedProducts: ['dso'],
19
+ extractedProducts: ['dso', 'uu'],
20
20
  editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm],
21
21
  documentsLinkVisibleStatuses: [
22
22
  Statuses.DocumentsSignedFrom,
@@ -2,6 +2,7 @@ import { useDisplay } from 'vuetify';
2
2
  import jwt_decode from 'jwt-decode';
3
3
  import { XMLParser } from 'fast-xml-parser';
4
4
  import { AxiosError } from 'axios';
5
+ import { FieldTypes } from '../types/form';
5
6
 
6
7
  export const getBaseCredentials = () => {
7
8
  return {
@@ -284,3 +285,68 @@ export const getLastDayOfMonth = (year: number, month: number) => {
284
285
  const date = new Date();
285
286
  return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
286
287
  };
288
+
289
+ export const FieldBase = ({
290
+ label = '',
291
+ placeholder = '',
292
+ readonly = false,
293
+ disabled = false,
294
+ modelValue = null,
295
+ iconName = null,
296
+ rules = [],
297
+ maxLength = null,
298
+ clearable = true,
299
+ hint = undefined,
300
+ suffix = null,
301
+ maska = null,
302
+ }: InputBase): InputBase =>
303
+ ({
304
+ label,
305
+ placeholder,
306
+ readonly,
307
+ disabled,
308
+ modelValue,
309
+ iconName,
310
+ rules,
311
+ maxLength,
312
+ clearable,
313
+ hint,
314
+ suffix,
315
+ maska,
316
+ } as InputBase);
317
+
318
+ export const TextInput = ({ ...rest }: Partial<TextInput>): TextInput => {
319
+ return {
320
+ ...FieldBase(rest),
321
+ type: FieldTypes.TEXT,
322
+ };
323
+ };
324
+
325
+ export const SwitchInput = ({ ...rest }: Partial<SwitchInput>): SwitchInput => {
326
+ return {
327
+ ...FieldBase(rest),
328
+ type: FieldTypes.SWITCH,
329
+ direction: 'horizontal',
330
+ trueValue: null,
331
+ falseValue: null,
332
+ labeling: false,
333
+ };
334
+ };
335
+
336
+ export const NumberInput = ({ ...rest }: Partial<NumberInput>): NumberInput => {
337
+ return {
338
+ ...FieldBase(rest),
339
+ type: FieldTypes.NUMBER,
340
+ };
341
+ };
342
+
343
+ export const dynamic = <T>(obj: T, key: keyof T) => {
344
+ return computed({
345
+ get: () => {
346
+ return obj[key];
347
+ },
348
+ set: (val: any) => {
349
+ obj[key] = val;
350
+ },
351
+ });
352
+ };
package/locales/ru.json CHANGED
@@ -357,7 +357,8 @@
357
357
  "coverPeriodMonth": "Срок страхования (в месяцах)",
358
358
  "totalRequestedSumInsured": "Общая страховая сумма",
359
359
  "totalInsurancePremiumAmount": "Общая страховая премия",
360
- "agencyPart": "Агентская переменная часть, %"
360
+ "agencyPart": "Агентская переменная часть, %",
361
+ "processGfot": "Кратность страховой суммы к ГФОТ-у"
361
362
  },
362
363
  "calculatorForm": {
363
364
  "selectedCountries": "Выбранные страны",
@@ -445,7 +446,9 @@
445
446
  "system": "Система",
446
447
  "modifiedDate": "Дата редактирования",
447
448
  "createdDate": "Дата добавления",
448
- "isActive": "Активен"
449
+ "isActive": "Активен",
450
+ "countryName": "Место жительства",
451
+ "countryResidence": "Налоговое резидентство"
449
452
  },
450
453
  "agent": {
451
454
  "currency": "Валюта",
@@ -638,6 +641,7 @@
638
641
  "reset": "Сбросить",
639
642
  "toExcel": "Экспорт в Excel",
640
643
  "condition": "Условие",
644
+ "sum": "Сумма",
641
645
  "bet": "Ставка",
642
646
  "statistics": "Статистика",
643
647
  "progressBar": "Шкала прогресса",
@@ -765,6 +769,7 @@
765
769
  "job": "Профессия",
766
770
  "jobPosition": "Должность",
767
771
  "jobPlace": "Место работы",
772
+ "jobDesk": "Занимаемая должность и точная описание служебных обязанностей",
768
773
  "placeRegistration": "Место жительство или регистрации",
769
774
  "placePermanent": "Постоянный адрес проживания",
770
775
  "sameAddress": "Совпадает ли адрес с адресом Страхователя?",
@@ -805,7 +810,29 @@
805
810
  "agent": "Агент",
806
811
  "insurancePay": "Страховая выплата подлежит осуществлению",
807
812
  "firstNameLat": "Имя (На латинице)",
808
- "lastNameLat": "Фамилия (На латинице)"
813
+ "lastNameLat": "Фамилия (На латинице)",
814
+ "phDocuments": "Документы Страхователя",
815
+ "insDocuments": "Документы Застрахованного / Выгодоприобретателя",
816
+ "insuredBeneficiaryData": "Сведения о Застрахованном / Выгодоприобретателе",
817
+ "identyDocument": "Документ подтверждающий личность",
818
+ "bankStatement": "Справка из банка",
819
+ "benefDoc": "Документ подтверждающий личность Бенефициарного собственника",
820
+ "insActBasis": "Страхователь действует на основании (Устав. доверенность, приказ и тп)",
821
+ "insActBasisKz": "Сақтанушы (Жарғы, сенімхат, бұйрық және т.б.) негізінде әрекет етеді",
822
+ "insurerAuthority": "Полномочия Страхователя",
823
+ "docNumber": "Номер документа",
824
+ "docDate": "Дата",
825
+ "docType": "Вид документа",
826
+ "issuingAuthority": "Орган выдачи",
827
+ "validUntil": "Действует до",
828
+ "validFrom": "Выдан от",
829
+ "identityDocument": "Документ удостоверяющий личность",
830
+ "toggleContactPerson": "Отметка о наличии (отсутсвии) Контактного лица Застрахованного",
831
+ "contactPersonData": "Сведения о Контактном лице Застрахованного",
832
+ "registrationPlaceOfContactPerson": "Место жительства или регистрации Контактного лица Застрахованного",
833
+ "identityCardOfContactPerson": "Документ удостоверяющий личность Контактного лица Застрахованного",
834
+ "recipientDocs": "Документы Получателя",
835
+ "recipientData": "Сведения о Получателе"
809
836
  },
810
837
  "bankDetailsForm": {
811
838
  "title": "Банковские реквизиты",
@@ -834,7 +861,13 @@
834
861
  "infoBeneficialOwner": "Сведения о Бенефициарном собственнике",
835
862
  "dataBeneficialOwner": "Данные Бенефициарного собственника",
836
863
  "documentsBeneficialOwner": "Документы Бенефициарного собственника",
864
+ "coveragePeriod": "Период покрытия",
837
865
  "form": {
866
+ "calculation": "Расчеты",
867
+ "paymentAmount": "Размер выплаты",
868
+ "paymentPeriod": "Количество платежей",
869
+ "paymentDate": "Дата первой выплаты",
870
+ "recipient": "Получатель (в случае смерти Застрахованного)",
838
871
  "nameOrganization": "Наименование организации",
839
872
  "listSpecies": "Перечень видов",
840
873
  "numberWorkers": "Кол-во работников",
@@ -871,13 +904,16 @@
871
904
  "iin": "ИИН (при наличии)",
872
905
  "isPublicForeignOfficial": "Отметка о принадлежности и/или причастности к публичному иностранному должностному лицу, его супруге (супругу) и близким родственникам?",
873
906
  "series": "Серия",
874
- "count":"Количество случаев",
875
- "amount":"Сумма выплаты",
876
- "shortDescription":"Краткое описание",
907
+ "count": "Количество случаев",
908
+ "amount": "Сумма выплаты",
909
+ "shortDescription": "Краткое описание",
877
910
  "questionnaireInsured": "Анкета Застрахованного",
878
911
  "recalculationSection": "Раздел переменных для перерасчета"
879
912
  }
880
913
  },
914
+ "uu": {
915
+ "title": "Процесс урегулирования убытков"
916
+ },
881
917
  "dso": {
882
918
  "project": "ДСО",
883
919
  "generalInfo": "Общая информация",
@@ -888,6 +924,10 @@
888
924
  "consumption": "Расход",
889
925
  "remainder": "Остаток",
890
926
  "loans": "Займы",
927
+ "loanNumber":"Номер займа",
928
+ "rewardAmount":"Сумма вознаграждения",
929
+ "loanType":"Тип займа",
930
+ "writeOff":"Списание из ВС",
891
931
  "paymentJournal": "Журнал оплат",
892
932
  "startDate": "Дата начала",
893
933
  "loanAmount": "Сумма займа",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.9-beta.26",
3
+ "version": "0.0.9-beta.28",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -49,6 +49,7 @@ export const useDataStore = defineStore('data', {
49
49
  isCheckContract: state => state.product === 'checkcontract',
50
50
  isCheckContragent: state => state.product === 'checkcontragent',
51
51
  isDSO: state => state.product === 'dso',
52
+ isUU: state => state.product === 'uu',
52
53
  isEveryFormDisabled: state => Object.values(state.formStore.isDisabled).every(i => i === true),
53
54
  hasClientAnketa: state => state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
54
55
  isClientAnketaCondition: state =>
@@ -1022,6 +1023,7 @@ export const useDataStore = defineStore('data', {
1022
1023
  conditionsData.policyAppDto.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
1023
1024
  conditionsData.policyAppDto.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
1024
1025
  conditionsData.policyAppDto.tariffId = String(this.formStore.productConditionsForm.processTariff.id);
1026
+ conditionsData.policyAppDto.processDefinitionFgotId = (this.formStore.productConditionsForm.processGfot.id as string) ?? undefined;
1025
1027
  }
1026
1028
  return conditionsData;
1027
1029
  },
@@ -1101,7 +1103,7 @@ export const useDataStore = defineStore('data', {
1101
1103
  this.isLoading = false;
1102
1104
  }
1103
1105
  },
1104
- async setINSISWorkData() {
1106
+ async setINSISWorkData(loading: boolean = true) {
1105
1107
  if (!this.formStore.applicationData.insisWorkDataApp) return;
1106
1108
  const data: InsisWorkDataApp = {
1107
1109
  id: this.formStore.applicationData.insisWorkDataApp.id,
@@ -1120,7 +1122,7 @@ export const useDataStore = defineStore('data', {
1120
1122
  insuranceProgramType: this.formStore.applicationData.insisWorkDataApp.insuranceProgramType,
1121
1123
  };
1122
1124
  try {
1123
- this.isLoading = true;
1125
+ this.isLoading = loading;
1124
1126
  await this.api.setINSISWorkData(data);
1125
1127
  } catch (err) {
1126
1128
  ErrorHandler(err);
@@ -1323,6 +1325,11 @@ export const useDataStore = defineStore('data', {
1323
1325
  async getInsurancePay() {
1324
1326
  return await this.getFromApi('insurancePay', 'getInsurancePay');
1325
1327
  },
1328
+ async getProcessGfot() {
1329
+ if (this.processCode) {
1330
+ return await this.getFromApi('processGfot', 'getProcessGfot', this.processCode);
1331
+ }
1332
+ },
1326
1333
  async getCurrencies() {
1327
1334
  try {
1328
1335
  const currencies = await this.api.getCurrencies();
@@ -1368,6 +1375,7 @@ export const useDataStore = defineStore('data', {
1368
1375
  this.getDicSportsType(),
1369
1376
  this.getDicTripPurpose(),
1370
1377
  this.getCurrencies(),
1378
+ this.getProcessGfot(),
1371
1379
  ]);
1372
1380
  },
1373
1381
  async getQuestionList(
@@ -1412,7 +1420,14 @@ export const useDataStore = defineStore('data', {
1412
1420
  return parts.join(',');
1413
1421
  },
1414
1422
  getNumberWithDot(n: any) {
1415
- return n === null ? null : n.toLocaleString('ru', { maximumFractionDigits: 2, minimumFractionDigits: 2 }).replace(/,/g, '.');
1423
+ return n === null
1424
+ ? null
1425
+ : n
1426
+ .toLocaleString('ru', {
1427
+ maximumFractionDigits: 2,
1428
+ minimumFractionDigits: 2,
1429
+ })
1430
+ .replace(/,/g, '.');
1416
1431
  },
1417
1432
  async getTaskList(
1418
1433
  search: string = '',
@@ -1452,7 +1467,14 @@ export const useDataStore = defineStore('data', {
1452
1467
  delete query.processCodes;
1453
1468
  query.processCode = byOneProcess;
1454
1469
  }
1455
- const taskList = await this.api.getTaskList(processInstanceId === null ? query : { ...query, processInstanceId: processInstanceId });
1470
+ const taskList = await this.api.getTaskList(
1471
+ processInstanceId === null
1472
+ ? query
1473
+ : {
1474
+ ...query,
1475
+ processInstanceId: processInstanceId,
1476
+ },
1477
+ );
1456
1478
  if (needToReturn) {
1457
1479
  this.isLoading = false;
1458
1480
  return taskList.items;
@@ -1680,6 +1702,7 @@ export const useDataStore = defineStore('data', {
1680
1702
  calculationData.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
1681
1703
  calculationData.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
1682
1704
  calculationData.agentCommission = this.formStore.productConditionsForm.processTariff.id;
1705
+ calculationData.processDefinitionFgotId = this.formStore.productConditionsForm.processGfot.id;
1683
1706
  }
1684
1707
  const calculationResponse = await this.api.calculateWithoutApplication(calculationData, this.isCalculator ? product : undefined);
1685
1708
  if (calculationResponse.amount) this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.amount);
@@ -1703,6 +1726,7 @@ export const useDataStore = defineStore('data', {
1703
1726
  }
1704
1727
  if (this.isLifeBusiness || product === 'lifebusiness') {
1705
1728
  this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.mainPremium);
1729
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.fixInsSum === 0 ? null : calculationResponse.fixInsSum);
1706
1730
  this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
1707
1731
  if (calculationResponse.clients) {
1708
1732
  this.formStore.lfb.clients = calculationResponse.clients;
@@ -2178,7 +2202,10 @@ export const useDataStore = defineStore('data', {
2178
2202
  }
2179
2203
  case constants.actions.affiliate: {
2180
2204
  try {
2181
- const sended = await this.sendUnderwritingCouncilTask({ taskId: taskId, decision: constants.actions.accept });
2205
+ const sended = await this.sendUnderwritingCouncilTask({
2206
+ taskId: taskId,
2207
+ decision: constants.actions.accept,
2208
+ });
2182
2209
  if (!sended) return;
2183
2210
  this.formStore.$reset();
2184
2211
  if (this.isEFO || this.isAML) {
@@ -2269,11 +2296,25 @@ export const useDataStore = defineStore('data', {
2269
2296
  const prepareSignDocuments = (): SignDataType[] => {
2270
2297
  switch (this.formStore.applicationData.statusCode) {
2271
2298
  case 'ContractSignedFrom':
2272
- return [{ processInstanceId: String(this.formStore.applicationData.processInstanceId), name: 'Contract', format: 'pdf' }];
2299
+ return [
2300
+ {
2301
+ processInstanceId: String(this.formStore.applicationData.processInstanceId),
2302
+ name: 'Contract',
2303
+ format: 'pdf',
2304
+ },
2305
+ ];
2273
2306
  default:
2274
2307
  return [
2275
- { processInstanceId: String(this.formStore.applicationData.processInstanceId), name: 'Agreement', format: 'pdf' },
2276
- { processInstanceId: String(this.formStore.applicationData.processInstanceId), name: 'Statement', format: 'pdf' },
2308
+ {
2309
+ processInstanceId: String(this.formStore.applicationData.processInstanceId),
2310
+ name: 'Agreement',
2311
+ format: 'pdf',
2312
+ },
2313
+ {
2314
+ processInstanceId: String(this.formStore.applicationData.processInstanceId),
2315
+ name: 'Statement',
2316
+ format: 'pdf',
2317
+ },
2277
2318
  ];
2278
2319
  }
2279
2320
  };
@@ -2705,7 +2746,10 @@ export const useDataStore = defineStore('data', {
2705
2746
  async getFamilyInfo(iin: string, phoneNumber: string) {
2706
2747
  this.isLoading = true;
2707
2748
  try {
2708
- const familyResponse = await this.api.getFamilyInfo({ iin: iin.replace(/-/g, ''), phoneNumber: formatPhone(phoneNumber) });
2749
+ const familyResponse = await this.api.getFamilyInfo({
2750
+ iin: iin.replace(/-/g, ''),
2751
+ phoneNumber: formatPhone(phoneNumber),
2752
+ });
2709
2753
  if (familyResponse.status === 'soap:Server') {
2710
2754
  this.showToaster('error', `${familyResponse.statusName}. Отправьте запрос через некоторое время`, 5000);
2711
2755
  this.isLoading = false;
@@ -3024,7 +3068,6 @@ export const useDataStore = defineStore('data', {
3024
3068
  this.formStore.lfb.policyholder = clientData;
3025
3069
  this.formStore.lfb.clientId = clientId;
3026
3070
  this.formStore.lfb.policyholder.clientPower.date = reformatDate(clientData.clientPower.date);
3027
- this.formStore.lfb.accidentIncidents = accidentIncidents;
3028
3071
 
3029
3072
  if (clientData && clientData.activityTypes !== null) {
3030
3073
  this.formStore.lfb.policyholderActivities = clientData.activityTypes;
@@ -3032,6 +3075,9 @@ export const useDataStore = defineStore('data', {
3032
3075
 
3033
3076
  if (beneficialOwnerApp && beneficialOwnerApp.length) {
3034
3077
  this.formStore.lfb.beneficialOwners = beneficialOwnerApp;
3078
+ this.formStore.lfb.beneficialOwners.forEach(beneficial => {
3079
+ beneficial.beneficialOwnerData.identityCard!.validity = reformatDate(beneficial.beneficialOwnerData.identityCard!.validity as string);
3080
+ });
3035
3081
  }
3036
3082
 
3037
3083
  if (insuredApp && insuredApp.length) {
@@ -3039,10 +3085,16 @@ export const useDataStore = defineStore('data', {
3039
3085
  this.formStore.lfb.clients = res;
3040
3086
  }
3041
3087
 
3088
+ if (accidentIncidents && accidentIncidents.length) {
3089
+ this.formStore.lfb.accidentIncidents = accidentIncidents;
3090
+ this.formStore.lfb.accidentIncidents.forEach(incident => {
3091
+ incident.amount = incident.amount === 0 ? null : incident.amount;
3092
+ incident.count = incident.count === 0 ? null : incident.count;
3093
+ });
3094
+ }
3095
+
3042
3096
  this.formStore.productConditionsForm.coverPeriod = 12;
3043
- this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(
3044
- applicationData.policyAppDto.amount === null ? null : applicationData.policyAppDto.amount,
3045
- );
3097
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount === 0 ? null : applicationData.policyAppDto.amount);
3046
3098
  this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(
3047
3099
  applicationData.policyAppDto.mainPremium === 0 ? null : applicationData.policyAppDto.mainPremium,
3048
3100
  );
@@ -3050,6 +3102,8 @@ export const useDataStore = defineStore('data', {
3050
3102
  this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
3051
3103
  const processTariff = this.processTariff.find(item => item.id == applicationData.policyAppDto.tariffId);
3052
3104
  this.formStore.productConditionsForm.processTariff = processTariff ? processTariff : new Value();
3105
+ const processGfot = this.processGfot.find(item => item.id == applicationData.policyAppDto.processDefinitionFgotId);
3106
+ this.formStore.productConditionsForm.processGfot = processGfot ? processGfot : new Value();
3053
3107
  } catch (err) {
3054
3108
  ErrorHandler(err);
3055
3109
  if (err instanceof AxiosError) {
@@ -3147,7 +3201,7 @@ export const useDataStore = defineStore('data', {
3147
3201
  this.showToaster('error', this.t('toaster.notSavedMember', { text: text }), 3000);
3148
3202
  return false;
3149
3203
  } else {
3150
- // @ts-ignore
3204
+ // @ts-ignore
3151
3205
  if (this.formStore.lfb[localKey][0].iin !== null) {
3152
3206
  this.showToaster('error', this.t('toaster.notSavedMember', { text: text }), 3000);
3153
3207
  return false;
@@ -3197,7 +3251,7 @@ export const useDataStore = defineStore('data', {
3197
3251
  }
3198
3252
  }
3199
3253
 
3200
- if (!this.formStore.productConditionsForm.insurancePremiumPerMonth && !this.formStore.productConditionsForm.requestedSumInsured) {
3254
+ if (this.formStore.productConditionsForm.insurancePremiumPerMonth === null) {
3201
3255
  this.showToaster('error', this.t('toaster.emptyProductConditions'), 3000);
3202
3256
  return false;
3203
3257
  }
@@ -0,0 +1,17 @@
1
+ import type { PiniaCustomStateProperties, StoreActions, StoreGeneric, StoreGetters, StoreState } from 'pinia';
2
+ import type { ToRefs } from 'vue';
3
+ import { isReactive, isRef, toRaw, toRef } from 'vue';
4
+ type Extracted<SS> = ToRefs<StoreState<SS> & StoreGetters<SS> & PiniaCustomStateProperties<StoreState<SS>>> & StoreActions<SS>;
5
+ export function extractStore<SS extends StoreGeneric>(store: SS): Extracted<SS> {
6
+ const rawStore = toRaw(store);
7
+ const refs: Record<string, unknown> = {};
8
+
9
+ for (const [key, value] of Object.entries(rawStore)) {
10
+ if (isRef(value) || isReactive(value)) {
11
+ refs[key] = toRef(store, key);
12
+ } else if (typeof value === 'function') {
13
+ refs[key] = value;
14
+ }
15
+ }
16
+ return refs as Extracted<SS>;
17
+ }
package/types/form.ts ADDED
@@ -0,0 +1,73 @@
1
+ export {};
2
+
3
+ export enum FieldTypes {
4
+ TEXT = 'text',
5
+ NUMBER = 'number',
6
+ SWITCH = 'switch',
7
+ EMAIL = 'email',
8
+ PASSWORD = 'password',
9
+ FILE = 'file',
10
+ }
11
+
12
+ declare global {
13
+ type InputType = TextInput | NumberInput | FileInput | SwitchInput;
14
+ type FormMasks = 'numbers' | 'iin' | 'otp' | 'phone' | 'date' | 'post' | 'threeDigit' | 'iik';
15
+ type FormIcons = 'arrowRight' | 'search' | 'sms' | null;
16
+ type Suffix = 'kzt' | 'usd' | 'percent' | null;
17
+
18
+ export interface DynamicForm {
19
+ formRef: any;
20
+ sections: SectionType[];
21
+ fieldOrder?: string[];
22
+ }
23
+
24
+ type InputBase = {
25
+ modelValue?: any;
26
+ clearable?: boolean;
27
+ label?: string;
28
+ placeholder?: string;
29
+ readonly?: boolean;
30
+ disabled?: boolean;
31
+ arrowRight?: boolean;
32
+ maxLength?: number | null;
33
+ rules?: ValidationRule[];
34
+ iconName?: FormIcons;
35
+ value?: number;
36
+ suffix?: Suffix | null;
37
+ hint?: string | undefined;
38
+ maska?: FormMasks | null;
39
+ };
40
+
41
+ type FormControl<T extends InputType> = T & {
42
+ valid: boolean;
43
+ dirty: boolean;
44
+ touched: boolean;
45
+ };
46
+
47
+ type FileInput = InputBase & {
48
+ type: FieldTypes.FILE;
49
+ };
50
+
51
+ type TextInput = InputBase & {
52
+ type: FieldTypes.TEXT;
53
+ };
54
+
55
+ type SwitchInput = InputBase & {
56
+ type: FieldTypes.SWITCH;
57
+ labeling: boolean | null;
58
+ direction: 'horizontal' | 'vertical';
59
+ falseValue: boolean | string | null;
60
+ trueValue: boolean | string | null;
61
+ };
62
+
63
+ type NumberInput = InputBase & {
64
+ type: FieldTypes.NUMBER;
65
+ };
66
+
67
+ type ValidationRule = (value: string) => boolean | string;
68
+
69
+ type SectionType = {
70
+ title?: string;
71
+ fields: InputType[];
72
+ };
73
+ }
package/types/index.ts CHANGED
@@ -23,7 +23,8 @@ declare global {
23
23
  | 'checkcontract'
24
24
  | 'checkcontragent'
25
25
  | 'daskamkorlyk'
26
- | 'dso';
26
+ | 'dso'
27
+ | 'uu';
27
28
  type MemberKeys = keyof ReturnType<typeof useFormStore>;
28
29
  type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
29
30
  type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
@@ -265,6 +266,7 @@ declare global {
265
266
  tariffId?: string | number | null;
266
267
  clients?: ClientV2[];
267
268
  agentCommission?: any;
269
+ processDefinitionFgotId?: any;
268
270
  };
269
271
 
270
272
  interface ClientV2 {
@@ -300,6 +302,7 @@ declare global {
300
302
  annuityMonthPay: string | number | null;
301
303
  mainPremium?: number;
302
304
  clients?: ClientV2[];
305
+ fixInsSum?: number | null;
303
306
  };
304
307
 
305
308
  interface AddCover {
@@ -561,6 +564,9 @@ declare global {
561
564
  insTermInMonth?: number | null;
562
565
  fixInsSum?: number | string | null;
563
566
  tariffId?: string | null;
567
+ mainPremium?: number | string | null;
568
+ processDefinitionFgotId?: string | number;
569
+ mainInsSum?: number;
564
570
  };
565
571
 
566
572
  type InsisWorkDataApp = {