braid-ui 1.0.51 → 1.0.52
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 +317 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +317 -319
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3099,7 +3099,7 @@ function AppSidebar() {
|
|
|
3099
3099
|
] });
|
|
3100
3100
|
}
|
|
3101
3101
|
var MainLayout = ({ children }) => {
|
|
3102
|
-
return /* @__PURE__ */ jsxRuntime.jsx("
|
|
3102
|
+
return /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 h-full overflow-y-auto", children });
|
|
3103
3103
|
};
|
|
3104
3104
|
var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel }) => {
|
|
3105
3105
|
const [localEditing, setLocalEditing] = React15.useState(initialEditing);
|
|
@@ -8550,364 +8550,362 @@ var NewTransactionView = ({
|
|
|
8550
8550
|
items: reviewItems
|
|
8551
8551
|
}
|
|
8552
8552
|
];
|
|
8553
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
|
|
8553
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto p-6 space-y-6 max-w-4xl", children: [
|
|
8554
8554
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "New Transaction" }) }),
|
|
8555
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
8556
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
FormInput,
|
|
8560
|
-
{
|
|
8561
|
-
name: "accountNumber",
|
|
8562
|
-
placeholder: "Enter account number"
|
|
8563
|
-
}
|
|
8564
|
-
) }),
|
|
8565
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8566
|
-
Button,
|
|
8567
|
-
{
|
|
8568
|
-
onClick: onAccountLookup,
|
|
8569
|
-
disabled: !accountNumber || isAccountLoading,
|
|
8570
|
-
className: "shrink-0 mt-0 w-48",
|
|
8571
|
-
children: isAccountLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8572
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
8573
|
-
"Looking up..."
|
|
8574
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8575
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4 mr-2" }),
|
|
8576
|
-
"Lookup Account"
|
|
8577
|
-
] })
|
|
8578
|
-
}
|
|
8579
|
-
)
|
|
8580
|
-
] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8581
|
-
FormCard,
|
|
8555
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: (e) => e.preventDefault(), children: [
|
|
8556
|
+
!accountLookedUp ? /* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Account Lookup", variant: "default", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 items-start w-full", children: [
|
|
8557
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8558
|
+
FormInput,
|
|
8582
8559
|
{
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
headerActions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8586
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-5 w-5 text-success" }),
|
|
8587
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: onEditAccount, children: [
|
|
8588
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-1" }),
|
|
8589
|
-
"Edit"
|
|
8590
|
-
] })
|
|
8591
|
-
] }),
|
|
8592
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DataGrid, { data: accountDataGrid, columns: 2 })
|
|
8560
|
+
name: "accountNumber",
|
|
8561
|
+
placeholder: "Enter account number"
|
|
8593
8562
|
}
|
|
8594
|
-
),
|
|
8563
|
+
) }),
|
|
8595
8564
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8596
|
-
|
|
8565
|
+
Button,
|
|
8597
8566
|
{
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
className:
|
|
8601
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
|
|
8567
|
+
onClick: onAccountLookup,
|
|
8568
|
+
disabled: !accountNumber || isAccountLoading,
|
|
8569
|
+
className: "shrink-0 mt-0 w-48",
|
|
8570
|
+
children: isAccountLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8571
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
8572
|
+
"Looking up..."
|
|
8573
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8574
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4 mr-2" }),
|
|
8575
|
+
"Lookup Account"
|
|
8576
|
+
] })
|
|
8577
|
+
}
|
|
8578
|
+
)
|
|
8579
|
+
] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8580
|
+
FormCard,
|
|
8581
|
+
{
|
|
8582
|
+
title: "Account Information",
|
|
8583
|
+
variant: "subtle",
|
|
8584
|
+
headerActions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8585
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-5 w-5 text-success" }),
|
|
8586
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: onEditAccount, children: [
|
|
8587
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-1" }),
|
|
8588
|
+
"Edit"
|
|
8589
|
+
] })
|
|
8590
|
+
] }),
|
|
8591
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DataGrid, { data: accountDataGrid, columns: 2 })
|
|
8592
|
+
}
|
|
8593
|
+
),
|
|
8594
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8595
|
+
FormCard,
|
|
8596
|
+
{
|
|
8597
|
+
title: "Transaction Type",
|
|
8598
|
+
variant: "default",
|
|
8599
|
+
className: cn(!accountLookedUp && "opacity-50 pointer-events-none"),
|
|
8600
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3 lg:gap-4", children: TRANSACTION_TYPES.map((type) => {
|
|
8601
|
+
const Icon2 = type.icon;
|
|
8602
|
+
const isSelected = transactionType === type.value;
|
|
8603
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8604
|
+
"button",
|
|
8605
|
+
{
|
|
8606
|
+
type: "button",
|
|
8607
|
+
onClick: () => onTransactionTypeChange(type.value),
|
|
8608
|
+
disabled: !accountLookedUp,
|
|
8609
|
+
className: cn(
|
|
8610
|
+
"flex flex-col items-center justify-center p-4 lg:p-3 rounded-lg border-2 transition-all",
|
|
8611
|
+
"hover:border-primary/50 hover:shadow-md",
|
|
8612
|
+
isSelected ? "border-primary bg-primary/5 shadow-sm" : "border-border bg-card"
|
|
8613
|
+
),
|
|
8614
|
+
children: [
|
|
8615
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: cn(
|
|
8616
|
+
"h-6 w-6 lg:h-5 lg:w-5 mb-2",
|
|
8617
|
+
isSelected ? "text-primary" : "text-muted-foreground"
|
|
8618
|
+
) }),
|
|
8619
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
8620
|
+
"text-sm font-medium",
|
|
8621
|
+
isSelected ? "text-primary" : "text-foreground"
|
|
8622
|
+
), children: type.label })
|
|
8623
|
+
]
|
|
8624
|
+
},
|
|
8625
|
+
type.value
|
|
8626
|
+
);
|
|
8627
|
+
}) })
|
|
8628
|
+
}
|
|
8629
|
+
),
|
|
8630
|
+
requiresCounterparty && (!counterpartyLookedUp ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8631
|
+
FormCard,
|
|
8632
|
+
{
|
|
8633
|
+
title: "Counterparty Search",
|
|
8634
|
+
variant: "default",
|
|
8635
|
+
className: cn(!transactionType && "opacity-50 pointer-events-none"),
|
|
8636
|
+
children: [
|
|
8637
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
8638
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
8639
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8640
|
+
"input",
|
|
8641
|
+
{
|
|
8642
|
+
type: "text",
|
|
8643
|
+
placeholder: "Start typing to search counterparties...",
|
|
8644
|
+
value: counterpartyName,
|
|
8645
|
+
onChange: (e) => onCounterpartySearchChange(e.target.value),
|
|
8646
|
+
disabled: !transactionType,
|
|
8647
|
+
className: cn(
|
|
8648
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
8649
|
+
"ring-offset-background placeholder:text-muted-foreground",
|
|
8650
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
8651
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
8652
|
+
isCounterpartySearching && "pr-10"
|
|
8653
|
+
)
|
|
8654
|
+
}
|
|
8655
|
+
),
|
|
8656
|
+
isCounterpartySearching && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) })
|
|
8657
|
+
] }),
|
|
8658
|
+
showCounterpartyDropdown && counterpartySearchResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg max-h-60 overflow-auto", children: counterpartySearchResults.map((result) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8605
8659
|
"button",
|
|
8606
8660
|
{
|
|
8607
8661
|
type: "button",
|
|
8608
|
-
onClick: () =>
|
|
8609
|
-
|
|
8610
|
-
className: cn(
|
|
8611
|
-
"flex flex-col items-center justify-center p-4 lg:p-3 rounded-lg border-2 transition-all",
|
|
8612
|
-
"hover:border-primary/50 hover:shadow-md",
|
|
8613
|
-
isSelected ? "border-primary bg-primary/5 shadow-sm" : "border-border bg-card"
|
|
8614
|
-
),
|
|
8662
|
+
onClick: () => onCounterpartySelect(result),
|
|
8663
|
+
className: "w-full px-3 py-2 text-left hover:bg-accent transition-colors",
|
|
8615
8664
|
children: [
|
|
8616
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8617
|
-
|
|
8618
|
-
isSelected ? "text-primary" : "text-muted-foreground"
|
|
8619
|
-
) }),
|
|
8620
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
8621
|
-
"text-sm font-medium",
|
|
8622
|
-
isSelected ? "text-primary" : "text-foreground"
|
|
8623
|
-
), children: type.label })
|
|
8665
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-sm", children: result.name }),
|
|
8666
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: result.id })
|
|
8624
8667
|
]
|
|
8625
8668
|
},
|
|
8626
|
-
|
|
8627
|
-
)
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
{
|
|
8634
|
-
title: "Counterparty Search",
|
|
8635
|
-
variant: "default",
|
|
8636
|
-
className: cn(!transactionType && "opacity-50 pointer-events-none"),
|
|
8637
|
-
children: [
|
|
8638
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
8639
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
8640
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8641
|
-
"input",
|
|
8642
|
-
{
|
|
8643
|
-
type: "text",
|
|
8644
|
-
placeholder: "Start typing to search counterparties...",
|
|
8645
|
-
value: counterpartyName,
|
|
8646
|
-
onChange: (e) => onCounterpartySearchChange(e.target.value),
|
|
8647
|
-
disabled: !transactionType,
|
|
8648
|
-
className: cn(
|
|
8649
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
8650
|
-
"ring-offset-background placeholder:text-muted-foreground",
|
|
8651
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
8652
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
8653
|
-
isCounterpartySearching && "pr-10"
|
|
8654
|
-
)
|
|
8655
|
-
}
|
|
8656
|
-
),
|
|
8657
|
-
isCounterpartySearching && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }) })
|
|
8658
|
-
] }),
|
|
8659
|
-
showCounterpartyDropdown && counterpartySearchResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg max-h-60 overflow-auto", children: counterpartySearchResults.map((result) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8660
|
-
"button",
|
|
8661
|
-
{
|
|
8662
|
-
type: "button",
|
|
8663
|
-
onClick: () => onCounterpartySelect(result),
|
|
8664
|
-
className: "w-full px-3 py-2 text-left hover:bg-accent transition-colors",
|
|
8665
|
-
children: [
|
|
8666
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-sm", children: result.name }),
|
|
8667
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: result.id })
|
|
8668
|
-
]
|
|
8669
|
-
},
|
|
8670
|
-
result.id
|
|
8671
|
-
)) }),
|
|
8672
|
-
showCounterpartyDropdown && counterpartySearchResults.length === 0 && !isCounterpartySearching && counterpartyName.length >= 2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
8673
|
-
'No counterparties found matching "',
|
|
8674
|
-
counterpartyName,
|
|
8675
|
-
'"'
|
|
8676
|
-
] }) })
|
|
8677
|
-
] }),
|
|
8678
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: "Type at least 2 characters to search" })
|
|
8679
|
-
]
|
|
8680
|
-
}
|
|
8681
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8682
|
-
FormCard,
|
|
8683
|
-
{
|
|
8684
|
-
title: "Counterparty Information",
|
|
8685
|
-
variant: "subtle",
|
|
8686
|
-
headerActions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8687
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-5 w-5 text-success" }),
|
|
8688
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: onEditCounterparty, children: [
|
|
8689
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-1" }),
|
|
8690
|
-
"Edit"
|
|
8691
|
-
] })
|
|
8669
|
+
result.id
|
|
8670
|
+
)) }),
|
|
8671
|
+
showCounterpartyDropdown && counterpartySearchResults.length === 0 && !isCounterpartySearching && counterpartyName.length >= 2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
8672
|
+
'No counterparties found matching "',
|
|
8673
|
+
counterpartyName,
|
|
8674
|
+
'"'
|
|
8675
|
+
] }) })
|
|
8692
8676
|
] }),
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8677
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: "Type at least 2 characters to search" })
|
|
8678
|
+
]
|
|
8679
|
+
}
|
|
8680
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8681
|
+
FormCard,
|
|
8682
|
+
{
|
|
8683
|
+
title: "Counterparty Information",
|
|
8684
|
+
variant: "subtle",
|
|
8685
|
+
headerActions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8686
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-5 w-5 text-success" }),
|
|
8687
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: onEditCounterparty, children: [
|
|
8688
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-1" }),
|
|
8689
|
+
"Edit"
|
|
8690
|
+
] })
|
|
8691
|
+
] }),
|
|
8692
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DataGrid, { data: counterpartyDataGrid, columns: 2 })
|
|
8693
|
+
}
|
|
8694
|
+
)),
|
|
8695
|
+
isTransfer && (!receiverAccountLookedUp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8696
|
+
FormCard,
|
|
8697
|
+
{
|
|
8698
|
+
title: "Receiver Account",
|
|
8699
|
+
variant: "default",
|
|
8700
|
+
className: cn(!transactionType && "opacity-50 pointer-events-none"),
|
|
8701
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 items-start w-full", children: [
|
|
8702
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8703
|
+
FormInput,
|
|
8704
|
+
{
|
|
8705
|
+
name: "receiverAccountNumber",
|
|
8706
|
+
placeholder: "Enter receiver account number",
|
|
8707
|
+
disabled: !transactionType
|
|
8708
|
+
}
|
|
8709
|
+
) }),
|
|
8710
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8711
|
+
Button,
|
|
8712
|
+
{
|
|
8713
|
+
onClick: onReceiverAccountLookup,
|
|
8714
|
+
disabled: !receiverAccountNumber || isReceiverAccountLoading,
|
|
8715
|
+
className: "shrink-0 mt-0 w-48",
|
|
8716
|
+
children: isReceiverAccountLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8717
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
8718
|
+
"Looking up..."
|
|
8719
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8720
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4 mr-2" }),
|
|
8721
|
+
"Lookup Receiver"
|
|
8722
|
+
] })
|
|
8723
|
+
}
|
|
8724
|
+
)
|
|
8725
|
+
] })
|
|
8726
|
+
}
|
|
8727
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8728
|
+
FormCard,
|
|
8729
|
+
{
|
|
8730
|
+
title: "Receiver Account Information",
|
|
8731
|
+
variant: "subtle",
|
|
8732
|
+
headerActions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8733
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-5 w-5 text-success" }),
|
|
8734
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: onEditReceiverAccount, children: [
|
|
8735
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-1" }),
|
|
8736
|
+
"Edit"
|
|
8737
|
+
] })
|
|
8738
|
+
] }),
|
|
8739
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DataGrid, { data: receiverAccountDataGrid, columns: 2 })
|
|
8740
|
+
}
|
|
8741
|
+
)),
|
|
8742
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8743
|
+
FormCard,
|
|
8744
|
+
{
|
|
8745
|
+
title: "Transaction Details",
|
|
8746
|
+
variant: "default",
|
|
8747
|
+
className: cn(
|
|
8748
|
+
requiresCounterparty ? !counterpartyLookedUp && "opacity-50 pointer-events-none" : isTransfer ? !receiverAccountLookedUp && "opacity-50 pointer-events-none" : !transactionType && "opacity-50 pointer-events-none"
|
|
8749
|
+
),
|
|
8750
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
8751
|
+
isAdjustment && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
|
|
8752
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8753
|
+
FormSelect,
|
|
8705
8754
|
{
|
|
8706
|
-
name: "
|
|
8707
|
-
|
|
8755
|
+
name: "adjustmentDirection",
|
|
8756
|
+
label: "Direction",
|
|
8757
|
+
placeholder: "Select direction",
|
|
8758
|
+
options: ADJUSTMENT_DIRECTION_OPTIONS,
|
|
8708
8759
|
disabled: !transactionType
|
|
8709
8760
|
}
|
|
8710
|
-
)
|
|
8761
|
+
),
|
|
8711
8762
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8712
|
-
|
|
8763
|
+
FormSelect,
|
|
8713
8764
|
{
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
"Looking up..."
|
|
8720
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8721
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4 mr-2" }),
|
|
8722
|
-
"Lookup Receiver"
|
|
8723
|
-
] })
|
|
8765
|
+
name: "adjustmentType",
|
|
8766
|
+
label: "Adjustment Type",
|
|
8767
|
+
placeholder: "Select type",
|
|
8768
|
+
options: ADJUSTMENT_TYPE_OPTIONS,
|
|
8769
|
+
disabled: !transactionType
|
|
8724
8770
|
}
|
|
8725
8771
|
)
|
|
8726
|
-
] })
|
|
8727
|
-
}
|
|
8728
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8729
|
-
FormCard,
|
|
8730
|
-
{
|
|
8731
|
-
title: "Receiver Account Information",
|
|
8732
|
-
variant: "subtle",
|
|
8733
|
-
headerActions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8734
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-5 w-5 text-success" }),
|
|
8735
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: onEditReceiverAccount, children: [
|
|
8736
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4 mr-1" }),
|
|
8737
|
-
"Edit"
|
|
8738
|
-
] })
|
|
8739
8772
|
] }),
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8773
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8774
|
+
reactHookForm.Controller,
|
|
8775
|
+
{
|
|
8776
|
+
name: "amount",
|
|
8777
|
+
control: form.control,
|
|
8778
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8779
|
+
CurrencyInput,
|
|
8780
|
+
{
|
|
8781
|
+
label: "Amount",
|
|
8782
|
+
value: field.value,
|
|
8783
|
+
onChange: field.onChange,
|
|
8784
|
+
disabled: requiresCounterparty ? !counterpartyLookedUp : isTransfer ? !receiverAccountLookedUp : !transactionType,
|
|
8785
|
+
error: form.formState.errors.amount?.message
|
|
8786
|
+
}
|
|
8787
|
+
)
|
|
8788
|
+
}
|
|
8750
8789
|
),
|
|
8751
|
-
|
|
8752
|
-
|
|
8790
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8791
|
+
FormInput,
|
|
8792
|
+
{
|
|
8793
|
+
name: "description",
|
|
8794
|
+
label: "Description (Optional)",
|
|
8795
|
+
placeholder: "Enter transaction description",
|
|
8796
|
+
disabled: requiresCounterparty ? !counterpartyLookedUp : isTransfer ? !receiverAccountLookedUp : !transactionType
|
|
8797
|
+
}
|
|
8798
|
+
)
|
|
8799
|
+
] })
|
|
8800
|
+
}
|
|
8801
|
+
),
|
|
8802
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormCard, { title: "Review & Submit", variant: "default", className: cn(!isReviewReady && "opacity-50 pointer-events-none"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
8803
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataGrid, { data: reviewData, columns: 2 }),
|
|
8804
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted/30 rounded-lg p-4 border border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8805
|
+
reactHookForm.Controller,
|
|
8806
|
+
{
|
|
8807
|
+
name: "certifyInformation",
|
|
8808
|
+
control: form.control,
|
|
8809
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
8810
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
8753
8811
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8754
|
-
|
|
8812
|
+
Checkbox,
|
|
8755
8813
|
{
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
options: ADJUSTMENT_DIRECTION_OPTIONS,
|
|
8760
|
-
disabled: !transactionType
|
|
8814
|
+
id: "certifyInformation",
|
|
8815
|
+
checked: field.value,
|
|
8816
|
+
onCheckedChange: field.onChange
|
|
8761
8817
|
}
|
|
8762
8818
|
),
|
|
8763
8819
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8764
|
-
|
|
8820
|
+
"label",
|
|
8765
8821
|
{
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
options: ADJUSTMENT_TYPE_OPTIONS,
|
|
8770
|
-
disabled: !transactionType
|
|
8822
|
+
htmlFor: "certifyInformation",
|
|
8823
|
+
className: "text-sm font-medium leading-relaxed cursor-pointer select-none",
|
|
8824
|
+
children: "I certify that all information entered is correct and accurate to the best of my knowledge"
|
|
8771
8825
|
}
|
|
8772
8826
|
)
|
|
8773
8827
|
] }),
|
|
8774
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8775
|
-
reactHookForm.Controller,
|
|
8776
|
-
{
|
|
8777
|
-
name: "amount",
|
|
8778
|
-
control: form.control,
|
|
8779
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8780
|
-
CurrencyInput,
|
|
8781
|
-
{
|
|
8782
|
-
label: "Amount",
|
|
8783
|
-
value: field.value,
|
|
8784
|
-
onChange: field.onChange,
|
|
8785
|
-
disabled: requiresCounterparty ? !counterpartyLookedUp : isTransfer ? !receiverAccountLookedUp : !transactionType,
|
|
8786
|
-
error: form.formState.errors.amount?.message
|
|
8787
|
-
}
|
|
8788
|
-
)
|
|
8789
|
-
}
|
|
8790
|
-
),
|
|
8791
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8792
|
-
FormInput,
|
|
8793
|
-
{
|
|
8794
|
-
name: "description",
|
|
8795
|
-
label: "Description (Optional)",
|
|
8796
|
-
placeholder: "Enter transaction description",
|
|
8797
|
-
disabled: requiresCounterparty ? !counterpartyLookedUp : isTransfer ? !receiverAccountLookedUp : !transactionType
|
|
8798
|
-
}
|
|
8799
|
-
)
|
|
8828
|
+
form.formState.errors.certifyInformation && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive ml-7", children: form.formState.errors.certifyInformation.message })
|
|
8800
8829
|
] })
|
|
8801
8830
|
}
|
|
8802
|
-
),
|
|
8803
|
-
/* @__PURE__ */ jsxRuntime.
|
|
8804
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8805
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted/30 rounded-lg p-4 border border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8806
|
-
reactHookForm.Controller,
|
|
8807
|
-
{
|
|
8808
|
-
name: "certifyInformation",
|
|
8809
|
-
control: form.control,
|
|
8810
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
8811
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
8812
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8813
|
-
Checkbox,
|
|
8814
|
-
{
|
|
8815
|
-
id: "certifyInformation",
|
|
8816
|
-
checked: field.value,
|
|
8817
|
-
onCheckedChange: field.onChange
|
|
8818
|
-
}
|
|
8819
|
-
),
|
|
8820
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8821
|
-
"label",
|
|
8822
|
-
{
|
|
8823
|
-
htmlFor: "certifyInformation",
|
|
8824
|
-
className: "text-sm font-medium leading-relaxed cursor-pointer select-none",
|
|
8825
|
-
children: "I certify that all information entered is correct and accurate to the best of my knowledge"
|
|
8826
|
-
}
|
|
8827
|
-
)
|
|
8828
|
-
] }),
|
|
8829
|
-
form.formState.errors.certifyInformation && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive ml-7", children: form.formState.errors.certifyInformation.message })
|
|
8830
|
-
] })
|
|
8831
|
-
}
|
|
8832
|
-
) }),
|
|
8833
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-end pt-4 border-t border-border", children: [
|
|
8834
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onCancel, className: "w-32", children: "Cancel" }),
|
|
8835
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8836
|
-
Button,
|
|
8837
|
-
{
|
|
8838
|
-
type: "button",
|
|
8839
|
-
onClick: onSubmit,
|
|
8840
|
-
className: "w-48",
|
|
8841
|
-
disabled: !transactionType || !accountNumber || requiresCounterparty && !counterpartyName || isTransfer && !receiverAccountLookedUp || isAdjustment && (!adjustmentDirection || !adjustmentType) || !amount || !form.watch("certifyInformation") || isSubmitting,
|
|
8842
|
-
children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8843
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
8844
|
-
"Submitting..."
|
|
8845
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8846
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-4 w-4 mr-2" }),
|
|
8847
|
-
"Submit Transaction"
|
|
8848
|
-
] })
|
|
8849
|
-
}
|
|
8850
|
-
)
|
|
8851
|
-
] })
|
|
8852
|
-
] }) })
|
|
8853
|
-
] }) }),
|
|
8854
|
-
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: confirmationOpen, onOpenChange: () => {
|
|
8855
|
-
}, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-md", hideCloseButton: true, children: [
|
|
8856
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
8857
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
8858
|
-
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" }) }),
|
|
8859
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction Successful" : "Transaction Failed" })
|
|
8860
|
-
] }),
|
|
8861
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: "text-left", children: submissionStatus === "success" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
8862
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: "Your transaction has been successfully submitted and is being processed." }),
|
|
8863
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 rounded-lg p-4 space-y-2", children: [
|
|
8864
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8865
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Transaction ID:" }),
|
|
8866
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium", children: transactionId })
|
|
8867
|
-
] }),
|
|
8868
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8869
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Amount:" }),
|
|
8870
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatCurrency2(amount) })
|
|
8871
|
-
] }),
|
|
8872
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8873
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Type:" }),
|
|
8874
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: TRANSACTION_TYPES.find((t) => t.value === transactionType)?.label })
|
|
8875
|
-
] }),
|
|
8876
|
-
requiresCounterparty && counterpartyName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8877
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Counterparty:" }),
|
|
8878
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterpartyName })
|
|
8879
|
-
] })
|
|
8880
|
-
] }),
|
|
8881
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
|
|
8882
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-5 w-5 text-blue-500 mt-0.5 flex-shrink-0" }),
|
|
8883
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children: "You will receive a confirmation email once the transaction is completed." })
|
|
8884
|
-
] })
|
|
8885
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
8886
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
|
|
8887
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-5 w-5 text-destructive mt-0.5 flex-shrink-0" }),
|
|
8888
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
8889
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-destructive", children: "Error Processing Transaction" }),
|
|
8890
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: errorMessage })
|
|
8891
|
-
] })
|
|
8892
|
-
] }),
|
|
8893
|
-
/* @__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." })
|
|
8894
|
-
] }) })
|
|
8895
|
-
] }),
|
|
8896
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "sm:justify-end gap-2", children: [
|
|
8897
|
-
submissionStatus === "error" && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: () => onConfirmationOpenChange(false), children: "Edit" }),
|
|
8898
|
-
submissionStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onNewTransaction, children: "New Transaction" }),
|
|
8831
|
+
) }),
|
|
8832
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-end pt-4 border-t border-border", children: [
|
|
8833
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onCancel, className: "w-32", children: "Cancel" }),
|
|
8899
8834
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8900
8835
|
Button,
|
|
8901
8836
|
{
|
|
8902
8837
|
type: "button",
|
|
8903
|
-
onClick:
|
|
8904
|
-
|
|
8905
|
-
|
|
8838
|
+
onClick: onSubmit,
|
|
8839
|
+
className: "w-48",
|
|
8840
|
+
disabled: !transactionType || !accountNumber || requiresCounterparty && !counterpartyName || isTransfer && !receiverAccountLookedUp || isAdjustment && (!adjustmentDirection || !adjustmentType) || !amount || !form.watch("certifyInformation") || isSubmitting,
|
|
8841
|
+
children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8842
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
8843
|
+
"Submitting..."
|
|
8844
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8845
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-4 w-4 mr-2" }),
|
|
8846
|
+
"Submit Transaction"
|
|
8847
|
+
] })
|
|
8906
8848
|
}
|
|
8907
8849
|
)
|
|
8908
8850
|
] })
|
|
8909
8851
|
] }) })
|
|
8910
|
-
] })
|
|
8852
|
+
] }) }),
|
|
8853
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: confirmationOpen, onOpenChange: () => {
|
|
8854
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-md", hideCloseButton: true, children: [
|
|
8855
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
8856
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
8857
|
+
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" }) }),
|
|
8858
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-xl", children: submissionStatus === "success" ? "Transaction Successful" : "Transaction Failed" })
|
|
8859
|
+
] }),
|
|
8860
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: "text-left", children: submissionStatus === "success" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
8861
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: "Your transaction has been successfully submitted and is being processed." }),
|
|
8862
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-muted/50 rounded-lg p-4 space-y-2", children: [
|
|
8863
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8864
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Transaction ID:" }),
|
|
8865
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium", children: transactionId })
|
|
8866
|
+
] }),
|
|
8867
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8868
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Amount:" }),
|
|
8869
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatCurrency2(amount) })
|
|
8870
|
+
] }),
|
|
8871
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8872
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Type:" }),
|
|
8873
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: TRANSACTION_TYPES.find((t) => t.value === transactionType)?.label })
|
|
8874
|
+
] }),
|
|
8875
|
+
requiresCounterparty && counterpartyName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm", children: [
|
|
8876
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Counterparty:" }),
|
|
8877
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: counterpartyName })
|
|
8878
|
+
] })
|
|
8879
|
+
] }),
|
|
8880
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 p-3 bg-blue-500/10 border border-blue-500/20 rounded-lg", children: [
|
|
8881
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-5 w-5 text-blue-500 mt-0.5 flex-shrink-0" }),
|
|
8882
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-blue-700 dark:text-blue-300", children: "You will receive a confirmation email once the transaction is completed." })
|
|
8883
|
+
] })
|
|
8884
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
8885
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
|
|
8886
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-5 w-5 text-destructive mt-0.5 flex-shrink-0" }),
|
|
8887
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
8888
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-destructive", children: "Error Processing Transaction" }),
|
|
8889
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: errorMessage })
|
|
8890
|
+
] })
|
|
8891
|
+
] }),
|
|
8892
|
+
/* @__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." })
|
|
8893
|
+
] }) })
|
|
8894
|
+
] }),
|
|
8895
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "sm:justify-end gap-2", children: [
|
|
8896
|
+
submissionStatus === "error" && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: () => onConfirmationOpenChange(false), children: "Edit" }),
|
|
8897
|
+
submissionStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: onNewTransaction, children: "New Transaction" }),
|
|
8898
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8899
|
+
Button,
|
|
8900
|
+
{
|
|
8901
|
+
type: "button",
|
|
8902
|
+
onClick: onConfirmationClose,
|
|
8903
|
+
variant: submissionStatus === "success" ? "default" : "outline",
|
|
8904
|
+
children: submissionStatus === "success" ? "View Transaction" : "Close"
|
|
8905
|
+
}
|
|
8906
|
+
)
|
|
8907
|
+
] })
|
|
8908
|
+
] }) })
|
|
8911
8909
|
] });
|
|
8912
8910
|
};
|
|
8913
8911
|
var typeIcons = {
|