hl-core 0.0.9-beta.53 → 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,
@@ -959,13 +974,6 @@ export class ApiClass {
959
974
  });
960
975
  }
961
976
 
962
- async getDocument(id: string) {
963
- return await this.axiosCall<any>({
964
- method: Methods.POST,
965
- url: `/${this.productUrl}/api/Application/GetDocument/${id}`,
966
- });
967
- }
968
-
969
977
  async uploadXml(data: any) {
970
978
  return await this.axiosCall<void>({
971
979
  url: `/File/api/Document/UploadXml`,
@@ -975,7 +983,7 @@ export class ApiClass {
975
983
  }
976
984
 
977
985
  async signXml(data: any) {
978
- return await this.axiosCall<any>({
986
+ return await this.axiosCall<ResponseStructure<any>>({
979
987
  url: `/File/api/Sign/SignXml`,
980
988
  method: Methods.POST,
981
989
  data: data,
@@ -1050,4 +1058,64 @@ export class ApiClass {
1050
1058
  data: data,
1051
1059
  });
1052
1060
  }
1061
+
1062
+ async uploadDigitalCertificatePensionAnnuityNew(data: any) {
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>>({
1083
+ method: Methods.GET,
1084
+ url: `/File/api/Sign/GetDocumentsByEdsXmlId/${edsXmlId}`,
1085
+ });
1086
+ }
1087
+
1088
+ async checkSign(id: string) {
1089
+ return await this.axiosCall<SignedState>({
1090
+ method: Methods.POST,
1091
+ url: `/${this.productUrl}/api/Application/CheckSign/${id}`,
1092
+ });
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
+ }
1053
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
  },
@@ -8,6 +8,7 @@
8
8
  <v-expansion-panel-text class="border-t-[1px] no-padding">
9
9
  <v-form ref="vForm" class="flex flex-col divide-y">
10
10
  <base-panel-input
11
+ v-if="isSaleChanellShown"
11
12
  class="pl-1 pt-1"
12
13
  v-model="formStore.SaleChanellPolicy"
13
14
  :value="formStore.SaleChanellPolicy?.nameRu"
@@ -19,6 +20,7 @@
19
20
  @append="openPanel('SaleChanellPolicy', $dataStore.t('form.salesChanell'))"
20
21
  />
21
22
  <base-panel-input
23
+ v-if="isRegionShown"
22
24
  class="pl-1 pt-1"
23
25
  v-model="formStore.RegionPolicy"
24
26
  :value="formStore.RegionPolicy?.nameRu"
@@ -30,6 +32,7 @@
30
32
  @append="openPanel('RegionPolicy', $dataStore.t('form.Region'))"
31
33
  />
32
34
  <base-panel-input
35
+ v-if="isManagerShown"
33
36
  class="pl-1 pt-1"
34
37
  v-model="formStore.ManagerPolicy"
35
38
  :value="formStore.ManagerPolicy?.nameRu"
@@ -41,6 +44,7 @@
41
44
  @append="openPanel('ManagerPolicy', $dataStore.t('form.manager'))"
42
45
  />
43
46
  <base-panel-input
47
+ v-if="isAgentShown"
44
48
  class="pl-1 pt-1"
45
49
  v-model="formStore.AgentData"
46
50
  :value="formStore.AgentData?.fullName"
@@ -134,22 +138,37 @@ export default defineComponent({
134
138
  (route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
135
139
  );
136
140
  const isSaleChanellReadonly = computed(() => {
137
- if (dataStore.isGons) return isReadonly.value || !dataStore.isServiceManager();
141
+ if (dataStore.isGons) return isReadonly.value && dataStore.isServiceManager();
138
142
  return isReadonly.value;
139
143
  });
140
144
  const isRegionReadonly = computed(() => {
141
- if (dataStore.isGons) return isReadonly.value || !dataStore.isServiceManager();
145
+ if (dataStore.isGons) return isReadonly.value && (dataStore.isServiceManager() || dataStore.isAgent());
142
146
  return isReadonly.value;
143
147
  });
144
148
  const isManagerReadonly = computed(() => {
145
- if (dataStore.isGons) return isReadonly.value || !dataStore.isServiceManager();
149
+ if (dataStore.isGons) return isReadonly.value && dataStore.isServiceManager();
146
150
  return isReadonly.value;
147
151
  });
148
152
  const isAgentReadonly = computed(() => {
149
- if (dataStore.isGons || dataStore.isPension) return isReadonly.value || !dataStore.isAgent();
153
+ if (dataStore.isGons || dataStore.isPension) return isReadonly.value && dataStore.isServiceManager();
150
154
  return isReadonly.value;
151
155
  });
152
-
156
+ const isSaleChanellShown = computed(() => {
157
+ if (dataStore.isGons) return dataStore.isServiceManager();
158
+ return true;
159
+ });
160
+ const isRegionShown = computed(() => {
161
+ if (dataStore.isGons) return dataStore.isServiceManager() || dataStore.isAgent();
162
+ return true;
163
+ });
164
+ const isManagerShown = computed(() => {
165
+ if (dataStore.isGons) return dataStore.isServiceManager();
166
+ return true;
167
+ });
168
+ const isAgentShown = computed(() => {
169
+ if (dataStore.isGons || dataStore.isPension) return dataStore.isServiceManager();
170
+ return true;
171
+ });
153
172
  const openPanel = async (currentDict: ManagerAttachmentFiels, title: string) => {
154
173
  searchQuery.value = '';
155
174
  if (dataStore.isTask() && !props.disabled) {
@@ -204,7 +223,9 @@ export default defineComponent({
204
223
  () => formStore.RegionPolicy,
205
224
  (val, oldVal) => {
206
225
  if (val.ids !== oldVal.ids) {
207
- formStore.ManagerPolicy = new Value();
226
+ if (!dataStore.isGons) {
227
+ formStore.ManagerPolicy = new Value();
228
+ }
208
229
  }
209
230
  },
210
231
  );
@@ -244,7 +265,10 @@ export default defineComponent({
244
265
  isRegionReadonly,
245
266
  isManagerReadonly,
246
267
  isAgentReadonly,
247
-
268
+ isSaleChanellShown,
269
+ isRegionShown,
270
+ isManagerShown,
271
+ isAgentShown,
248
272
  // Functions
249
273
  openPanel,
250
274
  searchAgent,
@@ -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)">
@@ -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
@@ -383,6 +384,7 @@
383
384
  class="pension-guaranteed-period"
384
385
  :readonly="isDisabled"
385
386
  :clearable="!isDisabled"
387
+ :rules="$rules.notZero"
386
388
  :label="$dataStore.t('pension.guaranteedPeriod')"
387
389
  :items="guaranteedPeriodList"
388
390
  :hide-details="true"
@@ -759,7 +761,8 @@ export default defineComponent({
759
761
  }
760
762
  return isDisabled.value;
761
763
  });
762
- 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);
763
766
  const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
764
767
  const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
765
768
  const insurancePremiumPerMonthRule = computed(() => (!!productConditionsForm.insurancePremiumPerMonth ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
@@ -1055,6 +1058,10 @@ export default defineComponent({
1055
1058
  await router.push({ name: 'taskId-NewApp', params: route.params, query: { tab: 'statement' } });
1056
1059
  return;
1057
1060
  }
1061
+ if (whichProduct.value === 'gons') {
1062
+ await router.push({ name: 'taskId', params: { taskId: '0' }, query: { tab: 'statement' } });
1063
+ return;
1064
+ }
1058
1065
  if (statementItem) {
1059
1066
  dataStore.menu.selectedItem = statementItem;
1060
1067
  await router.replace({
@@ -1580,7 +1587,7 @@ export default defineComponent({
1580
1587
  }
1581
1588
  if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
1582
1589
  if (
1583
- (dataStore.isCalculator || route.params.taskId === '0') &&
1590
+ (dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
1584
1591
  productConditionsForm.requestedSumInsured === null &&
1585
1592
  productConditionsForm.insurancePremiumPerMonth === null
1586
1593
  ) {
@@ -1638,7 +1645,7 @@ export default defineComponent({
1638
1645
  dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
1639
1646
  transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
1640
1647
  transferContractFirstPaymentDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractFirstPaymentDate);
1641
- maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 1);
1648
+ maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
1642
1649
  }
1643
1650
  });
1644
1651
 
@@ -1723,6 +1730,12 @@ export default defineComponent({
1723
1730
  },
1724
1731
  );
1725
1732
  }
1733
+
1734
+ const copyRedirect = async () => {
1735
+ const url = await dataStore.api.getEnpfRedirectUrl(String(formStore.applicationData.processInstanceId));
1736
+ dataStore.copyToClipboard(url.redirectUrl);
1737
+ }
1738
+
1726
1739
  return {
1727
1740
  // State
1728
1741
  formStore,
@@ -1804,6 +1817,7 @@ export default defineComponent({
1804
1817
  pensionAmount,
1805
1818
  pensionCalculationParams,
1806
1819
  hasDeathInsAnyReason,
1820
+ fromIndexPage,
1807
1821
 
1808
1822
  // Rules
1809
1823
  coverPeriodRule,
@@ -1834,6 +1848,7 @@ export default defineComponent({
1834
1848
  coverTypeName,
1835
1849
  pickSubTermValue,
1836
1850
  onInputFixInsSum,
1851
+ copyRedirect
1837
1852
  };
1838
1853
  },
1839
1854
  });