gotrip-fx-transaction-form 1.0.8 → 1.0.11
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 +7532 -7442
- package/package.json +1 -1
- package/types/components/AddTransaction/Immigration.d.ts +7 -0
- package/types/components/AddTransaction/UseCaseSelection.d.ts +2 -1
- package/types/components/Apps/GuestApp.d.ts +1 -0
- package/types/components/Modal/FilePreviewModal.d.ts +8 -0
- package/types/components/TransactionList/PublicIdTextInput.d.ts +9 -0
- package/types/components/TransactionList/UserSelectionInput.d.ts +7 -0
- package/types/components/ui/loading.d.ts +6 -0
- package/types/constants/api-urls.d.ts +1 -0
- package/types/constants/business-codes.d.ts +14 -0
- package/types/hooks/transanactions/{useBusiness.hook.d.ts → useImmigration.hook.d.ts} +1 -1
- package/types/hooks/useGroupCustomers.d.ts +3 -0
- package/types/hooks/useRequestCustomers.d.ts +115 -0
- package/types/hooks/useTransactionList.d.ts +4 -1
- package/types/pages/admin/transaction-list/TransactionList.d.ts +7 -0
- package/types/pages/agency/referral-links/ReferralLinks.d.ts +1 -0
- package/types/pages/partner/commission-policy-list/CommissionPolicyList.d.ts +1 -0
- package/types/pages/partner/login/LoginPage.d.ts +1 -0
- package/types/pages/partner/transaction-detail/TransactionDetail.d.ts +1 -0
- package/types/pages/partner/transaction-list/GroupTransactionList.d.ts +7 -0
- package/types/pages/partner/user-profile/user-profile.d.ts +1 -0
- package/types/types/enum.d.ts +4 -4
- package/types/types/request.dto.d.ts +1 -0
- package/types/types/response.dto.d.ts +10 -1
- package/types/util/axios.d.ts +1 -0
- package/types/util/extract-api-error-codes.d.ts +1 -0
- package/types/util/toast.d.ts +4 -1
- package/types/util/transaction.util.d.ts +1 -1
- package/types/components/AddTransaction/Business.d.ts +0 -7
- package/types/components/Apps/IndividualApp.d.ts +0 -1
- package/types/pages/partner/EducationFXList.d.ts +0 -1
- /package/types/pages/partner/{MemberList.d.ts → member-list/MemberList.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -15,7 +15,8 @@ type Props = {
|
|
|
15
15
|
export declare const UseCaseSelection: ({ useCase, setUseCase }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
type Props2 = {
|
|
17
17
|
selected: EUseCaseses;
|
|
18
|
+
primaryColor?: string;
|
|
18
19
|
setSelected: (selected: EUseCaseses) => void;
|
|
19
20
|
};
|
|
20
|
-
export declare const UseCaseSelectionForGuest: ({ selected, setSelected }: Props2) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const UseCaseSelectionForGuest: ({ selected, setSelected, primaryColor, }: Props2) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GuestApp: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type FilePreviewModalProps = {
|
|
2
|
+
fileUrl: string;
|
|
3
|
+
fileType: string;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const FilePreviewModal: ({ fileUrl, fileType, isOpen, onClose }: FilePreviewModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface PublicIdTextInputProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (newValue: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
debounceTime?: number;
|
|
7
|
+
}
|
|
8
|
+
declare const PublicIdTextInput: React.FC<PublicIdTextInputProps>;
|
|
9
|
+
export default PublicIdTextInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum BusinessCodes {
|
|
2
|
+
OK = "B_000",
|
|
3
|
+
FAIL = "B_001",
|
|
4
|
+
CONFIRM_ON_SAT_OR_SUN = "B_002",
|
|
5
|
+
TRANSACTION_NOT_FOUND = "B_003",
|
|
6
|
+
TRANSACTION_SENT_TO_BANK = "B_004",
|
|
7
|
+
TICKET_CANCELLED = "B_005",
|
|
8
|
+
USER_NOT_FOUND = "B_006",
|
|
9
|
+
USER_ALREADY_EXISTS = "B_007",
|
|
10
|
+
EMAIL_ALREADY_EXISTS = "B_008",
|
|
11
|
+
PHONE_ALREADY_EXISTS = "B_009",
|
|
12
|
+
INVALID_PASSWORD = "B_010",
|
|
13
|
+
USER_NOT_ACTIVE = "B_011"
|
|
14
|
+
}
|
|
@@ -35,7 +35,7 @@ declare const businessSchema: yup.ObjectSchema<{
|
|
|
35
35
|
type Props = {
|
|
36
36
|
onFinish?: () => void;
|
|
37
37
|
};
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const useImmigration: ({ onFinish }: Props) => {
|
|
39
39
|
selectedBanks: Bank[];
|
|
40
40
|
setSelectedBanks: import('react').Dispatch<import('react').SetStateAction<Bank[]>>;
|
|
41
41
|
register: import('react-hook-form').UseFormRegister<{
|
|
@@ -227,5 +227,8 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
|
|
|
227
227
|
addCustomer: () => void;
|
|
228
228
|
isGettingFlightInfo: boolean;
|
|
229
229
|
disabled: Record<"airlineCode" | "airlineName" | "departureDate" | "countryCodeDes" | "countryNameDes" | ("customers" | "lastName"), boolean>;
|
|
230
|
+
authorizationLetterFiles: File[];
|
|
231
|
+
setAuthorizationLetterFiles: import('react').Dispatch<import('react').SetStateAction<File[]>>;
|
|
232
|
+
isLoading: boolean;
|
|
230
233
|
};
|
|
231
234
|
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { SignedUrl } from '../types/response.dto';
|
|
2
|
+
export declare const useRequestCustomers: () => {
|
|
3
|
+
getValues: import('react-hook-form').UseFormGetValues<{
|
|
4
|
+
customers?: {
|
|
5
|
+
name: string;
|
|
6
|
+
passportNo: string;
|
|
7
|
+
idNo: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
currencyCode: string;
|
|
10
|
+
transactionId: number;
|
|
11
|
+
}[] | undefined;
|
|
12
|
+
totalAmount: number;
|
|
13
|
+
}>;
|
|
14
|
+
setValue: import('react-hook-form').UseFormSetValue<{
|
|
15
|
+
customers?: {
|
|
16
|
+
name: string;
|
|
17
|
+
passportNo: string;
|
|
18
|
+
idNo: string;
|
|
19
|
+
amount: number;
|
|
20
|
+
currencyCode: string;
|
|
21
|
+
transactionId: number;
|
|
22
|
+
}[] | undefined;
|
|
23
|
+
totalAmount: number;
|
|
24
|
+
}>;
|
|
25
|
+
watch: import('react-hook-form').UseFormWatch<{
|
|
26
|
+
customers?: {
|
|
27
|
+
name: string;
|
|
28
|
+
passportNo: string;
|
|
29
|
+
idNo: string;
|
|
30
|
+
amount: number;
|
|
31
|
+
currencyCode: string;
|
|
32
|
+
transactionId: number;
|
|
33
|
+
}[] | undefined;
|
|
34
|
+
totalAmount: number;
|
|
35
|
+
}>;
|
|
36
|
+
trigger: import('react-hook-form').UseFormTrigger<{
|
|
37
|
+
customers?: {
|
|
38
|
+
name: string;
|
|
39
|
+
passportNo: string;
|
|
40
|
+
idNo: string;
|
|
41
|
+
amount: number;
|
|
42
|
+
currencyCode: string;
|
|
43
|
+
transactionId: number;
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
totalAmount: number;
|
|
46
|
+
}>;
|
|
47
|
+
reset: import('react-hook-form').UseFormReset<{
|
|
48
|
+
customers?: {
|
|
49
|
+
name: string;
|
|
50
|
+
passportNo: string;
|
|
51
|
+
idNo: string;
|
|
52
|
+
amount: number;
|
|
53
|
+
currencyCode: string;
|
|
54
|
+
transactionId: number;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
totalAmount: number;
|
|
57
|
+
}>;
|
|
58
|
+
handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
|
|
59
|
+
customers?: {
|
|
60
|
+
name: string;
|
|
61
|
+
passportNo: string;
|
|
62
|
+
idNo: string;
|
|
63
|
+
amount: number;
|
|
64
|
+
currencyCode: string;
|
|
65
|
+
transactionId: number;
|
|
66
|
+
}[] | undefined;
|
|
67
|
+
totalAmount: number;
|
|
68
|
+
}, undefined>;
|
|
69
|
+
errors: import('react-hook-form').FieldErrors<{
|
|
70
|
+
customers?: {
|
|
71
|
+
name: string;
|
|
72
|
+
passportNo: string;
|
|
73
|
+
idNo: string;
|
|
74
|
+
amount: number;
|
|
75
|
+
currencyCode: string;
|
|
76
|
+
transactionId: number;
|
|
77
|
+
}[] | undefined;
|
|
78
|
+
totalAmount: number;
|
|
79
|
+
}>;
|
|
80
|
+
register: import('react-hook-form').UseFormRegister<{
|
|
81
|
+
customers?: {
|
|
82
|
+
name: string;
|
|
83
|
+
passportNo: string;
|
|
84
|
+
idNo: string;
|
|
85
|
+
amount: number;
|
|
86
|
+
currencyCode: string;
|
|
87
|
+
transactionId: number;
|
|
88
|
+
}[] | undefined;
|
|
89
|
+
totalAmount: number;
|
|
90
|
+
}>;
|
|
91
|
+
getSignedUrl: (filePath: string, fileType: string) => Promise<SignedUrl>;
|
|
92
|
+
loading: boolean;
|
|
93
|
+
setError: import('react-hook-form').UseFormSetError<{
|
|
94
|
+
customers?: {
|
|
95
|
+
name: string;
|
|
96
|
+
passportNo: string;
|
|
97
|
+
idNo: string;
|
|
98
|
+
amount: number;
|
|
99
|
+
currencyCode: string;
|
|
100
|
+
transactionId: number;
|
|
101
|
+
}[] | undefined;
|
|
102
|
+
totalAmount: number;
|
|
103
|
+
}>;
|
|
104
|
+
clearErrors: import('react-hook-form').UseFormClearErrors<{
|
|
105
|
+
customers?: {
|
|
106
|
+
name: string;
|
|
107
|
+
passportNo: string;
|
|
108
|
+
idNo: string;
|
|
109
|
+
amount: number;
|
|
110
|
+
currencyCode: string;
|
|
111
|
+
transactionId: number;
|
|
112
|
+
}[] | undefined;
|
|
113
|
+
totalAmount: number;
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Currency, IBank, ITransaction } from '../types/response.dto';
|
|
2
2
|
import { GetTransactionListReqDto } from '../types/request.dto';
|
|
3
|
+
import { TransactionStatus } from '../types/enum';
|
|
3
4
|
type Props = {
|
|
4
5
|
defaultLimit?: number;
|
|
6
|
+
defaultFilter?: GetTransactionListReqDto | null;
|
|
5
7
|
};
|
|
6
|
-
export declare const useTransactionList: ({ defaultLimit }: Props) => {
|
|
8
|
+
export declare const useTransactionList: ({ defaultLimit, defaultFilter }: Props) => {
|
|
7
9
|
transactions: ITransaction[];
|
|
8
10
|
currencies: Currency[];
|
|
9
11
|
banks: IBank[];
|
|
@@ -14,6 +16,7 @@ export declare const useTransactionList: ({ defaultLimit }: Props) => {
|
|
|
14
16
|
refetchData: () => void;
|
|
15
17
|
sendBankTransaction: (transaction: ITransaction) => Promise<void>;
|
|
16
18
|
checkTicketStatus: (transaction: ITransaction) => Promise<void>;
|
|
19
|
+
updateGroupTransactionStatus: (groupPublicId: string, transactions: ITransaction[], status: TransactionStatus) => Promise<boolean>;
|
|
17
20
|
setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
18
21
|
setLimit: (limit: number) => void;
|
|
19
22
|
setFilter: import('react').Dispatch<import('react').SetStateAction<GetTransactionListReqDto>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ReferralLinks: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CommissionPolicyList: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LoginPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TransactionDetail: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UserProfile: () => import("react/jsx-runtime").JSX.Element;
|
package/types/types/enum.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare enum TransactionStatus {
|
|
2
2
|
CREATED = "created",
|
|
3
|
+
PENDING_APPROVAL = "pending_approval",
|
|
4
|
+
BANK_APPROVED = "bank_approved",
|
|
5
|
+
BANK_REJECTED = "bank_rejected",
|
|
3
6
|
SENT_TO_BANK = "sent_to_bank",
|
|
4
7
|
SENT_CONFIRMATION = "sent_confirmation_to_customer",
|
|
5
8
|
CONFIRMED = "confirmed",// customer confirmed transaction request via zns
|
|
@@ -10,8 +13,5 @@ export declare enum TransactionStatus {
|
|
|
10
13
|
export declare enum BankStatus {
|
|
11
14
|
ACTIVE = "active",
|
|
12
15
|
INACTIVE = "inactive",
|
|
13
|
-
|
|
14
|
-
SUSPENDED = "suspended",
|
|
15
|
-
MAINTENANCE = "maintenance",
|
|
16
|
-
RESTRICTED = "restricted"
|
|
16
|
+
COMMING_SOON = "comming_soon"
|
|
17
17
|
}
|
|
@@ -7,6 +7,8 @@ export type LoginRespDto = {
|
|
|
7
7
|
firstName?: string;
|
|
8
8
|
lastName?: string;
|
|
9
9
|
role: EUserRole;
|
|
10
|
+
refCode: string;
|
|
11
|
+
bank?: IBank;
|
|
10
12
|
};
|
|
11
13
|
};
|
|
12
14
|
export type ITicket = {
|
|
@@ -28,7 +30,10 @@ export type ITicket = {
|
|
|
28
30
|
};
|
|
29
31
|
export declare enum ETransactionType {
|
|
30
32
|
TRAVEL = "TRAVEL",
|
|
31
|
-
TRAVEL_GROUP = "TRAVEL_GROUP"
|
|
33
|
+
TRAVEL_GROUP = "TRAVEL_GROUP",
|
|
34
|
+
STUDY = "STUDY",
|
|
35
|
+
BUSINESS = "BUSINESS",
|
|
36
|
+
IMMIGRATION = "IMMIGRATION"
|
|
32
37
|
}
|
|
33
38
|
export type ITransaction = {
|
|
34
39
|
id: number;
|
|
@@ -51,6 +56,10 @@ export type ITransaction = {
|
|
|
51
56
|
type: ETransactionType;
|
|
52
57
|
ticket?: ITicket;
|
|
53
58
|
bank?: IBank;
|
|
59
|
+
user?: IUser;
|
|
60
|
+
totalSubTransaction?: number;
|
|
61
|
+
groupPublicId?: string;
|
|
62
|
+
documents: any[];
|
|
54
63
|
};
|
|
55
64
|
export type IBank = {
|
|
56
65
|
shortName: string;
|
package/types/util/axios.d.ts
CHANGED
package/types/util/toast.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const showToast: (message: string, type: "success" | "error", duration?: number
|
|
1
|
+
export declare const showToast: (message: string, type: "success" | "error", duration?: number, options?: {
|
|
2
|
+
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
3
|
+
title?: string;
|
|
4
|
+
}) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ETransactionType } from '../types/response.dto';
|
|
2
|
-
export declare const getTransactionType: (type: ETransactionType) => "Du lịch" | "Du lịch (Nhóm)";
|
|
2
|
+
export declare const getTransactionType: (type: ETransactionType) => "Du học" | "Du lịch" | "Du lịch (Nhóm)" | "Kinh doanh" | "Di trú";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const IndividualApp: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const EducationFXList: () => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|