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

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,
@@ -433,8 +448,7 @@ export class ApiClass {
433
448
  return await this.axiosCall<void>({
434
449
  method: Methods.POST,
435
450
  url: `/${this.productUrl}/api/Application/SetApplicationData`,
436
- data,
437
- responseType: 'blob',
451
+ data: data,
438
452
  });
439
453
  }
440
454
 
@@ -524,7 +538,7 @@ export class ApiClass {
524
538
  }
525
539
 
526
540
  async signQR(data: SignDataType[]) {
527
- return await this.axiosCall({
541
+ return await this.axiosCall<ResponseStructure<any>>({
528
542
  method: Methods.POST,
529
543
  url: '/File/api/Sign/SignQr',
530
544
  data: data,
@@ -910,14 +924,6 @@ export class ApiClass {
910
924
  });
911
925
  }
912
926
 
913
- async setApplicationData(data: SetApplicationRequest) {
914
- return await this.axiosCall({
915
- method: Methods.POST,
916
- url: `/${this.productUrl}/api/Application/SetApplicationData`,
917
- data: data,
918
- });
919
- }
920
-
921
927
  async calculate(processInstanceId: string) {
922
928
  return await this.axiosCall({
923
929
  method: Methods.POST,
@@ -968,7 +974,7 @@ export class ApiClass {
968
974
  }
969
975
 
970
976
  async signXml(data: any) {
971
- return await this.axiosCall<any>({
977
+ return await this.axiosCall<ResponseStructure<any>>({
972
978
  url: `/File/api/Sign/SignXml`,
973
979
  method: Methods.POST,
974
980
  data: data,
@@ -1044,11 +1050,30 @@ export class ApiClass {
1044
1050
  });
1045
1051
  }
1046
1052
 
1047
- async getDocumentsByEdsXmlId(edsXmlId: string) {
1053
+ async uploadDigitalCertificatePensionAnnuityNew(data: any) {
1048
1054
  return await this.axiosCall<any>({
1055
+ method: Methods.POST,
1056
+ url: '/File/api/Document/UploadDigitalCertificatePensionAnnuityNew',
1057
+ headers: {
1058
+ 'Content-Type': 'multipart/form-data',
1059
+ },
1060
+ data: data,
1061
+ });
1062
+ }
1063
+
1064
+ async startRejectedApplication(data: any) {
1065
+ return await this.axiosCall({
1066
+ method: Methods.POST,
1067
+ url: `/${this.productUrl}/api/Application/StartRejectedApplication`,
1068
+ data: data,
1069
+ });
1070
+ }
1071
+
1072
+ async getDocumentsByEdsXmlId(edsXmlId: string) {
1073
+ return await this.axiosCall<ResponseStructure<any>>({
1049
1074
  method: Methods.GET,
1050
1075
  url: `/File/api/Sign/GetDocumentsByEdsXmlId/${edsXmlId}`,
1051
- })
1076
+ });
1052
1077
  }
1053
1078
 
1054
1079
  async checkSign(id: string) {
@@ -1057,4 +1082,31 @@ export class ApiClass {
1057
1082
  url: `/${this.productUrl}/api/Application/CheckSign/${id}`,
1058
1083
  });
1059
1084
  }
1085
+
1086
+ async getWorkPosition(search: string) {
1087
+ return await this.axiosCall<Dicts.WorkPosition[]>({
1088
+ method: Methods.POST,
1089
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1090
+ url: '/dictionary/Dictionary/WorkPosition',
1091
+ data: { search },
1092
+ });
1093
+ }
1094
+
1095
+ async getEnpfRedirectUrl(id: string) {
1096
+ return await this.axiosCall<{ redirectUrl: string }>({
1097
+ method: Methods.POST,
1098
+ // TODO
1099
+ baseURL: 'https://products.halyklife.kz/test/efo/api',
1100
+ url: `/pensionannuityNew/GetEnpfRedirectUrl?id=${id}`,
1101
+ });
1102
+ }
1103
+
1104
+ async setEnpfSharedId(sharedId: string, infoId: string) {
1105
+ return await this.axiosCall<void>({
1106
+ method: Methods.POST,
1107
+ // TODO
1108
+ baseURL: 'https://products.halyklife.kz/test/efo/api',
1109
+ url: `/pensionannuityNew/SetEnpfSharedId/${sharedId}/${infoId}`,
1110
+ });
1111
+ }
1060
1112
  }
@@ -1,4 +1,4 @@
1
- import { AxiosError, AxiosInstance } from 'axios';
1
+ import { AxiosError, type AxiosInstance } from 'axios';
2
2
 
3
3
  export default function (axios: AxiosInstance) {
4
4
  axios.interceptors.request.use(
@@ -59,7 +59,7 @@
59
59
  </template>
60
60
 
61
61
  <script lang="ts">
62
- import { ComputedRefWithControl } from '@vueuse/core';
62
+ import { type ComputedRefWithControl } from '@vueuse/core';
63
63
  import { FormBlock } from '../../composables/fields';
64
64
 
65
65
  export default defineComponent({
@@ -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
  },
@@ -9,11 +9,15 @@
9
9
  <v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')" />
10
10
  <i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
11
11
  ></base-panel-item>
12
- <base-panel-item v-if="$dataStore.isEFO && $dataStore.accessToken && $dataStore.hasAccess().toLKA" @click="changeBridge('lka', $dataStore.accessToken)" class="cursor-pointer">
12
+ <base-panel-item
13
+ v-if="$dataStore.accessToken && (($dataStore.isEFO && $dataStore.hasAccess().toLKA) || ($dataStore.isAULETTI && $dataStore.hasAccess().toLKA_A))"
14
+ @click="changeBridge('lka', $dataStore.accessToken)"
15
+ class="cursor-pointer"
16
+ >
13
17
  {{ $dataStore.t('labels.lkaLong') }}
14
18
  <i class="mdi mdi-chevron-right text-2xl text-[#A0B3D8]"></i
15
19
  ></base-panel-item>
16
- <base-panel-item v-if="$dataStore.isLKA && $dataStore.accessToken" @click="changeBridge('efo', $dataStore.accessToken)" class="cursor-pointer">
20
+ <base-panel-item v-if="($dataStore.isLKA || $dataStore.isLKA_A) && $dataStore.accessToken" @click="changeBridge('efo', $dataStore.accessToken)" class="cursor-pointer">
17
21
  {{ $dataStore.t('labels.efoLong') }}
18
22
  <i class="mdi mdi-web text-2xl text-[#A0B3D8]"></i
19
23
  ></base-panel-item>
@@ -38,8 +42,10 @@
38
42
  {{ $dataStore.t('buttons.logout') }}
39
43
  <i class="mdi mdi-logout text-xl"></i>
40
44
  </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>
45
+ <div v-if="$dataStore.settings.open" class="absolute bottom-4 w-full flex flex-col items-center opacity-30 text-sm">
46
+ <p v-if="'version' in pkg && pkg.version">{{ pkg.version }}</p>
47
+ <p v-if="commitVersion">{{ `Current: #${commitVersion}` }}</p>
48
+ <p v-if="$dataStore.projectConfig">{{ `Latest: #${$dataStore.projectConfig.version}` }}</p>
43
49
  </div>
44
50
  <base-dialog
45
51
  v-model="dialogSignOut"
@@ -60,6 +66,7 @@ import pkg from '../../package.json';
60
66
  const dialogSignOut = ref(false);
61
67
  const dataStore = useDataStore();
62
68
  const router = useRouter();
69
+ const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION ?? '');
63
70
 
64
71
  const handleFontSize = (action: 'increase' | 'decrease') => {
65
72
  if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
@@ -77,7 +84,7 @@ const logoutUser = async () => {
77
84
  };
78
85
 
79
86
  const hasHistory = computed(() => {
80
- return !dataStore.isLKA;
87
+ return !dataStore.isLKA && !dataStore.isLKA_A;
81
88
  });
82
89
 
83
90
  const hasFAQ = computed(() => router.hasRoute('FAQ') && !dataStore.isAULETTI && !dataStore.isAulettiParent);
@@ -55,7 +55,7 @@
55
55
 
56
56
  <script lang="ts">
57
57
  import { MenuItem } from '../../composables/classes';
58
- import { RouteLocationNormalized } from 'vue-router';
58
+ import { type RouteLocationNormalized } from 'vue-router';
59
59
 
60
60
  export default defineComponent({
61
61
  props: {
@@ -32,7 +32,7 @@
32
32
  class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
33
33
  >
34
34
  <base-form-text-section v-for="(question, index) in firstQuestionList.filter(i => i.first.definedAnswers === 'Y')" :key="index">
35
- <base-fade-transition>
35
+ <base-animation>
36
36
  <div
37
37
  v-if="question.first.answerName === 'Да' && question.second"
38
38
  :class="[$styles.greenBg, $styles.whiteText, $styles.textSimple]"
@@ -41,16 +41,16 @@
41
41
  >
42
42
  {{ $dataStore.t('questionnaireType.pleaseAnswer', { text: question.second.length }) }}
43
43
  </div>
44
- </base-fade-transition>
44
+ </base-animation>
45
45
  <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
46
46
  {{ question.first.name }}
47
- <base-fade-transition>
47
+ <base-animation>
48
48
  <i
49
49
  v-if="question.first.answerName === 'Да' && question.second && question.second.length"
50
50
  class="mdi mdi-chevron-right text-2xl cursor-pointer"
51
51
  @click="openFirstPanel(question)"
52
52
  ></i>
53
- </base-fade-transition>
53
+ </base-animation>
54
54
  </span>
55
55
  <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
56
56
  <v-radio-group
@@ -89,7 +89,7 @@
89
89
  <v-radio label="Нет" value="Нет" />
90
90
  </v-radio-group>
91
91
  </div>
92
- <base-fade-transition>
92
+ <base-animation>
93
93
  <div v-if="question.first.answerName === 'Да'" :class="[$styles.whiteText, $styles.textSimple]">
94
94
  <base-form-input
95
95
  v-model="question.first.answerText"
@@ -98,7 +98,7 @@
98
98
  :rules="$rules.required"
99
99
  />
100
100
  </div>
101
- </base-fade-transition>
101
+ </base-animation>
102
102
  </base-form-text-section>
103
103
  </section>
104
104
  </v-form>
@@ -127,14 +127,26 @@
127
127
  @submit="submitSecondaryForm"
128
128
  >
129
129
  <base-form-text-section v-for="question in currentQuestion.second" :title="question.name" :key="question.name">
130
- <base-form-input
131
- v-if="question.definedAnswers === 'N'"
132
- v-model="question.answerText"
133
- class="border-t-[1px] border-t-[#F3F6FC]"
134
- :placeholder="$dataStore.t('labels.inputText')"
135
- :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
136
- :rules="isSecondRequired ? $rules.required : []"
137
- />
130
+ <div v-if="question.definedAnswers === 'N'">
131
+ <base-form-input
132
+ v-if="question.answerType === 'T' || question.answerType === 'N'"
133
+ v-model="question.answerText"
134
+ class="border-t-[1px] border-t-[#F3F6FC]"
135
+ :placeholder="$dataStore.t('labels.inputText')"
136
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
137
+ :rules="isSecondRequired ? $rules.required : []"
138
+ />
139
+ <base-form-input
140
+ v-if="question.answerType === 'D'"
141
+ v-model="question.answerText"
142
+ class="border-t-[1px] border-t-[#F3F6FC]"
143
+ :placeholder="$dataStore.t('form.date')"
144
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
145
+ :rules="isSecondRequired ? $rules.date : []"
146
+ :maska="$maska.date"
147
+ append-inner-icon="mdi mdi-calendar-blank-outline"
148
+ />
149
+ </div>
138
150
  <base-panel-input
139
151
  v-else
140
152
  :class="[$styles.textTitle, $styles.greenText]"
@@ -220,6 +232,11 @@ export default defineComponent({
220
232
  }
221
233
  if (formStore[whichSurvey.value] && formStore[whichSurvey.value]?.body) {
222
234
  formStore[whichSurvey.value]?.body.forEach(question => {
235
+ if (question.first.definedAnswers === 'Y' && question.first.answerName?.match(new RegExp('Да', 'i')) && question.second && question.second.length) {
236
+ question.second.forEach(second => {
237
+ if (second.answerType === 'D') second.answerText = formatDate(String(second.answerText))!.toISOString();
238
+ });
239
+ }
223
240
  if (question.first.definedAnswers === 'Y' && question.first.answerName?.match(new RegExp('Нет', 'i')) && question.second && question.second.length) {
224
241
  question.second.forEach(second => {
225
242
  if (second.definedAnswers === 'N') {
@@ -240,6 +257,13 @@ export default defineComponent({
240
257
  if (typeof anketaToken === 'string') {
241
258
  formStore[whichSurvey.value]!.id = anketaToken;
242
259
  }
260
+ await dataStore.getQuestionList(
261
+ surveyType.value,
262
+ formStore.applicationData.processInstanceId,
263
+ whichMember.value === 'insured' ? formStore.applicationData.insuredApp[0].id : formStore.applicationData.clientApp.id,
264
+ whichSurvey.value,
265
+ whichMember.value,
266
+ );
243
267
  isButtonLoading.value = false;
244
268
  } else {
245
269
  const errors = document.querySelector('.v-input--error');
@@ -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,18 +171,24 @@ 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
- (dataStore.isAULETTI || dataStore.isAulettiParent) &&
184
+ (dataStore.isBaiterek || dataStore.isBolashak || dataStore.isLiferenta || dataStore.isKazyna || dataStore.isAmulet || dataStore.isGons) &&
179
185
  dataStore.isInitiator() &&
180
186
  formStore.applicationData &&
181
187
  (formStore.applicationData.statusCode === 'StartForm' || formStore.applicationData.statusCode === 'EditForm'),
182
188
  );
183
189
  const canDeleteFiles = computed(() => {
184
190
  const baseCondition = dataStore.isTask() && dataStore.isInitiator() && dataStore.isProcessEditable(formStore.applicationData.statusCode);
185
- if (dataStore.isAULETTI || dataStore.isAulettiParent) {
191
+ if (dataStore.isBaiterek || dataStore.isBolashak || dataStore.isLiferenta || dataStore.isKazyna || dataStore.isAmulet || dataStore.isGons) {
186
192
  return baseCondition && (currentDocument.value ? currentDocument.value.fileTypeCode === '46' : false);
187
193
  }
188
194
  if (dataStore.isPension) return baseCondition;
@@ -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
  };