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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | 116x | //we should add all new types and extensions here from now
//TODO: move modal ptops types here
import { TMerchantAgreementPayload } from "@components/Merchants/CreateMerchantPanel/hooks/TMerchantAgreementPayload";
import {
TMerchantDocument,
TBusinessOwner,
TBusinessProfileInfo,
TMerchantInfo,
TMerchantHeader,
TPrimaryAccountHolder,
IMerchantBankAccount,
TStatusReview,
TMerchantBankAccountSettings,
} from "@components/Merchants/MerchantPreview/data.types";
import { SxProps } from "@mui/material";
import { Icon } from "@phosphor-icons/react";
import { MouseEvent, ReactNode } from "react";
import { TChipColors } from "@shared/Chip/GiveChip";
import {
PEPStatusType,
TPEPOwner,
} from "@components/Merchants/MerchantPreview/PEP/types";
import { ButtonProps } from "@shared/Button/GiveButton.types";
import { TTaskStatus } from "../ApprovalFlowPanel/types";
export type TaskStatus =
| "ready_for_verification"
| "open"
| "closed"
| "rejected"; //add here APR statuses
export type TaskTypeName = "enhanced_due_diligence" | "customer_due_diligence";
export const TaskTypeNameEnum = {
CDD: "customer_due_diligence",
EDD: "enhanced_due_diligence",
} as const;
export type TaskModalProps = {
//TODO: cleanup after completion and APR changes
doneDisabled?: boolean;
hasRejectButton?: boolean;
actions?: {
onReject?: (
id: number,
reason: string,
type: TaskTypeName,
reject?: boolean,
) => void;
onApprove?: (id: number, reason: string, type: TaskTypeName) => void;
handleOpenConversation?: () => void;
handleComplete?: (reason?: string) => void;
handleReadyForKYB?: (reason?: string) => void;
handleInProgress?: (reason?: string) => void;
handleReadyForUnderwriting?: (reason?: string) => void;
handleUpdateAttention?: () => void;
};
discussionData?: {
discussionTitle?: string;
messageImages?: string[];
commentsCount?: number;
lastComment?: string;
};
notification?: string;
challengeData: {
title?: string;
name?: string;
description?: string;
message?: string;
threadId?: number;
challengeTypeName?: TaskTypeName;
isPAHChallenge?: boolean;
statusName?: TaskStatus | TTaskStatus;
isBOVerification?: boolean;
id: number;
challengeID?: number;
hasUnreadMessages?: boolean;
didMerchantReply?: boolean;
reason?: string;
merchantDisplayTitle?: string;
predefinedReason?: string;
requestAttention?: boolean;
userAvatarsInThread?:
| {
accID: number;
avatarURL: string;
}[]
| null;
internalThreadID?: number;
unreadMessagesCount?: number;
isMentioned?: boolean;
};
merchantData: ModalMerchantData;
isKYBView?: boolean;
openFromConversation?: boolean;
};
export type OptionalTaskModalProps = Partial<TaskModalProps>;
export type NotesType = {
reason: string;
};
export interface ModalMerchantData {
documents?: TMerchantDocument[];
merchantId: number;
isEnterprise?: boolean;
businessOwners?: TBusinessOwner[];
businessProfile?: TBusinessProfileInfo;
merchantInfo?: TMerchantInfo;
header?: TMerchantHeader;
primaryAccountHolder?: TPrimaryAccountHolder;
taskName?: TaskName;
merchantAgreement?: TMerchantAgreementPayload;
statusName?: string;
bankAccounts?: IMerchantBankAccount[];
status?: TStatusReview;
bankAccountSettings?: TMerchantBankAccountSettings;
}
export type TaskActionType = {
onClick?: () => void;
Icon?: Icon;
title?: string;
element?: ReactNode;
hidden?: boolean;
};
export interface TaskCardProps {
title: string;
children: React.ReactElement | React.ReactElement[];
onEdit?: () => void;
actions?: TaskActionType[];
sx?: SxProps;
containerSx?: SxProps;
}
export interface CustomAccordionDAta {
lastName?: string;
email: string;
ownership?: number;
firstName: string;
id: number;
countryOfResidence?: string;
citizenship?: string;
}
export type PEP_OFAC_TYPES =
| "PEP"
| "BO"
| "PAH"
| "MATCH"
| "BUSINESS_CHECK"
| null;
export interface AccordionHeaderProps {
name: string;
data?: { ownership?: number };
color: TChipColors;
label: string;
ICON: React.ElementType;
}
export type ActionButtonsProps = {
label: string;
color?: ButtonProps["color"];
bgcolor?: string | undefined;
variant?: string;
onClick: () => void;
isLoading?: boolean;
dataTestId?: string;
hidden?: boolean;
};
export interface AccordionDetailsHeaderProps {
buttons: ActionButtonsProps[];
lastCheckStatusName?: ExtendedPEPStatusType;
useFallbackText?: boolean;
isTextBelowIcon?: boolean;
}
export type StatusObject = {
label: string;
color: "default" | "success" | "warning" | "blue" | "error";
StatusIcon: Icon;
iconColor: string;
iconBgColor?: string;
title?: string;
subTitle?: string;
};
export type ExtendedPEPStatusType = PEPStatusType | "disabled_pending";
export type ofacDataTypes = {
createdAt: number;
statusName: string;
id: number;
};
export interface LastCheckArrayProps {
title: string | React.ReactNode;
id?: number | string;
subTitle: string;
date: string;
isIcon?: boolean;
hidden?: boolean | null;
}
export type TaskName =
| "merchant_category_verification"
| "negative_news_screening"
| "website_verification"
| "volume_assessment"
| "verify_billing_descriptor"
| "merchant_purpose_or_mission"
| "located_in_usa"
| "underwriting_match_screening_check"
| string;
export type RiskLevel = "normal" | "high" | "restricted";
export type FieldConfig = {
label: string;
value?: string | ((data: any) => string) | null;
span?: number;
component?: React.ComponentType<{ data: any }>;
isPhoneNumber?: boolean;
};
export type TaskContentConfig = {
[key in TaskName]: {
title: string;
fields: FieldConfig[];
};
};
export type SectionType = {
title: string;
content: React.ReactElement | React.ReactElement[];
onEdit?: () => void;
actions?: TaskActionType[];
sx?: SxProps;
containerSx?: SxProps;
hidden?: boolean;
};
export interface CustomAccordionProps {
data: CustomAccordionDAta;
merchantID?: number;
PEP_OFAC: PEP_OFAC_TYPES;
handleViewMore: (data: TPEPOwner) => void;
isPAH_OFAC: boolean;
isPEP_BO: boolean;
isBO_OFAC: boolean;
isMATCH: boolean;
handleCheckNowFunctions: () => void;
isLoadingCheckNow?: boolean;
businessProfileId?: number;
isOFAC_MERCHANT_CHECK: boolean;
}
export interface SignatureSectionProps {
isTooltipEnabled: boolean;
isSigned: boolean;
isRequiredSignature: boolean;
rawSignatureUrl?: string;
}
export interface BusinessProfileContentProps {
merchantData: any;
businessProfile: any;
taxID?: string;
}
export interface AccordionItemData {
id: string | number;
title: string;
subtitle: string;
[key: string]: any;
}
export interface AccordionSectionProps<T extends AccordionItemData> {
items: T[];
getFieldsList: (item: T) => FieldConfig[];
statusComponent: (item: T) => ReactNode;
onEdit: (event: MouseEvent<HTMLElement>, item: T) => void;
extraContent?: (item: T) => ReactNode;
}
export interface PepCheck {
checkID?: number;
id?: number;
manualPepStatus?: string;
status?: string;
date?: number;
}
|