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 | 238x 238x 238x 238x 238x 238x 238x 238x 238x 238x 238x 121x 238x 238x 238x 238x 238x 238x 238x 238x 238x 1x 1x 2x | import { WEBSITE_URL_FIELD } from "@constants/constants";
export const easternTimeZone = "America/New_York";
type ExportColumnOption = { value: string; label: string };
export const exportType = {
ACQUIRE_DISPUTE: "acquirer.disputes",
RISK_TRANSACTIONS: "risk.transactions",
MERCHANT_TABLE: "merchant.table",
} as const;
export type TableType = (typeof exportType)[keyof typeof exportType];
export const errorText = {
[exportType.ACQUIRE_DISPUTE]: "disputes",
[exportType.RISK_TRANSACTIONS]: "transactions",
[exportType.MERCHANT_TABLE]: "merchants",
};
export const cardTypes = [
{
label: "Visa",
value: "visa",
checkedIcon: "Check",
hideImage: true,
},
{
label: "Mastercard",
value: "mastercard",
checkedIcon: "Check",
hideImage: true,
},
{
label: "Amex",
value: "amex",
checkedIcon: "Check",
hideImage: true,
},
{
label: "Discover",
value: "discover",
checkedIcon: "Check",
hideImage: true,
},
{
label: "Other",
value: "other",
checkedIcon: "Check",
hideImage: true,
},
];
export const selectOptions = [
{ value: "all", label: "All" },
{ value: "custom", label: "Custom" },
];
export const EXPORT_PANEL_WIDTH = 500;
export const exportColumnOptions = [
{
label: "All columns",
value: "all",
description: "Hidden columns are included in the export",
},
{
label: "Only columns in the view",
value: "only_in_view",
description: "Only table columns are included in the export",
},
{
label: "Custom",
value: "merchant_report",
description: "Selected columns are included in the export",
},
];
export const transactionInfoOptions = [
{ value: "Merchant Name", label: "Merchant Name" },
{ value: "Provider Name", label: "Provider Name" },
{ value: "Transaction Id", label: "Transaction ID" },
{ value: "Transaction Type", label: "Transaction Type" },
{ value: "Name on Card", label: "Name on Card" },
{ value: "Card Type", label: "Card Type" },
{ value: "Card Number Last4", label: "Card Number" },
{ value: "Email", label: "Email" },
{ value: "Amount", label: "Amount" },
{ value: "Fees", label: "Fees" },
{ value: "Charged", label: "Charged" },
{ value: "Ending Balance", label: "Ending Balance" },
{ value: "Transaction Status", label: "Transaction Status" },
];
export const riskOptions = [
{ value: "Risk Level", label: "Risk Level" },
{ value: "Reason of Escalation", label: "Reason of Escalation" },
{ value: "Customer", label: "Customer" },
{ value: "Name on Card", label: "Name on Card" },
{ value: "Card Type", label: "Card Type" },
{ value: "Card Number Last4", label: "Card Number" },
{ value: "Risk Status Transaction", label: "Risk Status" },
{ value: "Amount", label: "Amount" },
];
export const customerOptions = [
{ value: "Customer First Name", label: "First Name" },
{ value: "Customer Last Name", label: "Last Name" },
{ value: "Customer Email", label: "Email" },
{ value: "Customer Date of Birth", label: "Date of Birth" },
{ value: "Customer Phone Number", label: "Phone Number" },
{ value: "Customer Occupation", label: "Occupation" },
{ value: "Customer Employer", label: "Employer" },
{ value: "Customer City", label: "City" },
{ value: "Customer State", label: "State" },
{ value: "Customer Zip", label: "ZIP" },
{ value: "Customer Address", label: "Address" },
{ value: "Customer Notes", label: "Notes" },
{ value: "Customer total", label: "Amount Total" },
];
export const getMerchantInfoOptions = (
isMerchantProcessorEnabled: boolean,
isEnterprisePortal: boolean,
): ExportColumnOption[] => [
{ value: "Merchant Name", label: "Merchant Name" },
{ value: "Internal ID", label: "Internal ID" },
{ value: "Merchant ID", label: "Merchant ID" },
{ value: "Business Classification", label: "Business Classification" },
...(isMerchantProcessorEnabled && !isEnterprisePortal
? [{ value: "Processor", label: "Processor" }]
: []),
{ value: "MCC", label: "MCC" },
{ value: "Parent Provider Name", label: "Parent Provider Name" },
{ value: "Website URL", label: "Business Website" },
{ value: "Contact Phone", label: "Merchant Phone Number" },
{ value: "Billing Descriptor", label: "Billing Descriptor" },
{ value: "Average Ticket Amount", label: "Average Ticket Amount" },
{ value: "High Ticket Amount", label: "High Ticket Amount" },
{ value: "Estimated Annual Revenue", label: "Estimated Annual Revenue" },
{
value: "Countries where business is conducted outside the USA",
label: "Countries where business is conducted outside the USA",
},
{ value: "Origin", label: "Origin" },
{ value: "Merchant Status", label: "Merchant Status" },
{ value: "Sponsor Status", label: "Sponsor Status" },
{ value: "Creation Date", label: "Creation Date" },
{ value: "Merchant Onboarded Date", label: "Merchant Onboarded Date" },
{ value: "Ready Date", label: "Ready Date" },
{ value: "Sponsor Approval Date", label: "Sponsor Approval Date" },
{ value: "First Transaction Date", label: "First Transaction Date" },
{ value: "Closure Date", label: "Closure Date" },
{ value: "Approval Recommendation", label: "Approval Recommendation" },
{ value: "KYB Score", label: "KYB Score" },
{ value: "Underwriting Score", label: "Underwriting Score" },
...(isEnterprisePortal
? []
: [
{ value: "KYB Assignee", label: "KYB Assignee" },
{ value: "Underwriting Assignee", label: "Underwriting Assignee" },
{ value: "Sponsor Assignee", label: "Sponsor Assignee" },
{ value: "Risk Assignee", label: "Risk Assignee" },
]),
{ value: "Can Transfer Money", label: "Can Transfer Money" },
{ value: "Can Process Money", label: "Can Process Money" },
];
export const salesInfo = [
{ value: "Gross Sales Volume", label: "Gross Sales Volume" },
{ value: "# Sales", label: "#Sales" },
{ value: "Avg Sales", label: "Average Sale" },
{ value: "Gross Refunds Volume", label: "Gross Refunds Volume" },
{ value: "# Refunds", label: "#Refunds" },
{
value: "Gross Pre-Chargeback Refunds Volume",
label: "Gross Pre-Chargeback Refunds",
},
{
value: "# Pre-Chargeback Refunds",
label: "#Pre-Chargeback Refunds",
},
{ value: "Refunds Amount %", label: "Refunds Amount %" },
{ value: "# Refunds %", label: "Refunds %" },
{ value: "Gross Chargebacks Volume", label: "Gross Chargeback Volume" },
{ value: "# Chargebacks", label: "#Chargeback" },
{ value: "Chargebacks Amount %", label: "#Chargeback Amount" },
{ value: "# Chargebacks %", label: "Chargebacks %" },
{ value: "Industry", label: "Industry" },
];
export const riskMonitor = [
{ value: "Risk Level", label: "Risk Level" },
{ value: "Risk Points", label: "Risk Points" },
// { value: "Risk Category", label: "Risk Category" }, this value was commented out bc its not working BE side
{ value: "Ready Date", label: "Ready Date" },
{ value: "Last Escalation Date", label: "Last Escalation Date" },
];
export const primaryAccountHolder = [
{ value: "Primary Account Holder First Name", label: "First Name" },
{ value: "Primary Account Holder Last Name", label: "Last Name" },
{ value: "Primary Account Holder Email", label: "Email" },
{ value: "Primary Account Holder Contact Phone", label: "Mobile Phone" },
{ value: "Primary Account Holder Date of Birth", label: "Date of Birth" },
{
value: "Primary Account Holder Country of Residence",
label: "Country of Residence",
},
{
value: "Primary Account Holder Country of Citizenship",
label: "Country of Citizenship",
},
];
export const businessOwner = [
{ value: "Business Owner First Name", label: "First Name" },
{ value: "Business Owner Last Name", label: "Last Name" },
{ value: "Business Owner Email", label: "Email" },
{ value: "Business Owner Contact Phone", label: "Business Owner Phone" },
{ value: "Business Owner Tax ID", label: "Tax ID" },
{ value: "Business Owner Date of Birth", label: "Date of Birth" },
{ value: "Business Owner Street Address", label: "Street Address" },
{ value: "Business Owner City", label: "City" },
{ value: "Business Owner State", label: "State" },
{ value: "Business Owner Zip", label: "ZIP" },
{ value: "Business Owner Country", label: "Country" },
{ value: "Business Owner Ownership %", label: "Ownership (%)" },
];
export const businessProfile = [
{ value: "Legal Name", label: "Legal Name" },
{ value: "Business Tax ID", label: "Federal Tax ID" },
{ value: "Business Contact Phone", label: "Business Phone Number" },
{ value: "DBA", label: "Doing Business As (DBA)" },
{ value: "Type of Business", label: "Type of Business" },
{ value: "Ownership Type", label: "Ownership Type" },
{ value: "Age of Business", label: "Age Of Business" },
{ value: "Business Street Address", label: "Street Address" },
{ value: "Business City", label: "City" },
{ value: "Business State", label: "State" },
{ value: "Business Zip", label: "ZIP" },
{ value: "Business Country", label: "Country" },
];
export const ofacInfo = [
{ value: "OFAC Check At", label: "Last OFAC Check" },
{ value: "OFAC Status", label: "OFAC Status" },
{ value: "Reviewed By", label: "Reviewed By" },
{ value: "Reviewer Comments", label: "Reviewer Comments" },
];
export const reportTypeMap: Record<string, string> = {
all: "all",
visible: "only_in_view",
custom: "merchant_report",
processing_monthly: "processing_monthly_report",
reserve_monthly: "reserve_monthly_report",
reconciliation_monthly: "reconciliation_monthly_report",
bank_reconciliation_monthly: "bank_reconciliation_monthly_report",
new_merchant_approval: "new_merchant_approval",
ofac_business: "ofac_legal_entity_report",
ofac_persons: "ofac_persons_report",
};
export const fileNamePrefixNewMerchantApprovalReport =
"GIVE_NEW_MERCHANT_APPROVALS_";
export const filterPersonsTypeColumn = ({
columnsIncluded,
columnType,
columnsArr,
}: {
columnsIncluded: string;
columnType: string;
columnsArr: string[];
}) => {
// Logic moved from AdvancedSettings.tsx, original comment made by Peter Andor
//its should be a temporary fix
//we are adding the "Persons Type checkbox only when OFAC persons report is selected" to the advance select
//bc this column right now is not accepted by BE and for ofac_persons we only sendt the reportType without the columnsIncluded
const isOfacPersonSelected = columnsIncluded === "ofac_persons";
Eif (!isOfacPersonSelected && columnType === "merchant") {
return columnsArr.filter((item) => item !== "Persons Type");
}
return columnsArr;
};
|