gotrip-fx-transaction-form 1.0.78 → 1.0.80
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 +3570 -3561
- package/package.json +1 -1
- package/types/components/ESimTransactionList/ESimTransactionActionMenu.d.ts +8 -0
- package/types/components/ImageReader/ButtonActions.d.ts +9 -0
- package/types/components/ImageReader/InputFileZone.d.ts +8 -0
- package/types/components/ImageReader/ViewImagesModal.d.ts +15 -0
- package/types/components/Modal/ESimPurchaseModal.d.ts +1 -0
- package/types/components/TransactionStatusBadge/EsimTransactionStatusBadge.d.ts +8 -0
- package/types/constants/api-urls.d.ts +4 -0
- package/types/hooks/useESimList.d.ts +2 -0
- package/types/hooks/useESimTransactionList.d.ts +19 -0
- package/types/pages/admin/esim-transaction-list/ESimTransactionList.d.ts +7 -0
- package/types/types/enum.d.ts +8 -0
- package/types/types/response.dto.d.ts +65 -1
- package/types/util/time.d.ts +4 -0
- package/types/util/transaction.util.d.ts +3 -1
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IESimTransaction } from '../../types/response.dto';
|
|
2
|
+
type Props = {
|
|
3
|
+
transaction: IESimTransaction;
|
|
4
|
+
setLoading?: (loading: boolean) => void;
|
|
5
|
+
refetchData?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const ESimTransactionActionMenu: ({ transaction, setLoading, refetchData }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
onSubmit: () => void;
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
exportToExcel: () => void;
|
|
5
|
+
deleteSelectedImages: () => void;
|
|
6
|
+
onDeleteAll: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ButtonActions: ({ onSubmit, isLoading, exportToExcel, deleteSelectedImages, onDeleteAll, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
onFileAccept: (newFiles: File[]) => void;
|
|
4
|
+
selectedFiles: File[];
|
|
5
|
+
onViewImages: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const InputFileZone: ({ label, onFileAccept, selectedFiles, onViewImages }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ImageType = 'id' | 'passport' | 'visa';
|
|
2
|
+
export declare const ImageTypePrice: {
|
|
3
|
+
id: number;
|
|
4
|
+
passport: number;
|
|
5
|
+
visa: number;
|
|
6
|
+
};
|
|
7
|
+
type Props = {
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
images: Record<ImageType, File[]>;
|
|
11
|
+
onDeleteImage: (type: ImageType, file: File) => void;
|
|
12
|
+
onConfirm: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const ViewImagesModal: ({ isOpen, onClose, images, onDeleteImage, onConfirm }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EsimTransactionStatus, ETenantType } from '../../types/enum';
|
|
2
|
+
type Props = {
|
|
3
|
+
status: EsimTransactionStatus;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
type?: ETenantType;
|
|
6
|
+
};
|
|
7
|
+
export declare const ESimTransactionStatusBadge: ({ status, onClick, type }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -9,6 +9,7 @@ export declare const ApiUrls: {
|
|
|
9
9
|
};
|
|
10
10
|
transactionHandlers: {
|
|
11
11
|
list: string;
|
|
12
|
+
esimTransactionList: string;
|
|
12
13
|
create: string;
|
|
13
14
|
createMany: string;
|
|
14
15
|
confirm: string;
|
|
@@ -25,6 +26,7 @@ export declare const ApiUrls: {
|
|
|
25
26
|
updateTransactionBidding: string;
|
|
26
27
|
updateTransaction: string;
|
|
27
28
|
createEsimTransaction: string;
|
|
29
|
+
sendESimEmail: string;
|
|
28
30
|
};
|
|
29
31
|
role: {
|
|
30
32
|
list: string;
|
|
@@ -67,6 +69,8 @@ export declare const ApiUrls: {
|
|
|
67
69
|
getBalanceByUserId: (userId: number) => string;
|
|
68
70
|
updateBalance: (userId: number) => string;
|
|
69
71
|
generateTopUpQRCode: string;
|
|
72
|
+
getGigagoBalance: string;
|
|
73
|
+
charge: string;
|
|
70
74
|
};
|
|
71
75
|
userHandlers: {
|
|
72
76
|
userProfile: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IESimTransaction } from '../types/response.dto';
|
|
2
|
+
import { GetTransactionListReqDto } from '../types/request.dto';
|
|
3
|
+
type Props = {
|
|
4
|
+
defaultLimit?: number;
|
|
5
|
+
defaultFilter?: GetTransactionListReqDto | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const useESimTransactionList: ({ defaultLimit, defaultFilter }: Props) => {
|
|
8
|
+
transactions: IESimTransaction[];
|
|
9
|
+
total: number;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
page: number;
|
|
12
|
+
limit: number;
|
|
13
|
+
refetchData: () => void;
|
|
14
|
+
setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
15
|
+
setLimit: (limit: number) => void;
|
|
16
|
+
setFilter: import('react').Dispatch<import('react').SetStateAction<GetTransactionListReqDto>>;
|
|
17
|
+
setLoading: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
package/types/types/enum.d.ts
CHANGED
|
@@ -11,6 +11,14 @@ export declare enum TransactionStatus {
|
|
|
11
11
|
SUCCESS = "success",
|
|
12
12
|
FAILED = "failed"
|
|
13
13
|
}
|
|
14
|
+
export declare enum EsimTransactionStatus {
|
|
15
|
+
CREATED = "created",
|
|
16
|
+
WAITING_FOR_RETURN = "waiting_for_return",
|
|
17
|
+
RETURNED = "returned",
|
|
18
|
+
OUT_OF_STOCK = "out_of_stock",
|
|
19
|
+
INSUFFICIENT_BALANCE = "insufficient_balance",
|
|
20
|
+
INVALID_CODE = "invalid_code"
|
|
21
|
+
}
|
|
14
22
|
export declare enum BankStatus {
|
|
15
23
|
ACTIVE = "active",
|
|
16
24
|
INACTIVE = "inactive",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ECommissionPolicyCalculationType, ECommissionPolicyType, ETenantType, EUseCaseses, TransactionStatus } from './enum';
|
|
1
|
+
import { ECommissionPolicyCalculationType, ECommissionPolicyType, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
|
|
2
2
|
import { EPermissionKey, EUserRole, EUserStatus } from './user';
|
|
3
3
|
export type LoginRespDto = {
|
|
4
4
|
accessToken: string;
|
|
@@ -51,6 +51,14 @@ export type IAgent = {
|
|
|
51
51
|
phone: string;
|
|
52
52
|
identityNumber: string;
|
|
53
53
|
};
|
|
54
|
+
export type IZNSInfo = {
|
|
55
|
+
msgId: string;
|
|
56
|
+
status?: string;
|
|
57
|
+
code?: string;
|
|
58
|
+
listParams?: Record<string, string>;
|
|
59
|
+
template?: string;
|
|
60
|
+
statusDetailResponse?: Record<string, any>;
|
|
61
|
+
};
|
|
54
62
|
export type ITransaction = {
|
|
55
63
|
id: number;
|
|
56
64
|
fxTransactionId?: number;
|
|
@@ -87,6 +95,56 @@ export type ITransaction = {
|
|
|
87
95
|
cancelReason?: string;
|
|
88
96
|
bankResponseLog?: Record<string, any>;
|
|
89
97
|
bids?: IBid[];
|
|
98
|
+
znsInfo?: IZNSInfo;
|
|
99
|
+
};
|
|
100
|
+
export type IESimTransaction = {
|
|
101
|
+
id: number;
|
|
102
|
+
esimTransactionId: number;
|
|
103
|
+
vndAmount?: number;
|
|
104
|
+
originalVndAmount?: number;
|
|
105
|
+
amount?: number;
|
|
106
|
+
packageId?: number;
|
|
107
|
+
gggPlanId?: string;
|
|
108
|
+
planName?: string;
|
|
109
|
+
agencyOrderId?: number;
|
|
110
|
+
orderCode?: string;
|
|
111
|
+
status: EsimTransactionStatus;
|
|
112
|
+
lastSyncedAt?: Date;
|
|
113
|
+
publicId: string;
|
|
114
|
+
createdResponseLog?: Record<string, any>;
|
|
115
|
+
webhookResponseLog?: Record<string, any>;
|
|
116
|
+
createdBy?: string;
|
|
117
|
+
updatedBy?: string;
|
|
118
|
+
deletedAt?: Date;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
updatedAt: string;
|
|
121
|
+
transaction?: ITransaction;
|
|
122
|
+
lineItems?: Array<{
|
|
123
|
+
id: number;
|
|
124
|
+
esimTransactionId: number;
|
|
125
|
+
gggPlanId: string;
|
|
126
|
+
planName: string;
|
|
127
|
+
data: string;
|
|
128
|
+
validity: string;
|
|
129
|
+
customerEmail: string;
|
|
130
|
+
customerPhone: string;
|
|
131
|
+
price: number;
|
|
132
|
+
}>;
|
|
133
|
+
package?: {
|
|
134
|
+
id: number;
|
|
135
|
+
name: string;
|
|
136
|
+
description: string;
|
|
137
|
+
apn: string;
|
|
138
|
+
isActive: boolean;
|
|
139
|
+
dataLimit: number;
|
|
140
|
+
dataLimitUnit: ESimPackageDataLimitUnit;
|
|
141
|
+
dataLimitTimeframe: ESimPackageDataLimitTimeframe;
|
|
142
|
+
validityType: ESimPackageValidityType;
|
|
143
|
+
validityPeriod: number;
|
|
144
|
+
countries: string[];
|
|
145
|
+
price: number;
|
|
146
|
+
};
|
|
147
|
+
user?: IUser;
|
|
90
148
|
};
|
|
91
149
|
export interface IBankWorkingHours {
|
|
92
150
|
workdays: {
|
|
@@ -125,6 +183,12 @@ export type GetTransactionListRespDto = {
|
|
|
125
183
|
transactions: ITransaction[];
|
|
126
184
|
total: number;
|
|
127
185
|
};
|
|
186
|
+
export type GetESimTransactionListRespDto = {
|
|
187
|
+
transactions: IESimTransaction[];
|
|
188
|
+
total: number;
|
|
189
|
+
page: number;
|
|
190
|
+
limit: number;
|
|
191
|
+
};
|
|
128
192
|
export type GetUserListRespDto = {
|
|
129
193
|
users: IUser[];
|
|
130
194
|
total: number;
|
package/types/util/time.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { ETransactionType } from '../types/response.dto';
|
|
1
|
+
import { ESimPackageDataLimitTimeframe, ESimPackageDataLimitUnit, ESimPackageValidityType, ETransactionType } from '../types/response.dto';
|
|
2
2
|
export declare const getTransactionType: (type: ETransactionType) => "Du học" | ETransactionType.STUDY | "Du lịch" | "Du lịch (Nhóm)" | "Kinh doanh" | "Di trú";
|
|
3
|
+
export declare const formatDataLimit: (dataLimit: number, dataLimitUnit: ESimPackageDataLimitUnit, dataLimitTimeframe: ESimPackageDataLimitTimeframe) => string;
|
|
4
|
+
export declare const formatValidity: (validityPeriod: number, validityType: ESimPackageValidityType) => string;
|