hl-core 0.0.9-beta.54 → 0.0.9-beta.55

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
@@ -11,6 +11,14 @@ export class ApiClass {
11
11
  return data;
12
12
  }
13
13
 
14
+ async getProjectConfig() {
15
+ return await this.axiosCall<Utils.ProjectConfig>({
16
+ method: Methods.GET,
17
+ baseURL: getStrValuePerEnv('gatewayApiUrl'),
18
+ url: `/application/front/${import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? `auletti-${import.meta.env.VITE_PRODUCT}` : import.meta.env.VITE_PRODUCT}`,
19
+ });
20
+ }
21
+
14
22
  async loginUser(data: { login: string; password: string; numAttempt: number }) {
15
23
  return await this.axiosCall<{ refreshToken: string; accessToken: string }>({
16
24
  method: Methods.POST,
@@ -19,6 +27,13 @@ export class ApiClass {
19
27
  });
20
28
  }
21
29
 
30
+ async checkToken() {
31
+ return await this.axiosCall<void>({
32
+ method: Methods.POST,
33
+ url: '/identity/api/Account/CheckToken',
34
+ });
35
+ }
36
+
22
37
  async getNewAccessToken({ refreshToken, accessToken }: { refreshToken: string; accessToken: string }) {
23
38
  return await this.axiosCall<{ refreshToken: string; accessToken: string }>({
24
39
  method: Methods.POST,
@@ -524,7 +539,7 @@ export class ApiClass {
524
539
  }
525
540
 
526
541
  async signQR(data: SignDataType[]) {
527
- return await this.axiosCall({
542
+ return await this.axiosCall<ResponseStructure<any>>({
528
543
  method: Methods.POST,
529
544
  url: '/File/api/Sign/SignQr',
530
545
  data: data,
@@ -968,7 +983,7 @@ export class ApiClass {
968
983
  }
969
984
 
970
985
  async signXml(data: any) {
971
- return await this.axiosCall<any>({
986
+ return await this.axiosCall<ResponseStructure<any>>({
972
987
  url: `/File/api/Sign/SignXml`,
973
988
  method: Methods.POST,
974
989
  data: data,
@@ -1044,11 +1059,30 @@ export class ApiClass {
1044
1059
  });
1045
1060
  }
1046
1061
 
1047
- async getDocumentsByEdsXmlId(edsXmlId: string) {
1062
+ async uploadDigitalCertificatePensionAnnuityNew(data: any) {
1048
1063
  return await this.axiosCall<any>({
1064
+ method: Methods.POST,
1065
+ url: '/File/api/Document/UploadDigitalCertificatePensionAnnuityNew',
1066
+ headers: {
1067
+ 'Content-Type': 'multipart/form-data',
1068
+ },
1069
+ data: data,
1070
+ });
1071
+ }
1072
+
1073
+ async startRejectedApplication(data: any) {
1074
+ return await this.axiosCall({
1075
+ method: Methods.POST,
1076
+ url: `/${this.productUrl}/api/Application/StartRejectedApplication`,
1077
+ data: data,
1078
+ });
1079
+ }
1080
+
1081
+ async getDocumentsByEdsXmlId(edsXmlId: string) {
1082
+ return await this.axiosCall<ResponseStructure<any>>({
1049
1083
  method: Methods.GET,
1050
1084
  url: `/File/api/Sign/GetDocumentsByEdsXmlId/${edsXmlId}`,
1051
- })
1085
+ });
1052
1086
  }
1053
1087
 
1054
1088
  async checkSign(id: string) {
@@ -1057,4 +1091,31 @@ export class ApiClass {
1057
1091
  url: `/${this.productUrl}/api/Application/CheckSign/${id}`,
1058
1092
  });
1059
1093
  }
1094
+
1095
+ async getWorkPosition(search: string) {
1096
+ return await this.axiosCall<Dicts.WorkPosition[]>({
1097
+ method: Methods.POST,
1098
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1099
+ url: '/dictionary/Dictionary/WorkPosition',
1100
+ data: { search },
1101
+ });
1102
+ }
1103
+
1104
+ async getEnpfRedirectUrl(id: string) {
1105
+ return await this.axiosCall<{ redirectUrl: string }>({
1106
+ method: Methods.POST,
1107
+ // TODO
1108
+ baseURL: 'https://products.halyklife.kz/test/efo/api',
1109
+ url: `/pensionannuityNew/GetEnpfRedirectUrl?id=${id}`,
1110
+ });
1111
+ }
1112
+
1113
+ async setEnpfSharedId(sharedId: string, infoId: string) {
1114
+ return await this.axiosCall<void>({
1115
+ method: Methods.POST,
1116
+ // TODO
1117
+ baseURL: 'https://products.halyklife.kz/test/efo/api',
1118
+ url: `/pensionannuityNew/SetEnpfSharedId/${sharedId}/${infoId}`,
1119
+ });
1120
+ }
1060
1121
  }
@@ -69,7 +69,7 @@ export default defineComponent({
69
69
  required: true,
70
70
  },
71
71
  animation: {
72
- type: String as PropType<VuetifyAnimations>,
72
+ type: String as PropType<Utils.VuetifyAnimations>,
73
73
  required: false,
74
74
  },
75
75
  },
@@ -38,8 +38,10 @@
38
38
  {{ $dataStore.t('buttons.logout') }}
39
39
  <i class="mdi mdi-logout text-xl"></i>
40
40
  </base-panel-item>
41
- <div v-if="$dataStore.settings.open && 'version' in pkg && pkg.version" class="absolute bottom-2 w-full flex items-center justify-center opacity-30 text-sm">
42
- <p>{{ pkg.version }}</p>
41
+ <div v-if="$dataStore.settings.open" class="absolute bottom-4 w-full flex flex-col items-center opacity-30 text-sm">
42
+ <p v-if="'version' in pkg && pkg.version">{{ pkg.version }}</p>
43
+ <p v-if="commitVersion">{{ `Current: #${commitVersion}` }}</p>
44
+ <p v-if="$dataStore.projectConfig">{{ `Latest: #${$dataStore.projectConfig.version}` }}</p>
43
45
  </div>
44
46
  <base-dialog
45
47
  v-model="dialogSignOut"
@@ -60,6 +62,7 @@ import pkg from '../../package.json';
60
62
  const dialogSignOut = ref(false);
61
63
  const dataStore = useDataStore();
62
64
  const router = useRouter();
65
+ const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION ?? '');
63
66
 
64
67
  const handleFontSize = (action: 'increase' | 'decrease') => {
65
68
  if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
@@ -31,7 +31,7 @@
31
31
  </div>
32
32
  </base-content-block>
33
33
  </section>
34
- <div v-if="!formStore.signedDocumentList || !formStore.signedDocumentList.length" class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6">
34
+ <div v-if="noDocuments" class="h-[calc(90vh-70px)] flex flex-col items-center justify-center gap-6">
35
35
  <svg xmlns="http://www.w3.org/2000/svg" width="125" height="131" viewBox="0 0 125 131" fill="none" class="cursor-help">
36
36
  <path
37
37
  fill-rule="evenodd"
@@ -171,8 +171,14 @@ export default defineComponent({
171
171
  }),
172
172
  );
173
173
  const showContract = computed(
174
- () => formStore.applicationData && (formStore.applicationData.statusCode === 'Completed' || formStore.applicationData.statusCode === 'PreparationDossierForm'),
174
+ () =>
175
+ formStore.applicationData &&
176
+ (formStore.applicationData.statusCode === 'Completed' || formStore.applicationData.statusCode === 'PreparationDossierForm' || dataStore.isActuary()),
175
177
  );
178
+ const noDocuments = computed(() => {
179
+ if (dataStore.isPension) return !showContract.value;
180
+ return !formStore.signedDocumentList || !formStore.signedDocumentList.length;
181
+ });
176
182
  const isUnderwriterDocuments = computed(
177
183
  () =>
178
184
  (dataStore.isAULETTI || dataStore.isAulettiParent) &&
@@ -320,6 +326,7 @@ export default defineComponent({
320
326
  // Computed
321
327
  isDisabled,
322
328
  showContract,
329
+ noDocuments,
323
330
  canDeleteFiles,
324
331
  isUnderwriterDocuments,
325
332
 
@@ -199,10 +199,7 @@
199
199
  :rules="$rules.required.concat($rules.numbers)"
200
200
  />
201
201
  </base-form-section>
202
- <base-form-section
203
- v-if="$dataStore.isPension && (whichForm === formStore.insuredFormKey || whichForm === formStore.beneficiaryFormKey)"
204
- :title="$dataStore.t('pension.disabilityInfo')"
205
- >
202
+ <base-form-section v-if="$dataStore.isPension && whichForm === formStore.insuredFormKey" :title="$dataStore.t('pension.disabilityInfo')">
206
203
  <base-form-toggle v-model="member.isDisability" :title="$dataStore.t('pension.ifHasDisability')" :disabled="isDisabled" :has-border="false" />
207
204
  <base-animation>
208
205
  <base-panel-input
@@ -330,7 +327,24 @@
330
327
  </base-form-section>
331
328
  <base-form-section v-if="$dataStore.hasJobSection(whichForm)" :title="$dataStore.t('form.jobData')">
332
329
  <base-form-input v-model.trim="member.job" :label="$dataStore.t('form.job')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required" />
333
- <base-form-input v-model.trim="member.jobPosition" :label="$dataStore.t('form.jobPosition')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required" />
330
+ <base-form-input
331
+ v-if="hasWorkPositionDict"
332
+ v-model.trim="member.jobPosition"
333
+ :label="$dataStore.t('form.jobPosition')"
334
+ :readonly="isDisabled || member.positionCode !== 'other'"
335
+ :clearable="!isDisabled"
336
+ :rules="$rules.required"
337
+ append-inner-icon="mdi-chevron-right"
338
+ @click="openCustomPanel('workPosition')"
339
+ />
340
+ <base-form-input
341
+ v-else
342
+ v-model.trim="member.jobPosition"
343
+ :label="$dataStore.t('form.jobPosition')"
344
+ :readonly="isDisabled"
345
+ :clearable="!isDisabled"
346
+ :rules="$rules.required"
347
+ />
334
348
  <base-form-input v-model.trim="member.jobPlace" :label="$dataStore.t('form.jobPlace')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required" />
335
349
  </base-form-section>
336
350
  <base-form-section :title="$dataStore.t('form.placeRegistration')" v-if="$dataStore.hasPlaceSection(whichForm)">
@@ -460,7 +474,7 @@
460
474
  v-model="member.documentIssuers"
461
475
  :value="member.documentIssuers?.nameRu"
462
476
  :label="$dataStore.t('form.documentIssuers')"
463
- :readonly="isDisabled"
477
+ :readonly="isDisabled || !!member.parsedDocument?.documentIssuer"
464
478
  :clearable="!isDisabled"
465
479
  :rules="$rules.objectRequired"
466
480
  append-inner-icon="mdi mdi-chevron-right"
@@ -695,6 +709,44 @@
695
709
  <base-btn v-if="member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.check')" @click="checkOtp()" />
696
710
  </div>
697
711
  </Teleport>
712
+ <Teleport v-if="isPositionPanelOpen" to="#right-panel-actions">
713
+ <div :class="[$styles.scrollPage]" class="flex flex-col items-center">
714
+ <base-rounded-input
715
+ v-model="searchQuery"
716
+ :label="$dataStore.t('labels.search')"
717
+ class="w-full p-2"
718
+ :hide-details="searchQuery.length >= 4"
719
+ :rules="[searchQuery.length < 4 ? $dataStore.t('rules.searchQueryLen', { len: '4' }) : true]"
720
+ :append-inner-icon="searchQuery.length < 4 ? '' : 'mdi mdi-magnify'"
721
+ @append="searchPositions"
722
+ />
723
+ <base-animation>
724
+ <div v-if="positionsList && positionsList.length && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
725
+ <base-panel-select-item
726
+ :text="$dataStore.t('form.notChosen')"
727
+ :selected="member.positionCode === null"
728
+ @click="
729
+ member.jobPosition = null;
730
+ member.positionCode = null;
731
+ "
732
+ />
733
+ <base-panel-select-item
734
+ v-for="(item, index) of positionsList"
735
+ :key="index"
736
+ :text="(item.workPositionName as string)"
737
+ :selected="item.workPositionCode === member.positionCode"
738
+ @click="
739
+ member.jobPosition = item.workPositionName;
740
+ member.positionCode = item.workPositionCode;
741
+ "
742
+ />
743
+ </div>
744
+ </base-animation>
745
+ <base-animation>
746
+ <base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
747
+ </base-animation>
748
+ </div>
749
+ </Teleport>
698
750
  <base-dialog
699
751
  v-model="deletionDialog"
700
752
  :title="$dataStore.t('dialog.confirmDelete')"
@@ -740,6 +792,7 @@ export default {
740
792
  const isSearchOpen = ref<boolean>(false);
741
793
  const isDocumentOpen = ref<boolean>(false);
742
794
  const isOtpPanelOpen = ref<boolean>(false);
795
+ const isPositionPanelOpen = ref<boolean>(false);
743
796
  const isPanelLoading = ref<boolean>(false);
744
797
  const isChangingMember = ref<boolean>(false);
745
798
  const familyDialog = ref<boolean>(false);
@@ -748,6 +801,7 @@ export default {
748
801
  const sameAddress = ref<boolean>(false);
749
802
  const panelValue = ref<Value>(new Value());
750
803
  const panelList = ref<Value[]>([]);
804
+ const positionsList = ref<Dicts.WorkPosition[]>([]);
751
805
  const currentPanel = ref<keyof typeof member.value>();
752
806
  const searchQuery = ref<string>('');
753
807
  const fileData = ref<{ file: any }>();
@@ -881,6 +935,7 @@ export default {
881
935
  return true;
882
936
  });
883
937
  const hasSameAddressToggle = computed(() => whichForm.value === formStore.beneficiaryFormKey && member.value.iin !== formStore.policyholderForm.iin);
938
+ const hasWorkPositionDict = computed(() => !useEnv().isProduction && dataStore.isBaiterek && dataStore.isEfoParent);
884
939
 
885
940
  const birthDateRule = computed(() => {
886
941
  const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
@@ -985,6 +1040,17 @@ export default {
985
1040
  isDocumentOpen.value = false;
986
1041
  isOtpPanelOpen.value = false;
987
1042
  isPanelOpen.value = false;
1043
+ isPositionPanelOpen.value = false;
1044
+ } else {
1045
+ dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
1046
+ }
1047
+ };
1048
+
1049
+ const searchPositions = async () => {
1050
+ if (!isDisabled.value) {
1051
+ isPanelLoading.value = true;
1052
+ positionsList.value = await dataStore.getWorkPosition(searchQuery.value);
1053
+ isPanelLoading.value = false;
988
1054
  } else {
989
1055
  dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
990
1056
  }
@@ -994,7 +1060,7 @@ export default {
994
1060
  vForm.value.scrollTo({ top: direction === 'up' ? 0 : screen.height * 10, behavior: 'smooth' });
995
1061
  };
996
1062
 
997
- const openCustomPanel = (type: 'document' | 'otp' = 'document') => {
1063
+ const openCustomPanel = (type: 'document' | 'otp' | 'workPosition' = 'document') => {
998
1064
  dataStore.panelAction = null;
999
1065
  if (type === 'document' && memberDocument.value) {
1000
1066
  dataStore.rightPanel.title = memberDocument.value.fileTypeName!;
@@ -1002,6 +1068,7 @@ export default {
1002
1068
  isSearchOpen.value = false;
1003
1069
  isPanelOpen.value = false;
1004
1070
  isOtpPanelOpen.value = false;
1071
+ isPositionPanelOpen.value = false;
1005
1072
  }
1006
1073
  if (type === 'otp') {
1007
1074
  dataStore.rightPanel.title = dataStore.t('form.otpCode');
@@ -1009,6 +1076,14 @@ export default {
1009
1076
  isDocumentOpen.value = false;
1010
1077
  isSearchOpen.value = false;
1011
1078
  isPanelOpen.value = false;
1079
+ isPositionPanelOpen.value = false;
1080
+ }
1081
+ if (type === 'workPosition') {
1082
+ isPositionPanelOpen.value = true;
1083
+ isOtpPanelOpen.value = false;
1084
+ isDocumentOpen.value = false;
1085
+ isSearchOpen.value = false;
1086
+ isPanelOpen.value = false;
1012
1087
  }
1013
1088
  dataStore.rightPanel.open = true;
1014
1089
  };
@@ -1018,6 +1093,7 @@ export default {
1018
1093
  isSearchOpen.value = false;
1019
1094
  isDocumentOpen.value = false;
1020
1095
  isOtpPanelOpen.value = false;
1096
+ isPositionPanelOpen.value = false;
1021
1097
  // Feature
1022
1098
  // const notAllowedToChange = ['gender', 'documentType', 'documentIssuers'];
1023
1099
  // if (member.value.gotFromInsis === false && notAllowedToChange.includes(key)) {
@@ -1211,8 +1287,8 @@ export default {
1211
1287
  }
1212
1288
  if (!!parsedDocument.documentIssuer) {
1213
1289
  if (
1214
- parsedDocument.documentIssuer === 'МИНИСТЕРСТВО ВНУТРЕННИХ ДЕЛ РК' ||
1215
- parsedDocument.documentIssuer === 'ҚР ІШКІ ІСТЕР МИНИСТРЛІГІ' ||
1290
+ /МИНИСТЕРСТВО ВНУТРЕННИХ ДЕЛ( РК| РҚ)?/gi.test(parsedDocument.documentIssuer) ||
1291
+ /(КР |ҚР )?ІШКІ ІСТЕР МИНИСТРЛІГІ/gi.test(parsedDocument.documentIssuer) ||
1216
1292
  /ҚАЗАҚСТАН/gi.test(parsedDocument.documentIssuer) ||
1217
1293
  /КАЗАХСТАН/gi.test(parsedDocument.documentIssuer)
1218
1294
  ) {
@@ -1423,7 +1499,11 @@ export default {
1423
1499
  ownFundsRaisAmount: 0,
1424
1500
  compulsoryProfContractAmount: 0,
1425
1501
  };
1426
- const isApplicationSaved = await dataStore.setApplication(formStore.applicationData.pensionApp);
1502
+ const data = {
1503
+ ...formStore.applicationData.pensionApp,
1504
+ transferContractCompany: formStore.applicationData.pensionApp.transferContractCompany?.nameRu ?? null,
1505
+ };
1506
+ const isApplicationSaved = await dataStore.setApplication(data);
1427
1507
  if (isApplicationSaved === false) return;
1428
1508
  dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
1429
1509
  }
@@ -1677,6 +1757,7 @@ export default {
1677
1757
  }
1678
1758
  await setDefaultValues();
1679
1759
  if (Number(formStore.applicationData.processCode) === 4) dataStore.members.insuredApp.isMultiple = true;
1760
+ if (hasWorkPositionDict.value && member.value.positionCode === null) member.value.jobPosition = null;
1680
1761
  };
1681
1762
  onMounted(async () => {
1682
1763
  await onInit();
@@ -1747,6 +1828,7 @@ export default {
1747
1828
  isDocumentOpen.value = false;
1748
1829
  isSearchOpen.value = false;
1749
1830
  isOtpPanelOpen.value = false;
1831
+ isPositionPanelOpen.value = false;
1750
1832
  dataStore.panelAction = null;
1751
1833
  currentPanelDeep.value = '';
1752
1834
  currentPanelSubDeep.value = '';
@@ -1815,6 +1897,7 @@ export default {
1815
1897
  isSearchOpen,
1816
1898
  isDocumentOpen,
1817
1899
  isOtpPanelOpen,
1900
+ isPositionPanelOpen,
1818
1901
  isPanelLoading,
1819
1902
  isButtonLoading,
1820
1903
  isSubmittingForm,
@@ -1822,6 +1905,7 @@ export default {
1822
1905
  otpSending,
1823
1906
  panelValue,
1824
1907
  panelList,
1908
+ positionsList,
1825
1909
  searchQuery,
1826
1910
  Value,
1827
1911
  memberDocument,
@@ -1854,6 +1938,7 @@ export default {
1854
1938
  hasSignOfIPDL,
1855
1939
  hasSameAddressToggle,
1856
1940
  hasMemberSearch,
1941
+ hasWorkPositionDict,
1857
1942
 
1858
1943
  // Rules
1859
1944
  ageRule,
@@ -1884,6 +1969,7 @@ export default {
1884
1969
  onOtpCodeInput,
1885
1970
  deleteMember,
1886
1971
  selectMember,
1972
+ searchPositions,
1887
1973
  };
1888
1974
  },
1889
1975
  };
@@ -114,7 +114,7 @@
114
114
  />
115
115
  </base-form-section>
116
116
  <base-form-section v-if="hasDefault" :title="defaultText">
117
- <div v-if="isCalculator && ($route.params.taskId === '0' || $dataStore.isCalculator)">
117
+ <div v-if="isCalculator && ($route.params.taskId === '0' || $dataStore.isCalculator || fromIndexPage)">
118
118
  <base-form-input
119
119
  v-model="productConditionsForm.signDate"
120
120
  :maska="$maska.date"
@@ -282,6 +282,7 @@
282
282
  />
283
283
  </base-form-section>
284
284
  <section v-if="whichProduct === 'pensionannuitynew'">
285
+ <base-btn v-if="formStore.applicationData.processCode === 19 && !isDisabled" :text="$dataStore.t('buttons.copyToClient')" class="mt-4" @click="copyRedirect"/>
285
286
  <base-form-section :title="$dataStore.t('pension.compulsoryAmount&Prof')">
286
287
  <base-form-input
287
288
  v-model="pensionCalculationParams.compulsoryContractAmount"
@@ -337,8 +338,8 @@
337
338
  :maska="$maska.date"
338
339
  :label="$dataStore.t('pension.contractDate')"
339
340
  :readonly="isDisabled"
340
- append-inner-icon="mdi mdi-calendar-blank-outline"
341
341
  :clearable="!isDisabled"
342
+ append-inner-icon="mdi mdi-calendar-blank-outline"
342
343
  :rules="pensionForm.transferContractCompany?.ids ? $rules.required.concat($rules.date) : []"
343
344
  />
344
345
  <base-form-input
@@ -760,7 +761,8 @@ export default defineComponent({
760
761
  }
761
762
  return isDisabled.value;
762
763
  });
763
- const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask());
764
+ const fromIndexPage = computed(() => whichProduct.value === 'gons' && route.name === 'index' && route.query.tab === 'calculator');
765
+ const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask() || fromIndexPage.value);
764
766
  const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
765
767
  const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
766
768
  const insurancePremiumPerMonthRule = computed(() => (!!productConditionsForm.insurancePremiumPerMonth ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
@@ -1056,6 +1058,10 @@ export default defineComponent({
1056
1058
  await router.push({ name: 'taskId-NewApp', params: route.params, query: { tab: 'statement' } });
1057
1059
  return;
1058
1060
  }
1061
+ if (whichProduct.value === 'gons') {
1062
+ await router.push({ name: 'taskId', params: { taskId: '0' }, query: { tab: 'statement' } });
1063
+ return;
1064
+ }
1059
1065
  if (statementItem) {
1060
1066
  dataStore.menu.selectedItem = statementItem;
1061
1067
  await router.replace({
@@ -1581,7 +1587,7 @@ export default defineComponent({
1581
1587
  }
1582
1588
  if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
1583
1589
  if (
1584
- (dataStore.isCalculator || route.params.taskId === '0') &&
1590
+ (dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
1585
1591
  productConditionsForm.requestedSumInsured === null &&
1586
1592
  productConditionsForm.insurancePremiumPerMonth === null
1587
1593
  ) {
@@ -1639,7 +1645,7 @@ export default defineComponent({
1639
1645
  dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
1640
1646
  transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
1641
1647
  transferContractFirstPaymentDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractFirstPaymentDate);
1642
- maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 1);
1648
+ maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
1643
1649
  }
1644
1650
  });
1645
1651
 
@@ -1724,6 +1730,12 @@ export default defineComponent({
1724
1730
  },
1725
1731
  );
1726
1732
  }
1733
+
1734
+ const copyRedirect = async () => {
1735
+ const url = await dataStore.api.getEnpfRedirectUrl(String(formStore.applicationData.processInstanceId));
1736
+ dataStore.copyToClipboard(url.redirectUrl);
1737
+ }
1738
+
1727
1739
  return {
1728
1740
  // State
1729
1741
  formStore,
@@ -1805,6 +1817,7 @@ export default defineComponent({
1805
1817
  pensionAmount,
1806
1818
  pensionCalculationParams,
1807
1819
  hasDeathInsAnyReason,
1820
+ fromIndexPage,
1808
1821
 
1809
1822
  // Rules
1810
1823
  coverPeriodRule,
@@ -1835,6 +1848,7 @@ export default defineComponent({
1835
1848
  coverTypeName,
1836
1849
  pickSubTermValue,
1837
1850
  onInputFixInsSum,
1851
+ copyRedirect
1838
1852
  };
1839
1853
  },
1840
1854
  });
@@ -33,7 +33,7 @@
33
33
  <base-btn :text="$dataStore.t('buttons.sendOnPaper')" :disabled="isPaperDisabled" :loading="loading" @click="handleSignAction('paper')" />
34
34
  <base-btn :text="$dataStore.t('buttons.sendElectronically')" :disabled="isElectronicDisabled" :loading="loading" @click="handleSignAction('electronic')" />
35
35
  <base-btn :text="$dataStore.t('buttons.generatePrintedForms')" :disabled="isScansDisabled" :loading="loading" @click="handleSignAction('scans')" />
36
- <base-btn :text="$dataStore.t('buttons.sendEgovMob')" :disabled="isQrDisabled" :loading="loading" @click="handleSignAction('qr')" />
36
+ <base-btn v-if="!useEnv().isProduction" :text="$dataStore.t('buttons.sendEgovMob')" :disabled="isQrDisabled" :loading="loading" @click="handleSignAction('qr')" />
37
37
  <base-btn
38
38
  v-if="$dataStore.isPension"
39
39
  :text="$dataStore.t('buttons.signWithSignature')"
@@ -42,7 +42,7 @@
42
42
  @click="handleSignAction('signature')"
43
43
  />
44
44
  <base-btn
45
- v-if="$dataStore.isPension"
45
+ v-if="$dataStore.isPension && !useEnv().isProduction"
46
46
  :text="$dataStore.t('buttons.signWithSignatureXML')"
47
47
  :disabled="isQrXmlDisabled"
48
48
  :loading="loading"
@@ -70,7 +70,7 @@
70
70
  </base-form-section>
71
71
  </div>
72
72
  </div>
73
- <div v-if="processCode == 2">
73
+ <div v-if="processCode == 2" class="flex flex-col gap-2">
74
74
  <base-btn
75
75
  :text="$dataStore.t('buttons.downloadPARefundStatement')"
76
76
  :loading="$dataStore.isButtonsLoading"
@@ -278,14 +278,7 @@ export default defineComponent({
278
278
  const selectedClient = ref<SignUrlType>();
279
279
  const documentDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Решение АС'));
280
280
  const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
281
- const needsAgreement = computed(
282
- () =>
283
- formStore.applicationData.statusCode === 'ContractSignedFrom' &&
284
- ((pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount !== 0) ||
285
- (pensionForm.compulsoryProfContractAmount && pensionForm.compulsoryProfContractAmount !== 0) ||
286
- (pensionForm.voluntaryContractAmount && pensionForm.voluntaryContractAmount !== 0)),
287
- );
288
- const consentGiven = computed(() => !!formStore.signedDocumentList.find(i => i.fileTypeCode === '43')?.signed);
281
+ const consentGiven = computed(() => !!formStore.signedDocumentList.find(i => i.fileTypeCode === '43' && i.signed === true));
289
282
  const affiliationDocument = computed(() => formStore.signedDocumentList.find((file: DocumentItem) => file.fileTypeName === 'Решение АС'));
290
283
  const affiliationData = ref<{
291
284
  processInstanceId: string | number;
@@ -570,30 +563,29 @@ export default defineComponent({
570
563
  if (dataStore.isGons) {
571
564
  return true;
572
565
  }
573
- if (!consentGiven.value && dataStore.isPension) {
566
+ if ((!consentGiven.value || formStore.applicationData.statusCode === 'HeadManagerForm') && dataStore.isPension && processCode !== 2) {
574
567
  return true;
575
568
  }
576
569
  return false;
577
570
  });
578
571
  const isQrDisabled = computed(() => {
579
- if (dataStore.isPension) {
580
- return !!needsAgreement.value && !consentGiven.value;
572
+ if (consentGiven.value && dataStore.isPension && processCode !== 2) {
573
+ return false;
581
574
  }
582
575
  return true;
583
576
  });
584
577
  const isQrXmlDisabled = computed(() => {
585
- if (dataStore.isPension) {
586
- if (consentGiven.value && needsAgreement.value) {
587
- return false;
588
- }
578
+ if (!consentGiven.value && dataStore.isPension && processCode !== 2) {
579
+ return false;
580
+ }
581
+ if (dataStore.isLifeBusiness || dataStore.isGns) {
582
+ return false;
589
583
  }
590
584
  return true;
591
585
  });
592
586
  const isSignatureDisabled = computed(() => {
593
- if (dataStore.isPension) {
594
- if (!consentGiven.value) {
595
- return false;
596
- }
587
+ if ((!consentGiven.value || formStore.applicationData.statusCode === 'HeadManagerForm') && dataStore.isPension && processCode !== 2) {
588
+ return false;
597
589
  }
598
590
  return true;
599
591
  });
@@ -668,7 +660,10 @@ export default defineComponent({
668
660
  };
669
661
 
670
662
  const startConnection = async (uuid: string, groupId?: string) => {
671
- connection.value = new HubConnectionBuilder().withUrl(`${getStrValuePerEnv('qrHubUrl')}/${uuid}`).withAutomaticReconnect().build();
663
+ connection.value = new HubConnectionBuilder()
664
+ .withUrl(`${getStrValuePerEnv('qrHubUrl')}/${uuid}`)
665
+ .withAutomaticReconnect()
666
+ .build();
672
667
  try {
673
668
  await connection.value.start();
674
669
  console.log('SignalR connection started.');
@@ -677,7 +672,11 @@ export default defineComponent({
677
672
  isQrLoading.value = true;
678
673
  } else if (message === 'Signed') {
679
674
  isQrLoading.value = false;
680
- dataStore.showToaster('success', dataStore.t('sign.successQrSigned'));
675
+ if (dataStore.isPension) {
676
+ dataStore.showToaster('info', dataStore.t('pension.signInProcess'));
677
+ } else {
678
+ dataStore.showToaster('success', dataStore.t('sign.successQrSigned'));
679
+ }
681
680
  qrUrl.value = '';
682
681
  isQr.value = false;
683
682
  dataStore.panel.open = false;
@@ -852,7 +851,6 @@ export default defineComponent({
852
851
  isSignatureDisabled,
853
852
  choosePayActions,
854
853
  consentGiven,
855
- needsAgreement,
856
854
  };
857
855
  },
858
856
  });
@@ -8,12 +8,12 @@
8
8
  <script setup lang="ts">
9
9
  defineProps({
10
10
  type: {
11
- type: String as PropType<VuetifyAnimations>,
11
+ type: String as PropType<Utils.VuetifyAnimations>,
12
12
  default: 'expand',
13
13
  },
14
14
  });
15
15
 
16
- const vuetifyAnimations: { [key in VuetifyAnimations]: string } = {
16
+ const vuetifyAnimations: { [key in Utils.VuetifyAnimations]: string } = {
17
17
  expand: 'v-expand-transition',
18
18
  fab: 'v-fab-transition',
19
19
  fade: 'v-fade-transition',
@@ -409,6 +409,7 @@ export class Member extends Person {
409
409
  job: string | null;
410
410
  jobPosition: string | null;
411
411
  jobPlace: string | null;
412
+ positionCode: string | null;
412
413
  registrationCountry: Value;
413
414
  registrationProvince: Value;
414
415
  registrationRegion: Value;
@@ -480,6 +481,7 @@ export class Member extends Person {
480
481
  job = null,
481
482
  jobPosition = null,
482
483
  jobPlace = null,
484
+ positionCode = null,
483
485
  registrationCountry = new Value(),
484
486
  registrationProvince = new Value(),
485
487
  registrationRegion = new Value(),
@@ -552,6 +554,7 @@ export class Member extends Person {
552
554
  this.job = job;
553
555
  this.jobPosition = jobPosition;
554
556
  this.jobPlace = jobPlace;
557
+ this.positionCode = positionCode;
555
558
  this.registrationCountry = registrationCountry;
556
559
  this.registrationProvince = registrationProvince;
557
560
  this.registrationRegion = registrationRegion;
@@ -610,6 +613,7 @@ export class Member extends Person {
610
613
  this.job = null;
611
614
  this.jobPosition = null;
612
615
  this.jobPlace = null;
616
+ this.positionCode = null;
613
617
  this.registrationCountry = new Value();
614
618
  this.registrationProvince = new Value();
615
619
  this.registrationRegion = new Value();
@@ -910,6 +914,7 @@ export class MemberSettings {
910
914
  }
911
915
 
912
916
  export class DataStoreClass {
917
+ projectConfig: Utils.ProjectConfig | null;
913
918
  // IMP Контроллер фич
914
919
  controls: {
915
920
  // Cтавит значения по дефолту полям
@@ -1067,6 +1072,7 @@ export class DataStoreClass {
1067
1072
  sportsTypes: Value[];
1068
1073
  purposes: Value[];
1069
1074
  constructor() {
1075
+ this.projectConfig = null;
1070
1076
  this.filters = {
1071
1077
  show: (item: MenuItem) => {
1072
1078
  if (typeof item.show === 'boolean') {
@@ -3,9 +3,9 @@ import { Actions, PostActions, Roles, Statuses } from '../types/enum';
3
3
  export const constants = Object.freeze({
4
4
  products: {
5
5
  pensionannuity: 1,
6
- pa_refund: 2,
7
- pa_joint: 4,
6
+ pensionannuityrefund: 2,
8
7
  baiterek: 3,
8
+ pensionannuityjoint: 4,
9
9
  halykmycar: 5,
10
10
  lifetrip: 7,
11
11
  bolashak: 8,
@@ -205,9 +205,9 @@ export class BaseFields {
205
205
 
206
206
  export class FormBlockLabel {
207
207
  text: string;
208
- size: LabelSize = 1;
208
+ size: Utils.LabelSize = 1;
209
209
  hideOnMobile: boolean = false;
210
- constructor(options: { text: string; size?: LabelSize; hideOnMobile?: boolean }) {
210
+ constructor(options: { text: string; size?: Utils.LabelSize; hideOnMobile?: boolean }) {
211
211
  this.text = options.text;
212
212
  if (typeof options.size === 'number') this.size = options.size;
213
213
  if (typeof options.hideOnMobile === 'boolean') this.hideOnMobile = options.hideOnMobile;
package/layouts/clear.vue CHANGED
@@ -1,3 +1,24 @@
1
1
  <template>
2
2
  <div class="h-full w-full"><slot></slot></div>
3
3
  </template>
4
+
5
+ <script setup lang="ts">
6
+ const dataStore = useDataStore();
7
+ const { $pwa } = useNuxtApp();
8
+
9
+ const onInit = async () => {
10
+ const projectConfig = dataStore.projectConfig;
11
+ if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
12
+ const hasConfig = await dataStore.getProjectConfig();
13
+ if (hasConfig === true) {
14
+ const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
15
+ if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
16
+ //@ts-ignore
17
+ await $pwa.updateServiceWorker();
18
+ }
19
+ }
20
+ }
21
+ };
22
+
23
+ onInit();
24
+ </script>
@@ -35,6 +35,7 @@
35
35
  <script setup lang="ts">
36
36
  import { MenuItem } from '../composables/classes';
37
37
  const dataStore = useDataStore();
38
+ const { $pwa } = useNuxtApp();
38
39
 
39
40
  const openSettings = async () => {
40
41
  dataStore.settings.open = true;
@@ -49,6 +50,22 @@ const onBack = async (item: MenuItem) => {
49
50
  if (dataStore.menu.onBack) await dataStore.menu.onBack(item);
50
51
  };
51
52
 
53
+ const onInit = async () => {
54
+ const projectConfig = dataStore.projectConfig;
55
+ if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
56
+ const hasConfig = await dataStore.getProjectConfig();
57
+ if (hasConfig === true) {
58
+ const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
59
+ if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
60
+ //@ts-ignore
61
+ await $pwa.updateServiceWorker();
62
+ }
63
+ }
64
+ }
65
+ };
66
+
67
+ onInit();
68
+
52
69
  watch(
53
70
  () => dataStore.settings.open,
54
71
  () => {
package/layouts/full.vue CHANGED
@@ -4,3 +4,24 @@
4
4
  <slot></slot>
5
5
  </div>
6
6
  </template>
7
+
8
+ <script setup lang="ts">
9
+ const dataStore = useDataStore();
10
+ const { $pwa } = useNuxtApp();
11
+
12
+ const onInit = async () => {
13
+ const projectConfig = dataStore.projectConfig;
14
+ if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
15
+ const hasConfig = await dataStore.getProjectConfig();
16
+ if (hasConfig === true) {
17
+ const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
18
+ if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
19
+ //@ts-ignore
20
+ await $pwa.updateServiceWorker();
21
+ }
22
+ }
23
+ }
24
+ };
25
+
26
+ onInit();
27
+ </script>
package/locales/ru.json CHANGED
@@ -234,7 +234,8 @@
234
234
  "generateConract": "Сгенерировать Договор",
235
235
  "signContract": "Заключить Договор",
236
236
  "sendDosie": "Отправить досье",
237
- "downloadPaymentInvoice": "Скачать счет на оплату"
237
+ "downloadPaymentInvoice": "Скачать счет на оплату",
238
+ "copyToClient": "Скопировать ссылку для клиента"
238
239
  },
239
240
  "dialog": {
240
241
  "title": "Подтверждение",
@@ -271,9 +272,9 @@
271
272
  "toApprove": "Вы действительно хотите отправить на согласование?",
272
273
  "affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?",
273
274
  "choosePay": "Вы действительно хотите выбрать метод оплаты?",
274
- "searchBeneficiary":"Выполните поиск договоров по ИИН Выгодоприобретателя",
275
- "searchFoundBeneficiary":"По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
276
- "searchNotFoundBeneficiary":"По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
275
+ "searchBeneficiary": "Выполните поиск договоров по ИИН Выгодоприобретателя",
276
+ "searchFoundBeneficiary": "По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
277
+ "searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
277
278
  },
278
279
  "sign": {
279
280
  "chooseDoc": "Выберите документы для подписание",
@@ -447,7 +448,7 @@
447
448
  "factEndDate": "Дата завершения",
448
449
  "decision": "Статус",
449
450
  "userFullName": "Исполнитель",
450
- "stage":"Этап"
451
+ "stage": "Этап"
451
452
  },
452
453
  "aml": {
453
454
  "contractSignDate": "Дата заключение контракта",
@@ -572,7 +573,8 @@
572
573
  "companyName": "Наименование компании по страхованию жизни",
573
574
  "bankInvalid": "Некорректные банковские данные",
574
575
  "globalId": "Уникальный номер договора (globalId)",
575
- "oppvMonthsCheck": "ВНИМАНИЕ! НЕОБХОДИМО ПРОВЕРИТЬ НАЛИЧИЕ ОТЧИСЛЕНИЙ 60 МЕСЯЦЕВ ПО ПРИЗНАКУ 'ОППВ'"
576
+ "oppvMonthsCheck": "ВНИМАНИЕ! НЕОБХОДИМО ПРОВЕРИТЬ НАЛИЧИЕ ОТЧИСЛЕНИЙ 60 МЕСЯЦЕВ ПО ПРИЗНАКУ 'ОППВ'",
577
+ "signInProcess": "Документы в подписании - 1 минута"
576
578
  },
577
579
  "agent": {
578
580
  "currency": "Валюта",
@@ -856,7 +858,8 @@
856
858
  "dataInPast": "Срок действия документа истек",
857
859
  "agentCommission": "Агентская комиссия не должно превышать 50",
858
860
  "agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
859
- "checkDate": "Укажите корректную дату"
861
+ "checkDate": "Укажите корректную дату",
862
+ "searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов"
860
863
  },
861
864
  "code": "КСЭ",
862
865
  "fontSize": "Размер шрифта",
package/nuxt.config.ts CHANGED
@@ -6,7 +6,7 @@ import VueI18nVitePlugin from '@intlify/unplugin-vue-i18n/vite';
6
6
  export default defineNuxtConfig({
7
7
  ssr: false,
8
8
  spaLoadingTemplate: false,
9
- modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss', '@nuxt/devtools', '@vueuse/nuxt'],
9
+ modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss', '@nuxt/devtools', '@vueuse/nuxt', '@vite-pwa/nuxt'],
10
10
 
11
11
  imports: {
12
12
  dirs: ['store', 'composables'],
@@ -17,9 +17,6 @@ export default defineNuxtConfig({
17
17
  },
18
18
 
19
19
  vite: {
20
- build: {
21
- minify: false,
22
- },
23
20
  resolve: {
24
21
  alias: [
25
22
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.9-beta.54",
3
+ "version": "0.0.9-beta.55",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -55,6 +55,7 @@
55
55
  "@nuxtjs/tailwindcss": "6.8.0",
56
56
  "@pinia/nuxt": "0.4.11",
57
57
  "@regulaforensics/document-reader-webclient": "6.9.5",
58
+ "@vite-pwa/nuxt": "0.2.3",
58
59
  "@vuepic/vue-datepicker": "7.2.0",
59
60
  "animate.css": "4.1.1",
60
61
  "axios": "1.4.0",
@@ -67,6 +67,20 @@ export const useDataStore = defineStore('data', {
67
67
  !!state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10 && i.coverSumCode === 'included'),
68
68
  },
69
69
  actions: {
70
+ async getProjectConfig() {
71
+ try {
72
+ const projectConfig = await this.api.getProjectConfig();
73
+ if (projectConfig) {
74
+ this.projectConfig = projectConfig;
75
+ return true;
76
+ } else {
77
+ return false;
78
+ }
79
+ } catch (err) {
80
+ this.projectConfig = null;
81
+ return false;
82
+ }
83
+ },
70
84
  isIframe() {
71
85
  try {
72
86
  return window.self !== window.top;
@@ -293,6 +307,18 @@ export const useDataStore = defineStore('data', {
293
307
  isTask() {
294
308
  return this.formStore.applicationData.processInstanceId !== 0 && this.formStore.applicationData.isTask;
295
309
  },
310
+ validateAccess() {
311
+ try {
312
+ const hasAccess = this.hasAccess();
313
+ if (this.isAML) return hasAccess.toAML;
314
+ if (this.isLKA) return hasAccess.toLKA;
315
+ if (this.isEFO) return hasAccess.toEFO;
316
+ if (this.isAULETTI) return hasAccess.toAULETTI;
317
+ return false;
318
+ } catch (err) {
319
+ return ErrorHandler(err);
320
+ }
321
+ },
296
322
  async loginUser(login: string, password: string, numAttempt: number) {
297
323
  try {
298
324
  const token = localStorage.getItem('accessToken') || null;
@@ -305,21 +331,12 @@ export const useDataStore = defineStore('data', {
305
331
  password: password,
306
332
  numAttempt: numAttempt,
307
333
  });
308
-
309
334
  this.accessToken = loginResponse.accessToken;
310
335
  this.refreshToken = loginResponse.refreshToken;
311
336
  this.getUserRoles();
312
337
  }
313
- const checkPermission = () => {
314
- const hasAccess = this.hasAccess();
315
- if (this.isAML) return hasAccess.toAML;
316
- if (this.isLKA) return hasAccess.toLKA;
317
- if (this.isEFO) return hasAccess.toEFO;
318
- if (this.isAULETTI) return hasAccess.toAULETTI;
319
- return false;
320
- };
321
338
  if (this.controls.onAuth) {
322
- const hasPermission = checkPermission();
339
+ const hasPermission = this.validateAccess();
323
340
  if (hasPermission) {
324
341
  localStorage.setItem('accessToken', this.accessToken);
325
342
  localStorage.setItem('refreshToken', String(this.refreshToken));
@@ -356,6 +373,15 @@ export const useDataStore = defineStore('data', {
356
373
  }
357
374
  this.isLoading = false;
358
375
  },
376
+ async checkToken() {
377
+ try {
378
+ await this.api.checkToken();
379
+ return true;
380
+ } catch (err) {
381
+ ErrorHandler(err);
382
+ return false;
383
+ }
384
+ },
359
385
  async resetSelected(route: RouteType) {
360
386
  this.settings.open = false;
361
387
  this.rightPanel.open = false;
@@ -939,6 +965,7 @@ export const useDataStore = defineStore('data', {
939
965
  data.profession = member.job;
940
966
  data.position = member.jobPosition;
941
967
  data.jobName = member.jobPlace;
968
+ data.positionCode = member.positionCode;
942
969
  data.familyStatusId = member.familyStatus.id;
943
970
  }
944
971
  if (whichMember === 'Spokesman') {
@@ -994,6 +1021,7 @@ export const useDataStore = defineStore('data', {
994
1021
  data.profession = member.job;
995
1022
  data.position = member.jobPosition;
996
1023
  data.jobName = member.jobPlace;
1024
+ data.positionCode = member.positionCode;
997
1025
  data.familyStatusId = member.familyStatus.id;
998
1026
  data.relationId = member.relationDegree.ids;
999
1027
  data.relationName = member.relationDegree.nameRu;
@@ -1496,6 +1524,15 @@ export const useDataStore = defineStore('data', {
1496
1524
  async getAuthorityBasis() {
1497
1525
  if (this.isDas || this.isLifeBusiness || this.isGns || this.isUU || this.isPrePension) return await this.getFromApi('authorityBasis', 'getArmDicts', 'DicAuthorityBasis');
1498
1526
  },
1527
+ async getWorkPosition(search: string) {
1528
+ try {
1529
+ const workPositions = await this.api.getWorkPosition(search);
1530
+ return workPositions;
1531
+ } catch (err) {
1532
+ ErrorHandler(err);
1533
+ return [];
1534
+ }
1535
+ },
1499
1536
  async getAllFormsData() {
1500
1537
  await Promise.allSettled([
1501
1538
  this.getCountries(),
@@ -1624,8 +1661,8 @@ export const useDataStore = defineStore('data', {
1624
1661
  delete query.processCodes;
1625
1662
  query.processCode = byOneProcess;
1626
1663
  }
1627
- if (byOneProcess === 19) {
1628
- query.processCodes = [19, 2, 4];
1664
+ if (byOneProcess === 19 && !useEnv().isProduction) {
1665
+ query.processCodes = [19, 2];
1629
1666
  delete query.processCode;
1630
1667
  }
1631
1668
  const taskList = await this.api.getTaskList(
@@ -2070,8 +2107,10 @@ export const useDataStore = defineStore('data', {
2070
2107
  this.formStore.isActOwnBehalf = clientData.isActOwnBehalf;
2071
2108
  this.formStore.hasRepresentative = !!applicationData.spokesmanApp;
2072
2109
 
2073
- const beneficiaryPolicyholderIndex = beneficiaryData.findIndex(i => i.insisId === clientData.insisId);
2074
- this.formStore.isPolicyholderBeneficiary = beneficiaryPolicyholderIndex !== -1;
2110
+ if (beneficiaryData) {
2111
+ const beneficiaryPolicyholderIndex = beneficiaryData.findIndex(i => i.insisId === clientData.insisId);
2112
+ this.formStore.isPolicyholderBeneficiary = beneficiaryPolicyholderIndex !== -1;
2113
+ }
2075
2114
 
2076
2115
  if ('finCenterData' in applicationData && !!applicationData.finCenterData) {
2077
2116
  this.formStore.finCenterData = applicationData.finCenterData;
@@ -2445,6 +2484,7 @@ export const useDataStore = defineStore('data', {
2445
2484
  if (!!this.formStore.applicationData[whichMember].profession) this.formStore[whichForm].job = this.formStore.applicationData[whichMember].profession;
2446
2485
  if (!!this.formStore.applicationData[whichMember].position) this.formStore[whichForm].jobPosition = this.formStore.applicationData[whichMember].position;
2447
2486
  if (!!this.formStore.applicationData[whichMember].jobName) this.formStore[whichForm].jobPlace = this.formStore.applicationData[whichMember].jobName;
2487
+ if (!!this.formStore.applicationData[whichMember].positionCode) this.formStore[whichForm].positionCode = this.formStore.applicationData[whichMember].positionCode;
2448
2488
  if (typeof this.formStore.applicationData[whichMember].isDisability === 'boolean')
2449
2489
  this.formStore[whichForm].isDisability = this.formStore.applicationData[whichMember].isDisability;
2450
2490
  if (!!this.formStore.applicationData[whichMember].disabilityGroupId) {
@@ -2481,6 +2521,9 @@ export const useDataStore = defineStore('data', {
2481
2521
  if ('jobPlace' in this.formStore[whichForm][index] && !!this.formStore.applicationData[whichMember][index].jobName) {
2482
2522
  this.formStore[whichForm][index].jobPlace = this.formStore.applicationData[whichMember][index].jobName;
2483
2523
  }
2524
+ if ('positionCode' in this.formStore[whichForm][index] && !!this.formStore.applicationData[whichMember][index].positionCode) {
2525
+ this.formStore[whichForm][index].positionCode = this.formStore.applicationData[whichMember][index].positionCode;
2526
+ }
2484
2527
  if (typeof this.formStore.applicationData[whichMember][index].isDisability === 'boolean') {
2485
2528
  this.formStore[whichForm][index].isDisability = this.formStore.applicationData[whichMember][index].isDisability;
2486
2529
  }
@@ -2567,12 +2610,12 @@ export const useDataStore = defineStore('data', {
2567
2610
  await ncaLayerClient.connect();
2568
2611
  activeTokens = await ncaLayerClient.getActiveTokens();
2569
2612
  const storageType = activeTokens[0] || NCALayerClient.fileStorageType;
2570
- if (this.formStore.applicationData.statusCode === 'HeadManagerForm') {
2571
- const document = await this.generatePDFDocument('PAEnpf_Agreement', '40', 'pdf');
2613
+ if (this.formStore.applicationData.statusCode === 'ContractSignedFrom') {
2614
+ const document = await this.generatePDFDocument('PA_Contract', '38', 'pdf');
2572
2615
  const base64EncodedSignature = await ncaLayerClient.basicsSignCMS(storageType, document, NCALayerClient.basicsCMSParams, NCALayerClient.basicsSignerSignAny);
2573
2616
  const formData = formTemplate;
2574
2617
  formData.append('base64EncodedSignature', base64EncodedSignature);
2575
- formData.append('name', 'PAEnpf_Agreement');
2618
+ formData.append('name', 'PA_Contract');
2576
2619
  try {
2577
2620
  await this.api.uploadDigitalCertifijcate(formData);
2578
2621
  await this.handleTask('accept', String(this.formStore.applicationTaskId));
@@ -2580,14 +2623,14 @@ export const useDataStore = defineStore('data', {
2580
2623
  this.showToaster('error', String(e));
2581
2624
  return;
2582
2625
  }
2583
- } else if (this.formStore.applicationData.statusCode === 'ContractSignedFrom') {
2626
+ } else if (this.formStore.applicationData.statusCode === 'HeadManagerForm') {
2584
2627
  const document = await this.generatePDFDocument('PA_Contract', '38', 'pdf');
2585
2628
  const base64EncodedSignature = await ncaLayerClient.basicsSignCMS(storageType, document, NCALayerClient.basicsCMSParams, NCALayerClient.basicsSignerSignAny);
2586
2629
  const formData = formTemplate;
2587
2630
  formData.append('base64EncodedSignature', base64EncodedSignature);
2588
2631
  formData.append('name', 'PA_Contract');
2589
2632
  try {
2590
- await this.api.uploadDigitalCertifijcate(formData);
2633
+ await this.api.uploadDigitalCertificatePensionAnnuityNew(formData);
2591
2634
  await this.handleTask('accept', String(this.formStore.applicationTaskId));
2592
2635
  } catch (e) {
2593
2636
  this.showToaster('error', String(e));
@@ -3401,7 +3444,7 @@ export const useDataStore = defineStore('data', {
3401
3444
  if (data[key] !== null) {
3402
3445
  if (key === 'iin' || key === 'bin') data[key] = data[key].replace(/-/g, '');
3403
3446
  if (key === 'phoneNumber') data[key] = formatPhone(data[key]);
3404
- if (key === 'issuedOn' || key === 'validUntil' || key === 'birthDate') data[key] = formatDate(data[key])?.toISOString() ?? '';
3447
+ if (key === 'issuedOn' || key === 'validUntil' || key === 'birthDate' || key === 'date') data[key] = formatDate(data[key])?.toISOString() ?? '';
3405
3448
  if (key === 'nameRu' && data['ids']) data['id'] = data['ids'];
3406
3449
  }
3407
3450
  }
package/types/env.d.ts CHANGED
@@ -4,6 +4,7 @@ interface ImportMetaEnv {
4
4
  readonly VITE_MODE: EnvModes;
5
5
  readonly VITE_PRODUCT?: Projects;
6
6
  readonly VITE_PARENT_PRODUCT?: 'efo' | 'auletti';
7
+ readonly VITE_COMMIT_VERSION?: string;
7
8
  }
8
9
 
9
10
  interface ImportMeta {
package/types/index.ts CHANGED
@@ -355,7 +355,18 @@ declare global {
355
355
 
356
356
  type SignDataType = {
357
357
  processInstanceId: string;
358
- name: 'Statement' | 'Agreement' | 'Contract' | 'PA_Contract' | 'PA_Statement' | 'PA_RefundStatement' | 'PA_RefundAgreement' | 'PAEnpf_Agreement' | 'InvoicePayment';
358
+ name:
359
+ | 'Statement'
360
+ | 'Agreement'
361
+ | 'Contract'
362
+ | 'PA_Contract'
363
+ | 'PA_Statement'
364
+ | 'PA_RefundStatement'
365
+ | 'PA_RefundAgreement'
366
+ | 'PAEnpf_Agreement'
367
+ | 'InvoicePayment'
368
+ | 'RejectOSNS'
369
+ | 'RejectInsuredNotValid';
359
370
  format: 'pdf' | 'xml';
360
371
  };
361
372
 
@@ -728,10 +739,6 @@ declare global {
728
739
  totalAmount7: number | null;
729
740
  };
730
741
 
731
- type LabelSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
732
-
733
- type VuetifyAnimations = 'expand' | 'fab' | 'fade' | 'scale' | 'scroll-x' | 'scroll-y' | 'slide-x' | 'slide-x-r' | 'slide-y' | 'slide-y-r';
734
-
735
742
  type InsuredPolicyType = {
736
743
  insSum: number;
737
744
  insSumWithLoad: number;
@@ -762,4 +769,20 @@ declare global {
762
769
  signName: string;
763
770
  code: string;
764
771
  };
772
+
773
+ namespace Utils {
774
+ type ProjectConfig = {
775
+ version: string;
776
+ buildTime: string;
777
+ isDown: boolean;
778
+ };
779
+
780
+ type VuetifyAnimations = 'expand' | 'fab' | 'fade' | 'scale' | 'scroll-x' | 'scroll-y' | 'slide-x' | 'slide-x-r' | 'slide-y' | 'slide-y-r';
781
+
782
+ type LabelSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
783
+ }
784
+
785
+ namespace Dicts {
786
+ type WorkPosition = { workPositionClassCode: string; workPositionCode: string; workPositionName: string };
787
+ }
765
788
  }