hl-core 0.0.10-beta.3 → 0.0.10-beta.30

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 (50) hide show
  1. package/api/base.api.ts +259 -190
  2. package/api/interceptors.ts +3 -5
  3. package/components/Complex/TextBlock.vue +2 -0
  4. package/components/Dialog/Dialog.vue +7 -1
  5. package/components/Dialog/FamilyDialog.vue +2 -0
  6. package/components/Form/DigitalDocument.vue +52 -0
  7. package/components/Form/DynamicForm.vue +1 -0
  8. package/components/Form/FormData.vue +1 -0
  9. package/components/Form/ManagerAttachment.vue +18 -8
  10. package/components/Form/ProductConditionsBlock.vue +12 -6
  11. package/components/Input/DynamicInput.vue +2 -0
  12. package/components/Input/FormInput.vue +2 -0
  13. package/components/Input/OtpInput.vue +25 -0
  14. package/components/Input/PanelInput.vue +1 -0
  15. package/components/Input/RoundedInput.vue +2 -0
  16. package/components/Input/RoundedSelect.vue +4 -0
  17. package/components/Input/SwitchInput.vue +2 -0
  18. package/components/Input/TextInput.vue +2 -0
  19. package/components/Layout/Drawer.vue +2 -0
  20. package/components/Pages/Anketa.vue +166 -167
  21. package/components/Pages/Auth.vue +2 -0
  22. package/components/Pages/ContragentForm.vue +2 -1
  23. package/components/Pages/Documents.vue +244 -6
  24. package/components/Pages/MemberForm.vue +276 -96
  25. package/components/Pages/ProductConditions.vue +275 -96
  26. package/components/Panel/PanelHandler.vue +236 -108
  27. package/components/Transitions/Animation.vue +2 -0
  28. package/components/Utilities/Chip.vue +3 -1
  29. package/components/Utilities/JsonViewer.vue +1 -2
  30. package/composables/classes.ts +117 -42
  31. package/composables/constants.ts +33 -0
  32. package/composables/fields.ts +6 -4
  33. package/composables/index.ts +243 -7
  34. package/composables/styles.ts +8 -24
  35. package/configs/pwa.ts +1 -7
  36. package/layouts/clear.vue +1 -1
  37. package/layouts/default.vue +1 -1
  38. package/layouts/full.vue +1 -1
  39. package/locales/ru.json +34 -10
  40. package/nuxt.config.ts +10 -13
  41. package/package.json +13 -12
  42. package/plugins/head.ts +2 -1
  43. package/store/data.store.ts +380 -389
  44. package/store/member.store.ts +3 -2
  45. package/store/rules.ts +19 -0
  46. package/tsconfig.json +3 -0
  47. package/types/enum.ts +19 -2
  48. package/types/env.d.ts +2 -2
  49. package/types/form.ts +71 -74
  50. package/types/index.ts +916 -873
@@ -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/store/rules.ts CHANGED
@@ -53,6 +53,7 @@ export const rules = {
53
53
  cyrillic: [(v: any) => v === null || /^[\u0400-\u04FF -]+$/.test(v) || t('rules.cyrillic')],
54
54
  latin: [(v: any) => v === null || /^[a-zA-Z]+$/.test(v) || t('rules.latin')],
55
55
  latinAndNumber: [(v: any) => v === null || /^[0-9a-zA-Z]+$/.test(v) || t('rules.latinAndNumber')],
56
+ latinNumberSymbol: [(v: any) => v === null || /^[0-9a-zA-Z-/]+$/.test(v) || t('rules.latinNumberSymbol')],
56
57
  cyrillicNonRequired: [
57
58
  (v: any) => {
58
59
  if (!v) return true;
@@ -271,6 +272,18 @@ export const rules = {
271
272
  }
272
273
  },
273
274
  ],
275
+ checkPastDate: [
276
+ (v: any) => {
277
+ let today = new Date();
278
+ const yourDate = new Date(formatDate(v)!);
279
+ today.setHours(0, 0, 0, 0);
280
+ if (yourDate >= today) {
281
+ return true;
282
+ } else {
283
+ return t('rules.checkDate');
284
+ }
285
+ },
286
+ ],
274
287
  fileRequired: [(v: any) => !!v || t('rules.fileRequired'), (v: any) => (v && v.length > 0) || t('rules.fileRequired')],
275
288
  guaranteedPeriodLimit(v: any, termAnnuityPayments: any) {
276
289
  if (Number(v) > Number(termAnnuityPayments)) {
@@ -284,4 +297,10 @@ export const rules = {
284
297
  }
285
298
  return true;
286
299
  },
300
+ lengthLimit(v: any, limit: number) {
301
+ if (!!v && typeof v === 'string' && v.length <= limit) {
302
+ return true;
303
+ }
304
+ return t('rules.lengthLimit', { len: limit });
305
+ },
287
306
  };
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.nuxt/tsconfig.json"
3
+ }
package/types/enum.ts CHANGED
@@ -51,6 +51,9 @@ export enum Actions {
51
51
 
52
52
  payed = 'payed',
53
53
  payedCustom = 'payedCustom',
54
+
55
+ rejectDocument = 'rejectDocument',
56
+ rejectDocumentCustom = 'rejectDocumentCustom',
54
57
  }
55
58
 
56
59
  export enum PostActions {
@@ -60,6 +63,7 @@ export enum PostActions {
60
63
  applicationCreated = 'applicationCreated',
61
64
  clipboard = 'clipboard',
62
65
  toHomePage = 'toHomePage',
66
+ toHistory = 'toHistory',
63
67
  toStatementHistory = 'toStatementHistory',
64
68
  toAuth = 'toAuth',
65
69
  DOMevent = 'DOMevent',
@@ -94,9 +98,13 @@ export enum Roles {
94
98
  BranchDirector = 'BranchDirector',
95
99
  USNSACCINS = 'USNSACCINS',
96
100
  Dsuio = 'Dsuio',
97
- Adjuster = 'Adjuster',
101
+ SettlementLosses = 'SettlementLosses',
102
+ HeadSettlementLosses = 'HeadSettlementLosses',
98
103
  DsoDirector = 'DsoDirector',
99
104
  AccountantDirector = 'AccountantDirector',
105
+ ManagerAuletti = 'ManagerAuletti',
106
+ HeadOfDso = 'HeadOfDso',
107
+ URSP = 'URSP',
100
108
  }
101
109
 
102
110
  export enum Statuses {
@@ -145,7 +153,7 @@ export enum Methods {
145
153
  POST = 'POST',
146
154
  }
147
155
 
148
- export namespace Enums {
156
+ export namespace CoreEnums {
149
157
  export namespace GBD {
150
158
  export enum DocTypes {
151
159
  'PS' = '001',
@@ -161,4 +169,13 @@ export namespace Enums {
161
169
  'SBI' = 'SBI',
162
170
  }
163
171
  }
172
+ export namespace Sign {
173
+ export enum Types {
174
+ electronic = 1,
175
+ scans = 2,
176
+ qr = 3,
177
+ qrXml = 5,
178
+ nclayer = 6,
179
+ }
180
+ }
164
181
  }
package/types/env.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /// <reference types="vite/client" />
2
2
 
3
- export interface ImportMetaEnv {
3
+ interface ImportMetaEnv {
4
4
  readonly VITE_MODE: EnvModes;
5
5
  readonly VITE_PRODUCT?: Projects;
6
6
  readonly VITE_PARENT_PRODUCT?: 'efo' | 'auletti';
7
7
  readonly VITE_COMMIT_VERSION?: string;
8
8
  }
9
9
 
10
- export interface ImportMeta {
10
+ interface ImportMeta {
11
11
  readonly env: ImportMetaEnv;
12
12
  }
package/types/form.ts CHANGED
@@ -6,88 +6,85 @@ export enum FieldTypes {
6
6
  PASSWORD = 'password',
7
7
  FILE = 'file',
8
8
  }
9
- export {};
10
9
 
11
- declare global {
12
- export type InputType = TextInput | NumberInput | FileInput | SwitchInput;
13
- export type FormMasks = 'numbers' | 'iin' | 'otp' | 'phone' | 'date' | 'post' | 'threeDigit' | 'iik';
14
- export type FormIcons = 'arrowRight' | 'search' | 'sms' | null;
15
- export 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;
16
14
 
17
- export type FetchFunctions =
18
- | 'getResidents'
19
- | 'getFamilyStatuses'
20
- | 'getRelationTypes'
21
- | 'getCountries'
22
- | 'getStates'
23
- | 'getLocalityTypes'
24
- | 'getRegions'
25
- | 'getCities'
26
- | 'getDocumentTypes'
27
- | 'getTaxCountries'
28
- | 'getCitizenshipCountries'
29
- | 'getSectorCodeList'
30
- | 'getInsurancePay'
31
- | 'getEconomicActivityType'
32
- | 'getBanks'
33
- | 'getDocumentIssuers'
34
- | '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';
35
33
 
36
- export interface DynamicForm {
37
- formRef: any;
38
- sections: SectionType[];
39
- fieldOrder?: string[];
40
- }
34
+ export interface DynamicForm {
35
+ formRef: any;
36
+ sections: SectionType[];
37
+ fieldOrder?: string[];
38
+ }
41
39
 
42
- export type InputBase = {
43
- key?: any;
44
- modelValue?: any;
45
- clearable?: boolean;
46
- label?: string;
47
- placeholder?: string;
48
- readonly?: boolean;
49
- disabled?: boolean;
50
- arrowRight?: boolean;
51
- maxLength?: number | null;
52
- rules?: ValidationRule[];
53
- iconName?: FormIcons;
54
- value?: number;
55
- suffix?: Suffix | null;
56
- hint?: string | undefined;
57
- maska?: FormMasks | null;
58
- fetchFrom?: FetchFunctions | null;
59
- };
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
+ };
60
58
 
61
- export type FormControl<T extends InputType> = T & {
62
- valid: boolean;
63
- dirty: boolean;
64
- touched: boolean;
65
- };
59
+ export type FormControl<T extends InputType> = T & {
60
+ valid: boolean;
61
+ dirty: boolean;
62
+ touched: boolean;
63
+ };
66
64
 
67
- export type FileInput = InputBase & {
68
- type: FieldTypes.FILE;
69
- };
65
+ export type FileInput = InputBase & {
66
+ type: FieldTypes.FILE;
67
+ };
70
68
 
71
- export type TextInput = InputBase & {
72
- type: FieldTypes.TEXT;
73
- };
69
+ export type TextInput = InputBase & {
70
+ type: FieldTypes.TEXT;
71
+ };
74
72
 
75
- export type SwitchInput = InputBase & {
76
- type: FieldTypes.SWITCH;
77
- labeling: boolean | null;
78
- direction: 'horizontal' | 'vertical';
79
- falseValue: boolean | string | null;
80
- trueValue: boolean | string | null;
81
- };
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
+ };
82
80
 
83
- export type NumberInput = InputBase & {
84
- type: FieldTypes.NUMBER;
85
- };
81
+ export type NumberInput = InputBase & {
82
+ type: FieldTypes.NUMBER;
83
+ };
86
84
 
87
- export type ValidationRule = (value: string) => boolean | string;
85
+ export type ValidationRule = (value: string) => boolean | string;
88
86
 
89
- export type SectionType = {
90
- title?: string;
91
- fields: InputType[];
92
- };
93
- }
87
+ export type SectionType = {
88
+ title?: string;
89
+ fields: InputType[];
90
+ };