hl-core 0.0.9-beta.5 → 0.0.9-beta.51

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 (63) hide show
  1. package/api/base.api.ts +1042 -0
  2. package/api/index.ts +2 -620
  3. package/api/interceptors.ts +53 -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 +110 -0
  11. package/components/Form/FormSection.vue +3 -3
  12. package/components/Form/FormToggle.vue +25 -5
  13. package/components/Form/ManagerAttachment.vue +150 -86
  14. package/components/Form/ProductConditionsBlock.vue +59 -6
  15. package/components/Input/Datepicker.vue +43 -7
  16. package/components/Input/DynamicInput.vue +23 -0
  17. package/components/Input/FileInput.vue +25 -5
  18. package/components/Input/FormInput.vue +7 -4
  19. package/components/Input/Monthpicker.vue +34 -0
  20. package/components/Input/PanelInput.vue +5 -1
  21. package/components/Input/RoundedEmptyField.vue +5 -0
  22. package/components/Input/RoundedSelect.vue +18 -0
  23. package/components/Input/SwitchInput.vue +64 -0
  24. package/components/Input/TextInput.vue +160 -0
  25. package/components/Layout/Drawer.vue +17 -4
  26. package/components/Layout/Header.vue +23 -2
  27. package/components/Layout/Loader.vue +1 -1
  28. package/components/Layout/SettingsPanel.vue +13 -7
  29. package/components/Menu/InfoMenu.vue +35 -0
  30. package/components/Menu/MenuNav.vue +17 -2
  31. package/components/Pages/Anketa.vue +140 -52
  32. package/components/Pages/Auth.vue +50 -9
  33. package/components/Pages/ContragentForm.vue +124 -50
  34. package/components/Pages/Documents.vue +179 -29
  35. package/components/Pages/InvoiceInfo.vue +1 -1
  36. package/components/Pages/MemberForm.vue +605 -116
  37. package/components/Pages/ProductAgreement.vue +1 -8
  38. package/components/Pages/ProductConditions.vue +1055 -183
  39. package/components/Panel/PanelHandler.vue +583 -46
  40. package/components/Panel/PanelSelectItem.vue +17 -2
  41. package/components/Panel/RightPanelCloser.vue +7 -0
  42. package/components/Transitions/Animation.vue +28 -0
  43. package/components/Utilities/Qr.vue +44 -0
  44. package/composables/axios.ts +1 -0
  45. package/composables/classes.ts +456 -8
  46. package/composables/constants.ts +114 -2
  47. package/composables/fields.ts +328 -0
  48. package/composables/index.ts +270 -19
  49. package/composables/styles.ts +29 -16
  50. package/layouts/default.vue +48 -3
  51. package/locales/ru.json +547 -14
  52. package/package.json +28 -24
  53. package/pages/Token.vue +1 -12
  54. package/plugins/vuetifyPlugin.ts +2 -0
  55. package/store/data.store.ts +1463 -275
  56. package/store/extractStore.ts +17 -0
  57. package/store/form.store.ts +13 -1
  58. package/store/member.store.ts +1 -1
  59. package/store/rules.ts +83 -5
  60. package/types/enum.ts +61 -0
  61. package/types/env.d.ts +1 -0
  62. package/types/form.ts +94 -0
  63. package/types/index.ts +259 -23
@@ -2,22 +2,14 @@ import { useDisplay } from 'vuetify';
2
2
  import jwt_decode from 'jwt-decode';
3
3
  import { XMLParser } from 'fast-xml-parser';
4
4
  import { AxiosError } from 'axios';
5
-
6
- export const getBaseCredentials = () => {
7
- return {
8
- production: { login: '', password: '' },
9
- test: { login: '', password: '' },
10
- development: { login: 'manager', password: 'asdqwe123' },
11
- vercel: { login: '', password: 'asdqwe123' },
12
- };
13
- };
5
+ import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
+ import { PolicyholderClass } from '../composables/classes';
14
7
 
15
8
  export const useEnv = () => {
16
9
  return {
17
10
  envMode: import.meta.env.VITE_MODE,
18
11
  isDev: import.meta.env.VITE_MODE === 'development',
19
12
  isTest: import.meta.env.VITE_MODE === 'test',
20
- isVercel: import.meta.env.VITE_MODE === 'vercel',
21
13
  isProduction: import.meta.env.VITE_MODE === 'production',
22
14
  };
23
15
  };
@@ -30,6 +22,7 @@ export class Masks {
30
22
  date: string = '##.##.####';
31
23
  post: string = '######';
32
24
  threeDigit: string = '###';
25
+ iik: string = 'KZXXXXXXXXXXXXXXXXXX';
33
26
  }
34
27
 
35
28
  export const useMask = () => new Masks();
@@ -62,6 +55,18 @@ export const formatDate = (date: string) => {
62
55
  }
63
56
  };
64
57
 
58
+ export const formatToPlanDate = (date: string) => {
59
+ if (date) {
60
+ const data = date.split('.');
61
+ const day = data[0];
62
+ const month = data[1];
63
+ const year = data[2];
64
+ return `${year}-${month}-${day}`;
65
+ } else {
66
+ return null;
67
+ }
68
+ };
69
+
65
70
  export const reformatDate = (date: string) => {
66
71
  if (date) {
67
72
  const data = new Date(date);
@@ -183,18 +188,65 @@ export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
183
188
 
184
189
  export const ErrorHandler = (err: unknown, errorText?: string) => {
185
190
  console.log(err);
186
- if (err instanceof AxiosError) {
187
- if ('response' in err && err.response && err.response.data) {
188
- if ('status' in err.response && err.response.status === 403) {
189
- useDataStore().showToaster('error', useDataStore().t('toaster.noPermission'), 10000);
190
- } else if (err.response.data) {
191
- useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
191
+ if (useDataStore) {
192
+ const dataStore = useDataStore();
193
+ if (err instanceof AxiosError) {
194
+ if ('response' in err && err.response && err.response.data) {
195
+ if (err.response.data === Object(err.response.data) && 'errors' in err.response.data && 'title' in err.response.data && 'traceId' in err.response.data) {
196
+ Object.entries(err.response.data.errors).forEach(([field, errors]) => {
197
+ dataStore.showToaster('error', `Поле: ${field}. Ошибка: ${Array.isArray(errors) ? errors.join(', ') : errors}`, 10000);
198
+ });
199
+ } else {
200
+ dataStore.showToaster('error', errorText ? errorText : err.response.data, 10000);
201
+ }
192
202
  }
193
203
  }
194
204
  }
195
205
  return false;
196
206
  };
197
207
 
208
+ export const policyholderToBeneficialOwner = (isPolicyholderBeneficialOwner: boolean, policyholder?: PolicyholderClass) => {
209
+ const formStore = useFormStore();
210
+ const dataStore = useDataStore();
211
+ const beneficialOwner = formStore.lfb.beneficialOwners[0].beneficialOwnerData;
212
+ if (isPolicyholderBeneficialOwner && policyholder) {
213
+ beneficialOwner.iin = policyholder.clientData.authoritedPerson.iin;
214
+ beneficialOwner.firstName = policyholder.clientData.authoritedPerson.firstName;
215
+ beneficialOwner.middleName = policyholder.clientData.authoritedPerson.middleName;
216
+ beneficialOwner.lastName = policyholder.clientData.authoritedPerson.lastName;
217
+ beneficialOwner.citizenship = policyholder.clientData.authoritedPerson.citizenship;
218
+ beneficialOwner.birthDate = policyholder.clientData.authoritedPerson.birthDate;
219
+ beneficialOwner.gender = policyholder.clientData.authoritedPerson.gender;
220
+ beneficialOwner.resident = policyholder.clientData.resident;
221
+ beneficialOwner.taxResidentCountry = policyholder.clientData.taxResidentCountry;
222
+ beneficialOwner.economySectorCode = policyholder.clientData.economySectorCode;
223
+ beneficialOwner.identityDocument.issuedOn = policyholder.clientData.authoritedPerson.identityDocument.issuedOn;
224
+ beneficialOwner.identityDocument.documentNumber = policyholder.clientData.authoritedPerson.identityDocument.documentNumber;
225
+ beneficialOwner.identityDocument.documentType = policyholder.clientData.authoritedPerson.identityDocument.documentType;
226
+ beneficialOwner.identityDocument.issuedBy = policyholder.clientData.authoritedPerson.identityDocument.issuedBy;
227
+ beneficialOwner.identityDocument.validUntil = policyholder.clientData.authoritedPerson.identityDocument.validUntil;
228
+ beneficialOwner.identityDocument.series = policyholder.clientData.authoritedPerson.identityDocument.series;
229
+ dataStore.showToaster('warning', dataStore.t('toaster.formFieldEmptyWarning'));
230
+ } else {
231
+ beneficialOwner.iin = '';
232
+ beneficialOwner.firstName = '';
233
+ beneficialOwner.middleName = '';
234
+ beneficialOwner.lastName = '';
235
+ beneficialOwner.citizenship = new Value();
236
+ beneficialOwner.birthDate = '';
237
+ beneficialOwner.gender = new Value();
238
+ beneficialOwner.resident = new Value();
239
+ beneficialOwner.taxResidentCountry = new Value();
240
+ beneficialOwner.economySectorCode = new Value();
241
+ beneficialOwner.identityDocument.issuedOn = '';
242
+ beneficialOwner.identityDocument.documentNumber = '';
243
+ beneficialOwner.identityDocument.documentType = new Value();
244
+ beneficialOwner.identityDocument.issuedBy = new Value();
245
+ beneficialOwner.identityDocument.validUntil = '';
246
+ beneficialOwner.identityDocument.series = '';
247
+ }
248
+ };
249
+
198
250
  export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean) => {
199
251
  const formStore = useFormStore();
200
252
  const dataStore = useDataStore();
@@ -256,11 +308,210 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
256
308
  };
257
309
 
258
310
  export const changeBridge = async (toBridge: 'efo' | 'lka', token: string) => {
259
- const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
311
+ const bridgeUrl = ref<string>(import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string);
260
312
  if (!toBridge) return;
261
- if (!bridgeUrl || !token) {
313
+ if (!bridgeUrl.value || !token) {
262
314
  useDataStore().showToaster('error', `${useDataStore().t('toaster.noUrl')} [import.meta.env.VITE_${toBridge.toUpperCase()}_URL]`);
263
315
  return;
264
316
  }
265
- window.open(`${bridgeUrl}/#/Token?token=${token}`, '_blank');
317
+ const host = window.location.hostname;
318
+ if (toBridge === 'efo') {
319
+ if (host.startsWith('bpmsrv02') && bridgeUrl.value !== 'http://bpmsrv02:88') bridgeUrl.value = 'http://bpmsrv02:88';
320
+ if (host.startsWith('vega') && bridgeUrl.value !== 'http://vega:800') bridgeUrl.value = 'http://vega:800';
321
+ }
322
+ if (toBridge === 'lka') {
323
+ if (host.startsWith('bpmsrv02') && bridgeUrl.value !== 'http://bpmsrv02:890') bridgeUrl.value = 'http://bpmsrv02:890';
324
+ if (host.startsWith('vega') && bridgeUrl.value !== 'http://vega:890') bridgeUrl.value = 'http://vega:890';
325
+ }
326
+ window.open(`${bridgeUrl.value}/#/Token?token=${token}`, '_blank');
327
+ };
328
+
329
+ export const getFirstDayOfMonth = (year: number, month: number) => {
330
+ const date = new Date();
331
+ return new Date(year, month, 1, (date.getTimezoneOffset() / 60) * -1).toISOString();
332
+ };
333
+
334
+ export const getLastDayOfMonth = (year: number, month: number) => {
335
+ const date = new Date();
336
+ return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
337
+ };
338
+
339
+ type WhichValuePerEnv = 'qrGenUrl' | 'qrXmlGenUrl' | 'gatewayApiUrl' | 'gatewayApiUrlLocal' | 'baseApi' | 'baseApiLocal' | 'efoBaseApi' | 'efoBaseApiLocal' | 'amlBaseApi' | 'amlBaseApiLocal';
340
+
341
+ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
342
+ const valuesPerEnv: {
343
+ [key in WhichValuePerEnv]: {
344
+ [key in EnvModes]: string;
345
+ };
346
+ } = {
347
+ qrGenUrl: {
348
+ production: 'https://prod-sign.halyklife.kz/EgovQrCms',
349
+ development: 'https://test-sign.halyklife.kz/EgovQrCms',
350
+ test: 'https://test-sign.halyklife.kz/EgovQrCms',
351
+ },
352
+ qrXmlGenUrl: {
353
+ production: 'https://prod-sign.halyklife.kz/EgovQrXml',
354
+ development: 'https://test-sign.halyklife.kz/EgovQrXml',
355
+ test: 'https://test-sign.halyklife.kz/EgovQrXml',
356
+ },
357
+ gatewayApiUrl: {
358
+ production: 'https://products.halyklife.kz/gateway',
359
+ development: 'https://products.halyklife.kz/test/gateway',
360
+ test: 'https://products.halyklife.kz/test/gateway',
361
+ },
362
+ gatewayApiUrlLocal: {
363
+ production: 'http://products.halyklife.nb/gateway',
364
+ development: 'http://products.halyklife.nb/test/gateway',
365
+ test: 'http://products.halyklife.nb/test/gateway',
366
+ },
367
+ baseApi: {
368
+ production: 'https://products.halyklife.kz/api/v1/insis',
369
+ development: 'https://products.halyklife.kz/api/v1/test/insis',
370
+ test: 'https://products.halyklife.kz/api/v1/test/insis',
371
+ },
372
+ baseApiLocal: {
373
+ production: 'http://bpmsrv02.halyklife.nb',
374
+ development: 'http://vega:84',
375
+ test: 'http://vega:84',
376
+ },
377
+ efoBaseApi: {
378
+ production: 'https://products.halyklife.kz/efo/api',
379
+ development: 'https://products.halyklife.kz/test/efo/api',
380
+ test: 'https://products.halyklife.kz/test/efo/api',
381
+ },
382
+ efoBaseApiLocal: {
383
+ production: 'http://efo-prod.halyklife.nb/api',
384
+ development: 'http://efo-dev.halyklife.nb/api',
385
+ test: 'http://efo-dev.halyklife.nb/api',
386
+ },
387
+ amlBaseApi: {
388
+ production: 'https://products.halyklife.kz/aml/api',
389
+ development: 'https://products.halyklife.kz/test/aml/api',
390
+ test: 'https://products.halyklife.kz/test/aml/api',
391
+ },
392
+ amlBaseApiLocal: {
393
+ production: 'http://aml-prod.halyklife.nb/api',
394
+ development: 'http://aml-dev.halyklife.nb/api',
395
+ test: 'http://aml-dev.halyklife.nb/api',
396
+ },
397
+ };
398
+ return valuesPerEnv[which][import.meta.env.VITE_MODE];
399
+ };
400
+
401
+ export const getMainPageRoute = () => {
402
+ const dataStore = useDataStore();
403
+ if (dataStore.isEFO || dataStore.isAULETTI) {
404
+ return 'Insurance-Product';
405
+ }
406
+ if (dataStore.isLKA) {
407
+ return 'Menu';
408
+ }
409
+ if (dataStore.isAML) {
410
+ return 'Main';
411
+ }
412
+ return 'index';
413
+ };
414
+
415
+ export const keyDeleter = <T extends object>(data: T, keys: Array<NestedKeyOf<T>>) => {
416
+ if (typeof data === 'object' && !!data && keys && Array.isArray(keys) && keys.length) {
417
+ keys.forEach(key => {
418
+ if (key) {
419
+ if (String(key).includes('.')) {
420
+ const childKey = String(key).substring(0, String(key).indexOf('.'));
421
+ const keyChain = [String(key).substring(String(key).indexOf('.') + 1)];
422
+ // @ts-ignore
423
+ keyDeleter(data[childKey], keyChain);
424
+ } else {
425
+ //@ts-ignore
426
+ delete data[key];
427
+ }
428
+ }
429
+ });
430
+ }
431
+ };
432
+
433
+ export const formatDateProperty = (item: any, to: 'front' | 'back', additionalKeys?: string[]) => {
434
+ try {
435
+ if (item) {
436
+ Object.keys(item).forEach((key: string) => {
437
+ if (item[key] === Object(item[key])) {
438
+ formatDateProperty(item[key], to);
439
+ } else {
440
+ if (Array.isArray(additionalKeys)) {
441
+ additionalKeys.forEach(k => {
442
+ if (String(key).includes(k) && typeof item[key] === 'string' && !!item[key]) {
443
+ item[key] = to === 'front' ? reformatDate(item[key]) : formatDate(item[key])!.toISOString();
444
+ }
445
+ });
446
+ }
447
+ if ((String(key).includes('date') || String(key).includes('Date')) && typeof item[key] === 'string' && !!item[key]) {
448
+ item[key] = to === 'front' ? reformatDate(item[key]) : formatDate(item[key])!.toISOString();
449
+ }
450
+ }
451
+ });
452
+ }
453
+ } catch (err) {
454
+ console.log(err);
455
+ }
456
+ };
457
+
458
+ export const callDocumentReader = async (imageBase64: string | string[]) => {
459
+ if (!imageBase64) return false;
460
+ const dataStore = useDataStore();
461
+ try {
462
+ const api = new DocumentReaderApi({
463
+ basePath: `${getStrValuePerEnv('gatewayApiUrl')}/regulaforensics`,
464
+ baseOptions: { headers: { Authorization: `Bearer ${dataStore.accessToken}` } },
465
+ });
466
+ const result = await api.process({
467
+ images: Array.isArray(imageBase64) ? imageBase64 : [imageBase64],
468
+ processParam: { scenario: Scenario.FULL_PROCESS, doublePageSpread: true, measureSystem: 0 },
469
+ });
470
+ const documentName = ref<string | undefined>(undefined);
471
+ if (result.rawResponse && result.rawResponse.ContainerList) {
472
+ const dType = result.rawResponse.ContainerList.List.find(i => i.result_type === 9);
473
+ if (dType && 'OneCandidate' in dType && dType.OneCandidate && dType.OneCandidate.DocumentName) {
474
+ documentName.value = dType.OneCandidate.DocumentName;
475
+ }
476
+ }
477
+ if (result.text) {
478
+ const iin = result.text.getField(TextFieldType.PERSONAL_NUMBER);
479
+ const lastName = result.text.getField(TextFieldType.SURNAME, LCID.KAZAKH);
480
+ const firstName = result.text.getField(TextFieldType.GIVEN_NAMES_RUS, LCID.KAZAKH) ?? result.text.getField(TextFieldType.GIVEN_NAMES, LCID.KAZAKH);
481
+ const middleName = result.text.getField(TextFieldType.FATHERS_NAME_RUS, LCID.KAZAKH) ?? result.text.getField(TextFieldType.FATHERS_NAME, LCID.KAZAKH);
482
+ const fullName = result.text.getField(TextFieldType.SURNAME_AND_GIVEN_NAMES, LCID.KAZAKH);
483
+ const birthDate = result.text.getField(TextFieldType.DATE_OF_BIRTH);
484
+ const age = result.text.getField(TextFieldType.AGE);
485
+ const gender = result.text.getField(TextFieldType.SEX);
486
+ const documentNumber = result.text.getField(TextFieldType.DOCUMENT_NUMBER);
487
+ const documentIssuer = result.text.getField(TextFieldType.AUTHORITY_RUS) ?? result.text.getField(TextFieldType.AUTHORITY);
488
+ const documentIssueDate = result.text.getField(TextFieldType.DATE_OF_ISSUE);
489
+ const documentExpireDate = result.text.getField(TextFieldType.DATE_OF_EXPIRY);
490
+ const parsedDocument = {
491
+ iin: iin?.value,
492
+ lastName: lastName?.value,
493
+ firstName: firstName?.value,
494
+ middleName: middleName?.value,
495
+ fullName: fullName?.value,
496
+ birthDate: birthDate?.value,
497
+ age: age?.value,
498
+ gender: gender?.value,
499
+ documentName: documentName.value,
500
+ documentNumber: documentNumber?.value,
501
+ documentIssuer: documentIssuer?.value,
502
+ documentIssueDate: documentIssueDate?.value,
503
+ documentExpireDate: documentExpireDate?.value,
504
+ };
505
+ if (Object.values(parsedDocument).every(i => !i)) {
506
+ dataStore.showToaster('error', dataStore.t('toaster.notParsedDocument'));
507
+ return false;
508
+ }
509
+ return parsedDocument;
510
+ } else {
511
+ dataStore.showToaster('error', dataStore.t('toaster.notParsedDocument'));
512
+ }
513
+ return false;
514
+ } catch (err) {
515
+ return ErrorHandler(err);
516
+ }
266
517
  };
@@ -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,25 +11,25 @@ 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
18
- greenBg: string = 'bg-[#009C73]';
19
- greenBgHover: string = 'hover:bg-[#00a277]';
20
- greenBgLight: string = 'bg-[#EAF6EF]';
21
- greenText: string = '!text-[#009C73]';
22
- greenTextHover: string = 'hover:text-[#009C73]';
23
- greenBgLightHover: string = 'hover:bg-[#dbf0e4]';
18
+ greenBg: string = import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#DEBE8C]' : 'bg-[#009C73]';
19
+ greenBgHover: string = import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#C19B5F]' : 'hover:bg-[#00a277]';
20
+ greenBgLight: string = import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#e8d2af]' : 'bg-[#EAF6EF]';
21
+ greenText: string ='!text-[#009C73]';
22
+ greenTextHover: string ='hover:text-[#009C73]';
23
+ greenBgLightHover: string = import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'hover:bg-[#efdfc6]' : '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,23 @@ 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 =
56
+ import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'border-[1px] border-[#DEBE8C]' : 'border-[1px] border-[#009C73]';
57
+ redBorder: string = 'border-[1px] border-[#FD2D39]';
58
+ yellowBorder: string = 'border-[1px] border-[#FAB31C]';
51
59
 
52
60
  // Text
53
61
  textSimple: string = 'text-[14px] leading-5';
@@ -63,6 +71,8 @@ export class Styles {
63
71
  redBtn: string;
64
72
  yellowBtn: string;
65
73
  whiteBtn: string;
74
+ whiteBorderBtn: string;
75
+ whiteBtnBlueBr: string;
66
76
  blueLightBtn: string;
67
77
  greenLightBtn: string;
68
78
 
@@ -70,9 +80,10 @@ export class Styles {
70
80
  flexColNav: string;
71
81
  emptyBlockCol: string;
72
82
  scrollPage: string;
83
+ flexCenter: string = 'flex items-center justify-center';
73
84
 
74
85
  // Muted or disabled
75
- mutedText: string = 'text-[#99A3B3]';
86
+ mutedText: string = '!text-[#99A3B3]';
76
87
  disabled: string = 'cursor-not-allowed opacity-50';
77
88
 
78
89
  constructor() {
@@ -81,14 +92,16 @@ export class Styles {
81
92
  this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
82
93
  this.yellowBtn = `${this.yellowBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.yellowBgHover}`;
83
94
  this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
95
+ this.whiteBtnBlueBr = `${this.whiteBg} ${this.blueText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover} ${this.blueBorder}`;
84
96
  this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
97
+ this.whiteBorderBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover} border-[#A0B3D8] border-[1px]`;
85
98
  this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
86
99
  this.greenLightBtn = `${this.greenBgLight} ${this.greenText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgLightHover}`;
87
100
 
88
101
  // Complex
89
102
  this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
90
103
  this.emptyBlockCol = 'w-[60px] sm:w-[100px] h-[30%] rounded-[8px] bg-[#f5f5f5]';
91
- this.scrollPage = 'max-h-[90vh] overflow-y-scroll';
104
+ this.scrollPage = 'max-h-[85svh] overflow-y-scroll';
92
105
  }
93
106
  }
94
107
 
@@ -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>