Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | import {
IMerchantBankAccount,
TBusinessAddressInfo,
TBusinessOwner,
TBusinessProfileInfo,
TCategoryCode,
TMerchantInfo,
} from "@components/Merchants/MerchantPreview/data.types";
import { TMerchantAgreementPayload } from "../hooks/TMerchantAgreementPayload";
import { ICreateEnterpriseSchema } from "@components/AcquirerEnterprises/CreateEnterprise/types";
export enum FormType {
CREATE_ENTERPRISE = "CREATE_ENTERPRISE",
CREATE_MERCHANT = "CREATE_MERCHANT",
EDIT_ENTERPRISE = "EDIT_ENTEPRISE",
}
export type TCreatePrimaryAccountHolder = {
email: string;
assignToMe: boolean;
};
export type TCreateBusinessProfile = TBusinessProfileInfo & {
isLinkBusinessProfile?: boolean;
linkedBusinessProfile?: number;
address: TBusinessAddressInfo;
isOutOfMerchantTree?: boolean;
businessDetails?: ICreateEnterpriseSchema["businessProfile"];
};
type SubmitData = {
businessProfile: TCreateBusinessProfile;
businessOwners?: TBusinessOwner[];
};
export interface IUseBusinessProfileModal {
data: TCreateBusinessProfile;
onClose?: (data: SubmitData) => void;
merchantId?: number;
legalEntityID?: number;
formType: FormType;
isLegalEntityApproved?: boolean;
isEdit?: boolean;
isBPLinked?: boolean;
merchantName?: string;
}
export type TLinkedBusinessOwner = TBusinessOwner & { linked?: boolean };
export type TCreateMerchant = {
merchantInfo: TMerchantInfo;
primaryAccountHolder: TCreatePrimaryAccountHolder;
businessProfile: TCreateBusinessProfile;
businessOwners: TLinkedBusinessOwner[];
bankAccounts: IMerchantBankAccount[];
merchantAgreement: TMerchantAgreementPayload;
linkedBankAccountID?: number | null;
allowBankAccounts: boolean;
allowTransfers: boolean;
};
export type TCreateProvider = {
merchantInfo: TMerchantInfo;
primaryAccountHolder: TCreatePrimaryAccountHolder;
businessProfile: TCreateBusinessProfile;
bankAccounts: IMerchantBankAccount[];
merchantAgreement: TMerchantAgreementPayload;
linkedBankAccountID?: number | null;
permissions: Record<any, boolean>[];
categories: TCategoryCode[];
};
export type SectionType = "business_profile" | "business_address";
export type CreateBusinessProfileModalProps = IUseBusinessProfileModal & {
section?: SectionType;
};
|