braid-ui 1.0.56 → 1.0.58
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/dist/index.cjs +225 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +225 -124
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8257,7 +8257,7 @@ var StatementView = ({
|
|
|
8257
8257
|
] });
|
|
8258
8258
|
};
|
|
8259
8259
|
var ACHDetailsSection = ({ data }) => {
|
|
8260
|
-
const
|
|
8260
|
+
const formatCurrency4 = (value) => {
|
|
8261
8261
|
return new Intl.NumberFormat("en-US", {
|
|
8262
8262
|
style: "currency",
|
|
8263
8263
|
currency: "USD",
|
|
@@ -8293,7 +8293,7 @@ var ACHDetailsSection = ({ data }) => {
|
|
|
8293
8293
|
layout: "horizontal"
|
|
8294
8294
|
}
|
|
8295
8295
|
),
|
|
8296
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Amount", value:
|
|
8296
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Amount", value: formatCurrency4(data.amount), layout: "horizontal" }),
|
|
8297
8297
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "SEC Code", value: data.secCode, layout: "horizontal" }),
|
|
8298
8298
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Company Entry Description", value: data.companyEntryDescription, layout: "horizontal" }),
|
|
8299
8299
|
data.companyDiscretionaryData && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Company Discretionary Data", value: data.companyDiscretionaryData, layout: "horizontal" }),
|
|
@@ -8460,7 +8460,6 @@ var NewTransactionView = ({
|
|
|
8460
8460
|
onEditCounterparty,
|
|
8461
8461
|
onTransactionTypeChange,
|
|
8462
8462
|
onSubmit,
|
|
8463
|
-
onCancel,
|
|
8464
8463
|
onConfirmationClose,
|
|
8465
8464
|
onConfirmationOpenChange,
|
|
8466
8465
|
onNewTransaction,
|
|
@@ -8478,7 +8477,9 @@ var NewTransactionView = ({
|
|
|
8478
8477
|
onEditReceiverAccount,
|
|
8479
8478
|
isReviewReady,
|
|
8480
8479
|
adjustmentTypeOptions,
|
|
8481
|
-
transactionTypeOptions
|
|
8480
|
+
transactionTypeOptions,
|
|
8481
|
+
showSuccessInfoBox = false,
|
|
8482
|
+
successInfoMessage = ""
|
|
8482
8483
|
}) => {
|
|
8483
8484
|
const transactionType = form.watch("transactionType");
|
|
8484
8485
|
const accountNumber = form.watch("accountNumber");
|
|
@@ -8487,6 +8488,7 @@ var NewTransactionView = ({
|
|
|
8487
8488
|
const receiverAccountNumber = form.watch("receiverAccountNumber");
|
|
8488
8489
|
const adjustmentDirection = form.watch("adjustmentDirection");
|
|
8489
8490
|
const adjustmentType = form.watch("adjustmentType");
|
|
8491
|
+
const description = form.watch("description");
|
|
8490
8492
|
const requiresCounterparty = ["ach", "wire"].includes(transactionType);
|
|
8491
8493
|
const isTransfer = transactionType === "transfer";
|
|
8492
8494
|
const isAdjustment = transactionType === "adjustment";
|
|
@@ -8847,56 +8849,71 @@ var NewTransactionView = ({
|
|
|
8847
8849
|
] })
|
|
8848
8850
|
}
|
|
8849
8851
|
) }),
|
|
8850
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
}
|
|
8867
|
-
)
|
|
8868
|
-
] })
|
|
8852
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end pt-4 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8853
|
+
Button,
|
|
8854
|
+
{
|
|
8855
|
+
type: "button",
|
|
8856
|
+
onClick: onSubmit,
|
|
8857
|
+
className: "w-48",
|
|
8858
|
+
disabled: !transactionType || !accountNumber || requiresCounterparty && !counterpartyName || isTransfer && !receiverAccountLookedUp || isAdjustment && (!adjustmentDirection || !adjustmentType) || !amount || !form.watch("certifyInformation") || isSubmitting,
|
|
8859
|
+
children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8860
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
8861
|
+
"Submitting..."
|
|
8862
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8863
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-4 w-4 mr-2" }),
|
|
8864
|
+
"Submit Transaction"
|
|
8865
|
+
] })
|
|
8866
|
+
}
|
|
8867
|
+
) })
|
|
8869
8868
|
] }) })
|
|
8870
8869
|
] }) }),
|
|
8871
8870
|
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: confirmationOpen, onOpenChange: () => {
|
|
8872
8871
|
}, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-md flex flex-col max-h-[85vh]", hideCloseButton: true, children: [
|
|
8873
8872
|
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
8874
8873
|
submissionStatus === "success" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 w-12 rounded-full bg-success/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-6 w-6 text-success" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 w-12 rounded-full bg-destructive/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-6 w-6 text-destructive" }) }),
|
|
8875
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction
|
|
8874
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction Submitted" : "Transaction Failed" })
|
|
8876
8875
|
] }) }),
|
|
8877
8876
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto min-h-0", children: submissionStatus === "success" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
8878
8877
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: "Your transaction has been successfully submitted and is being processed." }),
|
|
8879
8878
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 rounded-lg p-4 space-y-2", children: [
|
|
8880
8879
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8881
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "
|
|
8882
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium", children:
|
|
8880
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Payment ID:" }),
|
|
8881
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium text-xs", children: crypto.randomUUID() })
|
|
8882
|
+
] }),
|
|
8883
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8884
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Account:" }),
|
|
8885
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: accountData ? `${accountData.accountName} (${accountData.accountNumber})` : "N/A" })
|
|
8886
|
+
] }),
|
|
8887
|
+
transactionType === "transfer" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8888
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Receiver Account:" }),
|
|
8889
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: receiverAccountData ? `${receiverAccountData.accountName} (${receiverAccountData.accountNumber})` : "N/A" })
|
|
8890
|
+
] }),
|
|
8891
|
+
transactionType === "adjustment" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8892
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8893
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Direction:" }),
|
|
8894
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: adjustmentDirection === "debit" ? "Debit" : "Credit" })
|
|
8895
|
+
] }),
|
|
8896
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8897
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Adjustment Type:" }),
|
|
8898
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: adjustmentTypeOptions.find((t) => t.value === adjustmentType)?.label || "N/A" })
|
|
8899
|
+
] })
|
|
8900
|
+
] }),
|
|
8901
|
+
(transactionType === "wire" || transactionType === "ach") && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8902
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Customer Name:" }),
|
|
8903
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterpartyName || "N/A" })
|
|
8883
8904
|
] }),
|
|
8884
8905
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8885
8906
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Amount:" }),
|
|
8886
8907
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatCurrency2(amount) })
|
|
8887
8908
|
] }),
|
|
8888
8909
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8889
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "
|
|
8890
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children:
|
|
8891
|
-
] }),
|
|
8892
|
-
requiresCounterparty && counterpartyName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8893
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Counterparty:" }),
|
|
8894
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterpartyName })
|
|
8910
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Description:" }),
|
|
8911
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: description || "N/A" })
|
|
8895
8912
|
] })
|
|
8896
8913
|
] }),
|
|
8897
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
|
|
8914
|
+
showSuccessInfoBox && successInfoMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
|
|
8898
8915
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-5 w-5 text-blue-500 mt-0.5 flex-shrink-0" }),
|
|
8899
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children:
|
|
8916
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children: successInfoMessage })
|
|
8900
8917
|
] })
|
|
8901
8918
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
8902
8919
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
|
|
@@ -8909,17 +8926,11 @@ var NewTransactionView = ({
|
|
|
8909
8926
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Please review the error message above and try again. If the problem persists, contact support." })
|
|
8910
8927
|
] }) }),
|
|
8911
8928
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "sm:justify-end gap-2 flex-shrink-0", children: [
|
|
8912
|
-
submissionStatus === "error" && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button",
|
|
8913
|
-
submissionStatus === "success" && /* @__PURE__ */ jsxRuntime.
|
|
8914
|
-
|
|
8915
|
-
Button,
|
|
8916
|
-
|
|
8917
|
-
type: "button",
|
|
8918
|
-
onClick: onConfirmationClose,
|
|
8919
|
-
variant: submissionStatus === "success" ? "default" : "outline",
|
|
8920
|
-
children: submissionStatus === "success" ? "View Transaction" : "Close"
|
|
8921
|
-
}
|
|
8922
|
-
)
|
|
8929
|
+
submissionStatus === "error" && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: () => onConfirmationOpenChange(false), children: "Edit" }),
|
|
8930
|
+
submissionStatus === "success" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8931
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onNewTransaction, children: "New Transaction" }),
|
|
8932
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: onConfirmationClose, children: "View Transaction" })
|
|
8933
|
+
] })
|
|
8923
8934
|
] })
|
|
8924
8935
|
] }) })
|
|
8925
8936
|
] });
|
|
@@ -14011,7 +14022,7 @@ var TransactionHistory = () => {
|
|
|
14011
14022
|
setRowsPerPage(value);
|
|
14012
14023
|
setCurrentPage(1);
|
|
14013
14024
|
};
|
|
14014
|
-
const
|
|
14025
|
+
const formatCurrency4 = (value) => {
|
|
14015
14026
|
const formatted = new Intl.NumberFormat("en-US", {
|
|
14016
14027
|
style: "currency",
|
|
14017
14028
|
currency: "USD",
|
|
@@ -14300,7 +14311,7 @@ var TransactionHistory = () => {
|
|
|
14300
14311
|
children: [
|
|
14301
14312
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs", children: transaction.created }),
|
|
14302
14313
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs", children: transaction.accountNumber }),
|
|
14303
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs text-right", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: transaction.amount < 0 ? "text-destructive" : "", children:
|
|
14314
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs text-right", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: transaction.amount < 0 ? "text-destructive" : "", children: formatCurrency4(transaction.amount) }) }),
|
|
14304
14315
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "link", className: "h-auto p-0 font-normal text-xs", children: transaction.customer }) }),
|
|
14305
14316
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "link", className: "h-auto p-0 font-normal text-xs", children: transaction.counterparty }) }),
|
|
14306
14317
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-xs truncate", children: transaction.description }),
|
|
@@ -14729,7 +14740,7 @@ function NewTransaction() {
|
|
|
14729
14740
|
};
|
|
14730
14741
|
console.log("Transaction submission payload:", submissionPayload);
|
|
14731
14742
|
await new Promise((resolve) => setTimeout(resolve, 1500));
|
|
14732
|
-
const hasError = Math.random() > 0.
|
|
14743
|
+
const hasError = Math.random() > 0.7;
|
|
14733
14744
|
if (hasError) {
|
|
14734
14745
|
const errorScenarios = [
|
|
14735
14746
|
"Insufficient funds. Current balance: $125,450.00, Required: $" + parseFloat(data.amount).toFixed(2),
|
|
@@ -14738,9 +14749,7 @@ function NewTransaction() {
|
|
|
14738
14749
|
"Invalid routing number for the selected transaction type."
|
|
14739
14750
|
];
|
|
14740
14751
|
setSubmissionStatus("error");
|
|
14741
|
-
setErrorMessage(
|
|
14742
|
-
'JSON parse error: Cannot deserialize value of type `io.ropechain.api.enums.TransactionEnums$DebitAdjustmentTypes` from String "mapSubTypeStringToEnum(data.adjustmentType ?? "")": not one of the values accepted for Enum class: [COLLECTION, TRANSACTION_REVERSAL, TRANSACTION_ADJUSTMENT]; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `io.ropechain.api.enums.TransactionEnums$DebitAdjustmentTypes` from String "mapSubTypeStringToEnum(data.adjustmentType ?? "")": not one of the values accepted for Enum class: [COLLECTION, TRANSACTION_REVERSAL, TRANSACTION_ADJUSTMENT]\n at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 51] (through reference chain: io.ropechain.api.model.transaction.internal.TransactionDebitAdjustmentRequest["subType"])'
|
|
14743
|
-
);
|
|
14752
|
+
setErrorMessage(errorScenarios[Math.floor(Math.random() * errorScenarios.length)]);
|
|
14744
14753
|
} else {
|
|
14745
14754
|
const txId = "TXN-" + Math.random().toString(36).substr(2, 9).toUpperCase();
|
|
14746
14755
|
setTransactionId(txId);
|
|
@@ -14785,9 +14794,6 @@ function NewTransaction() {
|
|
|
14785
14794
|
setConfirmationOpen(false);
|
|
14786
14795
|
resetForm();
|
|
14787
14796
|
};
|
|
14788
|
-
const handleCancel = () => {
|
|
14789
|
-
navigate("/dashboard");
|
|
14790
|
-
};
|
|
14791
14797
|
const isReviewReady = React15.useMemo(() => {
|
|
14792
14798
|
const data = form.watch();
|
|
14793
14799
|
const requiresCounterparty = ["ach", "wire"].includes(data.transactionType);
|
|
@@ -14832,7 +14838,6 @@ function NewTransaction() {
|
|
|
14832
14838
|
onEditCounterparty: handleEditCounterparty,
|
|
14833
14839
|
onTransactionTypeChange: handleTransactionTypeChange,
|
|
14834
14840
|
onSubmit: handleSubmit,
|
|
14835
|
-
onCancel: handleCancel,
|
|
14836
14841
|
onConfirmationClose: handleConfirmationClose,
|
|
14837
14842
|
onConfirmationOpenChange: setConfirmationOpen,
|
|
14838
14843
|
onNewTransaction: handleNewTransaction,
|
|
@@ -14843,66 +14848,60 @@ function NewTransaction() {
|
|
|
14843
14848
|
onEditReceiverAccount: handleEditReceiverAccount,
|
|
14844
14849
|
isReviewReady,
|
|
14845
14850
|
adjustmentTypeOptions,
|
|
14846
|
-
transactionTypeOptions
|
|
14851
|
+
transactionTypeOptions,
|
|
14852
|
+
showSuccessInfoBox: true,
|
|
14853
|
+
successInfoMessage: "The transaction is being manually reviewed"
|
|
14847
14854
|
}
|
|
14848
14855
|
);
|
|
14849
14856
|
}
|
|
14850
|
-
var
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
|
|
14863
|
-
] }) });
|
|
14857
|
+
var getStatusVariant = (status) => {
|
|
14858
|
+
switch (status) {
|
|
14859
|
+
case "POSTED":
|
|
14860
|
+
return "success";
|
|
14861
|
+
case "PENDING":
|
|
14862
|
+
return "warning";
|
|
14863
|
+
case "FAILED":
|
|
14864
|
+
return "destructive";
|
|
14865
|
+
case "CANCELLED":
|
|
14866
|
+
return "outline";
|
|
14867
|
+
default:
|
|
14868
|
+
return "outline";
|
|
14864
14869
|
}
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
}
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
currency: "USD",
|
|
14901
|
-
minimumFractionDigits: 2
|
|
14902
|
-
}).format(value);
|
|
14903
|
-
};
|
|
14904
|
-
const isWireTransfer = transaction.transactionType.toLowerCase().includes("wire");
|
|
14905
|
-
const isACHTransfer = transaction.transactionType.toLowerCase().includes("ach");
|
|
14870
|
+
};
|
|
14871
|
+
var getProcessingStatusVariant = (status) => {
|
|
14872
|
+
switch (status) {
|
|
14873
|
+
case "CONFIRMED":
|
|
14874
|
+
case "SENT":
|
|
14875
|
+
return "success";
|
|
14876
|
+
case "SUBMITTED":
|
|
14877
|
+
case "CUSTOMER_REVIEW":
|
|
14878
|
+
case "MANUAL_REVIEW":
|
|
14879
|
+
return "warning";
|
|
14880
|
+
case "INITIATED":
|
|
14881
|
+
default:
|
|
14882
|
+
return "outline";
|
|
14883
|
+
}
|
|
14884
|
+
};
|
|
14885
|
+
var formatCurrency3 = (value) => {
|
|
14886
|
+
return new Intl.NumberFormat("en-US", {
|
|
14887
|
+
style: "currency",
|
|
14888
|
+
currency: "USD",
|
|
14889
|
+
minimumFractionDigits: 2
|
|
14890
|
+
}).format(value);
|
|
14891
|
+
};
|
|
14892
|
+
var TransactionDetailView = ({
|
|
14893
|
+
transaction,
|
|
14894
|
+
timelineEvents,
|
|
14895
|
+
isWireTransfer,
|
|
14896
|
+
isACHTransfer,
|
|
14897
|
+
onReturn,
|
|
14898
|
+
onCancel,
|
|
14899
|
+
onAccountClick,
|
|
14900
|
+
onCustomerClick,
|
|
14901
|
+
onCounterpartyClick,
|
|
14902
|
+
onOFACClick,
|
|
14903
|
+
onProductClick
|
|
14904
|
+
}) => {
|
|
14906
14905
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14907
14906
|
PageLayout,
|
|
14908
14907
|
{
|
|
@@ -14918,7 +14917,7 @@ var TransactionDetail = () => {
|
|
|
14918
14917
|
isInbound: transaction.isInbound
|
|
14919
14918
|
}
|
|
14920
14919
|
),
|
|
14921
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant:
|
|
14920
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
|
|
14922
14921
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
|
|
14923
14922
|
] }),
|
|
14924
14923
|
maxWidth: "full",
|
|
@@ -14926,12 +14925,12 @@ var TransactionDetail = () => {
|
|
|
14926
14925
|
{
|
|
14927
14926
|
label: "Return",
|
|
14928
14927
|
variant: "outline",
|
|
14929
|
-
onClick:
|
|
14928
|
+
onClick: onReturn
|
|
14930
14929
|
},
|
|
14931
14930
|
{
|
|
14932
14931
|
label: "Cancel",
|
|
14933
14932
|
variant: "default",
|
|
14934
|
-
onClick:
|
|
14933
|
+
onClick: onCancel
|
|
14935
14934
|
}
|
|
14936
14935
|
],
|
|
14937
14936
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
|
|
@@ -14941,7 +14940,15 @@ var TransactionDetail = () => {
|
|
|
14941
14940
|
InfoField,
|
|
14942
14941
|
{
|
|
14943
14942
|
label: "Account Number",
|
|
14944
|
-
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14943
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14944
|
+
Button,
|
|
14945
|
+
{
|
|
14946
|
+
variant: "link",
|
|
14947
|
+
className: "h-auto p-0 text-sm",
|
|
14948
|
+
onClick: () => onAccountClick(transaction.accountNumber),
|
|
14949
|
+
children: transaction.accountNumber
|
|
14950
|
+
}
|
|
14951
|
+
),
|
|
14945
14952
|
layout: "horizontal"
|
|
14946
14953
|
}
|
|
14947
14954
|
),
|
|
@@ -14949,7 +14956,15 @@ var TransactionDetail = () => {
|
|
|
14949
14956
|
InfoField,
|
|
14950
14957
|
{
|
|
14951
14958
|
label: "Customer",
|
|
14952
|
-
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14959
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14960
|
+
Button,
|
|
14961
|
+
{
|
|
14962
|
+
variant: "link",
|
|
14963
|
+
className: "h-auto p-0 text-sm",
|
|
14964
|
+
onClick: () => onCustomerClick(transaction.customer),
|
|
14965
|
+
children: transaction.customer
|
|
14966
|
+
}
|
|
14967
|
+
),
|
|
14953
14968
|
layout: "horizontal"
|
|
14954
14969
|
}
|
|
14955
14970
|
),
|
|
@@ -14958,12 +14973,35 @@ var TransactionDetail = () => {
|
|
|
14958
14973
|
InfoField,
|
|
14959
14974
|
{
|
|
14960
14975
|
label: "Counterparty",
|
|
14961
|
-
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14976
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14977
|
+
Button,
|
|
14978
|
+
{
|
|
14979
|
+
variant: "link",
|
|
14980
|
+
className: "h-auto p-0 text-sm",
|
|
14981
|
+
onClick: () => onCounterpartyClick(transaction.counterparty),
|
|
14982
|
+
children: transaction.counterparty
|
|
14983
|
+
}
|
|
14984
|
+
),
|
|
14962
14985
|
layout: "horizontal"
|
|
14963
14986
|
}
|
|
14964
14987
|
),
|
|
14965
14988
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
|
|
14966
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14989
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14990
|
+
InfoField,
|
|
14991
|
+
{
|
|
14992
|
+
label: "OFAC ID",
|
|
14993
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14994
|
+
Button,
|
|
14995
|
+
{
|
|
14996
|
+
variant: "link",
|
|
14997
|
+
className: "h-auto p-0 text-sm",
|
|
14998
|
+
onClick: () => onOFACClick("18323208"),
|
|
14999
|
+
children: "18323208"
|
|
15000
|
+
}
|
|
15001
|
+
),
|
|
15002
|
+
layout: "horizontal"
|
|
15003
|
+
}
|
|
15004
|
+
),
|
|
14967
15005
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Original Filename", value: "-", layout: "horizontal" }),
|
|
14968
15006
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Loaded From File", value: "iso21130757012764355B7.xml.126534273Q299", layout: "horizontal" }),
|
|
14969
15007
|
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Payment ID", value: transaction.id, layout: "horizontal" }),
|
|
@@ -14979,7 +15017,15 @@ var TransactionDetail = () => {
|
|
|
14979
15017
|
InfoField,
|
|
14980
15018
|
{
|
|
14981
15019
|
label: "Product ID",
|
|
14982
|
-
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15020
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15021
|
+
Button,
|
|
15022
|
+
{
|
|
15023
|
+
variant: "link",
|
|
15024
|
+
className: "h-auto p-0 text-sm",
|
|
15025
|
+
onClick: () => onProductClick("130"),
|
|
15026
|
+
children: "130"
|
|
15027
|
+
}
|
|
15028
|
+
),
|
|
14983
15029
|
layout: "horizontal"
|
|
14984
15030
|
}
|
|
14985
15031
|
),
|
|
@@ -14989,11 +15035,66 @@ var TransactionDetail = () => {
|
|
|
14989
15035
|
isACHTransfer && transaction.achDetails && /* @__PURE__ */ jsxRuntime.jsx(ACHDetailsSection, { data: transaction.achDetails }),
|
|
14990
15036
|
isWireTransfer && transaction.wireDetails && /* @__PURE__ */ jsxRuntime.jsx(WireDetailsSection, { data: transaction.wireDetails })
|
|
14991
15037
|
] }),
|
|
14992
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Transaction Timeline", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTimeline, { events:
|
|
15038
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Transaction Timeline", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTimeline, { events: timelineEvents }) }) })
|
|
14993
15039
|
] })
|
|
14994
15040
|
}
|
|
14995
15041
|
);
|
|
14996
15042
|
};
|
|
15043
|
+
var TransactionDetail = () => {
|
|
15044
|
+
const { id } = reactRouterDom.useParams();
|
|
15045
|
+
const navigate = reactRouterDom.useNavigate();
|
|
15046
|
+
const transaction = mockTransactions.find((t) => t.id === id);
|
|
15047
|
+
if (!transaction) {
|
|
15048
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
15049
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-2", children: "Transaction Not Found" }),
|
|
15050
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground mb-4", children: [
|
|
15051
|
+
"The transaction #",
|
|
15052
|
+
id,
|
|
15053
|
+
" could not be found."
|
|
15054
|
+
] }),
|
|
15055
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => navigate("/transactions/history"), children: "Back to Transaction History" })
|
|
15056
|
+
] }) });
|
|
15057
|
+
}
|
|
15058
|
+
const isWireTransfer = transaction.transactionType.toLowerCase().includes("wire");
|
|
15059
|
+
const isACHTransfer = transaction.transactionType.toLowerCase().includes("ach");
|
|
15060
|
+
const handleReturn = () => {
|
|
15061
|
+
console.log("Return transaction");
|
|
15062
|
+
};
|
|
15063
|
+
const handleCancel = () => {
|
|
15064
|
+
console.log("Cancel transaction");
|
|
15065
|
+
};
|
|
15066
|
+
const handleAccountClick = (accountNumber) => {
|
|
15067
|
+
navigate(`/accounts/${accountNumber}`);
|
|
15068
|
+
};
|
|
15069
|
+
const handleCustomerClick = (customer) => {
|
|
15070
|
+
console.log("Navigate to customer:", customer);
|
|
15071
|
+
};
|
|
15072
|
+
const handleCounterpartyClick = (counterparty) => {
|
|
15073
|
+
console.log("Navigate to counterparty:", counterparty);
|
|
15074
|
+
};
|
|
15075
|
+
const handleOFACClick = (ofacId) => {
|
|
15076
|
+
navigate(`/compliance/ofac/${ofacId}`);
|
|
15077
|
+
};
|
|
15078
|
+
const handleProductClick = (productId) => {
|
|
15079
|
+
console.log("Navigate to product:", productId);
|
|
15080
|
+
};
|
|
15081
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15082
|
+
TransactionDetailView,
|
|
15083
|
+
{
|
|
15084
|
+
transaction,
|
|
15085
|
+
timelineEvents: mockTransactionTimeline,
|
|
15086
|
+
isWireTransfer,
|
|
15087
|
+
isACHTransfer,
|
|
15088
|
+
onReturn: handleReturn,
|
|
15089
|
+
onCancel: handleCancel,
|
|
15090
|
+
onAccountClick: handleAccountClick,
|
|
15091
|
+
onCustomerClick: handleCustomerClick,
|
|
15092
|
+
onCounterpartyClick: handleCounterpartyClick,
|
|
15093
|
+
onOFACClick: handleOFACClick,
|
|
15094
|
+
onProductClick: handleProductClick
|
|
15095
|
+
}
|
|
15096
|
+
);
|
|
15097
|
+
};
|
|
14997
15098
|
var TransactionDetail_default = TransactionDetail;
|
|
14998
15099
|
function UIKit() {
|
|
14999
15100
|
const breadcrumbs = [
|
|
@@ -15312,7 +15413,7 @@ var mockVelocityLimits = [
|
|
|
15312
15413
|
comparisonMethod: "fuzzy"
|
|
15313
15414
|
}
|
|
15314
15415
|
];
|
|
15315
|
-
var
|
|
15416
|
+
var getStatusVariant2 = (status) => {
|
|
15316
15417
|
switch (status) {
|
|
15317
15418
|
case "ACTIVE":
|
|
15318
15419
|
return "success";
|
|
@@ -15428,7 +15529,7 @@ function VelocityLimits() {
|
|
|
15428
15529
|
key: "status",
|
|
15429
15530
|
title: "Status",
|
|
15430
15531
|
sortable: true,
|
|
15431
|
-
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant:
|
|
15532
|
+
render: (value) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getStatusVariant2(value), children: value })
|
|
15432
15533
|
},
|
|
15433
15534
|
{
|
|
15434
15535
|
key: "associatedEntity",
|
|
@@ -15811,7 +15912,7 @@ function CreateVelocityLimit() {
|
|
|
15811
15912
|
] }) }) }) }) })
|
|
15812
15913
|
] });
|
|
15813
15914
|
}
|
|
15814
|
-
var
|
|
15915
|
+
var getStatusVariant3 = (status) => {
|
|
15815
15916
|
switch (status) {
|
|
15816
15917
|
case "ACTIVE":
|
|
15817
15918
|
return "success";
|
|
@@ -16048,7 +16149,7 @@ function VelocityLimitDetail() {
|
|
|
16048
16149
|
{
|
|
16049
16150
|
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
16050
16151
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: limit.limitName }),
|
|
16051
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant:
|
|
16152
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: getStatusVariant3(limit.status), children: limit.status })
|
|
16052
16153
|
] }),
|
|
16053
16154
|
cards: [
|
|
16054
16155
|
{
|