gotrip-fx-transaction-form 1.0.78 → 1.0.79
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 +56 -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;
|
|
@@ -88,6 +88,55 @@ export type ITransaction = {
|
|
|
88
88
|
bankResponseLog?: Record<string, any>;
|
|
89
89
|
bids?: IBid[];
|
|
90
90
|
};
|
|
91
|
+
export type IESimTransaction = {
|
|
92
|
+
id: number;
|
|
93
|
+
esimTransactionId: number;
|
|
94
|
+
vndAmount?: number;
|
|
95
|
+
originalVndAmount?: number;
|
|
96
|
+
amount?: number;
|
|
97
|
+
packageId?: number;
|
|
98
|
+
gggPlanId?: string;
|
|
99
|
+
planName?: string;
|
|
100
|
+
agencyOrderId?: number;
|
|
101
|
+
orderCode?: string;
|
|
102
|
+
status: EsimTransactionStatus;
|
|
103
|
+
lastSyncedAt?: Date;
|
|
104
|
+
publicId: string;
|
|
105
|
+
createdResponseLog?: Record<string, any>;
|
|
106
|
+
webhookResponseLog?: Record<string, any>;
|
|
107
|
+
createdBy?: string;
|
|
108
|
+
updatedBy?: string;
|
|
109
|
+
deletedAt?: Date;
|
|
110
|
+
createdAt: string;
|
|
111
|
+
updatedAt: string;
|
|
112
|
+
transaction?: ITransaction;
|
|
113
|
+
lineItems?: Array<{
|
|
114
|
+
id: number;
|
|
115
|
+
esimTransactionId: number;
|
|
116
|
+
gggPlanId: string;
|
|
117
|
+
planName: string;
|
|
118
|
+
data: string;
|
|
119
|
+
validity: string;
|
|
120
|
+
customerEmail: string;
|
|
121
|
+
customerPhone: string;
|
|
122
|
+
price: number;
|
|
123
|
+
}>;
|
|
124
|
+
package?: {
|
|
125
|
+
id: number;
|
|
126
|
+
name: string;
|
|
127
|
+
description: string;
|
|
128
|
+
apn: string;
|
|
129
|
+
isActive: boolean;
|
|
130
|
+
dataLimit: number;
|
|
131
|
+
dataLimitUnit: ESimPackageDataLimitUnit;
|
|
132
|
+
dataLimitTimeframe: ESimPackageDataLimitTimeframe;
|
|
133
|
+
validityType: ESimPackageValidityType;
|
|
134
|
+
validityPeriod: number;
|
|
135
|
+
countries: string[];
|
|
136
|
+
price: number;
|
|
137
|
+
};
|
|
138
|
+
user?: IUser;
|
|
139
|
+
};
|
|
91
140
|
export interface IBankWorkingHours {
|
|
92
141
|
workdays: {
|
|
93
142
|
from: string;
|
|
@@ -125,6 +174,12 @@ export type GetTransactionListRespDto = {
|
|
|
125
174
|
transactions: ITransaction[];
|
|
126
175
|
total: number;
|
|
127
176
|
};
|
|
177
|
+
export type GetESimTransactionListRespDto = {
|
|
178
|
+
transactions: IESimTransaction[];
|
|
179
|
+
total: number;
|
|
180
|
+
page: number;
|
|
181
|
+
limit: number;
|
|
182
|
+
};
|
|
128
183
|
export type GetUserListRespDto = {
|
|
129
184
|
users: IUser[];
|
|
130
185
|
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;
|