hl-core 0.0.10-beta.2 → 0.0.10-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 (42) hide show
  1. package/api/base.api.ts +89 -69
  2. package/components/Complex/TextBlock.vue +2 -0
  3. package/components/Dialog/Dialog.vue +2 -0
  4. package/components/Dialog/FamilyDialog.vue +2 -0
  5. package/components/Form/DigitalDocument.vue +52 -0
  6. package/components/Form/DynamicForm.vue +1 -0
  7. package/components/Form/FormData.vue +1 -0
  8. package/components/Form/ManagerAttachment.vue +1 -0
  9. package/components/Input/DynamicInput.vue +2 -0
  10. package/components/Input/FormInput.vue +2 -0
  11. package/components/Input/OtpInput.vue +25 -0
  12. package/components/Input/PanelInput.vue +1 -0
  13. package/components/Input/RoundedInput.vue +2 -0
  14. package/components/Input/RoundedSelect.vue +2 -0
  15. package/components/Input/SwitchInput.vue +2 -0
  16. package/components/Input/TextInput.vue +2 -0
  17. package/components/Layout/Drawer.vue +2 -0
  18. package/components/Pages/Anketa.vue +1 -0
  19. package/components/Pages/Auth.vue +2 -0
  20. package/components/Pages/ContragentForm.vue +1 -0
  21. package/components/Pages/Documents.vue +236 -5
  22. package/components/Pages/MemberForm.vue +39 -29
  23. package/components/Pages/ProductConditions.vue +10 -2
  24. package/components/Panel/PanelHandler.vue +8 -1
  25. package/components/Transitions/Animation.vue +2 -0
  26. package/components/Utilities/Chip.vue +2 -0
  27. package/components/Utilities/JsonViewer.vue +1 -2
  28. package/composables/classes.ts +74 -41
  29. package/composables/fields.ts +6 -4
  30. package/composables/index.ts +220 -7
  31. package/composables/styles.ts +5 -16
  32. package/configs/pwa.ts +1 -7
  33. package/locales/ru.json +3 -2
  34. package/nuxt.config.ts +10 -13
  35. package/package.json +13 -12
  36. package/plugins/head.ts +1 -1
  37. package/store/data.store.ts +125 -255
  38. package/store/member.store.ts +3 -2
  39. package/tsconfig.json +3 -0
  40. package/types/enum.ts +5 -2
  41. package/types/form.ts +71 -75
  42. package/types/index.ts +852 -882
@@ -5,6 +5,7 @@ import { ErrorHandler } from '../composables';
5
5
  import { AxiosError } from 'axios';
6
6
  import { Member } from '../composables/classes';
7
7
  import { MemberAppCodes, MemberCodes, StoreMembers } from '../types/enum';
8
+ import type { MultipleMember, SendOtpResponse } from '../types';
8
9
 
9
10
  export const useMemberStore = defineStore('members', {
10
11
  state: () => ({
@@ -307,11 +308,11 @@ export const useMemberStore = defineStore('members', {
307
308
  // TODO Доработать и менять значение hasAgreement.value => true
308
309
  this.dataStore.showToaster(otpResponse.status !== 2 ? 'error' : 'success', otpResponse.statusName, 3000);
309
310
  if (otpResponse.status === 2) {
310
- member.otpCode = null;
311
+ member.otpCode = '';
311
312
  return true;
312
313
  }
313
314
  if (otpResponse.status === 4 || otpResponse.status === 5) {
314
- member.otpCode = null;
315
+ member.otpCode = '';
315
316
  member.otpTokenId = null;
316
317
  return false;
317
318
  }
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.nuxt/tsconfig.json"
3
+ }
package/types/enum.ts CHANGED
@@ -60,6 +60,7 @@ export enum PostActions {
60
60
  applicationCreated = 'applicationCreated',
61
61
  clipboard = 'clipboard',
62
62
  toHomePage = 'toHomePage',
63
+ toHistory = 'toHistory',
63
64
  toStatementHistory = 'toStatementHistory',
64
65
  toAuth = 'toAuth',
65
66
  DOMevent = 'DOMevent',
@@ -94,9 +95,11 @@ export enum Roles {
94
95
  BranchDirector = 'BranchDirector',
95
96
  USNSACCINS = 'USNSACCINS',
96
97
  Dsuio = 'Dsuio',
97
- Adjuster = 'Adjuster',
98
+ SettlementLosses = 'SettlementLosses',
99
+ HeadSettlementLosses = 'HeadSettlementLosses',
98
100
  DsoDirector = 'DsoDirector',
99
101
  AccountantDirector = 'AccountantDirector',
102
+ ManagerAuletti = 'ManagerAuletti',
100
103
  }
101
104
 
102
105
  export enum Statuses {
@@ -145,7 +148,7 @@ export enum Methods {
145
148
  POST = 'POST',
146
149
  }
147
150
 
148
- export namespace Enums {
151
+ export namespace CoreEnums {
149
152
  export namespace GBD {
150
153
  export enum DocTypes {
151
154
  'PS' = '001',
package/types/form.ts CHANGED
@@ -1,5 +1,3 @@
1
- export {};
2
-
3
1
  export enum FieldTypes {
4
2
  TEXT = 'text',
5
3
  NUMBER = 'number',
@@ -9,86 +7,84 @@ export enum FieldTypes {
9
7
  FILE = 'file',
10
8
  }
11
9
 
12
- declare global {
13
- type InputType = TextInput | NumberInput | FileInput | SwitchInput;
14
- type FormMasks = 'numbers' | 'iin' | 'otp' | 'phone' | 'date' | 'post' | 'threeDigit' | 'iik';
15
- type FormIcons = 'arrowRight' | 'search' | 'sms' | null;
16
- type Suffix = 'kzt' | 'usd' | 'percent' | null;
10
+ export type InputType = TextInput | NumberInput | FileInput | SwitchInput;
11
+ export type FormMasks = 'numbers' | 'iin' | 'otp' | 'phone' | 'date' | 'post' | 'threeDigit' | 'iik';
12
+ export type FormIcons = 'arrowRight' | 'search' | 'sms' | null;
13
+ export type Suffix = 'kzt' | 'usd' | 'percent' | null;
17
14
 
18
- type FetchFunctions =
19
- | 'getResidents'
20
- | 'getFamilyStatuses'
21
- | 'getRelationTypes'
22
- | 'getCountries'
23
- | 'getStates'
24
- | 'getLocalityTypes'
25
- | 'getRegions'
26
- | 'getCities'
27
- | 'getDocumentTypes'
28
- | 'getTaxCountries'
29
- | 'getCitizenshipCountries'
30
- | 'getSectorCodeList'
31
- | 'getInsurancePay'
32
- | 'getEconomicActivityType'
33
- | 'getBanks'
34
- | 'getDocumentIssuers'
35
- | 'getGenderList';
15
+ export type FetchFunctions =
16
+ | 'getResidents'
17
+ | 'getFamilyStatuses'
18
+ | 'getRelationTypes'
19
+ | 'getCountries'
20
+ | 'getStates'
21
+ | 'getLocalityTypes'
22
+ | 'getRegions'
23
+ | 'getCities'
24
+ | 'getDocumentTypes'
25
+ | 'getTaxCountries'
26
+ | 'getCitizenshipCountries'
27
+ | 'getSectorCodeList'
28
+ | 'getInsurancePay'
29
+ | 'getEconomicActivityType'
30
+ | 'getBanks'
31
+ | 'getDocumentIssuers'
32
+ | 'getGenderList';
36
33
 
37
- export interface DynamicForm {
38
- formRef: any;
39
- sections: SectionType[];
40
- fieldOrder?: string[];
41
- }
34
+ export interface DynamicForm {
35
+ formRef: any;
36
+ sections: SectionType[];
37
+ fieldOrder?: string[];
38
+ }
42
39
 
43
- type InputBase = {
44
- key?: any;
45
- modelValue?: any;
46
- clearable?: boolean;
47
- label?: string;
48
- placeholder?: string;
49
- readonly?: boolean;
50
- disabled?: boolean;
51
- arrowRight?: boolean;
52
- maxLength?: number | null;
53
- rules?: ValidationRule[];
54
- iconName?: FormIcons;
55
- value?: number;
56
- suffix?: Suffix | null;
57
- hint?: string | undefined;
58
- maska?: FormMasks | null;
59
- fetchFrom?: FetchFunctions | null;
60
- };
40
+ export type InputBase = {
41
+ key?: any;
42
+ modelValue?: any;
43
+ clearable?: boolean;
44
+ label?: string;
45
+ placeholder?: string;
46
+ readonly?: boolean;
47
+ disabled?: boolean;
48
+ arrowRight?: boolean;
49
+ maxLength?: number | null;
50
+ rules?: ValidationRule[];
51
+ iconName?: FormIcons;
52
+ value?: number;
53
+ suffix?: Suffix | null;
54
+ hint?: string | undefined;
55
+ maska?: FormMasks | null;
56
+ fetchFrom?: FetchFunctions | null;
57
+ };
61
58
 
62
- type FormControl<T extends InputType> = T & {
63
- valid: boolean;
64
- dirty: boolean;
65
- touched: boolean;
66
- };
59
+ export type FormControl<T extends InputType> = T & {
60
+ valid: boolean;
61
+ dirty: boolean;
62
+ touched: boolean;
63
+ };
67
64
 
68
- type FileInput = InputBase & {
69
- type: FieldTypes.FILE;
70
- };
65
+ export type FileInput = InputBase & {
66
+ type: FieldTypes.FILE;
67
+ };
71
68
 
72
- type TextInput = InputBase & {
73
- type: FieldTypes.TEXT;
74
- };
69
+ export type TextInput = InputBase & {
70
+ type: FieldTypes.TEXT;
71
+ };
75
72
 
76
- type SwitchInput = InputBase & {
77
- type: FieldTypes.SWITCH;
78
- labeling: boolean | null;
79
- direction: 'horizontal' | 'vertical';
80
- falseValue: boolean | string | null;
81
- trueValue: boolean | string | null;
82
- };
73
+ export type SwitchInput = InputBase & {
74
+ type: FieldTypes.SWITCH;
75
+ labeling: boolean | null;
76
+ direction: 'horizontal' | 'vertical';
77
+ falseValue: boolean | string | null;
78
+ trueValue: boolean | string | null;
79
+ };
83
80
 
84
- type NumberInput = InputBase & {
85
- type: FieldTypes.NUMBER;
86
- };
81
+ export type NumberInput = InputBase & {
82
+ type: FieldTypes.NUMBER;
83
+ };
87
84
 
88
- type ValidationRule = (value: string) => boolean | string;
85
+ export type ValidationRule = (value: string) => boolean | string;
89
86
 
90
- type SectionType = {
91
- title?: string;
92
- fields: InputType[];
93
- };
94
- }
87
+ export type SectionType = {
88
+ title?: string;
89
+ fields: InputType[];
90
+ };