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.
- package/index.js +60056 -0
- package/package.json +14 -0
- package/types/components/AddTransaction/BankList.d.ts +20 -0
- package/types/components/AddTransaction/BankSelectionInput.d.ts +11 -0
- package/types/components/AddTransaction/Business.d.ts +7 -0
- package/types/components/AddTransaction/Education.d.ts +7 -0
- package/types/components/AddTransaction/GroupCustomers.d.ts +5 -0
- package/types/components/AddTransaction/SingularCustomer.d.ts +7 -0
- package/types/components/AddTransaction/UseCaseSelection.d.ts +21 -0
- package/types/components/AddUser/AddBookerForm.d.ts +6 -0
- package/types/components/Apps/AdminApp.d.ts +1 -0
- package/types/components/Apps/AgencyApp.d.ts +1 -0
- package/types/components/Apps/EmbededIndividualApp.d.ts +5 -0
- package/types/components/Apps/IndividualApp.d.ts +1 -0
- package/types/components/Apps/PartnerApp.d.ts +1 -0
- package/types/components/CurrencyExchangeRate/CurrencyExchangeRate.d.ts +10 -0
- package/types/components/CustomerSelection/CustomerSelection.d.ts +10 -0
- package/types/components/Dashboard/BookerSelectionInput.d.ts +7 -0
- package/types/components/Dashboard/DailyTransactionChart.d.ts +8 -0
- package/types/components/Dashboard/TotalCommissionCard.d.ts +9 -0
- package/types/components/Dashboard/TotalTransactionCard.d.ts +9 -0
- package/types/components/Dashboard/TransactionByStatusChart.d.ts +8 -0
- package/types/components/Dashboard/TransactionByTypeChart.d.ts +8 -0
- package/types/components/Layout/Layout.d.ts +6 -0
- package/types/components/Layout/NavBar/Navbar.d.ts +1 -0
- package/types/components/Menu/Menu.d.ts +1 -0
- package/types/components/Menu/MenuItem.d.ts +9 -0
- package/types/components/Modal/ErrorModal.d.ts +1 -0
- package/types/components/Modal/Modal.d.ts +12 -0
- package/types/components/Modal/SuccessModal.d.ts +1 -0
- package/types/components/Modal/WebcamModal.d.ts +7 -0
- package/types/components/Pagination/LimitDropdown.d.ts +6 -0
- package/types/components/TransactionList/BankSelectionInput.d.ts +7 -0
- package/types/components/TransactionList/CurrencySelectionInput.d.ts +7 -0
- package/types/components/TransactionList/StatusSelectionInput.d.ts +9 -0
- package/types/components/TransactionStatusBadge/TransactionStatusBadge.d.ts +4 -0
- package/types/components/UpdateUser/UpdateBookerForm.d.ts +7 -0
- package/types/components/UpdateUser/UpdateCommissionRateForm.d.ts +7 -0
- package/types/components/UserProfile/AccountSettingForm.d.ts +7 -0
- package/types/components/UserProfile/ChangePasswordForm.d.ts +5 -0
- package/types/components/UserStatusBadge/UserStatusBadge.d.ts +4 -0
- package/types/components/ui/link-button.d.ts +4 -0
- package/types/components/ui/pagination.d.ts +19 -0
- package/types/constants/airlines.d.ts +7 -0
- package/types/constants/airport-code-country.d.ts +5 -0
- package/types/constants/api-urls.d.ts +56 -0
- package/types/constants/countries.d.ts +6 -0
- package/types/constants/env.d.ts +5 -0
- package/types/constants/index.d.ts +7 -0
- package/types/constants/provinces.d.ts +6 -0
- package/types/design-systems/Button/Button.d.ts +14 -0
- package/types/design-systems/Chart/LineChart.d.ts +13 -0
- package/types/design-systems/Chart/PieChart.d.ts +9 -0
- package/types/design-systems/Drawer/Drawer.d.ts +12 -0
- package/types/design-systems/Input/Input.d.ts +5 -0
- package/types/design-systems/Stat/Stat.d.ts +8 -0
- package/types/design-systems/Toast/Toast.d.ts +7 -0
- package/types/embeded-main.d.ts +7 -0
- package/types/hooks/transanactions/useBusiness.hook.d.ts +202 -0
- package/types/hooks/transanactions/useEducation.hook.d.ts +270 -0
- package/types/hooks/useBookerList.d.ts +11 -0
- package/types/hooks/useConfirmTransaction.d.ts +32 -0
- package/types/hooks/useDashboard.d.ts +27 -0
- package/types/hooks/useDisclosure.d.ts +5 -0
- package/types/hooks/useEducationFXList.d.ts +8 -0
- package/types/hooks/useGroupCustomers.d.ts +231 -0
- package/types/hooks/useImportBookers.d.ts +104 -0
- package/types/hooks/useIsMobile.d.ts +1 -0
- package/types/hooks/useTransactionList.d.ts +21 -0
- package/types/hooks/useUserList.d.ts +12 -0
- package/types/hooks/useUserProfile.d.ts +7 -0
- package/types/hooks/useWindowSize.d.ts +4 -0
- package/types/index.d.ts +6 -0
- package/types/main.d.ts +1 -0
- package/types/pages/admin/home/UserList.d.ts +1 -0
- package/types/pages/admin/login/LoginPage.d.ts +6 -0
- package/types/pages/agency/add-booker/add-booker.d.ts +5 -0
- package/types/pages/agency/add-booker/import-booker.d.ts +1 -0
- package/types/pages/agency/add-transaction/add-transaction.d.ts +5 -0
- package/types/pages/agency/booker-list/index.d.ts +1 -0
- package/types/pages/agency/dashboard/dashboard.d.ts +1 -0
- package/types/pages/agency/login/LoginPage.d.ts +6 -0
- package/types/pages/agency/register/RegisterPage.d.ts +1 -0
- package/types/pages/agency/register/SupervisorRegisterForm.d.ts +1 -0
- package/types/pages/agency/register/UserRegisterForm.d.ts +1 -0
- package/types/pages/agency/register/UserTypeSelection.d.ts +7 -0
- package/types/pages/agency/tracsaction-list/TransactionList.d.ts +7 -0
- package/types/pages/agency/traveller-confirmation/TravellerConfirmation.d.ts +1 -0
- package/types/pages/agency/user-profile/user-profile.d.ts +1 -0
- package/types/pages/guest/home.d.ts +1 -0
- package/types/pages/partner/EducationFXList.d.ts +1 -0
- package/types/pages/partner/MemberList.d.ts +1 -0
- package/types/store/useAppStore.d.ts +25 -0
- package/types/store/useAuthStore.d.ts +12 -0
- package/types/types/app-actor.d.ts +6 -0
- package/types/types/enum.d.ts +17 -0
- package/types/types/request.dto.d.ts +17 -0
- package/types/types/response.dto.d.ts +147 -0
- package/types/types/user.d.ts +11 -0
- package/types/util/axios.d.ts +1 -0
- package/types/util/extract-api-error-codes.d.ts +2 -0
- package/types/util/fixed-thead.d.ts +1 -0
- package/types/util/formatter.d.ts +3 -0
- package/types/util/time.d.ts +1 -0
- package/types/util/toast.d.ts +1 -0
- package/types/util/transaction.util.d.ts +2 -0
- package/types/vite-env.d.ts +1 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { Currency } from '../types/response.dto';
|
|
2
|
+
import { ChangeEvent } from 'react';
|
|
3
|
+
import * as yup from 'yup';
|
|
4
|
+
declare const onePersonSchema: yup.ObjectSchema<{
|
|
5
|
+
ticketCode: string | undefined;
|
|
6
|
+
customerName: string;
|
|
7
|
+
passportNo: string;
|
|
8
|
+
idNo: string;
|
|
9
|
+
mobileNo: string;
|
|
10
|
+
currencyCode: string;
|
|
11
|
+
bankCode: string;
|
|
12
|
+
bankName: string | undefined;
|
|
13
|
+
amount: number;
|
|
14
|
+
reservationNumber: string;
|
|
15
|
+
}, yup.AnyObject, {
|
|
16
|
+
ticketCode: undefined;
|
|
17
|
+
customerName: undefined;
|
|
18
|
+
passportNo: undefined;
|
|
19
|
+
idNo: undefined;
|
|
20
|
+
mobileNo: undefined;
|
|
21
|
+
currencyCode: undefined;
|
|
22
|
+
bankCode: undefined;
|
|
23
|
+
bankName: undefined;
|
|
24
|
+
amount: undefined;
|
|
25
|
+
reservationNumber: undefined;
|
|
26
|
+
}, "">;
|
|
27
|
+
declare const groupOfPeopleSchema: yup.ObjectSchema<{
|
|
28
|
+
lastName: string | undefined;
|
|
29
|
+
airlineCode: string;
|
|
30
|
+
airlineName: string;
|
|
31
|
+
departureDate: string;
|
|
32
|
+
countryCodeDes: string;
|
|
33
|
+
countryNameDes: string;
|
|
34
|
+
customers: {
|
|
35
|
+
ticketCode?: string | undefined;
|
|
36
|
+
bankName?: string | undefined;
|
|
37
|
+
reservationNumber: string;
|
|
38
|
+
customerName: string;
|
|
39
|
+
passportNo: string;
|
|
40
|
+
idNo: string;
|
|
41
|
+
mobileNo: string;
|
|
42
|
+
amount: number;
|
|
43
|
+
currencyCode: string;
|
|
44
|
+
bankCode: string;
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
}, yup.AnyObject, {
|
|
47
|
+
lastName: undefined;
|
|
48
|
+
airlineCode: undefined;
|
|
49
|
+
airlineName: undefined;
|
|
50
|
+
departureDate: undefined;
|
|
51
|
+
countryCodeDes: undefined;
|
|
52
|
+
countryNameDes: undefined;
|
|
53
|
+
customers: "";
|
|
54
|
+
}, "">;
|
|
55
|
+
export declare const useGroupCustomers: (onFinish: () => void) => {
|
|
56
|
+
onFindFlightInfo: (customer: yup.InferType<typeof onePersonSchema>) => Promise<void>;
|
|
57
|
+
inputFileRef: import('react').RefObject<HTMLInputElement>;
|
|
58
|
+
currencies: Currency[];
|
|
59
|
+
file: File | null;
|
|
60
|
+
currencyOptions: {
|
|
61
|
+
label: string;
|
|
62
|
+
value: string;
|
|
63
|
+
}[];
|
|
64
|
+
getValues: import('react-hook-form').UseFormGetValues<{
|
|
65
|
+
customers?: {
|
|
66
|
+
ticketCode?: string | undefined;
|
|
67
|
+
bankName?: string | undefined;
|
|
68
|
+
reservationNumber: string;
|
|
69
|
+
customerName: string;
|
|
70
|
+
passportNo: string;
|
|
71
|
+
idNo: string;
|
|
72
|
+
mobileNo: string;
|
|
73
|
+
amount: number;
|
|
74
|
+
currencyCode: string;
|
|
75
|
+
bankCode: string;
|
|
76
|
+
}[] | undefined;
|
|
77
|
+
lastName?: string | undefined;
|
|
78
|
+
airlineCode: string;
|
|
79
|
+
airlineName: string;
|
|
80
|
+
departureDate: string;
|
|
81
|
+
countryCodeDes: string;
|
|
82
|
+
countryNameDes: string;
|
|
83
|
+
}>;
|
|
84
|
+
setValue: import('react-hook-form').UseFormSetValue<{
|
|
85
|
+
customers?: {
|
|
86
|
+
ticketCode?: string | undefined;
|
|
87
|
+
bankName?: string | undefined;
|
|
88
|
+
reservationNumber: string;
|
|
89
|
+
customerName: string;
|
|
90
|
+
passportNo: string;
|
|
91
|
+
idNo: string;
|
|
92
|
+
mobileNo: string;
|
|
93
|
+
amount: number;
|
|
94
|
+
currencyCode: string;
|
|
95
|
+
bankCode: string;
|
|
96
|
+
}[] | undefined;
|
|
97
|
+
lastName?: string | undefined;
|
|
98
|
+
airlineCode: string;
|
|
99
|
+
airlineName: string;
|
|
100
|
+
departureDate: string;
|
|
101
|
+
countryCodeDes: string;
|
|
102
|
+
countryNameDes: string;
|
|
103
|
+
}>;
|
|
104
|
+
watch: import('react-hook-form').UseFormWatch<{
|
|
105
|
+
customers?: {
|
|
106
|
+
ticketCode?: string | undefined;
|
|
107
|
+
bankName?: string | undefined;
|
|
108
|
+
reservationNumber: string;
|
|
109
|
+
customerName: string;
|
|
110
|
+
passportNo: string;
|
|
111
|
+
idNo: string;
|
|
112
|
+
mobileNo: string;
|
|
113
|
+
amount: number;
|
|
114
|
+
currencyCode: string;
|
|
115
|
+
bankCode: string;
|
|
116
|
+
}[] | undefined;
|
|
117
|
+
lastName?: string | undefined;
|
|
118
|
+
airlineCode: string;
|
|
119
|
+
airlineName: string;
|
|
120
|
+
departureDate: string;
|
|
121
|
+
countryCodeDes: string;
|
|
122
|
+
countryNameDes: string;
|
|
123
|
+
}>;
|
|
124
|
+
trigger: import('react-hook-form').UseFormTrigger<{
|
|
125
|
+
customers?: {
|
|
126
|
+
ticketCode?: string | undefined;
|
|
127
|
+
bankName?: string | undefined;
|
|
128
|
+
reservationNumber: string;
|
|
129
|
+
customerName: string;
|
|
130
|
+
passportNo: string;
|
|
131
|
+
idNo: string;
|
|
132
|
+
mobileNo: string;
|
|
133
|
+
amount: number;
|
|
134
|
+
currencyCode: string;
|
|
135
|
+
bankCode: string;
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
lastName?: string | undefined;
|
|
138
|
+
airlineCode: string;
|
|
139
|
+
airlineName: string;
|
|
140
|
+
departureDate: string;
|
|
141
|
+
countryCodeDes: string;
|
|
142
|
+
countryNameDes: string;
|
|
143
|
+
}>;
|
|
144
|
+
reset: import('react-hook-form').UseFormReset<{
|
|
145
|
+
customers?: {
|
|
146
|
+
ticketCode?: string | undefined;
|
|
147
|
+
bankName?: string | undefined;
|
|
148
|
+
reservationNumber: string;
|
|
149
|
+
customerName: string;
|
|
150
|
+
passportNo: string;
|
|
151
|
+
idNo: string;
|
|
152
|
+
mobileNo: string;
|
|
153
|
+
amount: number;
|
|
154
|
+
currencyCode: string;
|
|
155
|
+
bankCode: string;
|
|
156
|
+
}[] | undefined;
|
|
157
|
+
lastName?: string | undefined;
|
|
158
|
+
airlineCode: string;
|
|
159
|
+
airlineName: string;
|
|
160
|
+
departureDate: string;
|
|
161
|
+
countryCodeDes: string;
|
|
162
|
+
countryNameDes: string;
|
|
163
|
+
}>;
|
|
164
|
+
onSelectFile: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
165
|
+
onSubmit: (data: yup.InferType<typeof groupOfPeopleSchema>) => Promise<void>;
|
|
166
|
+
handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
|
|
167
|
+
customers?: {
|
|
168
|
+
ticketCode?: string | undefined;
|
|
169
|
+
bankName?: string | undefined;
|
|
170
|
+
reservationNumber: string;
|
|
171
|
+
customerName: string;
|
|
172
|
+
passportNo: string;
|
|
173
|
+
idNo: string;
|
|
174
|
+
mobileNo: string;
|
|
175
|
+
amount: number;
|
|
176
|
+
currencyCode: string;
|
|
177
|
+
bankCode: string;
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
lastName?: string | undefined;
|
|
180
|
+
airlineCode: string;
|
|
181
|
+
airlineName: string;
|
|
182
|
+
departureDate: string;
|
|
183
|
+
countryCodeDes: string;
|
|
184
|
+
countryNameDes: string;
|
|
185
|
+
}, undefined>;
|
|
186
|
+
errors: import('react-hook-form').FieldErrors<{
|
|
187
|
+
customers?: {
|
|
188
|
+
ticketCode?: string | undefined;
|
|
189
|
+
bankName?: string | undefined;
|
|
190
|
+
reservationNumber: string;
|
|
191
|
+
customerName: string;
|
|
192
|
+
passportNo: string;
|
|
193
|
+
idNo: string;
|
|
194
|
+
mobileNo: string;
|
|
195
|
+
amount: number;
|
|
196
|
+
currencyCode: string;
|
|
197
|
+
bankCode: string;
|
|
198
|
+
}[] | undefined;
|
|
199
|
+
lastName?: string | undefined;
|
|
200
|
+
airlineCode: string;
|
|
201
|
+
airlineName: string;
|
|
202
|
+
departureDate: string;
|
|
203
|
+
countryCodeDes: string;
|
|
204
|
+
countryNameDes: string;
|
|
205
|
+
}>;
|
|
206
|
+
register: import('react-hook-form').UseFormRegister<{
|
|
207
|
+
customers?: {
|
|
208
|
+
ticketCode?: string | undefined;
|
|
209
|
+
bankName?: string | undefined;
|
|
210
|
+
reservationNumber: string;
|
|
211
|
+
customerName: string;
|
|
212
|
+
passportNo: string;
|
|
213
|
+
idNo: string;
|
|
214
|
+
mobileNo: string;
|
|
215
|
+
amount: number;
|
|
216
|
+
currencyCode: string;
|
|
217
|
+
bankCode: string;
|
|
218
|
+
}[] | undefined;
|
|
219
|
+
lastName?: string | undefined;
|
|
220
|
+
airlineCode: string;
|
|
221
|
+
airlineName: string;
|
|
222
|
+
departureDate: string;
|
|
223
|
+
countryCodeDes: string;
|
|
224
|
+
countryNameDes: string;
|
|
225
|
+
}>;
|
|
226
|
+
removeCustomer: (index: number) => void;
|
|
227
|
+
addCustomer: () => void;
|
|
228
|
+
isGettingFlightInfo: boolean;
|
|
229
|
+
disabled: Record<"airlineCode" | "airlineName" | "departureDate" | "countryCodeDes" | "countryNameDes" | ("customers" | "lastName"), boolean>;
|
|
230
|
+
};
|
|
231
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
declare const groupOfBookerSchema: yup.ObjectSchema<{
|
|
4
|
+
bookers: {
|
|
5
|
+
status: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
firstName: string;
|
|
11
|
+
}[] | undefined;
|
|
12
|
+
}, yup.AnyObject, {
|
|
13
|
+
bookers: "";
|
|
14
|
+
}, "">;
|
|
15
|
+
export declare const useImportBookers: (onFinish: () => void) => {
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
file: File | null;
|
|
18
|
+
inputFileRef: import('react').RefObject<HTMLInputElement>;
|
|
19
|
+
onSelectFile: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
20
|
+
register: import('react-hook-form').UseFormRegister<{
|
|
21
|
+
bookers?: {
|
|
22
|
+
status: string;
|
|
23
|
+
phone: string;
|
|
24
|
+
lastName: string;
|
|
25
|
+
email: string;
|
|
26
|
+
password: string;
|
|
27
|
+
firstName: string;
|
|
28
|
+
}[] | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
|
|
31
|
+
bookers?: {
|
|
32
|
+
status: string;
|
|
33
|
+
phone: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
email: string;
|
|
36
|
+
password: string;
|
|
37
|
+
firstName: string;
|
|
38
|
+
}[] | undefined;
|
|
39
|
+
}, undefined>;
|
|
40
|
+
errors: import('react-hook-form').FieldErrors<{
|
|
41
|
+
bookers?: {
|
|
42
|
+
status: string;
|
|
43
|
+
phone: string;
|
|
44
|
+
lastName: string;
|
|
45
|
+
email: string;
|
|
46
|
+
password: string;
|
|
47
|
+
firstName: string;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
getValues: import('react-hook-form').UseFormGetValues<{
|
|
51
|
+
bookers?: {
|
|
52
|
+
status: string;
|
|
53
|
+
phone: string;
|
|
54
|
+
lastName: string;
|
|
55
|
+
email: string;
|
|
56
|
+
password: string;
|
|
57
|
+
firstName: string;
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
setValue: import('react-hook-form').UseFormSetValue<{
|
|
61
|
+
bookers?: {
|
|
62
|
+
status: string;
|
|
63
|
+
phone: string;
|
|
64
|
+
lastName: string;
|
|
65
|
+
email: string;
|
|
66
|
+
password: string;
|
|
67
|
+
firstName: string;
|
|
68
|
+
}[] | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
watch: import('react-hook-form').UseFormWatch<{
|
|
71
|
+
bookers?: {
|
|
72
|
+
status: string;
|
|
73
|
+
phone: string;
|
|
74
|
+
lastName: string;
|
|
75
|
+
email: string;
|
|
76
|
+
password: string;
|
|
77
|
+
firstName: string;
|
|
78
|
+
}[] | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
trigger: import('react-hook-form').UseFormTrigger<{
|
|
81
|
+
bookers?: {
|
|
82
|
+
status: string;
|
|
83
|
+
phone: string;
|
|
84
|
+
lastName: string;
|
|
85
|
+
email: string;
|
|
86
|
+
password: string;
|
|
87
|
+
firstName: string;
|
|
88
|
+
}[] | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
reset: import('react-hook-form').UseFormReset<{
|
|
91
|
+
bookers?: {
|
|
92
|
+
status: string;
|
|
93
|
+
phone: string;
|
|
94
|
+
lastName: string;
|
|
95
|
+
email: string;
|
|
96
|
+
password: string;
|
|
97
|
+
firstName: string;
|
|
98
|
+
}[] | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
onSubmit: (data: yup.InferType<typeof groupOfBookerSchema>) => Promise<void>;
|
|
101
|
+
addBooker: () => void;
|
|
102
|
+
removeBooker: (index: number) => void;
|
|
103
|
+
};
|
|
104
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsMobile: () => boolean | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Currency, IBank, ITransaction } from '../types/response.dto';
|
|
2
|
+
import { GetTransactionListReqDto } from '../types/request.dto';
|
|
3
|
+
type Props = {
|
|
4
|
+
defaultLimit?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const useTransactionList: ({ defaultLimit }: Props) => {
|
|
7
|
+
transactions: ITransaction[];
|
|
8
|
+
currencies: Currency[];
|
|
9
|
+
banks: IBank[];
|
|
10
|
+
total: number;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
page: number;
|
|
13
|
+
limit: number;
|
|
14
|
+
refetchData: () => void;
|
|
15
|
+
sendBankTransaction: (transaction: ITransaction) => Promise<void>;
|
|
16
|
+
checkTicketStatus: (transaction: ITransaction) => Promise<void>;
|
|
17
|
+
setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
18
|
+
setLimit: (limit: number) => void;
|
|
19
|
+
setFilter: import('react').Dispatch<import('react').SetStateAction<GetTransactionListReqDto>>;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IUser } from '../types/response.dto';
|
|
2
|
+
export declare const useUserList: () => {
|
|
3
|
+
users: IUser[];
|
|
4
|
+
total: number;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
page: number;
|
|
7
|
+
limit: number;
|
|
8
|
+
refetchData: () => void;
|
|
9
|
+
approveUser: (user: IUser) => Promise<void>;
|
|
10
|
+
setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
11
|
+
setLimit: (limit: number) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IUser } from '../types/response.dto';
|
|
2
|
+
export declare const useUserProfile: () => {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
user: IUser | null;
|
|
5
|
+
updateUserProfile: (user: IUser) => Promise<void>;
|
|
6
|
+
updateUserPassword: (oldPassword: string, newPassword: string) => Promise<void>;
|
|
7
|
+
};
|
package/types/index.d.ts
ADDED
package/types/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UserList: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ImportBooker: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BookerList: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Dashboard: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RegisterPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SupervisorRegisterForm: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UserRegisterForm: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TravellerConfirmation: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UserProfile: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GuestHome: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EducationFXList: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MemberList: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type AppState = {
|
|
2
|
+
isLoading: boolean;
|
|
3
|
+
modal: {
|
|
4
|
+
error: {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
success: {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
setIsLoading: (isLoading: boolean) => void;
|
|
14
|
+
setModalError: (modal: {
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
message: string;
|
|
17
|
+
}) => void;
|
|
18
|
+
setModalSuccess: (modal: {
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
message: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
closeModalError: () => void;
|
|
23
|
+
closeModalSuccess: () => void;
|
|
24
|
+
};
|
|
25
|
+
export declare const useAppStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AppState>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LoginRespDto } from '../types/response.dto';
|
|
2
|
+
type AuthUser = LoginRespDto['user'];
|
|
3
|
+
export type AuthState = {
|
|
4
|
+
token: string | null;
|
|
5
|
+
user: AuthUser | null;
|
|
6
|
+
setToken: (token: string | null) => void;
|
|
7
|
+
setUser: (user: AuthUser | null) => void;
|
|
8
|
+
isSupervisor: boolean;
|
|
9
|
+
isAdmin: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const useAuthStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AuthState>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum TransactionStatus {
|
|
2
|
+
CREATED = "created",
|
|
3
|
+
SENT_TO_BANK = "sent_to_bank",
|
|
4
|
+
SENT_CONFIRMATION = "sent_confirmation_to_customer",
|
|
5
|
+
CONFIRMED = "confirmed",// customer confirmed transaction request via zns
|
|
6
|
+
CANCELED = "canceled",
|
|
7
|
+
SUCCESS = "success",
|
|
8
|
+
FAILED = "failed"
|
|
9
|
+
}
|
|
10
|
+
export declare enum BankStatus {
|
|
11
|
+
ACTIVE = "active",
|
|
12
|
+
INACTIVE = "inactive",
|
|
13
|
+
PENDING_ACTIVATION = "pending_activation",
|
|
14
|
+
SUSPENDED = "suspended",
|
|
15
|
+
MAINTENANCE = "maintenance",
|
|
16
|
+
RESTRICTED = "restricted"
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type TravellerTransactionInfo = {
|
|
2
|
+
reservationNumber: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
exchangeCode: string;
|
|
5
|
+
amount?: number;
|
|
6
|
+
};
|
|
7
|
+
export type AddTransactionReqDto = {
|
|
8
|
+
transactions: TravellerTransactionInfo[];
|
|
9
|
+
};
|
|
10
|
+
export type GetTransactionListReqDto = {
|
|
11
|
+
page?: number;
|
|
12
|
+
limit?: number;
|
|
13
|
+
status?: string;
|
|
14
|
+
bankCode?: string;
|
|
15
|
+
exchangeCurrencyCode?: string;
|
|
16
|
+
currencyCode?: string;
|
|
17
|
+
};
|