braid-ui 1.0.97 → 1.0.99
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/README.md +44 -327
- package/components.json +20 -0
- package/eslint.config.js +29 -0
- package/index.html +24 -0
- package/package.json +55 -115
- package/postcss.config.js +6 -0
- package/public/favicon.ico +0 -0
- package/public/placeholder.svg +1 -0
- package/public/robots.txt +14 -0
- package/src/App.css +42 -0
- package/src/App.tsx +94 -0
- package/src/components/MainLayout.tsx +15 -0
- package/src/components/alerts/AlertDocuments.tsx +320 -0
- package/src/components/alerts/AlertNotes.tsx +185 -0
- package/src/components/alerts/AlertTimeline.tsx +79 -0
- package/src/components/alerts/ContextSection.tsx +155 -0
- package/src/components/app-sidebar.tsx +341 -0
- package/src/components/form-sections/ACHBankCard.tsx +78 -0
- package/src/components/form-sections/ACHBasicInfoCard.tsx +100 -0
- package/src/components/form-sections/ACHTransferSection.tsx +64 -0
- package/src/components/form-sections/AddressForm.tsx +94 -0
- package/src/components/form-sections/BankAddressCard.tsx +95 -0
- package/src/components/form-sections/BankingDetailsCard.tsx +46 -0
- package/src/components/form-sections/BasicInfoCard.tsx +103 -0
- package/src/components/form-sections/BasicInfoSection.tsx +34 -0
- package/src/components/form-sections/BeneficiaryAddress.tsx +19 -0
- package/src/components/form-sections/BeneficiaryCard.tsx +41 -0
- package/src/components/form-sections/BeneficiaryDomesticWire.tsx +23 -0
- package/src/components/form-sections/BusinessProfileCard.tsx +131 -0
- package/src/components/form-sections/BusinessStatusCard.tsx +53 -0
- package/src/components/form-sections/ContactInfoCard.tsx +63 -0
- package/src/components/form-sections/CounterpartyBasicInfo.tsx +101 -0
- package/src/components/form-sections/CounterpartyProfileCard.tsx +104 -0
- package/src/components/form-sections/CounterpartyRecordsCard.tsx +41 -0
- package/src/components/form-sections/IntermediaryCard.tsx +77 -0
- package/src/components/form-sections/IntermediaryFI.tsx +41 -0
- package/src/components/form-sections/IntermediaryFIAddress.tsx +14 -0
- package/src/components/form-sections/OriginatorCard.tsx +49 -0
- package/src/components/form-sections/OriginatorFI.tsx +42 -0
- package/src/components/form-sections/OriginatorFIAddress.tsx +14 -0
- package/src/components/form-sections/PaymentInformationSection.tsx +163 -0
- package/src/components/form-sections/ReceiverCard.tsx +94 -0
- package/src/components/form-sections/WireTransferSection.tsx +75 -0
- package/src/components/layouts/list-page.tsx +103 -0
- package/src/components/transaction/ACHDetailsSection.tsx +95 -0
- package/src/components/transaction/WireDetailsSection.tsx +112 -0
- package/src/components/ui/account-card.tsx +94 -0
- package/src/components/ui/badge.tsx +75 -0
- package/src/components/ui/breadcrumb.tsx +78 -0
- package/src/components/ui/business-type-badge.tsx +42 -0
- package/src/components/ui/button.tsx +56 -0
- package/src/components/ui/calendar.tsx +49 -0
- package/src/components/ui/card.tsx +223 -0
- package/src/components/ui/container.tsx +45 -0
- package/src/components/ui/counterparty-type-badge.tsx +53 -0
- package/src/components/ui/data-grid.tsx +99 -0
- package/src/components/ui/data-table.tsx +152 -0
- package/src/components/ui/detail-page-layout.tsx +83 -0
- package/src/components/ui/dialog.tsx +120 -0
- package/src/components/ui/dropdown-menu.tsx +82 -0
- package/src/components/ui/editable-form-card.tsx +106 -0
- package/src/components/ui/editable-info-field.tsx +67 -0
- package/src/components/ui/enhanced-input.tsx +78 -0
- package/src/components/ui/enhanced-select.tsx +101 -0
- package/src/components/ui/enhanced-textarea.tsx +64 -0
- package/src/components/ui/entity-card.tsx +140 -0
- package/src/components/ui/form-card.tsx +40 -0
- package/src/components/ui/form-field.tsx +50 -0
- package/src/components/ui/form-input.tsx +29 -0
- package/src/components/ui/form-provider.tsx +18 -0
- package/src/components/ui/form-section.tsx +66 -0
- package/src/components/ui/form-select.tsx +35 -0
- package/src/components/ui/info-field.tsx +36 -0
- package/src/components/ui/json-viewer.tsx +146 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/metric-card.tsx +80 -0
- package/src/components/ui/page-layout.tsx +183 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/responsive-grid.tsx +46 -0
- package/src/components/ui/separator.tsx +31 -0
- package/src/components/ui/sheet.tsx +140 -0
- package/src/components/ui/sidebar.tsx +775 -0
- package/src/components/ui/sonner.tsx +29 -0
- package/src/components/ui/stack.tsx +77 -0
- package/src/components/ui/status-badge.tsx +68 -0
- package/src/components/ui/tabs.tsx +52 -0
- package/src/components/ui/toast.tsx +127 -0
- package/src/components/ui/toaster.tsx +33 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/components/ui/use-toast.ts +3 -0
- package/src/components/ui-kit/dashboard-demo.tsx +156 -0
- package/src/components/ui-kit/pattern-library.tsx +248 -0
- package/src/components/ui-kit/showcase.tsx +211 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/hooks/use-toast.ts +191 -0
- package/src/hooks/useEditState.ts +70 -0
- package/src/hooks/useFormWithEditState.ts +115 -0
- package/src/{styles.css → index.css} +10 -4
- package/src/lib/constants.ts +25 -0
- package/src/lib/mock-data/alert-data.ts +275 -0
- package/src/lib/mock-data/banking-data.ts +72 -0
- package/src/lib/mock-data/business-data.ts +71 -0
- package/src/lib/mock-data/counterparty-data.ts +70 -0
- package/src/lib/mock-data/index.ts +5 -0
- package/src/lib/mock-data/transaction-data.ts +283 -0
- package/src/lib/mock-data/wire-data.ts +103 -0
- package/src/lib/mock-data.tsx +180 -0
- package/src/lib/schemas/banking-schemas.ts +30 -0
- package/src/lib/schemas/business-schemas.ts +36 -0
- package/src/lib/schemas/counterparty-schemas.ts +43 -0
- package/src/lib/schemas/index.ts +5 -0
- package/src/lib/schemas/wire-schemas.ts +44 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.tsx +10 -0
- package/src/pages/Cases.tsx +16 -0
- package/src/pages/Dashboard.tsx +16 -0
- package/src/pages/NotFound.tsx +27 -0
- package/src/pages/TransactionHistory.tsx +532 -0
- package/src/pages/UIKit.tsx +51 -0
- package/src/pages/alerts/AlertDetail.tsx +193 -0
- package/src/pages/alerts/Alerts.tsx +373 -0
- package/src/pages/business/Business.tsx +48 -0
- package/src/pages/business/Create.tsx +173 -0
- package/src/pages/counterparty/Create.tsx +48 -0
- package/src/pages/counterparty/DomesticWire.tsx +78 -0
- package/src/pages/counterparty/Manage.tsx +79 -0
- package/src/pages/transactions/NewTransaction.tsx +527 -0
- package/src/pages/transactions/TransactionDetail.tsx +192 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.ts +124 -0
- package/tsconfig.app.json +30 -0
- package/tsconfig.json +19 -0
- package/tsconfig.node.json +22 -0
- package/vite.config.ts +22 -0
- package/dist/css/braid-ui-variables.css +0 -88
- package/dist/css/braid-ui.css +0 -4484
- package/dist/css/braid-ui.min.css +0 -1
- package/dist/index.cjs +0 -4
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2429
- package/dist/index.d.ts +0 -2429
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/src/styles-only.css +0 -121
- /package/{dist/braid-logo-343BOQZ2.png → src/assets/braid-logo.png} +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { useState } from "react"
|
|
2
|
+
import { PageLayout } from "@/components/ui/page-layout"
|
|
3
|
+
import { EnhancedInput } from "@/components/ui/enhanced-input"
|
|
4
|
+
import { EnhancedSelect } from "@/components/ui/enhanced-select"
|
|
5
|
+
import { EnhancedTextarea } from "@/components/ui/enhanced-textarea"
|
|
6
|
+
import { Card } from "@/components/ui/card"
|
|
7
|
+
import { Button } from "@/components/ui/button"
|
|
8
|
+
import { BusinessTypeBadge } from "@/components/ui/business-type-badge"
|
|
9
|
+
|
|
10
|
+
const CreateBusiness = () => {
|
|
11
|
+
const [businessType, setBusinessType] = useState("")
|
|
12
|
+
return (
|
|
13
|
+
<PageLayout
|
|
14
|
+
title="Create Business"
|
|
15
|
+
description="Create a new business entity with all required information"
|
|
16
|
+
actions={[
|
|
17
|
+
{ label: "Cancel", variant: "outline", onClick: () => {} },
|
|
18
|
+
{ label: "Create Business", variant: "default", onClick: () => {} }
|
|
19
|
+
]}
|
|
20
|
+
>
|
|
21
|
+
{/* Business Creation Form */}
|
|
22
|
+
<div className="space-y-6">
|
|
23
|
+
<Card className="p-6">
|
|
24
|
+
<div className="border-b border-border pb-4 mb-6">
|
|
25
|
+
<h2 className="text-lg font-semibold text-foreground">Business Information</h2>
|
|
26
|
+
<p className="text-sm text-muted-foreground">Basic business details and identification</p>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
30
|
+
<EnhancedInput
|
|
31
|
+
label="Business Name"
|
|
32
|
+
placeholder="Enter business name"
|
|
33
|
+
required
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<EnhancedInput
|
|
37
|
+
label="Legal Name"
|
|
38
|
+
placeholder="Enter legal business name"
|
|
39
|
+
hint="Official registered business name"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<div className="space-y-2">
|
|
43
|
+
<EnhancedSelect
|
|
44
|
+
label="Business Type"
|
|
45
|
+
placeholder="Select business type"
|
|
46
|
+
value={businessType}
|
|
47
|
+
onValueChange={setBusinessType}
|
|
48
|
+
options={[
|
|
49
|
+
{ value: "corporation", label: "Corporation" },
|
|
50
|
+
{ value: "llc", label: "LLC" },
|
|
51
|
+
{ value: "partnership", label: "Partnership" },
|
|
52
|
+
{ value: "sole_proprietorship", label: "Sole Proprietorship" }
|
|
53
|
+
]}
|
|
54
|
+
/>
|
|
55
|
+
{businessType && (
|
|
56
|
+
<div className="flex items-center gap-2">
|
|
57
|
+
<span className="text-xs text-muted-foreground">Preview:</span>
|
|
58
|
+
<BusinessTypeBadge type={businessType as "corporation" | "llc" | "partnership" | "sole_proprietorship"} />
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<EnhancedInput
|
|
64
|
+
label="Tax ID (EIN)"
|
|
65
|
+
placeholder="12-3456789"
|
|
66
|
+
hint="Employer Identification Number"
|
|
67
|
+
required
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<EnhancedInput
|
|
71
|
+
label="Registration Number"
|
|
72
|
+
placeholder="Enter registration number"
|
|
73
|
+
hint="State business registration number"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<EnhancedSelect
|
|
77
|
+
label="Industry"
|
|
78
|
+
placeholder="Select industry"
|
|
79
|
+
options={[
|
|
80
|
+
{ value: "technology", label: "Technology" },
|
|
81
|
+
{ value: "finance", label: "Finance" },
|
|
82
|
+
{ value: "healthcare", label: "Healthcare" },
|
|
83
|
+
{ value: "manufacturing", label: "Manufacturing" },
|
|
84
|
+
{ value: "retail", label: "Retail" },
|
|
85
|
+
{ value: "other", label: "Other" }
|
|
86
|
+
]}
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
</Card>
|
|
90
|
+
|
|
91
|
+
<Card className="p-6">
|
|
92
|
+
<div className="border-b border-border pb-4 mb-6">
|
|
93
|
+
<h2 className="text-lg font-semibold text-foreground">Contact Information</h2>
|
|
94
|
+
<p className="text-sm text-muted-foreground">Business address and contact details</p>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
98
|
+
<EnhancedInput
|
|
99
|
+
label="Street Address"
|
|
100
|
+
placeholder="Enter street address"
|
|
101
|
+
required
|
|
102
|
+
/>
|
|
103
|
+
|
|
104
|
+
<EnhancedInput
|
|
105
|
+
label="City"
|
|
106
|
+
placeholder="Enter city"
|
|
107
|
+
required
|
|
108
|
+
/>
|
|
109
|
+
|
|
110
|
+
<EnhancedInput
|
|
111
|
+
label="State"
|
|
112
|
+
placeholder="Enter state"
|
|
113
|
+
required
|
|
114
|
+
/>
|
|
115
|
+
|
|
116
|
+
<EnhancedInput
|
|
117
|
+
label="Postal Code"
|
|
118
|
+
placeholder="12345"
|
|
119
|
+
required
|
|
120
|
+
/>
|
|
121
|
+
|
|
122
|
+
<EnhancedSelect
|
|
123
|
+
label="Country"
|
|
124
|
+
placeholder="Select country"
|
|
125
|
+
options={[
|
|
126
|
+
{ value: "US", label: "United States" },
|
|
127
|
+
{ value: "CA", label: "Canada" },
|
|
128
|
+
{ value: "GB", label: "United Kingdom" },
|
|
129
|
+
{ value: "DE", label: "Germany" }
|
|
130
|
+
]}
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
<EnhancedInput
|
|
134
|
+
label="Phone Number"
|
|
135
|
+
placeholder="+1 (555) 123-4567"
|
|
136
|
+
required
|
|
137
|
+
/>
|
|
138
|
+
|
|
139
|
+
<EnhancedInput
|
|
140
|
+
label="Email Address"
|
|
141
|
+
placeholder="contact@business.com"
|
|
142
|
+
type="email"
|
|
143
|
+
required
|
|
144
|
+
/>
|
|
145
|
+
|
|
146
|
+
<EnhancedInput
|
|
147
|
+
label="Website"
|
|
148
|
+
placeholder="https://www.business.com"
|
|
149
|
+
type="url"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</Card>
|
|
153
|
+
|
|
154
|
+
<Card className="p-6">
|
|
155
|
+
<div className="border-b border-border pb-4 mb-6">
|
|
156
|
+
<h2 className="text-lg font-semibold text-foreground">Additional Information</h2>
|
|
157
|
+
<p className="text-sm text-muted-foreground">Optional business description and notes</p>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div className="space-y-6">
|
|
161
|
+
<EnhancedTextarea
|
|
162
|
+
label="Business Description"
|
|
163
|
+
placeholder="Describe your business activities and services"
|
|
164
|
+
hint="Brief description of what your business does"
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
</Card>
|
|
168
|
+
</div>
|
|
169
|
+
</PageLayout>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export default CreateBusiness
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useState } from "react"
|
|
2
|
+
import { PageLayout } from "@/components/ui/page-layout"
|
|
3
|
+
import { CounterpartyBasicInfo } from "@/components/form-sections/CounterpartyBasicInfo"
|
|
4
|
+
import { PaymentInformationSection } from "@/components/form-sections/PaymentInformationSection"
|
|
5
|
+
import { Button } from "@/components/ui/button"
|
|
6
|
+
import { Card, CardContent } from "@/components/ui/card"
|
|
7
|
+
|
|
8
|
+
const CreateCounterparty = () => {
|
|
9
|
+
const [counterpartyData, setCounterpartyData] = useState(null)
|
|
10
|
+
|
|
11
|
+
const handleBasicInfoChange = (data: any) => {
|
|
12
|
+
setCounterpartyData(data)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const handleSubmit = () => {
|
|
16
|
+
// Handle form submission
|
|
17
|
+
console.log("Creating counterparty with data:", counterpartyData)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<PageLayout
|
|
22
|
+
title="Create Counterparty"
|
|
23
|
+
description="Create a new counterparty with all required information"
|
|
24
|
+
actions={[
|
|
25
|
+
{ label: "Cancel", variant: "outline", onClick: () => {} },
|
|
26
|
+
{ label: "Create Counterparty", variant: "default", onClick: handleSubmit }
|
|
27
|
+
]}
|
|
28
|
+
>
|
|
29
|
+
<div className="space-y-6">
|
|
30
|
+
{/* Basic Information Card */}
|
|
31
|
+
<Card>
|
|
32
|
+
<CardContent className="p-6">
|
|
33
|
+
<CounterpartyBasicInfo onDataChange={handleBasicInfoChange} />
|
|
34
|
+
</CardContent>
|
|
35
|
+
</Card>
|
|
36
|
+
|
|
37
|
+
{/* Payment Information Section */}
|
|
38
|
+
<Card>
|
|
39
|
+
<CardContent className="p-6">
|
|
40
|
+
<PaymentInformationSection />
|
|
41
|
+
</CardContent>
|
|
42
|
+
</Card>
|
|
43
|
+
</div>
|
|
44
|
+
</PageLayout>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default CreateCounterparty
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { PageLayout } from "@/components/ui/page-layout"
|
|
2
|
+
import { BasicInfoCard } from "@/components/form-sections/BasicInfoCard"
|
|
3
|
+
import { ReceiverCard } from "@/components/form-sections/ReceiverCard"
|
|
4
|
+
import { BeneficiaryCard } from "@/components/form-sections/BeneficiaryCard"
|
|
5
|
+
import { FormCard } from "@/components/ui/form-card"
|
|
6
|
+
import { Button } from "@/components/ui/button"
|
|
7
|
+
import { Separator } from "@/components/ui/separator"
|
|
8
|
+
import { EnhancedSelect } from "@/components/ui/enhanced-select"
|
|
9
|
+
import { Edit } from "lucide-react"
|
|
10
|
+
import { useEditState } from "@/hooks/useEditState"
|
|
11
|
+
import { useState } from "react"
|
|
12
|
+
|
|
13
|
+
const CounterpartyDomesticWire = () => {
|
|
14
|
+
const { isEditing, handleToggleEdit, handleSave, handleCancel } = useEditState({})
|
|
15
|
+
const [transferType, setTransferType] = useState("DOMESTIC")
|
|
16
|
+
return (
|
|
17
|
+
<PageLayout
|
|
18
|
+
title="Counterparty Domestic Wire"
|
|
19
|
+
description="Manage domestic wire transfer configurations and beneficiary information"
|
|
20
|
+
actions={!isEditing ? [
|
|
21
|
+
{ label: "Cancel", variant: "outline", onClick: () => {} },
|
|
22
|
+
{ label: "Save Domestic Wire Configuration", variant: "default", onClick: () => {} }
|
|
23
|
+
] : undefined}
|
|
24
|
+
>
|
|
25
|
+
<div className="space-y-8">
|
|
26
|
+
{/* Basic Info - Always Visible */}
|
|
27
|
+
<BasicInfoCard />
|
|
28
|
+
|
|
29
|
+
<Separator className="my-8" />
|
|
30
|
+
|
|
31
|
+
{/* Domestic Wire Transfer Configuration */}
|
|
32
|
+
<FormCard
|
|
33
|
+
title="Domestic Wire Transfer Configuration"
|
|
34
|
+
description="Configure domestic wire transfer settings and beneficiary information"
|
|
35
|
+
headerActions={
|
|
36
|
+
<div className="flex items-center gap-2">
|
|
37
|
+
{isEditing ? (
|
|
38
|
+
<>
|
|
39
|
+
<EnhancedSelect
|
|
40
|
+
value={transferType}
|
|
41
|
+
onValueChange={setTransferType}
|
|
42
|
+
options={[
|
|
43
|
+
{ value: "DOMESTIC", label: "DOMESTIC" },
|
|
44
|
+
{ value: "INTERNATIONAL", label: "INTERNATIONAL" }
|
|
45
|
+
]}
|
|
46
|
+
placeholder="Select transfer type"
|
|
47
|
+
/>
|
|
48
|
+
<Button variant="outline" size="sm" onClick={handleCancel}>
|
|
49
|
+
Cancel
|
|
50
|
+
</Button>
|
|
51
|
+
<Button size="sm" onClick={handleSave}>
|
|
52
|
+
Save
|
|
53
|
+
</Button>
|
|
54
|
+
</>
|
|
55
|
+
) : (
|
|
56
|
+
<>
|
|
57
|
+
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-secondary text-secondary-foreground">
|
|
58
|
+
{transferType}
|
|
59
|
+
</span>
|
|
60
|
+
<Button variant="ghost" size="icon" onClick={handleToggleEdit} className="text-primary hover:text-primary/80 hover:bg-primary/10">
|
|
61
|
+
<Edit className="h-4 w-4" />
|
|
62
|
+
</Button>
|
|
63
|
+
</>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
}
|
|
67
|
+
>
|
|
68
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
69
|
+
<ReceiverCard isEditing={isEditing} hideActions={true} />
|
|
70
|
+
<BeneficiaryCard isEditing={isEditing} hideActions={true} />
|
|
71
|
+
</div>
|
|
72
|
+
</FormCard>
|
|
73
|
+
</div>
|
|
74
|
+
</PageLayout>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default CounterpartyDomesticWire
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { PageLayout } from "@/components/ui/page-layout"
|
|
2
|
+
import { Stack } from "@/components/ui/stack"
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import { BasicInfoSection } from "@/components/form-sections/BasicInfoSection"
|
|
5
|
+
import { WireTransferSection } from "@/components/form-sections/WireTransferSection"
|
|
6
|
+
import { ACHTransferSection } from "@/components/form-sections/ACHTransferSection"
|
|
7
|
+
import { useEditState } from "@/hooks/useEditState"
|
|
8
|
+
|
|
9
|
+
const CounterpartyManage = () => {
|
|
10
|
+
// Global edit state management
|
|
11
|
+
const {
|
|
12
|
+
isEditing: isBasicEditing,
|
|
13
|
+
handleToggleEdit: handleBasicToggleEdit
|
|
14
|
+
} = useEditState({})
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
isEditing: isWireEditing,
|
|
18
|
+
handleToggleEdit: handleWireToggleEdit
|
|
19
|
+
} = useEditState({})
|
|
20
|
+
|
|
21
|
+
const {
|
|
22
|
+
isEditing: isACHEditing,
|
|
23
|
+
handleToggleEdit: handleACHToggleEdit
|
|
24
|
+
} = useEditState({})
|
|
25
|
+
|
|
26
|
+
const pageCards = [
|
|
27
|
+
{
|
|
28
|
+
key: "basic-info",
|
|
29
|
+
component: BasicInfoSection,
|
|
30
|
+
props: {
|
|
31
|
+
isEditing: isBasicEditing,
|
|
32
|
+
onToggleEdit: handleBasicToggleEdit
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "wire-transfer",
|
|
37
|
+
component: WireTransferSection,
|
|
38
|
+
props: {
|
|
39
|
+
isEditing: isWireEditing,
|
|
40
|
+
onToggleEdit: handleWireToggleEdit
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: "ach-transfer",
|
|
45
|
+
component: ACHTransferSection,
|
|
46
|
+
props: {
|
|
47
|
+
isEditing: isACHEditing,
|
|
48
|
+
onToggleEdit: handleACHToggleEdit
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
const pageActions = !isBasicEditing && !isWireEditing && !isACHEditing ? [
|
|
54
|
+
{
|
|
55
|
+
label: "Cancel",
|
|
56
|
+
variant: "outline" as const,
|
|
57
|
+
onClick: () => {}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "Save Configuration",
|
|
61
|
+
variant: "default" as const,
|
|
62
|
+
onClick: () => {}
|
|
63
|
+
}
|
|
64
|
+
] : []
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<PageLayout
|
|
68
|
+
title="Counterparty Management"
|
|
69
|
+
description="Manage counterparty details and payment configurations"
|
|
70
|
+
mode="cards"
|
|
71
|
+
cards={pageCards}
|
|
72
|
+
actions={pageActions}
|
|
73
|
+
maxWidth="lg"
|
|
74
|
+
gridCols={1}
|
|
75
|
+
/>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default CounterpartyManage
|