hl-core 0.0.8-beta.3 → 0.0.8-beta.31

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.
Files changed (46) hide show
  1. package/api/index.ts +77 -21
  2. package/api/interceptors.ts +17 -13
  3. package/components/Dialog/Dialog.vue +7 -37
  4. package/components/Form/FormBlock.vue +65 -28
  5. package/components/Form/FormSection.vue +4 -1
  6. package/components/Form/ManagerAttachment.vue +197 -0
  7. package/components/Form/ProductConditionsBlock.vue +64 -12
  8. package/components/Input/Datepicker.vue +5 -1
  9. package/components/Input/FormInput.vue +28 -7
  10. package/components/Input/PanelInput.vue +5 -0
  11. package/components/Input/RoundedSelect.vue +137 -0
  12. package/components/Layout/Drawer.vue +1 -0
  13. package/components/Layout/Header.vue +40 -4
  14. package/components/Layout/SettingsPanel.vue +39 -9
  15. package/components/Menu/MenuHover.vue +30 -0
  16. package/components/Menu/MenuNav.vue +28 -11
  17. package/components/Menu/MenuNavItem.vue +5 -2
  18. package/components/Pages/Anketa.vue +38 -21
  19. package/components/Pages/Auth.vue +145 -30
  20. package/components/Pages/InvoiceInfo.vue +30 -0
  21. package/components/Pages/MemberForm.vue +381 -144
  22. package/components/Pages/ProductConditions.vue +496 -17
  23. package/components/Panel/PanelHandler.vue +75 -2
  24. package/components/Utilities/Chip.vue +27 -0
  25. package/components/Utilities/JsonViewer.vue +27 -0
  26. package/composables/classes.ts +165 -25
  27. package/composables/constants.ts +13 -1
  28. package/composables/index.ts +58 -2
  29. package/composables/styles.ts +9 -3
  30. package/configs/i18n.ts +19 -0
  31. package/layouts/default.vue +2 -2
  32. package/locales/en.json +583 -0
  33. package/locales/kz.json +583 -0
  34. package/locales/ru.json +585 -0
  35. package/nuxt.config.ts +8 -0
  36. package/package.json +15 -9
  37. package/pages/500.vue +1 -1
  38. package/pages/Token.vue +51 -0
  39. package/plugins/helperFunctionsPlugins.ts +3 -0
  40. package/plugins/storePlugin.ts +0 -1
  41. package/plugins/vuetifyPlugin.ts +8 -1
  42. package/store/data.store.js +705 -624
  43. package/store/member.store.ts +147 -22
  44. package/store/rules.js +41 -3
  45. package/types/index.ts +39 -0
  46. package/store/messages.ts +0 -434
package/api/index.ts CHANGED
@@ -12,10 +12,6 @@ export class ApiClass {
12
12
  private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
13
13
 
14
14
  private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
15
- const dataStore = useDataStore();
16
- if ((dataStore.isEFO && !this.baseURL) || (!dataStore.isEFO && (!this.baseURL || !this.productUrl))) {
17
- console.error('No Axios baseURL or productURL');
18
- }
19
15
  const { data } = await useAxios(this.baseURL).request<T>(config);
20
16
  return data;
21
17
  }
@@ -137,31 +133,63 @@ export class ApiClass {
137
133
  });
138
134
  }
139
135
 
136
+ async getDicAnnuityTypeList(): Promise<Value[]> {
137
+ return this.axiosCall({
138
+ method: Methods.GET,
139
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicAnnuityType',
140
+ });
141
+ }
142
+
143
+ async getCurrencies(): Promise<{ eur: number; usd: number }> {
144
+ return this.axiosCall({
145
+ method: Methods.GET,
146
+ url: '/Ekk/api/Currency/GetExchange',
147
+ });
148
+ }
149
+
140
150
  async getContragent(queryData: any) {
141
151
  return this.axiosCall({
142
152
  method: Methods.GET,
143
- url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName${queryData.middleName}`,
153
+ url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
144
154
  });
145
155
  }
146
156
 
157
+ async getInsurancePay(): Promise<Value[]> {
158
+ return this.axiosCall({ method: Methods.GET, url: '/Arm/api/Dictionary/GetDictionaryItems/DicBeneficiaryInsurancePay' });
159
+ }
160
+
147
161
  async getQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
148
162
  return this.axiosCall({
149
163
  method: Methods.GET,
150
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
164
+ url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
165
+ });
166
+ }
167
+
168
+ async getClientQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
169
+ return this.axiosCall({
170
+ method: Methods.GET,
171
+ url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
151
172
  });
152
173
  }
153
174
 
154
175
  async getQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
155
176
  return this.axiosCall({
156
177
  method: Methods.GET,
157
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
178
+ url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
179
+ });
180
+ }
181
+
182
+ async getClientQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
183
+ return this.axiosCall({
184
+ method: Methods.GET,
185
+ url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
158
186
  });
159
187
  }
160
188
 
161
189
  async definedAnswers(filter: string) {
162
190
  return this.axiosCall({
163
191
  method: Methods.GET,
164
- url: `/ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
192
+ url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
165
193
  });
166
194
  }
167
195
 
@@ -201,6 +229,13 @@ export class ApiClass {
201
229
  });
202
230
  }
203
231
 
232
+ async getProcessAnnuityPaymentPeriod(processCode: string | number) {
233
+ return this.axiosCall({
234
+ method: Methods.GET,
235
+ url: `/Arm/api/Dictionary/ProcessAnnuityPaymentPeriod/${processCode}`,
236
+ });
237
+ }
238
+
204
239
  async getContragentById(id: any) {
205
240
  return this.axiosCall({
206
241
  method: Methods.GET,
@@ -227,7 +262,7 @@ export class ApiClass {
227
262
  });
228
263
  }
229
264
 
230
- async getDicFileTypeList() {
265
+ async getDicFileTypeList(): Promise<Value[]> {
231
266
  return this.axiosCall({
232
267
  method: Methods.GET,
233
268
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
@@ -276,6 +311,14 @@ export class ApiClass {
276
311
  });
277
312
  }
278
313
 
314
+ async registerNumber(data: RegNumberDataType): Promise<string> {
315
+ return this.axiosCall({
316
+ method: Methods.POST,
317
+ url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
318
+ data: data,
319
+ });
320
+ }
321
+
279
322
  async sendSms(data: SmsDataType): Promise<void> {
280
323
  return this.axiosCall({
281
324
  method: Methods.POST,
@@ -319,7 +362,6 @@ export class ApiClass {
319
362
  return this.axiosCall({
320
363
  method: Methods.GET,
321
364
  url: '/Arm/api/Bpm/ProcessList',
322
- timeout: 10000,
323
365
  });
324
366
  }
325
367
 
@@ -404,6 +446,13 @@ export class ApiClass {
404
446
  });
405
447
  }
406
448
 
449
+ async getProcessHistoryLog(historyId: string) {
450
+ return this.axiosCall({
451
+ method: Methods.GET,
452
+ url: `/Arm/api/Bpm/ProcessHistoryLog/${historyId}`,
453
+ });
454
+ }
455
+
407
456
  async createInvoice(processInstanceId: string, amount: number | string): Promise<string> {
408
457
  return this.axiosCall({
409
458
  method: Methods.POST,
@@ -434,18 +483,18 @@ export class ApiClass {
434
483
  });
435
484
  }
436
485
 
437
- async calculateWithoutApplication(data: RecalculationDataType): Promise<RecalculationResponseType> {
486
+ async calculateWithoutApplication(data: RecalculationDataType, product = this.productUrl): Promise<RecalculationResponseType> {
438
487
  return this.axiosCall({
439
488
  method: Methods.POST,
440
- url: `/${this.productUrl}/api/Application/Calculate`,
489
+ url: `/${product}/api/Application/Calculate`,
441
490
  data: data,
442
491
  });
443
492
  }
444
493
 
445
- async getDefaultCalculationData(): Promise<RecalculationDataType> {
494
+ async getDefaultCalculationData(product = this.productUrl): Promise<RecalculationDataType> {
446
495
  return this.axiosCall({
447
496
  method: Methods.GET,
448
- url: `/${this.productUrl}/api/Application/DefaultCalculatorValues`,
497
+ url: `/${product}/api/Application/DefaultCalculatorValues`,
449
498
  });
450
499
  }
451
500
 
@@ -498,7 +547,7 @@ export class ApiClass {
498
547
  }
499
548
 
500
549
  async getProcessTariff(code: number | string = 5) {
501
- return this.axiosCall({ url: `/arm/api/Dictionary/ProcessTariff/${code}` });
550
+ return this.axiosCall({ url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
502
551
  }
503
552
 
504
553
  async setConfirmation(data: any) {
@@ -516,33 +565,40 @@ export class ApiClass {
516
565
  });
517
566
  }
518
567
 
519
- async sendUnderwritingCouncilTask(data: any) {
568
+ async sendUnderwritingCouncilTask(data: Partial<SendTask>): Promise<void> {
520
569
  return this.axiosCall({
521
570
  method: Methods.POST,
522
- url: '/arm/api/UnderwritingCouncil/SendTask',
571
+ url: '/Arm/api/UnderwritingCouncil/SendTask',
523
572
  data: data,
524
573
  });
525
574
  }
526
575
 
576
+ async getDictionaryItems(dictName: string): Promise<Value[]> {
577
+ return this.axiosCall({
578
+ method: Methods.GET,
579
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
580
+ });
581
+ }
582
+
527
583
  async filterManagerByRegion(dictName: string, filterName: string) {
528
584
  return this.axiosCall({
529
585
  method: Methods.GET,
530
- url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
586
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
531
587
  });
532
588
  }
533
589
 
534
590
  async setINSISWorkData(data: any) {
535
591
  return this.axiosCall({
536
592
  method: Methods.POST,
537
- url: `/arm/api/Bpm/SetInsisWorkData`,
593
+ url: `/Arm/api/Bpm/SetInsisWorkData`,
538
594
  data: data,
539
595
  });
540
596
  }
541
597
 
542
- async searchAgentByName(name: string) {
598
+ async searchAgentByName(name: string): Promise<AgentData[]> {
543
599
  return this.axiosCall({
544
600
  method: Methods.GET,
545
- url: `/ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
601
+ url: `/Ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
546
602
  });
547
603
  }
548
604
  }
@@ -4,7 +4,9 @@ export default function (axios: AxiosInstance) {
4
4
  axios.interceptors.request.use(
5
5
  request => {
6
6
  const dataStore = useDataStore();
7
- request.headers.Authorization = `Bearer ${dataStore.accessToken}`;
7
+ if (dataStore.accessToken) {
8
+ request.headers.Authorization = `Bearer ${dataStore.accessToken}`;
9
+ }
8
10
  return request;
9
11
  },
10
12
  error => {
@@ -17,19 +19,21 @@ export default function (axios: AxiosInstance) {
17
19
  },
18
20
  error => {
19
21
  const dataStore = useDataStore();
20
- const router = useRouter();
21
- if (error.response.status === 401) {
22
- dataStore.$reset();
23
- localStorage.clear();
24
- if (dataStore.isEFO) {
25
- router.push({ name: 'Auth', query: { error: 401 } });
26
- } else {
27
- dataStore.sendToParent(constants.postActions.Error401, 401);
22
+ if (!dataStore.isCalculator) {
23
+ const router = useRouter();
24
+ if (error.response.status === 401) {
25
+ dataStore.$reset();
26
+ localStorage.clear();
27
+ if (dataStore.isBridge) {
28
+ router.push({ name: 'Auth', query: { error: 401 } });
29
+ } else {
30
+ dataStore.sendToParent(constants.postActions.Error401, 401);
31
+ }
28
32
  }
29
- }
30
- if (error.response.status >= 500) {
31
- if (router.currentRoute.value.name !== 'Auth') {
32
- dataStore.showToaster('error', error.stack, 5000);
33
+ if (error.response.status >= 500) {
34
+ if (router.currentRoute.value.name !== 'Auth') {
35
+ dataStore.showToaster('error', error.stack, 5000);
36
+ }
33
37
  }
34
38
  }
35
39
  return Promise.reject(error);
@@ -1,15 +1,16 @@
1
1
  <template>
2
- <v-dialog v-model="fieldModel">
2
+ <v-dialog :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)" :persistent="true">
3
3
  <v-card class="self-center w-full sm:w-3/4 md:w-2/3 lg:w-2/4 xl:w-[600px] rounded-lg !p-2">
4
4
  <v-card-title>
5
5
  <slot v-if="!title" name="title"></slot>
6
6
  {{ title }}
7
+ <v-btn class="!absolute top-2 right-3" icon="mdi mdi-window-close" variant="plain" @click="$emit('update:modelValue', null)"></v-btn>
7
8
  </v-card-title>
8
9
  <v-card-subtitle>
9
10
  <slot v-if="!subtitle" name="subtitle"></slot>
10
11
  {{ subtitle }}
11
12
  </v-card-subtitle>
12
- <v-card-actions class="gap-[16px]">
13
+ <v-card-actions class="gap-[16px] m-2">
13
14
  <base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.yes')" :btn="$libStyles.blueBtn" @click="$emit('yes')"></base-btn>
14
15
  <base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.no')" :btn="$libStyles.blueBtn" @click="$emit('no')" />
15
16
  <slot v-if="actions !== 'default'" name="actions"></slot>
@@ -27,7 +28,9 @@ export default defineComponent({
27
28
  },
28
29
  title: {
29
30
  type: String,
30
- default: '',
31
+ default() {
32
+ return useDataStore().t('dialog.title');
33
+ },
31
34
  },
32
35
  subtitle: {
33
36
  type: String,
@@ -38,39 +41,6 @@ export default defineComponent({
38
41
  default: 'default',
39
42
  },
40
43
  },
41
- emits: ['update:modelValue', 'submitted', 'yes', 'no'],
42
- setup(props, { emit }) {
43
- const fieldModel = ref(props.modelValue);
44
-
45
- const updateValue = (event: boolean) => {
46
- fieldModel.value = event;
47
- };
48
-
49
- const submitted = (event: any) => {
50
- emit('submitted', event);
51
- };
52
-
53
- watch(
54
- fieldModel,
55
- () => {
56
- emit('update:modelValue', fieldModel.value);
57
- },
58
- { immediate: true },
59
- );
60
-
61
- watch(
62
- () => props.modelValue,
63
- () => {
64
- fieldModel.value = props.modelValue;
65
- },
66
- { immediate: true },
67
- );
68
-
69
- return {
70
- fieldModel,
71
- submitted,
72
- updateValue,
73
- };
74
- },
44
+ emits: ['update:modelValue', 'yes', 'no'],
75
45
  });
76
46
  </script>
@@ -1,54 +1,78 @@
1
1
  <template>
2
- <div class="pt-3 rounded-lg border-[1px]" :class="[$libStyles.whiteBg]">
2
+ <div class="pt-3 rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
3
3
  <div class="ml-5">
4
- <p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ title }}</p>
4
+ <div class="flex justify-between mr-5">
5
+ <p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ title }}</p>
6
+ <div
7
+ v-if="isMultiple && more && !isShort && isActionsAvailable"
8
+ :class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple, disabled ? $libStyles.disabled : 'cursor-pointer']"
9
+ class="hidden lg:flex transition-all rounded-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
10
+ @click="!disabled && memberStore.addMember(whichForm)"
11
+ >
12
+ {{ $t('buttons.add') }}
13
+ </div>
14
+ </div>
5
15
  <p v-if="!!subtitle" :class="[$libStyles.greyText, $libStyles.textSimple]">{{ subtitle }}</p>
6
16
  </div>
7
- <div class="ml-5 mt-6 grid grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7 auto-rows-fr items-center">
17
+ <div
18
+ class="ml-5 mt-6 grid auto-rows-fr items-center"
19
+ :class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2 mb-6' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7 ']"
20
+ >
8
21
  <span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('form.fullName') }}</span>
9
22
  <span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('form.iin') }}</span>
10
- <span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('form.gender') }}</span>
11
- <span :class="[$libStyles.textSimple]" class="font-medium"> {{ $t('form.birthDate') }} </span>
12
- <span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('form.Country') }} </span>
13
- <span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('code') }}</span>
23
+ <span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('form.gender') }}</span>
24
+ <span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium"> {{ $t('form.birthDate') }} </span>
25
+ <span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('form.Country') }} </span>
26
+ <span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('code') }}</span>
14
27
  </div>
15
- <div v-if="isMultiple" class="ml-5 flex flex-col">
16
- <div v-for="(each, index) of member" :key="index" class="grid grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7 auto-rows-fr items-center relative">
28
+ <div v-if="isMultiple" class="ml-5 flex flex-col" :class="[isShort ? 'mb-6' : '']">
29
+ <div
30
+ v-for="(each, index) of member"
31
+ :key="index"
32
+ class="grid auto-rows-fr items-center relative"
33
+ :class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
34
+ >
17
35
  <span :class="[getMemberInfo(each).fullName === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(each).fullName }}</span>
18
36
  <span :class="[getMemberInfo(each).iin === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(each).iin }}</span>
19
- <span :class="[getMemberInfo(each).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(each).gender }} </span>
20
- <span :class="[getMemberInfo(each).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(each).birthDate }} </span>
21
- <span :class="[getMemberInfo(each).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).birthPlace }} </span>
22
- <span :class="[getMemberInfo(each).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).sectorCode }} </span>
37
+ <span v-if="!isShort" :class="[getMemberInfo(each).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(each).gender }} </span>
38
+ <span v-if="!isShort" :class="[getMemberInfo(each).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(each).birthDate }} </span>
39
+ <span v-if="!isShort" :class="[getMemberInfo(each).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).birthPlace }} </span>
40
+ <span v-if="!isShort" :class="[getMemberInfo(each).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).sectorCode }} </span>
23
41
  <div
24
- class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end cursor-pointer"
25
- :class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover]"
26
- @click="$emit('onMore', { whichForm, index })"
42
+ v-if="!isShort"
43
+ class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end"
44
+ :class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
45
+ @click="!disabled && $emit('onMore', { whichForm, index })"
27
46
  >
28
47
  <i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"> </i>
29
48
  </div>
30
49
  </div>
31
50
  </div>
32
- <div v-else class="ml-5 grid grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7 auto-rows-fr items-center relative">
51
+ <div
52
+ v-else
53
+ class="ml-5 grid auto-rows-fr items-center relative"
54
+ :class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
55
+ >
33
56
  <span :class="[getMemberInfo(member).fullName === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(member).fullName }}</span>
34
57
  <span :class="[getMemberInfo(member).iin === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(member).iin }}</span>
35
- <span :class="[getMemberInfo(member).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(member).gender }} </span>
36
- <span :class="[getMemberInfo(member).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(member).birthDate }} </span>
37
- <span :class="[getMemberInfo(member).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).birthPlace }} </span>
38
- <span :class="[getMemberInfo(member).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).sectorCode }} </span>
58
+ <span v-if="!isShort" :class="[getMemberInfo(member).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(member).gender }} </span>
59
+ <span v-if="!isShort" :class="[getMemberInfo(member).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(member).birthDate }} </span>
60
+ <span v-if="!isShort" :class="[getMemberInfo(member).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).birthPlace }} </span>
61
+ <span v-if="!isShort" :class="[getMemberInfo(member).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(member).sectorCode }} </span>
39
62
  <div
40
- class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end cursor-pointer"
41
- :class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover]"
42
- @click="$emit('onMore', { whichForm })"
63
+ v-if="!isShort"
64
+ class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end"
65
+ :class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
66
+ @click="!disabled && $emit('onMore', { whichForm })"
43
67
  >
44
68
  <i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"> </i>
45
69
  </div>
46
70
  </div>
47
71
  <div
48
- v-if="isMultiple && more"
49
- :class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple]"
50
- class="cursor-pointer rounded-b-lg h-[36px] flex items-center font-medium justify-center"
51
- @click="memberStore.addMember(whichForm)"
72
+ v-if="isMultiple && more && !isShort && isActionsAvailable"
73
+ :class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple, disabled ? $libStyles.disabled : 'cursor-pointer']"
74
+ class="block lg:hidden transition-all rounded-b-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90"
75
+ @click="!disabled && memberStore.addMember(whichForm)"
52
76
  >
53
77
  {{ $t('buttons.add') }}
54
78
  </div>
@@ -76,6 +100,14 @@ export default defineComponent({
76
100
  type: Boolean,
77
101
  default: false,
78
102
  },
103
+ disabled: {
104
+ type: Boolean,
105
+ default: false,
106
+ },
107
+ type: {
108
+ type: String as PropType<'short' | 'default'>,
109
+ default: 'default',
110
+ },
79
111
  },
80
112
  emits: ['onMore', 'addMember'],
81
113
  setup(props) {
@@ -86,6 +118,9 @@ export default defineComponent({
86
118
  const isMultiple = ref(multipleMembers.includes(props.whichForm));
87
119
  const member: Member = formStore[props.whichForm as MemberKeys];
88
120
 
121
+ const isShort = computed(() => props.type === 'short');
122
+ const isActionsAvailable = computed(() => memberStore.isStatementEditible(props.whichForm));
123
+
89
124
  const getMemberInfo = (memberData: Member) => {
90
125
  return {
91
126
  fullName: computed(() => (memberData && memberData.getFullNameShorted() ? memberData.getFullNameShorted() : null)).value,
@@ -105,6 +140,8 @@ export default defineComponent({
105
140
  isMultiple,
106
141
 
107
142
  // Computed
143
+ isShort,
144
+ isActionsAvailable,
108
145
 
109
146
  // Functions
110
147
  getMemberInfo,
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <section :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mt-[14px] p-4 flex flex-col gap-[1px]">
3
- <h2 :class="[$libStyles.textTitle]" class="font-medium text-center w-full mb-4">{{ title }}</h2>
3
+ <h2 :class="[$libStyles.textTitle]" class="font-medium text-center w-full mb-4">
4
+ {{ title }}
5
+ <slot name="icon"></slot>
6
+ </h2>
4
7
  <slot></slot>
5
8
  </section>
6
9
  </template>