braid-ui 1.0.39 → 1.0.40
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 +627 -626
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +627 -627
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5783,169 +5783,377 @@ var CounterpartiesView = ({
|
|
|
5783
5783
|
] });
|
|
5784
5784
|
};
|
|
5785
5785
|
|
|
5786
|
-
// src/lib/mock-data/
|
|
5787
|
-
var
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
description: "ACH transfer for Acme Corporation"
|
|
5804
|
-
},
|
|
5805
|
-
bankDetails: defaultACHBankDetails
|
|
5806
|
-
};
|
|
5807
|
-
var ACHBankCard = ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }) => {
|
|
5808
|
-
const form = useFormWithEditState({
|
|
5809
|
-
schema: achTransferSchema,
|
|
5810
|
-
defaultValues: { ...defaultACHTransfer, ...data },
|
|
5811
|
-
initialEditing: isEditing,
|
|
5812
|
-
onToggleEdit,
|
|
5813
|
-
onSave: onDataChange
|
|
5814
|
-
});
|
|
5815
|
-
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5816
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5817
|
-
FormInput,
|
|
5818
|
-
{
|
|
5819
|
-
name: "bankDetails.gatewayRoutingNumber",
|
|
5820
|
-
label: "Gateway Routing Number",
|
|
5821
|
-
placeholder: "Enter gateway routing number",
|
|
5822
|
-
pattern: "[0-9]{9}",
|
|
5823
|
-
maxLength: 9,
|
|
5824
|
-
hint: "9-digit gateway routing number",
|
|
5825
|
-
required: true
|
|
5826
|
-
}
|
|
5827
|
-
),
|
|
5828
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5829
|
-
FormInput,
|
|
5830
|
-
{
|
|
5831
|
-
name: "bankDetails.rdfiNumberQualifier",
|
|
5832
|
-
label: "RDFI Number Qualifier",
|
|
5833
|
-
placeholder: "Enter RDFI qualifier",
|
|
5834
|
-
maxLength: 2,
|
|
5835
|
-
hint: "2-digit RDFI number qualifier",
|
|
5836
|
-
required: true
|
|
5837
|
-
}
|
|
5838
|
-
)
|
|
5839
|
-
] }) }) });
|
|
5840
|
-
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
5841
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Gateway Routing Number", value: form.getValues("bankDetails.gatewayRoutingNumber"), layout: "horizontal" }),
|
|
5842
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "RDFI Number Qualifier", value: form.getValues("bankDetails.rdfiNumberQualifier"), layout: "horizontal" })
|
|
5843
|
-
] });
|
|
5844
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5845
|
-
EditableFormCard,
|
|
5846
|
-
{
|
|
5847
|
-
title: "ACH Bank Details",
|
|
5848
|
-
description: "ACH-specific routing and qualification information",
|
|
5849
|
-
variant: "subtle",
|
|
5850
|
-
className,
|
|
5851
|
-
isEditing: form.isEditing,
|
|
5852
|
-
onToggleEdit: form.handleToggleEdit,
|
|
5853
|
-
onSave: form.handleSave,
|
|
5854
|
-
onCancel: form.handleCancel,
|
|
5855
|
-
hideActions,
|
|
5856
|
-
isFormValid: form.isFormValid,
|
|
5857
|
-
isDirty: form.isDirty,
|
|
5858
|
-
editContent,
|
|
5859
|
-
viewContent
|
|
5860
|
-
}
|
|
5861
|
-
);
|
|
5786
|
+
// src/lib/mock-data/counterparty-data.ts
|
|
5787
|
+
var defaultCounterpartyDetail = {
|
|
5788
|
+
email: "contact@acme.com",
|
|
5789
|
+
phone: "+1 (555) 123-4567",
|
|
5790
|
+
dateOfBirth: "1985-03-15",
|
|
5791
|
+
idNumber: "ID-123456789",
|
|
5792
|
+
idType: "product_id",
|
|
5793
|
+
idValue: "PROD-001",
|
|
5794
|
+
address: {
|
|
5795
|
+
line1: "123 Business Ave",
|
|
5796
|
+
line2: "Suite 100",
|
|
5797
|
+
city: "New York",
|
|
5798
|
+
state: "NY",
|
|
5799
|
+
postalCode: "10001",
|
|
5800
|
+
countryCode: "US",
|
|
5801
|
+
type: "MAILING"
|
|
5802
|
+
}
|
|
5862
5803
|
};
|
|
5863
|
-
var
|
|
5804
|
+
var CounterpartyProfileCard = ({
|
|
5864
5805
|
data,
|
|
5865
5806
|
onDataChange,
|
|
5866
|
-
isEditing,
|
|
5807
|
+
isEditing = false,
|
|
5867
5808
|
onToggleEdit,
|
|
5868
|
-
|
|
5869
|
-
|
|
5809
|
+
hideActions = false,
|
|
5810
|
+
className
|
|
5870
5811
|
}) => {
|
|
5812
|
+
const navigate = reactRouterDom.useNavigate();
|
|
5871
5813
|
const form = useFormWithEditState({
|
|
5872
|
-
schema:
|
|
5873
|
-
defaultValues: { ...
|
|
5814
|
+
schema: counterpartyDetailSchema,
|
|
5815
|
+
defaultValues: { ...defaultCounterpartyDetail, ...data },
|
|
5874
5816
|
initialEditing: isEditing,
|
|
5875
5817
|
onToggleEdit,
|
|
5876
5818
|
onSave: onDataChange
|
|
5877
5819
|
});
|
|
5878
5820
|
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
5879
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-
|
|
5821
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5822
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5823
|
+
FormSelect,
|
|
5824
|
+
{
|
|
5825
|
+
name: "idType",
|
|
5826
|
+
label: "Associated with",
|
|
5827
|
+
placeholder: "Select association type",
|
|
5828
|
+
options: [
|
|
5829
|
+
{ value: "product_id", label: "Product ID" },
|
|
5830
|
+
{ value: "business_id", label: "Business ID" },
|
|
5831
|
+
{ value: "individual_id", label: "Individual ID" },
|
|
5832
|
+
{ value: "account_number", label: "Account Number" }
|
|
5833
|
+
]
|
|
5834
|
+
}
|
|
5835
|
+
),
|
|
5880
5836
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5881
5837
|
FormInput,
|
|
5882
5838
|
{
|
|
5883
|
-
name: "
|
|
5884
|
-
label: "
|
|
5885
|
-
placeholder: "Enter
|
|
5886
|
-
required: true
|
|
5839
|
+
name: "idValue",
|
|
5840
|
+
label: form.watch("idType") === "product_id" ? "Product ID" : form.watch("idType") === "business_id" ? "Business ID" : form.watch("idType") === "individual_id" ? "Individual ID" : "Account Number",
|
|
5841
|
+
placeholder: "Enter ID value"
|
|
5887
5842
|
}
|
|
5888
5843
|
),
|
|
5889
5844
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5890
5845
|
FormInput,
|
|
5891
5846
|
{
|
|
5892
|
-
name: "
|
|
5893
|
-
label: "
|
|
5894
|
-
|
|
5895
|
-
|
|
5847
|
+
name: "email",
|
|
5848
|
+
label: "Email",
|
|
5849
|
+
type: "email",
|
|
5850
|
+
placeholder: "Enter email address"
|
|
5851
|
+
}
|
|
5852
|
+
),
|
|
5853
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5854
|
+
FormInput,
|
|
5855
|
+
{
|
|
5856
|
+
name: "phone",
|
|
5857
|
+
label: "Phone Number",
|
|
5858
|
+
type: "tel",
|
|
5859
|
+
placeholder: "Enter phone number"
|
|
5860
|
+
}
|
|
5861
|
+
),
|
|
5862
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5863
|
+
FormInput,
|
|
5864
|
+
{
|
|
5865
|
+
name: "dateOfBirth",
|
|
5866
|
+
label: "Date of Birth",
|
|
5867
|
+
type: "date",
|
|
5868
|
+
placeholder: "Select date of birth"
|
|
5869
|
+
}
|
|
5870
|
+
),
|
|
5871
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5872
|
+
FormInput,
|
|
5873
|
+
{
|
|
5874
|
+
name: "idNumber",
|
|
5875
|
+
label: "ID Number",
|
|
5876
|
+
placeholder: "Enter ID number"
|
|
5896
5877
|
}
|
|
5897
5878
|
)
|
|
5898
5879
|
] }),
|
|
5899
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1
|
|
5880
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
5900
5881
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5901
|
-
|
|
5882
|
+
FormInput,
|
|
5902
5883
|
{
|
|
5903
|
-
name: "
|
|
5904
|
-
label: "
|
|
5905
|
-
placeholder: "
|
|
5906
|
-
options: [
|
|
5907
|
-
{ value: "business", label: "Business" },
|
|
5908
|
-
{ value: "individual", label: "Individual" }
|
|
5909
|
-
]
|
|
5884
|
+
name: "address.line1",
|
|
5885
|
+
label: "Street Address",
|
|
5886
|
+
placeholder: "Enter street address"
|
|
5910
5887
|
}
|
|
5911
5888
|
),
|
|
5912
5889
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5913
5890
|
FormInput,
|
|
5914
5891
|
{
|
|
5915
|
-
name: "
|
|
5916
|
-
label: "
|
|
5917
|
-
placeholder: "Enter
|
|
5892
|
+
name: "address.line2",
|
|
5893
|
+
label: "Apartment, suite, or floor",
|
|
5894
|
+
placeholder: "Enter apartment, suite, or floor"
|
|
5895
|
+
}
|
|
5896
|
+
)
|
|
5897
|
+
] }),
|
|
5898
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
5899
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5900
|
+
FormInput,
|
|
5901
|
+
{
|
|
5902
|
+
name: "address.city",
|
|
5903
|
+
label: "City",
|
|
5904
|
+
placeholder: "Enter city"
|
|
5905
|
+
}
|
|
5906
|
+
),
|
|
5907
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5908
|
+
FormInput,
|
|
5909
|
+
{
|
|
5910
|
+
name: "address.state",
|
|
5911
|
+
label: "State",
|
|
5912
|
+
placeholder: "Enter state"
|
|
5913
|
+
}
|
|
5914
|
+
),
|
|
5915
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5916
|
+
FormInput,
|
|
5917
|
+
{
|
|
5918
|
+
name: "address.postalCode",
|
|
5919
|
+
label: "Postal Code",
|
|
5920
|
+
placeholder: "Enter postal code"
|
|
5921
|
+
}
|
|
5922
|
+
),
|
|
5923
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5924
|
+
FormInput,
|
|
5925
|
+
{
|
|
5926
|
+
name: "address.countryCode",
|
|
5927
|
+
label: "Country Code",
|
|
5928
|
+
placeholder: "e.g., US"
|
|
5918
5929
|
}
|
|
5919
5930
|
)
|
|
5920
5931
|
] })
|
|
5921
5932
|
] }) });
|
|
5922
|
-
const
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
onToggleEdit: form.handleToggleEdit,
|
|
5936
|
-
onSave: form.handleSave,
|
|
5937
|
-
onCancel: form.handleCancel,
|
|
5938
|
-
hideActions,
|
|
5939
|
-
isFormValid: form.isFormValid,
|
|
5940
|
-
isDirty: form.isDirty,
|
|
5941
|
-
editContent,
|
|
5942
|
-
viewContent
|
|
5933
|
+
const formValues = form.watch();
|
|
5934
|
+
const idTypeLabel = formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number";
|
|
5935
|
+
const getEntityLink = () => {
|
|
5936
|
+
if (!formValues?.idValue) return null;
|
|
5937
|
+
switch (formValues?.idType) {
|
|
5938
|
+
case "business_id":
|
|
5939
|
+
return `/business/${formValues.idValue}`;
|
|
5940
|
+
case "individual_id":
|
|
5941
|
+
return `/individual/${formValues.idValue}`;
|
|
5942
|
+
case "account_number":
|
|
5943
|
+
return `/account/${formValues.idValue}`;
|
|
5944
|
+
default:
|
|
5945
|
+
return null;
|
|
5943
5946
|
}
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5947
|
+
};
|
|
5948
|
+
const entityLink = getEntityLink();
|
|
5949
|
+
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
5950
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5951
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Associated with", value: formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number", layout: "horizontal" }),
|
|
5952
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5953
|
+
InfoField,
|
|
5954
|
+
{
|
|
5955
|
+
label: idTypeLabel,
|
|
5956
|
+
value: entityLink ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5957
|
+
"button",
|
|
5958
|
+
{
|
|
5959
|
+
onClick: (e) => {
|
|
5960
|
+
e.preventDefault();
|
|
5961
|
+
navigate(entityLink);
|
|
5962
|
+
},
|
|
5963
|
+
className: "text-primary hover:underline font-medium text-left cursor-pointer",
|
|
5964
|
+
children: formValues?.idValue || "-"
|
|
5965
|
+
}
|
|
5966
|
+
) : formValues?.idValue || "-",
|
|
5967
|
+
layout: "horizontal"
|
|
5968
|
+
}
|
|
5969
|
+
)
|
|
5970
|
+
] }),
|
|
5971
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5972
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
5973
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.phone || "-", layout: "horizontal" })
|
|
5974
|
+
] }),
|
|
5975
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
5976
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Date of Birth", value: formValues?.dateOfBirth || "-", layout: "horizontal" }),
|
|
5977
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: formValues?.idNumber || "-", layout: "horizontal" })
|
|
5978
|
+
] }),
|
|
5979
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5980
|
+
InfoField,
|
|
5981
|
+
{
|
|
5982
|
+
label: "Address",
|
|
5983
|
+
value: formValues?.address ? `${formValues.address.line1 || ""}${formValues.address.line2 ? ", " + formValues.address.line2 : ""}, ${formValues.address.city || ""}, ${formValues.address.state || ""} ${formValues.address.postalCode || ""}, ${formValues.address.countryCode || ""}` : "-",
|
|
5984
|
+
layout: "horizontal"
|
|
5985
|
+
}
|
|
5986
|
+
)
|
|
5987
|
+
] });
|
|
5988
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5989
|
+
EditableFormCard,
|
|
5990
|
+
{
|
|
5991
|
+
title: "Profile Information",
|
|
5992
|
+
variant: "subtle",
|
|
5993
|
+
className,
|
|
5994
|
+
isEditing: form.isEditing,
|
|
5995
|
+
onToggleEdit: form.handleToggleEdit,
|
|
5996
|
+
onSave: form.handleSave,
|
|
5997
|
+
onCancel: form.handleCancel,
|
|
5998
|
+
hideActions,
|
|
5999
|
+
editContent,
|
|
6000
|
+
viewContent
|
|
6001
|
+
}
|
|
6002
|
+
);
|
|
6003
|
+
};
|
|
6004
|
+
var mockCounterpartyTimeline = [
|
|
6005
|
+
{
|
|
6006
|
+
id: "1",
|
|
6007
|
+
action: "Counterparty Created",
|
|
6008
|
+
user: "admin",
|
|
6009
|
+
details: "Initial counterparty setup",
|
|
6010
|
+
status: "Active",
|
|
6011
|
+
timestamp: "2024-01-15 10:30:00"
|
|
6012
|
+
},
|
|
6013
|
+
{
|
|
6014
|
+
id: "2",
|
|
6015
|
+
action: "Profile Updated",
|
|
6016
|
+
user: "admin",
|
|
6017
|
+
details: "Updated counterparty information",
|
|
6018
|
+
timestamp: "2024-01-20 14:22:00"
|
|
6019
|
+
},
|
|
6020
|
+
{
|
|
6021
|
+
id: "3",
|
|
6022
|
+
action: "OFAC Check Completed",
|
|
6023
|
+
user: "System",
|
|
6024
|
+
details: "Automated compliance check",
|
|
6025
|
+
status: "Verified",
|
|
6026
|
+
timestamp: "2024-01-20 14:30:00"
|
|
6027
|
+
}
|
|
6028
|
+
];
|
|
6029
|
+
var CounterpartyStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
6030
|
+
const getIcon = (action) => {
|
|
6031
|
+
if (action.includes("Created")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
6032
|
+
if (action.includes("Assigned")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlus, { className: "h-4 w-4" });
|
|
6033
|
+
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" });
|
|
6034
|
+
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4" });
|
|
6035
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
6036
|
+
};
|
|
6037
|
+
const getStatusColor2 = (status) => {
|
|
6038
|
+
switch (status) {
|
|
6039
|
+
case "Active":
|
|
6040
|
+
case "Verified":
|
|
6041
|
+
return "text-success";
|
|
6042
|
+
case "Pending":
|
|
6043
|
+
return "text-warning";
|
|
6044
|
+
default:
|
|
6045
|
+
return "text-muted-foreground";
|
|
6046
|
+
}
|
|
6047
|
+
};
|
|
6048
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6049
|
+
FormCard,
|
|
6050
|
+
{
|
|
6051
|
+
title: "Timeline",
|
|
6052
|
+
className,
|
|
6053
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: mockCounterpartyTimeline.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
6054
|
+
index !== mockCounterpartyTimeline.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
6055
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
6056
|
+
"absolute left-0 top-0 flex-none",
|
|
6057
|
+
getStatusColor2(event.status)
|
|
6058
|
+
), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
6059
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
6060
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
6061
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
6062
|
+
"by ",
|
|
6063
|
+
event.user
|
|
6064
|
+
] }),
|
|
6065
|
+
event.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
6066
|
+
event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
6067
|
+
"Status: ",
|
|
6068
|
+
event.status
|
|
6069
|
+
] }),
|
|
6070
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
6071
|
+
] })
|
|
6072
|
+
] }, event.id)) })
|
|
6073
|
+
}
|
|
6074
|
+
);
|
|
6075
|
+
};
|
|
6076
|
+
var typeConfig2 = {
|
|
6077
|
+
BUSINESS: {
|
|
6078
|
+
variant: "business",
|
|
6079
|
+
label: "Business",
|
|
6080
|
+
icon: lucideReact.Building2
|
|
6081
|
+
},
|
|
6082
|
+
INDIVIDUAL: {
|
|
6083
|
+
variant: "individual",
|
|
6084
|
+
label: "Individual",
|
|
6085
|
+
icon: lucideReact.User
|
|
6086
|
+
}
|
|
6087
|
+
};
|
|
6088
|
+
var CounterpartyTypeBadge = ({ type, className }) => {
|
|
6089
|
+
const config = typeConfig2[type];
|
|
6090
|
+
if (!config) {
|
|
6091
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className, children: [
|
|
6092
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "w-3 h-3 mr-1" }),
|
|
6093
|
+
type || "Unknown"
|
|
6094
|
+
] });
|
|
6095
|
+
}
|
|
6096
|
+
const Icon2 = config.icon;
|
|
6097
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
6098
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
6099
|
+
config.label
|
|
6100
|
+
] });
|
|
6101
|
+
};
|
|
6102
|
+
var PaymentMethodCard = ({
|
|
6103
|
+
type,
|
|
6104
|
+
fiId,
|
|
6105
|
+
accountNumber,
|
|
6106
|
+
bankName,
|
|
6107
|
+
accountType,
|
|
6108
|
+
beneficiaryBankName,
|
|
6109
|
+
correspondentBankId,
|
|
6110
|
+
intermediaryBankId,
|
|
6111
|
+
className
|
|
6112
|
+
}) => {
|
|
6113
|
+
const getIcon = () => {
|
|
6114
|
+
switch (type) {
|
|
6115
|
+
case "ACH":
|
|
6116
|
+
return lucideReact.Building2;
|
|
6117
|
+
case "Domestic Wire":
|
|
6118
|
+
return lucideReact.Landmark;
|
|
6119
|
+
case "International Wire":
|
|
6120
|
+
return lucideReact.Globe;
|
|
6121
|
+
default:
|
|
6122
|
+
return lucideReact.Building2;
|
|
6123
|
+
}
|
|
6124
|
+
};
|
|
6125
|
+
const Icon2 = getIcon();
|
|
6126
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: cn("hover:bg-muted/50 transition-colors", className), children: [
|
|
6127
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-3", children: [
|
|
6128
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6129
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 text-muted-foreground" }),
|
|
6130
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-sm", children: type })
|
|
6131
|
+
] }),
|
|
6132
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { className: "h-4 w-4" }) })
|
|
6133
|
+
] }),
|
|
6134
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
|
|
6135
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
6136
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary FI ID", value: fiId }),
|
|
6137
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Number", value: accountNumber })
|
|
6138
|
+
] }),
|
|
6139
|
+
type === "ACH" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
6140
|
+
bankName && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
6141
|
+
accountType && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Type", value: accountType })
|
|
6142
|
+
] }),
|
|
6143
|
+
type === "Domestic Wire" && bankName && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
6144
|
+
type === "International Wire" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
6145
|
+
beneficiaryBankName && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary Bank Name", value: beneficiaryBankName }),
|
|
6146
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
6147
|
+
correspondentBankId && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Correspondent Bank ID", value: correspondentBankId }),
|
|
6148
|
+
intermediaryBankId && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Intermediary Bank ID", value: intermediaryBankId })
|
|
6149
|
+
] })
|
|
6150
|
+
] })
|
|
6151
|
+
] })
|
|
6152
|
+
] });
|
|
6153
|
+
};
|
|
6154
|
+
var typeClasses = {
|
|
6155
|
+
cards: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
6156
|
+
forms: "grid-cols-1 lg:grid-cols-2",
|
|
5949
6157
|
data: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
5950
6158
|
custom: ""
|
|
5951
6159
|
};
|
|
@@ -5974,6 +6182,242 @@ var ResponsiveGrid = React15__namespace.forwardRef(
|
|
|
5974
6182
|
}
|
|
5975
6183
|
);
|
|
5976
6184
|
ResponsiveGrid.displayName = "ResponsiveGrid";
|
|
6185
|
+
var CounterpartyDetailView = ({
|
|
6186
|
+
counterpartyName,
|
|
6187
|
+
counterpartyType,
|
|
6188
|
+
currentStatus,
|
|
6189
|
+
isEditingProfile,
|
|
6190
|
+
mockPaymentMethods: mockPaymentMethods2,
|
|
6191
|
+
documentsTable,
|
|
6192
|
+
onStatusChange,
|
|
6193
|
+
onToggleProfileEdit,
|
|
6194
|
+
onAddPaymentMethod,
|
|
6195
|
+
onAddDocument
|
|
6196
|
+
}) => {
|
|
6197
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6198
|
+
PageLayout,
|
|
6199
|
+
{
|
|
6200
|
+
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
6201
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: counterpartyName }),
|
|
6202
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6203
|
+
EditableInfoField,
|
|
6204
|
+
{
|
|
6205
|
+
label: "",
|
|
6206
|
+
value: currentStatus,
|
|
6207
|
+
options: [
|
|
6208
|
+
{ value: "ACTIVE", label: "Active" },
|
|
6209
|
+
{ value: "INACTIVE", label: "Inactive" },
|
|
6210
|
+
{ value: "PENDING", label: "Pending" },
|
|
6211
|
+
{ value: "SUSPENDED", label: "Suspended" }
|
|
6212
|
+
],
|
|
6213
|
+
onChange: onStatusChange,
|
|
6214
|
+
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value }),
|
|
6215
|
+
className: "inline-block"
|
|
6216
|
+
}
|
|
6217
|
+
),
|
|
6218
|
+
/* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterpartyType })
|
|
6219
|
+
] }),
|
|
6220
|
+
maxWidth: "full",
|
|
6221
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
6222
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
6223
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6224
|
+
CounterpartyProfileCard,
|
|
6225
|
+
{
|
|
6226
|
+
isEditing: isEditingProfile,
|
|
6227
|
+
onToggleEdit: onToggleProfileEdit
|
|
6228
|
+
}
|
|
6229
|
+
),
|
|
6230
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
6231
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
6232
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Payment Methods" }),
|
|
6233
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddPaymentMethod, children: [
|
|
6234
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
6235
|
+
"Method"
|
|
6236
|
+
] })
|
|
6237
|
+
] }),
|
|
6238
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: mockPaymentMethods2.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
6239
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
6240
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No payment methods configured" })
|
|
6241
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(ResponsiveGrid, { type: "forms", gap: "md", children: mockPaymentMethods2.map((method, index) => /* @__PURE__ */ jsxRuntime.jsx(PaymentMethodCard, { ...method }, index)) }) })
|
|
6242
|
+
] }),
|
|
6243
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
6244
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
6245
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Documents" }),
|
|
6246
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddDocument, children: [
|
|
6247
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
6248
|
+
"Document"
|
|
6249
|
+
] })
|
|
6250
|
+
] }),
|
|
6251
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: documentsTable })
|
|
6252
|
+
] })
|
|
6253
|
+
] }),
|
|
6254
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
6255
|
+
} }) })
|
|
6256
|
+
] })
|
|
6257
|
+
}
|
|
6258
|
+
);
|
|
6259
|
+
};
|
|
6260
|
+
|
|
6261
|
+
// src/lib/mock-data/banking-data.ts
|
|
6262
|
+
var defaultACHBankDetails = {
|
|
6263
|
+
gatewayRoutingNumber: "043087080",
|
|
6264
|
+
rdfiNumberQualifier: "01"
|
|
6265
|
+
};
|
|
6266
|
+
var defaultBankAddress = {
|
|
6267
|
+
street: "270 Park Avenue",
|
|
6268
|
+
city: "New York",
|
|
6269
|
+
state: "NY",
|
|
6270
|
+
postalCode: "10017",
|
|
6271
|
+
country: "US"
|
|
6272
|
+
};
|
|
6273
|
+
var defaultACHTransfer = {
|
|
6274
|
+
basicInfo: {
|
|
6275
|
+
counterpartyName: "Acme Corporation",
|
|
6276
|
+
shortName: "ACME",
|
|
6277
|
+
type: "business",
|
|
6278
|
+
description: "ACH transfer for Acme Corporation"
|
|
6279
|
+
},
|
|
6280
|
+
bankDetails: defaultACHBankDetails
|
|
6281
|
+
};
|
|
6282
|
+
var ACHBankCard = ({ data, onDataChange, isEditing, onToggleEdit, className, hideActions }) => {
|
|
6283
|
+
const form = useFormWithEditState({
|
|
6284
|
+
schema: achTransferSchema,
|
|
6285
|
+
defaultValues: { ...defaultACHTransfer, ...data },
|
|
6286
|
+
initialEditing: isEditing,
|
|
6287
|
+
onToggleEdit,
|
|
6288
|
+
onSave: onDataChange
|
|
6289
|
+
});
|
|
6290
|
+
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6291
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6292
|
+
FormInput,
|
|
6293
|
+
{
|
|
6294
|
+
name: "bankDetails.gatewayRoutingNumber",
|
|
6295
|
+
label: "Gateway Routing Number",
|
|
6296
|
+
placeholder: "Enter gateway routing number",
|
|
6297
|
+
pattern: "[0-9]{9}",
|
|
6298
|
+
maxLength: 9,
|
|
6299
|
+
hint: "9-digit gateway routing number",
|
|
6300
|
+
required: true
|
|
6301
|
+
}
|
|
6302
|
+
),
|
|
6303
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6304
|
+
FormInput,
|
|
6305
|
+
{
|
|
6306
|
+
name: "bankDetails.rdfiNumberQualifier",
|
|
6307
|
+
label: "RDFI Number Qualifier",
|
|
6308
|
+
placeholder: "Enter RDFI qualifier",
|
|
6309
|
+
maxLength: 2,
|
|
6310
|
+
hint: "2-digit RDFI number qualifier",
|
|
6311
|
+
required: true
|
|
6312
|
+
}
|
|
6313
|
+
)
|
|
6314
|
+
] }) }) });
|
|
6315
|
+
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6316
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Gateway Routing Number", value: form.getValues("bankDetails.gatewayRoutingNumber"), layout: "horizontal" }),
|
|
6317
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "RDFI Number Qualifier", value: form.getValues("bankDetails.rdfiNumberQualifier"), layout: "horizontal" })
|
|
6318
|
+
] });
|
|
6319
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6320
|
+
EditableFormCard,
|
|
6321
|
+
{
|
|
6322
|
+
title: "ACH Bank Details",
|
|
6323
|
+
description: "ACH-specific routing and qualification information",
|
|
6324
|
+
variant: "subtle",
|
|
6325
|
+
className,
|
|
6326
|
+
isEditing: form.isEditing,
|
|
6327
|
+
onToggleEdit: form.handleToggleEdit,
|
|
6328
|
+
onSave: form.handleSave,
|
|
6329
|
+
onCancel: form.handleCancel,
|
|
6330
|
+
hideActions,
|
|
6331
|
+
isFormValid: form.isFormValid,
|
|
6332
|
+
isDirty: form.isDirty,
|
|
6333
|
+
editContent,
|
|
6334
|
+
viewContent
|
|
6335
|
+
}
|
|
6336
|
+
);
|
|
6337
|
+
};
|
|
6338
|
+
var ACHBasicInfoCard = ({
|
|
6339
|
+
data,
|
|
6340
|
+
onDataChange,
|
|
6341
|
+
isEditing,
|
|
6342
|
+
onToggleEdit,
|
|
6343
|
+
className,
|
|
6344
|
+
hideActions
|
|
6345
|
+
}) => {
|
|
6346
|
+
const form = useFormWithEditState({
|
|
6347
|
+
schema: achTransferSchema,
|
|
6348
|
+
defaultValues: { ...defaultACHTransfer, ...data },
|
|
6349
|
+
initialEditing: isEditing,
|
|
6350
|
+
onToggleEdit,
|
|
6351
|
+
onSave: onDataChange
|
|
6352
|
+
});
|
|
6353
|
+
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
6354
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6355
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6356
|
+
FormInput,
|
|
6357
|
+
{
|
|
6358
|
+
name: "basicInfo.counterpartyName",
|
|
6359
|
+
label: "Counterparty Name",
|
|
6360
|
+
placeholder: "Enter counterparty name",
|
|
6361
|
+
required: true
|
|
6362
|
+
}
|
|
6363
|
+
),
|
|
6364
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6365
|
+
FormInput,
|
|
6366
|
+
{
|
|
6367
|
+
name: "basicInfo.shortName",
|
|
6368
|
+
label: "Short Name",
|
|
6369
|
+
placeholder: "Enter short name",
|
|
6370
|
+
required: true
|
|
6371
|
+
}
|
|
6372
|
+
)
|
|
6373
|
+
] }),
|
|
6374
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6375
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6376
|
+
FormSelect,
|
|
6377
|
+
{
|
|
6378
|
+
name: "basicInfo.type",
|
|
6379
|
+
label: "Type",
|
|
6380
|
+
placeholder: "Select type",
|
|
6381
|
+
options: [
|
|
6382
|
+
{ value: "business", label: "Business" },
|
|
6383
|
+
{ value: "individual", label: "Individual" }
|
|
6384
|
+
]
|
|
6385
|
+
}
|
|
6386
|
+
),
|
|
6387
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6388
|
+
FormInput,
|
|
6389
|
+
{
|
|
6390
|
+
name: "basicInfo.description",
|
|
6391
|
+
label: "Description",
|
|
6392
|
+
placeholder: "Enter description"
|
|
6393
|
+
}
|
|
6394
|
+
)
|
|
6395
|
+
] })
|
|
6396
|
+
] }) });
|
|
6397
|
+
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
6398
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Counterparty Name", value: form.getValues("basicInfo.counterpartyName"), layout: "horizontal" }),
|
|
6399
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Short Name", value: form.getValues("basicInfo.shortName"), layout: "horizontal" }),
|
|
6400
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Type", value: form.getValues("basicInfo.type"), layout: "horizontal" }),
|
|
6401
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Description", value: form.getValues("basicInfo.description") || "N/A", layout: "horizontal" })
|
|
6402
|
+
] });
|
|
6403
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6404
|
+
EditableFormCard,
|
|
6405
|
+
{
|
|
6406
|
+
title: "Basic Information",
|
|
6407
|
+
variant: "subtle",
|
|
6408
|
+
className,
|
|
6409
|
+
isEditing: form.isEditing,
|
|
6410
|
+
onToggleEdit: form.handleToggleEdit,
|
|
6411
|
+
onSave: form.handleSave,
|
|
6412
|
+
onCancel: form.handleCancel,
|
|
6413
|
+
hideActions,
|
|
6414
|
+
isFormValid: form.isFormValid,
|
|
6415
|
+
isDirty: form.isDirty,
|
|
6416
|
+
editContent,
|
|
6417
|
+
viewContent
|
|
6418
|
+
}
|
|
6419
|
+
);
|
|
6420
|
+
};
|
|
5977
6421
|
var BankAddressCard = ({
|
|
5978
6422
|
data,
|
|
5979
6423
|
onDataChange,
|
|
@@ -6177,44 +6621,18 @@ var BankingDetailsCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
6177
6621
|
{
|
|
6178
6622
|
title: "Banking Details",
|
|
6179
6623
|
className,
|
|
6180
|
-
headerActions: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: isEditing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6181
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: onToggleEdit, children: "Cancel" }),
|
|
6182
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: onToggleEdit, children: "Save" })
|
|
6183
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", onClick: onToggleEdit, className: "text-primary hover:text-primary/80 hover:bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }) }) }),
|
|
6184
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-2", children: [
|
|
6185
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Primary Bank", value: "JPMorgan Chase", layout: "horizontal" }),
|
|
6186
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Number", value: "****-****-****-1234", layout: "horizontal" }),
|
|
6187
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Routing Number", value: "021000021", layout: "horizontal" }),
|
|
6188
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Type", value: "Business Checking", layout: "horizontal" })
|
|
6189
|
-
] }) })
|
|
6190
|
-
}
|
|
6191
|
-
);
|
|
6192
|
-
};
|
|
6193
|
-
var typeConfig2 = {
|
|
6194
|
-
BUSINESS: {
|
|
6195
|
-
variant: "business",
|
|
6196
|
-
label: "Business",
|
|
6197
|
-
icon: lucideReact.Building2
|
|
6198
|
-
},
|
|
6199
|
-
INDIVIDUAL: {
|
|
6200
|
-
variant: "individual",
|
|
6201
|
-
label: "Individual",
|
|
6202
|
-
icon: lucideReact.User
|
|
6203
|
-
}
|
|
6204
|
-
};
|
|
6205
|
-
var CounterpartyTypeBadge = ({ type, className }) => {
|
|
6206
|
-
const config = typeConfig2[type];
|
|
6207
|
-
if (!config) {
|
|
6208
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className, children: [
|
|
6209
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "w-3 h-3 mr-1" }),
|
|
6210
|
-
type || "Unknown"
|
|
6211
|
-
] });
|
|
6212
|
-
}
|
|
6213
|
-
const Icon2 = config.icon;
|
|
6214
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: config.variant, className, children: [
|
|
6215
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
6216
|
-
config.label
|
|
6217
|
-
] });
|
|
6624
|
+
headerActions: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: isEditing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6625
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: onToggleEdit, children: "Cancel" }),
|
|
6626
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: onToggleEdit, children: "Save" })
|
|
6627
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", onClick: onToggleEdit, className: "text-primary hover:text-primary/80 hover:bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }) }) }),
|
|
6628
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-2", children: [
|
|
6629
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Primary Bank", value: "JPMorgan Chase", layout: "horizontal" }),
|
|
6630
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Number", value: "****-****-****-1234", layout: "horizontal" }),
|
|
6631
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Routing Number", value: "021000021", layout: "horizontal" }),
|
|
6632
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Type", value: "Business Checking", layout: "horizontal" })
|
|
6633
|
+
] }) })
|
|
6634
|
+
}
|
|
6635
|
+
);
|
|
6218
6636
|
};
|
|
6219
6637
|
var BasicInfoCard = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
6220
6638
|
const [name, setName] = React15.useState("John wire hot");
|
|
@@ -6246,273 +6664,54 @@ var BasicInfoCard = ({ isEditing, onToggleEdit, className, hideActions }) => {
|
|
|
6246
6664
|
}
|
|
6247
6665
|
)
|
|
6248
6666
|
] }),
|
|
6249
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4 pt-4 border-t border-border", children: [
|
|
6250
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
6251
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
6252
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
6253
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
6254
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
6255
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
6256
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
6257
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
6258
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
6259
|
-
] }),
|
|
6260
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
6261
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
6262
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6263
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
6264
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
6265
|
-
] })
|
|
6266
|
-
] })
|
|
6267
|
-
] });
|
|
6268
|
-
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
6269
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6270
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
6271
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Name", value: name, layout: "horizontal" }),
|
|
6272
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
6273
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status }), layout: "horizontal" }),
|
|
6274
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
6275
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
6276
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
6277
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
6278
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
6279
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
6280
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
6281
|
-
] }),
|
|
6282
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
6283
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
6284
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6285
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
6286
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
6287
|
-
] })
|
|
6288
|
-
] })
|
|
6289
|
-
] });
|
|
6290
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6291
|
-
EditableFormCard,
|
|
6292
|
-
{
|
|
6293
|
-
title: "Basic Info",
|
|
6294
|
-
className,
|
|
6295
|
-
isEditing,
|
|
6296
|
-
onToggleEdit,
|
|
6297
|
-
hideActions,
|
|
6298
|
-
editContent,
|
|
6299
|
-
viewContent
|
|
6300
|
-
}
|
|
6301
|
-
);
|
|
6302
|
-
};
|
|
6303
|
-
|
|
6304
|
-
// src/lib/mock-data/counterparty-data.ts
|
|
6305
|
-
var defaultCounterpartyDetail = {
|
|
6306
|
-
email: "contact@acme.com",
|
|
6307
|
-
phone: "+1 (555) 123-4567",
|
|
6308
|
-
dateOfBirth: "1985-03-15",
|
|
6309
|
-
idNumber: "ID-123456789",
|
|
6310
|
-
idType: "product_id",
|
|
6311
|
-
idValue: "PROD-001",
|
|
6312
|
-
address: {
|
|
6313
|
-
line1: "123 Business Ave",
|
|
6314
|
-
line2: "Suite 100",
|
|
6315
|
-
city: "New York",
|
|
6316
|
-
state: "NY",
|
|
6317
|
-
postalCode: "10001",
|
|
6318
|
-
countryCode: "US",
|
|
6319
|
-
type: "MAILING"
|
|
6320
|
-
}
|
|
6321
|
-
};
|
|
6322
|
-
var CounterpartyProfileCard = ({
|
|
6323
|
-
data,
|
|
6324
|
-
onDataChange,
|
|
6325
|
-
isEditing = false,
|
|
6326
|
-
onToggleEdit,
|
|
6327
|
-
hideActions = false,
|
|
6328
|
-
className
|
|
6329
|
-
}) => {
|
|
6330
|
-
const navigate = reactRouterDom.useNavigate();
|
|
6331
|
-
const form = useFormWithEditState({
|
|
6332
|
-
schema: counterpartyDetailSchema,
|
|
6333
|
-
defaultValues: { ...defaultCounterpartyDetail, ...data },
|
|
6334
|
-
initialEditing: isEditing,
|
|
6335
|
-
onToggleEdit,
|
|
6336
|
-
onSave: onDataChange
|
|
6337
|
-
});
|
|
6338
|
-
const editContent = /* @__PURE__ */ jsxRuntime.jsx(FormProvider, { form, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
6339
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6340
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6341
|
-
FormSelect,
|
|
6342
|
-
{
|
|
6343
|
-
name: "idType",
|
|
6344
|
-
label: "Associated with",
|
|
6345
|
-
placeholder: "Select association type",
|
|
6346
|
-
options: [
|
|
6347
|
-
{ value: "product_id", label: "Product ID" },
|
|
6348
|
-
{ value: "business_id", label: "Business ID" },
|
|
6349
|
-
{ value: "individual_id", label: "Individual ID" },
|
|
6350
|
-
{ value: "account_number", label: "Account Number" }
|
|
6351
|
-
]
|
|
6352
|
-
}
|
|
6353
|
-
),
|
|
6354
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6355
|
-
FormInput,
|
|
6356
|
-
{
|
|
6357
|
-
name: "idValue",
|
|
6358
|
-
label: form.watch("idType") === "product_id" ? "Product ID" : form.watch("idType") === "business_id" ? "Business ID" : form.watch("idType") === "individual_id" ? "Individual ID" : "Account Number",
|
|
6359
|
-
placeholder: "Enter ID value"
|
|
6360
|
-
}
|
|
6361
|
-
),
|
|
6362
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6363
|
-
FormInput,
|
|
6364
|
-
{
|
|
6365
|
-
name: "email",
|
|
6366
|
-
label: "Email",
|
|
6367
|
-
type: "email",
|
|
6368
|
-
placeholder: "Enter email address"
|
|
6369
|
-
}
|
|
6370
|
-
),
|
|
6371
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6372
|
-
FormInput,
|
|
6373
|
-
{
|
|
6374
|
-
name: "phone",
|
|
6375
|
-
label: "Phone Number",
|
|
6376
|
-
type: "tel",
|
|
6377
|
-
placeholder: "Enter phone number"
|
|
6378
|
-
}
|
|
6379
|
-
),
|
|
6380
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6381
|
-
FormInput,
|
|
6382
|
-
{
|
|
6383
|
-
name: "dateOfBirth",
|
|
6384
|
-
label: "Date of Birth",
|
|
6385
|
-
type: "date",
|
|
6386
|
-
placeholder: "Select date of birth"
|
|
6387
|
-
}
|
|
6388
|
-
),
|
|
6389
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6390
|
-
FormInput,
|
|
6391
|
-
{
|
|
6392
|
-
name: "idNumber",
|
|
6393
|
-
label: "ID Number",
|
|
6394
|
-
placeholder: "Enter ID number"
|
|
6395
|
-
}
|
|
6396
|
-
)
|
|
6397
|
-
] }),
|
|
6398
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4", children: [
|
|
6399
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6400
|
-
FormInput,
|
|
6401
|
-
{
|
|
6402
|
-
name: "address.line1",
|
|
6403
|
-
label: "Street Address",
|
|
6404
|
-
placeholder: "Enter street address"
|
|
6405
|
-
}
|
|
6406
|
-
),
|
|
6407
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6408
|
-
FormInput,
|
|
6409
|
-
{
|
|
6410
|
-
name: "address.line2",
|
|
6411
|
-
label: "Apartment, suite, or floor",
|
|
6412
|
-
placeholder: "Enter apartment, suite, or floor"
|
|
6413
|
-
}
|
|
6414
|
-
)
|
|
6415
|
-
] }),
|
|
6416
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
6417
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6418
|
-
FormInput,
|
|
6419
|
-
{
|
|
6420
|
-
name: "address.city",
|
|
6421
|
-
label: "City",
|
|
6422
|
-
placeholder: "Enter city"
|
|
6423
|
-
}
|
|
6424
|
-
),
|
|
6425
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6426
|
-
FormInput,
|
|
6427
|
-
{
|
|
6428
|
-
name: "address.state",
|
|
6429
|
-
label: "State",
|
|
6430
|
-
placeholder: "Enter state"
|
|
6431
|
-
}
|
|
6432
|
-
),
|
|
6433
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6434
|
-
FormInput,
|
|
6435
|
-
{
|
|
6436
|
-
name: "address.postalCode",
|
|
6437
|
-
label: "Postal Code",
|
|
6438
|
-
placeholder: "Enter postal code"
|
|
6439
|
-
}
|
|
6440
|
-
),
|
|
6441
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6442
|
-
FormInput,
|
|
6443
|
-
{
|
|
6444
|
-
name: "address.countryCode",
|
|
6445
|
-
label: "Country Code",
|
|
6446
|
-
placeholder: "e.g., US"
|
|
6447
|
-
}
|
|
6448
|
-
)
|
|
6449
|
-
] })
|
|
6450
|
-
] }) });
|
|
6451
|
-
const formValues = form.watch();
|
|
6452
|
-
const idTypeLabel = formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number";
|
|
6453
|
-
const getEntityLink = () => {
|
|
6454
|
-
if (!formValues?.idValue) return null;
|
|
6455
|
-
switch (formValues?.idType) {
|
|
6456
|
-
case "business_id":
|
|
6457
|
-
return `/business/${formValues.idValue}`;
|
|
6458
|
-
case "individual_id":
|
|
6459
|
-
return `/individual/${formValues.idValue}`;
|
|
6460
|
-
case "account_number":
|
|
6461
|
-
return `/account/${formValues.idValue}`;
|
|
6462
|
-
default:
|
|
6463
|
-
return null;
|
|
6464
|
-
}
|
|
6465
|
-
};
|
|
6466
|
-
const entityLink = getEntityLink();
|
|
6467
|
-
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
6468
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6469
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Associated with", value: formValues?.idType === "product_id" ? "Product ID" : formValues?.idType === "business_id" ? "Business ID" : formValues?.idType === "individual_id" ? "Individual ID" : "Account Number", layout: "horizontal" }),
|
|
6470
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6471
|
-
InfoField,
|
|
6472
|
-
{
|
|
6473
|
-
label: idTypeLabel,
|
|
6474
|
-
value: entityLink ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6475
|
-
"button",
|
|
6476
|
-
{
|
|
6477
|
-
onClick: (e) => {
|
|
6478
|
-
e.preventDefault();
|
|
6479
|
-
navigate(entityLink);
|
|
6480
|
-
},
|
|
6481
|
-
className: "text-primary hover:underline font-medium text-left cursor-pointer",
|
|
6482
|
-
children: formValues?.idValue || "-"
|
|
6483
|
-
}
|
|
6484
|
-
) : formValues?.idValue || "-",
|
|
6485
|
-
layout: "horizontal"
|
|
6486
|
-
}
|
|
6487
|
-
)
|
|
6488
|
-
] }),
|
|
6489
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6490
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Email", value: formValues?.email || "-", layout: "horizontal" }),
|
|
6491
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Phone Number", value: formValues?.phone || "-", layout: "horizontal" })
|
|
6492
|
-
] }),
|
|
6667
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4 pt-4 border-t border-border", children: [
|
|
6668
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
6669
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
6670
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
6671
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
6672
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
6673
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
6674
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
6675
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
6676
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
6677
|
+
] }),
|
|
6678
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
6679
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
6680
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6681
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
6682
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
6683
|
+
] })
|
|
6684
|
+
] })
|
|
6685
|
+
] });
|
|
6686
|
+
const viewContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
6493
6687
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6494
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "
|
|
6495
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "
|
|
6688
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID", value: "5000541", layout: "horizontal" }),
|
|
6689
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Name", value: name, layout: "horizontal" }),
|
|
6690
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Counterparty Type", value: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: "BUSINESS" }), layout: "horizontal" }),
|
|
6691
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status }), layout: "horizontal" }),
|
|
6692
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Number", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022", layout: "horizontal" }),
|
|
6693
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "ID Type", value: "SSN", layout: "horizontal" }),
|
|
6694
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Date of Birth", value: "1985-8-20", layout: "horizontal" }),
|
|
6695
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created By", value: "admin", layout: "horizontal" }),
|
|
6696
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Created At", value: "2025-07-14", layout: "horizontal" }),
|
|
6697
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated By", value: "admin", layout: "horizontal" }),
|
|
6698
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Updated At", value: "2025-07-14", layout: "horizontal" })
|
|
6496
6699
|
] }),
|
|
6497
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6498
|
-
|
|
6499
|
-
{
|
|
6500
|
-
label: "
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
)
|
|
6700
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 border-t border-border", children: [
|
|
6701
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: "OFAC Details" }),
|
|
6702
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
6703
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC date", value: "2025-07-14", layout: "horizontal" }),
|
|
6704
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Last OFAC status", value: "Verified", layout: "horizontal" })
|
|
6705
|
+
] })
|
|
6706
|
+
] })
|
|
6505
6707
|
] });
|
|
6506
6708
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6507
6709
|
EditableFormCard,
|
|
6508
6710
|
{
|
|
6509
|
-
title: "
|
|
6510
|
-
variant: "subtle",
|
|
6711
|
+
title: "Basic Info",
|
|
6511
6712
|
className,
|
|
6512
|
-
isEditing
|
|
6513
|
-
onToggleEdit
|
|
6514
|
-
onSave: form.handleSave,
|
|
6515
|
-
onCancel: form.handleCancel,
|
|
6713
|
+
isEditing,
|
|
6714
|
+
onToggleEdit,
|
|
6516
6715
|
hideActions,
|
|
6517
6716
|
editContent,
|
|
6518
6717
|
viewContent
|
|
@@ -11317,205 +11516,6 @@ var Counterparties = () => {
|
|
|
11317
11516
|
);
|
|
11318
11517
|
};
|
|
11319
11518
|
var Counterparties_default = Counterparties;
|
|
11320
|
-
var mockCounterpartyTimeline = [
|
|
11321
|
-
{
|
|
11322
|
-
id: "1",
|
|
11323
|
-
action: "Counterparty Created",
|
|
11324
|
-
user: "admin",
|
|
11325
|
-
details: "Initial counterparty setup",
|
|
11326
|
-
status: "Active",
|
|
11327
|
-
timestamp: "2024-01-15 10:30:00"
|
|
11328
|
-
},
|
|
11329
|
-
{
|
|
11330
|
-
id: "2",
|
|
11331
|
-
action: "Profile Updated",
|
|
11332
|
-
user: "admin",
|
|
11333
|
-
details: "Updated counterparty information",
|
|
11334
|
-
timestamp: "2024-01-20 14:22:00"
|
|
11335
|
-
},
|
|
11336
|
-
{
|
|
11337
|
-
id: "3",
|
|
11338
|
-
action: "OFAC Check Completed",
|
|
11339
|
-
user: "System",
|
|
11340
|
-
details: "Automated compliance check",
|
|
11341
|
-
status: "Verified",
|
|
11342
|
-
timestamp: "2024-01-20 14:30:00"
|
|
11343
|
-
}
|
|
11344
|
-
];
|
|
11345
|
-
var CounterpartyStatusCard = ({ isEditing, onToggleEdit, className }) => {
|
|
11346
|
-
const getIcon = (action) => {
|
|
11347
|
-
if (action.includes("Created")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
11348
|
-
if (action.includes("Assigned")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlus, { className: "h-4 w-4" });
|
|
11349
|
-
if (action.includes("Updated") || action.includes("Modified") || action.includes("Check")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" });
|
|
11350
|
-
if (action.includes("Completed") || action.includes("Verified")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-4 w-4" });
|
|
11351
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4" });
|
|
11352
|
-
};
|
|
11353
|
-
const getStatusColor2 = (status) => {
|
|
11354
|
-
switch (status) {
|
|
11355
|
-
case "Active":
|
|
11356
|
-
case "Verified":
|
|
11357
|
-
return "text-success";
|
|
11358
|
-
case "Pending":
|
|
11359
|
-
return "text-warning";
|
|
11360
|
-
default:
|
|
11361
|
-
return "text-muted-foreground";
|
|
11362
|
-
}
|
|
11363
|
-
};
|
|
11364
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11365
|
-
FormCard,
|
|
11366
|
-
{
|
|
11367
|
-
title: "Timeline",
|
|
11368
|
-
className,
|
|
11369
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: mockCounterpartyTimeline.map((event, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
11370
|
-
index !== mockCounterpartyTimeline.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
11371
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
11372
|
-
"absolute left-0 top-0 flex-none",
|
|
11373
|
-
getStatusColor2(event.status)
|
|
11374
|
-
), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
11375
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
|
|
11376
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
11377
|
-
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
11378
|
-
"by ",
|
|
11379
|
-
event.user
|
|
11380
|
-
] }),
|
|
11381
|
-
event.details && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
11382
|
-
event.status && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
11383
|
-
"Status: ",
|
|
11384
|
-
event.status
|
|
11385
|
-
] }),
|
|
11386
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
11387
|
-
] })
|
|
11388
|
-
] }, event.id)) })
|
|
11389
|
-
}
|
|
11390
|
-
);
|
|
11391
|
-
};
|
|
11392
|
-
var PaymentMethodCard = ({
|
|
11393
|
-
type,
|
|
11394
|
-
fiId,
|
|
11395
|
-
accountNumber,
|
|
11396
|
-
bankName,
|
|
11397
|
-
accountType,
|
|
11398
|
-
beneficiaryBankName,
|
|
11399
|
-
correspondentBankId,
|
|
11400
|
-
intermediaryBankId,
|
|
11401
|
-
className
|
|
11402
|
-
}) => {
|
|
11403
|
-
const getIcon = () => {
|
|
11404
|
-
switch (type) {
|
|
11405
|
-
case "ACH":
|
|
11406
|
-
return lucideReact.Building2;
|
|
11407
|
-
case "Domestic Wire":
|
|
11408
|
-
return lucideReact.Landmark;
|
|
11409
|
-
case "International Wire":
|
|
11410
|
-
return lucideReact.Globe;
|
|
11411
|
-
default:
|
|
11412
|
-
return lucideReact.Building2;
|
|
11413
|
-
}
|
|
11414
|
-
};
|
|
11415
|
-
const Icon2 = getIcon();
|
|
11416
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: cn("hover:bg-muted/50 transition-colors", className), children: [
|
|
11417
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-3", children: [
|
|
11418
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
11419
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11420
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-sm", children: type })
|
|
11421
|
-
] }),
|
|
11422
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { className: "h-4 w-4" }) })
|
|
11423
|
-
] }),
|
|
11424
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
|
|
11425
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
11426
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary FI ID", value: fiId }),
|
|
11427
|
-
/* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Number", value: accountNumber })
|
|
11428
|
-
] }),
|
|
11429
|
-
type === "ACH" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
11430
|
-
bankName && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
11431
|
-
accountType && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Account Type", value: accountType })
|
|
11432
|
-
] }),
|
|
11433
|
-
type === "Domestic Wire" && bankName && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Bank Name", value: bankName }),
|
|
11434
|
-
type === "International Wire" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
11435
|
-
beneficiaryBankName && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Beneficiary Bank Name", value: beneficiaryBankName }),
|
|
11436
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
11437
|
-
correspondentBankId && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Correspondent Bank ID", value: correspondentBankId }),
|
|
11438
|
-
intermediaryBankId && /* @__PURE__ */ jsxRuntime.jsx(InfoField, { label: "Intermediary Bank ID", value: intermediaryBankId })
|
|
11439
|
-
] })
|
|
11440
|
-
] })
|
|
11441
|
-
] })
|
|
11442
|
-
] });
|
|
11443
|
-
};
|
|
11444
|
-
var CounterpartyDetailView = ({
|
|
11445
|
-
counterpartyName,
|
|
11446
|
-
counterpartyType,
|
|
11447
|
-
currentStatus,
|
|
11448
|
-
isEditingProfile,
|
|
11449
|
-
mockPaymentMethods: mockPaymentMethods2,
|
|
11450
|
-
documentsTable,
|
|
11451
|
-
onStatusChange,
|
|
11452
|
-
onToggleProfileEdit,
|
|
11453
|
-
onAddPaymentMethod,
|
|
11454
|
-
onAddDocument
|
|
11455
|
-
}) => {
|
|
11456
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11457
|
-
PageLayout,
|
|
11458
|
-
{
|
|
11459
|
-
title: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
11460
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: counterpartyName }),
|
|
11461
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11462
|
-
EditableInfoField,
|
|
11463
|
-
{
|
|
11464
|
-
label: "",
|
|
11465
|
-
value: currentStatus,
|
|
11466
|
-
options: [
|
|
11467
|
-
{ value: "ACTIVE", label: "Active" },
|
|
11468
|
-
{ value: "INACTIVE", label: "Inactive" },
|
|
11469
|
-
{ value: "PENDING", label: "Pending" },
|
|
11470
|
-
{ value: "SUSPENDED", label: "Suspended" }
|
|
11471
|
-
],
|
|
11472
|
-
onChange: onStatusChange,
|
|
11473
|
-
renderValue: (value) => /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: value }),
|
|
11474
|
-
className: "inline-block"
|
|
11475
|
-
}
|
|
11476
|
-
),
|
|
11477
|
-
/* @__PURE__ */ jsxRuntime.jsx(CounterpartyTypeBadge, { type: counterpartyType })
|
|
11478
|
-
] }),
|
|
11479
|
-
maxWidth: "full",
|
|
11480
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-4", children: [
|
|
11481
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-4", children: [
|
|
11482
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11483
|
-
CounterpartyProfileCard,
|
|
11484
|
-
{
|
|
11485
|
-
isEditing: isEditingProfile,
|
|
11486
|
-
onToggleEdit: onToggleProfileEdit
|
|
11487
|
-
}
|
|
11488
|
-
),
|
|
11489
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11490
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11491
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Payment Methods" }),
|
|
11492
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddPaymentMethod, children: [
|
|
11493
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
11494
|
-
"Method"
|
|
11495
|
-
] })
|
|
11496
|
-
] }),
|
|
11497
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: mockPaymentMethods2.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground", children: [
|
|
11498
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 opacity-50" }),
|
|
11499
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "No payment methods configured" })
|
|
11500
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(ResponsiveGrid, { type: "forms", gap: "md", children: mockPaymentMethods2.map((method, index) => /* @__PURE__ */ jsxRuntime.jsx(PaymentMethodCard, { ...method }, index)) }) })
|
|
11501
|
-
] }),
|
|
11502
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
11503
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
11504
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Documents" }),
|
|
11505
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", onClick: onAddDocument, children: [
|
|
11506
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-1" }),
|
|
11507
|
-
"Document"
|
|
11508
|
-
] })
|
|
11509
|
-
] }),
|
|
11510
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: documentsTable })
|
|
11511
|
-
] })
|
|
11512
|
-
] }),
|
|
11513
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsxRuntime.jsx(CounterpartyStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
11514
|
-
} }) })
|
|
11515
|
-
] })
|
|
11516
|
-
}
|
|
11517
|
-
);
|
|
11518
|
-
};
|
|
11519
11519
|
var mockPaymentMethods = [
|
|
11520
11520
|
{
|
|
11521
11521
|
type: "ACH",
|
|
@@ -14798,6 +14798,7 @@ exports.Counterparties = Counterparties_default;
|
|
|
14798
14798
|
exports.CounterpartiesView = CounterpartiesView;
|
|
14799
14799
|
exports.CounterpartyBasicInfo = CounterpartyBasicInfo;
|
|
14800
14800
|
exports.CounterpartyDetail = CounterpartyDetail_default;
|
|
14801
|
+
exports.CounterpartyDetailView = CounterpartyDetailView;
|
|
14801
14802
|
exports.CounterpartyProfileCard = CounterpartyProfileCard;
|
|
14802
14803
|
exports.CounterpartyRecordsCard = CounterpartyRecordsCard;
|
|
14803
14804
|
exports.CounterpartyTypeBadge = CounterpartyTypeBadge;
|