hl-core 0.0.10-beta.40 → 0.0.10-beta.41-1

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
@@ -312,6 +312,12 @@ export class ApiClass {
312
312
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicProgramType',
313
313
  });
314
314
  }
315
+ async getSource() {
316
+ return await this.axiosCall<Value[]>({
317
+ method: Methods.GET,
318
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicSource',
319
+ });
320
+ }
315
321
 
316
322
  async getContrAgentData(personId: string | number) {
317
323
  return await this.axiosCall<Types.ContragentQuestionaries[]>({
@@ -643,6 +649,13 @@ export class ApiClass {
643
649
  });
644
650
  }
645
651
 
652
+ async filterExecutorByRegion(dictName: string, filterName: string) {
653
+ return await this.axiosCall<Value[]>({
654
+ method: Methods.GET,
655
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
656
+ });
657
+ }
658
+
646
659
  async setINSISWorkData(data: Types.InsisWorkDataApp) {
647
660
  return await this.axiosCall({
648
661
  method: Methods.POST,
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <base-panel-input
3
+ class="source-form-input"
4
+ v-model="formStore.Source"
5
+ :value="formStore.Source?.nameRu"
6
+ :readonly="true"
7
+ :clearable="false"
8
+ :label="$dataStore.t('form.source')"
9
+ />
10
+ </template>
11
+
12
+ <script lang="ts">
13
+ export default defineComponent({
14
+ setup(props) {
15
+ const formStore = useFormStore();
16
+
17
+ return {
18
+ // State
19
+ formStore,
20
+ };
21
+ },
22
+ });
23
+ </script>
24
+
25
+ <style scoped>
26
+ .source-form-input {
27
+ border-radius: 4px;
28
+ border: 1px solid #e5e7eb;
29
+ }
30
+ </style>
@@ -55,6 +55,18 @@
55
55
  append-inner-icon="mdi mdi-chevron-right"
56
56
  @append="openPanel('AgentData', $dataStore.t('form.agent'))"
57
57
  />
58
+ <base-panel-input
59
+ v-if="isExecutorShown"
60
+ class="pl-1 pt-1"
61
+ v-model="formStore.ExecutorGPH"
62
+ :value="formStore.ExecutorGPH?.nameRu"
63
+ :readonly="isExecutorReadonly"
64
+ :clearable="!isExecutorReadonly"
65
+ :label="$dataStore.t('form.executor')"
66
+ :rules="$rules.objectRequired"
67
+ append-inner-icon="mdi mdi-chevron-right"
68
+ @append="openPanel('ExecutorGPH', $dataStore.t('form.executor'))"
69
+ />
58
70
  </v-form>
59
71
  </v-expansion-panel-text>
60
72
  </v-expansion-panel>
@@ -90,7 +102,10 @@
90
102
  </div>
91
103
  </div>
92
104
  </div>
93
- <div v-if="currentDictName === 'ManagerPolicy' || currentDictName === 'RegionPolicy' || currentDictName === 'SaleChanellPolicy'" class="w-full flex flex-col gap-2 p-2">
105
+ <div
106
+ v-if="currentDictName === 'ManagerPolicy' || currentDictName === 'RegionPolicy' || currentDictName === 'SaleChanellPolicy' || currentDictName === 'ExecutorGPH'"
107
+ class="w-full flex flex-col gap-2 p-2"
108
+ >
94
109
  <div v-for="(item, index) in $dataStore[currentDictName].filter(i => (i.nameRu as string).toLowerCase().includes(searchQuery.toLowerCase()))" :key="index">
95
110
  <base-panel-select-item :key="index" :text="item.nameRu ?? ''" :selected="item.ids === (panelValue as Value).ids" @click="pickPanelValue(item)" />
96
111
  </div>
@@ -120,7 +135,7 @@ export default defineComponent({
120
135
  },
121
136
  },
122
137
  setup(props) {
123
- type ManagerAttachmentFiels = 'SaleChanellPolicy' | 'RegionPolicy' | 'ManagerPolicy' | 'AgentData';
138
+ type ManagerAttachmentFiels = 'SaleChanellPolicy' | 'RegionPolicy' | 'ManagerPolicy' | 'AgentData' | 'ExecutorGPH';
124
139
  type FieldTypes = Value | AgentData;
125
140
  const route = useRoute();
126
141
  const dataStore = useDataStore();
@@ -163,6 +178,12 @@ export default defineComponent({
163
178
  }
164
179
  return isReadonly.value;
165
180
  });
181
+ const isExecutorReadonly = computed(() => {
182
+ if (!isReadonly.value) {
183
+ if (dataStore.isPension) return dataStore.isExecutor() || !dataStore.isInitiator();
184
+ }
185
+ return isReadonly.value;
186
+ });
166
187
  const isSaleChanellShown = computed(() => {
167
188
  if (dataStore.isGons) return !dataStore.isAgent();
168
189
  return true;
@@ -178,6 +199,7 @@ export default defineComponent({
178
199
  if (dataStore.isGons) return !dataStore.isAgent();
179
200
  return true;
180
201
  });
202
+ const isExecutorShown = dataStore.isPension;
181
203
  const openPanel = async (currentDict: ManagerAttachmentFiels, title: string) => {
182
204
  searchQuery.value = '';
183
205
  if (dataStore.isTask() && !props.disabled) {
@@ -190,6 +212,10 @@ export default defineComponent({
190
212
  isPanelLoading.value = true;
191
213
  await dataStore.filterManagerByRegion(formStore.RegionPolicy.ids as string);
192
214
  }
215
+ if (currentDict === 'ExecutorGPH' && formStore.RegionPolicy.ids) {
216
+ isPanelLoading.value = true;
217
+ await dataStore.filterExecutorByRegion(formStore.RegionPolicy.ids as string);
218
+ }
193
219
 
194
220
  isPanelOpen.value = true;
195
221
  panelValue.value = formStore[currentDict];
@@ -274,10 +300,13 @@ export default defineComponent({
274
300
  isRegionReadonly,
275
301
  isManagerReadonly,
276
302
  isAgentReadonly,
303
+ isExecutorReadonly,
277
304
  isSaleChanellShown,
278
305
  isRegionShown,
279
306
  isManagerShown,
280
307
  isAgentShown,
308
+ isExecutorShown,
309
+
281
310
  // Functions
282
311
  openPanel,
283
312
  searchAgent,
@@ -55,7 +55,7 @@
55
55
  <base-form-input v-model="insured.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
56
56
  </div>
57
57
  </base-form-section>
58
- <base-form-section v-if="isUnderwriterRole && whichProduct !== 'pensionannuitynew' && whichProduct !== 'balam'" :title="$dataStore.t('recalculationInfo')">
58
+ <base-form-section v-if="isUnderwriterRole && whichProduct !== 'pensionannuitynew' && whichProduct !== 'balam' && whichProduct !== 'tumar'" :title="$dataStore.t('recalculationInfo')">
59
59
  <base-form-input
60
60
  v-model="productConditionsForm.lifeMultiply"
61
61
  :maska="$maska.numbers"
@@ -223,6 +223,7 @@
223
223
  @input="onInputFixInsSum"
224
224
  />
225
225
  <base-form-input
226
+ v-if="hasRequestedSumInsured"
226
227
  v-model="productConditionsForm.requestedSumInsured"
227
228
  :readonly="isDisabledSum"
228
229
  :clearable="!isDisabledSum"
@@ -244,6 +245,7 @@
244
245
  @onClear="onClearSumDollar"
245
246
  />
246
247
  <base-form-input
248
+ v-if="hasInsurancePremiumPerMonth"
247
249
  v-model="productConditionsForm.insurancePremiumPerMonth"
248
250
  :readonly="insurancePremiumPerMonthDisabled"
249
251
  :clearable="!insurancePremiumPerMonthDisabled"
@@ -253,6 +255,22 @@
253
255
  @input="onInputInsurancePremiumPerMonth"
254
256
  @onClear="onClearPremium"
255
257
  />
258
+ <base-form-input
259
+ v-if="hasPaidOrRefund"
260
+ v-model="productConditionsForm.amountRefunded"
261
+ :readonly="isDisabledSum"
262
+ :clearable="!isDisabledSum"
263
+ :label="$dataStore.t('productConditionsForm.amountRefunded')"
264
+ :suffix="$constants.currencySymbols.kzt"
265
+ />
266
+ <base-form-input
267
+ v-if="hasPaidOrRefund"
268
+ v-model="productConditionsForm.amountPaid"
269
+ :readonly="insurancePremiumPerMonthDisabled"
270
+ :clearable="!insurancePremiumPerMonthDisabled"
271
+ :label="$dataStore.t('productConditionsForm.amountPaid')"
272
+ :suffix="$constants.currencySymbols.kzt"
273
+ />
256
274
  <base-form-input
257
275
  v-if="hasInsurancePremiumPerMonthInDollar"
258
276
  v-model="productConditionsForm.insurancePremiumPerMonthInDollar"
@@ -896,6 +914,8 @@ export default defineComponent({
896
914
  const whichSum = ref<'insurancePremiumPerMonth' | 'requestedSumInsured' | ''>('');
897
915
  const panelCodeList = ['processcovertypesum', 'fixedinssum'];
898
916
  const enabled = 'включено';
917
+ const amountRefunded = ref<string | number | null>(null);
918
+ const amountPaid = ref<string | number | null>(null);
899
919
 
900
920
  const additionalTerms = ref<AddCover[]>([]);
901
921
 
@@ -1016,6 +1036,13 @@ export default defineComponent({
1016
1036
  }
1017
1037
  return true;
1018
1038
  });
1039
+
1040
+ const hasRequestedSumInsured = computed(() => {
1041
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1042
+ return false;
1043
+ }
1044
+ return true;
1045
+ });
1019
1046
  const hasRequestedSumInsuredInDollar = computed(() => {
1020
1047
  if (whichProduct.value === 'halykkazyna') {
1021
1048
  return true;
@@ -1025,6 +1052,12 @@ export default defineComponent({
1025
1052
  }
1026
1053
  return false;
1027
1054
  });
1055
+ const hasInsurancePremiumPerMonth = computed(() => {
1056
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1057
+ return false;
1058
+ }
1059
+ return true;
1060
+ });
1028
1061
  const hasInsurancePremiumPerMonthInDollar = computed(() => {
1029
1062
  if (whichProduct.value === 'halykkazyna') {
1030
1063
  return true;
@@ -1135,9 +1168,6 @@ export default defineComponent({
1135
1168
  if (whichProduct.value === 'halykkazyna') {
1136
1169
  return dataStore.t('productConditionsForm.requestedSumInsuredInTenge');
1137
1170
  }
1138
- if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1139
- return dataStore.t('productConditionsForm.amountRefunded');
1140
- }
1141
1171
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
1142
1172
  return dataStore.t('productConditionsForm.totalRequestedSumInsured');
1143
1173
  }
@@ -1150,9 +1180,6 @@ export default defineComponent({
1150
1180
  return dataStore.t('productConditionsForm.coverPeriod');
1151
1181
  });
1152
1182
  const insurancePremiumPerMonthLabel = computed(() => {
1153
- if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1154
- return dataStore.t('productConditionsForm.amountPaid');
1155
- }
1156
1183
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
1157
1184
  return dataStore.t('productConditionsForm.totalInsurancePremiumAmountWithCommission');
1158
1185
  }
@@ -1267,6 +1294,12 @@ export default defineComponent({
1267
1294
  }
1268
1295
  return false;
1269
1296
  });
1297
+ const hasPaidOrRefund = computed(() => {
1298
+ if (formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
1299
+ return true;
1300
+ }
1301
+ return false;
1302
+ });
1270
1303
  const hasDeathInsFromNS = computed(() => {
1271
1304
  if (whichProduct.value === 'gns') {
1272
1305
  return true;
@@ -2348,6 +2381,8 @@ export default defineComponent({
2348
2381
  transferContractFirstPaymentDate,
2349
2382
  enabled,
2350
2383
  maxDate,
2384
+ amountPaid,
2385
+ amountRefunded,
2351
2386
  transferMaxDate,
2352
2387
  guaranteedPeriodList,
2353
2388
  isEnpfSum,
@@ -2375,9 +2410,12 @@ export default defineComponent({
2375
2410
  isUnderwriterRole,
2376
2411
  hasProcessIndexRate,
2377
2412
  hasPaymentPeriod,
2413
+ hasRequestedSumInsured,
2414
+ hasInsurancePremiumPerMonth,
2378
2415
  hasRequestedSumInsuredInDollar,
2379
2416
  hasInsurancePremiumPerMonthInDollar,
2380
2417
  hasCurrency,
2418
+ hasPaidOrRefund,
2381
2419
  hasContragentData,
2382
2420
  hasAdbMultiply,
2383
2421
  readonlyLifeAdditive,
@@ -51,12 +51,6 @@ class MenuItemConfig {
51
51
  }
52
52
  }
53
53
 
54
- export class MenuItem extends MenuItemConfig {
55
- constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip }: MenuItemConfig = new MenuItemConfig()) {
56
- super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip);
57
- }
58
- }
59
-
60
54
  export class Value {
61
55
  id: string | number | null;
62
56
  code: string | number | null;
@@ -826,6 +820,8 @@ export class ProductConditions {
826
820
  calculatorForm: CalculatorForm;
827
821
  agentCommission: number | null;
828
822
  fixInsSum: number | string | null;
823
+ amountRefunded: number | string | null;
824
+ amountPaid: number | string | null;
829
825
  calcDate: string | null;
830
826
  contractEndDate: string | null;
831
827
  currency: Value;
@@ -874,6 +870,8 @@ export class ProductConditions {
874
870
  calculatorForm = new CalculatorForm(),
875
871
  agentCommission = null,
876
872
  fixInsSum = null,
873
+ amountRefunded = null,
874
+ amountPaid = null,
877
875
  calcDate = null,
878
876
  contractEndDate = null,
879
877
  currency = new Value(),
@@ -926,6 +924,8 @@ export class ProductConditions {
926
924
  this.calculatorForm = calculatorForm;
927
925
  this.agentCommission = agentCommission;
928
926
  this.fixInsSum = fixInsSum;
927
+ this.amountRefunded = amountRefunded;
928
+ this.amountPaid = amountPaid;
929
929
  this.calcDate = calcDate;
930
930
  this.contractEndDate = contractEndDate;
931
931
  this.currency = currency;
@@ -1002,6 +1002,8 @@ export class DataStoreClass {
1002
1002
  hasChooseSign: boolean;
1003
1003
  // Выбор метода оплаты
1004
1004
  hasChoosePay: boolean;
1005
+ // Блок источник
1006
+ hasSource: boolean;
1005
1007
  };
1006
1008
  members: {
1007
1009
  clientApp: MemberSettings;
@@ -1101,9 +1103,11 @@ export class DataStoreClass {
1101
1103
  SaleChanellPolicy: Value[];
1102
1104
  RegionPolicy: Value[];
1103
1105
  ManagerPolicy: Value[];
1106
+ ExecutorGPH: Value[];
1104
1107
  AgentData: Types.AgentData[];
1105
1108
  riskGroup: Value[];
1106
1109
  DicCoverTypePeriod: Value[];
1110
+ Source: Value[];
1107
1111
  currencies: {
1108
1112
  eur: number | null;
1109
1113
  usd: number | null;
@@ -1171,6 +1175,7 @@ export class DataStoreClass {
1171
1175
  hasAffiliation: true,
1172
1176
  hasChooseSign: false,
1173
1177
  hasChoosePay: false,
1178
+ hasSource: false,
1174
1179
  };
1175
1180
  this.iframeLoading = false;
1176
1181
  this.hasLayoutMargins = true;
@@ -1184,8 +1189,10 @@ export class DataStoreClass {
1184
1189
  this.SaleChanellPolicy = [];
1185
1190
  this.RegionPolicy = [];
1186
1191
  this.ManagerPolicy = [];
1192
+ this.ExecutorGPH = [];
1187
1193
  this.AgentData = [];
1188
1194
  this.DicCoverTypePeriod = [];
1195
+ this.Source = [];
1189
1196
  this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Types.Projects) : null;
1190
1197
  this.parentProduct = import.meta.env.VITE_PARENT_PRODUCT ? import.meta.env.VITE_PARENT_PRODUCT : 'efo';
1191
1198
  this.showNav = true;
@@ -1383,6 +1390,8 @@ export class FormStoreClass {
1383
1390
  AgentData: Types.AgentData;
1384
1391
  RegionPolicy: Value;
1385
1392
  ManagerPolicy: Value;
1393
+ ExecutorGPH: Value;
1394
+ Source: Value;
1386
1395
  isDisabled: {
1387
1396
  policyholderForm: boolean;
1388
1397
  beneficiaryForm: boolean;
@@ -1513,6 +1522,8 @@ export class FormStoreClass {
1513
1522
  };
1514
1523
  this.RegionPolicy = new Value();
1515
1524
  this.ManagerPolicy = new Value();
1525
+ this.ExecutorGPH = new Value();
1526
+ this.Source = new Value();
1516
1527
  this.isDisabled = {
1517
1528
  policyholderForm: true,
1518
1529
  beneficiaryForm: true,
@@ -1818,3 +1829,9 @@ export class TransferContract {
1818
1829
  export class RequiredDocument extends Value {
1819
1830
  iin: string = '';
1820
1831
  }
1832
+
1833
+ export class MenuItem extends MenuItemConfig {
1834
+ constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip }: MenuItemConfig = new MenuItemConfig()) {
1835
+ super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip);
1836
+ }
1837
+ }
@@ -24,6 +24,7 @@ export const constants = Object.freeze({
24
24
  pensionannuityrefundnew: 24,
25
25
  pensionannuityjointnew: 25,
26
26
  gonsadd: 26,
27
+ tumar: 27,
27
28
  criticalillness: 29,
28
29
  },
29
30
  amlProducts: {
@@ -733,123 +733,60 @@ export class RoleController {
733
733
  const hasAccessByProduct = (() => {
734
734
  const product = productFromExternal as Projects;
735
735
  if (dataStore.isLifetrip || product === 'lifetrip') return this.isBranchDirector();
736
- if (dataStore.isPension || product === 'pensionannuitynew') return this.isBranchDirector();
736
+ if (dataStore.isPension || product === 'pensionannuitynew') return this.isBranchDirector() || this.isExecutor();
737
737
  if (dataStore.isLifeBusiness || product === 'lifebusiness') return this.isHeadManager() || this.isBranchDirector();
738
738
  return false;
739
739
  })();
740
740
  return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
741
741
  };
742
- isManager = () => {
743
- return this.isRole(constants.roles.Manager);
744
- };
745
- isCompliance = () => {
746
- return this.isRole(constants.roles.Compliance);
747
- };
748
- isAdmin = () => {
749
- return this.isRole(constants.roles.Admin);
750
- };
751
- isJurist = () => {
752
- return this.isRole(constants.roles.Jurist);
753
- };
754
- isAgent = () => {
755
- return this.isRole(constants.roles.Agent);
756
- };
757
- isManagerHalykBank = () => {
758
- return this.isRole(constants.roles.ManagerHalykBank);
759
- };
760
- isServiceManager = () => {
761
- return this.isRole(constants.roles.ServiceManager);
762
- };
763
- isUSNSsanctioner = () => {
764
- return this.isRole(constants.roles.USNSsanctioner);
765
- };
766
- isUnderwriter = () => {
767
- return this.isRole(constants.roles.Underwriter);
768
- };
769
- isActuary = () => {
770
- return this.isRole(constants.roles.Actuary);
771
- };
772
- isAgentMycar = () => {
773
- return this.isRole(constants.roles.AgentMycar);
774
- };
775
- isAgentAuletti = () => {
776
- return this.isRole(constants.roles.AgentAuletti);
777
- };
778
- isManagerAuletti = () => {
779
- return this.isRole(constants.roles.ManagerAuletti);
780
- };
781
- isAnalyst = () => {
782
- return this.isRole(constants.roles.Analyst);
783
- };
784
- isUpk = () => {
785
- return this.isRole(constants.roles.UPK);
786
- };
787
- isUrp = () => {
788
- return this.isRole(constants.roles.URP);
789
- };
790
- isUsns = () => {
791
- return this.isRole(constants.roles.USNS);
792
- };
793
- isAccountant = () => {
794
- return this.isRole(constants.roles.Accountant);
795
- };
796
- isDrn = () => {
797
- return this.isRole(constants.roles.DRNSJ);
798
- };
799
- isSupport = () => {
800
- return this.isRole(constants.roles.Support);
801
- };
802
- isFinCenter = () => {
803
- return this.isRole(constants.roles.FinCenter);
804
- };
805
- isSupervisor = () => {
806
- return this.isRole(constants.roles.Supervisor);
807
- };
808
- isHeadManager = () => {
809
- return this.isRole(constants.roles.HeadManager);
810
- };
811
- isBranchDirector = () => {
812
- return this.isRole(constants.roles.BranchDirector);
813
- };
814
- isUSNSACCINS = () => {
815
- return this.isRole(constants.roles.USNSACCINS);
816
- };
817
- isDsuio = () => {
818
- return this.isRole(constants.roles.Dsuio);
819
- };
820
- isHeadDso = () => {
821
- return this.isRole(constants.roles.HEADDSO);
822
- };
823
- isAdjuster = () => {
824
- return this.isRole(constants.roles.SettlementLosses);
825
- };
826
- isHeadAdjuster = () => {
827
- return this.isRole(constants.roles.HeadSettlementLosses);
828
- };
829
- isDsoDirector = () => {
830
- return this.isRole(constants.roles.DsoDirector);
831
- };
832
- isArchivist = () => {
833
- return this.isRole(constants.roles.Archivist);
834
- };
835
- isAccountantDirector = () => {
836
- return this.isRole(constants.roles.AccountantDirector);
837
- };
838
- isHeadOfDso = () => {
839
- return this.isRole(constants.roles.HeadOfDso);
840
- };
841
- isUrsp = () => {
842
- return this.isRole(constants.roles.URSP);
843
- };
742
+ isManager = () => this.isRole(constants.roles.Manager);
743
+ isCompliance = () => this.isRole(constants.roles.Compliance);
744
+ isAdmin = () => this.isRole(constants.roles.Admin);
745
+ isJurist = () => this.isRole(constants.roles.Jurist);
746
+ isAgent = () => this.isRole(constants.roles.Agent);
747
+ isManagerHalykBank = () => this.isRole(constants.roles.ManagerHalykBank);
748
+ isServiceManager = () => this.isRole(constants.roles.ServiceManager);
749
+ isUSNSsanctioner = () => this.isRole(constants.roles.USNSsanctioner);
750
+ isUnderwriter = () => this.isRole(constants.roles.Underwriter);
751
+ isActuary = () => this.isRole(constants.roles.Actuary);
752
+ isAgentMycar = () => this.isRole(constants.roles.AgentMycar);
753
+ isAgentAuletti = () => this.isRole(constants.roles.AgentAuletti);
754
+ isManagerAuletti = () => this.isRole(constants.roles.ManagerAuletti);
755
+ isAnalyst = () => this.isRole(constants.roles.Analyst);
756
+ isUpk = () => this.isRole(constants.roles.UPK);
757
+ isUrp = () => this.isRole(constants.roles.URP);
758
+ isUsns = () => this.isRole(constants.roles.USNS);
759
+ isAccountant = () => this.isRole(constants.roles.Accountant);
760
+ isDrn = () => this.isRole(constants.roles.DRNSJ);
761
+ isSupport = () => this.isRole(constants.roles.Support);
762
+ isFinCenter = () => this.isRole(constants.roles.FinCenter);
763
+ isSupervisor = () => this.isRole(constants.roles.Supervisor);
764
+ isHeadManager = () => this.isRole(constants.roles.HeadManager);
765
+ isBranchDirector = () => this.isRole(constants.roles.BranchDirector);
766
+ isUSNSACCINS = () => this.isRole(constants.roles.USNSACCINS);
767
+ isDsuio = () => this.isRole(constants.roles.Dsuio);
768
+ isHeadDso = () => this.isRole(constants.roles.HEADDSO);
769
+ isAdjuster = () => this.isRole(constants.roles.SettlementLosses);
770
+ isHeadAdjuster = () => this.isRole(constants.roles.HeadSettlementLosses);
771
+ isDsoDirector = () => this.isRole(constants.roles.DsoDirector);
772
+ isArchivist = () => this.isRole(constants.roles.Archivist);
773
+ isAccountantDirector = () => this.isRole(constants.roles.AccountantDirector);
774
+ isHeadOfDso = () => this.isRole(constants.roles.HeadOfDso);
775
+ isUrsp = () => this.isRole(constants.roles.URSP);
776
+ isExecutor = () => this.isRole(constants.roles.ExecutorGPH);
777
+ isDsuioOrv = () => this.isRole(constants.roles.DsuioOrv);
778
+ isUKP = () => this.isRole(constants.roles.UKP);
779
+ isDpDirector = () => this.isRole(constants.roles.DpDirector);
780
+ isSecurity = () => this.isRole(constants.roles.Security);
844
781
  hasAccess = () => {
845
- const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn();
782
+ const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn() || this.isDsuioOrv();
846
783
  return {
847
784
  invoiceInfo: this.isAdmin() || this.isSupport(),
848
785
  toLKA: this.isAgent() || this.isManagerHalykBank() || baseAccessRoles,
849
786
  toAML: this.isCompliance() || baseAccessRoles,
850
787
  toAULETTI: this.isAgentAuletti() || this.isManagerAuletti() || baseAccessRoles,
851
788
  toLKA_A: this.isAgentAuletti() || baseAccessRoles,
852
- toUU: this.isServiceManager() || this.isAccountant() || this.isAdjuster() || this.isHeadAdjuster() || baseAccessRoles,
789
+ toUU: this.isServiceManager() || this.isAccountant() || this.isAdjuster() || this.isHeadAdjuster() || this.isArchivist() || this.isSecurity() || baseAccessRoles,
853
790
  toDSO:
854
791
  this.isDsuio() ||
855
792
  this.isActuary() ||
@@ -891,7 +828,11 @@ export class RoleController {
891
828
  this.isAccountantDirector() ||
892
829
  this.isHeadAdjuster() ||
893
830
  this.isHeadOfDso() ||
894
- this.isUrsp(),
831
+ this.isUrsp() ||
832
+ this.isExecutor() ||
833
+ this.isArchivist() ||
834
+ this.isUKP() ||
835
+ this.isDpDirector(),
895
836
  };
896
837
  };
897
838
  }
package/locales/ru.json CHANGED
@@ -1001,7 +1001,9 @@
1001
1001
  "sendToEmail": "Отправить на почту",
1002
1002
  "otpCode": "Код подтверждения",
1003
1003
  "salesChanell": "Канал продаж",
1004
+ "source": "Источник",
1004
1005
  "manager": "Менеджер",
1006
+ "executor": "Исполнитель",
1005
1007
  "attachManager": "Менеджер",
1006
1008
  "agent": "Агент",
1007
1009
  "insurancePay": "Страховая выплата подлежит осуществлению",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.40",
3
+ "version": "0.0.10-beta.41-1",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -65,6 +65,7 @@ export const useDataStore = defineStore('data', {
65
65
  isPrePension: state => state.product === 'prepensionannuity',
66
66
  isCritical: state => state.product === 'criticalillness',
67
67
  isBalam: state => state.product === 'balam',
68
+ isTumar: state => state.product === 'tumar',
68
69
  isDSO: state => state.product === 'dso',
69
70
  isUU: state => state.product === 'uu',
70
71
  hasClientAnketa: state => Array.isArray(state.formStore.additionalInsuranceTerms) && state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
@@ -1130,6 +1131,14 @@ export const useDataStore = defineStore('data', {
1130
1131
  this.formStore.productConditionsForm.currency.code === 'KZT' ? null : getNumber(String(this.formStore.productConditionsForm.requestedSumInsuredInDollar));
1131
1132
  conditionsData.policyAppDto.currencyExchangeRate = this.formStore.productConditionsForm.currency.code === 'KZT' ? null : this.currencies.usd;
1132
1133
  conditionsData.policyAppDto.currency = this.formStore.productConditionsForm.currency.code as string;
1134
+ //@ts-ignore
1135
+ if (isNaN(String(this.formStore.productConditionsForm.requestedSumInsured).replace(/\s/g, ''))) {
1136
+ conditionsData.policyAppDto.amount = parseFloat(String(this.formStore.productConditionsForm.requestedSumInsured).replace(/\s/g, '').replace(',', '.'));
1137
+ }
1138
+ //@ts-ignore
1139
+ if (isNaN(String(this.formStore.productConditionsForm.insurancePremiumPerMonth).replace(/\s/g, ''))) {
1140
+ conditionsData.policyAppDto.premium = parseFloat(String(this.formStore.productConditionsForm.insurancePremiumPerMonth).replace(/\s/g, '').replace(',', '.'));
1141
+ }
1133
1142
  }
1134
1143
  if (this.isLiferenta) {
1135
1144
  conditionsData.policyAppDto.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
@@ -1252,6 +1261,8 @@ export const useDataStore = defineStore('data', {
1252
1261
  regionPolicyName: this.formStore.RegionPolicy.nameRu ?? '',
1253
1262
  managerPolicy: this.formStore.ManagerPolicy.ids as string,
1254
1263
  managerPolicyName: this.formStore.ManagerPolicy.nameRu ?? '',
1264
+ executorGPH: (this.formStore.ExecutorGPH.ids as string) ?? undefined,
1265
+ executorGPHName: this.formStore.ExecutorGPH.nameRu ?? undefined,
1255
1266
  insuranceProgramType: this.formStore.applicationData.insisWorkDataApp.insuranceProgramType,
1256
1267
  };
1257
1268
  try {
@@ -1512,6 +1523,9 @@ export const useDataStore = defineStore('data', {
1512
1523
  const makeCall = (this.isLifeBusiness || this.isGns) && this.processCode;
1513
1524
  if (makeCall) return await this.getFromApi('processGfot', 'getProcessGfot', this.processCode);
1514
1525
  },
1526
+ async getSource() {
1527
+ return await this.getFromApi('Source', 'getSource');
1528
+ },
1515
1529
  async getCurrencies() {
1516
1530
  try {
1517
1531
  const currencies = await this.api.getCurrencies();
@@ -1573,6 +1587,7 @@ export const useDataStore = defineStore('data', {
1573
1587
  this.getDicTripPurpose(),
1574
1588
  this.getCurrencies(),
1575
1589
  this.getProcessGfot(),
1590
+ this.getSource(),
1576
1591
  this.getBanks(),
1577
1592
  this.getInsuranceCompanies(),
1578
1593
  this.getEconomicActivityType(),
@@ -1791,6 +1806,13 @@ export const useDataStore = defineStore('data', {
1791
1806
  console.log(err);
1792
1807
  }
1793
1808
  },
1809
+ async filterExecutorByRegion(filterName: string) {
1810
+ try {
1811
+ this.ExecutorGPH = await this.api.filterExecutorByRegion('ExecutorGPH', filterName);
1812
+ } catch (err) {
1813
+ console.log(err);
1814
+ }
1815
+ },
1794
1816
  async getUnderwritingCouncilData(id: string | number) {
1795
1817
  try {
1796
1818
  const response: any = await this.api.getUnderwritingCouncilData(id);
@@ -1909,6 +1931,14 @@ export const useDataStore = defineStore('data', {
1909
1931
  calculationData.currencyExchangeRate = this.formStore.productConditionsForm.currency.code === 'KZT' ? null : this.currencies.usd;
1910
1932
 
1911
1933
  calculationData.currency = this.formStore.productConditionsForm.currency.code as string;
1934
+ //@ts-ignore
1935
+ if (isNaN(String(this.formStore.productConditionsForm.requestedSumInsured).replace(/\s/g, ''))) {
1936
+ calculationData.amount = parseFloat(String(this.formStore.productConditionsForm.requestedSumInsured).replace(/\s/g, '').replace(',', '.'));
1937
+ }
1938
+ //@ts-ignore
1939
+ if (isNaN(String(this.formStore.productConditionsForm.insurancePremiumPerMonth).replace(/\s/g, ''))) {
1940
+ calculationData.premium = parseFloat(String(this.formStore.productConditionsForm.insurancePremiumPerMonth).replace(/\s/g, '').replace(',', '.'));
1941
+ }
1912
1942
  }
1913
1943
  if (this.isLiferenta || product === 'liferenta') {
1914
1944
  calculationData.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
@@ -2018,12 +2048,14 @@ export const useDataStore = defineStore('data', {
2018
2048
  this.formStore.lfb.clients = res;
2019
2049
  }
2020
2050
  if (this.formStore.lfb.add) {
2021
- if (result.value > 0) {
2022
- this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(result.value);
2023
- this.formStore.productConditionsForm.requestedSumInsured = null;
2051
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.premium);
2052
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.amount);
2053
+ if (applicationData.policyAppDto.mainPremiumWithCommission > 0) {
2054
+ this.formStore.productConditionsForm.amountPaid = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.mainPremiumWithCommission);
2055
+ this.formStore.productConditionsForm.amountRefunded = null;
2024
2056
  } else {
2025
- this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(result.value);
2026
- this.formStore.productConditionsForm.insurancePremiumPerMonth = null;
2057
+ this.formStore.productConditionsForm.amountRefunded = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.mainPremiumWithCommission);
2058
+ this.formStore.productConditionsForm.amountPaid = null;
2027
2059
  }
2028
2060
  }
2029
2061
  }
@@ -2162,10 +2194,19 @@ export const useDataStore = defineStore('data', {
2162
2194
  this.formStore.RegionPolicy.ids = applicationData.insisWorkDataApp.regionPolicy;
2163
2195
  this.formStore.ManagerPolicy.nameRu = applicationData.insisWorkDataApp.managerPolicyName;
2164
2196
  this.formStore.ManagerPolicy.ids = applicationData.insisWorkDataApp.managerPolicy;
2197
+ this.formStore.ExecutorGPH.nameRu = applicationData.insisWorkDataApp.executorGPHName;
2198
+ this.formStore.ExecutorGPH.ids = applicationData.insisWorkDataApp.executorGPH;
2165
2199
  this.formStore.SaleChanellPolicy.nameRu = applicationData.insisWorkDataApp.saleChanellPolicyName;
2166
2200
  this.formStore.SaleChanellPolicy.ids = applicationData.insisWorkDataApp.saleChanellPolicy;
2167
2201
  this.formStore.AgentData.fullName = applicationData.insisWorkDataApp.agentName;
2168
2202
  this.formStore.AgentData.agentId = applicationData.insisWorkDataApp.agentId;
2203
+ if ('sourceId' in applicationData.insisWorkDataApp && applicationData.insisWorkDataApp.sourceId !== null) {
2204
+ const source = this.Source.find((i: Value) => i.id === applicationData.insisWorkDataApp.sourceId);
2205
+ this.formStore.Source = source ? source : new Value();
2206
+ } else {
2207
+ const sourceEfo = this.Source.find((i: Value) => i.id === '3f9e5327-328c-4bc7-8d28-fa25c36ba153');
2208
+ this.formStore.Source = sourceEfo ? sourceEfo : new Value();
2209
+ }
2169
2210
 
2170
2211
  const clientData = applicationData.clientApp;
2171
2212
  const insuredData: any[] = applicationData.insuredApp;
@@ -3155,7 +3196,11 @@ export const useDataStore = defineStore('data', {
3155
3196
  }
3156
3197
  }
3157
3198
  if (this.controls.hasAttachment) {
3158
- const areValid = this.formStore.SaleChanellPolicy.nameRu && this.formStore.RegionPolicy.nameRu && this.formStore.ManagerPolicy.nameRu && this.formStore.AgentData.fullName;
3199
+ const areValid =
3200
+ this.formStore.SaleChanellPolicy.nameRu &&
3201
+ this.formStore.RegionPolicy.nameRu &&
3202
+ this.formStore.AgentData.fullName &&
3203
+ (this.isPension && this.isServiceManager() ? true : this.formStore.ManagerPolicy.nameRu);
3159
3204
  if (areValid) {
3160
3205
  if (this.isLifetrip && this.formStore.AgentData.fullName === 'Без агента') {
3161
3206
  this.isLoading = false;
@@ -3770,12 +3815,14 @@ export const useDataStore = defineStore('data', {
3770
3815
  this.formStore.productConditionsForm.contractEndDate = reformatDate(applicationData.parentPolicyDto.contractInsrEnd);
3771
3816
  }
3772
3817
  if (this.formStore.lfb.add) {
3818
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.premium);
3819
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.amount);
3773
3820
  if (applicationData.policyAppDto.mainPremiumWithCommission > 0) {
3774
- this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(applicationData.policyAppDto.mainPremiumWithCommission);
3775
- this.formStore.productConditionsForm.requestedSumInsured = null;
3821
+ this.formStore.productConditionsForm.amountPaid = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.mainPremiumWithCommission);
3822
+ this.formStore.productConditionsForm.amountRefunded = null;
3776
3823
  } else {
3777
- this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.mainPremiumWithCommission);
3778
- this.formStore.productConditionsForm.insurancePremiumPerMonth = null;
3824
+ this.formStore.productConditionsForm.amountRefunded = this.getNumberWithSpacesAfterComma(applicationData.policyAppDto.mainPremiumWithCommission);
3825
+ this.formStore.productConditionsForm.amountPaid = null;
3779
3826
  }
3780
3827
  }
3781
3828
  } catch (err) {
@@ -4131,7 +4178,7 @@ export const useDataStore = defineStore('data', {
4131
4178
  }
4132
4179
  },
4133
4180
  hasJobSection(whichForm: keyof typeof StoreMembers) {
4134
- if (this.isLifetrip || this.isPension || this.isBalam) return false;
4181
+ if (this.isLifetrip || this.isPension || this.isBalam || this.isTumar) return false;
4135
4182
  switch (whichForm) {
4136
4183
  case this.formStore.beneficiaryFormKey:
4137
4184
  case this.formStore.beneficialOwnerFormKey:
package/types/enum.ts CHANGED
@@ -117,6 +117,11 @@ export enum Roles {
117
117
  ManagerAuletti = 'ManagerAuletti',
118
118
  HeadOfDso = 'HeadOfDso',
119
119
  URSP = 'URSP',
120
+ ExecutorGPH = 'ExecutorGPH',
121
+ DsuioOrv = 'DsuioOrv',
122
+ UKP = 'UKP',
123
+ DpDirector = 'DpDirector',
124
+ Security = 'Security',
120
125
  }
121
126
 
122
127
  export enum Statuses {
package/types/index.ts CHANGED
@@ -32,7 +32,8 @@ export type Projects =
32
32
  | 'lka-auletti'
33
33
  | 'prepensionannuity'
34
34
  | 'balam'
35
- | 'criticalillness';
35
+ | 'criticalillness'
36
+ | 'tumar';
36
37
  export type MemberKeys = keyof ReturnType<typeof useFormStore>;
37
38
  export type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
38
39
  export type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
@@ -584,6 +585,8 @@ export type InsisWorkDataApp = {
584
585
  regionPolicyName?: string;
585
586
  managerPolicy?: string;
586
587
  managerPolicyName?: string;
588
+ executorGPH?: string;
589
+ executorGPHName?: string;
587
590
  insuranceProgramType?: string;
588
591
  };
589
592