hl-core 0.0.10-beta.11 → 0.0.10-beta.13
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/components/Pages/MemberForm.vue +11 -6
- package/nuxt.config.ts +8 -0
- package/package.json +1 -1
- package/store/data.store.ts +10 -6
- package/types/enum.ts +1 -1
- package/types/index.ts +3 -3
|
@@ -790,7 +790,7 @@
|
|
|
790
790
|
<script lang="ts">
|
|
791
791
|
import { Value, DocumentItem, Member } from '../../composables/classes';
|
|
792
792
|
import { uuid } from 'vue-uuid';
|
|
793
|
-
import { StoreMembers,
|
|
793
|
+
import { StoreMembers, CoreEnums } from '../../types/enum';
|
|
794
794
|
import type { Api, Dicts, ESBDValidationType, FileActions, MultipleMember } from '../../types';
|
|
795
795
|
|
|
796
796
|
export default {
|
|
@@ -1326,7 +1326,7 @@ export default {
|
|
|
1326
1326
|
if (parsedDocument.middleName) member.value.middleName = parsedDocument.middleName;
|
|
1327
1327
|
if (parsedDocument.fullName) member.value.longName = parsedDocument.fullName;
|
|
1328
1328
|
if (parsedDocument.documentName && parsedDocument.documentName.startsWith('Kazakhstan - Id Card')) {
|
|
1329
|
-
const documentType = dataStore.documentTypes.find((i: Value) => i.ids ===
|
|
1329
|
+
const documentType = dataStore.documentTypes.find((i: Value) => i.ids === CoreEnums.Insis.DocTypes['1UDL']);
|
|
1330
1330
|
if (documentType) member.value.documentType = documentType;
|
|
1331
1331
|
}
|
|
1332
1332
|
if (!!parsedDocument.documentIssuer) {
|
|
@@ -1430,7 +1430,9 @@ export default {
|
|
|
1430
1430
|
|
|
1431
1431
|
const selectGbdDocument = (document: Api.GBD.Document) => {
|
|
1432
1432
|
if (document) {
|
|
1433
|
-
const documentType = dataStore.documentTypes.find(
|
|
1433
|
+
const documentType = dataStore.documentTypes.find(
|
|
1434
|
+
(i: Value) => i.ids === Object.keys(CoreEnums.GBD.DocTypes)[Object.values(CoreEnums.GBD.DocTypes).indexOf(document.type.code)],
|
|
1435
|
+
);
|
|
1434
1436
|
if (documentType) member.value.documentType = documentType;
|
|
1435
1437
|
const documentNumber = document.number;
|
|
1436
1438
|
if (documentNumber) member.value.documentNumber = documentNumber;
|
|
@@ -1624,7 +1626,10 @@ export default {
|
|
|
1624
1626
|
const docType = member.value.documentType.ids;
|
|
1625
1627
|
if (
|
|
1626
1628
|
member.value.gotFromInsis === true &&
|
|
1627
|
-
(docType ===
|
|
1629
|
+
(docType === CoreEnums.Insis.DocTypes['1UDL'] ||
|
|
1630
|
+
docType === CoreEnums.Insis.DocTypes.SBI ||
|
|
1631
|
+
docType === CoreEnums.Insis.DocTypes.PS ||
|
|
1632
|
+
docType === CoreEnums.Insis.DocTypes.VNZ)
|
|
1628
1633
|
) {
|
|
1629
1634
|
dataStore.isLoading = true;
|
|
1630
1635
|
const docTypeCodes = {
|
|
@@ -1824,9 +1829,9 @@ export default {
|
|
|
1824
1829
|
if (dataStore.isLifetrip) {
|
|
1825
1830
|
const documentByPriority = (() => {
|
|
1826
1831
|
if (whichForm.value !== formStore.policyholderFormKey || formStore.isPolicyholderInsured === true) {
|
|
1827
|
-
return member.value.documentsList.find(i => i.type ===
|
|
1832
|
+
return member.value.documentsList.find(i => i.type === CoreEnums.Insis.DocTypes.PS);
|
|
1828
1833
|
}
|
|
1829
|
-
return member.value.documentsList.find(i => i.type ===
|
|
1834
|
+
return member.value.documentsList.find(i => i.type === CoreEnums.Insis.DocTypes['1UDL']);
|
|
1830
1835
|
})();
|
|
1831
1836
|
const userDocument = documentByPriority ? documentByPriority : member.value.documentsList[0];
|
|
1832
1837
|
const documentType = dataStore.documentTypes.find((i: Value) => i.ids === userDocument.type);
|
package/nuxt.config.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import VueI18nVitePlugin from '@intlify/unplugin-vue-i18n';
|
|
3
|
+
|
|
1
4
|
export default defineNuxtConfig({
|
|
2
5
|
ssr: false,
|
|
3
6
|
spaLoadingTemplate: false,
|
|
@@ -21,6 +24,11 @@ export default defineNuxtConfig({
|
|
|
21
24
|
},
|
|
22
25
|
},
|
|
23
26
|
},
|
|
27
|
+
plugins: [
|
|
28
|
+
VueI18nVitePlugin.vite({
|
|
29
|
+
include: [path.resolve(__dirname, './src/locales/**')],
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
24
32
|
},
|
|
25
33
|
|
|
26
34
|
vue: { propsDestructure: true },
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { DataStoreClass, DocumentItem, Member, Value, CountryValue, Policyholder
|
|
|
7
7
|
import { ApiClass } from '../api';
|
|
8
8
|
import { useFormStore } from './form.store';
|
|
9
9
|
import { AxiosError } from 'axios';
|
|
10
|
-
import { PostActions, StoreMembers, Roles, Statuses, MemberCodes, MemberAppCodes,
|
|
10
|
+
import { PostActions, StoreMembers, Roles, Statuses, MemberCodes, MemberAppCodes, CoreEnums } from '../types/enum';
|
|
11
11
|
import type * as Types from '../types';
|
|
12
12
|
//@ts-ignore
|
|
13
13
|
import { NCALayerClient } from 'ncalayer-js-client';
|
|
@@ -566,7 +566,7 @@ export const useDataStore = defineStore('data', {
|
|
|
566
566
|
|
|
567
567
|
if ('documents' in user && user.documents && user.documents.length) {
|
|
568
568
|
member.documentsList = user.documents;
|
|
569
|
-
const documentByPriority = user.documents.find(i => i.type ===
|
|
569
|
+
const documentByPriority = user.documents.find(i => i.type === CoreEnums.Insis.DocTypes['1UDL']);
|
|
570
570
|
const userDocument = documentByPriority ? documentByPriority : user.documents[0];
|
|
571
571
|
const documentType = this.documentTypes.find((i: Value) => i.ids === userDocument.type);
|
|
572
572
|
const documentIssuer = this.documentIssuers.find((i: Value) => i.nameRu === userDocument.issuerNameRu);
|
|
@@ -3422,10 +3422,12 @@ export const useDataStore = defineStore('data', {
|
|
|
3422
3422
|
i =>
|
|
3423
3423
|
new Date(i.endDate) > new Date(Date.now()) &&
|
|
3424
3424
|
i.status.code === '00' &&
|
|
3425
|
-
(i.type.code ===
|
|
3425
|
+
(i.type.code === CoreEnums.GBD.DocTypes['1UDL'] || i.type.code === CoreEnums.GBD.DocTypes.VNZ || i.type.code === CoreEnums.GBD.DocTypes.PS),
|
|
3426
3426
|
);
|
|
3427
3427
|
if (validDocument) {
|
|
3428
|
-
const documentType = this.documentTypes.find(
|
|
3428
|
+
const documentType = this.documentTypes.find(
|
|
3429
|
+
(i: Value) => i.ids === Object.keys(CoreEnums.GBD.DocTypes)[Object.values(CoreEnums.GBD.DocTypes).indexOf(validDocument.type.code)],
|
|
3430
|
+
);
|
|
3429
3431
|
if (documentType) member.documentType = documentType;
|
|
3430
3432
|
if (validDocument.number) member.documentNumber = validDocument.number;
|
|
3431
3433
|
if (validDocument.beginDate) member.documentDate = reformatDate(validDocument.beginDate);
|
|
@@ -3438,9 +3440,11 @@ export const useDataStore = defineStore('data', {
|
|
|
3438
3440
|
if (
|
|
3439
3441
|
personDoc.status.code === '00' &&
|
|
3440
3442
|
new Date(personDoc.endDate) > new Date(Date.now()) &&
|
|
3441
|
-
(personDoc.type.code ===
|
|
3443
|
+
(personDoc.type.code === CoreEnums.GBD.DocTypes['1UDL'] || personDoc.type.code === CoreEnums.GBD.DocTypes.VNZ || personDoc.type.code === CoreEnums.GBD.DocTypes.PS)
|
|
3442
3444
|
) {
|
|
3443
|
-
const documentType = this.documentTypes.find(
|
|
3445
|
+
const documentType = this.documentTypes.find(
|
|
3446
|
+
(i: Value) => i.ids === Object.keys(CoreEnums.GBD.DocTypes)[Object.values(CoreEnums.GBD.DocTypes).indexOf(personDoc.type.code)],
|
|
3447
|
+
);
|
|
3444
3448
|
if (documentType) member.documentType = documentType;
|
|
3445
3449
|
const documentNumber = personDoc.number;
|
|
3446
3450
|
if (documentNumber) member.documentNumber = documentNumber;
|
package/types/enum.ts
CHANGED
package/types/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value } from '../composables/classes';
|
|
2
2
|
import type { RouteLocationNormalizedLoaded, RouteLocationNormalized } from 'vue-router';
|
|
3
3
|
import type { AxiosRequestConfig } from 'axios';
|
|
4
|
-
import { Methods,
|
|
5
|
-
export { Methods,
|
|
4
|
+
import { Methods, CoreEnums, Actions, Statuses } from './enum';
|
|
5
|
+
export { Methods, CoreEnums, Actions, Statuses };
|
|
6
6
|
|
|
7
7
|
export type EnvModes = 'development' | 'test' | 'production';
|
|
8
8
|
export type Projects =
|
|
@@ -761,7 +761,7 @@ export namespace Api {
|
|
|
761
761
|
changeDate: string;
|
|
762
762
|
};
|
|
763
763
|
export type Document = {
|
|
764
|
-
type: Api.GBD.Dict & { code:
|
|
764
|
+
type: Api.GBD.Dict & { code: CoreEnums.GBD.DocTypes };
|
|
765
765
|
beginDate: string;
|
|
766
766
|
endDate: string;
|
|
767
767
|
number: string;
|