hl-core 0.0.10-beta.3 → 0.0.10-beta.31
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.
- package/README.md +0 -2
- package/api/base.api.ts +300 -190
- package/api/interceptors.ts +3 -5
- package/components/Complex/TextBlock.vue +2 -0
- package/components/Dialog/Dialog.vue +7 -1
- package/components/Dialog/FamilyDialog.vue +2 -0
- package/components/Form/DigitalDocument.vue +52 -0
- package/components/Form/DynamicForm.vue +1 -0
- package/components/Form/FormData.vue +1 -0
- package/components/Form/ManagerAttachment.vue +17 -8
- package/components/Form/ProductConditionsBlock.vue +12 -6
- package/components/Input/Datepicker.vue +5 -0
- package/components/Input/DynamicInput.vue +2 -0
- package/components/Input/FormInput.vue +7 -0
- package/components/Input/OtpInput.vue +25 -0
- package/components/Input/PanelInput.vue +1 -0
- package/components/Input/RoundedInput.vue +4 -0
- package/components/Input/RoundedSelect.vue +4 -0
- package/components/Input/SwitchInput.vue +2 -0
- package/components/Input/TextInput.vue +2 -0
- package/components/Layout/Drawer.vue +2 -0
- package/components/Pages/Anketa.vue +166 -167
- package/components/Pages/Auth.vue +2 -0
- package/components/Pages/ContragentForm.vue +2 -1
- package/components/Pages/Documents.vue +429 -59
- package/components/Pages/MemberForm.vue +327 -159
- package/components/Pages/ProductConditions.vue +681 -150
- package/components/Panel/PanelHandler.vue +261 -114
- package/components/Transitions/Animation.vue +2 -0
- package/components/Utilities/Chip.vue +3 -1
- package/components/Utilities/JsonViewer.vue +1 -2
- package/composables/classes.ts +133 -42
- package/composables/constants.ts +41 -0
- package/composables/fields.ts +6 -4
- package/composables/index.ts +246 -7
- package/composables/styles.ts +8 -24
- package/configs/pwa.ts +1 -7
- package/layouts/clear.vue +1 -1
- package/layouts/default.vue +1 -1
- package/layouts/full.vue +1 -1
- package/locales/ru.json +44 -14
- package/nuxt.config.ts +10 -13
- package/package.json +13 -12
- package/plugins/head.ts +2 -1
- package/store/data.store.ts +670 -480
- package/store/member.store.ts +18 -6
- package/store/rules.ts +21 -2
- package/tsconfig.json +3 -0
- package/types/enum.ts +20 -2
- package/types/env.d.ts +2 -2
- package/types/form.ts +71 -74
- package/types/index.ts +916 -873
package/composables/index.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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) => {
|
|
@@ -146,8 +158,16 @@ export const parseProcents = (val: string | number) => (val ? Number(((val as nu
|
|
|
146
158
|
|
|
147
159
|
export const formatProcents = (val: string | number) => (val ? Number(((val as number) / 100).toFixed(2)) : Number(val));
|
|
148
160
|
|
|
161
|
+
export const formatSpacedNumber = (val: any) => ((!isNaN(val) && val !== null) || typeof val === 'string' ? Number(String(val).replace(/\s/g, '')) : 0);
|
|
162
|
+
|
|
149
163
|
export const sanitizeURL = (text: string) => (text ? text.replace(/\r?\n|\r|\\|"/g, '') : '');
|
|
150
164
|
|
|
165
|
+
export const sanitize = (text: string) =>
|
|
166
|
+
String(text)
|
|
167
|
+
.replace(/\r?\n|\r/g, '')
|
|
168
|
+
.replace(/\\/g, '')
|
|
169
|
+
.replace(/"/g, '');
|
|
170
|
+
|
|
151
171
|
export const yearEnding = (number: number, titles: string[], cases: number[]) => {
|
|
152
172
|
return titles[number % 100 > 4 && number % 100 < 20 ? 2 : cases[number % 10 < 5 ? number % 10 : 5]];
|
|
153
173
|
};
|
|
@@ -273,6 +293,7 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
|
|
|
273
293
|
if (beneficiary.id === 0) {
|
|
274
294
|
beneficiary.registrationCity = new Value();
|
|
275
295
|
beneficiary.registrationCountry = new Value();
|
|
296
|
+
beneficiary.birthPlace = new Value();
|
|
276
297
|
beneficiary.registrationMicroDistrict = '';
|
|
277
298
|
beneficiary.registrationNumberApartment = '';
|
|
278
299
|
beneficiary.registrationNumberApartment = '';
|
|
@@ -295,6 +316,13 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
|
|
|
295
316
|
const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
|
|
296
317
|
beneficiary.registrationCity = city ?? new Value();
|
|
297
318
|
}
|
|
319
|
+
const contragentData = beneficiary.response.contragent;
|
|
320
|
+
if (contragentData) {
|
|
321
|
+
const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
|
|
322
|
+
beneficiary.birthPlace = country ?? new Value();
|
|
323
|
+
} else {
|
|
324
|
+
beneficiary.birthPlace = new Value();
|
|
325
|
+
}
|
|
298
326
|
const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
|
|
299
327
|
const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
|
|
300
328
|
const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
|
|
@@ -332,6 +360,7 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
|
|
|
332
360
|
if (insured.id === 0) {
|
|
333
361
|
insured.registrationCity = new Value();
|
|
334
362
|
insured.registrationCountry = new Value();
|
|
363
|
+
insured.birthPlace = new Value();
|
|
335
364
|
insured.registrationMicroDistrict = '';
|
|
336
365
|
insured.registrationNumberApartment = '';
|
|
337
366
|
insured.registrationNumberApartment = '';
|
|
@@ -354,6 +383,13 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
|
|
|
354
383
|
const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
|
|
355
384
|
insured.registrationCity = city ?? new Value();
|
|
356
385
|
}
|
|
386
|
+
const contragentData = insured.response.contragent;
|
|
387
|
+
if (contragentData) {
|
|
388
|
+
const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
|
|
389
|
+
insured.birthPlace = country ?? new Value();
|
|
390
|
+
} else {
|
|
391
|
+
insured.birthPlace = new Value();
|
|
392
|
+
}
|
|
357
393
|
const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
|
|
358
394
|
const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
|
|
359
395
|
const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
|
|
@@ -473,7 +509,7 @@ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
|
|
|
473
509
|
test: 'http://aml-dev.halyklife.nb/api',
|
|
474
510
|
},
|
|
475
511
|
};
|
|
476
|
-
return valuesPerEnv[which][import.meta.env.VITE_MODE];
|
|
512
|
+
return valuesPerEnv[which][import.meta.env.VITE_MODE as EnvModes];
|
|
477
513
|
};
|
|
478
514
|
|
|
479
515
|
export const getMainPageRoute = () => {
|
|
@@ -609,3 +645,206 @@ export const isEveryFormDisabled = (isDisabledForm: any) => {
|
|
|
609
645
|
};
|
|
610
646
|
|
|
611
647
|
export class ApiError extends AxiosError<any, any> {}
|
|
648
|
+
|
|
649
|
+
export class ProcessController {
|
|
650
|
+
isProcessEditable = (statusCode?: keyof typeof Statuses) => {
|
|
651
|
+
const getEditibleStatuses = () => {
|
|
652
|
+
const defaultStatuses = constants.editableStatuses;
|
|
653
|
+
return defaultStatuses;
|
|
654
|
+
};
|
|
655
|
+
return !!getEditibleStatuses().find(status => status === statusCode);
|
|
656
|
+
};
|
|
657
|
+
isProcessReturnable = (statusCode?: keyof typeof Statuses) => {
|
|
658
|
+
const getReturnableStatuses = () => {
|
|
659
|
+
const defaultStatuses = constants.returnStatementStatuses;
|
|
660
|
+
return defaultStatuses;
|
|
661
|
+
};
|
|
662
|
+
return !!getReturnableStatuses().find(status => status === statusCode);
|
|
663
|
+
};
|
|
664
|
+
isProcessCancel = (statusCode?: keyof typeof Statuses) => {
|
|
665
|
+
const getCanceleStatuses = () => {
|
|
666
|
+
const defaultStatuses = constants.cancelApplicationStatuses;
|
|
667
|
+
return defaultStatuses;
|
|
668
|
+
};
|
|
669
|
+
return !!getCanceleStatuses().find(status => status === statusCode);
|
|
670
|
+
};
|
|
671
|
+
isProcessReject = (statusCode?: keyof typeof Statuses) => {
|
|
672
|
+
const getRejectStatuses = () => {
|
|
673
|
+
const defaultStatuses = constants.rejectApplicationStatuses;
|
|
674
|
+
return defaultStatuses;
|
|
675
|
+
};
|
|
676
|
+
return !!getRejectStatuses().find(status => status === statusCode);
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export class RoleController {
|
|
681
|
+
user: User = new User();
|
|
682
|
+
|
|
683
|
+
isRole = (whichRole: keyof typeof Roles) => {
|
|
684
|
+
if (this.user.roles.length === 0) {
|
|
685
|
+
const token = localStorage.getItem('accessToken') || null;
|
|
686
|
+
if (token) {
|
|
687
|
+
const decoded = jwtDecode(token);
|
|
688
|
+
if (decoded) {
|
|
689
|
+
this.user.id = String(decoded.sub);
|
|
690
|
+
this.user.fullName = `${decoded.lastName} ${decoded.firstName} ${decoded.middleName ?? ''}`;
|
|
691
|
+
this.user.code = decoded.code;
|
|
692
|
+
this.user.branchCode = decoded.branchCode;
|
|
693
|
+
const key = getKeyWithPattern(decoded, 'role');
|
|
694
|
+
if (key) {
|
|
695
|
+
const roles = decoded[key as keyof Utils.JwtToken];
|
|
696
|
+
if (typeof roles === 'string') {
|
|
697
|
+
this.user.roles.push(roles);
|
|
698
|
+
} else if (typeof roles === 'object') {
|
|
699
|
+
this.user.roles = roles;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
return !!this.user.roles.find(i => i === whichRole);
|
|
706
|
+
};
|
|
707
|
+
isInitiator = (productFromExternal?: string) => {
|
|
708
|
+
const env = useEnv();
|
|
709
|
+
const dataStore = useDataStore();
|
|
710
|
+
const hasAccessByProduct = (() => {
|
|
711
|
+
const product = productFromExternal as Projects;
|
|
712
|
+
if (dataStore.isLifetrip || product === 'lifetrip' || (!env.isProduction && (dataStore.isPension || product === 'pensionannuitynew'))) return this.isBranchDirector();
|
|
713
|
+
return false;
|
|
714
|
+
})();
|
|
715
|
+
return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
|
|
716
|
+
};
|
|
717
|
+
isManager = () => {
|
|
718
|
+
return this.isRole(constants.roles.Manager);
|
|
719
|
+
};
|
|
720
|
+
isCompliance = () => {
|
|
721
|
+
return this.isRole(constants.roles.Compliance);
|
|
722
|
+
};
|
|
723
|
+
isAdmin = () => {
|
|
724
|
+
return this.isRole(constants.roles.Admin);
|
|
725
|
+
};
|
|
726
|
+
isJurist = () => {
|
|
727
|
+
return this.isRole(constants.roles.Jurist);
|
|
728
|
+
};
|
|
729
|
+
isAgent = () => {
|
|
730
|
+
return this.isRole(constants.roles.Agent);
|
|
731
|
+
};
|
|
732
|
+
isManagerHalykBank = () => {
|
|
733
|
+
return this.isRole(constants.roles.ManagerHalykBank);
|
|
734
|
+
};
|
|
735
|
+
isServiceManager = () => {
|
|
736
|
+
return this.isRole(constants.roles.ServiceManager);
|
|
737
|
+
};
|
|
738
|
+
isUnderwriter = () => {
|
|
739
|
+
return this.isRole(constants.roles.Underwriter);
|
|
740
|
+
};
|
|
741
|
+
isActuary = () => {
|
|
742
|
+
return this.isRole(constants.roles.Actuary);
|
|
743
|
+
};
|
|
744
|
+
isAgentMycar = () => {
|
|
745
|
+
return this.isRole(constants.roles.AgentMycar);
|
|
746
|
+
};
|
|
747
|
+
isAgentAuletti = () => {
|
|
748
|
+
return this.isRole(constants.roles.AgentAuletti);
|
|
749
|
+
};
|
|
750
|
+
isManagerAuletti = () => {
|
|
751
|
+
return this.isRole(constants.roles.ManagerAuletti);
|
|
752
|
+
};
|
|
753
|
+
isAnalyst = () => {
|
|
754
|
+
return this.isRole(constants.roles.Analyst);
|
|
755
|
+
};
|
|
756
|
+
isUpk = () => {
|
|
757
|
+
return this.isRole(constants.roles.UPK);
|
|
758
|
+
};
|
|
759
|
+
isUrp = () => {
|
|
760
|
+
return this.isRole(constants.roles.URP);
|
|
761
|
+
};
|
|
762
|
+
isUsns = () => {
|
|
763
|
+
return this.isRole(constants.roles.USNS);
|
|
764
|
+
};
|
|
765
|
+
isAccountant = () => {
|
|
766
|
+
return this.isRole(constants.roles.Accountant);
|
|
767
|
+
};
|
|
768
|
+
isDrn = () => {
|
|
769
|
+
return this.isRole(constants.roles.DRNSJ);
|
|
770
|
+
};
|
|
771
|
+
isSupport = () => {
|
|
772
|
+
return this.isRole(constants.roles.Support);
|
|
773
|
+
};
|
|
774
|
+
isFinCenter = () => {
|
|
775
|
+
return this.isRole(constants.roles.FinCenter);
|
|
776
|
+
};
|
|
777
|
+
isSupervisor = () => {
|
|
778
|
+
return this.isRole(constants.roles.Supervisor);
|
|
779
|
+
};
|
|
780
|
+
isHeadManager = () => {
|
|
781
|
+
return this.isRole(constants.roles.HeadManager);
|
|
782
|
+
};
|
|
783
|
+
isBranchDirector = () => {
|
|
784
|
+
return this.isRole(constants.roles.BranchDirector);
|
|
785
|
+
};
|
|
786
|
+
isUSNSACCINS = () => {
|
|
787
|
+
return this.isRole(constants.roles.USNSACCINS);
|
|
788
|
+
};
|
|
789
|
+
isDsuio = () => {
|
|
790
|
+
return this.isRole(constants.roles.Dsuio);
|
|
791
|
+
};
|
|
792
|
+
isAdjuster = () => {
|
|
793
|
+
return this.isRole(constants.roles.SettlementLosses);
|
|
794
|
+
};
|
|
795
|
+
isHeadAdjuster = () => {
|
|
796
|
+
return this.isRole(constants.roles.HeadSettlementLosses);
|
|
797
|
+
};
|
|
798
|
+
isDsoDirector = () => {
|
|
799
|
+
return this.isRole(constants.roles.DsoDirector);
|
|
800
|
+
};
|
|
801
|
+
isAccountantDirector = () => {
|
|
802
|
+
return this.isRole(constants.roles.AccountantDirector);
|
|
803
|
+
};
|
|
804
|
+
isHeadOfDso = () => {
|
|
805
|
+
return this.isRole(constants.roles.HeadOfDso);
|
|
806
|
+
};
|
|
807
|
+
isUrsp = () => {
|
|
808
|
+
return this.isRole(constants.roles.URSP);
|
|
809
|
+
};
|
|
810
|
+
hasAccess = () => {
|
|
811
|
+
const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn();
|
|
812
|
+
return {
|
|
813
|
+
invoiceInfo: this.isAdmin() || this.isSupport(),
|
|
814
|
+
toLKA: this.isAgent() || this.isManagerHalykBank() || baseAccessRoles,
|
|
815
|
+
toAML: this.isCompliance() || baseAccessRoles,
|
|
816
|
+
toAULETTI: this.isAgentAuletti() || this.isManagerAuletti() || baseAccessRoles,
|
|
817
|
+
toLKA_A: this.isAgentAuletti() || baseAccessRoles,
|
|
818
|
+
toEFO:
|
|
819
|
+
this.isManager() ||
|
|
820
|
+
this.isAgent() ||
|
|
821
|
+
this.isAgentMycar() ||
|
|
822
|
+
this.isManagerHalykBank() ||
|
|
823
|
+
this.isHeadManager() ||
|
|
824
|
+
this.isServiceManager() ||
|
|
825
|
+
this.isUnderwriter() ||
|
|
826
|
+
this.isActuary() ||
|
|
827
|
+
this.isAdmin() ||
|
|
828
|
+
this.isCompliance() ||
|
|
829
|
+
this.isAnalyst() ||
|
|
830
|
+
this.isUpk() ||
|
|
831
|
+
this.isFinCenter() ||
|
|
832
|
+
this.isSupervisor() ||
|
|
833
|
+
this.isSupport() ||
|
|
834
|
+
this.isDrn() ||
|
|
835
|
+
this.isUrp() ||
|
|
836
|
+
this.isUsns() ||
|
|
837
|
+
this.isJurist() ||
|
|
838
|
+
this.isAccountant() ||
|
|
839
|
+
this.isBranchDirector() ||
|
|
840
|
+
this.isUSNSACCINS() ||
|
|
841
|
+
this.isDsuio() ||
|
|
842
|
+
this.isAdjuster() ||
|
|
843
|
+
this.isDsoDirector() ||
|
|
844
|
+
this.isAccountantDirector() ||
|
|
845
|
+
this.isHeadAdjuster() ||
|
|
846
|
+
this.isHeadOfDso() ||
|
|
847
|
+
this.isUrsp(),
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
}
|
package/composables/styles.ts
CHANGED
|
@@ -15,24 +15,13 @@ export class Styles {
|
|
|
15
15
|
blueTextLight: string = 'text-[#F3F6FC]';
|
|
16
16
|
|
|
17
17
|
// Green
|
|
18
|
-
greenBg: string =
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
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
|
|
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 (
|
|
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);
|
package/layouts/default.vue
CHANGED
|
@@ -52,7 +52,7 @@ const onBack = async (item: MenuItem) => {
|
|
|
52
52
|
|
|
53
53
|
const onInit = async () => {
|
|
54
54
|
const projectConfig = dataStore.projectConfig;
|
|
55
|
-
if (
|
|
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 (
|
|
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 лет",
|
|
@@ -133,15 +135,20 @@
|
|
|
133
135
|
"templateDownloaded": "Шаблон скачан",
|
|
134
136
|
"templateSentToEmail": "Шаблона отправлен на почту",
|
|
135
137
|
"fileOnlyBelow5mb": "Максимальный размер документа для загрузки - 5 МБ.",
|
|
138
|
+
"fileOnlyBelow10mb": "Максимальный размер документа для загрузки - 10 МБ.",
|
|
136
139
|
"fileOnlyBelow20mb": "Максимальный размер документа для загрузки - 20 МБ.",
|
|
137
140
|
"onlyPDF": "Загружать документы можно только в формате PDF",
|
|
141
|
+
"onlyWithFormat": "Загружать документы можно только в формате {format}",
|
|
138
142
|
"notAllDocumentsAttached": "Не все документы вложены",
|
|
139
143
|
"needAttachQuestionnaire": "Нужно вложить анкету для клиентов",
|
|
140
144
|
"notZeroPremium": "Общая страховая премия не должен быть 0",
|
|
141
145
|
"requiredFieldsLB": "Обязательные поля: №, Ф.И.О, Пол, Должность, Дата рождения, ИИН, Страховая сумма",
|
|
142
146
|
"duplicateClient": "В списке присутствуют повторяющиеся клиенты",
|
|
143
147
|
"notParsedDocument": "Не удалось получить данные",
|
|
144
|
-
"
|
|
148
|
+
"successProfile": "Профиль успешно обновлен",
|
|
149
|
+
"errorOsns": "По данному БИН на дату заключения заявления не найден договор ОСНС. Просим проверить БИН Страхователя.",
|
|
150
|
+
"needDigDoc": "Нужно получить цифровой документ {text}",
|
|
151
|
+
"notDigDoc": "Выданный документ не найден"
|
|
145
152
|
},
|
|
146
153
|
"notSignedContract": "Неподписанный Договор",
|
|
147
154
|
"Contract": "Договор страхования",
|
|
@@ -237,7 +244,9 @@
|
|
|
237
244
|
"signContract": "Заключить Договор",
|
|
238
245
|
"sendDosie": "Отправить досье",
|
|
239
246
|
"downloadPaymentInvoice": "Скачать счет на оплату",
|
|
240
|
-
"copyToClient": "Скопировать ссылку для клиента"
|
|
247
|
+
"copyToClient": "Скопировать ссылку для клиента",
|
|
248
|
+
"searchByFio": "Поиск по ФИО",
|
|
249
|
+
"conclude": "Заключить"
|
|
241
250
|
},
|
|
242
251
|
"dialog": {
|
|
243
252
|
"title": "Подтверждение",
|
|
@@ -276,7 +285,9 @@
|
|
|
276
285
|
"choosePay": "Вы действительно хотите выбрать метод оплаты?",
|
|
277
286
|
"searchBeneficiary": "Выполните поиск договоров по ИИН Выгодоприобретателя",
|
|
278
287
|
"searchFoundBeneficiary": "По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
|
|
279
|
-
"searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
|
|
288
|
+
"searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”",
|
|
289
|
+
"searchFoundPolicyholder": "Выполните поиск договоров по БИН Страхователя",
|
|
290
|
+
"searchNotFoundPolicyholder": "По данному БИНу не найден договор {product}.\nПроверьте правильность ввода БИН."
|
|
280
291
|
},
|
|
281
292
|
"sign": {
|
|
282
293
|
"chooseDoc": "Выберите документы для подписание",
|
|
@@ -364,6 +375,7 @@
|
|
|
364
375
|
"downloadTemplate": "Скачать шаблон",
|
|
365
376
|
"countriesLength": "Число выбранных стран",
|
|
366
377
|
"isPolicyholderLegalEntity": "Является ли Страхователь Юридическим лицом?",
|
|
378
|
+
"additionalAgreement": "Заключить дополнительное соглашение",
|
|
367
379
|
"productConditionsForm": {
|
|
368
380
|
"coverPeriod": "Срок страхования",
|
|
369
381
|
"payPeriod": "Период оплаты страховой премии",
|
|
@@ -391,6 +403,7 @@
|
|
|
391
403
|
"insurancePremiumAmount": "Размер Страховой премии (страховой взнос) в тенге",
|
|
392
404
|
"insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
|
|
393
405
|
"dollarExchangeRateNBRK": "Курс доллара НБРК",
|
|
406
|
+
"exchangeRateSettlementDate": "Курс на дату расчета (USD/KZT)",
|
|
394
407
|
"contractDate": "Дата контракта",
|
|
395
408
|
"guaranteedTermAnnuityPayments": "Гарантированный срок аннуитетных выплат",
|
|
396
409
|
"guaranteedPeriod": "Укажите период гарантированного срока",
|
|
@@ -413,7 +426,9 @@
|
|
|
413
426
|
"alfa": "Расходы от премии, в %",
|
|
414
427
|
"gamma": "Расходы от выплат, в %",
|
|
415
428
|
"mrpPayment": "Выплата на погребение (в тенге)",
|
|
416
|
-
"fixInsSum": "Фиксированная сумма"
|
|
429
|
+
"fixInsSum": "Фиксированная сумма",
|
|
430
|
+
"amountRefunded": "Сумма к возврату",
|
|
431
|
+
"amountPaid": "Сумма к доплате"
|
|
417
432
|
},
|
|
418
433
|
"calculatorForm": {
|
|
419
434
|
"selectedCountries": "Выбранные страны",
|
|
@@ -450,7 +465,8 @@
|
|
|
450
465
|
"factEndDate": "Дата завершения",
|
|
451
466
|
"decision": "Статус",
|
|
452
467
|
"userFullName": "Исполнитель",
|
|
453
|
-
"stage": "Этап"
|
|
468
|
+
"stage": "Этап",
|
|
469
|
+
"policyNumber": "№ Полиса"
|
|
454
470
|
},
|
|
455
471
|
"aml": {
|
|
456
472
|
"contractSignDate": "Дата заключение контракта",
|
|
@@ -551,8 +567,8 @@
|
|
|
551
567
|
"frequencyPayments": "Периодичность аннуитетной выплаты",
|
|
552
568
|
"paymentPeriod": "Период осуществления страховых выплат",
|
|
553
569
|
"insuranceProgramType": "Вид программы страхования",
|
|
554
|
-
"pensionAmount": "
|
|
555
|
-
"pensionPayment": "
|
|
570
|
+
"pensionAmount": "Страховая премия",
|
|
571
|
+
"pensionPayment": "Аннуитетная выплата, тенге:",
|
|
556
572
|
"male": "Мужской",
|
|
557
573
|
"female": "Женский",
|
|
558
574
|
"parentContractID": "Идентификатор родительского контракта",
|
|
@@ -563,7 +579,7 @@
|
|
|
563
579
|
"KSJagreement": "Договор с другой КСЖ",
|
|
564
580
|
"ENPFnote": "Выписка из ЕНПФ",
|
|
565
581
|
"getDataENPF": "Получить данные с ЕНПФ",
|
|
566
|
-
"compulsoryProfMonthCount": "Количество месяцев уплаты ОППВ (не менее
|
|
582
|
+
"compulsoryProfMonthCount": "Количество месяцев уплаты ОППВ (не менее 60 месяцев)",
|
|
567
583
|
"insuredIIN": "ИИН «Страхователя»",
|
|
568
584
|
"ifHasRelationBeneficiary": "Включите, если у Страхователя есть Родственные связи с Выгодоприобретателем",
|
|
569
585
|
"complianceFinMonitoring": "Приложение 6/ПОДФТ",
|
|
@@ -574,9 +590,16 @@
|
|
|
574
590
|
"transferContractFirstPaymentDate": "Дата начала выплат по договору с КСЖ",
|
|
575
591
|
"companyName": "Наименование компании по страхованию жизни",
|
|
576
592
|
"bankInvalid": "Некорректные банковские данные",
|
|
577
|
-
"globalId": "Уникальный номер договора (globalId)",
|
|
593
|
+
"globalId": "Уникальный номер договора с ЕСБД (globalId)",
|
|
578
594
|
"oppvMonthsCheck": "ВНИМАНИЕ! НЕОБХОДИМО ПРОВЕРИТЬ НАЛИЧИЕ ОТЧИСЛЕНИЙ 60 МЕСЯЦЕВ ПО ПРИЗНАКУ 'ОППВ'",
|
|
579
|
-
"signInProcess": "
|
|
595
|
+
"signInProcess": "После подписания всех документов данная заявка перейдет к Подписанту вашего Региона",
|
|
596
|
+
"signInProcessManager": "Договор будет подписан в течение минуты",
|
|
597
|
+
"transferRegNumber": "Номер и серия договора с КСЖ",
|
|
598
|
+
"contragentSelect": "Выбор контрагента",
|
|
599
|
+
"fileError": "Ошибка прикрепления файла",
|
|
600
|
+
"parentContractNextPay": "Возврат с учетом очередной выплаты",
|
|
601
|
+
"parentContractNextPayDate": "Очередная выплата по графику",
|
|
602
|
+
"oppvPaymentCertificate": "Справка о количество взносов за счет ОППВ"
|
|
580
603
|
},
|
|
581
604
|
"agent": {
|
|
582
605
|
"currency": "Валюта",
|
|
@@ -785,6 +808,7 @@
|
|
|
785
808
|
"resetPassword": "Забыли пароль?",
|
|
786
809
|
"search": "Поиск",
|
|
787
810
|
"searchByIIN": "Поиск по ИИН",
|
|
811
|
+
"searchByBIN": "Поиск по БИН",
|
|
788
812
|
"chooseScannedDoc": "Выбрать отсканированный документ",
|
|
789
813
|
"inputText": "Введите текст",
|
|
790
814
|
"waitingStatus": "Ожидание",
|
|
@@ -836,6 +860,7 @@
|
|
|
836
860
|
"email": "Неправильный адрес электронной почты",
|
|
837
861
|
"numbers": "Поле должно содержать только цифры",
|
|
838
862
|
"latinAndNumber": "Поле должно содержать только цифры и латинские символы",
|
|
863
|
+
"latinNumberSymbol": "Поле должно содержать только цифры и латинские буквы, символы(/,-)",
|
|
839
864
|
"numbersSymbols": "Поле должно содержать цифры",
|
|
840
865
|
"ageExceeds": "Год не может превышать больше 50 лет",
|
|
841
866
|
"ageExceeds80": "Возраст не может превышать больше 80 лет",
|
|
@@ -864,7 +889,8 @@
|
|
|
864
889
|
"agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
|
|
865
890
|
"checkDate": "Укажите корректную дату",
|
|
866
891
|
"searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов",
|
|
867
|
-
"fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг"
|
|
892
|
+
"fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг",
|
|
893
|
+
"lengthLimit": "Превышен лимит символов. Введите текст длиной не более {len} символов"
|
|
868
894
|
},
|
|
869
895
|
"code": "КСЭ",
|
|
870
896
|
"fontSize": "Размер шрифта",
|
|
@@ -944,6 +970,9 @@
|
|
|
944
970
|
"documentNumber": "Номер документа",
|
|
945
971
|
"date": "Дата",
|
|
946
972
|
"documentIssuers": "Кем выдан",
|
|
973
|
+
"issuerOtherName": "Название органа выдачи на казахском",
|
|
974
|
+
"issuerOtherNameRu": "Название органа выдачи на русском",
|
|
975
|
+
"issuerOtherNameOrig": "Оригинальное название органа выдачи",
|
|
947
976
|
"documentDate": "Дата выдачи",
|
|
948
977
|
"documentExpire": "Действует до",
|
|
949
978
|
"signOfResidency": "Признак резиденства",
|
|
@@ -991,7 +1020,8 @@
|
|
|
991
1020
|
"recipientDocs": "Документы Получателя",
|
|
992
1021
|
"recipientData": "Сведения о Получателе",
|
|
993
1022
|
"deathInsFromNS": "Страхование от смерти от НС",
|
|
994
|
-
"deathInsAnyReason": "Смерть Застрахованного по любой причине"
|
|
1023
|
+
"deathInsAnyReason": "Смерть Застрахованного по любой причине",
|
|
1024
|
+
"mark": "Признак"
|
|
995
1025
|
},
|
|
996
1026
|
"bankDetailsForm": {
|
|
997
1027
|
"title": "Банковские реквизиты",
|