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

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 +935 -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 +39 -8
  16. package/components/Input/DynamicInput.vue +23 -0
  17. package/components/Input/FileInput.vue +25 -5
  18. package/components/Input/FormInput.vue +2 -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 +13 -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 +42 -7
  33. package/components/Pages/ContragentForm.vue +124 -50
  34. package/components/Pages/Documents.vue +72 -7
  35. package/components/Pages/InvoiceInfo.vue +1 -1
  36. package/components/Pages/MemberForm.vue +369 -100
  37. package/components/Pages/ProductAgreement.vue +1 -8
  38. package/components/Pages/ProductConditions.vue +888 -181
  39. package/components/Panel/PanelHandler.vue +414 -45
  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 +433 -8
  46. package/composables/constants.ts +102 -2
  47. package/composables/fields.ts +328 -0
  48. package/composables/index.ts +257 -12
  49. package/composables/styles.ts +29 -16
  50. package/layouts/default.vue +48 -3
  51. package/locales/ru.json +480 -14
  52. package/package.json +27 -24
  53. package/pages/Token.vue +1 -12
  54. package/plugins/vuetifyPlugin.ts +2 -0
  55. package/store/data.store.ts +1190 -248
  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 +66 -5
  60. package/types/enum.ts +43 -0
  61. package/types/env.d.ts +1 -0
  62. package/types/form.ts +94 -0
  63. package/types/index.ts +254 -21
@@ -2,13 +2,17 @@ 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
+ import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
+ import { PolicyholderClass } from '../composables/classes';
5
7
 
6
8
  export const getBaseCredentials = () => {
7
9
  return {
8
10
  production: { login: '', password: '' },
9
11
  test: { login: '', password: '' },
10
- development: { login: 'manager', password: 'asdqwe123' },
11
- vercel: { login: '', password: 'asdqwe123' },
12
+ development: {
13
+ login: import.meta.env.VITE_PRODUCT === 'auletti' ? '790101401056' : 'manager',
14
+ password: import.meta.env.VITE_PRODUCT === 'auletti' ? 'halyklife' : 'asdqwe123',
15
+ },
12
16
  };
13
17
  };
14
18
 
@@ -17,7 +21,6 @@ export const useEnv = () => {
17
21
  envMode: import.meta.env.VITE_MODE,
18
22
  isDev: import.meta.env.VITE_MODE === 'development',
19
23
  isTest: import.meta.env.VITE_MODE === 'test',
20
- isVercel: import.meta.env.VITE_MODE === 'vercel',
21
24
  isProduction: import.meta.env.VITE_MODE === 'production',
22
25
  };
23
26
  };
@@ -30,6 +33,7 @@ export class Masks {
30
33
  date: string = '##.##.####';
31
34
  post: string = '######';
32
35
  threeDigit: string = '###';
36
+ iik: string = 'KZXXXXXXXXXXXXXXXXXX';
33
37
  }
34
38
 
35
39
  export const useMask = () => new Masks();
@@ -183,18 +187,65 @@ export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
183
187
 
184
188
  export const ErrorHandler = (err: unknown, errorText?: string) => {
185
189
  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);
190
+ if (useDataStore) {
191
+ const dataStore = useDataStore();
192
+ if (err instanceof AxiosError) {
193
+ if ('response' in err && err.response && err.response.data) {
194
+ if (err.response.data === Object(err.response.data) && 'errors' in err.response.data && 'title' in err.response.data && 'traceId' in err.response.data) {
195
+ Object.entries(err.response.data.errors).forEach(([field, errors]) => {
196
+ dataStore.showToaster('error', `Поле: ${field}. Ошибка: ${Array.isArray(errors) ? errors.join(', ') : errors}`, 10000);
197
+ });
198
+ } else {
199
+ dataStore.showToaster('error', errorText ? errorText : err.response.data, 10000);
200
+ }
192
201
  }
193
202
  }
194
203
  }
195
204
  return false;
196
205
  };
197
206
 
207
+ export const policyholderToBeneficialOwner = (isPolicyholderBeneficialOwner: boolean, policyholder?: PolicyholderClass) => {
208
+ const formStore = useFormStore();
209
+ const dataStore = useDataStore();
210
+ const beneficialOwner = formStore.lfb.beneficialOwners[0].beneficialOwnerData;
211
+ if (isPolicyholderBeneficialOwner && policyholder) {
212
+ beneficialOwner.iin = policyholder.clientData.authoritedPerson.iin;
213
+ beneficialOwner.firstName = policyholder.clientData.authoritedPerson.firstName;
214
+ beneficialOwner.middleName = policyholder.clientData.authoritedPerson.middleName;
215
+ beneficialOwner.lastName = policyholder.clientData.authoritedPerson.lastName;
216
+ beneficialOwner.citizenship = policyholder.clientData.authoritedPerson.citizenship;
217
+ beneficialOwner.birthDate = policyholder.clientData.authoritedPerson.birthDate;
218
+ beneficialOwner.gender = policyholder.clientData.authoritedPerson.gender;
219
+ beneficialOwner.resident = policyholder.clientData.resident;
220
+ beneficialOwner.taxResidentCountry = policyholder.clientData.taxResidentCountry;
221
+ beneficialOwner.economySectorCode = policyholder.clientData.economySectorCode;
222
+ beneficialOwner.identityDocument.issuedOn = policyholder.clientData.authoritedPerson.identityDocument.issuedOn;
223
+ beneficialOwner.identityDocument.documentNumber = policyholder.clientData.authoritedPerson.identityDocument.documentNumber;
224
+ beneficialOwner.identityDocument.documentType = policyholder.clientData.authoritedPerson.identityDocument.documentType;
225
+ beneficialOwner.identityDocument.issuedBy = policyholder.clientData.authoritedPerson.identityDocument.issuedBy;
226
+ beneficialOwner.identityDocument.validUntil = policyholder.clientData.authoritedPerson.identityDocument.validUntil;
227
+ beneficialOwner.identityDocument.series = policyholder.clientData.authoritedPerson.identityDocument.series;
228
+ dataStore.showToaster('warning', dataStore.t('toaster.formFieldEmptyWarning'));
229
+ } else {
230
+ beneficialOwner.iin = '';
231
+ beneficialOwner.firstName = '';
232
+ beneficialOwner.middleName = '';
233
+ beneficialOwner.lastName = '';
234
+ beneficialOwner.citizenship = new Value();
235
+ beneficialOwner.birthDate = '';
236
+ beneficialOwner.gender = new Value();
237
+ beneficialOwner.resident = new Value();
238
+ beneficialOwner.taxResidentCountry = new Value();
239
+ beneficialOwner.economySectorCode = new Value();
240
+ beneficialOwner.identityDocument.issuedOn = '';
241
+ beneficialOwner.identityDocument.documentNumber = '';
242
+ beneficialOwner.identityDocument.documentType = new Value();
243
+ beneficialOwner.identityDocument.issuedBy = new Value();
244
+ beneficialOwner.identityDocument.validUntil = '';
245
+ beneficialOwner.identityDocument.series = '';
246
+ }
247
+ };
248
+
198
249
  export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean) => {
199
250
  const formStore = useFormStore();
200
251
  const dataStore = useDataStore();
@@ -256,11 +307,205 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
256
307
  };
257
308
 
258
309
  export const changeBridge = async (toBridge: 'efo' | 'lka', token: string) => {
259
- const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
310
+ const bridgeUrl = ref<string>(import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string);
260
311
  if (!toBridge) return;
261
- if (!bridgeUrl || !token) {
312
+ if (!bridgeUrl.value || !token) {
262
313
  useDataStore().showToaster('error', `${useDataStore().t('toaster.noUrl')} [import.meta.env.VITE_${toBridge.toUpperCase()}_URL]`);
263
314
  return;
264
315
  }
265
- window.open(`${bridgeUrl}/#/Token?token=${token}`, '_blank');
316
+ const host = window.location.hostname;
317
+ if (toBridge === 'efo') {
318
+ if (host.startsWith('bpmsrv02') && bridgeUrl.value !== 'http://bpmsrv02:88') bridgeUrl.value = 'http://bpmsrv02:88';
319
+ if (host.startsWith('vega') && bridgeUrl.value !== 'http://vega:800') bridgeUrl.value = 'http://vega:800';
320
+ }
321
+ if (toBridge === 'lka') {
322
+ if (host.startsWith('bpmsrv02') && bridgeUrl.value !== 'http://bpmsrv02:890') bridgeUrl.value = 'http://bpmsrv02:890';
323
+ if (host.startsWith('vega') && bridgeUrl.value !== 'http://vega:890') bridgeUrl.value = 'http://vega:890';
324
+ }
325
+ window.open(`${bridgeUrl.value}/#/Token?token=${token}`, '_blank');
326
+ };
327
+
328
+ export const getFirstDayOfMonth = (year: number, month: number) => {
329
+ const date = new Date();
330
+ return new Date(year, month, 1, (date.getTimezoneOffset() / 60) * -1).toISOString();
331
+ };
332
+
333
+ export const getLastDayOfMonth = (year: number, month: number) => {
334
+ const date = new Date();
335
+ return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
336
+ };
337
+
338
+ type WhichValuePerEnv = 'qrGenUrl' | 'gatewayApiUrl' | 'gatewayApiUrlLocal' | 'baseApi' | 'baseApiLocal' | 'efoBaseApi' | 'efoBaseApiLocal' | 'amlBaseApi' | 'amlBaseApiLocal';
339
+
340
+ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
341
+ const valuesPerEnv: {
342
+ [key in WhichValuePerEnv]: {
343
+ [key in EnvModes]: string;
344
+ };
345
+ } = {
346
+ qrGenUrl: {
347
+ production: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
348
+ development: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
349
+ test: 'mobileSign:https://test-sign.halyklife.kz/EgovQrCms',
350
+ },
351
+ gatewayApiUrl: {
352
+ production: 'https://products.halyklife.kz/gateway',
353
+ development: 'https://products.halyklife.kz/test/gateway',
354
+ test: 'https://products.halyklife.kz/test/gateway',
355
+ },
356
+ gatewayApiUrlLocal: {
357
+ production: 'http://products.halyklife.nb/gateway',
358
+ development: 'http://products.halyklife.nb/test/gateway',
359
+ test: 'http://products.halyklife.nb/test/gateway',
360
+ },
361
+ baseApi: {
362
+ production: 'https://products.halyklife.kz/api/v1/insis',
363
+ development: 'https://products.halyklife.kz/api/v1/test/insis',
364
+ test: 'https://products.halyklife.kz/api/v1/test/insis',
365
+ },
366
+ baseApiLocal: {
367
+ production: 'http://bpmsrv02.halyklife.nb',
368
+ development: 'http://vega:84',
369
+ test: 'http://vega:84',
370
+ },
371
+ efoBaseApi: {
372
+ production: 'https://products.halyklife.kz/efo/api',
373
+ development: 'https://products.halyklife.kz/test/efo/api',
374
+ test: 'https://products.halyklife.kz/test/efo/api',
375
+ },
376
+ efoBaseApiLocal: {
377
+ production: 'http://efo-prod.halyklife.nb/api',
378
+ development: 'http://efo-dev.halyklife.nb/api',
379
+ test: 'http://efo-dev.halyklife.nb/api',
380
+ },
381
+ amlBaseApi: {
382
+ production: 'https://products.halyklife.kz/aml/api',
383
+ development: 'https://products.halyklife.kz/test/aml/api',
384
+ test: 'https://products.halyklife.kz/test/aml/api',
385
+ },
386
+ amlBaseApiLocal: {
387
+ production: 'http://aml-prod.halyklife.nb/api',
388
+ development: 'http://aml-dev.halyklife.nb/api',
389
+ test: 'http://aml-dev.halyklife.nb/api',
390
+ },
391
+ };
392
+ return valuesPerEnv[which][import.meta.env.VITE_MODE];
393
+ };
394
+
395
+ export const getMainPageRoute = () => {
396
+ const dataStore = useDataStore();
397
+ if (dataStore.isEFO || dataStore.isAULETTI) {
398
+ return 'Insurance-Product';
399
+ }
400
+ if (dataStore.isLKA) {
401
+ return 'Menu';
402
+ }
403
+ if (dataStore.isAML) {
404
+ return 'Main';
405
+ }
406
+ return 'index';
407
+ };
408
+
409
+ export const keyDeleter = <T extends object>(data: T, keys: Array<NestedKeyOf<T>>) => {
410
+ if (typeof data === 'object' && !!data && keys && Array.isArray(keys) && keys.length) {
411
+ keys.forEach(key => {
412
+ if (key) {
413
+ if (String(key).includes('.')) {
414
+ const childKey = String(key).substring(0, String(key).indexOf('.'));
415
+ const keyChain = [String(key).substring(String(key).indexOf('.') + 1)];
416
+ // @ts-ignore
417
+ keyDeleter(data[childKey], keyChain);
418
+ } else {
419
+ //@ts-ignore
420
+ delete data[key];
421
+ }
422
+ }
423
+ });
424
+ }
425
+ };
426
+
427
+ export const formatDateProperty = (item: any, to: 'front' | 'back', additionalKeys?: string[]) => {
428
+ try {
429
+ if (item) {
430
+ Object.keys(item).forEach((key: string) => {
431
+ if (item[key] === Object(item[key])) {
432
+ formatDateProperty(item[key], to);
433
+ } else {
434
+ if (Array.isArray(additionalKeys)) {
435
+ additionalKeys.forEach(k => {
436
+ if (String(key).includes(k) && typeof item[key] === 'string' && !!item[key]) {
437
+ item[key] = to === 'front' ? reformatDate(item[key]) : formatDate(item[key])!.toISOString();
438
+ }
439
+ });
440
+ }
441
+ if ((String(key).includes('date') || String(key).includes('Date')) && typeof item[key] === 'string' && !!item[key]) {
442
+ item[key] = to === 'front' ? reformatDate(item[key]) : formatDate(item[key])!.toISOString();
443
+ }
444
+ }
445
+ });
446
+ }
447
+ } catch (err) {
448
+ console.log(err);
449
+ }
450
+ };
451
+
452
+ export const callDocumentReader = async (imageBase64: string | string[]) => {
453
+ if (!imageBase64) return false;
454
+ const dataStore = useDataStore();
455
+ try {
456
+ const api = new DocumentReaderApi({
457
+ basePath: `${getStrValuePerEnv('gatewayApiUrl')}/regulaforensics`,
458
+ baseOptions: { headers: { Authorization: `Bearer ${dataStore.accessToken}` } },
459
+ });
460
+ const result = await api.process({
461
+ images: Array.isArray(imageBase64) ? imageBase64 : [imageBase64],
462
+ processParam: { scenario: Scenario.FULL_PROCESS, doublePageSpread: true, measureSystem: 0 },
463
+ });
464
+ const documentName = ref<string | undefined>(undefined);
465
+ if (result.rawResponse && result.rawResponse.ContainerList) {
466
+ const dType = result.rawResponse.ContainerList.List.find(i => i.result_type === 9);
467
+ if (dType && 'OneCandidate' in dType && dType.OneCandidate && dType.OneCandidate.DocumentName) {
468
+ documentName.value = dType.OneCandidate.DocumentName;
469
+ }
470
+ }
471
+ if (result.text) {
472
+ const iin = result.text.getField(TextFieldType.PERSONAL_NUMBER);
473
+ const lastName = result.text.getField(TextFieldType.SURNAME, LCID.KAZAKH);
474
+ const firstName = result.text.getField(TextFieldType.GIVEN_NAMES_RUS, LCID.KAZAKH) ?? result.text.getField(TextFieldType.GIVEN_NAMES, LCID.KAZAKH);
475
+ const middleName = result.text.getField(TextFieldType.FATHERS_NAME_RUS, LCID.KAZAKH) ?? result.text.getField(TextFieldType.FATHERS_NAME, LCID.KAZAKH);
476
+ const fullName = result.text.getField(TextFieldType.SURNAME_AND_GIVEN_NAMES, LCID.KAZAKH);
477
+ const birthDate = result.text.getField(TextFieldType.DATE_OF_BIRTH);
478
+ const age = result.text.getField(TextFieldType.AGE);
479
+ const gender = result.text.getField(TextFieldType.SEX);
480
+ const documentNumber = result.text.getField(TextFieldType.DOCUMENT_NUMBER);
481
+ const documentIssuer = result.text.getField(TextFieldType.AUTHORITY_RUS) ?? result.text.getField(TextFieldType.AUTHORITY);
482
+ const documentIssueDate = result.text.getField(TextFieldType.DATE_OF_ISSUE);
483
+ const documentExpireDate = result.text.getField(TextFieldType.DATE_OF_EXPIRY);
484
+ const parsedDocument = {
485
+ iin: iin?.value,
486
+ lastName: lastName?.value,
487
+ firstName: firstName?.value,
488
+ middleName: middleName?.value,
489
+ fullName: fullName?.value,
490
+ birthDate: birthDate?.value,
491
+ age: age?.value,
492
+ gender: gender?.value,
493
+ documentName: documentName.value,
494
+ documentNumber: documentNumber?.value,
495
+ documentIssuer: documentIssuer?.value,
496
+ documentIssueDate: documentIssueDate?.value,
497
+ documentExpireDate: documentExpireDate?.value,
498
+ };
499
+ if (Object.values(parsedDocument).every(i => !i)) {
500
+ dataStore.showToaster('error', dataStore.t('toaster.notParsedDocument'));
501
+ return false;
502
+ }
503
+ return parsedDocument;
504
+ } else {
505
+ dataStore.showToaster('error', dataStore.t('toaster.notParsedDocument'));
506
+ }
507
+ return false;
508
+ } catch (err) {
509
+ return ErrorHandler(err);
510
+ }
266
511
  };
@@ -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>