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,13 +33,13 @@
33
33
  <v-icon
34
34
  v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') === false"
35
35
  :icon="appendInnerIcon"
36
- @click="appendInnerIcon.includes('mdi-magnify') ? $emit('append') : !props.readonly && $emit('append')"
36
+ @click="appendInnerIcon.includes('mdi-magnify') || appendInnerIcon.includes('mdi-credit-card-scan') ? $emit('append') : !props.readonly && $emit('append')"
37
37
  />
38
38
  <base-datepicker
39
39
  v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') && !props.readonly"
40
40
  :model-value="modelValue"
41
+ :min-date="minDate"
41
42
  @update:modelValue="$emit('update:modelValue', $event)"
42
- :teleport="teleport"
43
43
  />
44
44
  </template>
45
45
  <template v-if="loading" #loader>
@@ -49,6 +49,8 @@
49
49
  </template>
50
50
 
51
51
  <script lang="ts">
52
+ import type { InputTypes, InputVariants } from '../../types';
53
+
52
54
  export default defineComponent({
53
55
  name: 'BaseFormInput',
54
56
  props: {
@@ -114,6 +116,10 @@ export default defineComponent({
114
116
  type: String,
115
117
  default: 'mdi-close',
116
118
  },
119
+ minDate: {
120
+ type: Date,
121
+ default: undefined,
122
+ },
117
123
  prependIcon: {
118
124
  type: String,
119
125
  },
@@ -139,10 +145,9 @@ export default defineComponent({
139
145
  const submitted = (event: any) => {
140
146
  emit('submitted', event);
141
147
  };
142
-
143
148
  return {
144
- submitted,
145
149
  props,
150
+ submitted,
146
151
  };
147
152
  },
148
153
  });
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <vue-date-picker
3
+ :model-value="modelValue"
4
+ :clearable="false"
5
+ :disabled="disabled"
6
+ :reaonly="readonly"
7
+ month-picker
8
+ locale="ru"
9
+ format="MM.yyyy"
10
+ :teleport="true"
11
+ :close-on-scroll="true"
12
+ cancel-text="Отменить"
13
+ select-text="Выбрать"
14
+ @update:modelValue="$emit('update:modelValue', $event)"
15
+ />
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ export default defineComponent({
20
+ props: {
21
+ modelValue: {
22
+ required: false,
23
+ },
24
+ disabled: {
25
+ type: Boolean,
26
+ default: false,
27
+ },
28
+ readonly: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
32
+ },
33
+ });
34
+ </script>
@@ -24,7 +24,7 @@
24
24
  :suffix="suffix"
25
25
  @keyup.enter.prevent="submitted"
26
26
  @click:control="!props.readonly && $emit('append')"
27
- @click:clear="(props.readonly ? false : clearable) && $emit('update:modelValue', new Value())"
27
+ @click:clear="(props.readonly ? false : clearable) && $emit('update:modelValue', clearValue)"
28
28
  @click:append="!props.readonly && $emit('append-out')"
29
29
  @click:prepend="!props.readonly && $emit('prepend-out')"
30
30
  @click:append-inner="!props.readonly && $emit('append')"
@@ -39,6 +39,7 @@
39
39
 
40
40
  <script lang="ts">
41
41
  import { Value } from '../../composables/classes';
42
+ import type { InputTypes, InputVariants } from '../../types';
42
43
 
43
44
  export default defineComponent({
44
45
  name: 'BasePanelInput',
@@ -50,6 +51,10 @@ export default defineComponent({
50
51
  type: Boolean,
51
52
  default: false,
52
53
  },
54
+ clearValue: {
55
+ type: Object,
56
+ default: new Value(),
57
+ },
53
58
  clearable: {
54
59
  type: Boolean,
55
60
  default: true,
@@ -34,6 +34,8 @@
34
34
  </template>
35
35
 
36
36
  <script lang="ts">
37
+ import type { InputTypes, InputVariants } from '../../types';
38
+
37
39
  export default defineComponent({
38
40
  name: 'BaseRoundedInput',
39
41
  props: {
@@ -7,7 +7,7 @@
7
7
  :placeholder="placeholder"
8
8
  :label="label"
9
9
  :variant="variant"
10
- :density="(density as any)"
10
+ :density="density"
11
11
  :menu-icon="menuIcon"
12
12
  :clear-icon="clearIcon"
13
13
  :color="color"
@@ -21,6 +21,7 @@
21
21
  :append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
22
22
  :bg-color="bgColor ? bgColor : ''"
23
23
  :items="items"
24
+ :hide-details="hideDetails"
24
25
  @click:append="!props.readonly && $emit('append-out')"
25
26
  @click:prepend="!props.readonly && $emit('prepend-out')"
26
27
  @click:append-inner="!props.readonly && $emit('append')"
@@ -34,6 +35,8 @@
34
35
  </template>
35
36
 
36
37
  <script lang="ts">
38
+ import type { InputVariants } from '../../types';
39
+
37
40
  export default defineComponent({
38
41
  name: 'BaseRoundedSelect',
39
42
  props: {
@@ -81,9 +84,13 @@ export default defineComponent({
81
84
  default: 'solo',
82
85
  },
83
86
  density: {
84
- type: String,
87
+ type: String as PropType<any>,
85
88
  default: 'compact',
86
89
  },
90
+ hideDetails: {
91
+ type: Boolean,
92
+ default: false,
93
+ },
87
94
  color: {
88
95
  type: String,
89
96
  default: '#009c73',
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <div class="base-switch-input p-4 bg-white rounded-lg mb-3">
3
+ <v-switch v-model="field.modelValue" v-bind="switchProps" />
4
+ </div>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ import type { SwitchInput } from '../../types/form';
9
+
10
+ export default defineComponent({
11
+ name: 'asSwitchInput',
12
+ props: {
13
+ field: {
14
+ type: Object as PropType<SwitchInput>,
15
+ required: true,
16
+ },
17
+ },
18
+ setup(props) {
19
+ const switchProps = computed(() => {
20
+ return {
21
+ label: props.field.label,
22
+ direction: props.field.direction,
23
+ disabled: props.field.disabled,
24
+ hideDetails: true,
25
+ color: '#009C73',
26
+ };
27
+ });
28
+ return { switchProps };
29
+ },
30
+ });
31
+ </script>
32
+
33
+ <style>
34
+ .base-switch-input .v-switch label {
35
+ font-size: 14px !important;
36
+ font-weight: 400 !important;
37
+ line-height: 20px !important;
38
+ opacity: 1 !important;
39
+ }
40
+ .base-switch-input .v-switch__track {
41
+ background: white !important;
42
+ border: 1.1px solid #e5e5ea;
43
+ height: 19px !important;
44
+ width: 100px !important;
45
+ border-radius: 16px;
46
+ overflow: hidden;
47
+ }
48
+
49
+ .base-switch-input .switch-block .v-input--horizontal {
50
+ grid-template-areas: unset !important;
51
+ }
52
+
53
+ .base-switch-input .v-switch__thumb {
54
+ color: white;
55
+ width: 20px;
56
+ height: 20px;
57
+ }
58
+
59
+ .base-switch-input .v-selection-control--dirty .v-switch__track {
60
+ background: #009c73 !important;
61
+ }
62
+
63
+ .base-switch-input .v-switch .v-selection-control {
64
+ min-height: unset !important;
65
+ }
66
+ </style>
@@ -0,0 +1,162 @@
1
+ <template>
2
+ <div class="base-text-input flex justify-between items-center pr-4 mb-[1px] bg-[#fff]" @click="$emit('onClickField')">
3
+ <v-text-field v-model="control.modelValue" v-bind="textFieldProps" v-maska="mask">
4
+ <div v-if="hasSuffix" class="absolute top-[27px] left-[18px] flex items-center justify-center">
5
+ <p class="opacity-0 inline-block mr-[2px]">{{ control.modelValue }}</p>
6
+ <span>{{ suffix }}</span>
7
+ </div>
8
+ </v-text-field>
9
+ <v-icon v-if="control.iconName" :icon="`mdi cursor-pointer ${iconsList[control.iconName]}`" color="#A0B3D8" />
10
+ <vue-date-picker v-if="control.maska === 'date'" v-model="control.modelValue" v-bind="datePickerProps" @update:modelValue="$emit('update:modelValue', $event)">
11
+ <template #trigger>
12
+ <v-icon icon="mdi mdi-calendar-blank-outline cursor-pointer" color="#a0b3d8" />
13
+ </template>
14
+ </vue-date-picker>
15
+ </div>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ import type { InputType } from '../../types/form';
20
+
21
+ const iconsList: { [key: string]: string } = {
22
+ arrowRight: 'mdi-chevron-right',
23
+ search: 'mdi-magnify',
24
+ sms: 'mdi-message-text',
25
+ clear: 'mdi-close',
26
+ };
27
+
28
+ const suffixList: { [key: string]: string } = {
29
+ kzt: '₸',
30
+ usd: '$',
31
+ percent: '%',
32
+ };
33
+
34
+ export default defineComponent({
35
+ props: {
36
+ control: {
37
+ type: Object as PropType<InputType>,
38
+ required: true,
39
+ },
40
+ },
41
+ setup(props) {
42
+ const mask = computed(() => (props.control.maska ? useMask()[props.control.maska] : ''));
43
+ const dataStore = useDataStore();
44
+
45
+ const textFieldProps = computed(() => {
46
+ return {
47
+ label: props.control.label,
48
+ placeholder: props.control.placeholder,
49
+ disabled: props.control.disabled,
50
+ maxLength: props.control.maxLength,
51
+ readonly: props.control.readonly || props.control.iconName === 'arrowRight',
52
+ };
53
+ });
54
+
55
+ const datePickerProps = computed(() => {
56
+ return {
57
+ locale: 'ru',
58
+ flow: ['calendar'],
59
+ modelType: 'dd.MM.yyyy',
60
+ enableTimePicker: false,
61
+ clearable: false,
62
+ disabled: props.control.disabled,
63
+ readonly: props.control.readonly,
64
+ selectText: 'Выбрать',
65
+ cancelText: 'Закрыть',
66
+ closeOnScroll: true,
67
+ transitions: false,
68
+ teleport: true,
69
+ sixWeeks: true,
70
+ };
71
+ });
72
+
73
+ const hasSuffix = computed(() => {
74
+ return props.control.suffix && props.control.type === 'number' && props.control.modelValue;
75
+ });
76
+
77
+ const suffix = computed(() => {
78
+ return hasSuffix.value ? suffixList[props.control.suffix!] : '';
79
+ });
80
+
81
+ const onClickIcon = async () => {
82
+ if (props.control.fetchFrom) {
83
+ dataStore.rightPanel.open = true;
84
+ dataStore.rightPanel.title = 'test panel name';
85
+ }
86
+ };
87
+
88
+ return {
89
+ // State
90
+ datePickerProps,
91
+ textFieldProps,
92
+ hasSuffix,
93
+ mask,
94
+ suffix,
95
+ iconsList,
96
+ // Functions
97
+ onClickIcon,
98
+ };
99
+ },
100
+ });
101
+ </script>
102
+ <style>
103
+ .base-text-input .v-field__append-inner i {
104
+ color: #a0b3d8 !important;
105
+ margin-left: 10px;
106
+ margin-right: 4px;
107
+ }
108
+ .base-text-input .v-field__append-inner {
109
+ margin-top: 12px;
110
+ cursor: pointer;
111
+ padding-right: 6px;
112
+ }
113
+ .base-text-input .v-field__outline,
114
+ .base-text-input .v-field__overlay,
115
+ .base-text-input .v-field__loader {
116
+ display: none !important;
117
+ }
118
+
119
+ .base-text-input .v-input__prepend {
120
+ padding-top: 0;
121
+ display: flex;
122
+ align-items: center;
123
+ }
124
+ .base-text-input .v-field__append-inner {
125
+ display: flex;
126
+ padding: 0;
127
+ align-items: center;
128
+ justify-content: center;
129
+ }
130
+
131
+ .base-text-input .v-file-input {
132
+ padding: 0px;
133
+ }
134
+ .base-text-input .v-messages,
135
+ .base-text-input .v-messages__message,
136
+ .base-text-input .v-input__details {
137
+ min-height: unset !important;
138
+ }
139
+ .base-text-input .v-messages__message {
140
+ transition: all 0.5s;
141
+ margin-bottom: 10px;
142
+ }
143
+ .base-text-input .v-input__details {
144
+ padding-bottom: 0 !important;
145
+ padding-top: 0 !important;
146
+ }
147
+ .base-text-input .dp__action_buttons button {
148
+ padding: 6px 9px;
149
+ height: unset;
150
+ }
151
+ .base-text-input .dp__action_select {
152
+ background: #a0b3d8;
153
+ color: white;
154
+ }
155
+ .base-text-input .dp__action_select:hover {
156
+ background: #97acd6;
157
+ }
158
+ .base-text-input .dp__active_date,
159
+ .base-text-input .dp__overlay_cell_active {
160
+ background: #a0b3d8;
161
+ }
162
+ </style>
@@ -2,9 +2,14 @@
2
2
  <v-navigation-drawer
3
3
  v-model="$dataStore[whichPanel].open"
4
4
  :temporary="$dataStore[whichPanel].overlay"
5
- location="right"
6
- class="sm:!w-[400px] lg:!relative !right-0"
7
- :class="[$dataStore[whichPanel].overlay ? 'lg:!hidden' : '', $dataStore[whichPanel].open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]']"
5
+ :location="side"
6
+ class="sm:!w-[400px]"
7
+ :class="[
8
+ $dataStore[whichPanel].overlay ? 'lg:!hidden' : '',
9
+ $dataStore[whichPanel].open ? '!w-full lg:!w-1/4' : 'lg:!w-[0px]',
10
+ side === 'left' ? '!left-0 !absolute' : '!right-0',
11
+ side === 'right' && $dataStore[whichPanel].open ? 'lg:!relative' : '',
12
+ ]"
8
13
  :disable-resize-watcher="true"
9
14
  :disable-route-watcher="true"
10
15
  >
@@ -12,12 +17,17 @@
12
17
  <div v-if="$dataStore.panelAction === null" class="flex flex-col" id="panel-actions">
13
18
  <slot></slot>
14
19
  </div>
15
- <base-panel-handler v-else @task="$emit('task', $event)" />
20
+ <div v-if="side === 'right'" class="flex flex-col" id="right-panel-actions">
21
+ <slot></slot>
22
+ </div>
23
+ <base-panel-handler v-if="side === 'left' && whichPanel === 'panel'" @task="$emit('task', $event)" />
16
24
  <slot name="panel"></slot>
17
25
  </v-navigation-drawer>
18
26
  </template>
19
27
 
20
28
  <script lang="ts">
29
+ import type { PanelTypes } from '../../types';
30
+
21
31
  export default defineComponent({
22
32
  name: 'BasePanel',
23
33
  props: {
@@ -29,6 +39,10 @@ export default defineComponent({
29
39
  type: String as PropType<PanelTypes>,
30
40
  default: 'panel',
31
41
  },
42
+ side: {
43
+ type: String as PropType<'left' | 'right'>,
44
+ default: 'left',
45
+ },
32
46
  },
33
47
  emits: ['task'],
34
48
  setup(props) {
@@ -1,7 +1,14 @@
1
1
  <template>
2
- <header class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$styles.blueBgLight, $styles.textSimple]">
2
+ <header class="relative w-full min-h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$styles.blueBgLight, $styles.textSimple]">
3
3
  <i v-if="hasBack" @click="$emit('onBack')" class="absolute left-5 mdi text-xl cursor-pointer transition-all" :class="[backIcon, backIconAnim]"></i>
4
4
  <span class="mx-10">{{ title }}</span>
5
+ <i
6
+ v-if="hasInfo && infoItems && infoItems.length && infoItems.filter(i => (typeof i.show === 'boolean' ? i.show : true)).length"
7
+ class="mdi text-xl cursor-pointer transition-all opacity-70"
8
+ :class="[infoIcon, $styles.blueText]"
9
+ >
10
+ <base-info-menu :options="infoItems" @clicked="$dataStore.copyToClipboard($event, false)" />
11
+ </i>
5
12
  <i
6
13
  v-if="hasMore"
7
14
  @click="$emit('onMore')"
@@ -13,6 +20,8 @@
13
20
  </template>
14
21
 
15
22
  <script lang="ts">
23
+ import { MenuItem } from '../../composables/classes';
24
+
16
25
  export default defineComponent({
17
26
  props: {
18
27
  hasBack: {
@@ -33,7 +42,19 @@ export default defineComponent({
33
42
  },
34
43
  moreIcon: {
35
44
  type: String,
36
- default: 'mdi-cog-outline',
45
+ default: 'mdi-dots-vertical',
46
+ },
47
+ hasInfo: {
48
+ type: Boolean,
49
+ default: false,
50
+ },
51
+ infoIcon: {
52
+ type: String,
53
+ default: '',
54
+ },
55
+ infoItems: {
56
+ type: Array as PropType<Array<MenuItem>>,
57
+ default: [],
37
58
  },
38
59
  title: {
39
60
  type: String,
@@ -28,7 +28,8 @@ export default defineComponent({
28
28
  },
29
29
  bgColor: {
30
30
  type: String,
31
- default: '#009C73',
31
+ default:
32
+ import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti' ? '#1B1918' : '#009c73',
32
33
  },
33
34
  },
34
35
  });
@@ -9,11 +9,15 @@
9
9
  <v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')" />
10
10
  <i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
11
11
  ></base-panel-item>
12
- <base-panel-item v-if="$dataStore.isEFO && !isProduction && $dataStore.accessToken" @click="changeBridge('lka', $dataStore.accessToken)" class="cursor-pointer">
12
+ <base-panel-item
13
+ v-if="$dataStore.accessToken && (($dataStore.isEFO && $dataStore.hasAccess().toLKA) || ($dataStore.isAULETTI && $dataStore.hasAccess().toLKA_A))"
14
+ @click="changeBridge('lka', $dataStore.accessToken)"
15
+ class="cursor-pointer"
16
+ >
13
17
  {{ $dataStore.t('labels.lkaLong') }}
14
18
  <i class="mdi mdi-chevron-right text-2xl text-[#A0B3D8]"></i
15
19
  ></base-panel-item>
16
- <base-panel-item v-if="$dataStore.isLKA && $dataStore.accessToken" @click="changeBridge('efo', $dataStore.accessToken)" class="cursor-pointer">
20
+ <base-panel-item v-if="($dataStore.isLKA || $dataStore.isLKA_A) && $dataStore.accessToken" @click="changeBridge('efo', $dataStore.accessToken)" class="cursor-pointer">
17
21
  {{ $dataStore.t('labels.efoLong') }}
18
22
  <i class="mdi mdi-web text-2xl text-[#A0B3D8]"></i
19
23
  ></base-panel-item>
@@ -30,18 +34,25 @@
30
34
  {{ $dataStore.t('historyStatementsAndStatuses') }}
31
35
  <i class="mdi mdi-history text-xl text-[#A0B3D8]"></i>
32
36
  </base-panel-item>
37
+ <base-panel-item v-if="hasFAQ" @click="$router.push({ name: 'FAQ' })" class="cursor-pointer">
38
+ FAQ
39
+ <i class="mdi mdi-help text-xl text-[#A0B3D8]"></i>
40
+ </base-panel-item>
33
41
  <base-panel-item @click="dialogSignOut = true" class="cursor-pointer" :class="[$styles.redText]">
34
42
  {{ $dataStore.t('buttons.logout') }}
35
43
  <i class="mdi mdi-logout text-xl"></i>
36
44
  </base-panel-item>
37
- <div v-if="$dataStore.settings.open && 'version' in pkg && pkg.version" class="absolute bottom-2 w-full flex items-center justify-center opacity-30 text-sm">
38
- <p>{{ pkg.version }}</p>
45
+ <div v-if="$dataStore.settings.open" class="absolute bottom-4 w-full flex flex-col items-center opacity-30 text-sm">
46
+ <p v-if="'version' in pkg && pkg.version">{{ pkg.version }}</p>
47
+ <p v-if="commitVersion">{{ `Current: #${commitVersion}` }}</p>
48
+ <p v-if="$dataStore.projectConfig">{{ `Latest: #${$dataStore.projectConfig.version}` }}</p>
39
49
  </div>
40
50
  <base-dialog
41
51
  v-model="dialogSignOut"
42
- :title="$dataStore.t('dialog.exit')"
43
- :subtitle="$dataStore.t('dialog.dataWillClear')"
44
- actions="default"
52
+ :title="$dataStore.t('dialog.confirmExit')"
53
+ :subtitle="$dataStore.t('dialog.exit') + $dataStore.t('dialog.dataWillClear')"
54
+ :confirm="$dataStore.t('confirm.exit')"
55
+ :icon="{ mdi: 'exit-to-app', color: '#FD2D39' }"
45
56
  @yes="logoutUser"
46
57
  @no="dialogSignOut = false"
47
58
  />
@@ -54,6 +65,8 @@ import { changeBridge } from '#imports';
54
65
  import pkg from '../../package.json';
55
66
  const dialogSignOut = ref(false);
56
67
  const dataStore = useDataStore();
68
+ const router = useRouter();
69
+ const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION ?? '');
57
70
 
58
71
  const handleFontSize = (action: 'increase' | 'decrease') => {
59
72
  if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
@@ -70,13 +83,13 @@ const logoutUser = async () => {
70
83
  await dataStore.logoutUser();
71
84
  };
72
85
 
73
- const isProduction = import.meta.env.VITE_MODE === 'production';
74
-
75
86
  const hasHistory = computed(() => {
76
- return !dataStore.isLKA;
87
+ return !dataStore.isLKA && !dataStore.isLKA_A;
77
88
  });
78
89
 
90
+ const hasFAQ = computed(() => router.hasRoute('FAQ') && !dataStore.isAULETTI && !dataStore.isAulettiParent);
91
+
79
92
  const openHistory = async () => {
80
- dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge ? '' : dataStore.product);
93
+ dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge || dataStore.isDSO || dataStore.isUU ? '' : dataStore.product);
81
94
  };
82
95
  </script>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <v-menu
3
+ v-if="options && options.length && options.filter(i => (typeof i.show === 'boolean' ? i.show : true)).length"
4
+ open-on-click
5
+ activator="parent"
6
+ :close-on-content-click="false"
7
+ transition="scale-transition"
8
+ >
9
+ <base-form-text-section class="p-1 border-[1px] flex flex-col gap-3 elevation-3 w-[250px]">
10
+ <v-list lines="two" density="compact" class="!p-0">
11
+ <v-list-item v-for="(option, index) of options.filter(i => (typeof i.show === 'boolean' ? i.show : true))" :key="index" class="!px-3">
12
+ <v-list-item-title :class="[$styles.greenText]">{{ option.title }}</v-list-item-title>
13
+ <v-list-item-subtitle class="!opacity-50">{{ option.description }}</v-list-item-subtitle>
14
+ <template v-slot:append>
15
+ <v-btn color="#faae17" :icon="option.icon ? option.icon : 'mdi-content-copy'" variant="text" size="small" @click="$emit('clicked', option.title)"></v-btn>
16
+ </template>
17
+ </v-list-item>
18
+ </v-list>
19
+ </base-form-text-section>
20
+ </v-menu>
21
+ </template>
22
+
23
+ <script lang="ts">
24
+ import { MenuItem } from '../../composables/classes';
25
+
26
+ export default defineComponent({
27
+ emits: ['clicked'],
28
+ props: {
29
+ options: {
30
+ type: Array as PropType<Array<MenuItem>>,
31
+ default: [],
32
+ },
33
+ },
34
+ });
35
+ </script>
@@ -6,7 +6,10 @@
6
6
  :has-back="hasBack"
7
7
  :back-icon="backIcon"
8
8
  :has-more="hasMore"
9
- :hide-more-on-lg="hideOnLg"
9
+ :has-info="hasInfo"
10
+ :info-icon="infoIcon"
11
+ :info-items="infoItems"
12
+ :hide-more-on-lg="false"
10
13
  :more-icon="moreIcon"
11
14
  @onBack="$emit('onBack')"
12
15
  @onMore="$emit('onMore')"
@@ -47,12 +50,19 @@
47
50
  </div></div
48
51
  ></base-fade-transition>
49
52
  </section>
53
+ <base-text-block
54
+ v-if="$dataStore.showDisabledMessage"
55
+ class="opacity-70 absolute bottom-6 left-0 right-0 ml-auto mr-auto z-[100]"
56
+ :class="[$styles.redBorder]"
57
+ :icon="{ mdi: 'mdi-alert-circle-outline', color: '#FD2D39' }"
58
+ :text="$dataStore.t('toaster.viewError')"
59
+ />
50
60
  </aside>
51
61
  </template>
52
62
 
53
63
  <script lang="ts">
54
64
  import { MenuItem } from '../../composables/classes';
55
- import { RouteLocationNormalized } from 'vue-router';
65
+ import { type RouteLocationNormalized } from 'vue-router';
56
66
 
57
67
  export default defineComponent({
58
68
  props: {
@@ -68,6 +78,18 @@ export default defineComponent({
68
78
  type: Boolean,
69
79
  default: false,
70
80
  },
81
+ hasInfo: {
82
+ type: Boolean,
83
+ default: false,
84
+ },
85
+ infoIcon: {
86
+ type: String,
87
+ default: '',
88
+ },
89
+ infoItems: {
90
+ type: Array as PropType<Array<MenuItem>>,
91
+ default: [],
92
+ },
71
93
  backIcon: {
72
94
  type: String,
73
95
  default: 'mdi-arrow-left',
@@ -78,7 +100,7 @@ export default defineComponent({
78
100
  },
79
101
  moreIcon: {
80
102
  type: String,
81
- default: 'mdi-cog-outline',
103
+ default: 'mdi-dots-vertical',
82
104
  },
83
105
  },
84
106
  emits: ['onLink', 'onBack', 'onMore', 'clicked'],