hl-core 0.0.10-beta.83 → 0.0.10-beta.85

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
@@ -327,11 +327,16 @@ export class ApiClass {
327
327
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
328
328
  });
329
329
  }
330
-
331
- async getProgramType() {
330
+ async getDicCoverType() {
331
+ return await this.axiosCall<Value[]>({
332
+ method: Methods.GET,
333
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicCoverType',
334
+ });
335
+ }
336
+ async getProgramType(type: number) {
332
337
  return await this.axiosCall<Value[]>({
333
338
  method: Methods.GET,
334
- url: '/Arm/api/Dictionary/GetDictionaryItems/DicProgramType',
339
+ url: `/Arm/api/Dictionary/GetProcessProgramTypes/${type}`,
335
340
  });
336
341
  }
337
342
  async getSource() {
@@ -561,6 +566,14 @@ export class ApiClass {
561
566
  });
562
567
  }
563
568
 
569
+ async sendToEpayPension(processInstanceId: string | number) {
570
+ return await this.axiosCall<Types.EpayShortResponse>({
571
+ method: Methods.POST,
572
+ url: `/Arm/api/Invoice/sendToEpayPension/${processInstanceId}`,
573
+ data: {},
574
+ });
575
+ }
576
+
564
577
  async calculateWithoutApplication(data: Types.RecalculationDataType, product: string | undefined | null = this.productUrl, processCodeEnum?: number) {
565
578
  const params = processCodeEnum !== undefined ? { processCodeEnum } : undefined;
566
579
  return await this.axiosCall<Types.RecalculationResponseType>({
@@ -111,9 +111,11 @@ export default defineComponent({
111
111
  <style>
112
112
  .base-dialog .v-card-title {
113
113
  font-size: 18px;
114
+ line-height: 120%;
114
115
  }
115
116
  .base-dialog .v-card-subtitle {
116
117
  font-size: 14px;
118
+ margin-top: 5px;
117
119
  }
118
120
 
119
121
  .no-hover:hover {
@@ -1,34 +1,37 @@
1
1
  <template>
2
- <div class="flex flex-col gap-[10px] w-full align-center">
3
- <v-expansion-panels :flat="true">
4
- <v-expansion-panel class="!rounded-[8px]">
5
- <v-expansion-panel-title class="!text-[12px] border border-[#00000014]">{{ $appContextStore.t('howToGetDigitalDocument') }}</v-expansion-panel-title>
6
- <v-expansion-panel-text class="text-[12px] text-[#464f60]">
7
- 1. {{ $appContextStore.t('selectDocumentType') }} <br /><br />
8
- 2. {{ $appContextStore.t('viaEGovMobileAndOtherApps') }}: <br />
9
- {{ $appContextStore.t('openDigitalDocumentsSection') }} <br />
10
- • {{ $appContextStore.t('selectDocumentAndGrantAccess') }} <br />
11
- • {{ $appContextStore.t('enter6DigitCodeInConfirmationField') }} <br />
12
- • {{ $appContextStore.t('clickGetDocument') }} <br /><br />
13
- 3. {{ $appContextStore.t('viaSms') }}: <br />
14
- {{ $appContextStore.t('clickSendCode') }} <br />
15
- • {{ $appContextStore.t('enterReceivedSmsCode') }} <br />
16
- • {{ $appContextStore.t('clickGetDocument') }} <br /><br />
17
- <template v-if="currentLocale === 'kz'">
18
- 4. Қате жағдайда <a href="javascript:void(0);" class="text-blue-600" @click.prevent="emit('updateDigitalDocuments')">профильді жаңартуды</a> басыңыз<br />
19
- </template>
20
- <template v-else>
21
- 4. При ошибке нажмите <a href="javascript:void(0);" class="text-blue-600" @click.prevent="emit('updateDigitalDocuments')">обновить профиль</a><br />
22
- </template>
23
- </v-expansion-panel-text>
24
- </v-expansion-panel>
25
- </v-expansion-panels>
26
- <div class="d-flex flex-col gap-0.5 w-full">
2
+ <div :class="[$styles.flexColNav]">
3
+ <base-form-section class="!mt-0">
4
+ <v-expansion-panels :flat="true">
5
+ <v-expansion-panel class="!rounded-[8px]">
6
+ <v-expansion-panel-title class="!text-[12px]">{{ $appContextStore.t('howToGetDigitalDocument') }}</v-expansion-panel-title>
7
+ <v-expansion-panel-text class="text-[12px] text-[#464f60]">
8
+ 1. {{ $appContextStore.t('selectDocumentType') }} <br /><br />
9
+ 2. {{ $appContextStore.t('viaEGovMobileAndOtherApps') }}: <br />
10
+ • {{ $appContextStore.t('openDigitalDocumentsSection') }} <br />
11
+ • {{ $appContextStore.t('selectDocumentAndGrantAccess') }} <br />
12
+ • {{ $appContextStore.t('enter6DigitCodeInConfirmationField') }} <br />
13
+ {{ $appContextStore.t('clickGetDocument') }} <br /><br />
14
+ 3. {{ $appContextStore.t('viaSms') }}: <br />
15
+ • {{ $appContextStore.t('clickSendCode') }} <br />
16
+ • {{ $appContextStore.t('enterReceivedSmsCode') }} <br />
17
+ {{ $appContextStore.t('clickGetDocument') }} <br /><br />
18
+ <template v-if="currentLocale === 'kz'">
19
+ 4. Қате жағдайда <a href="javascript:void(0);" class="text-blue-600" @click.prevent="emit('updateDigitalDocuments')">профильді жаңартуды</a> басыңыз<br />
20
+ </template>
21
+ <template v-else>
22
+ 4. При ошибке нажмите <a href="javascript:void(0);" class="text-blue-600" @click.prevent="emit('updateDigitalDocuments')">обновить профиль</a><br />
23
+ </template>
24
+ </v-expansion-panel-text>
25
+ </v-expansion-panel>
26
+ </v-expansion-panels>
27
+ </base-form-section>
28
+ <div class="p-4 d-flex flex-col gap-0.5" :class="[$styles.blueBgLight, $styles.rounded]">
27
29
  <base-rounded-select v-model="documentType" class="document-type-select" :items="documentItems" :label="$appContextStore.t('form.documentType')" hide-details />
28
30
  <div class="digital-document-otp flex flex-col">
29
31
  <base-otp-input v-model="otpCode" @keyup.enter.prevent="otpCode.length === otpLength && emitGetCode()" />
30
- <span v-if="!loading && otpSendDisabled" class="text-center" :class="[$styles.mutedText]">
31
- <template v-if="currentLocale === 'kz'">
32
+ <div v-if="!loading">
33
+ <span v-if="otpSendDisabled" class="block text-center" :class="[$styles.mutedText]">
34
+ <template v-if="currentLocale === 'kz'">
32
35
  <span class="underline underline-offset-2">eGov Mobile</span> немесе <span class="underline underline-offset-2">банк қосымшасынан</span> алынған цифрлық құжат кодын
33
36
  енгізіңіз.
34
37
  </template>
@@ -36,11 +39,23 @@
36
39
  Введите код цифрового документа из <span class="underline underline-offset-2">eGov Mobile</span> или
37
40
  <span class="underline underline-offset-2">банковского приложения</span>.
38
41
  </template>
39
- </span>
42
+ </span>
43
+ <template v-else>
44
+ <span v-if="isActive" class="block text-center" :class="[$styles.mutedText]">
45
+ Отправить код повторно через
46
+ <br />
47
+ <span :class="[$styles.greenText]">{{ timeLeft }} сек</span>
48
+ </span>
49
+ <span v-if="canResend" class="block text-center" :class="[$styles.mutedText]">
50
+ Не получили код?
51
+ <span class="underline underline-offset-2 cursor-pointer" @click="emitGetCode">Отправить код заново</span>
52
+ </span>
53
+ </template>
54
+ </div>
40
55
  </div>
41
56
  </div>
42
- <div class="w-full d-flex flex-col sm:flex-row gap-4">
43
- <base-btn v-if="!otpSendDisabled" :disabled="loading" :loading="loading" :btn="$styles.whiteBorderBtn" :text="$appContextStore.t('sendSmsCode')" @click="emitGetCode" />
57
+ <div class="w-full d-flex flex-col gap-4">
58
+ <base-btn v-if="!otpSendDisabled" :disabled="loading || isActive" :loading="loading" :btn="$styles.greenLightBtn" :text="$appContextStore.t('sendSmsCode')" @click="emitGetCode" />
44
59
  <base-btn :disabled="loading" :loading="loading" :text="$appContextStore.t('getDocument')" @click="emitGetDocument" />
45
60
  </div>
46
61
  </div>
@@ -48,6 +63,7 @@
48
63
 
49
64
  <script setup lang="ts">
50
65
  import type { DigitalDocTypes } from '../../types';
66
+ import { useOtpTimer } from '../../composables/index';
51
67
  import { useI18n } from 'vue-i18n';
52
68
 
53
69
  const props = defineProps({
@@ -68,9 +84,9 @@ const props = defineProps({
68
84
  default: false,
69
85
  },
70
86
  });
87
+ const { timeLeft, canResend, isActive, startTimer } = useOtpTimer(60);
71
88
  const emit = defineEmits(['getCode', 'getDigitalDocument', 'updateDigitalDocuments']);
72
89
 
73
- const dataStore = useDataStore();
74
90
  const documentType = ref<DigitalDocTypes | null>(null);
75
91
  const otpCode = ref<string>('');
76
92
  const appContextStore = useAppContextStore();
@@ -80,8 +96,12 @@ const emitGetCode = () => {
80
96
  showToaster('error', appContextStore.t('selectDocumentType'), 3000);
81
97
  return;
82
98
  }
83
-
84
- emit('getCode', documentType.value);
99
+ emit('getCode', {
100
+ type: documentType.value,
101
+ onSuccess: () => {
102
+ startTimer();
103
+ },
104
+ });
85
105
  };
86
106
 
87
107
  const emitGetDocument = () => {
@@ -96,12 +116,8 @@ const emitGetDocument = () => {
96
116
 
97
117
  <style scoped>
98
118
  :deep(.v-otp-input__content) {
99
- max-width: 360px;
100
- gap: 12px !important;
101
- @media (max-width: 768px) {
102
- max-width: 100%;
103
- gap: 8px !important;
104
- }
119
+ max-width: 100%;
120
+ gap: 10px !important;
105
121
  }
106
122
  .v-expansion-panel-title {
107
123
  height: 60px !important;
@@ -112,7 +128,7 @@ const emitGetDocument = () => {
112
128
  }
113
129
  .document-type-select:deep(.v-field) {
114
130
  height: 60px;
115
- border: 1px solid #dadada !important;
131
+ border: none !important;
116
132
  }
117
133
  .document-type-select:deep(.v-label.v-field-label--floating) {
118
134
  top: 0;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="rounded-lg border-[1px]" :class="[$styles.whiteBg, disabled && $styles.disabled]">
3
- <v-expansion-panels>
3
+ <v-expansion-panels v-model="panel">
4
4
  <v-expansion-panel class="rounded-lg" elevation="0">
5
5
  <v-expansion-panel-title :class="[$styles.textTitle, $styles.greenText]">
6
6
  {{ $appContextStore.t('form.attachManager') }}
@@ -43,6 +43,14 @@
43
43
  append-inner-icon="mdi mdi-chevron-right"
44
44
  @append="openPanel('ManagerPolicy', $appContextStore.t('form.manager'))"
45
45
  />
46
+ <a
47
+ href="javascript:void(0);"
48
+ v-if="formStore.ManagerPolicy.nameRu === null && !!currentManager"
49
+ class="py-1 px-4 text-[14px]"
50
+ :class="[$styles.blueText]"
51
+ @click="assignToMe"
52
+ >Назначить себя</a
53
+ >
46
54
  <base-panel-input
47
55
  v-if="isAgentShown"
48
56
  class="pl-1 pt-1"
@@ -111,7 +119,6 @@
111
119
  </div>
112
120
  </div>
113
121
  </div>
114
-
115
122
  <base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
116
123
  </div>
117
124
  </Teleport>
@@ -133,6 +140,10 @@ export default defineComponent({
133
140
  type: Boolean,
134
141
  default: false,
135
142
  },
143
+ isOpen: {
144
+ type: Boolean,
145
+ default: false,
146
+ },
136
147
  },
137
148
  setup(props) {
138
149
  type ManagerAttachmentFiels = 'SaleChanellPolicy' | 'RegionPolicy' | 'ManagerPolicy' | 'AgentData' | 'ExecutorGPH';
@@ -147,6 +158,8 @@ export default defineComponent({
147
158
  const panelValue = ref<FieldTypes>(new Value());
148
159
  const searchQuery = ref<string>('');
149
160
  const currentDictName = ref<ManagerAttachmentFiels>();
161
+ const currentManager = ref<Value | null>(null);
162
+ const panel = ref(props.isOpen ? 0 : null);
150
163
 
151
164
  const isReadonly = computed(
152
165
  () =>
@@ -192,10 +205,11 @@ export default defineComponent({
192
205
  const isAgentReadonly = computed(() => {
193
206
  if (!isReadonly.value) {
194
207
  if (dataStore.isTravelAgent()) return true;
195
- if (appContextStore.isPension) return true;
208
+ if (appContextStore.isLifetrip && (formStore.SaleChanellPolicy.ids == 'ПП' || formStore.SaleChanellPolicy.ids == 'ХЛ')) return true;
196
209
  if (appContextStore.isGons) {
197
210
  return !dataStore.isServiceManager() && !dataStore.isChiefManagerNSZH() && !dataStore.isChiefSalesManager() && !dataStore.isSalesManager() && !dataStore.isManager();
198
211
  }
212
+ if (appContextStore.isPension) return true;
199
213
  }
200
214
  return isReadonly.value;
201
215
  });
@@ -239,6 +253,11 @@ export default defineComponent({
239
253
  if (currentDict === 'ManagerPolicy' && formStore.RegionPolicy.ids) {
240
254
  isPanelLoading.value = true;
241
255
  await dictionariesStore.filterManagerByRegion(formStore.RegionPolicy.ids as string);
256
+ if (!currentManager.value) {
257
+ currentManager.value =
258
+ (dictionariesStore.ManagerPolicy.find(m => m.code === dataStore.user.code) as Value) ||
259
+ (dictionariesStore.ManagerPolicy.find(m => m.nameRu?.includes(dataStore.user.fullName as string)) as Value);
260
+ }
242
261
  }
243
262
  if (currentDict === 'ExecutorGPH' && formStore.RegionPolicy.ids) {
244
263
  isPanelLoading.value = true;
@@ -261,7 +280,23 @@ export default defineComponent({
261
280
  }
262
281
  };
263
282
 
264
- const pickPanelValue = (answer: FieldTypes) => {
283
+ const pickPanelValue = async (answer: FieldTypes) => {
284
+ if (
285
+ currentDictName.value === 'AgentData' &&
286
+ appContextStore.isLifetrip &&
287
+ formStore.SaleChanellPolicy.ids == 'ТАТО' &&
288
+ 'saleChannel' in answer &&
289
+ answer.saleChannel !== formStore.SaleChanellPolicy.ids
290
+ ) {
291
+ return showToaster('error', 'Выберите агента из того же канала продаж');
292
+ }
293
+
294
+ if (currentDictName.value === 'SaleChanellPolicy' && appContextStore.isLifetrip && 'ids' in answer && (answer.ids == 'ПП' || answer.ids == 'ХЛ')) {
295
+ await dataStore.searchAgentByName('Без агента');
296
+ const noAgent = dataStore.AgentData.filter(i => String(i.officeId) === String(formStore.RegionPolicy.ids))[0];
297
+ // @ts-ignore
298
+ formStore.AgentData = noAgent ? noAgent : new Value();
299
+ }
265
300
  // @ts-ignore
266
301
  formStore[currentDictName.value] = answer;
267
302
  isPanelOpen.value = false;
@@ -269,13 +304,19 @@ export default defineComponent({
269
304
  searchQuery.value = '';
270
305
  };
271
306
 
307
+ const assignToMe = () => {
308
+ formStore.ManagerPolicy = currentManager.value as Value;
309
+ if (isPanelOpen.value === true) {
310
+ isPanelOpen.value = false;
311
+ dataStore.rightPanel.open = false;
312
+ }
313
+ };
314
+
272
315
  watchDebounced(
273
316
  searchQuery,
274
317
  async searchQuery => {
275
- if (searchQuery === null) {
276
- searchQuery = '';
277
- }
278
- if (!!searchQuery && currentDictName.value === 'AgentData') {
318
+ const query = searchQuery ?? '';
319
+ if (!!query && currentDictName.value === 'AgentData') {
279
320
  await searchAgent();
280
321
  }
281
322
  },
@@ -303,6 +344,15 @@ export default defineComponent({
303
344
  { immediate: true },
304
345
  );
305
346
 
347
+ onMounted(async () => {
348
+ if (dictionariesStore.ManagerPolicy.length === 0 && route.params.taskId !== '0') {
349
+ await dictionariesStore.filterManagerByRegion(formStore.RegionPolicy.ids as string);
350
+ }
351
+ currentManager.value =
352
+ (dictionariesStore.ManagerPolicy.find(m => m.code === dataStore.user.code) as Value) ||
353
+ (dictionariesStore.ManagerPolicy.find(m => m.nameRu?.includes(dataStore.user.fullName as string)) as Value);
354
+ });
355
+
306
356
  onBeforeUnmount(() => {
307
357
  if (!isReadonly.value) {
308
358
  const areValid = !!formStore.SaleChanellPolicy.nameRu && !!formStore.RegionPolicy.nameRu && !!formStore.ManagerPolicy.nameRu && !!formStore.AgentData.fullName;
@@ -314,12 +364,14 @@ export default defineComponent({
314
364
 
315
365
  return {
316
366
  // State
367
+ panel,
317
368
  formStore,
318
369
  isPanelOpen,
319
370
  isPanelLoading,
320
371
  panelValue,
321
372
  searchQuery,
322
373
  Value,
374
+ currentManager,
323
375
  currentDictName,
324
376
 
325
377
  // Computed
@@ -338,6 +390,7 @@ export default defineComponent({
338
390
 
339
391
  // Functions
340
392
  openPanel,
393
+ assignToMe,
341
394
  searchAgent,
342
395
  pickPanelValue,
343
396
  };
@@ -7,7 +7,7 @@
7
7
  :rules="rules"
8
8
  :loading="loading"
9
9
  :placeholder="placeholder"
10
- :label="label"
10
+ :label="undefined"
11
11
  :messages="messages"
12
12
  :type="type"
13
13
  :variant="variant"
@@ -33,6 +33,17 @@
33
33
  @focus="isFocused = true"
34
34
  @blur="isFocused = false"
35
35
  >
36
+ <template #label>
37
+ <div class="flex items-center gap-1 tooltip-label-wrapper">
38
+ <span>{{ label }}</span>
39
+ <v-tooltip v-if="!!tooltip" location="top">
40
+ <template #activator="{ props: tooltipProps }">
41
+ <v-icon v-bind="tooltipProps" :icon="tooltipIcon" class="cursor-pointer !text-[18px] label-tooltip-icon" color="#a0b3d8" />
42
+ </template>
43
+ <span>{{ tooltip }}</span>
44
+ </v-tooltip>
45
+ </div>
46
+ </template>
36
47
  <template v-if="appendInnerIcon && appendInnerIcon.length" v-slot:append-inner>
37
48
  <v-icon
38
49
  v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') === false"
@@ -153,6 +164,14 @@ export default defineComponent({
153
164
  bgColor: {
154
165
  type: String,
155
166
  },
167
+ tooltip: {
168
+ type: String,
169
+ default: '',
170
+ },
171
+ tooltipIcon: {
172
+ type: String,
173
+ default: 'mdi-information-outline',
174
+ },
156
175
  },
157
176
  emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'input', 'on-clear'],
158
177
 
@@ -222,4 +241,10 @@ export default defineComponent({
222
241
  color: #000000 !important;
223
242
  font-size: 16px !important;
224
243
  }
244
+ .tooltip-label-wrapper {
245
+ pointer-events: auto !important;
246
+ }
247
+ .label-tooltip-icon {
248
+ pointer-events: auto !important;
249
+ }
225
250
  </style>
@@ -8,6 +8,7 @@
8
8
  :readonly="props.readonly"
9
9
  :color="color"
10
10
  :rows="rows"
11
+ :rules="rules"
11
12
  @update:modelValue="$emit('update:modelValue', $event)"
12
13
  auto-grow
13
14
  ></v-textarea>
@@ -45,6 +46,10 @@ export default defineComponent({
45
46
  type: Number,
46
47
  default: 5,
47
48
  },
49
+ rules: {
50
+ type: Array<any>,
51
+ default: [],
52
+ },
48
53
  },
49
54
  emits: ['update:modelValue'],
50
55
 
@@ -5,7 +5,7 @@
5
5
  <v-tooltip v-if="hasMore" :text="$dataStore.isSupport() ? `Нажатий: ${homeClickCount}` : ''" :disabled="!$dataStore.isSupport()">
6
6
  <template #activator="{ props: tooltipProps }">
7
7
  <v-btn v-bind="tooltipProps" variant="text" size="32" :ripple="false" class="absolute z-10" @click="onHomeClick" @mouseenter="onHomeHover">
8
- <img src="../../../efo/public/favicon.svg" class="w-6 h-6" alt="home" />
8
+ <img src="~/public/favicon.svg" class="w-6 h-6" alt="home" />
9
9
  </v-btn>
10
10
  </template>
11
11
  </v-tooltip>
@@ -74,22 +74,6 @@ export default defineComponent({
74
74
  setup(props) {
75
75
  const dataStore = useDataStore();
76
76
 
77
- const homeClickCount = ref(0);
78
- const COUNTER_URL = `${import.meta.env.VITE_COUNTER_URL ?? 'http://localhost:3001'}/counter`;
79
-
80
- const onHomeClick = async () => {
81
- // umTrackEvent('click-logo', {
82
- // user: dataStore.user.fullName,
83
- // branch: dataStore.user.branchCode,
84
- // });
85
- };
86
-
87
- const onHomeHover = async () => {
88
- if (!dataStore.isSupport()) return;
89
- try {
90
- } catch {}
91
- };
92
-
93
77
  const onClickOutside = () => {
94
78
  dataStore.settings.open = false;
95
79
  };
@@ -122,12 +106,7 @@ export default defineComponent({
122
106
  backIconAnim,
123
107
  moreIconAnim,
124
108
 
125
- // Counter
126
- homeClickCount,
127
-
128
109
  // Functions
129
- onHomeClick,
130
- onHomeHover,
131
110
  onClickOutside,
132
111
  };
133
112
  },
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <v-menu v-if="items.length" :activator="activator" location="bottom center" :offset="top" transition="scale-transition">
3
3
  <base-form-text-section class="p-4 border-[1px] flex flex-col gap-3 elevation-3 w-[250px]">
4
- <div v-for="item of items.filter(i => $dataStore.filters.show(i))" :key="(item as any).id">
5
- <base-menu-nav-item :class="[$styles.textSimple]" :menu-item="item" @click="$emit((item as any).id)" />
4
+ <div v-for="item of items.filter(i => $dataStore.filters.show(i))" :key="item.id ?? ''">
5
+ <base-menu-nav-item :class="[$styles.textSimple]" :menu-item="item" @click="$emit(String(item.id!))" />
6
6
  </div>
7
7
  </base-form-text-section>
8
8
  </v-menu>
@@ -19,7 +19,7 @@
19
19
  <slot name="start"></slot>
20
20
  <base-fade-transition>
21
21
  <div v-if="$dataStore.menuItems && $dataStore.menuItems.length" class="flex flex-col gap-[10px]">
22
- <div v-for="(item, index) of $dataStore.menuItems.filter(i => $dataStore.filters.show(i))" :key="index">
22
+ <div v-for="(item, index) of $dataStore.menuItems.filter(i => $dataStore.filters.show(i as any))" :key="index">
23
23
  <base-menu-nav-item
24
24
  :menu-item="item"
25
25
  :selected="!!selected.title && !!item.title && selected.title === item.title"