gotrip-fx-transaction-form 1.0.57 → 1.0.58
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 +39933 -27564
- package/package.json +1 -1
- package/types/components/AddDepartment/AddDepartmentForm.d.ts +2 -1
- package/types/components/AddTransaction/BankList.d.ts +15 -10
- package/types/components/AddTransaction/UploadingStatus.d.ts +6 -0
- package/types/components/AddTransaction/UseCaseSelection.d.ts +1 -15
- package/types/components/AddUser/AddMemberForm.d.ts +2 -1
- package/types/components/CountrySelector/CountrySelector.d.ts +5 -0
- package/types/components/Department/DepartmentCard.d.ts +4 -1
- package/types/components/DocumentUpload/DocumentUpload.d.ts +12 -0
- package/types/components/ESIM/ProductCard.d.ts +9 -0
- package/types/components/Menu/MenuItem.d.ts +7 -1
- package/types/components/Menu/ProfileInfo.d.ts +11 -0
- package/types/components/Modal/AddDepartmentMemberModal.d.ts +17 -0
- package/types/components/Modal/AddDepartmentModal.d.ts +16 -0
- package/types/components/Modal/AddMemberModal.d.ts +16 -0
- package/types/components/Modal/MemberDetailModel.d.ts +12 -0
- package/types/components/Modal/RejectTransactionModal.d.ts +9 -0
- package/types/components/Modal/UpdateCommissionPolicyModal.d.ts +9 -0
- package/types/components/OrganizationFlow/DepartmentNode.d.ts +21 -0
- package/types/components/OrganizationFlow/LayoutFlow.d.ts +44 -0
- package/types/components/OrganizationFlow/OrganizationLayoutFlow.d.ts +10 -0
- package/types/components/SortSelector/SortSelector.d.ts +14 -0
- package/types/components/TransactionDetail/BankBiddingList.d.ts +21 -0
- package/types/components/TransactionStatusBadge/TransactionStatusBadge.d.ts +1 -1
- package/types/constants/api-urls.d.ts +18 -1
- package/types/constants/business-codes.d.ts +2 -1
- package/types/constants/env.d.ts +13 -0
- package/types/hooks/transactions/useEducation.hook.d.ts +172 -123
- package/types/hooks/transactions/useGroupTransactions.d.ts +153 -0
- package/types/hooks/transactions/useGuestTransaction.d.ts +66 -0
- package/types/hooks/transactions/useImmigration.hook.d.ts +116 -75
- package/types/hooks/transactions/useTransferMoneyAbroadTransaction.d.ts +58 -0
- package/types/hooks/useBankList.d.ts +6 -0
- package/types/hooks/useComissionPolicies.d.ts +6 -0
- package/types/hooks/useCommissionCalculation.d.ts +13 -0
- package/types/hooks/useDepartmentList.d.ts +1 -0
- package/types/hooks/useESimList.d.ts +22 -0
- package/types/hooks/useGroupCustomers.d.ts +3 -3
- package/types/hooks/useHeaderMenu.d.ts +13 -0
- package/types/hooks/useOrganizationStructure.d.ts +9 -0
- package/types/hooks/useRequestCustomers.d.ts +1 -126
- package/types/hooks/useTransactionList.d.ts +0 -1
- package/types/hooks/useUseCases.d.ts +16 -0
- package/types/pages/admin/tenant-organization-flow/OrganizationFlow.d.ts +1 -0
- package/types/pages/agency/department-detail/AddDepartmentMember.d.ts +8 -0
- package/types/pages/agency/department-detail/DepartmentDetail.d.ts +1 -0
- package/types/pages/agency/department-list/AddDepartment.d.ts +5 -0
- package/types/pages/agency/department-list/DepartmentList.d.ts +2 -0
- package/types/pages/agency/esim-listing/ESIMListing.d.ts +6 -0
- package/types/pages/agency/organization-flow/OrganizationFlow.d.ts +1 -0
- package/types/pages/agency/transaction-detail/GroupTransactionDetail.d.ts +8 -0
- package/types/pages/agency/transaction-detail/TransactionDetail.d.ts +3 -0
- package/types/pages/agency/transaction-detail/TransferMoneyAbroadTransactionDetail.d.ts +6 -0
- package/types/pages/partner/add-member/AddMember.d.ts +1 -1
- package/types/pages/partner/department-detail/EditDepartmentModal.d.ts +33 -0
- package/types/pages/partner/organization-flow/OrganizationFlow.d.ts +1 -0
- package/types/pages/partner/transaction-detail/GroupTransactionDetail.d.ts +7 -0
- package/types/pages/partner/transaction-detail/SingularTransactionDetail.d.ts +6 -0
- package/types/pages/partner/transaction-detail/TransferMoneyAbroadTransactionDetail.d.ts +6 -0
- package/types/pages/partner/transaction-list/GroupTransactionList.d.ts +1 -2
- package/types/types/enum.d.ts +18 -1
- package/types/types/request.dto.d.ts +6 -0
- package/types/types/response.dto.d.ts +64 -1
- package/types/types/role.d.ts +5 -0
- package/types/types/user.d.ts +2 -1
- package/types/util/signed-url.util.d.ts +3 -0
- package/types/util/transaction.util.d.ts +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITransaction } from '../../../types/response.dto';
|
|
2
|
+
type TransferMoneyAbroadTransactionDetailProps = {
|
|
3
|
+
transaction: ITransaction;
|
|
4
|
+
};
|
|
5
|
+
export declare const TransferMoneyAbroadTransactionDetail: ({ transaction, }: TransferMoneyAbroadTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type AddMemberProps = {
|
|
2
2
|
onSubmitSuccess: () => void;
|
|
3
3
|
};
|
|
4
|
-
export declare const AddMember: (
|
|
4
|
+
export declare const AddMember: ({ onSubmitSuccess }: AddMemberProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const editDepartmentSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
address: z.ZodOptional<z.ZodString>;
|
|
5
|
+
transferName: z.ZodOptional<z.ZodString>;
|
|
6
|
+
transferNumber: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
name: string;
|
|
9
|
+
address?: string | undefined;
|
|
10
|
+
transferName?: string | undefined;
|
|
11
|
+
transferNumber?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
name: string;
|
|
14
|
+
address?: string | undefined;
|
|
15
|
+
transferName?: string | undefined;
|
|
16
|
+
transferNumber?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
type EditDepartmentFormData = z.infer<typeof editDepartmentSchema>;
|
|
19
|
+
interface EditDepartmentModalProps {
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
onSubmit: (data: EditDepartmentFormData) => Promise<void>;
|
|
23
|
+
initialData?: {
|
|
24
|
+
name: string;
|
|
25
|
+
address: string;
|
|
26
|
+
transferName?: string;
|
|
27
|
+
transferNumber?: string;
|
|
28
|
+
};
|
|
29
|
+
isBankTenant: boolean;
|
|
30
|
+
departmentDisplay: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const EditDepartmentModal: ({ isOpen, onClose, onSubmit, initialData, isBankTenant, departmentDisplay, }: EditDepartmentModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OrganizationFlow: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ITransaction } from '../../../types/response.dto';
|
|
2
|
+
type GroupTransactionDetailProps = {
|
|
3
|
+
transactions: ITransaction[];
|
|
4
|
+
onTransactionsUpdate?: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const GroupTransactionDetail: ({ transactions, onTransactionsUpdate, }: GroupTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITransaction } from '../../../types/response.dto';
|
|
2
|
+
type GuestTransactionDetailProps = {
|
|
3
|
+
transaction: ITransaction;
|
|
4
|
+
};
|
|
5
|
+
export declare const SingularTransactionDetail: ({ transaction }: GuestTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITransaction } from '../../../types/response.dto';
|
|
2
|
+
type TransferMoneyAbroadTransactionDetailProps = {
|
|
3
|
+
transaction: ITransaction;
|
|
4
|
+
};
|
|
5
|
+
export declare const TransferMoneyAbroadTransactionDetail: ({ transaction, }: TransferMoneyAbroadTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
-
showLayout?: boolean;
|
|
3
2
|
hideAddButton?: boolean;
|
|
4
3
|
defaultLimit?: number;
|
|
5
4
|
};
|
|
6
|
-
export declare const GroupTransactionList: ({
|
|
5
|
+
export declare const GroupTransactionList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export {};
|
package/types/types/enum.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare enum TransactionStatus {
|
|
2
2
|
CREATED = "created",
|
|
3
3
|
PENDING_ADMIN_CHECK_INFO = "pending_admin_check_info",
|
|
4
|
-
PENDING_APPROVAL = "pending_approval",
|
|
5
4
|
BANK_APPROVED = "bank_approved",
|
|
6
5
|
BANK_REJECTED = "bank_rejected",
|
|
6
|
+
PENDING_BIDDING = "pending_bidding",
|
|
7
7
|
SENT_TO_BANK = "sent_to_bank",
|
|
8
8
|
SENT_CONFIRMATION = "sent_confirmation_to_customer",
|
|
9
9
|
CONFIRMED = "confirmed",// customer confirmed transaction request via zns
|
|
@@ -22,3 +22,20 @@ export declare enum ETenantType {
|
|
|
22
22
|
TRAVEL_AGENCY = "travel_agency",
|
|
23
23
|
STANDALONE_BOOKER = "standalone_booker"
|
|
24
24
|
}
|
|
25
|
+
export declare enum EUseCaseses {
|
|
26
|
+
TRAVEL = "TRAVEL",// khách lẻ
|
|
27
|
+
TRAVEL_GROUP = "TRAVEL_GROUP",// khách đoàn
|
|
28
|
+
EDUCATION = "EDUCATION",
|
|
29
|
+
MEDICAL = "MEDICAL",
|
|
30
|
+
INHERITANCE = "INHERITANCE",
|
|
31
|
+
SUBSIDY = "SUBSIDY",
|
|
32
|
+
IMMIGRATION = "IMMIGRATION",
|
|
33
|
+
BUSINESS = "BUSINESS"
|
|
34
|
+
}
|
|
35
|
+
export declare enum ECommissionPolicyType {
|
|
36
|
+
FX = "FX"
|
|
37
|
+
}
|
|
38
|
+
export declare enum ECommissionPolicyCalculationType {
|
|
39
|
+
FIXED = "FIXED_AMOUNT",
|
|
40
|
+
PERCENT = "PERCENT"
|
|
41
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ETenantType, TransactionStatus } from './enum';
|
|
1
|
+
import { ECommissionPolicyCalculationType, ECommissionPolicyType, ETenantType, EUseCaseses, TransactionStatus } from './enum';
|
|
2
2
|
import { EPermissionKey, EUserRole, EUserStatus } from './user';
|
|
3
3
|
export type LoginRespDto = {
|
|
4
4
|
accessToken: string;
|
|
5
5
|
user: {
|
|
6
|
+
id: number;
|
|
6
7
|
email: string;
|
|
7
8
|
firstName?: string;
|
|
8
9
|
lastName?: string;
|
|
@@ -38,14 +39,18 @@ export declare enum ETransactionType {
|
|
|
38
39
|
TRAVEL = "TRAVEL",
|
|
39
40
|
TRAVEL_GROUP = "TRAVEL_GROUP",
|
|
40
41
|
STUDY = "STUDY",
|
|
42
|
+
EDUCATION = "EDUCATION",
|
|
41
43
|
BUSINESS = "BUSINESS",
|
|
42
44
|
IMMIGRATION = "IMMIGRATION"
|
|
43
45
|
}
|
|
44
46
|
export type ITransaction = {
|
|
45
47
|
id: number;
|
|
48
|
+
fxTransactionId?: number;
|
|
46
49
|
publicId: string;
|
|
47
50
|
amount: number;
|
|
48
51
|
comission: number;
|
|
52
|
+
exchangeRate: number;
|
|
53
|
+
receiptCreatedAt?: Date;
|
|
49
54
|
status: TransactionStatus;
|
|
50
55
|
exchangeCurrencyCode: string;
|
|
51
56
|
bankCode: string;
|
|
@@ -66,17 +71,46 @@ export type ITransaction = {
|
|
|
66
71
|
user?: IUser;
|
|
67
72
|
agent?: IUser;
|
|
68
73
|
totalSubTransaction?: number;
|
|
74
|
+
totalApprovedTransaction?: number;
|
|
75
|
+
totalRejectedTransaction?: number;
|
|
69
76
|
groupPublicId?: string;
|
|
70
77
|
documents: any[];
|
|
71
78
|
bankDepartment?: IDepartment;
|
|
72
79
|
cancelReason?: string;
|
|
73
80
|
bankResponseLog?: Record<string, any>;
|
|
81
|
+
bids?: IBid[];
|
|
74
82
|
};
|
|
83
|
+
export interface IBankWorkingHours {
|
|
84
|
+
workdays: {
|
|
85
|
+
from: string;
|
|
86
|
+
to: string;
|
|
87
|
+
};
|
|
88
|
+
saturday: {
|
|
89
|
+
from: string;
|
|
90
|
+
to: string;
|
|
91
|
+
};
|
|
92
|
+
sunday: {
|
|
93
|
+
from: string;
|
|
94
|
+
to: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface ITravelAgencyTenantSettings {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}
|
|
100
|
+
export interface IBankTenantSettings {
|
|
101
|
+
availableCurrencies: string[];
|
|
102
|
+
useCases: EUseCaseses[];
|
|
103
|
+
availableAPI: {
|
|
104
|
+
[key in EUseCaseses]: boolean;
|
|
105
|
+
};
|
|
106
|
+
workingTime: IBankWorkingHours;
|
|
107
|
+
}
|
|
75
108
|
export type ITenant = {
|
|
76
109
|
id: number;
|
|
77
110
|
shortName: string;
|
|
78
111
|
name: string;
|
|
79
112
|
type: ETenantType;
|
|
113
|
+
settings: IBankTenantSettings | ITravelAgencyTenantSettings;
|
|
80
114
|
};
|
|
81
115
|
export type GetTransactionListRespDto = {
|
|
82
116
|
transactions: ITransaction[];
|
|
@@ -135,6 +169,7 @@ export type IDepartment = {
|
|
|
135
169
|
name: string;
|
|
136
170
|
parentId?: number;
|
|
137
171
|
address: string;
|
|
172
|
+
users?: IUser[];
|
|
138
173
|
};
|
|
139
174
|
export type IRole = {
|
|
140
175
|
id: number;
|
|
@@ -164,6 +199,7 @@ export type IUser = {
|
|
|
164
199
|
};
|
|
165
200
|
export type IBid = {
|
|
166
201
|
id: number;
|
|
202
|
+
bankShortName: string;
|
|
167
203
|
status: EBidStatus;
|
|
168
204
|
price: number;
|
|
169
205
|
total: number;
|
|
@@ -203,4 +239,31 @@ export type IPermission = {
|
|
|
203
239
|
description: string;
|
|
204
240
|
globalPermission: IGlobalPermission;
|
|
205
241
|
};
|
|
242
|
+
export interface ICommissionPolicy {
|
|
243
|
+
currencyCode?: string;
|
|
244
|
+
userId?: number;
|
|
245
|
+
tenantId?: number;
|
|
246
|
+
bankId?: number;
|
|
247
|
+
departmentId?: number;
|
|
248
|
+
type: ECommissionPolicyType;
|
|
249
|
+
directType: ECommissionPolicyCalculationType;
|
|
250
|
+
viaRefType: ECommissionPolicyCalculationType;
|
|
251
|
+
indirectType: ECommissionPolicyCalculationType;
|
|
252
|
+
byFixedAmountDirect?: number;
|
|
253
|
+
byPercentDirect?: number;
|
|
254
|
+
byFixedAmountViaRef?: number;
|
|
255
|
+
byPercentViaRef?: number;
|
|
256
|
+
byFixedAmountIndirect?: number;
|
|
257
|
+
byPercentIndirect?: number;
|
|
258
|
+
createdBy?: string;
|
|
259
|
+
updatedBy?: string;
|
|
260
|
+
}
|
|
261
|
+
export type ESimPackage = {
|
|
262
|
+
planId: number;
|
|
263
|
+
name: string;
|
|
264
|
+
data: string;
|
|
265
|
+
validity: string;
|
|
266
|
+
countries: string[];
|
|
267
|
+
price: number;
|
|
268
|
+
};
|
|
206
269
|
export {};
|
package/types/types/user.d.ts
CHANGED
|
@@ -43,5 +43,6 @@ export declare enum EPermissionKey {
|
|
|
43
43
|
TRANSACTION_BID = "TRANSACTION_BID",
|
|
44
44
|
VIEW_REPORT = "VIEW_REPORT",
|
|
45
45
|
ADMIN = "ADMIN",
|
|
46
|
-
PARTNER_ADMIN = "PARTNER_ADMIN"
|
|
46
|
+
PARTNER_ADMIN = "PARTNER_ADMIN",
|
|
47
|
+
VIEW_ORGANIZATION_STRUCTURE = "VIEW_ORGANIZATION_STRUCTURE"
|
|
47
48
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ETransactionType } from '../types/response.dto';
|
|
2
|
-
export declare const getTransactionType: (type: ETransactionType) => "Du học" | "Du lịch" | "Du lịch (Nhóm)" | "Kinh doanh" | "Di trú";
|
|
2
|
+
export declare const getTransactionType: (type: ETransactionType) => "Du học" | ETransactionType.STUDY | "Du lịch" | "Du lịch (Nhóm)" | "Kinh doanh" | "Di trú";
|