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

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 +81 -18
  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 +149 -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
@@ -13,7 +13,10 @@ export class ApiClass {
13
13
 
14
14
  private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
15
15
  const dataStore = useDataStore();
16
- if ((dataStore.isEFO && !this.baseURL) || (!dataStore.isEFO && (!this.baseURL || !this.productUrl))) {
16
+ if (dataStore.isBridge && !this.baseURL) {
17
+ console.error('No Axios baseURL');
18
+ }
19
+ if (!dataStore.isBridge && !dataStore.isCalculator && (!this.baseURL || !this.productUrl)) {
17
20
  console.error('No Axios baseURL or productURL');
18
21
  }
19
22
  const { data } = await useAxios(this.baseURL).request<T>(config);
@@ -137,31 +140,63 @@ export class ApiClass {
137
140
  });
138
141
  }
139
142
 
143
+ async getDicAnnuityTypeList(): Promise<Value[]> {
144
+ return this.axiosCall({
145
+ method: Methods.GET,
146
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicAnnuityType',
147
+ });
148
+ }
149
+
150
+ async getCurrencies(): Promise<{ eur: number; usd: number }> {
151
+ return this.axiosCall({
152
+ method: Methods.GET,
153
+ url: '/Ekk/api/Currency/GetExchange',
154
+ });
155
+ }
156
+
140
157
  async getContragent(queryData: any) {
141
158
  return this.axiosCall({
142
159
  method: Methods.GET,
143
- url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName${queryData.middleName}`,
160
+ url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
144
161
  });
145
162
  }
146
163
 
164
+ async getInsurancePay(): Promise<Value[]> {
165
+ return this.axiosCall({ method: Methods.GET, url: '/Arm/api/Dictionary/GetDictionaryItems/DicBeneficiaryInsurancePay' });
166
+ }
167
+
147
168
  async getQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
148
169
  return this.axiosCall({
149
170
  method: Methods.GET,
150
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
171
+ url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
172
+ });
173
+ }
174
+
175
+ async getClientQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
176
+ return this.axiosCall({
177
+ method: Methods.GET,
178
+ url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
151
179
  });
152
180
  }
153
181
 
154
182
  async getQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
155
183
  return this.axiosCall({
156
184
  method: Methods.GET,
157
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
185
+ url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
186
+ });
187
+ }
188
+
189
+ async getClientQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
190
+ return this.axiosCall({
191
+ method: Methods.GET,
192
+ url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
158
193
  });
159
194
  }
160
195
 
161
196
  async definedAnswers(filter: string) {
162
197
  return this.axiosCall({
163
198
  method: Methods.GET,
164
- url: `/ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
199
+ url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
165
200
  });
166
201
  }
167
202
 
@@ -201,6 +236,13 @@ export class ApiClass {
201
236
  });
202
237
  }
203
238
 
239
+ async getProcessAnnuityPaymentPeriod(processCode: string | number) {
240
+ return this.axiosCall({
241
+ method: Methods.GET,
242
+ url: `/Arm/api/Dictionary/ProcessAnnuityPaymentPeriod/${processCode}`,
243
+ });
244
+ }
245
+
204
246
  async getContragentById(id: any) {
205
247
  return this.axiosCall({
206
248
  method: Methods.GET,
@@ -227,7 +269,7 @@ export class ApiClass {
227
269
  });
228
270
  }
229
271
 
230
- async getDicFileTypeList() {
272
+ async getDicFileTypeList(): Promise<Value[]> {
231
273
  return this.axiosCall({
232
274
  method: Methods.GET,
233
275
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
@@ -276,6 +318,14 @@ export class ApiClass {
276
318
  });
277
319
  }
278
320
 
321
+ async registerNumber(data: RegNumberDataType): Promise<string> {
322
+ return this.axiosCall({
323
+ method: Methods.POST,
324
+ url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
325
+ data: data,
326
+ });
327
+ }
328
+
279
329
  async sendSms(data: SmsDataType): Promise<void> {
280
330
  return this.axiosCall({
281
331
  method: Methods.POST,
@@ -319,7 +369,6 @@ export class ApiClass {
319
369
  return this.axiosCall({
320
370
  method: Methods.GET,
321
371
  url: '/Arm/api/Bpm/ProcessList',
322
- timeout: 10000,
323
372
  });
324
373
  }
325
374
 
@@ -404,6 +453,13 @@ export class ApiClass {
404
453
  });
405
454
  }
406
455
 
456
+ async getProcessHistoryLog(historyId: string) {
457
+ return this.axiosCall({
458
+ method: Methods.GET,
459
+ url: `/Arm/api/Bpm/ProcessHistoryLog/${historyId}`,
460
+ });
461
+ }
462
+
407
463
  async createInvoice(processInstanceId: string, amount: number | string): Promise<string> {
408
464
  return this.axiosCall({
409
465
  method: Methods.POST,
@@ -434,18 +490,18 @@ export class ApiClass {
434
490
  });
435
491
  }
436
492
 
437
- async calculateWithoutApplication(data: RecalculationDataType): Promise<RecalculationResponseType> {
493
+ async calculateWithoutApplication(data: RecalculationDataType, product = this.productUrl): Promise<RecalculationResponseType> {
438
494
  return this.axiosCall({
439
495
  method: Methods.POST,
440
- url: `/${this.productUrl}/api/Application/Calculate`,
496
+ url: `/${product}/api/Application/Calculate`,
441
497
  data: data,
442
498
  });
443
499
  }
444
500
 
445
- async getDefaultCalculationData(): Promise<RecalculationDataType> {
501
+ async getDefaultCalculationData(product = this.productUrl): Promise<RecalculationDataType> {
446
502
  return this.axiosCall({
447
503
  method: Methods.GET,
448
- url: `/${this.productUrl}/api/Application/DefaultCalculatorValues`,
504
+ url: `/${product}/api/Application/DefaultCalculatorValues`,
449
505
  });
450
506
  }
451
507
 
@@ -498,7 +554,7 @@ export class ApiClass {
498
554
  }
499
555
 
500
556
  async getProcessTariff(code: number | string = 5) {
501
- return this.axiosCall({ url: `/arm/api/Dictionary/ProcessTariff/${code}` });
557
+ return this.axiosCall({ url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
502
558
  }
503
559
 
504
560
  async setConfirmation(data: any) {
@@ -516,33 +572,40 @@ export class ApiClass {
516
572
  });
517
573
  }
518
574
 
519
- async sendUnderwritingCouncilTask(data: any) {
575
+ async sendUnderwritingCouncilTask(data: Partial<SendTask>): Promise<void> {
520
576
  return this.axiosCall({
521
577
  method: Methods.POST,
522
- url: '/arm/api/UnderwritingCouncil/SendTask',
578
+ url: '/Arm/api/UnderwritingCouncil/SendTask',
523
579
  data: data,
524
580
  });
525
581
  }
526
582
 
583
+ async getDictionaryItems(dictName: string): Promise<Value[]> {
584
+ return this.axiosCall({
585
+ method: Methods.GET,
586
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
587
+ });
588
+ }
589
+
527
590
  async filterManagerByRegion(dictName: string, filterName: string) {
528
591
  return this.axiosCall({
529
592
  method: Methods.GET,
530
- url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
593
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
531
594
  });
532
595
  }
533
596
 
534
597
  async setINSISWorkData(data: any) {
535
598
  return this.axiosCall({
536
599
  method: Methods.POST,
537
- url: `/arm/api/Bpm/SetInsisWorkData`,
600
+ url: `/Arm/api/Bpm/SetInsisWorkData`,
538
601
  data: data,
539
602
  });
540
603
  }
541
604
 
542
- async searchAgentByName(name: string) {
605
+ async searchAgentByName(name: string): Promise<AgentData[]> {
543
606
  return this.axiosCall({
544
607
  method: Methods.GET,
545
- url: `/ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
608
+ url: `/Ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
546
609
  });
547
610
  }
548
611
  }
@@ -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>