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

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 (43) 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/Datepicker.vue +5 -1
  9. package/components/Input/FormInput.vue +20 -4
  10. package/components/Input/PanelInput.vue +5 -0
  11. package/components/Layout/Drawer.vue +1 -0
  12. package/components/Layout/Header.vue +40 -4
  13. package/components/Layout/SettingsPanel.vue +35 -8
  14. package/components/Menu/MenuHover.vue +30 -0
  15. package/components/Menu/MenuNav.vue +28 -11
  16. package/components/Pages/Anketa.vue +19 -15
  17. package/components/Pages/Auth.vue +147 -30
  18. package/components/Pages/InvoiceInfo.vue +30 -0
  19. package/components/Pages/MemberForm.vue +284 -89
  20. package/components/Pages/ProductConditions.vue +291 -7
  21. package/components/Panel/PanelHandler.vue +74 -1
  22. package/components/Utilities/JsonViewer.vue +27 -0
  23. package/composables/classes.ts +128 -23
  24. package/composables/constants.ts +12 -1
  25. package/composables/index.ts +5 -1
  26. package/composables/styles.ts +9 -3
  27. package/configs/i18n.ts +19 -0
  28. package/layouts/default.vue +2 -2
  29. package/locales/en.json +560 -0
  30. package/locales/kz.json +560 -0
  31. package/locales/ru.json +560 -0
  32. package/nuxt.config.ts +8 -0
  33. package/package.json +7 -2
  34. package/pages/500.vue +1 -1
  35. package/pages/Token.vue +51 -0
  36. package/plugins/helperFunctionsPlugins.ts +2 -0
  37. package/plugins/storePlugin.ts +0 -1
  38. package/plugins/vuetifyPlugin.ts +8 -1
  39. package/store/data.store.js +475 -530
  40. package/store/member.store.ts +120 -15
  41. package/store/rules.js +27 -3
  42. package/types/index.ts +34 -0
  43. 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,7 +816,19 @@ export class DataStoreClass {
781
816
  hasInsis: boolean;
782
817
  // Калькулятор без ввода данных
783
818
  hasCalculator: boolean;
819
+ // Блок прикрепления к менеджеру
820
+ hasAttachment: boolean;
821
+ // Решение АС
822
+ hasAffiliation: boolean;
784
823
  };
824
+ members: {
825
+ clientApp: MemberSettings;
826
+ insuredApp: MemberSettings;
827
+ beneficiaryApp: MemberSettings;
828
+ beneficialOwnerApp: MemberSettings;
829
+ spokesmanApp: MemberSettings;
830
+ };
831
+ iframeLoading: boolean;
785
832
  hasLayoutMargins: boolean;
786
833
  readonly product: string | null;
787
834
  showNav: boolean;
@@ -791,6 +838,7 @@ export class DataStoreClass {
791
838
  hasBack: boolean;
792
839
  loading: boolean;
793
840
  backIcon: string;
841
+ moreIcon: string;
794
842
  onBack: any;
795
843
  onLink: any;
796
844
  selectedItem: MenuItem;
@@ -801,6 +849,7 @@ export class DataStoreClass {
801
849
  items: MenuItem[];
802
850
  };
803
851
  buttons: MenuItem[];
852
+ isButtonsLoading: boolean;
804
853
  panelAction: string | null;
805
854
  panel: {
806
855
  open: boolean;
@@ -839,9 +888,9 @@ export class DataStoreClass {
839
888
  user: User;
840
889
  accessToken: string | null = null;
841
890
  refreshToken: string | null = null;
842
- processCoverTypeSum: any[];
843
- processIndexRate: any[];
844
- processPaymentPeriod: any[];
891
+ processCoverTypeSum: Value[];
892
+ processIndexRate: Value[];
893
+ processPaymentPeriod: Value[];
845
894
  taskList: TaskListItem[];
846
895
  processHistory: TaskHistory[];
847
896
  contragentList: any[];
@@ -850,13 +899,50 @@ export class DataStoreClass {
850
899
  groupCode: string;
851
900
  userGroups: Item[];
852
901
  onMainPage: boolean;
853
- SaleChanellPolicyList: any[];
854
- RegionPolicyList: any[];
855
- ManagerPolicyList: any[];
856
- AgentDataList: any[];
857
- riskGroup: any[];
902
+ SaleChanellPolicy: Value[];
903
+ RegionPolicy: Value[];
904
+ ManagerPolicy: Value[];
905
+ AgentData: AgentData[];
906
+ riskGroup: Value[];
907
+ currencies: {
908
+ eur: number | null;
909
+ usd: number | null;
910
+ };
911
+ filters: {
912
+ show: (item: MenuItem) => boolean;
913
+ disabled: (item: MenuItem) => boolean;
914
+ };
858
915
  constructor() {
916
+ this.filters = {
917
+ show: (item: MenuItem) => {
918
+ if (typeof item.show === 'boolean') {
919
+ return item.show;
920
+ }
921
+ return true;
922
+ },
923
+ disabled: (item: MenuItem) => {
924
+ if (typeof item.disabled === 'boolean') {
925
+ return item.disabled;
926
+ }
927
+ return false;
928
+ },
929
+ };
930
+ this.currencies = {
931
+ eur: null,
932
+ usd: null,
933
+ };
934
+ this.members = {
935
+ clientApp: new MemberSettings(),
936
+ insuredApp: new MemberSettings(),
937
+ beneficiaryApp: new MemberSettings(),
938
+ beneficialOwnerApp: new MemberSettings(),
939
+ spokesmanApp: new MemberSettings(),
940
+ };
859
941
  this.controls = {
942
+ setDefaults: {
943
+ sectorCode: true,
944
+ percentage: true,
945
+ },
860
946
  onAuth: false,
861
947
  hasAnketa: true,
862
948
  hasAgreement: true,
@@ -864,15 +950,18 @@ export class DataStoreClass {
864
950
  hasGKB: false,
865
951
  hasInsis: false,
866
952
  hasCalculator: false,
953
+ hasAttachment: true,
954
+ hasAffiliation: true,
867
955
  };
956
+ this.iframeLoading = false;
868
957
  this.hasLayoutMargins = true;
869
958
  this.processIndexRate = [];
870
959
  this.processPaymentPeriod = [];
871
960
  this.questionRefs = [];
872
- this.SaleChanellPolicyList = [];
873
- this.RegionPolicyList = [];
874
- this.ManagerPolicyList = [];
875
- this.AgentDataList = [];
961
+ this.SaleChanellPolicy = [];
962
+ this.RegionPolicy = [];
963
+ this.ManagerPolicy = [];
964
+ this.AgentData = [];
876
965
  this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as string) : null;
877
966
  this.showNav = true;
878
967
  this.menuItems = [];
@@ -881,6 +970,7 @@ export class DataStoreClass {
881
970
  hasBack: false,
882
971
  loading: false,
883
972
  backIcon: 'mdi-arrow-left',
973
+ moreIcon: 'mdi-dots-vertical',
884
974
  onBack: {},
885
975
  onLink: {},
886
976
  selectedItem: new MenuItem(),
@@ -891,6 +981,7 @@ export class DataStoreClass {
891
981
  items: [],
892
982
  };
893
983
  this.buttons = [];
984
+ this.isButtonsLoading = false;
894
985
  this.panel = {
895
986
  open: false,
896
987
  overlay: false,
@@ -947,27 +1038,36 @@ export class DataStoreClass {
947
1038
  id: '1',
948
1039
  nameKz: '',
949
1040
  nameRu: '1',
950
- isDefault: true,
1041
+ code: '',
1042
+ ids: '',
951
1043
  },
952
1044
  {
953
1045
  id: '2',
954
1046
  nameKz: '',
955
1047
  nameRu: '2',
1048
+ code: '',
1049
+ ids: '',
956
1050
  },
957
1051
  {
958
1052
  id: '3',
959
1053
  nameKz: '',
960
1054
  nameRu: '3',
1055
+ code: '',
1056
+ ids: '',
961
1057
  },
962
1058
  {
963
1059
  id: '4',
964
1060
  nameKz: '',
965
1061
  nameRu: '4',
1062
+ code: '',
1063
+ ids: '',
966
1064
  },
967
1065
  {
968
1066
  id: '5',
969
1067
  nameKz: '',
970
1068
  nameRu: '5',
1069
+ code: '',
1070
+ ids: '',
971
1071
  },
972
1072
  ];
973
1073
  }
@@ -978,12 +1078,18 @@ export class FormStoreClass {
978
1078
  additionalInsuranceTermsWithout: AddCover[];
979
1079
  signUrls: SignUrlType[];
980
1080
  epayLink: string | null;
1081
+ invoiceData: EpayResponse | null;
981
1082
  affilationResolution: {
982
1083
  id: string | number | null;
983
1084
  processInstanceId: string | number | null;
984
1085
  number: string | number | null;
985
1086
  date: string | number | null;
986
1087
  };
1088
+ finCenterData: {
1089
+ processInstanceId: string | number | null;
1090
+ regNumber: string | number | null;
1091
+ date: string | number | null;
1092
+ };
987
1093
  signedDocumentList: IDocument[];
988
1094
  surveyByHealthBase: AnketaFirst | null;
989
1095
  surveyByCriticalBase: AnketaFirst | null;
@@ -995,15 +1101,7 @@ export class FormStoreClass {
995
1101
  };
996
1102
  birthInfos: BirthInfoGKB[];
997
1103
  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
- };
1104
+ AgentData: AgentData;
1007
1105
  RegionPolicy: Value;
1008
1106
  ManagerPolicy: Value;
1009
1107
  isDisabled: {
@@ -1034,6 +1132,7 @@ export class FormStoreClass {
1034
1132
  beneficialOwnerApp?: any;
1035
1133
  spokesmanApp?: any;
1036
1134
  isTask?: boolean | null;
1135
+ policyAppDto?: any;
1037
1136
  };
1038
1137
  policyholderForm: PolicyholderForm;
1039
1138
  policyholderFormKey: string;
@@ -1059,12 +1158,18 @@ export class FormStoreClass {
1059
1158
  this.additionalInsuranceTermsWithout = [];
1060
1159
  this.signUrls = [];
1061
1160
  this.epayLink = null;
1161
+ this.invoiceData = null;
1062
1162
  this.affilationResolution = {
1063
1163
  id: null,
1064
1164
  processInstanceId: null,
1065
1165
  number: null,
1066
1166
  date: null,
1067
1167
  };
1168
+ this.finCenterData = {
1169
+ processInstanceId: null,
1170
+ regNumber: null,
1171
+ date: null,
1172
+ };
1068
1173
  this.signedDocumentList = [];
1069
1174
  this.surveyByHealthBase = null;
1070
1175
  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: ['год', 'года', 'лет'],
@@ -62,5 +68,10 @@ export const constants = Object.freeze({
62
68
  DOMevent: 'DOMevent',
63
69
  Error401: 'Error401',
64
70
  Error500: 'Error500',
71
+ iframeLoaded: 'iframeLoaded',
72
+ },
73
+ currencySymbols: {
74
+ kzt: '₸',
75
+ usd: '$',
65
76
  },
66
77
  });
@@ -165,7 +165,11 @@ export const ErrorHandler = (err: unknown, errorText?: string) => {
165
165
  console.log(err);
166
166
  if (err instanceof AxiosError) {
167
167
  if ('response' in err && err.response && err.response.data) {
168
- useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
168
+ if ('status' in err.response && err.response.status === 403) {
169
+ useDataStore().showToaster('error', useDataStore().t('toaster.noPermission'), 10000);
170
+ } else if (err.response.data) {
171
+ useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
172
+ }
169
173
  }
170
174
  }
171
175
  return false;
@@ -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) => {