hl-core 0.0.10-beta.3 → 0.0.10-beta.30

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 (50) hide show
  1. package/api/base.api.ts +259 -190
  2. package/api/interceptors.ts +3 -5
  3. package/components/Complex/TextBlock.vue +2 -0
  4. package/components/Dialog/Dialog.vue +7 -1
  5. package/components/Dialog/FamilyDialog.vue +2 -0
  6. package/components/Form/DigitalDocument.vue +52 -0
  7. package/components/Form/DynamicForm.vue +1 -0
  8. package/components/Form/FormData.vue +1 -0
  9. package/components/Form/ManagerAttachment.vue +18 -8
  10. package/components/Form/ProductConditionsBlock.vue +12 -6
  11. package/components/Input/DynamicInput.vue +2 -0
  12. package/components/Input/FormInput.vue +2 -0
  13. package/components/Input/OtpInput.vue +25 -0
  14. package/components/Input/PanelInput.vue +1 -0
  15. package/components/Input/RoundedInput.vue +2 -0
  16. package/components/Input/RoundedSelect.vue +4 -0
  17. package/components/Input/SwitchInput.vue +2 -0
  18. package/components/Input/TextInput.vue +2 -0
  19. package/components/Layout/Drawer.vue +2 -0
  20. package/components/Pages/Anketa.vue +166 -167
  21. package/components/Pages/Auth.vue +2 -0
  22. package/components/Pages/ContragentForm.vue +2 -1
  23. package/components/Pages/Documents.vue +244 -6
  24. package/components/Pages/MemberForm.vue +276 -96
  25. package/components/Pages/ProductConditions.vue +275 -96
  26. package/components/Panel/PanelHandler.vue +236 -108
  27. package/components/Transitions/Animation.vue +2 -0
  28. package/components/Utilities/Chip.vue +3 -1
  29. package/components/Utilities/JsonViewer.vue +1 -2
  30. package/composables/classes.ts +117 -42
  31. package/composables/constants.ts +33 -0
  32. package/composables/fields.ts +6 -4
  33. package/composables/index.ts +243 -7
  34. package/composables/styles.ts +8 -24
  35. package/configs/pwa.ts +1 -7
  36. package/layouts/clear.vue +1 -1
  37. package/layouts/default.vue +1 -1
  38. package/layouts/full.vue +1 -1
  39. package/locales/ru.json +34 -10
  40. package/nuxt.config.ts +10 -13
  41. package/package.json +13 -12
  42. package/plugins/head.ts +2 -1
  43. package/store/data.store.ts +380 -389
  44. package/store/member.store.ts +3 -2
  45. package/store/rules.ts +19 -0
  46. package/tsconfig.json +3 -0
  47. package/types/enum.ts +19 -2
  48. package/types/env.d.ts +2 -2
  49. package/types/form.ts +71 -74
  50. package/types/index.ts +916 -873
@@ -1,9 +1,11 @@
1
1
  import { useDisplay } from 'vuetify';
2
- import jwt_decode from 'jwt-decode';
2
+ import { jwtDecode as jwt_decode } from 'jwt-decode';
3
3
  import { XMLParser } from 'fast-xml-parser';
4
4
  import { AxiosError } from 'axios';
5
5
  import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
- import { PolicyholderClass } from '../composables/classes';
6
+ import { PolicyholderClass, Value, User } from '../composables/classes';
7
+ import type { EnvModes, NestedKeyOf, Projects, ResponseStructure, Utils } from '../types';
8
+ import { Roles, Statuses } from '../types/enum';
7
9
 
8
10
  export const useEnv = () => {
9
11
  return {
@@ -16,7 +18,8 @@ export const useEnv = () => {
16
18
 
17
19
  export class Masks {
18
20
  numbers: string = '#*';
19
- otp: string = '# # # #';
21
+ otp: string = '####';
22
+ otpSixDigit: string = '######';
20
23
  spacedNumbers: string = '### ### ### ### ### ### ###';
21
24
  iin: string = '###-###-###-###';
22
25
  phone: string = '+7 (7##) ### ## ##';
@@ -101,13 +104,22 @@ export const formatPhone = (phone: string) => {
101
104
 
102
105
  export const cleanWhiteSpace = (str: string) => String(str).replace(/\s+/g, '');
103
106
 
104
- export const jwtDecode = (token: string): any => {
105
- if (token) return jwt_decode(token);
107
+ export const jwtDecode = (token?: string | null) => {
108
+ if (token) return jwt_decode<Utils.JwtToken>(token);
106
109
  else return null;
107
110
  };
108
111
 
109
112
  export const isValidToken = (token: string) => {
110
- return (new Date(jwtDecode(token).exp * 1000).getTime() - Date.now()) / 1000 > 0;
113
+ try {
114
+ if (token) {
115
+ const decoded = jwtDecode(token);
116
+ return !!decoded && (new Date(Number(decoded.exp) * 1000).getTime() - Date.now()) / 1000 > 0;
117
+ }
118
+ return false;
119
+ } catch (err) {
120
+ console.log(err);
121
+ return false;
122
+ }
111
123
  };
112
124
 
113
125
  export const isValidGUID = (value: string) => {
@@ -148,6 +160,12 @@ export const formatProcents = (val: string | number) => (val ? Number(((val as n
148
160
 
149
161
  export const sanitizeURL = (text: string) => (text ? text.replace(/\r?\n|\r|\\|"/g, '') : '');
150
162
 
163
+ export const sanitize = (text: string) =>
164
+ String(text)
165
+ .replace(/\r?\n|\r/g, '')
166
+ .replace(/\\/g, '')
167
+ .replace(/"/g, '');
168
+
151
169
  export const yearEnding = (number: number, titles: string[], cases: number[]) => {
152
170
  return titles[number % 100 > 4 && number % 100 < 20 ? 2 : cases[number % 10 < 5 ? number % 10 : 5]];
153
171
  };
@@ -273,6 +291,7 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
273
291
  if (beneficiary.id === 0) {
274
292
  beneficiary.registrationCity = new Value();
275
293
  beneficiary.registrationCountry = new Value();
294
+ beneficiary.birthPlace = new Value();
276
295
  beneficiary.registrationMicroDistrict = '';
277
296
  beneficiary.registrationNumberApartment = '';
278
297
  beneficiary.registrationNumberApartment = '';
@@ -295,6 +314,13 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
295
314
  const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
296
315
  beneficiary.registrationCity = city ?? new Value();
297
316
  }
317
+ const contragentData = beneficiary.response.contragent;
318
+ if (contragentData) {
319
+ const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
320
+ beneficiary.birthPlace = country ?? new Value();
321
+ } else {
322
+ beneficiary.birthPlace = new Value();
323
+ }
298
324
  const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
299
325
  const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
300
326
  const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
@@ -332,6 +358,7 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
332
358
  if (insured.id === 0) {
333
359
  insured.registrationCity = new Value();
334
360
  insured.registrationCountry = new Value();
361
+ insured.birthPlace = new Value();
335
362
  insured.registrationMicroDistrict = '';
336
363
  insured.registrationNumberApartment = '';
337
364
  insured.registrationNumberApartment = '';
@@ -354,6 +381,13 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
354
381
  const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
355
382
  insured.registrationCity = city ?? new Value();
356
383
  }
384
+ const contragentData = insured.response.contragent;
385
+ if (contragentData) {
386
+ const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
387
+ insured.birthPlace = country ?? new Value();
388
+ } else {
389
+ insured.birthPlace = new Value();
390
+ }
357
391
  const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
358
392
  const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
359
393
  const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
@@ -473,7 +507,7 @@ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
473
507
  test: 'http://aml-dev.halyklife.nb/api',
474
508
  },
475
509
  };
476
- return valuesPerEnv[which][import.meta.env.VITE_MODE];
510
+ return valuesPerEnv[which][import.meta.env.VITE_MODE as EnvModes];
477
511
  };
478
512
 
479
513
  export const getMainPageRoute = () => {
@@ -609,3 +643,205 @@ export const isEveryFormDisabled = (isDisabledForm: any) => {
609
643
  };
610
644
 
611
645
  export class ApiError extends AxiosError<any, any> {}
646
+
647
+ export class ProcessController {
648
+ isProcessEditable = (statusCode?: keyof typeof Statuses) => {
649
+ const getEditibleStatuses = () => {
650
+ const defaultStatuses = constants.editableStatuses;
651
+ return defaultStatuses;
652
+ };
653
+ return !!getEditibleStatuses().find(status => status === statusCode);
654
+ };
655
+ isProcessReturnable = (statusCode?: keyof typeof Statuses) => {
656
+ const getReturnableStatuses = () => {
657
+ const defaultStatuses = constants.returnStatementStatuses;
658
+ return defaultStatuses;
659
+ };
660
+ return !!getReturnableStatuses().find(status => status === statusCode);
661
+ };
662
+ isProcessCancel = (statusCode?: keyof typeof Statuses) => {
663
+ const getCanceleStatuses = () => {
664
+ const defaultStatuses = constants.cancelApplicationStatuses;
665
+ return defaultStatuses;
666
+ };
667
+ return !!getCanceleStatuses().find(status => status === statusCode);
668
+ };
669
+ isProcessReject = (statusCode?: keyof typeof Statuses) => {
670
+ const getRejectStatuses = () => {
671
+ const defaultStatuses = constants.rejectApplicationStatuses;
672
+ return defaultStatuses;
673
+ };
674
+ return !!getRejectStatuses().find(status => status === statusCode);
675
+ };
676
+ }
677
+
678
+ export class RoleController {
679
+ user: User = new User();
680
+
681
+ isRole = (whichRole: keyof typeof Roles) => {
682
+ if (this.user.roles.length === 0) {
683
+ const token = localStorage.getItem('accessToken') || null;
684
+ if (token) {
685
+ const decoded = jwtDecode(token);
686
+ if (decoded) {
687
+ this.user.id = String(decoded.sub);
688
+ this.user.fullName = `${decoded.lastName} ${decoded.firstName} ${decoded.middleName ?? ''}`;
689
+ this.user.code = decoded.code;
690
+ this.user.branchCode = decoded.branchCode;
691
+ const key = getKeyWithPattern(decoded, 'role');
692
+ if (key) {
693
+ const roles = decoded[key as keyof Utils.JwtToken];
694
+ if (typeof roles === 'string') {
695
+ this.user.roles.push(roles);
696
+ } else if (typeof roles === 'object') {
697
+ this.user.roles = roles;
698
+ }
699
+ }
700
+ }
701
+ }
702
+ }
703
+ return !!this.user.roles.find(i => i === whichRole);
704
+ };
705
+ isInitiator = (productFromExternal?: string) => {
706
+ const env = useEnv();
707
+ const dataStore = useDataStore();
708
+ const hasAccessByProduct = (() => {
709
+ const product = productFromExternal as Projects;
710
+ if (dataStore.isLifetrip || product === 'lifetrip' || (!env.isProduction && (dataStore.isPension || product === 'pensionannuitynew'))) return this.isBranchDirector();
711
+ return false;
712
+ })();
713
+ return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
714
+ };
715
+ isManager = () => {
716
+ return this.isRole(constants.roles.Manager);
717
+ };
718
+ isCompliance = () => {
719
+ return this.isRole(constants.roles.Compliance);
720
+ };
721
+ isAdmin = () => {
722
+ return this.isRole(constants.roles.Admin);
723
+ };
724
+ isJurist = () => {
725
+ return this.isRole(constants.roles.Jurist);
726
+ };
727
+ isAgent = () => {
728
+ return this.isRole(constants.roles.Agent);
729
+ };
730
+ isManagerHalykBank = () => {
731
+ return this.isRole(constants.roles.ManagerHalykBank);
732
+ };
733
+ isServiceManager = () => {
734
+ return this.isRole(constants.roles.ServiceManager);
735
+ };
736
+ isUnderwriter = () => {
737
+ return this.isRole(constants.roles.Underwriter);
738
+ };
739
+ isActuary = () => {
740
+ return this.isRole(constants.roles.Actuary);
741
+ };
742
+ isAgentMycar = () => {
743
+ return this.isRole(constants.roles.AgentMycar);
744
+ };
745
+ isAgentAuletti = () => {
746
+ return this.isRole(constants.roles.AgentAuletti);
747
+ };
748
+ isManagerAuletti = () => {
749
+ return this.isRole(constants.roles.ManagerAuletti);
750
+ };
751
+ isAnalyst = () => {
752
+ return this.isRole(constants.roles.Analyst);
753
+ };
754
+ isUpk = () => {
755
+ return this.isRole(constants.roles.UPK);
756
+ };
757
+ isUrp = () => {
758
+ return this.isRole(constants.roles.URP);
759
+ };
760
+ isUsns = () => {
761
+ return this.isRole(constants.roles.USNS);
762
+ };
763
+ isAccountant = () => {
764
+ return this.isRole(constants.roles.Accountant);
765
+ };
766
+ isDrn = () => {
767
+ return this.isRole(constants.roles.DRNSJ);
768
+ };
769
+ isSupport = () => {
770
+ return this.isRole(constants.roles.Support);
771
+ };
772
+ isFinCenter = () => {
773
+ return this.isRole(constants.roles.FinCenter);
774
+ };
775
+ isSupervisor = () => {
776
+ return this.isRole(constants.roles.Supervisor);
777
+ };
778
+ isHeadManager = () => {
779
+ return this.isRole(constants.roles.HeadManager);
780
+ };
781
+ isBranchDirector = () => {
782
+ return this.isRole(constants.roles.BranchDirector);
783
+ };
784
+ isUSNSACCINS = () => {
785
+ return this.isRole(constants.roles.USNSACCINS);
786
+ };
787
+ isDsuio = () => {
788
+ return this.isRole(constants.roles.Dsuio);
789
+ };
790
+ isAdjuster = () => {
791
+ return this.isRole(constants.roles.SettlementLosses);
792
+ };
793
+ isHeadAdjuster = () => {
794
+ return this.isRole(constants.roles.HeadSettlementLosses);
795
+ };
796
+ isDsoDirector = () => {
797
+ return this.isRole(constants.roles.DsoDirector);
798
+ };
799
+ isAccountantDirector = () => {
800
+ return this.isRole(constants.roles.AccountantDirector);
801
+ };
802
+ isHeadOfDso = () => {
803
+ return this.isRole(constants.roles.HeadOfDso);
804
+ };
805
+ isUrsp = () => {
806
+ return this.isRole(constants.roles.URSP);
807
+ };
808
+ hasAccess = () => {
809
+ const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn();
810
+ return {
811
+ invoiceInfo: this.isAdmin(),
812
+ toLKA: this.isAgent() || this.isManagerHalykBank() || baseAccessRoles,
813
+ toAML: this.isCompliance() || baseAccessRoles,
814
+ toAULETTI: this.isAgentAuletti() || this.isManagerAuletti() || baseAccessRoles,
815
+ toLKA_A: this.isAgentAuletti() || baseAccessRoles,
816
+ toEFO:
817
+ this.isManager() ||
818
+ this.isAgent() ||
819
+ this.isAgentMycar() ||
820
+ this.isManagerHalykBank() ||
821
+ this.isHeadManager() ||
822
+ this.isServiceManager() ||
823
+ this.isUnderwriter() ||
824
+ this.isActuary() ||
825
+ this.isAdmin() ||
826
+ this.isCompliance() ||
827
+ this.isAnalyst() ||
828
+ this.isUpk() ||
829
+ this.isFinCenter() ||
830
+ this.isSupervisor() ||
831
+ this.isSupport() ||
832
+ this.isDrn() ||
833
+ this.isUrp() ||
834
+ this.isUsns() ||
835
+ this.isAccountant() ||
836
+ this.isBranchDirector() ||
837
+ this.isUSNSACCINS() ||
838
+ this.isDsuio() ||
839
+ this.isAdjuster() ||
840
+ this.isDsoDirector() ||
841
+ this.isAccountantDirector() ||
842
+ this.isHeadAdjuster() ||
843
+ this.isHeadOfDso() ||
844
+ this.isUrsp(),
845
+ };
846
+ };
847
+ }
@@ -15,24 +15,13 @@ export class Styles {
15
15
  blueTextLight: string = 'text-[#F3F6FC]';
16
16
 
17
17
  // Green
18
- greenBg: string =
19
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
20
- ? 'bg-[#DEBE8C]'
21
- : 'bg-[#009C73]';
22
- greenBgHover: string =
23
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
24
- ? 'bg-[#C19B5F]'
25
- : 'hover:bg-[#00a277]';
26
- greenBgLight: string =
27
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
28
- ? 'bg-[#e8d2af]'
29
- : 'bg-[#EAF6EF]';
18
+ greenBg: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#DEBE8C]' : 'bg-[#009C73]';
19
+ greenBgHover: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#C19B5F]' : 'hover:bg-[#00a277]';
20
+ greenBgLight: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#e8d2af]' : 'bg-[#EAF6EF]';
30
21
  greenText: string = '!text-[#009C73]';
31
22
  greenTextHover: string = 'hover:text-[#009C73]';
32
23
  greenBgLightHover: string =
33
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
34
- ? 'hover:bg-[#efdfc6]'
35
- : 'hover:bg-[#dbf0e4]';
24
+ String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'hover:bg-[#efdfc6]' : 'hover:bg-[#dbf0e4]';
36
25
 
37
26
  // Yellow
38
27
  yellowText: string = '!text-[#FAB31C]';
@@ -65,7 +54,7 @@ export class Styles {
65
54
  blueBorder: string = 'border-[1px] border-[#A0B3D8]';
66
55
  blueLightBorder: string = 'border-[1px] border-[#F3F6FC]';
67
56
  greenBorder: string =
68
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
57
+ String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti'
69
58
  ? 'border-[1px] border-[#DEBE8C]'
70
59
  : 'border-[1px] border-[#009C73]';
71
60
  redBorder: string = 'border-[1px] border-[#FD2D39]';
@@ -91,9 +80,9 @@ export class Styles {
91
80
  greenLightBtn: string;
92
81
 
93
82
  // Complex
94
- flexColNav: string;
95
- emptyBlockCol: string;
96
- scrollPage: string;
83
+ flexColNav: string = 'flex flex-col gap-[10px] px-2 pt-[14px]';
84
+ emptyBlockCol: string = 'w-[60px] sm:w-[100px] h-[30%] rounded-[8px] bg-[#f5f5f5]';
85
+ scrollPage: string = 'max-h-[85svh] overflow-y-scroll';
97
86
  flexCenter: string = 'flex items-center justify-center';
98
87
 
99
88
  // Muted or disabled
@@ -111,11 +100,6 @@ export class Styles {
111
100
  this.whiteBorderBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover} border-[#A0B3D8] border-[1px]`;
112
101
  this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
113
102
  this.greenLightBtn = `${this.greenBgLight} ${this.greenText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgLightHover}`;
114
-
115
- // Complex
116
- this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
117
- this.emptyBlockCol = 'w-[60px] sm:w-[100px] h-[30%] rounded-[8px] bg-[#f5f5f5]';
118
- this.scrollPage = 'max-h-[85svh] overflow-y-scroll';
119
103
  }
120
104
  }
121
105
 
package/configs/pwa.ts CHANGED
@@ -3,7 +3,7 @@ import type { ModuleOptions } from '@vite-pwa/nuxt';
3
3
  export const pwaBaseConfig: Partial<ModuleOptions> = {
4
4
  registerType: 'autoUpdate',
5
5
  workbox: {
6
- globPatterns: ['**/*.{js,css,html,txt,png,ico,svg}'],
6
+ globPatterns: ['**/*.{js,css,html,txt,png,ico,svg,json}'],
7
7
  navigateFallbackDenylist: [/^\/api\//],
8
8
  navigateFallback: '/',
9
9
  cleanupOutdatedCaches: true,
@@ -54,10 +54,4 @@ export const pwaBaseConfig: Partial<ModuleOptions> = {
54
54
  },
55
55
  registerWebManifestInRouteRules: true,
56
56
  writePlugin: true,
57
- devOptions: {
58
- enabled: true,
59
- suppressWarnings: true,
60
- navigateFallback: '/',
61
- type: 'module',
62
- },
63
57
  };
package/layouts/clear.vue CHANGED
@@ -8,7 +8,7 @@ const { $pwa } = useNuxtApp();
8
8
 
9
9
  const onInit = async () => {
10
10
  const projectConfig = dataStore.projectConfig;
11
- if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
11
+ if (process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
12
12
  const hasConfig = await dataStore.getProjectConfig();
13
13
  if (hasConfig === true) {
14
14
  const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
@@ -52,7 +52,7 @@ const onBack = async (item: MenuItem) => {
52
52
 
53
53
  const onInit = async () => {
54
54
  const projectConfig = dataStore.projectConfig;
55
- if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
55
+ if (process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
56
56
  const hasConfig = await dataStore.getProjectConfig();
57
57
  if (hasConfig === true) {
58
58
  const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
package/layouts/full.vue CHANGED
@@ -11,7 +11,7 @@ const { $pwa } = useNuxtApp();
11
11
 
12
12
  const onInit = async () => {
13
13
  const projectConfig = dataStore.projectConfig;
14
- if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
14
+ if (process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
15
15
  const hasConfig = await dataStore.getProjectConfig();
16
16
  if (hasConfig === true) {
17
17
  const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
package/locales/ru.json CHANGED
@@ -28,7 +28,8 @@
28
28
  "noOtpCode": "Заполните поля: ИИН, Номер телефона, Код подтверждения",
29
29
  "memberCopy": "Ошибка при копировании данных участников",
30
30
  "memberSave": "Ошибка при сохранении данных участников",
31
- "notValidIik": "Некорректный ИИК"
31
+ "notValidIik": "Некорректный ИИК",
32
+ "exceedUploadLimitFile": "Размер файла превышает определенный лимит"
32
33
  },
33
34
  "toaster": {
34
35
  "wrongFormatOf": "Некорректный формат \"{text}\"",
@@ -119,7 +120,8 @@
119
120
  "courseChanged": "Изменился курс НБ РК, необходимо вернуть на доработку и сделать перерасчет",
120
121
  "noAmountBeforeTypeAndCountries": "Страховая сумма вычисляется после выбора полей типа поездки и страны поездки",
121
122
  "noMaxDaysBeforePeriod": "Количество дней пребывания вычисляется после выбора поля периода",
122
- "startMoreEnd": "Дата начала не должна превышать дату окончания поездки",
123
+ "startMoreEnd": "Дата начала не должна равняться или превышать дату окончания поездки",
124
+ "daysPickAgain": "Перевыберите даты для определения правильного количества дней",
123
125
  "passportNotFound": "Паспорт не найден",
124
126
  "wrongInn": "Неправильный ИНН",
125
127
  "underageShouldBeLess18": "Несовершеннолетний не может быть старше 18 лет",
@@ -141,7 +143,9 @@
141
143
  "requiredFieldsLB": "Обязательные поля: №, Ф.И.О, Пол, Должность, Дата рождения, ИИН, Страховая сумма",
142
144
  "duplicateClient": "В списке присутствуют повторяющиеся клиенты",
143
145
  "notParsedDocument": "Не удалось получить данные",
144
- "errorOsns": "По данному БИН на дату заключения заявления не найден договор ОСНС. Просим проверить БИН Страхователя."
146
+ "errorOsns": "По данному БИН на дату заключения заявления не найден договор ОСНС. Просим проверить БИН Страхователя.",
147
+ "needDigDoc": "Нужно получить цифровой документ {text}",
148
+ "notDigDoc": "Выданный документ не найден"
145
149
  },
146
150
  "notSignedContract": "Неподписанный Договор",
147
151
  "Contract": "Договор страхования",
@@ -237,7 +241,9 @@
237
241
  "signContract": "Заключить Договор",
238
242
  "sendDosie": "Отправить досье",
239
243
  "downloadPaymentInvoice": "Скачать счет на оплату",
240
- "copyToClient": "Скопировать ссылку для клиента"
244
+ "copyToClient": "Скопировать ссылку для клиента",
245
+ "searchByFio": "Поиск по ФИО",
246
+ "conclude": "Заключить"
241
247
  },
242
248
  "dialog": {
243
249
  "title": "Подтверждение",
@@ -276,7 +282,9 @@
276
282
  "choosePay": "Вы действительно хотите выбрать метод оплаты?",
277
283
  "searchBeneficiary": "Выполните поиск договоров по ИИН Выгодоприобретателя",
278
284
  "searchFoundBeneficiary": "По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
279
- "searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
285
+ "searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”",
286
+ "searchFoundPolicyholder": "Выполните поиск договоров по БИН Страхователя",
287
+ "searchNotFoundPolicyholder": "По данному БИНу не найден договор {product}.\nПроверьте правильность ввода БИН."
280
288
  },
281
289
  "sign": {
282
290
  "chooseDoc": "Выберите документы для подписание",
@@ -364,6 +372,7 @@
364
372
  "downloadTemplate": "Скачать шаблон",
365
373
  "countriesLength": "Число выбранных стран",
366
374
  "isPolicyholderLegalEntity": "Является ли Страхователь Юридическим лицом?",
375
+ "additionalAgreement": "Заключить дополнительное соглашение",
367
376
  "productConditionsForm": {
368
377
  "coverPeriod": "Срок страхования",
369
378
  "payPeriod": "Период оплаты страховой премии",
@@ -391,6 +400,7 @@
391
400
  "insurancePremiumAmount": "Размер Страховой премии (страховой взнос) в тенге",
392
401
  "insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
393
402
  "dollarExchangeRateNBRK": "Курс доллара НБРК",
403
+ "exchangeRateSettlementDate": "Курс на дату расчета (USD/KZT)",
394
404
  "contractDate": "Дата контракта",
395
405
  "guaranteedTermAnnuityPayments": "Гарантированный срок аннуитетных выплат",
396
406
  "guaranteedPeriod": "Укажите период гарантированного срока",
@@ -413,7 +423,9 @@
413
423
  "alfa": "Расходы от премии, в %",
414
424
  "gamma": "Расходы от выплат, в %",
415
425
  "mrpPayment": "Выплата на погребение (в тенге)",
416
- "fixInsSum": "Фиксированная сумма"
426
+ "fixInsSum": "Фиксированная сумма",
427
+ "amountRefunded": "Сумма к возврату",
428
+ "amountPaid": "Сумма к доплате"
417
429
  },
418
430
  "calculatorForm": {
419
431
  "selectedCountries": "Выбранные страны",
@@ -450,7 +462,8 @@
450
462
  "factEndDate": "Дата завершения",
451
463
  "decision": "Статус",
452
464
  "userFullName": "Исполнитель",
453
- "stage": "Этап"
465
+ "stage": "Этап",
466
+ "policyNumber": "№ Полиса"
454
467
  },
455
468
  "aml": {
456
469
  "contractSignDate": "Дата заключение контракта",
@@ -576,7 +589,11 @@
576
589
  "bankInvalid": "Некорректные банковские данные",
577
590
  "globalId": "Уникальный номер договора (globalId)",
578
591
  "oppvMonthsCheck": "ВНИМАНИЕ! НЕОБХОДИМО ПРОВЕРИТЬ НАЛИЧИЕ ОТЧИСЛЕНИЙ 60 МЕСЯЦЕВ ПО ПРИЗНАКУ 'ОППВ'",
579
- "signInProcess": "Документы в подписании - 1 минута"
592
+ "signInProcess": "После подписания всех документов данная заявка перейдет к Подписанту вашего Региона",
593
+ "signInProcessManager": "Договор будет подписан в течение минуты",
594
+ "transferRegNumber": "Номер и серия договора",
595
+ "contragentSelect": "Выбор контрагента",
596
+ "fileError": "Ошибка прикрепления файла"
580
597
  },
581
598
  "agent": {
582
599
  "currency": "Валюта",
@@ -785,6 +802,7 @@
785
802
  "resetPassword": "Забыли пароль?",
786
803
  "search": "Поиск",
787
804
  "searchByIIN": "Поиск по ИИН",
805
+ "searchByBIN": "Поиск по БИН",
788
806
  "chooseScannedDoc": "Выбрать отсканированный документ",
789
807
  "inputText": "Введите текст",
790
808
  "waitingStatus": "Ожидание",
@@ -836,6 +854,7 @@
836
854
  "email": "Неправильный адрес электронной почты",
837
855
  "numbers": "Поле должно содержать только цифры",
838
856
  "latinAndNumber": "Поле должно содержать только цифры и латинские символы",
857
+ "latinNumberSymbol": "Поле должно содержать только цифры и латинские буквы, символы(/,-)",
839
858
  "numbersSymbols": "Поле должно содержать цифры",
840
859
  "ageExceeds": "Год не может превышать больше 50 лет",
841
860
  "ageExceeds80": "Возраст не может превышать больше 80 лет",
@@ -864,7 +883,8 @@
864
883
  "agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
865
884
  "checkDate": "Укажите корректную дату",
866
885
  "searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов",
867
- "fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг"
886
+ "fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг",
887
+ "lengthLimit": "Превышен лимит символов. Введите текст длиной не более {len} символов"
868
888
  },
869
889
  "code": "КСЭ",
870
890
  "fontSize": "Размер шрифта",
@@ -944,6 +964,9 @@
944
964
  "documentNumber": "Номер документа",
945
965
  "date": "Дата",
946
966
  "documentIssuers": "Кем выдан",
967
+ "issuerOtherName": "Название органа выдачи на казахском",
968
+ "issuerOtherNameRu": "Название органа выдачи на русском",
969
+ "issuerOtherNameOrig": "Оригинальное название органа выдачи",
947
970
  "documentDate": "Дата выдачи",
948
971
  "documentExpire": "Действует до",
949
972
  "signOfResidency": "Признак резиденства",
@@ -991,7 +1014,8 @@
991
1014
  "recipientDocs": "Документы Получателя",
992
1015
  "recipientData": "Сведения о Получателе",
993
1016
  "deathInsFromNS": "Страхование от смерти от НС",
994
- "deathInsAnyReason": "Смерть Застрахованного по любой причине"
1017
+ "deathInsAnyReason": "Смерть Застрахованного по любой причине",
1018
+ "mark": "Признак"
995
1019
  },
996
1020
  "bankDetailsForm": {
997
1021
  "title": "Банковские реквизиты",
package/nuxt.config.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { resolve, dirname } from 'node:path';
2
- import { fileURLToPath } from 'url';
3
- import VueI18nVitePlugin from '@intlify/unplugin-vue-i18n/vite';
1
+ import path from 'path';
2
+ import VueI18nVitePlugin from '@intlify/unplugin-vue-i18n';
4
3
 
5
4
  export default defineNuxtConfig({
6
5
  ssr: false,
@@ -12,7 +11,7 @@ export default defineNuxtConfig({
12
11
  },
13
12
 
14
13
  build: {
15
- transpile: ['@vuepic/vue-datepicker', '@microsoft/signalr', 'vue-uuid', 'qrcode.vue'],
14
+ transpile: ['@vuepic/vue-datepicker', '@microsoft/signalr', 'vue-uuid', 'qrcode.vue', 'vue-i18n'],
16
15
  },
17
16
 
18
17
  vite: {
@@ -26,19 +25,17 @@ export default defineNuxtConfig({
26
25
  },
27
26
  },
28
27
  plugins: [
29
- VueI18nVitePlugin({
30
- include: [resolve(dirname(fileURLToPath(import.meta.url)), './locales/*.json')],
28
+ VueI18nVitePlugin.vite({
29
+ include: [path.resolve(__dirname, './locales/**')],
31
30
  }),
32
31
  ],
32
+ build: {
33
+ chunkSizeWarningLimit: 2000,
34
+ },
33
35
  },
34
36
 
35
- future: {
36
- typescriptBundlerResolution: false,
37
- },
38
-
39
- vue: {
40
- propsDestructure: true,
41
- },
37
+ vue: { propsDestructure: true },
38
+ future: { typescriptBundlerResolution: false },
42
39
 
43
40
  components: [{ path: './components', prefix: 'Base', pathPrefix: false }],
44
41
  });