hl-core 0.0.8-beta.2 → 0.0.8-beta.20

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 (41) hide show
  1. package/api/index.ts +42 -14
  2. package/api/interceptors.ts +1 -1
  3. package/components/Dialog/Dialog.vue +6 -3
  4. package/components/Form/FormBlock.vue +63 -28
  5. package/components/Form/FormSection.vue +4 -1
  6. package/components/Form/ManagerAttachment.vue +196 -0
  7. package/components/Form/ProductConditionsBlock.vue +64 -12
  8. package/components/Input/FormInput.vue +12 -3
  9. package/components/Input/PanelInput.vue +5 -0
  10. package/components/Layout/Drawer.vue +1 -0
  11. package/components/Layout/Header.vue +40 -4
  12. package/components/Layout/SettingsPanel.vue +35 -8
  13. package/components/Menu/MenuHover.vue +30 -0
  14. package/components/Menu/MenuNav.vue +27 -10
  15. package/components/Pages/Anketa.vue +8 -4
  16. package/components/Pages/Auth.vue +147 -30
  17. package/components/Pages/InvoiceInfo.vue +30 -0
  18. package/components/Pages/MemberForm.vue +274 -79
  19. package/components/Pages/ProductConditions.vue +291 -7
  20. package/components/Panel/PanelHandler.vue +74 -1
  21. package/components/Utilities/JsonViewer.vue +27 -0
  22. package/composables/classes.ts +126 -23
  23. package/composables/constants.ts +11 -1
  24. package/composables/styles.ts +9 -3
  25. package/configs/i18n.ts +19 -0
  26. package/layouts/default.vue +2 -2
  27. package/locales/en.json +558 -0
  28. package/locales/kz.json +558 -0
  29. package/locales/ru.json +558 -0
  30. package/nuxt.config.ts +8 -0
  31. package/package.json +7 -2
  32. package/pages/500.vue +1 -1
  33. package/pages/Token.vue +51 -0
  34. package/plugins/helperFunctionsPlugins.ts +2 -0
  35. package/plugins/storePlugin.ts +0 -1
  36. package/plugins/vuetifyPlugin.ts +5 -0
  37. package/store/data.store.js +472 -530
  38. package/store/member.store.ts +120 -15
  39. package/store/rules.js +27 -3
  40. package/types/index.ts +34 -0
  41. package/store/messages.ts +0 -434
@@ -266,7 +266,7 @@ class Person {
266
266
  const date = this.formatDate(this.birthDate);
267
267
  if (date) {
268
268
  const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
269
- if (new Date(date) < new Date(Date.now()) && age > 0) {
269
+ if (new Date(date) < new Date(Date.now()) && age >= 0) {
270
270
  return age.toString();
271
271
  }
272
272
  } else {
@@ -356,6 +356,13 @@ export class Contragent extends Person {
356
356
  }
357
357
 
358
358
  export class Member extends Person {
359
+ response?: {
360
+ contragent?: any;
361
+ questionnaires?: any;
362
+ contacts?: any;
363
+ documents?: any;
364
+ addresses?: any;
365
+ };
359
366
  verifyType: any;
360
367
  verifyDate: any;
361
368
  postIndex: string | null;
@@ -421,6 +428,7 @@ export class Member extends Person {
421
428
  hasAgreement: boolean | null;
422
429
  otpTokenId: string | null;
423
430
  otpCode: string | null;
431
+ documentsList: UserDocument[];
424
432
  constructor(
425
433
  id = 0,
426
434
  type = 1,
@@ -488,6 +496,7 @@ export class Member extends Person {
488
496
  isNotary = false,
489
497
  ) {
490
498
  super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
499
+ this.documentsList = [];
491
500
  this.postIndex = null;
492
501
  this.isPdl = false;
493
502
  this.migrationCard = migrationCard;
@@ -679,7 +688,9 @@ export class ProductConditions {
679
688
  annualIncome: string | null;
680
689
  processIndexRate: Value;
681
690
  requestedSumInsured: number | string | null;
691
+ requestedSumInsuredInDollar: number | string | null;
682
692
  insurancePremiumPerMonth: number | string | null;
693
+ insurancePremiumPerMonthInDollar: number | string | null;
683
694
  establishingGroupDisabilityFromThirdYear: string | null;
684
695
  possibilityToChange: string | null;
685
696
  deathOfInsuredDueToAccident: Value;
@@ -730,6 +741,8 @@ export class ProductConditions {
730
741
  riskGroup = new Value(),
731
742
  riskGroup2 = new Value(),
732
743
  ) {
744
+ this.requestedSumInsuredInDollar = null;
745
+ this.insurancePremiumPerMonthInDollar = null;
733
746
  this.signDate = null;
734
747
  this.birthDate = null;
735
748
  this.gender = new Value();
@@ -764,9 +777,31 @@ export class ProductConditions {
764
777
  }
765
778
  }
766
779
 
780
+ export class MemberSettings {
781
+ has?: boolean;
782
+ isMultiple?: boolean;
783
+ required?: boolean;
784
+ constructor(options?: { has?: boolean; isMultiple?: boolean; required?: boolean }) {
785
+ if (options) {
786
+ this.has = options.has;
787
+ this.isMultiple = options.isMultiple;
788
+ if (this.has === true) {
789
+ this.required = options.required;
790
+ } else {
791
+ this.required = false;
792
+ }
793
+ }
794
+ }
795
+ }
796
+
767
797
  export class DataStoreClass {
768
798
  // IMP Контроллер фич
769
799
  controls: {
800
+ // Cтавит значения по дефолту полям
801
+ setDefaults: {
802
+ sectorCode: boolean;
803
+ percentage: boolean;
804
+ };
770
805
  // Проверка на роль при авторизации
771
806
  onAuth: boolean;
772
807
  // Согласие на главной странице
@@ -781,6 +816,17 @@ export class DataStoreClass {
781
816
  hasInsis: boolean;
782
817
  // Калькулятор без ввода данных
783
818
  hasCalculator: boolean;
819
+ // Блок прикрепления к менеджеру
820
+ hasAttachment: boolean;
821
+ // Решение АС
822
+ hasAffiliation: boolean;
823
+ };
824
+ members: {
825
+ clientApp: MemberSettings;
826
+ insuredApp: MemberSettings;
827
+ beneficiaryApp: MemberSettings;
828
+ beneficialOwnerApp: MemberSettings;
829
+ spokesmanApp: MemberSettings;
784
830
  };
785
831
  hasLayoutMargins: boolean;
786
832
  readonly product: string | null;
@@ -791,6 +837,7 @@ export class DataStoreClass {
791
837
  hasBack: boolean;
792
838
  loading: boolean;
793
839
  backIcon: string;
840
+ moreIcon: string;
794
841
  onBack: any;
795
842
  onLink: any;
796
843
  selectedItem: MenuItem;
@@ -801,6 +848,7 @@ export class DataStoreClass {
801
848
  items: MenuItem[];
802
849
  };
803
850
  buttons: MenuItem[];
851
+ isButtonsLoading: boolean;
804
852
  panelAction: string | null;
805
853
  panel: {
806
854
  open: boolean;
@@ -839,9 +887,9 @@ export class DataStoreClass {
839
887
  user: User;
840
888
  accessToken: string | null = null;
841
889
  refreshToken: string | null = null;
842
- processCoverTypeSum: any[];
843
- processIndexRate: any[];
844
- processPaymentPeriod: any[];
890
+ processCoverTypeSum: Value[];
891
+ processIndexRate: Value[];
892
+ processPaymentPeriod: Value[];
845
893
  taskList: TaskListItem[];
846
894
  processHistory: TaskHistory[];
847
895
  contragentList: any[];
@@ -850,13 +898,50 @@ export class DataStoreClass {
850
898
  groupCode: string;
851
899
  userGroups: Item[];
852
900
  onMainPage: boolean;
853
- SaleChanellPolicyList: any[];
854
- RegionPolicyList: any[];
855
- ManagerPolicyList: any[];
856
- AgentDataList: any[];
857
- riskGroup: any[];
901
+ SaleChanellPolicy: Value[];
902
+ RegionPolicy: Value[];
903
+ ManagerPolicy: Value[];
904
+ AgentData: AgentData[];
905
+ riskGroup: Value[];
906
+ currencies: {
907
+ eur: number | null;
908
+ usd: number | null;
909
+ };
910
+ filters: {
911
+ show: (item: MenuItem) => boolean;
912
+ disabled: (item: MenuItem) => boolean;
913
+ };
858
914
  constructor() {
915
+ this.filters = {
916
+ show: (item: MenuItem) => {
917
+ if (typeof item.show === 'boolean') {
918
+ return item.show;
919
+ }
920
+ return true;
921
+ },
922
+ disabled: (item: MenuItem) => {
923
+ if (typeof item.disabled === 'boolean') {
924
+ return item.disabled;
925
+ }
926
+ return false;
927
+ },
928
+ };
929
+ this.currencies = {
930
+ eur: null,
931
+ usd: null,
932
+ };
933
+ this.members = {
934
+ clientApp: new MemberSettings(),
935
+ insuredApp: new MemberSettings(),
936
+ beneficiaryApp: new MemberSettings(),
937
+ beneficialOwnerApp: new MemberSettings(),
938
+ spokesmanApp: new MemberSettings(),
939
+ };
859
940
  this.controls = {
941
+ setDefaults: {
942
+ sectorCode: true,
943
+ percentage: true,
944
+ },
860
945
  onAuth: false,
861
946
  hasAnketa: true,
862
947
  hasAgreement: true,
@@ -864,15 +949,17 @@ export class DataStoreClass {
864
949
  hasGKB: false,
865
950
  hasInsis: false,
866
951
  hasCalculator: false,
952
+ hasAttachment: true,
953
+ hasAffiliation: true,
867
954
  };
868
955
  this.hasLayoutMargins = true;
869
956
  this.processIndexRate = [];
870
957
  this.processPaymentPeriod = [];
871
958
  this.questionRefs = [];
872
- this.SaleChanellPolicyList = [];
873
- this.RegionPolicyList = [];
874
- this.ManagerPolicyList = [];
875
- this.AgentDataList = [];
959
+ this.SaleChanellPolicy = [];
960
+ this.RegionPolicy = [];
961
+ this.ManagerPolicy = [];
962
+ this.AgentData = [];
876
963
  this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as string) : null;
877
964
  this.showNav = true;
878
965
  this.menuItems = [];
@@ -881,6 +968,7 @@ export class DataStoreClass {
881
968
  hasBack: false,
882
969
  loading: false,
883
970
  backIcon: 'mdi-arrow-left',
971
+ moreIcon: 'mdi-dots-vertical',
884
972
  onBack: {},
885
973
  onLink: {},
886
974
  selectedItem: new MenuItem(),
@@ -891,6 +979,7 @@ export class DataStoreClass {
891
979
  items: [],
892
980
  };
893
981
  this.buttons = [];
982
+ this.isButtonsLoading = false;
894
983
  this.panel = {
895
984
  open: false,
896
985
  overlay: false,
@@ -947,27 +1036,36 @@ export class DataStoreClass {
947
1036
  id: '1',
948
1037
  nameKz: '',
949
1038
  nameRu: '1',
950
- isDefault: true,
1039
+ code: '',
1040
+ ids: '',
951
1041
  },
952
1042
  {
953
1043
  id: '2',
954
1044
  nameKz: '',
955
1045
  nameRu: '2',
1046
+ code: '',
1047
+ ids: '',
956
1048
  },
957
1049
  {
958
1050
  id: '3',
959
1051
  nameKz: '',
960
1052
  nameRu: '3',
1053
+ code: '',
1054
+ ids: '',
961
1055
  },
962
1056
  {
963
1057
  id: '4',
964
1058
  nameKz: '',
965
1059
  nameRu: '4',
1060
+ code: '',
1061
+ ids: '',
966
1062
  },
967
1063
  {
968
1064
  id: '5',
969
1065
  nameKz: '',
970
1066
  nameRu: '5',
1067
+ code: '',
1068
+ ids: '',
971
1069
  },
972
1070
  ];
973
1071
  }
@@ -978,12 +1076,18 @@ export class FormStoreClass {
978
1076
  additionalInsuranceTermsWithout: AddCover[];
979
1077
  signUrls: SignUrlType[];
980
1078
  epayLink: string | null;
1079
+ invoiceData: EpayResponse | null;
981
1080
  affilationResolution: {
982
1081
  id: string | number | null;
983
1082
  processInstanceId: string | number | null;
984
1083
  number: string | number | null;
985
1084
  date: string | number | null;
986
1085
  };
1086
+ finCenterData: {
1087
+ processInstanceId: string | number | null;
1088
+ regNumber: string | number | null;
1089
+ date: string | number | null;
1090
+ };
987
1091
  signedDocumentList: IDocument[];
988
1092
  surveyByHealthBase: AnketaFirst | null;
989
1093
  surveyByCriticalBase: AnketaFirst | null;
@@ -995,15 +1099,7 @@ export class FormStoreClass {
995
1099
  };
996
1100
  birthInfos: BirthInfoGKB[];
997
1101
  SaleChanellPolicy: Value;
998
- AgentData: {
999
- agentId: null;
1000
- manId: number;
1001
- fullName: string;
1002
- officeId: null;
1003
- officeCode: null;
1004
- saleChannel: string;
1005
- managerName: string;
1006
- };
1102
+ AgentData: AgentData;
1007
1103
  RegionPolicy: Value;
1008
1104
  ManagerPolicy: Value;
1009
1105
  isDisabled: {
@@ -1034,6 +1130,7 @@ export class FormStoreClass {
1034
1130
  beneficialOwnerApp?: any;
1035
1131
  spokesmanApp?: any;
1036
1132
  isTask?: boolean | null;
1133
+ policyAppDto?: any;
1037
1134
  };
1038
1135
  policyholderForm: PolicyholderForm;
1039
1136
  policyholderFormKey: string;
@@ -1059,12 +1156,18 @@ export class FormStoreClass {
1059
1156
  this.additionalInsuranceTermsWithout = [];
1060
1157
  this.signUrls = [];
1061
1158
  this.epayLink = null;
1159
+ this.invoiceData = null;
1062
1160
  this.affilationResolution = {
1063
1161
  id: null,
1064
1162
  processInstanceId: null,
1065
1163
  number: null,
1066
1164
  date: null,
1067
1165
  };
1166
+ this.finCenterData = {
1167
+ processInstanceId: null,
1168
+ regNumber: null,
1169
+ date: null,
1170
+ };
1068
1171
  this.signedDocumentList = [];
1069
1172
  this.surveyByHealthBase = null;
1070
1173
  this.surveyByCriticalBase = null;
@@ -7,10 +7,13 @@ export const constants = Object.freeze({
7
7
  bolashak: 8,
8
8
  liferenta: 9,
9
9
  gons: 10,
10
+ halykkazyna: 11,
10
11
  },
11
12
 
12
13
  editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
13
14
  documentsLinkVisibleStatuses: ['DocumentsSignedFrom', 'UnderwriterForm', 'AffilationResolutionForm', 'Completed', 'InsurancePremiumOnlinePaid'],
15
+ returnStatementStatuses: ['DocumentsSignedFrom', 'ContractSignedFrom', 'WaitingInsurancePremiumForm', 'UnderwriterForm'],
16
+ cancelApplicationStatuses: ['StartForm', 'EditForm', 'EditBeneficiaryForm', 'WaitingInsurancePremiumForm', 'DocumentsSignedFrom', 'ContractSignedFrom'],
14
17
  gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
15
18
  types: {
16
19
  string: 'string',
@@ -26,7 +29,7 @@ export const constants = Object.freeze({
26
29
  agentMycar: 'AgentMycar',
27
30
  analyst: 'Analyst',
28
31
  upk: 'UPK',
29
- financeCenter: 'FinanceCenter',
32
+ finCenter: 'FinCenter',
30
33
  supervisor: 'Supervisor',
31
34
  support: 'Support',
32
35
  managerHalykBank: 'ManagerHalykBank',
@@ -41,6 +44,9 @@ export const constants = Object.freeze({
41
44
  claim: 'claim',
42
45
  sign: 'sign',
43
46
  pay: 'pay',
47
+ register: 'register',
48
+ send: 'send',
49
+ affiliate: 'affiliate',
44
50
  },
45
51
  yearCases: [2, 0, 1, 1, 1, 2],
46
52
  yearTitles: ['год', 'года', 'лет'],
@@ -63,4 +69,8 @@ export const constants = Object.freeze({
63
69
  Error401: 'Error401',
64
70
  Error500: 'Error500',
65
71
  },
72
+ currencySymbols: {
73
+ kzt: '₸',
74
+ usd: '$',
75
+ },
66
76
  });
@@ -17,9 +17,10 @@ export class Styles {
17
17
  // Green
18
18
  greenBg: string = 'bg-[#009C73]';
19
19
  greenBgHover: string = 'hover:bg-[#00a277]';
20
- greenBgLight: string = 'bg-[#009C73]';
21
- greenText: string = 'text-[#009C73]';
20
+ greenBgLight: string = 'bg-[#EAF6EF]';
21
+ greenText: string = '!text-[#009C73]';
22
22
  greenTextHover: string = 'hover:text-[#009C73]';
23
+ greenBgLightHover: string = 'hover:bg-[#dbf0e4]';
23
24
 
24
25
  // Yellow
25
26
  yellowText: string = 'text-[#FAB31C]';
@@ -35,8 +36,10 @@ export class Styles {
35
36
  greyBtnBg: string = 'bg-[#EEE6E6]';
36
37
  greyBtnDisabledBg: string = 'bg-[#919191]';
37
38
  blueLightBgHover: string = 'hover:bg-[#F3F6FC]';
39
+ greyTextDark: string = 'text-[#9197A1]';
40
+
38
41
  // Red
39
- redText: string = 'text-[#FF897D]';
42
+ redText: string = 'text-[#FD2D39]';
40
43
  redBg: string = 'bg-[#FF897D]';
41
44
  redBgHover: string = 'hover:bg-[#ff9b91]';
42
45
  // Error
@@ -61,6 +64,7 @@ export class Styles {
61
64
  yellowBtn: string;
62
65
  whiteBtn: string;
63
66
  blueLightBtn: string;
67
+ greenLightBtn: string;
64
68
 
65
69
  // Complex
66
70
  flexColNav: string;
@@ -69,6 +73,7 @@ export class Styles {
69
73
 
70
74
  // Muted or disabled
71
75
  mutedText: string = 'text-[#99A3B3]';
76
+ disabled: string = 'cursor-not-allowed opacity-50';
72
77
 
73
78
  constructor() {
74
79
  // Button
@@ -78,6 +83,7 @@ export class Styles {
78
83
  this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
79
84
  this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
80
85
  this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
86
+ this.greenLightBtn = `${this.greenBgLight} ${this.greenText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgLightHover}`;
81
87
 
82
88
  // Complex
83
89
  this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
@@ -0,0 +1,19 @@
1
+ import { createI18n } from 'vue-i18n';
2
+ import en from '@/locales/en.json';
3
+ import ru from '@/locales/ru.json';
4
+ import kz from '@/locales/kz.json';
5
+
6
+ const instance = createI18n({
7
+ legacy: false,
8
+ globalInjection: true,
9
+ locale: 'ru',
10
+ messages: {
11
+ en,
12
+ ru,
13
+ kz,
14
+ },
15
+ });
16
+
17
+ export default instance;
18
+
19
+ export const i18n = instance.global;
@@ -8,8 +8,8 @@
8
8
  :title="$dataStore.menu.title ?? 'Страховые продукты'"
9
9
  :has-back="$dataStore.menu.hasBack ?? false"
10
10
  :back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
11
+ :more-icon="$dataStore.menu.moreIcon ?? 'mdi-cog-outline'"
11
12
  :has-more="'hasMore' in $route.meta && $route.meta.hasMore ? !!$route.meta.hasMore : false"
12
- :hide-more-on-lg="true"
13
13
  :class="{
14
14
  // @ts-ignore
15
15
  '!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
@@ -38,7 +38,7 @@ const openSettings = async () => {
38
38
 
39
39
  const onLink = async (item: MenuItem) => {
40
40
  if (dataStore.menu.onLink) await dataStore.menu.onLink(item);
41
- if (typeof item.disabled === 'boolean' ? !item.disabled : true) dataStore.menu.selectedItem = item;
41
+ if (!dataStore.filters.disabled(item)) dataStore.menu.selectedItem = item;
42
42
  };
43
43
 
44
44
  const onBack = async (item: MenuItem) => {