gotrip-fx-transaction-form 1.0.192-dev → 1.0.192
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 +51207 -40767
- 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/ApprovalStatusBadge.d.ts +7 -0
- package/types/components/Apps/EmbededIndividualApp.d.ts +3 -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/Department/DepartmentCard.d.ts +3 -1
- package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +23 -5
- package/types/components/Insurance/DateRangePicker.d.ts +12 -0
- package/types/components/Insurance/InsuranceContentRenderer/DynamicRenderer.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/AccordionBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ActionButtonBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ContainerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DataRowBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DividerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ListGroupBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/TextBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/types.d.ts +64 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/richText.d.ts +14 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/styleMapper.d.ts +6 -0
- package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanFilter.d.ts +12 -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/InsurancePlans/index.d.ts +1 -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/ProviderApiDebugDialog.d.ts +17 -0
- package/types/components/Insurance/SimpleDetail.d.ts +2 -1
- package/types/components/Insurance/StepFourPayment.d.ts +25 -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/StepTwoPlans.d.ts +9 -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 +22 -5
- package/types/components/Insurance/validationUtils.d.ts +7 -1
- package/types/components/Modal/CancelTransactionModal.d.ts +1 -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/Modal/UpdateTenantCommissionInputCell.d.ts +14 -13
- 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 +26 -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 +30 -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/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/CommissionPolicyGroupFormDialog.d.ts +16 -0
- package/types/components/PolicyGroup/CommissionPolicyGroupListView.d.ts +11 -0
- package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
- package/types/components/PolicyGroup/PolicyRulesEditor.d.ts +54 -0
- package/types/components/PolicyGroup/PolicyTypes.d.ts +41 -0
- package/types/components/PolicyGroup/PricingPolicyListView.d.ts +11 -0
- package/types/components/StepIndicator/StepIndicatorHorizontal.d.ts +2 -1
- package/types/constants/api-urls.d.ts +63 -6
- package/types/constants/business-codes.d.ts +2 -1
- package/types/constants/commission-policy-constants.d.ts +5 -0
- package/types/constants/env.d.ts +2 -0
- package/types/constants/policy-enums.d.ts +18 -1
- package/types/constants/regex.d.ts +4 -0
- package/types/embeded-main.d.ts +1 -0
- package/types/hooks/fetchEsimTransaction.d.ts +2 -0
- package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
- package/types/hooks/useAdminDashboard.d.ts +19 -0
- package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
- package/types/hooks/useComissionPolicies.d.ts +6 -6
- package/types/hooks/useCoupon.d.ts +95 -0
- package/types/hooks/useCouponValidation.d.ts +29 -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 +34 -4
- package/types/hooks/useLocationData.d.ts +22 -0
- package/types/hooks/useMotorInsurance.d.ts +17 -0
- package/types/hooks/useMotorInsuranceTransaction.d.ts +124 -0
- package/types/hooks/useMotorQuote.d.ts +15 -0
- package/types/hooks/useNotifications.d.ts +10 -0
- package/types/hooks/usePolicyGroups.d.ts +17 -1
- package/types/hooks/useTenantList.d.ts +5 -4
- package/types/hooks/useUserById.d.ts +7 -0
- package/types/hooks/useUserList.d.ts +3 -1
- 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/fx-commission-policy/FxCommissionPolicyManagement.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 +1 -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 +1 -0
- package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/guest/insurance-create.d.ts +8 -1
- package/types/pages/guest/motor-insurance-create.d.ts +6 -0
- package/types/providers/AppSettingsProvider.d.ts +1 -0
- package/types/store/useNotificationStore.d.ts +16 -0
- package/types/store/useTenantStore.d.ts +12 -0
- package/types/store/useTrackingStore.d.ts +8 -0
- package/types/types/app-settings.d.ts +13 -1
- package/types/types/coupon.d.ts +70 -0
- package/types/types/enum.d.ts +14 -1
- package/types/types/insurance-transaction.dto.d.ts +21 -1
- package/types/types/insurance.d.ts +19 -2
- package/types/types/notification.d.ts +23 -0
- package/types/types/response.dto.d.ts +78 -8
- package/types/types/sdk.d.ts +5 -1
- package/types/types/tracking.dto.d.ts +19 -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 +13 -0
- package/types/util/sim-display.d.ts +2 -0
- package/types/util/tracking.d.ts +29 -0
- package/types/util/transaction.util.d.ts +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IUser } from '../../../types/response.dto';
|
|
2
|
+
import { EMotorProvider } from '../motor-insurance.types';
|
|
3
|
+
export interface CreateCarInsuranceFormProps {
|
|
4
|
+
storageKey: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
onSuccess?: (transactionData: unknown) => void;
|
|
8
|
+
scrollable?: boolean;
|
|
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>;
|
|
16
|
+
}
|
|
17
|
+
export declare const CreateCarInsuranceForm: ({ storageKey, title, onBack, onSuccess, scrollable, allowedProviders, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateCarInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EVehicleTypeCode, EVehicleUsageType } from '../motor-insurance.types';
|
|
2
|
+
/** Manufacturing year range: from this year to current year. */
|
|
3
|
+
export declare const MANUFACTURING_YEAR_MIN = 2007;
|
|
4
|
+
export declare const SEAT_COUNT_OPTIONS: readonly [4, 5, 7, 9, 16, 24, 45];
|
|
5
|
+
/** Usage purpose options (mục đích sử dụng) – EVehicleUsageType. */
|
|
6
|
+
export declare const USAGE_PURPOSE_OPTIONS: {
|
|
7
|
+
value: EVehicleUsageType;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
/** Vehicle type code options (loại vận chuyển đặc biệt) by purpose + usage. */
|
|
11
|
+
export type VehicleTypeCodeOption = {
|
|
12
|
+
value: EVehicleTypeCode;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function getVehicleTypeCodeOptions(isCommercialUse: boolean, usagePurposeCode: EVehicleUsageType | null): VehicleTypeCodeOption[];
|
|
16
|
+
/** Seat and load capacity bounds by usage + vehicle type (from business rules). */
|
|
17
|
+
export type SeatLoadBounds = {
|
|
18
|
+
seatMin: number;
|
|
19
|
+
seatMax: number;
|
|
20
|
+
loadMin?: number;
|
|
21
|
+
loadMax?: number;
|
|
22
|
+
};
|
|
23
|
+
export declare function getSeatAndLoadBounds(usagePurposeCode: EVehicleUsageType | null, vehicleTypeCode: EVehicleTypeCode | null): SeatLoadBounds;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CarPremiumSummary } from './CarPremiumSummary';
|
|
2
|
+
export { CarStepOneForm } from './CarStepOneForm';
|
|
3
|
+
export { CarStepTwoPlan } from './CarStepTwoPlan';
|
|
4
|
+
export { CarStepThreeInfo } from './CarStepThreeInfo';
|
|
5
|
+
export { CarStepFourPayment } from './CarStepFourPayment';
|
|
6
|
+
export { CreateCarInsuranceForm } from './CreateCarInsuranceForm';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EMotorVehicleType } from './motor-insurance.types';
|
|
2
|
+
import { IUser } from '../../types/response.dto';
|
|
3
|
+
export interface CreateMotorInsuranceTransactionFormProps {
|
|
4
|
+
vehicleType: EMotorVehicleType;
|
|
5
|
+
storageKey: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
onBack?: () => void;
|
|
8
|
+
onSuccess?: (transactionData: unknown) => void;
|
|
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>;
|
|
16
|
+
}
|
|
17
|
+
export declare const CreateMotorInsuranceTransactionForm: ({ vehicleType, storageKey, title, onBack, onSuccess, scrollable, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateMotorInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DocumentUploadPreviewProps {
|
|
2
|
+
label: string;
|
|
3
|
+
scanningLabel?: string;
|
|
4
|
+
icon: React.ElementType;
|
|
5
|
+
isScanning: boolean;
|
|
6
|
+
file: File | null;
|
|
7
|
+
/** Data URL restored from storage when no File object is available (e.g. after page reload) */
|
|
8
|
+
persistedPreviewUrl?: string | null;
|
|
9
|
+
scanError?: string | null;
|
|
10
|
+
accept?: string;
|
|
11
|
+
onFileSelect: (file: File) => void;
|
|
12
|
+
onRemove: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const DocumentUploadPreview: ({ label, scanningLabel, icon, isScanning, file, persistedPreviewUrl, scanError, accept, onFileSelect, onRemove, }: DocumentUploadPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type StoredImageData = {
|
|
2
|
+
dataUrl?: string | null;
|
|
3
|
+
gcsUrl?: string | null;
|
|
4
|
+
};
|
|
5
|
+
export type ImageCaptureData = {
|
|
6
|
+
dataUrl: string;
|
|
7
|
+
gcsUrl?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const normalizeStoredImageData: (value: unknown) => {
|
|
10
|
+
previewUrl: string | null;
|
|
11
|
+
gcsUrl: string | null;
|
|
12
|
+
};
|
|
13
|
+
export declare const buildStoredImageData: (imageData: ImageCaptureData) => StoredImageData;
|
|
14
|
+
export declare const buildPreviewDataUrlForStorage: (file: File, options?: {
|
|
15
|
+
maxDimension?: number;
|
|
16
|
+
jpegQuality?: number;
|
|
17
|
+
}) => Promise<string>;
|
|
18
|
+
export declare const resolveImageUrlForPayload: (gcsUrl: string | null, previewUrl: string | null) => string | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { BikePremiumSummary, BikeStepOneForm, BikeStepTwoVehicleInfo, CreateBikeInsuranceForm, } from './Bike';
|
|
2
|
+
export { CarPremiumSummary, CarStepOneForm, CreateCarInsuranceForm } from './Car';
|
|
3
|
+
export { CreateMotorInsuranceTransactionForm } from './CreateMotorInsuranceTransactionForm';
|
|
4
|
+
export * from './motor-insurance.types';
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { Control, UseFormSetValue } from 'react-hook-form';
|
|
2
|
+
import { EPaymentMethod, EOrderPaymentType } from '../../types/enum';
|
|
3
|
+
import { EInsuranceProviderType } from '../../types/insurance';
|
|
4
|
+
export declare enum EMotorVehicleType {
|
|
5
|
+
BIKE = "bike",
|
|
6
|
+
CAR = "car"
|
|
7
|
+
}
|
|
8
|
+
export declare enum EBikeVehicleType {
|
|
9
|
+
UNDER_50CC = "under_50cc",
|
|
10
|
+
OVER_50CC = "over_50cc",
|
|
11
|
+
THREE_WHEEL = "three_wheel"
|
|
12
|
+
}
|
|
13
|
+
export declare enum EBikeEngineCategory {
|
|
14
|
+
BELOW_50CC = "BL50",
|
|
15
|
+
ABOVE_50CC = "AB50",
|
|
16
|
+
ELECTRIC = "ELEC",
|
|
17
|
+
THREE_WHEEL = "3WHL",
|
|
18
|
+
SIMILAR_MOTOR = "SIM"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Purpose code.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum EPurposeTypeCode {
|
|
24
|
+
BUSINESS = "BUSINESS",
|
|
25
|
+
NON_BUSINESS = "NON_BUSINESS"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Vehicle usage type enum.
|
|
29
|
+
*/
|
|
30
|
+
export declare enum EVehicleUsageType {
|
|
31
|
+
PASSENGER = "PASSENGER",
|
|
32
|
+
CARGO = "CARGO",
|
|
33
|
+
PASSENGER_CARGO = "PASSENGER_CARGO",
|
|
34
|
+
SPECIAL_PURPOSE = "SPECIAL_PURPOSE"
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* High-level vehicle type enum.
|
|
38
|
+
*/
|
|
39
|
+
export declare enum EVehicleTypeCode {
|
|
40
|
+
PASSENGER_STANDARD = "PASSENGER_STANDARD",
|
|
41
|
+
DRIVING_TRAINING = "DRIVING_TRAINING",
|
|
42
|
+
TRACTOR_HEAD = "TRACTOR_HEAD",
|
|
43
|
+
AMBULANCE = "AMBULANCE",
|
|
44
|
+
MONEY_TRUCK = "MONEY_TRUCK",
|
|
45
|
+
TRACTOR = "TRACTOR",
|
|
46
|
+
OTHER_SPECIAL_CAR = "OTHER_SPECIAL_CAR",
|
|
47
|
+
TAXI = "TAXI",
|
|
48
|
+
BUS = "BUS",
|
|
49
|
+
CARGO_STANDARD = "CARGO_STANDARD"
|
|
50
|
+
}
|
|
51
|
+
export type EMotorProvider = EInsuranceProviderType.PVI | EInsuranceProviderType.MIC;
|
|
52
|
+
export type MotorPlanFormValues = {
|
|
53
|
+
vehicleType: EBikeVehicleType;
|
|
54
|
+
durationYears: 1 | 2 | 3;
|
|
55
|
+
startDate: Date | null;
|
|
56
|
+
endDate: Date | null;
|
|
57
|
+
provider: EMotorProvider;
|
|
58
|
+
passengerAccidentEnabled: boolean;
|
|
59
|
+
passengerAccidentLevel: number;
|
|
60
|
+
passengerAccidentCount: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* DTO for bike quote API (aligned with backend BikeQuoteRequest).
|
|
64
|
+
*/
|
|
65
|
+
export interface BikeQuoteRequestDto {
|
|
66
|
+
/** Coverage start date, format yyyy-MM-dd */
|
|
67
|
+
startDate: string;
|
|
68
|
+
/** Coverage end date, format yyyy-MM-dd */
|
|
69
|
+
endDate: string;
|
|
70
|
+
vehicleTypeCode: EBikeEngineCategory;
|
|
71
|
+
occupantAccidentSumInsured?: number;
|
|
72
|
+
insuredOccupantCount?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* DTO for bike quote response.
|
|
76
|
+
*/
|
|
77
|
+
export interface BikeQuoteResponseDto {
|
|
78
|
+
success: boolean;
|
|
79
|
+
totalPremium?: number;
|
|
80
|
+
mandatoryPremium?: number;
|
|
81
|
+
tax?: number;
|
|
82
|
+
occupantAccidentPremium?: number;
|
|
83
|
+
error?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* DTO for creating bike policy/certificate (BikePolicyRequest).
|
|
87
|
+
*/
|
|
88
|
+
export interface BikePolicyRequestDto {
|
|
89
|
+
/** Start date, yyyy-MM-dd or dd/MM/yyyy depending on provider */
|
|
90
|
+
startDate: string;
|
|
91
|
+
endDate: string;
|
|
92
|
+
ownerName: string;
|
|
93
|
+
ownerAddress: string;
|
|
94
|
+
customerEmail: string;
|
|
95
|
+
phoneNumber?: string;
|
|
96
|
+
licensePlate: string;
|
|
97
|
+
engineNumber: string;
|
|
98
|
+
chassisNumber: string;
|
|
99
|
+
vehicleTypeCode: EBikeEngineCategory;
|
|
100
|
+
brand?: string;
|
|
101
|
+
manufacturingYear?: string;
|
|
102
|
+
occupantAccidentSumInsured?: number;
|
|
103
|
+
insuredOccupantCount?: number;
|
|
104
|
+
occupantAccidentPremium?: number;
|
|
105
|
+
totalPremium?: number;
|
|
106
|
+
tax?: number;
|
|
107
|
+
paymentType: EOrderPaymentType;
|
|
108
|
+
paymentMode?: EPaymentMethod;
|
|
109
|
+
vehicleRegImageUrl?: string;
|
|
110
|
+
idCardImageUrl?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* DTO for bike policy response (BikePolicyResponse).
|
|
114
|
+
* Includes extra info used for displaying result / QR code.
|
|
115
|
+
*/
|
|
116
|
+
export interface BikePolicyResponseDto {
|
|
117
|
+
policyId?: number | string;
|
|
118
|
+
policyNumber?: string;
|
|
119
|
+
transactionPublicId?: string;
|
|
120
|
+
orderId?: number;
|
|
121
|
+
qrCodeUrl?: string;
|
|
122
|
+
totalAmount?: number;
|
|
123
|
+
status?: string;
|
|
124
|
+
error?: string;
|
|
125
|
+
}
|
|
126
|
+
export type VehicleInfoFormValues = {
|
|
127
|
+
ownerFullName: string;
|
|
128
|
+
ownerAddress: string;
|
|
129
|
+
ownerIdNumber: string;
|
|
130
|
+
hasLicensePlate: boolean;
|
|
131
|
+
licensePlate: string;
|
|
132
|
+
chassisNumber: string;
|
|
133
|
+
engineNumber: string;
|
|
134
|
+
certificatePhone: string;
|
|
135
|
+
certificateEmail: string;
|
|
136
|
+
};
|
|
137
|
+
/** Insurance owner type: individual or company */
|
|
138
|
+
export declare enum EOwnerType {
|
|
139
|
+
INDIVIDUAL = "individual",
|
|
140
|
+
COMPANY = "company"
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Vehicle info for car policies extends the shared motor vehicle info
|
|
144
|
+
* with optional car-only attributes that may be required by providers.
|
|
145
|
+
*/
|
|
146
|
+
export type CarVehicleInfoFormValues = VehicleInfoFormValues & {
|
|
147
|
+
/** Manufacturing year as string (for exact provider mapping if needed) */
|
|
148
|
+
manufacturingYearText?: string;
|
|
149
|
+
/** Years in use */
|
|
150
|
+
yearInUse?: number | null;
|
|
151
|
+
/** Owner type: individual (name, idNumber) or company (companyName, taxNumber) */
|
|
152
|
+
ownerType?: EOwnerType | string;
|
|
153
|
+
/** Company name (when ownerType is company) */
|
|
154
|
+
companyName?: string;
|
|
155
|
+
/** Company tax number (when ownerType is company) */
|
|
156
|
+
companyTaxNumber?: string;
|
|
157
|
+
/** Province/state ID for address */
|
|
158
|
+
stateId?: number | null;
|
|
159
|
+
/** Ward/commune ID for address */
|
|
160
|
+
wardId?: number | null;
|
|
161
|
+
/** Whether user wants hard copy certificate */
|
|
162
|
+
hardCopyEnabled?: boolean;
|
|
163
|
+
/** Address to receive hard copy certificate (when hardCopyEnabled is true) */
|
|
164
|
+
receiveAddress?: string;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Car-specific plan values used across the car motor insurance wizard.
|
|
168
|
+
*
|
|
169
|
+
* Step 1 captures vehicle configuration (manufacturing year, purpose, seats, ...),
|
|
170
|
+
* Step 2 adds provider + duration + effective dates, and optional passenger accident cover.
|
|
171
|
+
*
|
|
172
|
+
* These fields are intentionally generic so they can be mapped to different
|
|
173
|
+
* provider DTOs on the backend (purpose codes, special transport flags, etc.).
|
|
174
|
+
*/
|
|
175
|
+
export type CarPlanFormValues = {
|
|
176
|
+
/** Manufacturing year */
|
|
177
|
+
manufacturingYear: number | null;
|
|
178
|
+
/** Whether the car is used for commercial transport */
|
|
179
|
+
isCommercialUse: boolean;
|
|
180
|
+
/** Usage purpose code (from API) */
|
|
181
|
+
usagePurposeCode: EVehicleUsageType | null;
|
|
182
|
+
/** Vehicle type code – sub of purpose + usage (EVehicleTypeCode). */
|
|
183
|
+
vehicleTypeCode: EVehicleTypeCode | null;
|
|
184
|
+
/** Number of seats (1–45) */
|
|
185
|
+
seatCount: number | null;
|
|
186
|
+
/** Load capacity in tons; required when usage is cargo (Chở hàng) */
|
|
187
|
+
loadCapacity: number | null;
|
|
188
|
+
/** Insurance duration in years */
|
|
189
|
+
durationYears: 1 | 2 | 3;
|
|
190
|
+
/** Coverage start date */
|
|
191
|
+
startDate: Date | null;
|
|
192
|
+
/** Coverage end date */
|
|
193
|
+
endDate: Date | null;
|
|
194
|
+
/** Insurance provider */
|
|
195
|
+
provider: EMotorProvider;
|
|
196
|
+
/** Enable/disable passenger accident coverage */
|
|
197
|
+
passengerAccidentEnabled: boolean;
|
|
198
|
+
/** Passenger accident sum insured per person per accident */
|
|
199
|
+
passengerAccidentLevel: number;
|
|
200
|
+
/** Number of passengers covered for accident */
|
|
201
|
+
passengerAccidentCount: number;
|
|
202
|
+
};
|
|
203
|
+
export type MotorPremiumSummary = {
|
|
204
|
+
mandatoryPremium: number;
|
|
205
|
+
tax: number;
|
|
206
|
+
passengerAccidentPremium: number;
|
|
207
|
+
passengerAccidentLevel: number;
|
|
208
|
+
passengerAccidentPeopleCount: number;
|
|
209
|
+
totalPremium: number;
|
|
210
|
+
};
|
|
211
|
+
/** Alias for readability when working with car flows. */
|
|
212
|
+
export type CarPremiumSummary = MotorPremiumSummary;
|
|
213
|
+
/**
|
|
214
|
+
* DTO for car quote API (aligned with backend MotorCreateQuoteRequestCar / TESTING_MOTOR_INSURANCE.md).
|
|
215
|
+
*/
|
|
216
|
+
export interface CarQuoteRequestDto {
|
|
217
|
+
/** Coverage start date, format yyyy-MM-dd */
|
|
218
|
+
startDate: string;
|
|
219
|
+
/** Coverage end date, format yyyy-MM-dd */
|
|
220
|
+
endDate: string;
|
|
221
|
+
purposeTypeCode: EPurposeTypeCode;
|
|
222
|
+
vehicleUsageType: EVehicleUsageType;
|
|
223
|
+
vehicleTypeCode: EVehicleTypeCode;
|
|
224
|
+
/** Number of seats */
|
|
225
|
+
numberOfSeats: number;
|
|
226
|
+
/** Load capacity in tons */
|
|
227
|
+
loadCapacity?: number;
|
|
228
|
+
/** Passenger accident sum insured */
|
|
229
|
+
occupantAccidentSumInsured?: number;
|
|
230
|
+
/** Number of passengers covered for accident */
|
|
231
|
+
insuredOccupantCount?: number;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* DTO for car quote response (MotorCreateQuoteResponse).
|
|
235
|
+
*/
|
|
236
|
+
export interface CarQuoteResponseDto {
|
|
237
|
+
success: boolean;
|
|
238
|
+
totalPremium?: number;
|
|
239
|
+
mandatoryPremium?: number;
|
|
240
|
+
tax?: number;
|
|
241
|
+
occupantAccidentPremium?: number;
|
|
242
|
+
vehicleTypeCode?: string;
|
|
243
|
+
error?: string;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* DTO for creating car policy/certificate (aligned with MotorCreatePolicyRequestCar).
|
|
247
|
+
*/
|
|
248
|
+
export interface CarPolicyRequestDto {
|
|
249
|
+
totalPremium: number;
|
|
250
|
+
/** Coverage start date, format yyyy-MM-dd */
|
|
251
|
+
startDate: string;
|
|
252
|
+
/** Coverage end date, format yyyy-MM-dd */
|
|
253
|
+
endDate: string;
|
|
254
|
+
ownerName: string;
|
|
255
|
+
ownerAddress: string;
|
|
256
|
+
/** Contact/buyer name: ownerName (individual) or companyName (company) */
|
|
257
|
+
customerName: string;
|
|
258
|
+
customerAddress?: string;
|
|
259
|
+
ownerType?: EOwnerType | string;
|
|
260
|
+
ownerIdNumber?: string;
|
|
261
|
+
companyName?: string;
|
|
262
|
+
companyTaxNumber?: string;
|
|
263
|
+
hardCopyEnabled?: boolean;
|
|
264
|
+
receiveAddress?: string;
|
|
265
|
+
stateId?: number | null;
|
|
266
|
+
wardId?: number | null;
|
|
267
|
+
customerEmail: string;
|
|
268
|
+
phoneNumber?: string;
|
|
269
|
+
purposeTypeCode: EPurposeTypeCode;
|
|
270
|
+
vehicleUsageType: EVehicleUsageType;
|
|
271
|
+
vehicleTypeCode: EVehicleTypeCode;
|
|
272
|
+
numberOfSeats: number;
|
|
273
|
+
/** Load capacity in tons */
|
|
274
|
+
loadCapacity?: number;
|
|
275
|
+
licensePlate: string;
|
|
276
|
+
chassisNumber: string;
|
|
277
|
+
engineNumber: string;
|
|
278
|
+
mandatoryPremium: number;
|
|
279
|
+
tax?: number;
|
|
280
|
+
occupantAccidentSumInsured?: number;
|
|
281
|
+
insuredOccupantCount?: number;
|
|
282
|
+
occupantAccidentPremium?: number;
|
|
283
|
+
manufacturingYear?: string;
|
|
284
|
+
yearInUse?: string;
|
|
285
|
+
brand?: string;
|
|
286
|
+
model?: string;
|
|
287
|
+
hideLicensePlate?: boolean;
|
|
288
|
+
hidePremium?: boolean;
|
|
289
|
+
paymentType: EOrderPaymentType;
|
|
290
|
+
paymentMode?: EPaymentMethod;
|
|
291
|
+
vehicleRegImageUrl?: string;
|
|
292
|
+
idCardImageUrl?: string;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* DTO for car policy response (MotorCreatePolicyResponse).
|
|
296
|
+
*/
|
|
297
|
+
export interface CarPolicyResponseDto {
|
|
298
|
+
success?: boolean;
|
|
299
|
+
policyId?: number | string;
|
|
300
|
+
policyNumber?: string;
|
|
301
|
+
certificateUrl?: string;
|
|
302
|
+
transactionPublicId?: string;
|
|
303
|
+
qrCodeUrl?: string;
|
|
304
|
+
totalAmount?: number;
|
|
305
|
+
status?: string;
|
|
306
|
+
error?: string;
|
|
307
|
+
}
|
|
308
|
+
export declare const VEHICLE_TYPE_LABELS: Record<EBikeVehicleType, string>;
|
|
309
|
+
export declare const BIKE_VEHICLE_TYPE_CODE_LABELS: Record<string, string>;
|
|
310
|
+
export declare const getBikeVehicleTypeCodeLabel: (code?: string | null) => string;
|
|
311
|
+
/** Car vehicle type code labels (loại vận chuyển đặc biệt) for display. */
|
|
312
|
+
export declare const CAR_VEHICLE_TYPE_CODE_LABELS: Record<string, string>;
|
|
313
|
+
export declare const getVehicleTypeLabel: (vehicleType?: string) => string;
|
|
314
|
+
export declare const getPassengerAccidentLevelLabel: (value?: number | null) => string;
|
|
315
|
+
/** Purpose type (mục đích sử dụng kinh doanh/không kinh doanh) labels. */
|
|
316
|
+
export declare const PURPOSE_TYPE_LABELS: Record<EPurposeTypeCode, string>;
|
|
317
|
+
export declare const getCarPurposeTypeLabel: (code?: string | null) => string;
|
|
318
|
+
/** Usage purpose (mục đích sử dụng) labels for display. */
|
|
319
|
+
export declare const USAGE_PURPOSE_LABELS: Record<EVehicleUsageType, string>;
|
|
320
|
+
export declare const getCarUsagePurposeLabel: (code?: string | null) => string;
|
|
321
|
+
export declare const getCarVehicleTypeCodeLabel: (code?: string | null) => string;
|
|
322
|
+
export declare const getOwnerTypeLabel: (ownerType?: string | null) => string;
|
|
323
|
+
export declare const DURATION_LABELS: Record<1 | 1.5 | 2 | 2.5 | 3, string>;
|
|
324
|
+
export declare const PASSENGER_ACCIDENT_LEVELS: {
|
|
325
|
+
value: number;
|
|
326
|
+
label: string;
|
|
327
|
+
}[];
|
|
328
|
+
export type MotorStepOneFormProps = {
|
|
329
|
+
control: Control<MotorPlanFormValues>;
|
|
330
|
+
setValue: UseFormSetValue<MotorPlanFormValues>;
|
|
331
|
+
premiumSummary?: MotorPremiumSummary;
|
|
332
|
+
onNext: () => void;
|
|
333
|
+
onBack?: () => void;
|
|
334
|
+
isStepReady: boolean;
|
|
335
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Alphanumeric pattern for chassis number */
|
|
2
|
+
export declare const CHASSIS_ALPHANUMERIC_REGEX: RegExp;
|
|
3
|
+
/** Engine number: uppercase letters, digits, hyphen. Len 5-20. */
|
|
4
|
+
export declare const ENGINE_NUMBER_REGEX: RegExp;
|
|
5
|
+
export declare const ENGINE_NUMBER_MIN_LEN = 5;
|
|
6
|
+
export declare const ENGINE_NUMBER_MAX_LEN = 20;
|
|
7
|
+
export declare const CAR_CHASSIS_LEN = 17;
|
|
8
|
+
export declare const BIKE_CHASSIS_MIN_LEN = 12;
|
|
9
|
+
export declare const BIKE_CHASSIS_MAX_LEN = 17;
|
|
10
|
+
/**
|
|
11
|
+
* Validate car chassis number: exactly 17 chars, alphanumeric.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateCarChassisNumber(value: unknown): true | string;
|
|
14
|
+
/**
|
|
15
|
+
* Validate bike chassis number: 12-17 chars, alphanumeric.
|
|
16
|
+
*/
|
|
17
|
+
export declare function validateBikeChassisNumber(value: unknown): true | string;
|
|
18
|
+
/**
|
|
19
|
+
* Validate engine number (car and bike): 5-20 chars, [A-Z0-9-].
|
|
20
|
+
*/
|
|
21
|
+
export declare function validateEngineNumber(value: unknown): true | string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { INotification } from '../../types/notification';
|
|
2
|
+
interface NotificationItemProps {
|
|
3
|
+
notification: INotification;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
onNavigate?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const NotificationItem: ({ notification, onClose, onNavigate }: NotificationItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PolicyGroupFormData } from './PolicyTypes';
|
|
2
|
+
interface Props {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSubmit: (payload: any) => Promise<boolean>;
|
|
6
|
+
editingGroup: any | null;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
tenants: any[];
|
|
9
|
+
initialData?: PolicyGroupFormData;
|
|
10
|
+
contextTenantId?: number;
|
|
11
|
+
contextDepartmentId?: number;
|
|
12
|
+
contextUserId?: number;
|
|
13
|
+
canEditOverride?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const CommissionPolicyGroupFormDialog: ({ isOpen, onClose, onSubmit, editingGroup, loading, tenants, initialData, contextTenantId, contextDepartmentId, contextUserId, canEditOverride, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
tenantId: number;
|
|
5
|
+
departmentId?: number;
|
|
6
|
+
userId?: number;
|
|
7
|
+
canEdit?: boolean;
|
|
8
|
+
onSuccess?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const CommissionPolicyGroupListView: ({ isOpen, onClose, tenantId, departmentId, userId, canEdit, onSuccess, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
onSubmit: (payload: any) => Promise<boolean>;
|
|
5
|
+
editingGroup: any | null;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
tenants: any[];
|
|
8
|
+
}
|
|
9
|
+
export declare const InsurancePolicyGroupFormDialog: ({ isOpen, onClose, onSubmit, editingGroup, loading, tenants, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EPolicyActionType } from '../../constants/policy-enums';
|
|
2
|
+
import { PolicyFormData } from './PolicyTypes';
|
|
3
|
+
export interface PolicyRulesConfig {
|
|
4
|
+
name: string;
|
|
5
|
+
conditionOperators: Array<{
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
9
|
+
actionDirections: Array<{
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
actionTypes: Array<{
|
|
14
|
+
value: EPolicyActionType;
|
|
15
|
+
label: string;
|
|
16
|
+
}>;
|
|
17
|
+
commissionTypes?: Array<{
|
|
18
|
+
value: 'direct' | 'indirect' | 'viaref';
|
|
19
|
+
label: string;
|
|
20
|
+
}>;
|
|
21
|
+
bankCodes?: Array<{
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}>;
|
|
25
|
+
currencyCodes?: Array<{
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}>;
|
|
29
|
+
labels?: {
|
|
30
|
+
conditionPrefix?: string;
|
|
31
|
+
actionPrefix?: string;
|
|
32
|
+
addRuleButton?: string;
|
|
33
|
+
ruleLabel?: string;
|
|
34
|
+
conditionValuePlaceholder?: string;
|
|
35
|
+
commissionTypeLabel?: string;
|
|
36
|
+
bankCodeLabel?: string;
|
|
37
|
+
currencyCodeLabel?: string;
|
|
38
|
+
commissionDirectLabel?: string;
|
|
39
|
+
commissionIndirectLabel?: string;
|
|
40
|
+
commissionViaRefLabel?: string;
|
|
41
|
+
};
|
|
42
|
+
mode?: 'pricing' | 'commission';
|
|
43
|
+
}
|
|
44
|
+
interface Props {
|
|
45
|
+
policies: PolicyFormData[];
|
|
46
|
+
onPoliciesChange: (newPolicies: PolicyFormData[]) => void;
|
|
47
|
+
config: PolicyRulesConfig;
|
|
48
|
+
errors?: Record<number, string[]>;
|
|
49
|
+
showAddButton?: boolean;
|
|
50
|
+
onAddPolicy?: () => void;
|
|
51
|
+
readOnly?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare const PolicyRulesEditor: ({ policies, onPoliciesChange, config, errors, showAddButton, onAddPolicy, readOnly, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EPolicyType, EPolicyActionType, EPolicyCombineStrategy, EPolicyScopeType } from '../../constants/policy-enums';
|
|
2
|
+
export interface PolicyFormData {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
type: EPolicyType;
|
|
6
|
+
conditions: any;
|
|
7
|
+
actionType: EPolicyActionType;
|
|
8
|
+
actionValue: number;
|
|
9
|
+
combineStrategy: EPolicyCombineStrategy;
|
|
10
|
+
priority: number;
|
|
11
|
+
conditionOperator?: string;
|
|
12
|
+
conditionValue?: any;
|
|
13
|
+
bankCode?: string | string[];
|
|
14
|
+
currencyCode?: string | string[];
|
|
15
|
+
commissionDirect?: {
|
|
16
|
+
type: EPolicyActionType;
|
|
17
|
+
value: number;
|
|
18
|
+
};
|
|
19
|
+
commissionIndirect?: {
|
|
20
|
+
type: EPolicyActionType;
|
|
21
|
+
value: number;
|
|
22
|
+
};
|
|
23
|
+
commissionViaRef?: {
|
|
24
|
+
type: EPolicyActionType;
|
|
25
|
+
value: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface PolicyGroupFormData {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
scopeType: EPolicyScopeType | string;
|
|
32
|
+
selectedTenantIds?: number[];
|
|
33
|
+
selectedDepartmentIds?: number[];
|
|
34
|
+
selectedUserIds?: number[];
|
|
35
|
+
active?: boolean;
|
|
36
|
+
scheduleType?: 'all' | 'time_range';
|
|
37
|
+
activeFrom?: string;
|
|
38
|
+
activeTo?: string;
|
|
39
|
+
policies: PolicyFormData[];
|
|
40
|
+
config?: any;
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PolicyGroup } from '../../hooks/usePolicyGroups';
|
|
2
|
+
interface Props {
|
|
3
|
+
policyGroups: PolicyGroup[];
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
canEdit?: boolean;
|
|
6
|
+
tenants: any[];
|
|
7
|
+
onSubmit?: (payload: any) => Promise<boolean>;
|
|
8
|
+
onSuccess?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PricingPolicyListView: ({ policyGroups, loading, canEdit, tenants, onSubmit, onSuccess, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -5,6 +5,7 @@ type Step = {
|
|
|
5
5
|
interface StepIndicatorHorizontalProps {
|
|
6
6
|
currentStep: number;
|
|
7
7
|
steps: Step[];
|
|
8
|
+
onStepClick?: (stepNumber: number) => void;
|
|
8
9
|
}
|
|
9
|
-
export declare const StepIndicatorHorizontal: ({ currentStep, steps }: StepIndicatorHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const StepIndicatorHorizontal: ({ currentStep, steps, onStepClick, }: StepIndicatorHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|