gotrip-fx-transaction-form 0.1.0-uat.1

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 (107) hide show
  1. package/index.js +60056 -0
  2. package/package.json +14 -0
  3. package/types/components/AddTransaction/BankList.d.ts +20 -0
  4. package/types/components/AddTransaction/BankSelectionInput.d.ts +11 -0
  5. package/types/components/AddTransaction/Business.d.ts +7 -0
  6. package/types/components/AddTransaction/Education.d.ts +7 -0
  7. package/types/components/AddTransaction/GroupCustomers.d.ts +5 -0
  8. package/types/components/AddTransaction/SingularCustomer.d.ts +7 -0
  9. package/types/components/AddTransaction/UseCaseSelection.d.ts +21 -0
  10. package/types/components/AddUser/AddBookerForm.d.ts +6 -0
  11. package/types/components/Apps/AdminApp.d.ts +1 -0
  12. package/types/components/Apps/AgencyApp.d.ts +1 -0
  13. package/types/components/Apps/EmbededIndividualApp.d.ts +5 -0
  14. package/types/components/Apps/IndividualApp.d.ts +1 -0
  15. package/types/components/Apps/PartnerApp.d.ts +1 -0
  16. package/types/components/CurrencyExchangeRate/CurrencyExchangeRate.d.ts +10 -0
  17. package/types/components/CustomerSelection/CustomerSelection.d.ts +10 -0
  18. package/types/components/Dashboard/BookerSelectionInput.d.ts +7 -0
  19. package/types/components/Dashboard/DailyTransactionChart.d.ts +8 -0
  20. package/types/components/Dashboard/TotalCommissionCard.d.ts +9 -0
  21. package/types/components/Dashboard/TotalTransactionCard.d.ts +9 -0
  22. package/types/components/Dashboard/TransactionByStatusChart.d.ts +8 -0
  23. package/types/components/Dashboard/TransactionByTypeChart.d.ts +8 -0
  24. package/types/components/Layout/Layout.d.ts +6 -0
  25. package/types/components/Layout/NavBar/Navbar.d.ts +1 -0
  26. package/types/components/Menu/Menu.d.ts +1 -0
  27. package/types/components/Menu/MenuItem.d.ts +9 -0
  28. package/types/components/Modal/ErrorModal.d.ts +1 -0
  29. package/types/components/Modal/Modal.d.ts +12 -0
  30. package/types/components/Modal/SuccessModal.d.ts +1 -0
  31. package/types/components/Modal/WebcamModal.d.ts +7 -0
  32. package/types/components/Pagination/LimitDropdown.d.ts +6 -0
  33. package/types/components/TransactionList/BankSelectionInput.d.ts +7 -0
  34. package/types/components/TransactionList/CurrencySelectionInput.d.ts +7 -0
  35. package/types/components/TransactionList/StatusSelectionInput.d.ts +9 -0
  36. package/types/components/TransactionStatusBadge/TransactionStatusBadge.d.ts +4 -0
  37. package/types/components/UpdateUser/UpdateBookerForm.d.ts +7 -0
  38. package/types/components/UpdateUser/UpdateCommissionRateForm.d.ts +7 -0
  39. package/types/components/UserProfile/AccountSettingForm.d.ts +7 -0
  40. package/types/components/UserProfile/ChangePasswordForm.d.ts +5 -0
  41. package/types/components/UserStatusBadge/UserStatusBadge.d.ts +4 -0
  42. package/types/components/ui/link-button.d.ts +4 -0
  43. package/types/components/ui/pagination.d.ts +19 -0
  44. package/types/constants/airlines.d.ts +7 -0
  45. package/types/constants/airport-code-country.d.ts +5 -0
  46. package/types/constants/api-urls.d.ts +56 -0
  47. package/types/constants/countries.d.ts +6 -0
  48. package/types/constants/env.d.ts +5 -0
  49. package/types/constants/index.d.ts +7 -0
  50. package/types/constants/provinces.d.ts +6 -0
  51. package/types/design-systems/Button/Button.d.ts +14 -0
  52. package/types/design-systems/Chart/LineChart.d.ts +13 -0
  53. package/types/design-systems/Chart/PieChart.d.ts +9 -0
  54. package/types/design-systems/Drawer/Drawer.d.ts +12 -0
  55. package/types/design-systems/Input/Input.d.ts +5 -0
  56. package/types/design-systems/Stat/Stat.d.ts +8 -0
  57. package/types/design-systems/Toast/Toast.d.ts +7 -0
  58. package/types/embeded-main.d.ts +7 -0
  59. package/types/hooks/transanactions/useBusiness.hook.d.ts +202 -0
  60. package/types/hooks/transanactions/useEducation.hook.d.ts +270 -0
  61. package/types/hooks/useBookerList.d.ts +11 -0
  62. package/types/hooks/useConfirmTransaction.d.ts +32 -0
  63. package/types/hooks/useDashboard.d.ts +27 -0
  64. package/types/hooks/useDisclosure.d.ts +5 -0
  65. package/types/hooks/useEducationFXList.d.ts +8 -0
  66. package/types/hooks/useGroupCustomers.d.ts +231 -0
  67. package/types/hooks/useImportBookers.d.ts +104 -0
  68. package/types/hooks/useIsMobile.d.ts +1 -0
  69. package/types/hooks/useTransactionList.d.ts +21 -0
  70. package/types/hooks/useUserList.d.ts +12 -0
  71. package/types/hooks/useUserProfile.d.ts +7 -0
  72. package/types/hooks/useWindowSize.d.ts +4 -0
  73. package/types/index.d.ts +6 -0
  74. package/types/main.d.ts +1 -0
  75. package/types/pages/admin/home/UserList.d.ts +1 -0
  76. package/types/pages/admin/login/LoginPage.d.ts +6 -0
  77. package/types/pages/agency/add-booker/add-booker.d.ts +5 -0
  78. package/types/pages/agency/add-booker/import-booker.d.ts +1 -0
  79. package/types/pages/agency/add-transaction/add-transaction.d.ts +5 -0
  80. package/types/pages/agency/booker-list/index.d.ts +1 -0
  81. package/types/pages/agency/dashboard/dashboard.d.ts +1 -0
  82. package/types/pages/agency/login/LoginPage.d.ts +6 -0
  83. package/types/pages/agency/register/RegisterPage.d.ts +1 -0
  84. package/types/pages/agency/register/SupervisorRegisterForm.d.ts +1 -0
  85. package/types/pages/agency/register/UserRegisterForm.d.ts +1 -0
  86. package/types/pages/agency/register/UserTypeSelection.d.ts +7 -0
  87. package/types/pages/agency/tracsaction-list/TransactionList.d.ts +7 -0
  88. package/types/pages/agency/traveller-confirmation/TravellerConfirmation.d.ts +1 -0
  89. package/types/pages/agency/user-profile/user-profile.d.ts +1 -0
  90. package/types/pages/guest/home.d.ts +1 -0
  91. package/types/pages/partner/EducationFXList.d.ts +1 -0
  92. package/types/pages/partner/MemberList.d.ts +1 -0
  93. package/types/store/useAppStore.d.ts +25 -0
  94. package/types/store/useAuthStore.d.ts +12 -0
  95. package/types/types/app-actor.d.ts +6 -0
  96. package/types/types/enum.d.ts +17 -0
  97. package/types/types/request.dto.d.ts +17 -0
  98. package/types/types/response.dto.d.ts +147 -0
  99. package/types/types/user.d.ts +11 -0
  100. package/types/util/axios.d.ts +1 -0
  101. package/types/util/extract-api-error-codes.d.ts +2 -0
  102. package/types/util/fixed-thead.d.ts +1 -0
  103. package/types/util/formatter.d.ts +3 -0
  104. package/types/util/time.d.ts +1 -0
  105. package/types/util/toast.d.ts +1 -0
  106. package/types/util/transaction.util.d.ts +2 -0
  107. package/types/vite-env.d.ts +1 -0
@@ -0,0 +1,202 @@
1
+ import { Bank } from '../../components/AddTransaction/BankList';
2
+ import * as yup from 'yup';
3
+ declare const businessSchema: yup.ObjectSchema<{
4
+ name: string;
5
+ email: string;
6
+ phone: string;
7
+ province: string;
8
+ district: string;
9
+ amount: number;
10
+ currency: string;
11
+ document1: {
12
+ type: string;
13
+ link: string;
14
+ }[];
15
+ document2: {
16
+ type: string;
17
+ link: string;
18
+ }[] | undefined;
19
+ document3: {
20
+ type: string;
21
+ link: string;
22
+ }[];
23
+ }, yup.AnyObject, {
24
+ name: undefined;
25
+ email: undefined;
26
+ phone: undefined;
27
+ province: undefined;
28
+ district: undefined;
29
+ amount: undefined;
30
+ currency: undefined;
31
+ document1: "";
32
+ document2: "";
33
+ document3: "";
34
+ }, "">;
35
+ type Props = {
36
+ onFinish?: () => void;
37
+ };
38
+ export declare const useBusiness: ({ onFinish }: Props) => {
39
+ selectedBanks: Bank[];
40
+ setSelectedBanks: import('react').Dispatch<import('react').SetStateAction<Bank[]>>;
41
+ register: import('react-hook-form').UseFormRegister<{
42
+ document2?: {
43
+ type: string;
44
+ link: string;
45
+ }[] | undefined;
46
+ name: string;
47
+ phone: string;
48
+ currency: string;
49
+ amount: number;
50
+ email: string;
51
+ province: string;
52
+ document1: {
53
+ type: string;
54
+ link: string;
55
+ }[];
56
+ document3: {
57
+ type: string;
58
+ link: string;
59
+ }[];
60
+ district: string;
61
+ }>;
62
+ handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
63
+ document2?: {
64
+ type: string;
65
+ link: string;
66
+ }[] | undefined;
67
+ name: string;
68
+ phone: string;
69
+ currency: string;
70
+ amount: number;
71
+ email: string;
72
+ province: string;
73
+ document1: {
74
+ type: string;
75
+ link: string;
76
+ }[];
77
+ document3: {
78
+ type: string;
79
+ link: string;
80
+ }[];
81
+ district: string;
82
+ }, undefined>;
83
+ formState: {
84
+ errors: import('react-hook-form').FieldErrors<{
85
+ document2?: {
86
+ type: string;
87
+ link: string;
88
+ }[] | undefined;
89
+ name: string;
90
+ phone: string;
91
+ currency: string;
92
+ amount: number;
93
+ email: string;
94
+ province: string;
95
+ document1: {
96
+ type: string;
97
+ link: string;
98
+ }[];
99
+ document3: {
100
+ type: string;
101
+ link: string;
102
+ }[];
103
+ district: string;
104
+ }>;
105
+ };
106
+ getValues: import('react-hook-form').UseFormGetValues<{
107
+ document2?: {
108
+ type: string;
109
+ link: string;
110
+ }[] | undefined;
111
+ name: string;
112
+ phone: string;
113
+ currency: string;
114
+ amount: number;
115
+ email: string;
116
+ province: string;
117
+ document1: {
118
+ type: string;
119
+ link: string;
120
+ }[];
121
+ document3: {
122
+ type: string;
123
+ link: string;
124
+ }[];
125
+ district: string;
126
+ }>;
127
+ setValue: import('react-hook-form').UseFormSetValue<{
128
+ document2?: {
129
+ type: string;
130
+ link: string;
131
+ }[] | undefined;
132
+ name: string;
133
+ phone: string;
134
+ currency: string;
135
+ amount: number;
136
+ email: string;
137
+ province: string;
138
+ document1: {
139
+ type: string;
140
+ link: string;
141
+ }[];
142
+ document3: {
143
+ type: string;
144
+ link: string;
145
+ }[];
146
+ district: string;
147
+ }>;
148
+ onSubmit: (data: yup.InferType<typeof businessSchema>) => void;
149
+ errors: import('react-hook-form').FieldErrors<{
150
+ document2?: {
151
+ type: string;
152
+ link: string;
153
+ }[] | undefined;
154
+ name: string;
155
+ phone: string;
156
+ currency: string;
157
+ amount: number;
158
+ email: string;
159
+ province: string;
160
+ document1: {
161
+ type: string;
162
+ link: string;
163
+ }[];
164
+ document3: {
165
+ type: string;
166
+ link: string;
167
+ }[];
168
+ district: string;
169
+ }>;
170
+ reset: import('react-hook-form').UseFormReset<{
171
+ document2?: {
172
+ type: string;
173
+ link: string;
174
+ }[] | undefined;
175
+ name: string;
176
+ phone: string;
177
+ currency: string;
178
+ amount: number;
179
+ email: string;
180
+ province: string;
181
+ document1: {
182
+ type: string;
183
+ link: string;
184
+ }[];
185
+ document3: {
186
+ type: string;
187
+ link: string;
188
+ }[];
189
+ district: string;
190
+ }>;
191
+ documents: {
192
+ document1: File[];
193
+ document2: File[];
194
+ document3: File[];
195
+ };
196
+ setDocuments: import('react').Dispatch<import('react').SetStateAction<{
197
+ document1: File[];
198
+ document2: File[];
199
+ document3: File[];
200
+ }>>;
201
+ };
202
+ export {};
@@ -0,0 +1,270 @@
1
+ import { Bank } from '../../components/AddTransaction/BankList';
2
+ import { Currency } from '../../types/response.dto';
3
+ import * as yup from 'yup';
4
+ declare const educationSchema: yup.ObjectSchema<{
5
+ name: string;
6
+ email: string;
7
+ phone: string;
8
+ province: string;
9
+ amount: number;
10
+ currency: string;
11
+ document1: {
12
+ type: string;
13
+ link: string;
14
+ }[] | undefined;
15
+ document2: {
16
+ type: string;
17
+ link: string;
18
+ }[] | undefined;
19
+ document3: {
20
+ type: string;
21
+ link: string;
22
+ }[] | undefined;
23
+ document4: {
24
+ type: string;
25
+ link: string;
26
+ }[] | undefined;
27
+ document5: {
28
+ type: string;
29
+ link: string;
30
+ }[] | undefined;
31
+ }, yup.AnyObject, {
32
+ name: undefined;
33
+ email: undefined;
34
+ phone: undefined;
35
+ province: undefined;
36
+ amount: undefined;
37
+ currency: undefined;
38
+ document1: "";
39
+ document2: "";
40
+ document3: "";
41
+ document4: "";
42
+ document5: "";
43
+ }, "">;
44
+ type Props = {
45
+ onFinish?: () => void;
46
+ };
47
+ export declare const useEducation: ({ onFinish }: Props) => {
48
+ currencies: Currency[];
49
+ selectedBanks: Bank[];
50
+ setSelectedBanks: import('react').Dispatch<import('react').SetStateAction<Bank[]>>;
51
+ register: import('react-hook-form').UseFormRegister<{
52
+ document1?: {
53
+ type: string;
54
+ link: string;
55
+ }[] | undefined;
56
+ document2?: {
57
+ type: string;
58
+ link: string;
59
+ }[] | undefined;
60
+ document3?: {
61
+ type: string;
62
+ link: string;
63
+ }[] | undefined;
64
+ document4?: {
65
+ type: string;
66
+ link: string;
67
+ }[] | undefined;
68
+ document5?: {
69
+ type: string;
70
+ link: string;
71
+ }[] | undefined;
72
+ name: string;
73
+ phone: string;
74
+ currency: string;
75
+ amount: number;
76
+ email: string;
77
+ province: string;
78
+ }>;
79
+ handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
80
+ document1?: {
81
+ type: string;
82
+ link: string;
83
+ }[] | undefined;
84
+ document2?: {
85
+ type: string;
86
+ link: string;
87
+ }[] | undefined;
88
+ document3?: {
89
+ type: string;
90
+ link: string;
91
+ }[] | undefined;
92
+ document4?: {
93
+ type: string;
94
+ link: string;
95
+ }[] | undefined;
96
+ document5?: {
97
+ type: string;
98
+ link: string;
99
+ }[] | undefined;
100
+ name: string;
101
+ phone: string;
102
+ currency: string;
103
+ amount: number;
104
+ email: string;
105
+ province: string;
106
+ }, undefined>;
107
+ formState: {
108
+ errors: import('react-hook-form').FieldErrors<{
109
+ document1?: {
110
+ type: string;
111
+ link: string;
112
+ }[] | undefined;
113
+ document2?: {
114
+ type: string;
115
+ link: string;
116
+ }[] | undefined;
117
+ document3?: {
118
+ type: string;
119
+ link: string;
120
+ }[] | undefined;
121
+ document4?: {
122
+ type: string;
123
+ link: string;
124
+ }[] | undefined;
125
+ document5?: {
126
+ type: string;
127
+ link: string;
128
+ }[] | undefined;
129
+ name: string;
130
+ phone: string;
131
+ currency: string;
132
+ amount: number;
133
+ email: string;
134
+ province: string;
135
+ }>;
136
+ };
137
+ getValues: import('react-hook-form').UseFormGetValues<{
138
+ document1?: {
139
+ type: string;
140
+ link: string;
141
+ }[] | undefined;
142
+ document2?: {
143
+ type: string;
144
+ link: string;
145
+ }[] | undefined;
146
+ document3?: {
147
+ type: string;
148
+ link: string;
149
+ }[] | undefined;
150
+ document4?: {
151
+ type: string;
152
+ link: string;
153
+ }[] | undefined;
154
+ document5?: {
155
+ type: string;
156
+ link: string;
157
+ }[] | undefined;
158
+ name: string;
159
+ phone: string;
160
+ currency: string;
161
+ amount: number;
162
+ email: string;
163
+ province: string;
164
+ }>;
165
+ setValue: import('react-hook-form').UseFormSetValue<{
166
+ document1?: {
167
+ type: string;
168
+ link: string;
169
+ }[] | undefined;
170
+ document2?: {
171
+ type: string;
172
+ link: string;
173
+ }[] | undefined;
174
+ document3?: {
175
+ type: string;
176
+ link: string;
177
+ }[] | undefined;
178
+ document4?: {
179
+ type: string;
180
+ link: string;
181
+ }[] | undefined;
182
+ document5?: {
183
+ type: string;
184
+ link: string;
185
+ }[] | undefined;
186
+ name: string;
187
+ phone: string;
188
+ currency: string;
189
+ amount: number;
190
+ email: string;
191
+ province: string;
192
+ }>;
193
+ onSubmit: (data: yup.InferType<typeof educationSchema>) => Promise<void>;
194
+ errors: import('react-hook-form').FieldErrors<{
195
+ document1?: {
196
+ type: string;
197
+ link: string;
198
+ }[] | undefined;
199
+ document2?: {
200
+ type: string;
201
+ link: string;
202
+ }[] | undefined;
203
+ document3?: {
204
+ type: string;
205
+ link: string;
206
+ }[] | undefined;
207
+ document4?: {
208
+ type: string;
209
+ link: string;
210
+ }[] | undefined;
211
+ document5?: {
212
+ type: string;
213
+ link: string;
214
+ }[] | undefined;
215
+ name: string;
216
+ phone: string;
217
+ currency: string;
218
+ amount: number;
219
+ email: string;
220
+ province: string;
221
+ }>;
222
+ reset: import('react-hook-form').UseFormReset<{
223
+ document1?: {
224
+ type: string;
225
+ link: string;
226
+ }[] | undefined;
227
+ document2?: {
228
+ type: string;
229
+ link: string;
230
+ }[] | undefined;
231
+ document3?: {
232
+ type: string;
233
+ link: string;
234
+ }[] | undefined;
235
+ document4?: {
236
+ type: string;
237
+ link: string;
238
+ }[] | undefined;
239
+ document5?: {
240
+ type: string;
241
+ link: string;
242
+ }[] | undefined;
243
+ name: string;
244
+ phone: string;
245
+ currency: string;
246
+ amount: number;
247
+ email: string;
248
+ province: string;
249
+ }>;
250
+ documents: {
251
+ document1: File[];
252
+ document2: File[];
253
+ document3: File[];
254
+ document4: File[];
255
+ document5: File[];
256
+ };
257
+ setDocuments: import('react').Dispatch<import('react').SetStateAction<{
258
+ document1: File[];
259
+ document2: File[];
260
+ document3: File[];
261
+ document4: File[];
262
+ document5: File[];
263
+ }>>;
264
+ showUploadingModal: boolean;
265
+ setShowUploadingModal: import('react').Dispatch<import('react').SetStateAction<boolean>>;
266
+ totalFileCount: number;
267
+ uploadedFileCount: number;
268
+ isLoading: boolean;
269
+ };
270
+ export {};
@@ -0,0 +1,11 @@
1
+ import { IUser } from '../types/response.dto';
2
+ export declare const useBookerList: () => {
3
+ bookers: IUser[];
4
+ total: number;
5
+ loading: boolean;
6
+ page: number;
7
+ limit: number;
8
+ refetchData: () => void;
9
+ setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
10
+ setLimit: (limit: number) => void;
11
+ };
@@ -0,0 +1,32 @@
1
+ import { TransactionStatus } from '../types/enum';
2
+ export type ConfirmTransactionData = {
3
+ code: string;
4
+ data: {
5
+ id: number;
6
+ bankCode: string;
7
+ bookerName?: string;
8
+ bookerEmail?: string;
9
+ ticketNumber: string;
10
+ travellerName: string;
11
+ confirmationToken: string;
12
+ status: TransactionStatus;
13
+ customerCode: string;
14
+ };
15
+ message: string;
16
+ };
17
+ export declare const useConfirmTransaction: () => {
18
+ transaction: {
19
+ id: number;
20
+ bankCode: string;
21
+ bookerName?: string;
22
+ bookerEmail?: string;
23
+ ticketNumber: string;
24
+ travellerName: string;
25
+ confirmationToken: string;
26
+ status: TransactionStatus;
27
+ customerCode: string;
28
+ } | null;
29
+ isLoading: boolean;
30
+ confirmTransaction: () => Promise<void>;
31
+ customerCode: string | undefined;
32
+ };
@@ -0,0 +1,27 @@
1
+ import { IUser } from '../types/response.dto';
2
+ export declare const useDashboard: () => {
3
+ transferTypes: {
4
+ type: string;
5
+ label: string;
6
+ }[];
7
+ transferStatuses: {
8
+ status: string;
9
+ label: string;
10
+ }[];
11
+ getBookersOfSupervisor: () => Promise<IUser[]>;
12
+ getTransactionCount: (startDate: string, endDate: string, bookerId?: number | null) => Promise<number>;
13
+ getTotalCommissionAmount: (startDate: string, endDate: string, bookerId?: number | null) => Promise<number>;
14
+ getTransactionCountGroupByType: (startDate: string, endDate: string, bookerId?: number | null) => Promise<{
15
+ type: string;
16
+ count: number;
17
+ }[]>;
18
+ getTransactionCountByStatus: (startDate: string, endDate: string, bookerId?: number | null) => Promise<{
19
+ status: string;
20
+ count: number;
21
+ }[]>;
22
+ getTransactionCountByDate: (startDate: string, endDate: string, bookerId?: number | null) => Promise<{
23
+ date: string;
24
+ type: string;
25
+ count: number;
26
+ }[]>;
27
+ };
@@ -0,0 +1,5 @@
1
+ export declare const useDisclosure: (value?: boolean) => {
2
+ isOpen: boolean;
3
+ onOpen: () => void;
4
+ onClose: () => void;
5
+ };
@@ -0,0 +1,8 @@
1
+ import { IBid } from '../types/response.dto';
2
+ export declare const useEducationFXList: () => {
3
+ bids: IBid[];
4
+ total: number;
5
+ page: number;
6
+ limit: number;
7
+ loading: boolean;
8
+ };