gotrip-fx-transaction-form 1.0.268-dev → 1.0.270-dev
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 +19860 -19669
- package/package.json +1 -1
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelector.d.ts +7 -0
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelectorModal.d.ts +10 -0
- package/types/components/BankTransferInfo/BankTransferInfoDisplay.d.ts +7 -0
- package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +5 -1
- package/types/components/Insurance/StepFourPayment.d.ts +5 -1
- package/types/components/Modal/EsimBankTransferModal.d.ts +2 -0
- package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
- package/types/components/Modal/MotorInsurancePaymentModal.d.ts +2 -0
- package/types/constants/api-urls.d.ts +2 -0
- package/types/hooks/useInsuranceTransaction.d.ts +13 -1
- package/types/hooks/useTenantList.d.ts +1 -1
- package/types/hooks/useUserSearch.d.ts +9 -0
- package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
- package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +1 -0
- package/types/types/insurance-transaction.dto.d.ts +8 -1
- package/types/types/insurance.d.ts +5 -0
- package/types/types/response.dto.d.ts +9 -0
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IUser } from '../../../types/response.dto';
|
|
3
|
+
interface AgencyUserSelectorProps {
|
|
4
|
+
onUserSelected?: (user: IUser) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const AgencyUserSelector: React.FC<AgencyUserSelectorProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IUser } from '../../../types/response.dto';
|
|
3
|
+
interface AgencyUserSelectorModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onUserSelected: (user: IUser) => void;
|
|
7
|
+
initialUser?: IUser | null;
|
|
8
|
+
}
|
|
9
|
+
export declare const AgencyUserSelectorModal: React.FC<AgencyUserSelectorModalProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BankTransferInfo } from '../../types/response.dto';
|
|
3
|
+
interface BankTransferInfoDisplayProps {
|
|
4
|
+
bankTransferInfo: BankTransferInfo;
|
|
5
|
+
}
|
|
6
|
+
export declare const BankTransferInfoDisplay: React.FC<BankTransferInfoDisplayProps>;
|
|
7
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ETravelScope } from '../../types/insurance';
|
|
2
|
+
import { IUser } from '../../types/response.dto';
|
|
2
3
|
export interface CreateInsuranceTransactionFormProps {
|
|
3
4
|
storageKey: string;
|
|
4
5
|
title?: string;
|
|
@@ -7,5 +8,8 @@ export interface CreateInsuranceTransactionFormProps {
|
|
|
7
8
|
onSuccess?: (transactionData: any) => void;
|
|
8
9
|
scrollable?: boolean;
|
|
9
10
|
recommendBoxHeight?: string;
|
|
11
|
+
isAdminMode?: boolean;
|
|
12
|
+
selectedUser?: IUser | null;
|
|
13
|
+
onOpenUserSelector?: () => void;
|
|
10
14
|
}
|
|
11
|
-
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, travelScope, onBack, onSuccess, scrollable, recommendBoxHeight, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, travelScope, onBack, onSuccess, scrollable, recommendBoxHeight, isAdminMode, selectedUser, onOpenUserSelector, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,5 +21,9 @@ export interface StepFourPaymentProps {
|
|
|
21
21
|
description?: string | null;
|
|
22
22
|
} | null) => void;
|
|
23
23
|
paymentType?: EOrderPaymentType;
|
|
24
|
+
isAdminMode?: boolean;
|
|
25
|
+
waitForApproval?: boolean;
|
|
26
|
+
onWaitForApprovalChange?: (value: boolean) => void;
|
|
27
|
+
hasSelectedUser?: boolean;
|
|
24
28
|
}
|
|
25
|
-
export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, paymentType: paymentTypeProp, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, paymentType: paymentTypeProp, isAdminMode, waitForApproval, onWaitForApprovalChange, hasSelectedUser, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { BankTransferInfo } from '../../types/response.dto';
|
|
2
3
|
interface EsimBankTransferModalProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onClose: () => void;
|
|
@@ -6,6 +7,7 @@ interface EsimBankTransferModalProps {
|
|
|
6
7
|
transactionPublicId?: string;
|
|
7
8
|
amount: number;
|
|
8
9
|
onSuccess?: () => void;
|
|
10
|
+
bankTransferInfo?: BankTransferInfo;
|
|
9
11
|
}
|
|
10
12
|
declare const EsimBankTransferModal: React.FC<EsimBankTransferModalProps>;
|
|
11
13
|
export default EsimBankTransferModal;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { BankTransferInfo } from '../../types/response.dto';
|
|
2
3
|
interface InsurancePaymentModalProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onClose: () => void;
|
|
@@ -6,6 +7,7 @@ interface InsurancePaymentModalProps {
|
|
|
6
7
|
transactionPublicId?: string;
|
|
7
8
|
amount: number;
|
|
8
9
|
onSuccess?: () => void;
|
|
10
|
+
bankTransferInfo?: BankTransferInfo;
|
|
9
11
|
}
|
|
10
12
|
declare const InsurancePaymentModal: React.FC<InsurancePaymentModalProps>;
|
|
11
13
|
export default InsurancePaymentModal;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { BankTransferInfo } from '../../types/response.dto';
|
|
2
3
|
interface MotorInsurancePaymentModalProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onClose: () => void;
|
|
@@ -6,6 +7,7 @@ interface MotorInsurancePaymentModalProps {
|
|
|
6
7
|
transactionPublicId?: string;
|
|
7
8
|
amount: number;
|
|
8
9
|
onSuccess?: () => void;
|
|
10
|
+
bankTransferInfo?: BankTransferInfo;
|
|
9
11
|
}
|
|
10
12
|
declare const MotorInsurancePaymentModal: React.FC<MotorInsurancePaymentModalProps>;
|
|
11
13
|
export default MotorInsurancePaymentModal;
|
|
@@ -246,6 +246,8 @@ export declare const ApiUrls: {
|
|
|
246
246
|
coveragePlans: (provider: string) => string;
|
|
247
247
|
transactionDetail: (publicId: string) => string;
|
|
248
248
|
retryProviderPolicy: (publicId: string) => string;
|
|
249
|
+
approveTransaction: (publicId: string) => string;
|
|
250
|
+
rejectTransaction: (publicId: string) => string;
|
|
249
251
|
transactionList: string;
|
|
250
252
|
coveragePlanQuotes: (provider: string) => string;
|
|
251
253
|
travelInsuranceSettings: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InsuranceTransaction } from '../types/insurance-transaction.dto';
|
|
2
2
|
import { EPaymentMethod, EOrderPaymentType, TransactionStatus } from '../types/enum';
|
|
3
|
-
import { ETravelScope } from '../types/insurance';
|
|
3
|
+
import { EApprovalStatus, ETravelScope } from '../types/insurance';
|
|
4
4
|
export interface GetInsuranceTransactionListReqDto {
|
|
5
5
|
page?: number;
|
|
6
6
|
limit?: number;
|
|
@@ -15,6 +15,8 @@ export interface GetInsuranceTransactionListReqDto {
|
|
|
15
15
|
primaryInsuredFullName?: string;
|
|
16
16
|
travelScope?: ETravelScope;
|
|
17
17
|
provider?: string;
|
|
18
|
+
approvalStatus?: EApprovalStatus;
|
|
19
|
+
approvalBypassed?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface GetInsuranceTransactionListRespDto {
|
|
20
22
|
transactions: InsuranceTransaction[];
|
|
@@ -60,6 +62,9 @@ export interface CreateTransactionPayload {
|
|
|
60
62
|
totalPremium: number;
|
|
61
63
|
premiumPerPerson: number;
|
|
62
64
|
};
|
|
65
|
+
createdOnBehalfOfUserId?: number;
|
|
66
|
+
approvalStatus?: EApprovalStatus | null;
|
|
67
|
+
approvalBypassed?: boolean;
|
|
63
68
|
}
|
|
64
69
|
export declare const useInsuranceTransactionDetail: (publicId: string | undefined) => {
|
|
65
70
|
transaction: InsuranceTransaction | null;
|
|
@@ -104,4 +109,11 @@ export declare const useInsuranceTransaction: (options?: {
|
|
|
104
109
|
createTransaction: (payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
|
|
105
110
|
isCreatingTransaction: boolean;
|
|
106
111
|
checkTransactionStatus: (publicId: string) => Promise<InsuranceTransaction>;
|
|
112
|
+
approveTransaction: (publicId: string) => Promise<void>;
|
|
113
|
+
isApprovingTransaction: boolean;
|
|
114
|
+
rejectTransaction: (publicId: string, payload: {
|
|
115
|
+
code: string;
|
|
116
|
+
text?: string;
|
|
117
|
+
}) => Promise<void>;
|
|
118
|
+
isRejectingTransaction: boolean;
|
|
107
119
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUser } from '../types/response.dto';
|
|
2
|
+
interface UseUserSearchResult {
|
|
3
|
+
users: IUser[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: string | null;
|
|
6
|
+
search: (query: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useUserSearch: (tenantId: number | null, debounceMs?: number) => UseUserSearchResult;
|
|
9
|
+
export {};
|
package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InsuranceTransactionApprovalPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EGender, EIdType, EInsuranceType, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelScope, ETravelType } from './insurance';
|
|
1
|
+
import { EGender, EIdType, EInsuranceType, EApprovalStatus, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelScope, ETravelType } from './insurance';
|
|
2
2
|
import { EOrderPaymentType } from './enum';
|
|
3
3
|
import { ITransaction } from './response.dto';
|
|
4
4
|
export interface InsuranceQuoteInsured {
|
|
@@ -106,6 +106,13 @@ export interface InsuranceTransaction {
|
|
|
106
106
|
paidAmount?: number;
|
|
107
107
|
unpaidAmount?: number;
|
|
108
108
|
isBypassed?: boolean;
|
|
109
|
+
approvalStatus?: EApprovalStatus | null;
|
|
110
|
+
approvalBypassed?: boolean;
|
|
111
|
+
createdByAdminId?: number | null;
|
|
112
|
+
approvedAt?: string | null;
|
|
113
|
+
rejectedAt?: string | null;
|
|
114
|
+
rejectionReasonCode?: string | null;
|
|
115
|
+
rejectionReasonText?: string | null;
|
|
109
116
|
createdAt: string;
|
|
110
117
|
updatedAt: string;
|
|
111
118
|
quote?: InsuranceQuote;
|
|
@@ -62,6 +62,11 @@ export declare enum EPolicyStatus {
|
|
|
62
62
|
PENDING = "pending",
|
|
63
63
|
FAILED = "failed"
|
|
64
64
|
}
|
|
65
|
+
export declare enum EApprovalStatus {
|
|
66
|
+
PENDING_APPROVAL = "pending_approval",
|
|
67
|
+
APPROVED = "approved",
|
|
68
|
+
REJECTED = "rejected"
|
|
69
|
+
}
|
|
65
70
|
export declare enum EDestination {
|
|
66
71
|
WORLDWIDE = "worldwide",
|
|
67
72
|
ASIA = "asia",
|
|
@@ -295,10 +295,18 @@ export type GetESimTransactionListRespDto = {
|
|
|
295
295
|
page: number;
|
|
296
296
|
limit: number;
|
|
297
297
|
};
|
|
298
|
+
export type BankTransferInfo = {
|
|
299
|
+
bankAccount: string;
|
|
300
|
+
accountName: string;
|
|
301
|
+
amount: number;
|
|
302
|
+
transferContent: string;
|
|
303
|
+
bankCode: string;
|
|
304
|
+
};
|
|
298
305
|
export type CreateEsimTransactionBankTransferResponse = {
|
|
299
306
|
qrCodeUrl: string;
|
|
300
307
|
transactionPublicId: string;
|
|
301
308
|
totalAmount: number;
|
|
309
|
+
bankTransferInfo?: BankTransferInfo;
|
|
302
310
|
};
|
|
303
311
|
export type GetUserListRespDto = {
|
|
304
312
|
users: IUser[];
|
|
@@ -385,6 +393,7 @@ export type IUser = {
|
|
|
385
393
|
departments?: IDepartment[];
|
|
386
394
|
roles?: IRole[];
|
|
387
395
|
tenant?: ITenant;
|
|
396
|
+
tenantId?: number;
|
|
388
397
|
permissions?: EPermissionKey[];
|
|
389
398
|
balance?: {
|
|
390
399
|
amount: number;
|