hl-core 0.0.9-beta.4 → 0.0.9-beta.40

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 (61) hide show
  1. package/api/base.api.ts +904 -0
  2. package/api/index.ts +2 -620
  3. package/api/interceptors.ts +58 -14
  4. package/components/Button/Btn.vue +2 -2
  5. package/components/Complex/MessageBlock.vue +2 -2
  6. package/components/Complex/Page.vue +1 -1
  7. package/components/Dialog/Dialog.vue +60 -15
  8. package/components/Form/DynamicForm.vue +100 -0
  9. package/components/Form/FormBlock.vue +12 -3
  10. package/components/Form/FormData.vue +114 -0
  11. package/components/Form/FormToggle.vue +9 -3
  12. package/components/Form/ManagerAttachment.vue +150 -86
  13. package/components/Form/ProductConditionsBlock.vue +59 -6
  14. package/components/Input/Datepicker.vue +1 -8
  15. package/components/Input/DynamicInput.vue +23 -0
  16. package/components/Input/FileInput.vue +16 -4
  17. package/components/Input/FormInput.vue +1 -3
  18. package/components/Input/Monthpicker.vue +33 -0
  19. package/components/Input/PanelInput.vue +5 -1
  20. package/components/Input/RoundedEmptyField.vue +5 -0
  21. package/components/Input/RoundedSelect.vue +13 -0
  22. package/components/Input/SwitchInput.vue +64 -0
  23. package/components/Input/TextInput.vue +161 -0
  24. package/components/Layout/Drawer.vue +17 -4
  25. package/components/Layout/Header.vue +23 -2
  26. package/components/Layout/SettingsPanel.vue +13 -7
  27. package/components/Menu/InfoMenu.vue +35 -0
  28. package/components/Menu/MenuNav.vue +17 -2
  29. package/components/Pages/Anketa.vue +140 -52
  30. package/components/Pages/Auth.vue +12 -1
  31. package/components/Pages/ContragentForm.vue +129 -50
  32. package/components/Pages/Documents.vue +72 -7
  33. package/components/Pages/InvoiceInfo.vue +1 -1
  34. package/components/Pages/MemberForm.vue +269 -96
  35. package/components/Pages/ProductAgreement.vue +1 -8
  36. package/components/Pages/ProductConditions.vue +798 -168
  37. package/components/Panel/PanelHandler.vue +373 -45
  38. package/components/Panel/PanelSelectItem.vue +17 -2
  39. package/components/Panel/RightPanelCloser.vue +7 -0
  40. package/components/Transitions/Animation.vue +28 -0
  41. package/composables/axios.ts +2 -1
  42. package/composables/classes.ts +415 -8
  43. package/composables/constants.ts +65 -2
  44. package/composables/fields.ts +291 -0
  45. package/composables/index.ts +58 -5
  46. package/composables/styles.ts +22 -10
  47. package/layouts/default.vue +48 -3
  48. package/locales/ru.json +460 -12
  49. package/nuxt.config.ts +1 -1
  50. package/package.json +25 -22
  51. package/pages/Token.vue +1 -12
  52. package/plugins/helperFunctionsPlugins.ts +0 -3
  53. package/plugins/vuetifyPlugin.ts +2 -0
  54. package/store/data.store.ts +1031 -224
  55. package/store/extractStore.ts +17 -0
  56. package/store/form.store.ts +13 -1
  57. package/store/member.store.ts +1 -1
  58. package/store/rules.ts +53 -5
  59. package/types/enum.ts +37 -0
  60. package/types/form.ts +94 -0
  61. package/types/index.ts +216 -20
@@ -2,6 +2,8 @@ import { Actions, PostActions, Roles, Statuses } from '../types/enum';
2
2
 
3
3
  export const constants = Object.freeze({
4
4
  products: {
5
+ // TODO remove this after PA will be ready
6
+ pensionannuity: import.meta.env.VITE_MODE === 'production' ? 0 : 1,
5
7
  baiterek: 3,
6
8
  halykmycar: 5,
7
9
  lifetrip: 7,
@@ -9,27 +11,39 @@ export const constants = Object.freeze({
9
11
  liferenta: 9,
10
12
  gons: 10,
11
13
  halykkazyna: 11,
14
+ daskamkorlyk: 13,
12
15
  lifebusiness: 14,
16
+ amuletlife: 15,
13
17
  },
14
18
  amlProducts: {
15
19
  checkcontragent: 1,
16
20
  checkcontract: 2,
17
21
  },
18
- editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm],
22
+ extractedProducts: ['dso', 'uu'],
23
+ editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm, Statuses.InputDataForm],
19
24
  documentsLinkVisibleStatuses: [
20
25
  Statuses.DocumentsSignedFrom,
26
+ Statuses.DocumentsSignedClientFrom,
21
27
  Statuses.UnderwriterForm,
22
28
  Statuses.AffilationResolutionForm,
23
29
  Statuses.Completed,
24
30
  Statuses.InsurancePremiumOnlinePaid,
25
31
  ],
26
- returnStatementStatuses: [Statuses.DocumentsSignedFrom, Statuses.ContractSignedFrom, Statuses.WaitingInsurancePremiumForm, Statuses.UnderwriterForm],
32
+ returnStatementStatuses: [
33
+ Statuses.DocumentsSignedFrom,
34
+ Statuses.DocumentsSignedClientFrom,
35
+ Statuses.ContractSignedFrom,
36
+ Statuses.WaitingInsurancePremiumForm,
37
+ Statuses.UnderwriterForm,
38
+ Statuses.ApproveForm,
39
+ ],
27
40
  cancelApplicationStatuses: [
28
41
  Statuses.StartForm,
29
42
  Statuses.EditForm,
30
43
  Statuses.EditBeneficiaryForm,
31
44
  Statuses.WaitingInsurancePremiumForm,
32
45
  Statuses.DocumentsSignedFrom,
46
+ Statuses.DocumentsSignedClientFrom,
33
47
  Statuses.ContractSignedFrom,
34
48
  ],
35
49
  gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
@@ -42,4 +56,53 @@ export const constants = Object.freeze({
42
56
  kzt: '₸',
43
57
  usd: '$',
44
58
  },
59
+ documentTypes: {
60
+ statement: 5,
61
+ contract: 6,
62
+ underConclusion: 12,
63
+ complianceFinMonitoring: 14,
64
+ agreement: 19,
65
+ acceptLetter: 22,
66
+ rejectLetter: 23,
67
+ application1: 33,
68
+ insuredsList: 34,
69
+ questionnaireInsured: 35,
70
+ },
71
+ fixInsAmount: [
72
+ {
73
+ code: '500000',
74
+ id: '1',
75
+ nameKz: '500 000',
76
+ nameRu: '500 000',
77
+ ids: '',
78
+ },
79
+ {
80
+ code: '1000000',
81
+ id: '2',
82
+ nameKz: '1 000 000',
83
+ nameRu: '1 000 000',
84
+ ids: '',
85
+ },
86
+ {
87
+ code: '1500000',
88
+ id: '3',
89
+ nameKz: '1 500 000',
90
+ nameRu: '1 500 000',
91
+ ids: '',
92
+ },
93
+ {
94
+ code: '2000000',
95
+ id: '4',
96
+ nameKz: '2 000 000',
97
+ nameRu: '2 000 000',
98
+ ids: '',
99
+ },
100
+ {
101
+ code: '2500000',
102
+ id: '5',
103
+ nameKz: '2 500 000',
104
+ nameRu: '2 500 000',
105
+ ids: '',
106
+ },
107
+ ],
45
108
  });
@@ -0,0 +1,291 @@
1
+ import { i18n } from '../configs/i18n';
2
+ import { FieldTypes } from '../types/form';
3
+ import { ComputedRefWithControl } from '@vueuse/core';
4
+
5
+ const t = i18n.t;
6
+
7
+ export const FieldBase = ({
8
+ label = '',
9
+ placeholder = '',
10
+ readonly = false,
11
+ disabled = false,
12
+ modelValue = null,
13
+ iconName = null,
14
+ rules = [],
15
+ maxLength = null,
16
+ clearable = true,
17
+ hint = undefined,
18
+ suffix = null,
19
+ maska = null,
20
+ key = '',
21
+ fetchFrom = null,
22
+ }: InputBase): InputBase =>
23
+ ({
24
+ label,
25
+ placeholder,
26
+ readonly,
27
+ disabled,
28
+ modelValue,
29
+ iconName,
30
+ rules,
31
+ maxLength,
32
+ clearable,
33
+ hint,
34
+ suffix,
35
+ maska,
36
+ key,
37
+ fetchFrom,
38
+ } as InputBase);
39
+
40
+ export const TextInput = ({ ...rest }: Partial<TextInput>): TextInput => {
41
+ return {
42
+ ...FieldBase(rest),
43
+ type: FieldTypes.TEXT,
44
+ };
45
+ };
46
+
47
+ export const SwitchInput = ({ ...rest }: Partial<SwitchInput>): SwitchInput => {
48
+ return {
49
+ ...FieldBase(rest),
50
+ type: FieldTypes.SWITCH,
51
+ direction: 'horizontal',
52
+ trueValue: null,
53
+ falseValue: null,
54
+ labeling: false,
55
+ };
56
+ };
57
+
58
+ export const NumberInput = ({ ...rest }: Partial<NumberInput>): NumberInput => {
59
+ return {
60
+ ...FieldBase(rest),
61
+ type: FieldTypes.NUMBER,
62
+ };
63
+ };
64
+
65
+ export const dynamic = <T>(obj: T, key: keyof T) => {
66
+ return computed({
67
+ get: () => {
68
+ const value = obj[key];
69
+ if (typeof value === 'object' && value) {
70
+ if ('nameRu' in value) return value.nameRu as any;
71
+ }
72
+ return value;
73
+ },
74
+ set: (val: any) => {
75
+ obj[key] = val;
76
+ },
77
+ });
78
+ };
79
+
80
+ type PersonalDataKeys = 'iin' | 'phoneNumber' | 'lastName' | 'firstName' | 'middleName' | 'citizenship' | 'position' | 'email' | 'gender';
81
+ type PersonalData = Record<PersonalDataKeys, InputType>;
82
+
83
+ type AddressesKeys = 'country' | 'province' | 'regionType' | 'city' | 'quarter' | 'microDistrict' | 'street' | 'houseNumber';
84
+ type Address = Record<AddressesKeys, InputType>;
85
+
86
+ type RepeatedFields = {
87
+ personalData: PersonalData;
88
+ address: Address;
89
+ };
90
+
91
+ export const RepeatedFields: RepeatedFields = {
92
+ personalData: {
93
+ iin: TextInput({
94
+ label: t('form.iin'),
95
+ maska: 'iin',
96
+ }),
97
+ phoneNumber: TextInput({
98
+ label: t('form.phoneNumber'),
99
+ maska: 'phone',
100
+ }),
101
+ lastName: TextInput({
102
+ label: t('form.lastName'),
103
+ }),
104
+ firstName: TextInput({
105
+ label: t('form.firstName'),
106
+ }),
107
+ middleName: TextInput({
108
+ label: t('form.middleName'),
109
+ }),
110
+ citizenship: TextInput({
111
+ label: t('clients.form.citizenship'),
112
+ iconName: 'arrowRight',
113
+ fetchFrom: 'getCountries',
114
+ }),
115
+ position: TextInput({
116
+ label: t('clients.form.namePosition'),
117
+ }),
118
+ email: TextInput({
119
+ label: t('form.email'),
120
+ }),
121
+ gender: TextInput({
122
+ label: t('form.gender'),
123
+ }),
124
+ },
125
+ address: {
126
+ country: TextInput({
127
+ label: t('form.Country'),
128
+ iconName: 'arrowRight',
129
+ fetchFrom: 'getCountries',
130
+ }),
131
+ province: TextInput({
132
+ label: t('form.Province'),
133
+ iconName: 'arrowRight',
134
+ fetchFrom: 'getStates',
135
+ }),
136
+ regionType: TextInput({
137
+ label: t('form.RegionType'),
138
+ iconName: 'arrowRight',
139
+ fetchFrom: 'getLocalityTypes',
140
+ }),
141
+ city: TextInput({
142
+ label: t('form.City'),
143
+ iconName: 'arrowRight',
144
+ fetchFrom: 'getCities',
145
+ }),
146
+ quarter: TextInput({
147
+ label: t('form.Quarter'),
148
+ }),
149
+ microDistrict: TextInput({
150
+ label: t('form.MicroDistrict'),
151
+ }),
152
+ street: TextInput({
153
+ label: t('form.Street'),
154
+ }),
155
+ houseNumber: TextInput({
156
+ label: t('form.NumberHouse'),
157
+ }),
158
+ },
159
+ };
160
+
161
+ export class BaseFields {
162
+ public mutatedList: InputType[] = [];
163
+ public fieldsLength: number = 0;
164
+
165
+ init<T extends keyof RepeatedFields>(sectionName: T, fieldsOrder?: (keyof RepeatedFields[T])[] | null, excludeFields?: (keyof RepeatedFields[T])[] | null): InputType[] {
166
+ const inputsWithDefinedKey = Object.entries(RepeatedFields[sectionName]).map(([key, field]: [string, InputType]) => {
167
+ return { ...field, key };
168
+ });
169
+
170
+ const originalFields = Object.values(RepeatedFields[sectionName]);
171
+
172
+ if (fieldsOrder && !excludeFields) {
173
+ this.fieldsLength = fieldsOrder.length;
174
+ return inputsWithDefinedKey
175
+ .filter((field: InputType) => fieldsOrder.includes(field.key))
176
+ .sort((a: InputType, b: InputType) => {
177
+ return fieldsOrder.indexOf(a.key) - fieldsOrder.indexOf(b.key);
178
+ });
179
+ }
180
+
181
+ if (!fieldsOrder && excludeFields) {
182
+ this.fieldsLength = originalFields.length - excludeFields.length;
183
+ return inputsWithDefinedKey.filter((field: InputType) => !excludeFields.includes(field.key));
184
+ }
185
+
186
+ this.fieldsLength = originalFields.length;
187
+ return originalFields;
188
+ }
189
+
190
+ setModels(modelList: any[]) {
191
+ if (modelList.length !== this.fieldsLength) {
192
+ throw new Error('Invalid v-models');
193
+ } else {
194
+ return this.mutatedList.map((field: InputType, index: number) => {
195
+ return { ...field, modelValue: modelList[index] };
196
+ });
197
+ }
198
+ }
199
+
200
+ getFields<T extends keyof RepeatedFields>(sectionName: T, fieldsOrder?: (keyof RepeatedFields[T])[] | null, excludeFields?: (keyof RepeatedFields[T])[] | null): this {
201
+ this.mutatedList = this.init(sectionName, fieldsOrder, excludeFields);
202
+ return this;
203
+ }
204
+ }
205
+
206
+ export class FormBlockLabel {
207
+ text: string;
208
+ size: LabelSize = 1;
209
+ hideOnMobile: boolean = false;
210
+ constructor(options: { text: string; size?: LabelSize; hideOnMobile?: boolean }) {
211
+ this.text = options.text;
212
+ if (typeof options.size === 'number') this.size = options.size;
213
+ if (typeof options.hideOnMobile === 'boolean') this.hideOnMobile = options.hideOnMobile;
214
+ }
215
+ }
216
+
217
+ export class FormBlock {
218
+ title: string;
219
+ subtitle?: string;
220
+ noValueText?: string;
221
+ headerBtn?: {
222
+ text: string;
223
+ action: () => void;
224
+ };
225
+ labels: FormBlockLabel[];
226
+ data: ComputedRefWithControl<any> | string[][];
227
+ shrinkLabels: boolean = true;
228
+ disabled: ComputedRef;
229
+ show: ComputedRef;
230
+ btn: {
231
+ icon: string;
232
+ showBtn: ComputedRef;
233
+ action: ({ value, index }: { value: any; index: number }) => void;
234
+ };
235
+ constructor(options: {
236
+ title: string;
237
+ subtitle?: string;
238
+ noValueText?: string;
239
+ headerBtn?: { text: string; action: () => void };
240
+ labels: FormBlockLabel[];
241
+ data: ComputedRefWithControl<any> | string[][];
242
+ shrinkLabels?: boolean;
243
+ disabled?: ComputedRef;
244
+ show?: ComputedRef;
245
+ btn?: { icon?: string; showBtn?: ComputedRef; action: ({ value, index }: { value: any; index: number }) => void };
246
+ }) {
247
+ this.title = options.title;
248
+ if (typeof options.subtitle === 'string') this.subtitle = options.subtitle;
249
+ if (typeof options.noValueText === 'string') this.noValueText = options.noValueText;
250
+ else this.noValueText = t('clients.necessaryFillForm');
251
+ this.labels = options.labels;
252
+ this.data = options.data;
253
+ if (typeof options.shrinkLabels === 'boolean') this.shrinkLabels = options.shrinkLabels;
254
+ if (options.disabled !== undefined) this.disabled = options.disabled;
255
+ else this.disabled = computed(() => false);
256
+ if (options.show !== undefined) this.show = options.show;
257
+ else this.show = computed(() => true);
258
+ if (typeof options.headerBtn === 'object') this.headerBtn = options.headerBtn;
259
+ if (typeof options.btn === 'object') {
260
+ this.btn = { icon: options.btn.icon ?? 'mdi-dots-vertical', showBtn: options.btn.showBtn ?? computed(() => true), action: options.btn.action };
261
+ } else this.btn = { icon: 'mdi-dots-vertical', showBtn: computed(() => true), action: () => {} };
262
+ }
263
+ }
264
+
265
+ export const getFormDataFrom = <T>(
266
+ data: T | T[],
267
+ keys: Array<keyof T>,
268
+ modifiers?: {
269
+ [key in keyof T]?: (val: any) => any;
270
+ },
271
+ ) => {
272
+ const getValuesFromKeys = (member: T) => {
273
+ const each: any[] = [];
274
+ keys.forEach(key => {
275
+ const data = member[key];
276
+ const value = data && typeof data === 'object' && 'nameRu' in data ? (data['nameRu'] as any) : data;
277
+ //@ts-ignore
278
+ each.push(modifiers && modifiers[key] ? modifiers[key](value ?? '') : value);
279
+ });
280
+ return each;
281
+ };
282
+ const getData = () => {
283
+ const result: any[][] = [];
284
+ Array.isArray(data) ? data.forEach(member => result.push(getValuesFromKeys(member))) : result.push(getValuesFromKeys(data));
285
+ return result;
286
+ };
287
+ return computedWithControl(
288
+ () => getData(),
289
+ () => getData(),
290
+ );
291
+ };
@@ -30,6 +30,7 @@ export class Masks {
30
30
  date: string = '##.##.####';
31
31
  post: string = '######';
32
32
  threeDigit: string = '###';
33
+ iik: string = 'KZ##################';
33
34
  }
34
35
 
35
36
  export const useMask = () => new Masks();
@@ -183,12 +184,13 @@ export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
183
184
 
184
185
  export const ErrorHandler = (err: unknown, errorText?: string) => {
185
186
  console.log(err);
187
+ const dataStore = useDataStore();
186
188
  if (err instanceof AxiosError) {
187
189
  if ('response' in err && err.response && err.response.data) {
188
190
  if ('status' in err.response && err.response.status === 403) {
189
- useDataStore().showToaster('error', useDataStore().t('toaster.noPermission'), 10000);
191
+ dataStore.showToaster('error', dataStore.t('toaster.noPermission'), 10000);
190
192
  } else if (err.response.data) {
191
- useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
193
+ dataStore.showToaster('error', errorText ? errorText : err.response.data, 10000);
192
194
  }
193
195
  }
194
196
  }
@@ -256,11 +258,62 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
256
258
  };
257
259
 
258
260
  export const changeBridge = async (toBridge: 'efo' | 'lka', token: string) => {
259
- const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
261
+ const bridgeUrl = ref<string>(import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string);
260
262
  if (!toBridge) return;
261
- if (!bridgeUrl || !token) {
263
+ if (!bridgeUrl.value || !token) {
262
264
  useDataStore().showToaster('error', `${useDataStore().t('toaster.noUrl')} [import.meta.env.VITE_${toBridge.toUpperCase()}_URL]`);
263
265
  return;
264
266
  }
265
- window.open(`${bridgeUrl}/#/Token?token=${token}`, '_blank');
267
+ const host = window.location.hostname;
268
+ if (toBridge === 'efo') {
269
+ if (host.startsWith('bpmsrv02') && bridgeUrl.value !== 'http://bpmsrv02:88') bridgeUrl.value = 'http://bpmsrv02:88';
270
+ if (host.startsWith('vega') && bridgeUrl.value !== 'http://vega:800') bridgeUrl.value = 'http://vega:800';
271
+ }
272
+ if (toBridge === 'lka') {
273
+ if (host.startsWith('bpmsrv02') && bridgeUrl.value !== 'http://bpmsrv02:890') bridgeUrl.value = 'http://bpmsrv02:890';
274
+ if (host.startsWith('vega') && bridgeUrl.value !== 'http://vega:890') bridgeUrl.value = 'http://vega:890';
275
+ }
276
+ window.open(`${bridgeUrl.value}/#/Token?token=${token}`, '_blank');
277
+ };
278
+
279
+ export const getFirstDayOfMonth = (year: number, month: number) => {
280
+ const date = new Date();
281
+ return new Date(year, month, 1, (date.getTimezoneOffset() / 60) * -1).toISOString();
282
+ };
283
+
284
+ export const getLastDayOfMonth = (year: number, month: number) => {
285
+ const date = new Date();
286
+ return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
287
+ };
288
+
289
+ type WhichValuePerEnv = 'qrGenUrl';
290
+
291
+ export const getValuePerEnv = (which: WhichValuePerEnv) => {
292
+ type Envs = Exclude<EnvModes, 'vercel'>;
293
+ const valuesPerEnv: {
294
+ [key in WhichValuePerEnv]: {
295
+ [key in Envs]: string;
296
+ };
297
+ } = {
298
+ qrGenUrl: {
299
+ production: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
300
+ development: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
301
+ test: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
302
+ },
303
+ };
304
+ return valuesPerEnv[which][useEnv().envMode as Envs];
305
+ };
306
+
307
+ export const getMainPageRoute = () => {
308
+ const dataStore = useDataStore();
309
+ if (dataStore.isEFO) {
310
+ return 'Insurance-Product';
311
+ }
312
+ if (dataStore.isLKA) {
313
+ return 'Menu';
314
+ }
315
+ if (dataStore.isAML) {
316
+ return 'Main';
317
+ }
318
+ return 'index';
266
319
  };
@@ -1,8 +1,8 @@
1
1
  export class Styles {
2
2
  // Base
3
- whiteBg: string = 'bg-white';
4
- whiteText: string = 'text-white';
5
- blackText: string = 'text-black';
3
+ whiteBg: string = 'bg-[#FFF]';
4
+ whiteText: string = '!text-[#FFF]';
5
+ blackText: string = '!text-[#000]';
6
6
  bodyBg: string = '!bg-[#F5F5F5]';
7
7
 
8
8
  whiteTextHover: string = 'hover:text-[#FFFFFF]';
@@ -11,7 +11,7 @@ export class Styles {
11
11
  blueBgHover: string = 'hover:bg-[#96abd6]';
12
12
  blueBgLight: string = 'bg-[#F3F6FC]';
13
13
  blueBgLightHover: string = 'hover:bg-[#f5f8fd]';
14
- blueText: string = 'text-[#A0B3D8]';
14
+ blueText: string = '!text-[#A0B3D8]';
15
15
  blueTextLight: string = 'text-[#F3F6FC]';
16
16
 
17
17
  // Green
@@ -23,13 +23,13 @@ export class Styles {
23
23
  greenBgLightHover: string = 'hover:bg-[#dbf0e4]';
24
24
 
25
25
  // Yellow
26
- yellowText: string = 'text-[#FAB31C]';
26
+ yellowText: string = '!text-[#FAB31C]';
27
27
  yellowBg: string = 'bg-[#FAB31C]';
28
28
  yellowBgHover: string = 'hover:bg-[#FAB31C]';
29
29
 
30
30
  // Grey
31
31
  greyBg: string = 'bg-[#B8B8B8]';
32
- greyText: string = 'text-[#B8B8B8]';
32
+ greyText: string = '!text-[#B8B8B8]';
33
33
  greyTextLight: string = 'text-[#B8B8B8]';
34
34
  greyIcon: string = 'text-[#DADADA]';
35
35
  greyIconBg: string = 'bg-[#DADADA]';
@@ -39,15 +39,22 @@ export class Styles {
39
39
  greyTextDark: string = 'text-[#9197A1]';
40
40
 
41
41
  // Red
42
- redText: string = 'text-[#FD2D39]';
42
+ redText: string = '!text-[#FD2D39]';
43
43
  redBg: string = 'bg-[#FF897D]';
44
44
  redBgHover: string = 'hover:bg-[#ff9b91]';
45
45
  // Error
46
46
  errorBg: string = 'bg-[#FF5449]';
47
- errorText: string = 'text-[#FF5449]';
47
+ errorText: string = '!text-[#FF5449]';
48
48
 
49
49
  // Border
50
50
  rounded: string = 'rounded-[8px]';
51
+ roundedT: string = 'rounded-t-[8px]';
52
+ roundedB: string = 'rounded-b-[8px]';
53
+ blueBorder: string = 'border-[1px] border-[#A0B3D8]';
54
+ blueLightBorder: string = 'border-[1px] border-[#F3F6FC]';
55
+ greenBorder: string = 'border-[1px] border-[#009C73]';
56
+ redBorder: string = 'border-[1px] border-[#FD2D39]';
57
+ yellowBorder: string = 'border-[1px] border-[#FAB31C]';
51
58
 
52
59
  // Text
53
60
  textSimple: string = 'text-[14px] leading-5';
@@ -63,6 +70,8 @@ export class Styles {
63
70
  redBtn: string;
64
71
  yellowBtn: string;
65
72
  whiteBtn: string;
73
+ whiteBorderBtn: string;
74
+ whiteBtnBlueBr: string;
66
75
  blueLightBtn: string;
67
76
  greenLightBtn: string;
68
77
 
@@ -70,9 +79,10 @@ export class Styles {
70
79
  flexColNav: string;
71
80
  emptyBlockCol: string;
72
81
  scrollPage: string;
82
+ flexCenter: string = 'flex items-center justify-center';
73
83
 
74
84
  // Muted or disabled
75
- mutedText: string = 'text-[#99A3B3]';
85
+ mutedText: string = '!text-[#99A3B3]';
76
86
  disabled: string = 'cursor-not-allowed opacity-50';
77
87
 
78
88
  constructor() {
@@ -81,14 +91,16 @@ export class Styles {
81
91
  this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
82
92
  this.yellowBtn = `${this.yellowBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.yellowBgHover}`;
83
93
  this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
94
+ this.whiteBtnBlueBr = `${this.whiteBg} ${this.blueText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover} ${this.blueBorder}`;
84
95
  this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
96
+ this.whiteBorderBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover} border-[#A0B3D8] border-[1px]`;
85
97
  this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
86
98
  this.greenLightBtn = `${this.greenBgLight} ${this.greenText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgLightHover}`;
87
99
 
88
100
  // Complex
89
101
  this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
90
102
  this.emptyBlockCol = 'w-[60px] sm:w-[100px] h-[30%] rounded-[8px] bg-[#f5f5f5]';
91
- this.scrollPage = 'max-h-[90vh] overflow-y-scroll';
103
+ this.scrollPage = 'max-h-[85svh] overflow-y-scroll';
92
104
  }
93
105
  }
94
106
 
@@ -1,15 +1,18 @@
1
1
  <template>
2
2
  <div class="h-full z-[1]" :class="[$dataStore.hasLayoutMargins ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl' : '']">
3
3
  <div :class="[$styles.greenBg]" class="hidden z-[-1] lg:block absolute left-0 top-0 h-[200px] w-full"></div>
4
- <section class="flex h-full" :class="$styles.blueBgLight">
4
+ <section class="flex h-full relative" :class="$styles.blueBgLight">
5
5
  <base-menu-nav
6
6
  v-if="$dataStore.showNav"
7
7
  :selected="$dataStore.menu.selectedItem"
8
8
  :title="$dataStore.menu.title ?? 'Страховые продукты'"
9
9
  :has-back="$dataStore.menu.hasBack ?? false"
10
10
  :back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
11
- :more-icon="$dataStore.menu.moreIcon ?? 'mdi-cog-outline'"
12
- :has-more="'hasMore' in $route.meta && $route.meta.hasMore ? !!$route.meta.hasMore : false"
11
+ :more-icon="$dataStore.menu.moreIcon ?? 'mdi-dots-vertical'"
12
+ :has-more="'hasMore' in $route.meta ? !!$route.meta.hasMore : true"
13
+ :has-info="$dataStore.menu.hasInfo"
14
+ :info-icon="$dataStore.menu.infoIcon"
15
+ :info-items="$dataStore.menu.infoItems"
13
16
  :class="{
14
17
  // @ts-ignore
15
18
  '!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
@@ -23,6 +26,7 @@
23
26
  </template>
24
27
  </base-menu-nav>
25
28
  <slot></slot>
29
+ <base-drawer which-panel="rightPanel" :panel-title="$dataStore.rightPanel.title" side="right" />
26
30
  <base-settings-panel />
27
31
  </section>
28
32
  </div>
@@ -44,6 +48,44 @@ const onLink = async (item: MenuItem) => {
44
48
  const onBack = async (item: MenuItem) => {
45
49
  if (dataStore.menu.onBack) await dataStore.menu.onBack(item);
46
50
  };
51
+
52
+ watch(
53
+ () => dataStore.settings.open,
54
+ () => {
55
+ if (dataStore.settings.open === true && dataStore.panel.open === true) {
56
+ dataStore.panel.open = false;
57
+ dataStore.panelAction = null;
58
+ }
59
+ if (dataStore.settings.open === true && dataStore.rightPanel.open === true) {
60
+ dataStore.rightPanel.open = false;
61
+ }
62
+ },
63
+ );
64
+
65
+ watch(
66
+ () => dataStore.rightPanel.open,
67
+ () => {
68
+ if (dataStore.rightPanel.open === true && dataStore.panel.open === true) {
69
+ dataStore.panel.open = false;
70
+ dataStore.panelAction = null;
71
+ }
72
+ if (dataStore.rightPanel.open === true && dataStore.settings.open === true) {
73
+ dataStore.settings.open = false;
74
+ }
75
+ },
76
+ );
77
+
78
+ watch(
79
+ () => dataStore.panel.open,
80
+ () => {
81
+ if (dataStore.panel.open === true && dataStore.settings.open === true) {
82
+ dataStore.settings.open = false;
83
+ }
84
+ if (dataStore.panel.open === true && dataStore.rightPanel.open === true) {
85
+ dataStore.rightPanel.open = false;
86
+ }
87
+ },
88
+ );
47
89
  </script>
48
90
  <style>
49
91
  .mainpage,
@@ -72,4 +114,7 @@ label .v-label .v-field-label,
72
114
  /* line-height: v-bind('dataStore.fontSize*1 + "px"') !important; */
73
115
  padding-bottom: 3px;
74
116
  }
117
+ .v-card {
118
+ border-radius: 8px !important;
119
+ }
75
120
  </style>