hl-core 0.0.7-beta.8 → 0.0.7-beta.9

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.
@@ -4,35 +4,61 @@ import {
4
4
  RouteLocationNormalizedLoaded,
5
5
  } from 'vue-router';
6
6
 
7
- export class MenuItem {
7
+ type LinkType =
8
+ | RouteLocationNormalized
9
+ | RouteLocationNormalizedLoaded
10
+ | string
11
+ | null
12
+ | boolean;
13
+
14
+ class MenuItemConfig {
8
15
  id: any;
9
16
  title: string | null;
10
- link?:
11
- | RouteLocationNormalized
12
- | RouteLocationNormalizedLoaded
13
- | null
14
- | boolean;
15
- initial: any;
16
- line: boolean;
17
- description?: string;
17
+ link?: LinkType;
18
+ hasLine?: boolean;
19
+ description?: string | null;
20
+ url?: string | null;
21
+ initial?: object | null;
22
+ icon?: string | null;
23
+ action?: Function;
18
24
  constructor(
19
25
  id: any = null,
20
26
  title: string | null = null,
21
- initial: any = null,
22
- link?:
23
- | RouteLocationNormalized
24
- | RouteLocationNormalizedLoaded
25
- | null
26
- | boolean,
27
- line: boolean = false,
28
- description?: string,
27
+ link?: LinkType,
28
+ hasLine?: boolean,
29
+ description?: string | null,
30
+ url?: string | null,
31
+ initial?: object | null,
32
+ icon?: string | null,
33
+ action?: Function,
29
34
  ) {
30
35
  this.id = id;
31
36
  this.title = title;
32
- this.initial = initial;
33
37
  this.link = link;
34
- this.line = line;
38
+ this.hasLine = hasLine;
35
39
  this.description = description;
40
+ this.url = url;
41
+ this.initial = initial;
42
+ this.icon = icon;
43
+ this.action = action;
44
+ }
45
+ }
46
+
47
+ export class MenuItem extends MenuItemConfig {
48
+ constructor(
49
+ {
50
+ id,
51
+ title,
52
+ link,
53
+ hasLine,
54
+ description,
55
+ url,
56
+ initial,
57
+ icon,
58
+ action,
59
+ }: MenuItemConfig = new MenuItemConfig(),
60
+ ) {
61
+ super(id, title, link, hasLine, description, url, initial, icon, action);
36
62
  }
37
63
  }
38
64
 
@@ -737,6 +763,7 @@ export class ProductConditions {
737
763
  }
738
764
 
739
765
  export class DataStoreClass {
766
+ hasLayoutMargins: boolean;
740
767
  product: string | null;
741
768
  showNav: boolean;
742
769
  menuItems: MenuItem[];
@@ -752,6 +779,7 @@ export class DataStoreClass {
752
779
  settings: {
753
780
  open: boolean;
754
781
  overlay: boolean;
782
+ items: MenuItem[];
755
783
  };
756
784
  panel: {
757
785
  open: boolean;
@@ -766,6 +794,7 @@ export class DataStoreClass {
766
794
  countries: Value[];
767
795
  citizenshipCountries: Value[];
768
796
  taxCountries: Value[];
797
+ addTaxCountries: Value[];
769
798
  states: Value[];
770
799
  regions: Value[];
771
800
  cities: Value[];
@@ -775,8 +804,6 @@ export class DataStoreClass {
775
804
  documentIssuers: Value[];
776
805
  familyStatuses: Value[];
777
806
  relations: Value[];
778
- surveyByHealthSecond: any[];
779
- surveyByCriticalSecond: any[];
780
807
  questionRefs: any[];
781
808
  epayLink: string;
782
809
  residents: Value[];
@@ -784,13 +811,16 @@ export class DataStoreClass {
784
811
  economySectorCode: Value[];
785
812
  gender: Value[];
786
813
  fontSize: number;
787
- isFontChangerOpen = false;
788
- isLoading = false;
789
- userNotFound = false;
814
+ isFontChangerOpen: boolean = false;
815
+ isLoading: boolean = false;
816
+ userNotFound: boolean = false;
790
817
  user: User;
791
- accessToken = null;
792
- refreshToken = null;
818
+ accessToken: string | null = null;
819
+ refreshToken: string | null = null;
793
820
  processCoverTypeSum: any[];
821
+ processIndexRate: any[];
822
+ processPaymentPeriod: any[];
823
+ additionalInsuranceTerms: any[];
794
824
  taskList: any[];
795
825
  processHistory: any[];
796
826
  contragentList: any[];
@@ -799,7 +829,48 @@ export class DataStoreClass {
799
829
  groupCode: string;
800
830
  userGroups: any[];
801
831
  onMainPage: boolean;
832
+ signUrl: string | null;
833
+ SaleChanellPolicyList: any[];
834
+ RegionPolicyList: any[];
835
+ ManagerPolicyList: any[];
836
+ AgentDataList: any[];
837
+ affilationResolution: {
838
+ id: string | number | null;
839
+ processInstanceId: string | number | null;
840
+ number: string | number | null;
841
+ date: string | number | null;
842
+ };
843
+ signedDocumentList: any[];
844
+ surveyByHealthBase: any[];
845
+ surveyByCriticalBase: any[];
846
+ surveyByHealthSecond: any[];
847
+ surveyByCriticalSecond: any[];
848
+ definedAnswersId: {
849
+ surveyByHealthBase: any;
850
+ surveyByCriticalBase: any;
851
+ };
852
+ riskGroup: any[];
802
853
  constructor() {
854
+ this.hasLayoutMargins = true;
855
+ this.processIndexRate = [];
856
+ this.processPaymentPeriod = [];
857
+ this.additionalInsuranceTerms = [];
858
+ this.definedAnswersId = {
859
+ surveyByHealthBase: {},
860
+ surveyByCriticalBase: {},
861
+ };
862
+ this.signedDocumentList = [];
863
+ this.affilationResolution = {
864
+ id: null,
865
+ processInstanceId: null,
866
+ number: null,
867
+ date: null,
868
+ };
869
+ this.SaleChanellPolicyList = [];
870
+ this.RegionPolicyList = [];
871
+ this.ManagerPolicyList = [];
872
+ this.AgentDataList = [];
873
+ this.signUrl = null;
803
874
  this.product = null;
804
875
  this.showNav = true;
805
876
  this.menuItems = [];
@@ -815,6 +886,7 @@ export class DataStoreClass {
815
886
  this.settings = {
816
887
  open: false,
817
888
  overlay: false,
889
+ items: [],
818
890
  };
819
891
  this.panel = {
820
892
  open: false,
@@ -829,6 +901,7 @@ export class DataStoreClass {
829
901
  this.countries = [];
830
902
  this.citizenshipCountries = [];
831
903
  this.taxCountries = [];
904
+ this.addTaxCountries = [];
832
905
  this.states = [];
833
906
  this.regions = [];
834
907
  this.cities = [];
@@ -838,6 +911,8 @@ export class DataStoreClass {
838
911
  this.documentIssuers = [];
839
912
  this.familyStatuses = [];
840
913
  this.relations = [];
914
+ this.surveyByHealthBase = [];
915
+ this.surveyByCriticalBase = [];
841
916
  this.surveyByHealthSecond = [];
842
917
  this.surveyByCriticalSecond = [];
843
918
  this.questionRefs = [];
@@ -866,10 +941,38 @@ export class DataStoreClass {
866
941
  this.groupCode = 'Work';
867
942
  this.userGroups = [];
868
943
  this.onMainPage = true;
944
+ this.riskGroup = [
945
+ {
946
+ id: '1',
947
+ nameKz: '',
948
+ nameRu: '1',
949
+ isDefault: true,
950
+ },
951
+ {
952
+ id: '2',
953
+ nameKz: '',
954
+ nameRu: '2',
955
+ },
956
+ {
957
+ id: '3',
958
+ nameKz: '',
959
+ nameRu: '3',
960
+ },
961
+ {
962
+ id: '4',
963
+ nameKz: '',
964
+ nameRu: '4',
965
+ },
966
+ {
967
+ id: '5',
968
+ nameKz: '',
969
+ nameRu: '5',
970
+ },
971
+ ];
869
972
  }
870
973
  }
871
974
 
872
- export class StoreClass {
975
+ export class FormStoreClass {
873
976
  birthInfos: any[];
874
977
  SaleChanellPolicy: Value;
875
978
  AgentData: {
@@ -6,6 +6,7 @@ export const constants = Object.freeze({
6
6
  lifetrip: 7,
7
7
  bolashak: 8,
8
8
  liferenta: 9,
9
+ gons: 10,
9
10
  },
10
11
 
11
12
  editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
@@ -14,6 +15,7 @@ export const constants = Object.freeze({
14
15
  'UnderwriterForm',
15
16
  'AffilationResolutionForm',
16
17
  'Completed',
18
+ 'InsurancePremiumOnlinePaid',
17
19
  ],
18
20
  gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
19
21
  types: {
@@ -111,6 +111,18 @@ export const formatProcents = (val: string | number) =>
111
111
  export const sanitizeURL = (text: string) =>
112
112
  text ? text.replace(/\r?\n|\r|\\|"/g, '') : '';
113
113
 
114
+ export const yearEnding = (
115
+ number: number,
116
+ titles: string[],
117
+ cases: number[],
118
+ ) => {
119
+ return titles[
120
+ number % 100 > 4 && number % 100 < 20
121
+ ? 2
122
+ : cases[number % 10 < 5 ? number % 10 : 5]
123
+ ];
124
+ };
125
+
114
126
  export const parseXML = (
115
127
  xml: boolean | string = true,
116
128
  withTag = false,
@@ -132,3 +144,34 @@ export const parseXML = (
132
144
  }
133
145
  }
134
146
  };
147
+
148
+ export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
149
+ let result;
150
+ if (ESBDObject.errorCode === 2) {
151
+ if (ESBDObject.errorMsg.indexOf('EMSG') === -1) {
152
+ result = 'Клиент не является резидентом РК!';
153
+ } else {
154
+ result = ESBDObject.errorMsg
155
+ .substring(
156
+ ESBDObject.errorMsg.indexOf('EMSG') + 6,
157
+ ESBDObject.errorMsg.lastIndexOf('EWS-100'),
158
+ )
159
+ .replace(initialPoint, '');
160
+ }
161
+ }
162
+ if (ESBDObject.errorCode === 3) {
163
+ return false;
164
+ }
165
+ if (ESBDObject.errorCode === 1) {
166
+ result = ESBDObject.errorMsg
167
+ .substring(
168
+ ESBDObject.errorMsg.indexOf(initialPoint),
169
+ ESBDObject.errorMsg.lastIndexOf('ECL-0001'),
170
+ )
171
+ .replace(initialPoint, '');
172
+ }
173
+ if (ESBDObject.errorCode === 4) {
174
+ result = ESBDObject.errorMsg;
175
+ }
176
+ return result;
177
+ };
@@ -1,5 +1,12 @@
1
1
  <template>
2
- <div class="h-full z-[1] lg:mx-[22px] lg:my-[33px] lg:shadow-xl">
2
+ <div
3
+ class="h-full z-[1]"
4
+ :class="[
5
+ $dataStore.hasLayoutMargins
6
+ ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl'
7
+ : '',
8
+ ]"
9
+ >
3
10
  <div
4
11
  :class="[$libStyles.greenBg]"
5
12
  class="hidden z-[-1] lg:block absolute left-0 top-0 h-[200px] w-full"
package/layouts/full.vue CHANGED
@@ -1,5 +1,12 @@
1
1
  <template>
2
- <div class="h-full z-[1] lg:mx-[22px] lg:my-[33px] lg:shadow-xl">
2
+ <div
3
+ class="h-full z-[1]"
4
+ :class="[
5
+ $dataStore.hasLayoutMargins
6
+ ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl'
7
+ : '',
8
+ ]"
9
+ >
3
10
  <div
4
11
  :class="[$libStyles.greenBg]"
5
12
  class="hidden lg:block absolute z-[-1] left-0 top-0 h-[200px] w-full"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.7-beta.8",
3
+ "version": "0.0.7-beta.9",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -36,6 +36,7 @@
36
36
  "axios": "^1.3.4",
37
37
  "fast-xml-parser": "4.0.12",
38
38
  "jwt-decode": "^3.1.2",
39
+ "maska": "1.5.0",
39
40
  "pinia": "^2.0.33",
40
41
  "v-idle-3": "^0.3.14",
41
42
  "vue-toastification": "^2.0.0-rc.5",
@@ -1,9 +1,11 @@
1
1
  import { capitalize, getFullNameShorted, reformatIin } from '../composables';
2
2
  import { constants } from '../composables/constants';
3
3
  import Vidle from 'v-idle-3';
4
+ import Maska from 'maska';
4
5
 
5
6
  export default defineNuxtPlugin(nuxtApp => {
6
7
  nuxtApp.vueApp.use(Vidle);
8
+ nuxtApp.vueApp.use(Maska);
7
9
  return {
8
10
  provide: {
9
11
  capitalize: capitalize,