hl-core 0.0.9-beta.9 → 0.0.10-beta.10

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 (75) hide show
  1. package/api/base.api.ts +1110 -0
  2. package/api/index.ts +2 -620
  3. package/api/interceptors.ts +38 -1
  4. package/components/Button/Btn.vue +1 -6
  5. package/components/Complex/MessageBlock.vue +1 -1
  6. package/components/Complex/Page.vue +1 -1
  7. package/components/Complex/TextBlock.vue +25 -0
  8. package/components/Dialog/Dialog.vue +72 -16
  9. package/components/Dialog/FamilyDialog.vue +3 -1
  10. package/components/Form/DynamicForm.vue +101 -0
  11. package/components/Form/FormBlock.vue +12 -3
  12. package/components/Form/FormData.vue +111 -0
  13. package/components/Form/FormSection.vue +3 -3
  14. package/components/Form/FormTextSection.vue +11 -3
  15. package/components/Form/FormToggle.vue +25 -5
  16. package/components/Form/ManagerAttachment.vue +178 -89
  17. package/components/Form/ProductConditionsBlock.vue +59 -6
  18. package/components/Input/Datepicker.vue +43 -7
  19. package/components/Input/DynamicInput.vue +25 -0
  20. package/components/Input/FileInput.vue +25 -5
  21. package/components/Input/FormInput.vue +9 -4
  22. package/components/Input/Monthpicker.vue +34 -0
  23. package/components/Input/PanelInput.vue +6 -1
  24. package/components/Input/RoundedInput.vue +2 -0
  25. package/components/Input/RoundedSelect.vue +9 -2
  26. package/components/Input/SwitchInput.vue +66 -0
  27. package/components/Input/TextInput.vue +162 -0
  28. package/components/Layout/Drawer.vue +18 -4
  29. package/components/Layout/Header.vue +23 -2
  30. package/components/Layout/Loader.vue +2 -1
  31. package/components/Layout/SettingsPanel.vue +24 -11
  32. package/components/Menu/InfoMenu.vue +35 -0
  33. package/components/Menu/MenuNav.vue +25 -3
  34. package/components/Pages/Anketa.vue +255 -65
  35. package/components/Pages/Auth.vue +58 -9
  36. package/components/Pages/ContragentForm.vue +10 -9
  37. package/components/Pages/Documents.vue +267 -30
  38. package/components/Pages/InvoiceInfo.vue +1 -1
  39. package/components/Pages/MemberForm.vue +775 -102
  40. package/components/Pages/ProductAgreement.vue +1 -8
  41. package/components/Pages/ProductConditions.vue +1133 -180
  42. package/components/Panel/PanelHandler.vue +627 -49
  43. package/components/Panel/PanelSelectItem.vue +17 -2
  44. package/components/Panel/RightPanelCloser.vue +7 -0
  45. package/components/Transitions/Animation.vue +30 -0
  46. package/components/Utilities/Chip.vue +2 -0
  47. package/components/Utilities/JsonViewer.vue +2 -2
  48. package/components/Utilities/Qr.vue +44 -0
  49. package/composables/axios.ts +1 -0
  50. package/composables/classes.ts +550 -44
  51. package/composables/constants.ts +126 -6
  52. package/composables/fields.ts +330 -0
  53. package/composables/index.ts +356 -20
  54. package/composables/styles.ts +23 -6
  55. package/configs/pwa.ts +63 -0
  56. package/layouts/clear.vue +21 -0
  57. package/layouts/default.vue +62 -3
  58. package/layouts/full.vue +21 -0
  59. package/locales/ru.json +558 -16
  60. package/nuxt.config.ts +6 -15
  61. package/package.json +38 -39
  62. package/pages/Token.vue +0 -13
  63. package/plugins/head.ts +26 -0
  64. package/plugins/vuetifyPlugin.ts +1 -5
  65. package/store/data.store.ts +1647 -348
  66. package/store/extractStore.ts +17 -0
  67. package/store/form.store.ts +13 -1
  68. package/store/member.store.ts +2 -1
  69. package/store/rules.ts +97 -3
  70. package/store/toast.ts +1 -1
  71. package/tsconfig.json +3 -0
  72. package/types/enum.ts +82 -0
  73. package/types/env.d.ts +2 -0
  74. package/types/form.ts +90 -0
  75. package/types/index.ts +847 -506
@@ -33,7 +33,7 @@ export default defineComponent({
33
33
  },
34
34
  moreIcon: {
35
35
  type: String,
36
- default: 'mdi-cog-outline',
36
+ default: 'mdi-dots-vertical',
37
37
  },
38
38
  title: {
39
39
  type: String,
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <section class="w-full max-w-[300px] bg-white border-[1px] text-center flex items-center py-2 px-4 rounded-lg text-[13px]">
3
+ <v-icon :icon="icon.mdi" :color="icon.color" :size="icon.size" />
4
+ {{ text }}
5
+ </section>
6
+ </template>
7
+
8
+ <script setup lang="ts">
9
+ import type { Utils } from '../../types';
10
+
11
+ defineProps({
12
+ text: {
13
+ type: String,
14
+ default: '',
15
+ },
16
+ icon: {
17
+ type: Object as PropType<Utils.VIcon>,
18
+ default: {
19
+ mdi: undefined,
20
+ color: undefined,
21
+ size: 'default',
22
+ },
23
+ },
24
+ });
25
+ </script>
@@ -1,35 +1,53 @@
1
1
  <template>
2
- <v-dialog :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)" :persistent="true">
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
- <v-card-title>
5
- <slot v-if="!title" name="title"></slot>
6
- {{ title }}
7
- <v-btn class="!absolute top-2 right-3" icon="mdi mdi-window-close" variant="plain" @click="$emit('update:modelValue', null)" />
8
- </v-card-title>
9
- <v-card-subtitle>
10
- <slot v-if="!subtitle" name="subtitle"></slot>
11
- {{ subtitle }}
12
- </v-card-subtitle>
13
- <v-card-actions class="gap-[16px] m-2">
14
- <base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$dataStore.t('confirm.yes')" :btn="$styles.blueBtn" @click="$emit('yes')" />
15
- <base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$dataStore.t('confirm.no')" :btn="$styles.blueBtn" @click="$emit('no')" />
2
+ <v-dialog class="base-dialog" :model-value="Boolean(modelValue)" @update:modelValue="$emit('update:modelValue', $event)" :persistent="true">
3
+ <v-card class="self-center w-full sm:w-4/4 md:w-2/3 lg:w-[35%] xl:w-[500px] rounded-lg !p-[36px]">
4
+ <div class="flex sm:flex-row flex-col place-items-center sm:place-items-start">
5
+ <div class="h-20 w-20 place-items-start pt-1">
6
+ <div class="bg-[#F7F7F7] h-24 w-24 sm:h-16 sm:w-16 rounded grid place-items-center invisible sm:visible">
7
+ <i :class="'mdi-' + icon.mdi" class="mdi text-[100px] sm:text-[30px] color-blue visible !ml-[-10px] sm:!ml-[0px] mt-[-50px] sm:mt-0" :style="{ color: icon.color }"></i>
8
+ </div>
9
+ </div>
10
+ <v-card-title class="!text-center sm:!text-start text-[34px]">
11
+ <slot v-if="!title" name="title"></slot>
12
+ <div></div>
13
+ {{ title }}
14
+ <v-card-subtitle class="!p-0">
15
+ <slot v-if="!subtitle" name="subtitle"></slot>
16
+ {{ subtitle }}
17
+ </v-card-subtitle>
18
+ </v-card-title>
19
+ </div>
20
+ <v-card-actions class="!p-0 pt-5 gap-[16px] sm:flex-row flex-col place-items-stretch sm:place-items-center">
21
+ <base-btn
22
+ v-if="actions === 'default'"
23
+ class="px-6"
24
+ size="sm"
25
+ :text="confirm"
26
+ :btn="$styles.whiteBorderBtn"
27
+ :loading="$dataStore.isButtonsLoading"
28
+ :classes="$styles.blueText"
29
+ @click="$emit('yes')"
30
+ />
31
+ <base-btn v-if="actions === 'default'" class="px-6" size="sm" :text="$dataStore.t('confirm.cancel')" :btn="$styles.blueBtn" @click="$emit('no')" />
16
32
  <slot v-if="actions !== 'default'" name="actions"></slot>
17
33
  </v-card-actions>
18
34
  </v-card>
19
35
  </v-dialog>
20
36
  </template>
21
37
  <script lang="ts">
38
+ import type { Utils } from '../../types';
39
+
22
40
  export default defineComponent({
23
41
  name: 'BaseDialog',
24
42
  props: {
25
43
  modelValue: {
26
- type: Boolean,
44
+ type: Boolean as PropType<boolean | null>,
27
45
  default: false,
28
46
  },
29
47
  title: {
30
48
  type: String,
31
49
  default() {
32
- return useDataStore().t('dialog.title');
50
+ return useDataStore().t('dialog.confirmDo');
33
51
  },
34
52
  },
35
53
  subtitle: {
@@ -40,7 +58,45 @@ export default defineComponent({
40
58
  type: String,
41
59
  default: 'default',
42
60
  },
61
+ confirm: {
62
+ type: String,
63
+ default() {
64
+ return useDataStore().t('confirm.yes');
65
+ },
66
+ },
67
+ icon: {
68
+ type: Object as PropType<Utils.VIcon>,
69
+ default: {
70
+ mdi: 'information',
71
+ color: '#FAB31C',
72
+ },
73
+ },
43
74
  },
44
75
  emits: ['update:modelValue', 'yes', 'no'],
45
76
  });
46
77
  </script>
78
+ <style>
79
+ .base-dialog .v-card-title {
80
+ font-size: 18px;
81
+ }
82
+ .base-dialog .v-card-subtitle {
83
+ font-size: 14px;
84
+ }
85
+ @media (max-width: 640px) {
86
+ .base-dialog .v-card-title {
87
+ margin-top: 10px;
88
+ font-size: 20px;
89
+ }
90
+ .base-dialog .v-card-subtitle {
91
+ font-size: 14px;
92
+ }
93
+ }
94
+ .base-dialog .v-card-title,
95
+ .base-dialog .v-card-subtitle {
96
+ padding-top: 0;
97
+ flex: 1;
98
+ overflow-wrap: normal;
99
+ overflow: visible;
100
+ white-space: normal;
101
+ }
102
+ </style>
@@ -25,10 +25,12 @@
25
25
  </template>
26
26
 
27
27
  <script lang="ts">
28
+ import type { Api } from '../../types';
29
+
28
30
  export default defineComponent({
29
31
  props: {
30
32
  selected: {
31
- type: Object as PropType<BirthInfoGKB>,
33
+ type: Object as PropType<Api.GKB.BirthInfo>,
32
34
  },
33
35
  },
34
36
  emits: ['selectFamilyMember', 'reset'],
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <v-form class="dynamic-form">
3
+ <base-form-section v-for="(section, sectionIndex) in form.sections" :key="sectionIndex" class="rounded-lg" :title="section.title">
4
+ <base-dynamic-input :fields="section.fields" @onClickField="onClickField" />
5
+ </base-form-section>
6
+ <Teleport v-if="isPanelOpen" to="#right-panel-actions">
7
+ <div :class="[$styles.scrollPage]" class="flex flex-col items-center">
8
+ <base-rounded-input v-model="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
9
+ <div v-if="panelList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
10
+ <base-panel-select-item :text="$dataStore.t('form.notChosen')" :selected="panelValue.nameRu === null" @click="pickPanelValue(new Value())" />
11
+ <base-panel-select-item
12
+ v-for="(item, index) of panelList.filter(i => i.nameRu && (i.nameRu as string).match(new RegExp(searchQuery, 'i')))"
13
+ :key="index"
14
+ :text="String(item.nameRu)"
15
+ :selected="item.nameRu === panelValue"
16
+ @click="pickPanelValue(item)"
17
+ />
18
+ </div>
19
+ <base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
20
+ </div>
21
+ </Teleport>
22
+ </v-form>
23
+ </template>
24
+
25
+ <script lang="ts">
26
+ import { Value } from '#imports';
27
+ import type { DynamicForm, FetchFunctions, InputType } from '../../types/form';
28
+
29
+ export default defineComponent({
30
+ props: {
31
+ form: {
32
+ type: Object as PropType<DynamicForm>,
33
+ required: true,
34
+ },
35
+ },
36
+ setup() {
37
+ const dataStore = useDataStore();
38
+ const isPanelOpen = ref<boolean>(false);
39
+ const panelValue = ref<any>(new Value());
40
+ const panelList = ref<Value[]>([]);
41
+ const isPanelLoading = ref<boolean>(false);
42
+ const searchQuery = ref<string>('');
43
+ const listOfPanelTitles: {
44
+ [key in FetchFunctions]: string;
45
+ } = {
46
+ getResidents: 'form.signOfResidency',
47
+ getFamilyStatuses: 'form.familyStatus',
48
+ getRelationTypes: 'form.relations',
49
+ getCountries: 'form.Country',
50
+ getLocalityTypes: 'form.RegionType',
51
+ getStates: 'form.Province',
52
+ getCities: 'form.City',
53
+ getRegions: 'form.Region',
54
+ getDocumentTypes: 'form.documentType',
55
+ getTaxCountries: 'form.countryOfTaxResidency',
56
+ getCitizenshipCountries: 'form.countryOfCitizenship',
57
+ getSectorCodeList: 'form.economySectorCode',
58
+ getInsurancePay: 'form.insurancePay',
59
+ getEconomicActivityType: 'form.typeEconomicActivity',
60
+ getBanks: 'form.bankName',
61
+ getDocumentIssuers: 'form.documentIssuers',
62
+ getGenderList: 'form.gender',
63
+ };
64
+
65
+ const currentField = ref<InputType | null>(null);
66
+
67
+ const pickPanelValue = (item: Value) => {
68
+ if (currentField.value) {
69
+ currentField.value.modelValue = item;
70
+ dataStore.rightPanel.open = false;
71
+ searchQuery.value = '';
72
+ currentField.value = null;
73
+ }
74
+ isPanelOpen.value = false;
75
+ };
76
+
77
+ const onClickField = async (field: InputType) => {
78
+ currentField.value = field;
79
+ if (field.fetchFrom) {
80
+ isPanelLoading.value = true;
81
+ isPanelOpen.value = true;
82
+ dataStore.rightPanel.open = true;
83
+ dataStore.rightPanel.title = dataStore.t(listOfPanelTitles[field.fetchFrom]);
84
+ panelValue.value = field.modelValue;
85
+ panelList.value = (await dataStore[field.fetchFrom]()) as Value[];
86
+ isPanelLoading.value = false;
87
+ }
88
+ };
89
+
90
+ return {
91
+ panelValue,
92
+ panelList,
93
+ isPanelOpen,
94
+ isPanelLoading,
95
+ searchQuery,
96
+ pickPanelValue,
97
+ onClickField,
98
+ };
99
+ },
100
+ });
101
+ </script>
@@ -6,7 +6,7 @@
6
6
  <div
7
7
  v-if="isMultiple && more && !isShort && isActionsAvailable"
8
8
  :class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, disabled ? $styles.disabled : 'cursor-pointer']"
9
- class="lg:flex transition-all rounded-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
9
+ class="hidden lg:flex transition-all rounded-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
10
10
  @click="!disabled && memberStore.addMember(whichForm)"
11
11
  >
12
12
  {{ $dataStore.t('buttons.add') }}
@@ -33,7 +33,7 @@
33
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
34
  >
35
35
  <span :class="[getMemberInfo(each).fullName === null && $styles.emptyBlockCol]">{{ getMemberInfo(each).fullName }}</span>
36
- <span :class="[getMemberInfo(each).iin === null && $styles.emptyBlockCol]">{{ getMemberInfo(each).iin }}</span>
36
+ <span :class="[getMemberInfo(each).iin === null && $styles.emptyBlockCol]">{{ getMemberIIN(each) }}</span>
37
37
  <span v-if="!isShort" :class="[getMemberInfo(each).gender === null && $styles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(each).gender }} </span>
38
38
  <span v-if="!isShort" :class="[getMemberInfo(each).birthDate === null && $styles.emptyBlockCol]"> {{ getMemberInfo(each).birthDate }} </span>
39
39
  <span v-if="!isShort" :class="[getMemberInfo(each).birthPlace === null && $styles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).birthPlace }} </span>
@@ -75,7 +75,7 @@
75
75
  <div
76
76
  v-if="isMultiple && more && !isShort && isActionsAvailable"
77
77
  :class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, disabled ? $styles.disabled : 'cursor-pointer']"
78
- class="lg:hidden transition-all rounded-b-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90"
78
+ class="flex lg:hidden transition-all rounded-b-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90"
79
79
  @click="!disabled && memberStore.addMember(whichForm)"
80
80
  >
81
81
  {{ $dataStore.t('buttons.add') }}
@@ -116,6 +116,7 @@ export default defineComponent({
116
116
  },
117
117
  emits: ['onMore', 'addMember'],
118
118
  setup(props) {
119
+ const dataStore = useDataStore();
119
120
  const formStore = useFormStore();
120
121
  const memberStore = useMemberStore();
121
122
  const isMultiple = computed(() => [StoreMembers.insuredForm, StoreMembers.beneficiaryForm, StoreMembers.beneficialOwnerForm].includes(props.whichForm as StoreMembers));
@@ -128,6 +129,13 @@ export default defineComponent({
128
129
 
129
130
  const isShort = computed(() => props.type === 'short');
130
131
  const isActionsAvailable = computed(() => memberStore.isStatementEditible(props.whichForm));
132
+ const getMemberIIN = (each: Member) => {
133
+ const iin = getMemberInfo(each).iin;
134
+ if (dataStore.isFinCenter() && iin) {
135
+ return iin.replaceAll('-', '');
136
+ }
137
+ return iin;
138
+ };
131
139
 
132
140
  const getMemberInfo = (memberData: Member) => {
133
141
  return {
@@ -153,6 +161,7 @@ export default defineComponent({
153
161
  isActionsAvailable,
154
162
 
155
163
  // Functions
164
+ getMemberIIN,
156
165
  getMemberInfo,
157
166
  };
158
167
  },
@@ -0,0 +1,111 @@
1
+ <template>
2
+ <base-animation :type="animation">
3
+ <div
4
+ v-if="block && !!block.show === true"
5
+ class="form-data-block rounded-lg border-[1px] relative transition-all"
6
+ :class="[$styles.whiteBg, block.disabled && $styles.disabled]"
7
+ >
8
+ <div class="py-3 px-6">
9
+ <div class="flex items-center justify-between">
10
+ <p :class="[$styles.textTitle, $styles.greenText]">{{ block.title }}</p>
11
+ <div
12
+ v-if="typeof block.headerBtn === 'object' ? (typeof block.headerBtn.showBtn === 'boolean' ? block.headerBtn.showBtn === true : true) : false"
13
+ :class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, block.disabled ? $styles.disabled : 'cursor-pointer']"
14
+ class="hidden lg:flex transition-all rounded-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
15
+ @click="!block.disabled && block.headerBtn!.action()"
16
+ >
17
+ {{ block.headerBtn!.text }}
18
+ </div>
19
+ </div>
20
+ <p v-if="block.subtitle" :class="[$styles.greyText, $styles.textSimple]">{{ block.subtitle }}</p>
21
+ <v-row class="mt-1 max-w-[97%]">
22
+ <v-col v-for="(label, index) in visibleLabels" :key="index" :cols="block.shrinkLabels === true ? false : label.size">
23
+ <p :class="[$styles.textSimple]" class="font-medium">
24
+ {{ label.text }}
25
+ </p>
26
+ </v-col>
27
+ </v-row>
28
+ <div v-if="hasBlockData(block.data)">
29
+ <v-row v-for="(row, index) in getBlockDataValue(block.data)" :key="index" class="min-h-[65px] max-w-[97%]">
30
+ <v-col v-if="row.every((i: any) => !i)" :class="[$styles.textSimple, $styles.blueText]">{{ block.noValueText ?? $dataStore.t('clients.necessaryFillForm') }}</v-col>
31
+ <v-col v-else v-for="each of row.filter((_: any, i: number) => ($display().lgAndUp.value ? true : block.labels[i].hideOnMobile === false))" :key="each">
32
+ <p :class="[$styles.textSimple]">
33
+ {{ each }}
34
+ </p>
35
+ </v-col>
36
+ <base-animation type="fade">
37
+ <div
38
+ v-if="block.btn && !!block.btn.showBtn === true"
39
+ class="absolute right-0 rounded-br-lg transition-all h-[70px] w-[60px] place-self-end flex items-center justify-center"
40
+ :class="[$styles.blueBgLight, $styles.blueBgLightHover, block.disabled ? $styles.disabled : 'cursor-pointer']"
41
+ @click="!block.disabled && block.btn.action({ value: row, index: index })"
42
+ >
43
+ <i class="mdi text-xl" :class="[block.btn.icon]"></i>
44
+ </div>
45
+ </base-animation>
46
+ </v-row>
47
+ </div>
48
+ </div>
49
+ <div
50
+ v-if="typeof block.headerBtn === 'object'"
51
+ :class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, block.disabled ? $styles.disabled : 'cursor-pointer']"
52
+ class="flex lg:hidden transition-all rounded-b-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90"
53
+ @click="!block.disabled && block.headerBtn.action()"
54
+ >
55
+ {{ block.headerBtn.text }}
56
+ </div>
57
+ </div>
58
+ </base-animation>
59
+ </template>
60
+
61
+ <script lang="ts">
62
+ import { type ComputedRefWithControl } from '@vueuse/core';
63
+ import { FormBlock } from '../../composables/fields';
64
+ import type { Utils } from '../../types';
65
+
66
+ export default defineComponent({
67
+ props: {
68
+ block: {
69
+ type: Object as PropType<FormBlock>,
70
+ required: true,
71
+ },
72
+ animation: {
73
+ type: String as PropType<Utils.VuetifyAnimations>,
74
+ required: false,
75
+ },
76
+ },
77
+ setup(props) {
78
+ const display = useDisplayInfo();
79
+ const visibleLabels = computed(() => (display.lgAndUp.value ? props.block.labels : props.block.labels.filter(i => i.hideOnMobile === false)));
80
+
81
+ const hasBlockData = (data: ComputedRefWithControl<any> | string[][]) => {
82
+ if (data) {
83
+ if ('value' in data && data.value && data.value.length) {
84
+ return true;
85
+ }
86
+ if ('value' in data === false && Array.isArray(data) && data.length) {
87
+ return true;
88
+ }
89
+ }
90
+ return false;
91
+ };
92
+ const getBlockDataValue = (data: ComputedRefWithControl<any> | string[][]) => ('value' in data ? data.value : data);
93
+
94
+ return {
95
+ // Computed
96
+ visibleLabels,
97
+
98
+ // Functions
99
+ hasBlockData,
100
+ getBlockDataValue,
101
+ };
102
+ },
103
+ });
104
+ </script>
105
+
106
+ <style>
107
+ .form-data-block .v-col {
108
+ display: flex;
109
+ align-items: center;
110
+ }
111
+ </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <section :class="[$styles.blueBgLight, $styles.rounded]" class="mt-[14px] p-4 flex flex-col gap-[1px]">
3
- <h2 :class="[$styles.textTitle]" class="font-medium text-center w-full mb-4">
3
+ <h2 v-if="title && typeof title === 'string'" :class="[$styles.textTitle]" class="font-medium text-center w-full mb-4">
4
4
  {{ title }}
5
5
  <slot name="icon"></slot>
6
6
  </h2>
@@ -13,8 +13,8 @@ export default defineComponent({
13
13
  props: {
14
14
  title: {
15
15
  type: String,
16
- default: 'Заголовок',
17
- required: true,
16
+ default: '',
17
+ required: false,
18
18
  },
19
19
  },
20
20
  });
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="flex flex-col justify-between rounded-lg" :class="[$styles.whiteBg]">
3
- <span v-if="title" class="p-4" :class="[$styles.textTitle]">{{ title }}</span>
4
- <span v-if="subtitle" class="p-4 text-[#99A3B3] border-t-[1px]" :class="[$styles.textSimple]">{{ subtitle }}</span>
2
+ <div class="flex flex-col justify-between rounded-lg transition-all" :class="[$styles.whiteBg]">
3
+ <span v-if="title" class="p-4" :class="[titleClass ?? $styles.textTitle]">{{ title }}</span>
4
+ <span v-if="subtitle" class="p-4 text-[#99A3B3] border-t-[1px]" :class="[subtitleClass ?? $styles.textSimple]">{{ subtitle }}</span>
5
5
  <slot></slot>
6
6
  </div>
7
7
  </template>
@@ -12,9 +12,17 @@ export default defineComponent({
12
12
  title: {
13
13
  type: String,
14
14
  },
15
+ titleClass: {
16
+ type: String,
17
+ default: '',
18
+ },
15
19
  subtitle: {
16
20
  type: String,
17
21
  },
22
+ subtitleClass: {
23
+ type: String,
24
+ default: '',
25
+ },
18
26
  },
19
27
  });
20
28
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
- class="h-[74px] !pl-2 md:!pl-5 flex items-center justify-start gap-4"
4
- :class="[$styles.whiteBg, hasBorder ? 'border-[1px] rounded-lg' : 'border-b-[1px] border-b-[#f3f6fc] rounded']"
3
+ class="!pl-2 md:!pl-5 flex items-center justify-start gap-5"
4
+ :class="[$styles.whiteBg, height, hasBorder ? 'border-[1px] rounded-lg' : 'border-b-[1px] border-b-[#f3f6fc] rounded']"
5
5
  >
6
6
  <v-switch
7
7
  class="base-toggle"
@@ -12,10 +12,14 @@
12
12
  "
13
13
  color="#009C73"
14
14
  hide-details
15
+ :true-value="trueValue"
16
+ :false-value="falseValue"
15
17
  :disabled="disabled"
16
18
  />
17
- <p :class="[$styles.textSimple]">{{ `${title}` }}</p>
18
- <p class="mr-3" :class="[modelValue ? $styles.greenText : '', $styles.textSimple]">{{ `${modelValue ? $dataStore.t('confirm.yes') : $dataStore.t('confirm.no')}` }}</p>
19
+ <p class="p-2" :class="[$styles.textSimple]">{{ `${title}` }}</p>
20
+ <p v-if="showValue" class="mr-3" :class="[modelValue ? $styles.greenText : '', $styles.textSimple]">
21
+ {{ `${modelValue ? $dataStore.t('confirm.yes') : $dataStore.t('confirm.no')}` }}
22
+ </p>
19
23
  </div>
20
24
  </template>
21
25
 
@@ -23,7 +27,7 @@
23
27
  export default defineComponent({
24
28
  props: {
25
29
  modelValue: {
26
- type: Boolean,
30
+ type: Boolean as PropType<any>,
27
31
  default: '',
28
32
  },
29
33
  title: {
@@ -38,6 +42,22 @@ export default defineComponent({
38
42
  type: Boolean,
39
43
  default: true,
40
44
  },
45
+ showValue: {
46
+ type: Boolean,
47
+ default: true,
48
+ },
49
+ trueValue: {
50
+ type: Boolean as PropType<any>,
51
+ default: true,
52
+ },
53
+ falseValue: {
54
+ type: Boolean as PropType<any>,
55
+ default: false,
56
+ },
57
+ height: {
58
+ type: String,
59
+ default: 'min-h-[74px] ',
60
+ },
41
61
  },
42
62
  emits: ['update:modelValue', 'clicked'],
43
63
  });