hl-core 0.0.10-beta.12 → 0.0.10-beta.14

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.
@@ -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, Enums } from '../../types/enum';
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 === Enums.Insis.DocTypes['1UDL']);
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((i: Value) => i.ids === Object.keys(Enums.GBD.DocTypes)[Object.values(Enums.GBD.DocTypes).indexOf(document.type.code)]);
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 === Enums.Insis.DocTypes['1UDL'] || docType === Enums.Insis.DocTypes.SBI || docType === Enums.Insis.DocTypes.PS || docType === Enums.Insis.DocTypes.VNZ)
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 === Enums.Insis.DocTypes.PS);
1832
+ return member.value.documentsList.find(i => i.type === CoreEnums.Insis.DocTypes.PS);
1828
1833
  }
1829
- return member.value.documentsList.find(i => i.type === Enums.Insis.DocTypes['1UDL']);
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/configs/pwa.ts CHANGED
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.12",
3
+ "version": "0.0.10-beta.14",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -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, Enums } from '../types/enum';
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 === Enums.Insis.DocTypes['1UDL']);
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 === Enums.GBD.DocTypes['1UDL'] || i.type.code === Enums.GBD.DocTypes.VNZ || i.type.code === Enums.GBD.DocTypes.PS),
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((i: Value) => i.ids === Object.keys(Enums.GBD.DocTypes)[Object.values(Enums.GBD.DocTypes).indexOf(validDocument.type.code)]);
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 === Enums.GBD.DocTypes['1UDL'] || personDoc.type.code === Enums.GBD.DocTypes.VNZ || personDoc.type.code === Enums.GBD.DocTypes.PS)
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((i: Value) => i.ids === Object.keys(Enums.GBD.DocTypes)[Object.values(Enums.GBD.DocTypes).indexOf(personDoc.type.code)]);
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
@@ -146,7 +146,7 @@ export enum Methods {
146
146
  POST = 'POST',
147
147
  }
148
148
 
149
- export namespace Enums {
149
+ export namespace CoreEnums {
150
150
  export namespace GBD {
151
151
  export enum DocTypes {
152
152
  'PS' = '001',
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, Enums, Actions, Statuses } from './enum';
5
- export { Methods, Enums, Actions, Statuses };
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: Enums.GBD.DocTypes };
764
+ type: Api.GBD.Dict & { code: CoreEnums.GBD.DocTypes };
765
765
  beginDate: string;
766
766
  endDate: string;
767
767
  number: string;