gotrip-fx-transaction-form 1.0.202-dev → 1.0.202
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/assets/index.css +1 -1
- package/index.js +50632 -40017
- package/package.json +1 -1
- package/types/components/AddTransaction/Agent.d.ts +3 -2
- package/types/components/AddTransaction/FlightInfomation.d.ts +2 -1
- package/types/components/AddTransaction/SelectingBankMessageAlerts.d.ts +5 -0
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelector.d.ts +7 -0
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelectorModal.d.ts +10 -0
- package/types/components/ApprovalLinkDropdown/ApprovalLinkDropdown.d.ts +6 -0
- package/types/components/ApprovalStatusBadge.d.ts +7 -0
- package/types/components/Apps/EmbededIndividualApp.d.ts +2 -1
- package/types/components/BankTransferInfo/BankTransferInfoDisplay.d.ts +7 -0
- package/types/components/Common/DateDisplay.d.ts +7 -0
- package/types/components/Common/MultiTagCombobox.d.ts +14 -0
- package/types/components/Common/PrimaryRadioGroup.d.ts +16 -0
- package/types/components/Common/TimeRangeSelect.d.ts +17 -0
- package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +38 -2
- package/types/components/Insurance/DateRangePicker.d.ts +12 -0
- package/types/components/Insurance/DebtPaymentQrButton.d.ts +8 -0
- package/types/components/Insurance/FxInsuranceCouponBox.d.ts +10 -0
- package/types/components/Insurance/InsuranceApprovalContent.d.ts +10 -0
- package/types/components/Insurance/InsuranceApprovalPageSDK.d.ts +5 -0
- package/types/components/Insurance/InsuranceApprovalPaymentStep.d.ts +28 -0
- package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
- package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
- package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
- package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
- package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
- package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
- package/types/components/Insurance/MotorInsuranceApprovalContent.d.ts +10 -0
- package/types/components/Insurance/MotorInsuranceApprovalPageSDK.d.ts +5 -0
- package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
- package/types/components/Insurance/SimpleDetail.d.ts +2 -1
- package/types/components/Insurance/StepFourPayment.d.ts +32 -5
- package/types/components/Insurance/StepOneForm.d.ts +11 -2
- package/types/components/Insurance/StepThree.d.ts +29 -0
- package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
- package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
- package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
- package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
- package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
- package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
- package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
- package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
- package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
- package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
- package/types/components/Insurance/shared/index.d.ts +5 -0
- package/types/components/Insurance/types.d.ts +21 -6
- package/types/components/Insurance/validationUtils.d.ts +7 -1
- package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
- package/types/components/Modal/DebtSettlementQrModal.d.ts +11 -0
- package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
- package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
- package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
- package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
- package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
- package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
- package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
- package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +41 -0
- package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
- package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
- package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
- package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
- package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +45 -0
- package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
- package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
- package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
- package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
- package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
- package/types/components/MotorInsurance/Car/index.d.ts +6 -0
- package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
- package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
- package/types/components/MotorInsurance/MotorInsuranceApprovalPaymentStep.d.ts +20 -0
- package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
- package/types/components/MotorInsurance/index.d.ts +4 -0
- package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
- package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
- package/types/components/Notification/NotificationBell.d.ts +5 -0
- package/types/components/Notification/NotificationItem.d.ts +8 -0
- package/types/components/Notification/NotificationPanel.d.ts +6 -0
- package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
- package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
- package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
- package/types/constants/api-urls.d.ts +59 -5
- package/types/constants/approval-link.enum.d.ts +4 -0
- package/types/constants/business-codes.d.ts +2 -1
- package/types/constants/env.d.ts +3 -0
- package/types/constants/policy-enums.d.ts +11 -0
- package/types/constants/regex.d.ts +4 -0
- package/types/constants/tenant.d.ts +3 -0
- package/types/constants/transaction-status-labels.d.ts +3 -0
- package/types/embeded-main.d.ts +2 -0
- package/types/hooks/fetchEsimTransaction.d.ts +2 -0
- package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
- package/types/hooks/traveller-confirmation/submit-confirmation.util.d.ts +1 -0
- package/types/hooks/traveller-confirmation/traveller-confirmation-flow.d.ts +4 -0
- package/types/hooks/traveller-confirmation/types.d.ts +22 -0
- package/types/hooks/traveller-confirmation/usePurchaseTravellerConfirmation.d.ts +12 -0
- package/types/hooks/traveller-confirmation/useTravellerConfirmationFetch.d.ts +2 -0
- package/types/hooks/useAdminDashboard.d.ts +19 -0
- package/types/hooks/useAutoSelectBankBranchAndDepartment.d.ts +19 -0
- package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
- package/types/hooks/useConfirmTransaction.d.ts +15 -31
- package/types/hooks/useCoupon.d.ts +95 -0
- package/types/hooks/useCouponValidation.d.ts +29 -0
- package/types/hooks/useCreateAutoCoupon.d.ts +5 -0
- package/types/hooks/useFxPrefill.d.ts +19 -0
- package/types/hooks/useGroupCustomers.d.ts +12 -9
- package/types/hooks/useInsuranceData.d.ts +3 -11
- package/types/hooks/useInsurancePlans.d.ts +13 -1
- package/types/hooks/useInsuranceTransaction.d.ts +39 -4
- package/types/hooks/useLocationData.d.ts +22 -0
- package/types/hooks/useMotorInsurance.d.ts +17 -0
- package/types/hooks/useMotorInsuranceTransaction.d.ts +133 -0
- package/types/hooks/useMotorQuote.d.ts +15 -0
- package/types/hooks/useNotifications.d.ts +10 -0
- package/types/hooks/usePolicyGroups.d.ts +1 -0
- package/types/hooks/useTenantList.d.ts +3 -4
- package/types/hooks/useUserById.d.ts +7 -0
- package/types/hooks/useUserSearch.d.ts +10 -0
- package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
- package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
- package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
- package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
- package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
- package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
- package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
- package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -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/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
- package/types/pages/agency/home/HomePage.d.ts +1 -0
- package/types/pages/agency/home/constants.d.ts +16 -0
- package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +3 -0
- package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
- package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +3 -0
- package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/agency/traveller-confirmation/PurchaseTravellerConfirmation.d.ts +5 -0
- package/types/pages/agency/traveller-confirmation/TravellerPurchaseConfirmation.d.ts +2 -0
- package/types/pages/guest/insurance-approval.d.ts +1 -0
- package/types/pages/guest/insurance-create.d.ts +4 -1
- package/types/pages/guest/motor-insurance-approval.d.ts +1 -0
- package/types/pages/guest/motor-insurance-create.d.ts +6 -0
- package/types/providers/AppSettingsProvider.d.ts +1 -0
- package/types/store/useApprovalStore.d.ts +6 -0
- package/types/store/useNotificationStore.d.ts +16 -0
- package/types/store/useTenantStore.d.ts +12 -0
- package/types/store/useTrackingStore.d.ts +10 -0
- package/types/types/app-settings.d.ts +13 -1
- package/types/types/coupon.d.ts +70 -0
- package/types/types/enum.d.ts +15 -2
- package/types/types/insurance-transaction.dto.d.ts +22 -1
- package/types/types/insurance.d.ts +19 -2
- package/types/types/notification.d.ts +23 -0
- package/types/types/response.dto.d.ts +59 -5
- package/types/types/sdk.d.ts +8 -1
- package/types/types/tracking.dto.d.ts +21 -0
- package/types/util/booker-display.d.ts +6 -0
- package/types/util/couponErrorMessages.d.ts +2 -0
- package/types/util/debt-report-display.d.ts +4 -0
- package/types/util/formatter.d.ts +6 -0
- package/types/util/fx-travelling-messages.d.ts +1 -0
- package/types/util/fx.d.ts +15 -0
- package/types/util/order-payment-display.d.ts +16 -0
- package/types/util/sim-display.d.ts +2 -0
- package/types/util/tracking.d.ts +19 -0
- package/types/util/transaction.util.d.ts +2 -1
- package/types/utils/bank.d.ts +4 -0
- package/types/utils/transaction-confirmation-link.d.ts +9 -0
package/package.json
CHANGED
|
@@ -4,7 +4,8 @@ type Props = {
|
|
|
4
4
|
register: UseFormRegister<any>;
|
|
5
5
|
agentIdentityFileInputRef: React.RefObject<HTMLInputElement>;
|
|
6
6
|
isUploadingAgentIdentity: boolean;
|
|
7
|
-
phoneNotice?: string | null;
|
|
7
|
+
phoneNotice?: string | string[] | null;
|
|
8
|
+
agentNotes?: string[];
|
|
8
9
|
};
|
|
9
|
-
export declare const Agent: ({ errors, register, agentIdentityFileInputRef, isUploadingAgentIdentity, phoneNotice, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Agent: ({ errors, register, agentIdentityFileInputRef, isUploadingAgentIdentity, phoneNotice, agentNotes, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -18,6 +18,7 @@ type Props = {
|
|
|
18
18
|
handleSelectTicketAsImage: (files: File[]) => void;
|
|
19
19
|
isMobileDevices: boolean;
|
|
20
20
|
hideGDSTicketSearch?: boolean;
|
|
21
|
+
onCountryCodeDesChange?: (code: string) => void;
|
|
21
22
|
};
|
|
22
|
-
export declare const FlightInformation: ({ imageSrc, handleCaptureImage, handleAgentIdentityDocumentUpload, agentIdentityFileInputRef, setIsWebcamOpen, showGetTicketInfo, errors, register, getValues, setValue, trigger, isLoading, getFlightInfo, isVN, fileInputRef, handleSelectTicketAsImage, isMobileDevices, hideGDSTicketSearch, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const FlightInformation: ({ imageSrc, handleCaptureImage, handleAgentIdentityDocumentUpload, agentIdentityFileInputRef, setIsWebcamOpen, showGetTicketInfo, errors, register, getValues, setValue, trigger, isLoading, getFlightInfo, isVN, fileInputRef, handleSelectTicketAsImage, isMobileDevices, hideGDSTicketSearch, onCountryCodeDesChange, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -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,6 @@
|
|
|
1
|
+
import { EApprovalLinkType } from '../../constants/approval-link.enum';
|
|
2
|
+
interface ApprovalLinkDropdownProps {
|
|
3
|
+
onSelectLink: (linkType: EApprovalLinkType) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const ApprovalLinkDropdown: ({ onSelectLink }: ApprovalLinkDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -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 {};
|
|
@@ -7,5 +7,6 @@ export type EmbededIndividualAppProps = {
|
|
|
7
7
|
displayDefaultBankLogo?: boolean;
|
|
8
8
|
type?: ESdkFormType;
|
|
9
9
|
scrollable?: boolean;
|
|
10
|
+
recommendBoxHeight?: string;
|
|
10
11
|
};
|
|
11
|
-
export declare const EmbededIndividualApp: ({ apiKey, externalCssUrl, hide, defaultBank, displayDefaultBankLogo, type, scrollable, }: EmbededIndividualAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const EmbededIndividualApp: ({ apiKey, externalCssUrl, hide, defaultBank, displayDefaultBankLogo, type, scrollable, recommendBoxHeight, }: EmbededIndividualAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type TMultiTagOption = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
type MultiTagComboboxProps = {
|
|
6
|
+
options: TMultiTagOption[];
|
|
7
|
+
values: string[];
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
emptyText?: string;
|
|
10
|
+
onChange: (nextValues: string[]) => void;
|
|
11
|
+
controlBorderRadius?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const MultiTagCombobox: ({ options, values, placeholder, emptyText, onChange, controlBorderRadius, }: MultiTagComboboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface PrimaryRadioGroupOption<T extends string> {
|
|
3
|
+
value: T;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface PrimaryRadioGroupProps<T extends string> {
|
|
8
|
+
value: T;
|
|
9
|
+
onValueChange: (value: T) => void;
|
|
10
|
+
options: PrimaryRadioGroupOption<T>[];
|
|
11
|
+
direction?: 'row' | 'column';
|
|
12
|
+
gap?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function PrimaryRadioGroup<T extends string>({ value, onValueChange, options, direction, gap, disabled, }: PrimaryRadioGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type TTimeOption = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
type TimeRangeSelectProps = {
|
|
6
|
+
startValue: string;
|
|
7
|
+
endValue: string;
|
|
8
|
+
options: TTimeOption[];
|
|
9
|
+
onStartChange: (value: string) => void;
|
|
10
|
+
onEndChange: (value: string) => void;
|
|
11
|
+
error?: string;
|
|
12
|
+
startLabel?: string;
|
|
13
|
+
endLabel?: string;
|
|
14
|
+
fieldBorderRadius?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const TimeRangeSelect: ({ startValue, endValue, options, onStartChange, onEndChange, error, startLabel, endLabel, fieldBorderRadius, }: TimeRangeSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,8 +1,44 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
|
|
3
|
+
import { EInsuranceProviderType, ETravelScope } from '../../types/insurance';
|
|
4
|
+
import { IUser } from '../../types/response.dto';
|
|
5
|
+
export type InsuranceFormInitialData = {
|
|
6
|
+
formValues: TravelPlanFormValues;
|
|
7
|
+
selectedPlan: CoveragePlanPremium | null;
|
|
8
|
+
buyerInfo: BuyerFormValues | null;
|
|
9
|
+
insuredPeople: InsuredPerson[];
|
|
10
|
+
recalculatedPremium?: CoveragePlanPremium['premium'] | null;
|
|
11
|
+
waitForApproval?: boolean;
|
|
12
|
+
appliedCoupon?: {
|
|
13
|
+
code: string;
|
|
14
|
+
discountAmount: number;
|
|
15
|
+
finalAmount: number;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
} | null;
|
|
18
|
+
};
|
|
1
19
|
export interface CreateInsuranceTransactionFormProps {
|
|
2
20
|
storageKey: string;
|
|
3
|
-
title?:
|
|
21
|
+
title?: ReactNode;
|
|
22
|
+
travelScope: ETravelScope;
|
|
4
23
|
onBack?: () => void;
|
|
5
24
|
onSuccess?: (transactionData: any) => void;
|
|
6
25
|
scrollable?: boolean;
|
|
26
|
+
recommendBoxHeight?: string;
|
|
27
|
+
isAdminMode?: boolean;
|
|
28
|
+
selectedUser?: IUser | null;
|
|
29
|
+
onOpenUserSelector?: () => void;
|
|
30
|
+
initialData?: InsuranceFormInitialData | null;
|
|
31
|
+
mode?: 'create' | 'edit';
|
|
32
|
+
editingPublicId?: string;
|
|
33
|
+
initialProviders?: EInsuranceProviderType[];
|
|
34
|
+
prefillCouponCode?: string;
|
|
35
|
+
fxPrefillData?: {
|
|
36
|
+
startDate: Date | null;
|
|
37
|
+
endDate: Date | null;
|
|
38
|
+
destinationCountryId: number | null;
|
|
39
|
+
travellerFullName: string;
|
|
40
|
+
identityDocumentNumber: string | null;
|
|
41
|
+
travellerPhone: string | null;
|
|
42
|
+
};
|
|
7
43
|
}
|
|
8
|
-
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, onBack, onSuccess, scrollable, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, travelScope, onBack, onSuccess, scrollable, recommendBoxHeight, isAdminMode, selectedUser, onOpenUserSelector, initialData, mode, editingPublicId, initialProviders, prefillCouponCode, fxPrefillData, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Control } from 'react-hook-form';
|
|
2
|
+
import { TravelPlanFormValues } from './types';
|
|
3
|
+
interface DateRangePickerProps {
|
|
4
|
+
control: Control<TravelPlanFormValues>;
|
|
5
|
+
tripStart: Date | null;
|
|
6
|
+
tripEnd: Date | null;
|
|
7
|
+
onDatesChange?: (startDate: Date | null, endDate: Date | null) => void;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
labelPosition?: 'top' | 'left';
|
|
10
|
+
}
|
|
11
|
+
export declare const DateRangePicker: ({ control, tripStart, tripEnd, onDatesChange, showLabel, labelPosition, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DebtPaymentQrResponse } from '../../types/response.dto';
|
|
3
|
+
interface DebtPaymentQrButtonProps {
|
|
4
|
+
transactionPublicId: string;
|
|
5
|
+
fetchQr: (publicId: string) => Promise<DebtPaymentQrResponse>;
|
|
6
|
+
}
|
|
7
|
+
export declare const DebtPaymentQrButton: React.FC<DebtPaymentQrButtonProps>;
|
|
8
|
+
export default DebtPaymentQrButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface FxInsuranceCouponBoxProps {
|
|
2
|
+
couponCode: string;
|
|
3
|
+
transactionPublicId: string;
|
|
4
|
+
countryCodeDes?: string | null;
|
|
5
|
+
countryNameDes?: string | null;
|
|
6
|
+
discountPercent?: number;
|
|
7
|
+
maxDiscountAmount?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const FxInsuranceCouponBox: ({ couponCode, transactionPublicId, countryCodeDes, countryNameDes, discountPercent, maxDiscountAmount, }: FxInsuranceCouponBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface InsuranceApprovalContentProps {
|
|
2
|
+
publicId: string;
|
|
3
|
+
backLink?: {
|
|
4
|
+
label: string;
|
|
5
|
+
path: string;
|
|
6
|
+
};
|
|
7
|
+
isGuest?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const InsuranceApprovalContent: ({ publicId, backLink, isGuest, }: InsuranceApprovalContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EPaymentMethod, EOrderPaymentType } from '../../types/enum';
|
|
2
|
+
import { EInsuranceType } from '../../types/insurance';
|
|
3
|
+
export interface InsuranceApprovalPaymentStepProps {
|
|
4
|
+
user?: any;
|
|
5
|
+
amount: number;
|
|
6
|
+
discountAmount?: number;
|
|
7
|
+
couponCode?: string;
|
|
8
|
+
couponDescription?: string;
|
|
9
|
+
isApproving?: boolean;
|
|
10
|
+
isRejecting?: boolean;
|
|
11
|
+
onApprove?: (paymentMode: EPaymentMethod | undefined, paymentType: EOrderPaymentType) => void;
|
|
12
|
+
onReject?: (reason: string, text?: string) => void;
|
|
13
|
+
insuranceType?: EInsuranceType;
|
|
14
|
+
adultsCount?: number;
|
|
15
|
+
teenagerCount?: number;
|
|
16
|
+
childrenCount?: number;
|
|
17
|
+
freeTeenagerCount?: number;
|
|
18
|
+
freeChildrenCount?: number;
|
|
19
|
+
premiumPerPerson?: number;
|
|
20
|
+
isLoadingPremium?: boolean;
|
|
21
|
+
termsDetailsHtml?: string;
|
|
22
|
+
termsAgreeHtml?: string;
|
|
23
|
+
startDate?: string | Date;
|
|
24
|
+
travelScope?: string;
|
|
25
|
+
planName?: string;
|
|
26
|
+
isGuest?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const InsuranceApprovalPaymentStep: ({ user, amount, discountAmount, couponCode, couponDescription, isApproving, isRejecting, onApprove, onReject, insuranceType, adultsCount, teenagerCount, childrenCount, freeTeenagerCount, freeChildrenCount, premiumPerPerson, isLoadingPremium, termsDetailsHtml, termsAgreeHtml, startDate, isGuest, }: InsuranceApprovalPaymentStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as DatePicker } from 'react-datepicker';
|
|
2
|
+
export interface DatePickerInputProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
borderRadius?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DatePickerInput: import('react').ForwardRefExoticComponent<DatePickerInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export { DatePicker };
|
|
@@ -17,5 +17,5 @@ interface InsurancePlanListProps {
|
|
|
17
17
|
travelInsuranceSettings?: Record<string, any>;
|
|
18
18
|
travelPlan?: TravelPlanFormValues | null;
|
|
19
19
|
}
|
|
20
|
-
export declare const InsurancePlanList: ({ plans, loading,
|
|
20
|
+
export declare const InsurancePlanList: ({ plans, loading, onPlanSelect, title, columns, emptyMessage, showDiscount, actionButtonText, travelInsuranceSettings, travelPlan, }: InsurancePlanListProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CoveragePlanPremium, TravelPlanFormValues, InsuranceTypeAndPeopleCountValues } from '../types';
|
|
2
|
+
export interface QuickCoveragePlan {
|
|
3
|
+
countryId: number;
|
|
4
|
+
provider: string;
|
|
5
|
+
plan: CoveragePlanPremium;
|
|
6
|
+
}
|
|
7
|
+
interface QuickCoveragePlanCardProps {
|
|
8
|
+
quickPlan: QuickCoveragePlan;
|
|
9
|
+
countryName: string;
|
|
10
|
+
showCountryName?: boolean;
|
|
11
|
+
onBuyNow: (plan: CoveragePlanPremium, countryId: number, values: InsuranceTypeAndPeopleCountValues) => void;
|
|
12
|
+
travelInsuranceSettings?: Record<string, any>;
|
|
13
|
+
travelPlan?: TravelPlanFormValues | null;
|
|
14
|
+
}
|
|
15
|
+
export declare const QuickCoveragePlanCard: ({ quickPlan, countryName, showCountryName, onBuyNow, travelInsuranceSettings, travelPlan, }: QuickCoveragePlanCardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { QuickCoveragePlan } from './QuickCoveragePlanCard';
|
|
2
|
+
import { CoveragePlanPremium, TravelPlanFormValues, InsuranceTypeAndPeopleCountValues } from '../types';
|
|
3
|
+
interface QuickRecommendationsSectionProps {
|
|
4
|
+
countryId: number;
|
|
5
|
+
countryName: string;
|
|
6
|
+
plans: QuickCoveragePlan[];
|
|
7
|
+
countryOptions: Array<{
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}>;
|
|
11
|
+
travelInsuranceSettings?: Record<string, any>;
|
|
12
|
+
travelPlan?: TravelPlanFormValues | null;
|
|
13
|
+
onBuyNow: (plan: CoveragePlanPremium, countryId: number, values: InsuranceTypeAndPeopleCountValues) => void;
|
|
14
|
+
onFetchPlansByCountry: (countryId: number) => Promise<QuickCoveragePlan[]>;
|
|
15
|
+
onPlansLoaded?: (countryId: number, plans: QuickCoveragePlan[]) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const QuickRecommendationsSection: ({ countryId, countryName, plans: plansProp, countryOptions, travelInsuranceSettings, travelPlan, onBuyNow, onFetchPlansByCountry, onPlansLoaded, }: QuickRecommendationsSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export type InsuranceSummaryOverviewProps = {
|
|
2
|
-
title?: string;
|
|
3
2
|
summary: {
|
|
4
3
|
totalPremium: number;
|
|
4
|
+
premiumBreakdown?: {
|
|
5
|
+
beforeDiscount: number;
|
|
6
|
+
couponCode: string;
|
|
7
|
+
discountAmount: number;
|
|
8
|
+
};
|
|
5
9
|
providerLabel: string;
|
|
6
10
|
providerLogoUrl?: string;
|
|
7
11
|
planName?: string | null;
|
|
@@ -10,6 +14,7 @@ export type InsuranceSummaryOverviewProps = {
|
|
|
10
14
|
trip: {
|
|
11
15
|
policyTypeLabel: string;
|
|
12
16
|
travelTypeLabel: string;
|
|
17
|
+
destinationOrRouteLabel?: string;
|
|
13
18
|
destinationLabel: string;
|
|
14
19
|
insuranceTypeLabel: string;
|
|
15
20
|
tripStart?: Date | string | null;
|
|
@@ -18,4 +23,4 @@ export type InsuranceSummaryOverviewProps = {
|
|
|
18
23
|
travellersCount?: number | null;
|
|
19
24
|
};
|
|
20
25
|
};
|
|
21
|
-
export declare const InsuranceSummaryOverview: ({
|
|
26
|
+
export declare const InsuranceSummaryOverview: ({ summary, trip }: InsuranceSummaryOverviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Control } from 'react-hook-form';
|
|
2
|
+
import { InsuranceTypeAndPeopleCountValues } from './types';
|
|
3
|
+
/** Props: control must have fields insuranceType, adultsCount, teenagerCount, childrenCount. */
|
|
4
|
+
interface InsuranceTypeAndPeopleCountFieldsProps {
|
|
5
|
+
control: Control<InsuranceTypeAndPeopleCountValues>;
|
|
6
|
+
setValue?: (name: keyof InsuranceTypeAndPeopleCountValues, value: number) => void;
|
|
7
|
+
showFamilyNote?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const InsuranceTypeAndPeopleCountFields: ({ control, setValue, showFamilyNote, }: InsuranceTypeAndPeopleCountFieldsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InsuranceQuoteInsured, PolicyInsured } from '../../types/insurance-transaction.dto';
|
|
2
|
+
type Props = {
|
|
3
|
+
insureds: (PolicyInsured | InsuranceQuoteInsured)[];
|
|
4
|
+
};
|
|
5
|
+
export declare const InsuredTravelersTable: ({ insureds }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface MotorInsuranceApprovalContentProps {
|
|
2
|
+
publicId: string;
|
|
3
|
+
backLink?: {
|
|
4
|
+
label: string;
|
|
5
|
+
path: string;
|
|
6
|
+
};
|
|
7
|
+
isGuest?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const MotorInsuranceApprovalContent: ({ publicId, backLink, isGuest, }: MotorInsuranceApprovalContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Request / response captured for one phase (báo giá or đơn hàng). */
|
|
2
|
+
export type ProviderPhasePayload = {
|
|
3
|
+
providerData?: Record<string, unknown> | null;
|
|
4
|
+
providerResponse?: Record<string, unknown> | null;
|
|
5
|
+
};
|
|
6
|
+
export type ProviderApiDebugModalProps = {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onOpenChange: (open: boolean) => void;
|
|
9
|
+
orderOnly?: boolean;
|
|
10
|
+
quoteProviderData?: Record<string, unknown> | null;
|
|
11
|
+
quoteProviderResponse?: Record<string, unknown> | null;
|
|
12
|
+
orderProviderData?: Record<string, unknown> | null;
|
|
13
|
+
orderProviderResponse?: Record<string, unknown> | null;
|
|
14
|
+
};
|
|
15
|
+
export declare const ProviderApiDebugModal: ({ open, onOpenChange, orderOnly, quoteProviderData, quoteProviderResponse, orderProviderData, orderProviderResponse, }: ProviderApiDebugModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export type ProviderApiDebugButtonProps = Omit<ProviderApiDebugModalProps, 'open' | 'onOpenChange'>;
|
|
17
|
+
export declare const ProviderApiDebugButton: ({ orderOnly, quoteProviderData, quoteProviderResponse, orderProviderData, orderProviderResponse, }: ProviderApiDebugButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
interface SimpleDetailProps {
|
|
3
3
|
label: string;
|
|
4
4
|
value?: string | ReactNode | null;
|
|
5
|
+
labelColumnMinW?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare const SimpleDetail: ({ label, value }: SimpleDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const SimpleDetail: ({ label, value, labelColumnMinW }: SimpleDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { ETravelScope } from '../../types/insurance';
|
|
3
|
+
import { EOrderPaymentType, EPaymentMethod } from '../../types/enum';
|
|
4
|
+
export interface StepFourPaymentProps {
|
|
5
|
+
travelScope: ETravelScope;
|
|
4
6
|
travelPlan: TravelPlanFormValues;
|
|
5
7
|
selectedPlan: CoveragePlanPremium | null;
|
|
6
8
|
buyerInfo: BuyerFormValues | null;
|
|
7
9
|
insuredPeople: InsuredPerson[];
|
|
8
10
|
onBack?: () => void;
|
|
9
|
-
onPayment?: (
|
|
11
|
+
onPayment?: (args: {
|
|
12
|
+
paymentMode?: EPaymentMethod;
|
|
13
|
+
paymentType: EOrderPaymentType;
|
|
14
|
+
}) => void;
|
|
10
15
|
isProcessing?: boolean;
|
|
11
16
|
onPremiumUpdate?: (premium: CoveragePlanPremium['premium'] | null) => void;
|
|
17
|
+
onCouponChange?: (coupon: {
|
|
18
|
+
code: string;
|
|
19
|
+
discountAmount: number;
|
|
20
|
+
finalAmount: number;
|
|
21
|
+
description?: string | null;
|
|
22
|
+
} | null) => void;
|
|
23
|
+
paymentType?: EOrderPaymentType;
|
|
24
|
+
isAdminMode?: boolean;
|
|
25
|
+
waitForApproval?: boolean;
|
|
26
|
+
onWaitForApprovalChange?: (value: boolean) => void;
|
|
27
|
+
hasSelectedUser?: boolean;
|
|
28
|
+
submitLabel?: string;
|
|
29
|
+
showApprovalToggle?: boolean;
|
|
30
|
+
mode?: 'create' | 'edit';
|
|
31
|
+
selectedUserTenantId?: number;
|
|
32
|
+
selectedUserId?: number;
|
|
33
|
+
initialCoupon?: {
|
|
34
|
+
code: string;
|
|
35
|
+
discountAmount: number;
|
|
36
|
+
finalAmount: number;
|
|
37
|
+
description?: string | null;
|
|
38
|
+
} | null;
|
|
39
|
+
prefillCouponCode?: string;
|
|
12
40
|
}
|
|
13
|
-
export declare const StepFourPayment: ({ travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
41
|
+
export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, paymentType: paymentTypeProp, isAdminMode, waitForApproval, onWaitForApprovalChange, hasSelectedUser, submitLabel, showApprovalToggle, mode, selectedUserTenantId, selectedUserId, initialCoupon, prefillCouponCode, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { Control } from 'react-hook-form';
|
|
2
|
-
import { TravelPlanFormValues } from './types';
|
|
2
|
+
import { TravelPlanFormValues, CoveragePlanPremium, InsuranceTypeAndPeopleCountValues } from './types';
|
|
3
3
|
interface StepOneFormProps {
|
|
4
4
|
control: Control<TravelPlanFormValues>;
|
|
5
5
|
tripStart: Date | null;
|
|
6
6
|
tripEnd: Date | null;
|
|
7
7
|
setValue: (name: keyof TravelPlanFormValues, value: any) => void;
|
|
8
|
+
isDomestic?: boolean;
|
|
9
|
+
onQuickPlanSelect?: (plan: CoveragePlanPremium, countryId: number, values: InsuranceTypeAndPeopleCountValues) => void;
|
|
10
|
+
recommendBoxHeight?: string;
|
|
11
|
+
onBack?: () => void;
|
|
12
|
+
onNext?: () => void;
|
|
13
|
+
isSubmitting?: boolean;
|
|
14
|
+
isStepOneReady?: boolean;
|
|
15
|
+
isGuest?: boolean;
|
|
16
|
+
showQuickRecommendations?: boolean;
|
|
8
17
|
}
|
|
9
|
-
export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, isDomestic, onQuickPlanSelect, recommendBoxHeight, onBack, onNext, isSubmitting, isStepOneReady, isGuest, showQuickRecommendations, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
19
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Control } from 'react-hook-form';
|
|
2
|
+
import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
|
|
3
|
+
import { EInsuranceProviderType, EInsuranceType } from '../../types/insurance';
|
|
4
|
+
interface StepThreeProps {
|
|
5
|
+
control: Control<TravelPlanFormValues>;
|
|
6
|
+
tripStart: Date | null;
|
|
7
|
+
tripEnd: Date | null;
|
|
8
|
+
stepThreeChildStep: number;
|
|
9
|
+
onStepThreeChildStepClick: (step: number) => void;
|
|
10
|
+
selectedPlan: CoveragePlanPremium | null;
|
|
11
|
+
buyerInfo: BuyerFormValues | null;
|
|
12
|
+
insuredPeople: InsuredPerson[];
|
|
13
|
+
insuranceType: EInsuranceType;
|
|
14
|
+
adultsCount: number | null;
|
|
15
|
+
teenagersCount: number | null;
|
|
16
|
+
childrenCount: number | null;
|
|
17
|
+
isDomestic: boolean;
|
|
18
|
+
selectedProvider?: EInsuranceProviderType;
|
|
19
|
+
onBuyerInfoSubmit: (data: BuyerFormValues) => void;
|
|
20
|
+
onInsuredPeopleSubmit: (people: InsuredPerson[]) => void;
|
|
21
|
+
onStepThreeBack: () => void;
|
|
22
|
+
onDatesChange?: (startDate: Date | null, endDate: Date | null) => void;
|
|
23
|
+
buyerInfoFormRef: React.RefObject<HTMLFormElement | null>;
|
|
24
|
+
insuredPeopleFormRef: React.RefObject<HTMLFormElement | null>;
|
|
25
|
+
onInsuredPeopleListUpdate?: (people: InsuredPerson[]) => void;
|
|
26
|
+
insuredPeopleSnapshotRef?: React.MutableRefObject<(() => InsuredPerson[]) | null>;
|
|
27
|
+
}
|
|
28
|
+
export declare const StepThree: ({ control, tripStart, tripEnd, stepThreeChildStep, onStepThreeChildStepClick, selectedPlan, buyerInfo, insuredPeople, insuranceType, adultsCount, teenagersCount, childrenCount, isDomestic, selectedProvider, onBuyerInfoSubmit, onInsuredPeopleSubmit, onStepThreeBack, onDatesChange, buyerInfoFormRef, insuredPeopleFormRef, onInsuredPeopleListUpdate, insuredPeopleSnapshotRef, }: StepThreeProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { EInsuranceProviderType } from '../../types/insurance';
|
|
1
2
|
import { BuyerFormValues } from './types';
|
|
2
3
|
interface StepThreeBuyerInfoProps {
|
|
3
4
|
initialValues?: Partial<BuyerFormValues>;
|
|
4
5
|
onSubmit: (values: BuyerFormValues) => void;
|
|
5
6
|
onBack: () => void;
|
|
6
7
|
onFormRef?: (form: HTMLFormElement | null) => void;
|
|
8
|
+
isDomestic?: boolean;
|
|
9
|
+
selectedProvider?: EInsuranceProviderType;
|
|
7
10
|
}
|
|
8
|
-
export declare const StepThreeBuyerInfo: ({ initialValues, onSubmit, onBack: _onBack, onFormRef, }: StepThreeBuyerInfoProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const StepThreeBuyerInfo: ({ initialValues, onSubmit, onBack: _onBack, onFormRef, isDomestic, selectedProvider, }: StepThreeBuyerInfoProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
12
|
export {};
|
|
@@ -4,7 +4,9 @@ interface StepThreeInsuredPeopleProps {
|
|
|
4
4
|
initialPeople: InsuredPerson[];
|
|
5
5
|
insuranceType: EInsuranceType;
|
|
6
6
|
adultsCount: number;
|
|
7
|
+
teenagersCount: number;
|
|
7
8
|
childrenCount: number;
|
|
9
|
+
isDomestic: boolean;
|
|
8
10
|
providerCode?: string | null;
|
|
9
11
|
buyerInfo?: {
|
|
10
12
|
isInsuredPerson?: boolean;
|
|
@@ -12,6 +14,7 @@ interface StepThreeInsuredPeopleProps {
|
|
|
12
14
|
onSubmit: (people: InsuredPerson[]) => void;
|
|
13
15
|
onBack: () => void;
|
|
14
16
|
onFormRef?: (form: HTMLFormElement | null) => void;
|
|
17
|
+
insuredPeopleSnapshotRef?: React.MutableRefObject<(() => InsuredPerson[]) | null>;
|
|
15
18
|
}
|
|
16
|
-
export declare const StepThreeInsuredPeople: ({ initialPeople,
|
|
19
|
+
export declare const StepThreeInsuredPeople: ({ initialPeople, isDomestic, providerCode, buyerInfo, onSubmit, onFormRef, insuredPeopleSnapshotRef, }: StepThreeInsuredPeopleProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
20
|
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FieldValues, UseFormSetValue } from 'react-hook-form';
|
|
2
|
+
import { DocumentScanResult } from '../../hooks/useDocumentScan';
|
|
3
|
+
export type CountryOption = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export type ProvinceOption = {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
type AutofillFieldPaths = {
|
|
12
|
+
fullName: any;
|
|
13
|
+
idType: any;
|
|
14
|
+
idNumber: any;
|
|
15
|
+
dateOfBirth: any;
|
|
16
|
+
gender: any;
|
|
17
|
+
nationality: any;
|
|
18
|
+
countryId?: any;
|
|
19
|
+
address?: any;
|
|
20
|
+
stateId?: any;
|
|
21
|
+
};
|
|
22
|
+
type AutofillHelpers = {
|
|
23
|
+
formatDateToYYYYMMDD: (dateStr: string | undefined) => string;
|
|
24
|
+
findCountryIdByNationality: (nationality: string | undefined, countryOptions: Array<{
|
|
25
|
+
value: string;
|
|
26
|
+
label: string;
|
|
27
|
+
}>) => number | null;
|
|
28
|
+
};
|
|
29
|
+
export declare function applyDocumentScanAutofillToRHF<TFieldValues extends FieldValues>({ setValue, data, fields, countryOptions, provinceOptions, helpers, }: {
|
|
30
|
+
setValue: UseFormSetValue<TFieldValues>;
|
|
31
|
+
data: DocumentScanResult;
|
|
32
|
+
fields: AutofillFieldPaths;
|
|
33
|
+
countryOptions: CountryOption[];
|
|
34
|
+
provinceOptions?: ProvinceOption[];
|
|
35
|
+
helpers: AutofillHelpers;
|
|
36
|
+
}): void;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InsuredPerson } from './types';
|
|
2
|
+
export type ParseInsuredExcelResult = {
|
|
3
|
+
ok: true;
|
|
4
|
+
people: InsuredPerson[];
|
|
5
|
+
skippedRows: number;
|
|
6
|
+
} | {
|
|
7
|
+
ok: false;
|
|
8
|
+
error: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Parse insured list from Excel (first sheet). Finds header row where column A is "STT".
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseInsuredPeopleFromExcelBuffer(buffer: ArrayBuffer): ParseInsuredExcelResult;
|