gotrip-fx-transaction-form 1.0.271-dev → 1.0.272-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 +29494 -29166
- package/package.json +1 -1
- package/types/components/ApprovalStatusBadge.d.ts +7 -0
- package/types/components/Common/DateDisplay.d.ts +7 -0
- package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +7 -1
- package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +8 -1
- package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +7 -1
- package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +8 -1
- package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +8 -1
- package/types/constants/api-urls.d.ts +3 -0
- package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
- package/types/hooks/useMotorInsuranceTransaction.d.ts +11 -2
- package/types/hooks/useMotorQuote.d.ts +2 -2
- package/types/hooks/useUserById.d.ts +7 -0
- package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +1 -0
- package/types/util/formatter.d.ts +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EApprovalStatus } from '../types/insurance';
|
|
2
|
+
type ApprovalStatusBadgeProps = {
|
|
3
|
+
approvalBypassed?: boolean;
|
|
4
|
+
approvalStatus?: EApprovalStatus | null;
|
|
5
|
+
};
|
|
6
|
+
export declare const ApprovalStatusBadge: ({ approvalBypassed, approvalStatus, }: ApprovalStatusBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextProps } from '@chakra-ui/react';
|
|
2
|
+
interface DateDisplayProps extends TextProps {
|
|
3
|
+
date?: string | Date | null;
|
|
4
|
+
format?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateDisplay: ({ date, format, ...props }: DateDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EOrderPaymentType, EPaymentMethod } from '../../../types/enum';
|
|
2
|
+
import { IUser } from '../../../types/response.dto';
|
|
2
3
|
import { MotorPlanFormValues, MotorPremiumSummary, VehicleInfoFormValues } from '../motor-insurance.types';
|
|
3
4
|
export interface BikeStepThreePaymentProps {
|
|
4
5
|
planValues: MotorPlanFormValues;
|
|
@@ -16,5 +17,10 @@ export interface BikeStepThreePaymentProps {
|
|
|
16
17
|
isGuest: boolean;
|
|
17
18
|
onBack: () => void;
|
|
18
19
|
paymentType?: EOrderPaymentType;
|
|
20
|
+
isAdminMode?: boolean;
|
|
21
|
+
selectedUser?: IUser | null;
|
|
22
|
+
waitForApproval?: boolean;
|
|
23
|
+
onWaitForApprovalChange?: (value: boolean) => void;
|
|
24
|
+
mode?: 'create' | 'edit';
|
|
19
25
|
}
|
|
20
|
-
export declare const BikeStepThreePayment: ({ planValues, premiumSummary, vehicleInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, paymentType, }: BikeStepThreePaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const BikeStepThreePayment: ({ planValues, premiumSummary, vehicleInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, paymentType, isAdminMode, selectedUser, waitForApproval, onWaitForApprovalChange, mode, }: BikeStepThreePaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IUser } from '../../../types/response.dto';
|
|
1
2
|
import { EMotorProvider } from '../motor-insurance.types';
|
|
2
3
|
export interface CreateBikeInsuranceFormProps {
|
|
3
4
|
storageKey: string;
|
|
@@ -6,5 +7,11 @@ export interface CreateBikeInsuranceFormProps {
|
|
|
6
7
|
onSuccess?: (transactionData: unknown) => void;
|
|
7
8
|
scrollable?: boolean;
|
|
8
9
|
allowedProviders?: EMotorProvider[];
|
|
10
|
+
isAdminMode?: boolean;
|
|
11
|
+
selectedUser?: IUser | null;
|
|
12
|
+
onOpenUserSelector?: () => void;
|
|
13
|
+
mode?: 'create' | 'edit';
|
|
14
|
+
editingPublicId?: string;
|
|
15
|
+
initialData?: Record<string, any>;
|
|
9
16
|
}
|
|
10
|
-
export declare const CreateBikeInsuranceForm: ({ storageKey, title, onBack, onSuccess, scrollable, allowedProviders, }: CreateBikeInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const CreateBikeInsuranceForm: ({ storageKey, title, onBack, onSuccess, scrollable, allowedProviders, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateBikeInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EOrderPaymentType, EPaymentMethod } from '../../../types/enum';
|
|
2
|
+
import { IUser } from '../../../types/response.dto';
|
|
2
3
|
import { CarPlanFormValues, CarPremiumSummary, CarVehicleInfoFormValues } from '../motor-insurance.types';
|
|
3
4
|
interface CarStepFourPaymentProps {
|
|
4
5
|
planValues: CarPlanFormValues;
|
|
@@ -19,6 +20,11 @@ interface CarStepFourPaymentProps {
|
|
|
19
20
|
getProviderLogoUrl: (providerCode?: string | null) => string | undefined;
|
|
20
21
|
getTermsAgreeHtml: (providerCode?: string | null) => string | undefined;
|
|
21
22
|
paymentType?: EOrderPaymentType;
|
|
23
|
+
isAdminMode?: boolean;
|
|
24
|
+
selectedUser?: IUser | null;
|
|
25
|
+
waitForApproval?: boolean;
|
|
26
|
+
onWaitForApprovalChange?: (value: boolean) => void;
|
|
27
|
+
mode?: 'create' | 'edit';
|
|
22
28
|
}
|
|
23
|
-
export declare const CarStepFourPayment: ({ planValues, premiumSummary, vehicleInfo, buyerCertificateInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, getProviderLogoUrl, getTermsAgreeHtml, paymentType, }: CarStepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const CarStepFourPayment: ({ planValues, premiumSummary, vehicleInfo, buyerCertificateInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, getProviderLogoUrl, getTermsAgreeHtml, paymentType, isAdminMode, selectedUser, waitForApproval, onWaitForApprovalChange, mode, }: CarStepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
30
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IUser } from '../../../types/response.dto';
|
|
1
2
|
import { EMotorProvider } from '../motor-insurance.types';
|
|
2
3
|
export interface CreateCarInsuranceFormProps {
|
|
3
4
|
storageKey: string;
|
|
@@ -6,5 +7,11 @@ export interface CreateCarInsuranceFormProps {
|
|
|
6
7
|
onSuccess?: (transactionData: unknown) => void;
|
|
7
8
|
scrollable?: boolean;
|
|
8
9
|
allowedProviders?: EMotorProvider[];
|
|
10
|
+
isAdminMode?: boolean;
|
|
11
|
+
selectedUser?: IUser | null;
|
|
12
|
+
onOpenUserSelector?: () => void;
|
|
13
|
+
mode?: 'create' | 'edit';
|
|
14
|
+
editingPublicId?: string;
|
|
15
|
+
initialData?: Record<string, any>;
|
|
9
16
|
}
|
|
10
|
-
export declare const CreateCarInsuranceForm: ({ storageKey, title, onBack, onSuccess, scrollable, allowedProviders, }: CreateCarInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const CreateCarInsuranceForm: ({ storageKey, title, onBack, onSuccess, scrollable, allowedProviders, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateCarInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EMotorVehicleType } from './motor-insurance.types';
|
|
2
|
+
import { IUser } from '../../types/response.dto';
|
|
2
3
|
export interface CreateMotorInsuranceTransactionFormProps {
|
|
3
4
|
vehicleType: EMotorVehicleType;
|
|
4
5
|
storageKey: string;
|
|
@@ -6,5 +7,11 @@ export interface CreateMotorInsuranceTransactionFormProps {
|
|
|
6
7
|
onBack?: () => void;
|
|
7
8
|
onSuccess?: (transactionData: unknown) => void;
|
|
8
9
|
scrollable?: boolean;
|
|
10
|
+
isAdminMode?: boolean;
|
|
11
|
+
selectedUser?: IUser | null;
|
|
12
|
+
onOpenUserSelector?: () => void;
|
|
13
|
+
mode?: 'create' | 'edit';
|
|
14
|
+
editingPublicId?: string;
|
|
15
|
+
initialData?: Record<string, any>;
|
|
9
16
|
}
|
|
10
|
-
export declare const CreateMotorInsuranceTransactionForm: ({ vehicleType, storageKey, title, onBack, onSuccess, scrollable, }: CreateMotorInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const CreateMotorInsuranceTransactionForm: ({ vehicleType, storageKey, title, onBack, onSuccess, scrollable, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateMotorInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -240,6 +240,9 @@ export declare const ApiUrls: {
|
|
|
240
240
|
transactionList: string;
|
|
241
241
|
transactionDetail: (publicId: string) => string;
|
|
242
242
|
retryProviderPolicy: (publicId: string) => string;
|
|
243
|
+
approveTransaction: (publicId: string) => string;
|
|
244
|
+
rejectTransaction: (publicId: string) => string;
|
|
245
|
+
updateTransaction: (publicId: string) => string;
|
|
243
246
|
};
|
|
244
247
|
insuranceHandlers: {
|
|
245
248
|
providers: string;
|
|
@@ -12,8 +12,8 @@ export declare const useGroupTransactions: () => {
|
|
|
12
12
|
passportNo: string;
|
|
13
13
|
idNo: string;
|
|
14
14
|
exchangeRate: number;
|
|
15
|
-
transactionId: number;
|
|
16
15
|
phoneNumber: string;
|
|
16
|
+
transactionId: number;
|
|
17
17
|
ticketNo: string;
|
|
18
18
|
}[] | undefined;
|
|
19
19
|
}>;
|
|
@@ -28,8 +28,8 @@ export declare const useGroupTransactions: () => {
|
|
|
28
28
|
passportNo: string;
|
|
29
29
|
idNo: string;
|
|
30
30
|
exchangeRate: number;
|
|
31
|
-
transactionId: number;
|
|
32
31
|
phoneNumber: string;
|
|
32
|
+
transactionId: number;
|
|
33
33
|
ticketNo: string;
|
|
34
34
|
}[] | undefined;
|
|
35
35
|
}>;
|
|
@@ -44,8 +44,8 @@ export declare const useGroupTransactions: () => {
|
|
|
44
44
|
passportNo: string;
|
|
45
45
|
idNo: string;
|
|
46
46
|
exchangeRate: number;
|
|
47
|
-
transactionId: number;
|
|
48
47
|
phoneNumber: string;
|
|
48
|
+
transactionId: number;
|
|
49
49
|
ticketNo: string;
|
|
50
50
|
}[] | undefined;
|
|
51
51
|
}>;
|
|
@@ -60,8 +60,8 @@ export declare const useGroupTransactions: () => {
|
|
|
60
60
|
passportNo: string;
|
|
61
61
|
idNo: string;
|
|
62
62
|
exchangeRate: number;
|
|
63
|
-
transactionId: number;
|
|
64
63
|
phoneNumber: string;
|
|
64
|
+
transactionId: number;
|
|
65
65
|
ticketNo: string;
|
|
66
66
|
}[] | undefined;
|
|
67
67
|
}>;
|
|
@@ -76,8 +76,8 @@ export declare const useGroupTransactions: () => {
|
|
|
76
76
|
passportNo: string;
|
|
77
77
|
idNo: string;
|
|
78
78
|
exchangeRate: number;
|
|
79
|
-
transactionId: number;
|
|
80
79
|
phoneNumber: string;
|
|
80
|
+
transactionId: number;
|
|
81
81
|
ticketNo: string;
|
|
82
82
|
}[] | undefined;
|
|
83
83
|
}>;
|
|
@@ -92,8 +92,8 @@ export declare const useGroupTransactions: () => {
|
|
|
92
92
|
passportNo: string;
|
|
93
93
|
idNo: string;
|
|
94
94
|
exchangeRate: number;
|
|
95
|
-
transactionId: number;
|
|
96
95
|
phoneNumber: string;
|
|
96
|
+
transactionId: number;
|
|
97
97
|
ticketNo: string;
|
|
98
98
|
}[] | undefined;
|
|
99
99
|
}, undefined>;
|
|
@@ -108,8 +108,8 @@ export declare const useGroupTransactions: () => {
|
|
|
108
108
|
passportNo: string;
|
|
109
109
|
idNo: string;
|
|
110
110
|
exchangeRate: number;
|
|
111
|
-
transactionId: number;
|
|
112
111
|
phoneNumber: string;
|
|
112
|
+
transactionId: number;
|
|
113
113
|
ticketNo: string;
|
|
114
114
|
}[] | undefined;
|
|
115
115
|
}>;
|
|
@@ -124,8 +124,8 @@ export declare const useGroupTransactions: () => {
|
|
|
124
124
|
passportNo: string;
|
|
125
125
|
idNo: string;
|
|
126
126
|
exchangeRate: number;
|
|
127
|
-
transactionId: number;
|
|
128
127
|
phoneNumber: string;
|
|
128
|
+
transactionId: number;
|
|
129
129
|
ticketNo: string;
|
|
130
130
|
}[] | undefined;
|
|
131
131
|
}>;
|
|
@@ -148,8 +148,8 @@ export declare const useGroupTransactions: () => {
|
|
|
148
148
|
passportNo: string;
|
|
149
149
|
idNo: string;
|
|
150
150
|
exchangeRate: number;
|
|
151
|
-
transactionId: number;
|
|
152
151
|
phoneNumber: string;
|
|
152
|
+
transactionId: number;
|
|
153
153
|
ticketNo: string;
|
|
154
154
|
}[] | undefined;
|
|
155
155
|
}>;
|
|
@@ -164,8 +164,8 @@ export declare const useGroupTransactions: () => {
|
|
|
164
164
|
passportNo: string;
|
|
165
165
|
idNo: string;
|
|
166
166
|
exchangeRate: number;
|
|
167
|
-
transactionId: number;
|
|
168
167
|
phoneNumber: string;
|
|
168
|
+
transactionId: number;
|
|
169
169
|
ticketNo: string;
|
|
170
170
|
}[] | undefined;
|
|
171
171
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EOrderPaymentType, TransactionStatus } from '../types/enum';
|
|
2
|
-
import { EMotorProvider } from '../components/MotorInsurance/motor-insurance.types';
|
|
2
|
+
import { EMotorProvider, EMotorVehicleType } from '../components/MotorInsurance/motor-insurance.types';
|
|
3
3
|
export interface MotorInsuranceTransactionDetail {
|
|
4
4
|
id: number;
|
|
5
5
|
transactionPublicId: string;
|
|
@@ -9,7 +9,7 @@ export interface MotorInsuranceTransactionDetail {
|
|
|
9
9
|
providerPolicyId?: string | number;
|
|
10
10
|
providerPolicyNumber?: string;
|
|
11
11
|
errorMessage?: string;
|
|
12
|
-
vehicleType?:
|
|
12
|
+
vehicleType?: EMotorVehicleType;
|
|
13
13
|
ownerName?: string;
|
|
14
14
|
licensePlate?: string;
|
|
15
15
|
startDate?: string;
|
|
@@ -51,6 +51,7 @@ export interface MotorInsuranceTransactionListItem {
|
|
|
51
51
|
paidAmount?: number;
|
|
52
52
|
unpaidAmount?: number;
|
|
53
53
|
isBypassed?: boolean;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
54
55
|
}
|
|
55
56
|
export interface GetMotorInsuranceTransactionListReqDto {
|
|
56
57
|
page?: number;
|
|
@@ -66,6 +67,8 @@ export interface GetMotorInsuranceTransactionListReqDto {
|
|
|
66
67
|
ownerName?: string;
|
|
67
68
|
vehicleType?: string;
|
|
68
69
|
provider?: string;
|
|
70
|
+
approvalStatus?: string;
|
|
71
|
+
approvalBypassed?: boolean;
|
|
69
72
|
}
|
|
70
73
|
export interface GetMotorInsuranceTransactionListRespDto {
|
|
71
74
|
transactions: MotorInsuranceTransactionListItem[];
|
|
@@ -112,4 +115,10 @@ export declare const useMotorInsuranceTransaction: (options?: {
|
|
|
112
115
|
retryProviderPolicy: () => Promise<void>;
|
|
113
116
|
};
|
|
114
117
|
checkTransactionStatus: (publicId: string) => Promise<MotorInsuranceTransactionDetail | null>;
|
|
118
|
+
approveTransaction: (publicId: string) => Promise<void>;
|
|
119
|
+
rejectTransaction: (publicId: string, payload: {
|
|
120
|
+
code: string;
|
|
121
|
+
text?: string;
|
|
122
|
+
}) => Promise<void>;
|
|
123
|
+
updateTransaction: (publicId: string, payload: Record<string, unknown>) => Promise<MotorInsuranceTransactionDetail>;
|
|
115
124
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CarPlanFormValues, CarPremiumSummary, MotorPlanFormValues, MotorPremiumSummary, EMotorProvider } from '../components/MotorInsurance/motor-insurance.types';
|
|
1
|
+
import { CarPlanFormValues, CarPremiumSummary, MotorPlanFormValues, MotorPremiumSummary, EVehicleUsageType, EMotorProvider } from '../components/MotorInsurance/motor-insurance.types';
|
|
2
2
|
interface UseCarQuoteResult {
|
|
3
3
|
quoteResult: CarPremiumSummary | null;
|
|
4
4
|
quoteResultRef: React.MutableRefObject<CarPremiumSummary | null>;
|
|
5
|
-
calculateQuote: (planValues: CarPlanFormValues, createQuoteCar: (provider: EMotorProvider, payload: any) => Promise<any
|
|
5
|
+
calculateQuote: (planValues: CarPlanFormValues, createQuoteCar: (provider: EMotorProvider, payload: any) => Promise<any>, vehicleUsageType?: EVehicleUsageType) => void;
|
|
6
6
|
resetQuote: () => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const useCarQuote: () => UseCarQuoteResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdminCreateMotorBikeTransactionPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdminCreateMotorCarTransactionPage: () => import("react/jsx-runtime").JSX.Element;
|
package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdminEditMotorTransactionPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MotorInsuranceTransactionApprovalPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,3 +7,4 @@ export declare const upperFirstLetter: (str: string) => string;
|
|
|
7
7
|
* Returns undefined for empty input or invalid numbers.
|
|
8
8
|
*/
|
|
9
9
|
export declare const parseFilterNumber: (s: string) => number | undefined;
|
|
10
|
+
export declare const formatDate: (date: string | Date | null | undefined, format?: string) => string;
|