braid-ui 1.0.5 → 1.0.7
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 +53 -3
- package/dist/index.cjs +1977 -1396
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +137 -25
- package/dist/index.d.ts +137 -25
- package/dist/index.js +1895 -1332
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles.css +3 -2
package/dist/index.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React15 from 'react';
|
|
2
2
|
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import {
|
|
8
|
-
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, Filter, ChevronLeft, Calendar as Calendar$1, CalendarIcon, CheckCircle2, Circle, UserPlus, ChevronsUpDown } from 'lucide-react';
|
|
7
|
+
import { ChevronDown, ChevronUp, Check, X, PanelLeft, Edit, Home, Globe, CreditCard, Building, MoreVertical, Minus, TrendingDown, TrendingUp, ChevronRight, Eye, Trash2, Plus, MessageSquare, Upload, FileText, Download, Copy, LayoutDashboard, Bell, Briefcase, FileCheck, Receipt, ArrowLeftRight, Users, Building2, Zap, Shield, AlertCircle, RefreshCw, Landmark, Search, Repeat, Box, Settings, BarChart3, Key, Heart, User, AlertTriangle, XCircle, CheckCircle, Clock, CalendarIcon, Loader2, ArrowDownRight, ArrowUpRight, Filter, ChevronLeft, Calendar as Calendar$1, CheckCircle2, StickyNote, FileUp, Circle, UserPlus, ChevronsUpDown, FileJson } from 'lucide-react';
|
|
9
8
|
import { createPortal } from 'react-dom';
|
|
9
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
11
|
+
import { NavLink, useLocation, useParams, useNavigate, Link } from 'react-router-dom';
|
|
12
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
11
13
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
12
|
-
import { NavLink, useLocation, useParams, useNavigate } from 'react-router-dom';
|
|
13
|
-
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
|
|
14
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
15
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
16
14
|
import { FormProvider as FormProvider$1, useFormContext, Controller, useForm } from 'react-hook-form';
|
|
17
15
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
18
16
|
import { z } from 'zod';
|
|
17
|
+
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@radix-ui/react-collapsible';
|
|
18
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
19
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
19
20
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
21
|
+
import { format } from 'date-fns';
|
|
20
22
|
import { DayPicker } from 'react-day-picker';
|
|
21
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
22
23
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
24
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
25
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
23
26
|
import { useTheme } from 'next-themes';
|
|
24
27
|
import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
|
|
25
28
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
26
29
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
27
|
-
import { format } from 'date-fns';
|
|
28
30
|
|
|
29
|
-
// src/components/
|
|
31
|
+
// src/components/alerts/OFACAlertView.tsx
|
|
30
32
|
function cn(...inputs) {
|
|
31
33
|
return twMerge(clsx(inputs));
|
|
32
34
|
}
|
|
@@ -64,7 +66,7 @@ var cardVariants = cva(
|
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
);
|
|
67
|
-
var Card =
|
|
69
|
+
var Card = React15.forwardRef(
|
|
68
70
|
({ className, variant, size, fullHeight, interactive, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
69
71
|
"div",
|
|
70
72
|
{
|
|
@@ -101,7 +103,7 @@ var cardHeaderVariants = cva(
|
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
);
|
|
104
|
-
var CardHeader =
|
|
106
|
+
var CardHeader = React15.forwardRef(
|
|
105
107
|
({ className, size, align, direction, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
106
108
|
"div",
|
|
107
109
|
{
|
|
@@ -127,7 +129,7 @@ var cardTitleVariants = cva(
|
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
);
|
|
130
|
-
var CardTitle =
|
|
132
|
+
var CardTitle = React15.forwardRef(
|
|
131
133
|
({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
132
134
|
"h3",
|
|
133
135
|
{
|
|
@@ -138,7 +140,7 @@ var CardTitle = React13.forwardRef(
|
|
|
138
140
|
)
|
|
139
141
|
);
|
|
140
142
|
CardTitle.displayName = "CardTitle";
|
|
141
|
-
var CardDescription =
|
|
143
|
+
var CardDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
142
144
|
"p",
|
|
143
145
|
{
|
|
144
146
|
ref,
|
|
@@ -167,7 +169,7 @@ var cardContentVariants = cva(
|
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
171
|
);
|
|
170
|
-
var CardContent =
|
|
172
|
+
var CardContent = React15.forwardRef(
|
|
171
173
|
({ className, size, fullHeight, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
172
174
|
"div",
|
|
173
175
|
{
|
|
@@ -200,7 +202,7 @@ var cardFooterVariants = cva(
|
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
);
|
|
203
|
-
var CardFooter =
|
|
205
|
+
var CardFooter = React15.forwardRef(
|
|
204
206
|
({ className, size, justify, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
205
207
|
"div",
|
|
206
208
|
{
|
|
@@ -211,7 +213,7 @@ var CardFooter = React13.forwardRef(
|
|
|
211
213
|
)
|
|
212
214
|
);
|
|
213
215
|
CardFooter.displayName = "CardFooter";
|
|
214
|
-
var FormCard =
|
|
216
|
+
var FormCard = React15.forwardRef(
|
|
215
217
|
({ title, description, children, headerActions, className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
216
218
|
Card,
|
|
217
219
|
{
|
|
@@ -238,45 +240,6 @@ var FormCard = React13.forwardRef(
|
|
|
238
240
|
)
|
|
239
241
|
);
|
|
240
242
|
FormCard.displayName = "FormCard";
|
|
241
|
-
var buttonVariants = cva(
|
|
242
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
243
|
-
{
|
|
244
|
-
variants: {
|
|
245
|
-
variant: {
|
|
246
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
247
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
248
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
249
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
250
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
251
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
252
|
-
},
|
|
253
|
-
size: {
|
|
254
|
-
default: "h-10 px-4 py-2",
|
|
255
|
-
sm: "h-9 rounded-md px-3",
|
|
256
|
-
lg: "h-11 rounded-md px-8",
|
|
257
|
-
icon: "h-10 w-10"
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
defaultVariants: {
|
|
261
|
-
variant: "default",
|
|
262
|
-
size: "default"
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
);
|
|
266
|
-
var Button = React13.forwardRef(
|
|
267
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
268
|
-
const Comp = asChild ? Slot : "button";
|
|
269
|
-
return /* @__PURE__ */ jsx(
|
|
270
|
-
Comp,
|
|
271
|
-
{
|
|
272
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
273
|
-
ref,
|
|
274
|
-
...props
|
|
275
|
-
}
|
|
276
|
-
);
|
|
277
|
-
}
|
|
278
|
-
);
|
|
279
|
-
Button.displayName = "Button";
|
|
280
243
|
var badgeVariants = cva(
|
|
281
244
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
282
245
|
{
|
|
@@ -288,6 +251,8 @@ var badgeVariants = cva(
|
|
|
288
251
|
outline: "text-foreground",
|
|
289
252
|
success: "border-transparent bg-success text-success-foreground hover:bg-success/80",
|
|
290
253
|
warning: "border-transparent bg-warning text-warning-foreground hover:bg-warning/80",
|
|
254
|
+
inbound: "border-transparent bg-blue-500 text-white hover:bg-blue-600",
|
|
255
|
+
outbound: "border-transparent bg-orange-500 text-white hover:bg-orange-600",
|
|
291
256
|
// Business type specific variants
|
|
292
257
|
business: "border-blue-200 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-300",
|
|
293
258
|
individual: "border-green-200 bg-green-50 text-green-700 hover:bg-green-100 dark:border-green-800 dark:bg-green-950 dark:text-green-300",
|
|
@@ -320,6 +285,11 @@ function Badge({ className, variant, ...props }) {
|
|
|
320
285
|
}
|
|
321
286
|
var AlertTimeline = ({ events }) => {
|
|
322
287
|
const getIcon = (action) => {
|
|
288
|
+
if (action.includes("Note added")) return /* @__PURE__ */ jsx(StickyNote, { className: "h-4 w-4" });
|
|
289
|
+
if (action.includes("Document added")) return /* @__PURE__ */ jsx(FileUp, { className: "h-4 w-4" });
|
|
290
|
+
if (action.includes("Alert Approved")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
|
|
291
|
+
if (action.includes("Alert Declined")) return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
|
|
292
|
+
if (action.includes("RFI Status change")) return /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" });
|
|
323
293
|
if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
324
294
|
if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
|
|
325
295
|
if (action.includes("Updated") || action.includes("Modified")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
|
|
@@ -327,7 +297,12 @@ var AlertTimeline = ({ events }) => {
|
|
|
327
297
|
if (action.includes("Rejected")) return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
|
|
328
298
|
return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
329
299
|
};
|
|
330
|
-
const getStatusColor2 = (status) => {
|
|
300
|
+
const getStatusColor2 = (status, action) => {
|
|
301
|
+
if (action?.includes("Note added")) return "text-blue-500";
|
|
302
|
+
if (action?.includes("Document added")) return "text-purple-500";
|
|
303
|
+
if (action?.includes("Alert Approved")) return "text-success";
|
|
304
|
+
if (action?.includes("Alert Declined")) return "text-destructive";
|
|
305
|
+
if (action?.includes("RFI Status change")) return "text-warning";
|
|
331
306
|
switch (status) {
|
|
332
307
|
case "Unassigned":
|
|
333
308
|
return "text-destructive";
|
|
@@ -344,10 +319,7 @@ var AlertTimeline = ({ events }) => {
|
|
|
344
319
|
}
|
|
345
320
|
return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: events.map((event, index) => /* @__PURE__ */ jsxs("div", { className: "relative pl-6 pb-3", children: [
|
|
346
321
|
index !== events.length - 1 && /* @__PURE__ */ jsx("div", { className: "absolute left-[7px] top-5 bottom-0 w-[2px] bg-border" }),
|
|
347
|
-
/* @__PURE__ */ jsx("div", { className: cn(
|
|
348
|
-
"absolute left-0 top-0 flex-none",
|
|
349
|
-
getStatusColor2(event.status)
|
|
350
|
-
), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
322
|
+
/* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-0 flex-none", getStatusColor2(event.status, event.action)), children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4", children: getIcon(event.action) }) }),
|
|
351
323
|
/* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
352
324
|
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-foreground", children: event.action }),
|
|
353
325
|
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -355,14 +327,49 @@ var AlertTimeline = ({ events }) => {
|
|
|
355
327
|
event.user
|
|
356
328
|
] }),
|
|
357
329
|
event.details && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: event.details }),
|
|
358
|
-
event.status && /* @__PURE__ */ jsxs("p", { className: cn("text-xs font-medium", getStatusColor2(event.status)), children: [
|
|
359
|
-
"Status: ",
|
|
360
|
-
event.status
|
|
361
|
-
] }),
|
|
362
330
|
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 pt-0.5", children: event.timestamp })
|
|
363
331
|
] })
|
|
364
332
|
] }, event.id)) });
|
|
365
333
|
};
|
|
334
|
+
var buttonVariants = cva(
|
|
335
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
336
|
+
{
|
|
337
|
+
variants: {
|
|
338
|
+
variant: {
|
|
339
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
340
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
341
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
342
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
343
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
344
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
345
|
+
},
|
|
346
|
+
size: {
|
|
347
|
+
default: "h-10 px-4 py-2",
|
|
348
|
+
sm: "h-9 rounded-md px-3",
|
|
349
|
+
lg: "h-11 rounded-md px-8",
|
|
350
|
+
icon: "h-10 w-10"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
defaultVariants: {
|
|
354
|
+
variant: "default",
|
|
355
|
+
size: "default"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
var Button = React15.forwardRef(
|
|
360
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
361
|
+
const Comp = asChild ? Slot : "button";
|
|
362
|
+
return /* @__PURE__ */ jsx(
|
|
363
|
+
Comp,
|
|
364
|
+
{
|
|
365
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
366
|
+
ref,
|
|
367
|
+
...props
|
|
368
|
+
}
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
);
|
|
372
|
+
Button.displayName = "Button";
|
|
366
373
|
var textareaVariants = cva(
|
|
367
374
|
"flex min-h-[80px] w-full rounded-md bg-form-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground transition-form resize-y",
|
|
368
375
|
{
|
|
@@ -380,7 +387,7 @@ var textareaVariants = cva(
|
|
|
380
387
|
}
|
|
381
388
|
}
|
|
382
389
|
);
|
|
383
|
-
var EnhancedTextarea =
|
|
390
|
+
var EnhancedTextarea = React15.forwardRef(
|
|
384
391
|
({ className, variant, label, hint, error, success, ...props }, ref) => {
|
|
385
392
|
const textareaVariant = error ? "error" : success ? "success" : props.disabled ? "disabled" : props.readOnly ? "readonly" : variant;
|
|
386
393
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
@@ -419,9 +426,9 @@ var selectVariants = cva(
|
|
|
419
426
|
}
|
|
420
427
|
}
|
|
421
428
|
);
|
|
422
|
-
var EnhancedSelect =
|
|
429
|
+
var EnhancedSelect = React15.forwardRef(({ variant, label, hint, error, success, placeholder, options, disabled, className, ...props }, ref) => {
|
|
423
430
|
const selectVariant = error ? "error" : success ? "success" : disabled ? "disabled" : variant;
|
|
424
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
431
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", className), children: [
|
|
425
432
|
label && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: label }),
|
|
426
433
|
/* @__PURE__ */ jsxs(SelectPrimitive.Root, { ...props, disabled, children: [
|
|
427
434
|
/* @__PURE__ */ jsxs(
|
|
@@ -435,7 +442,7 @@ var EnhancedSelect = React13.forwardRef(({ variant, label, hint, error, success,
|
|
|
435
442
|
]
|
|
436
443
|
}
|
|
437
444
|
),
|
|
438
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, { className: "relative z-
|
|
445
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, { className: "relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", children: [
|
|
439
446
|
/* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" }) }),
|
|
440
447
|
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsxs(
|
|
441
448
|
SelectPrimitive.Item,
|
|
@@ -559,8 +566,8 @@ function toast({ ...props }) {
|
|
|
559
566
|
};
|
|
560
567
|
}
|
|
561
568
|
function useToast() {
|
|
562
|
-
const [state, setState] =
|
|
563
|
-
|
|
569
|
+
const [state, setState] = React15.useState(memoryState);
|
|
570
|
+
React15.useEffect(() => {
|
|
564
571
|
listeners.push(setState);
|
|
565
572
|
return () => {
|
|
566
573
|
const index = listeners.indexOf(setState);
|
|
@@ -660,7 +667,8 @@ var AlertNotes = ({ alertId, notes }) => {
|
|
|
660
667
|
placeholder: "Enter your note here...",
|
|
661
668
|
value: newNote,
|
|
662
669
|
onChange: (e) => setNewNote(e.target.value),
|
|
663
|
-
rows: 6
|
|
670
|
+
rows: 6,
|
|
671
|
+
required: true
|
|
664
672
|
}
|
|
665
673
|
)
|
|
666
674
|
] }),
|
|
@@ -717,7 +725,7 @@ var AlertNotes = ({ alertId, notes }) => {
|
|
|
717
725
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 mb-2", children: [
|
|
718
726
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
719
727
|
/* @__PURE__ */ jsx("p", { className: "font-medium text-sm text-foreground", children: note.user }),
|
|
720
|
-
/* @__PURE__ */ jsx(Badge, { variant: note.type === "RFI Note" ? "default" : "outline", children: note.type })
|
|
728
|
+
/* @__PURE__ */ jsx(Badge, { variant: note.type === "RFI Note" ? "default" : "outline", children: note.type === "RFI Note" ? "RFI" : "Internal" })
|
|
721
729
|
] }),
|
|
722
730
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
723
731
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: note.timestamp }),
|
|
@@ -764,7 +772,7 @@ var inputVariants = cva(
|
|
|
764
772
|
}
|
|
765
773
|
}
|
|
766
774
|
);
|
|
767
|
-
var EnhancedInput =
|
|
775
|
+
var EnhancedInput = React15.forwardRef(
|
|
768
776
|
({ className, variant, size, label, hint, error, success, isLoading, ...props }, ref) => {
|
|
769
777
|
const inputVariant = error ? "error" : success ? "success" : props.disabled ? "disabled" : props.readOnly ? "readonly" : variant;
|
|
770
778
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
@@ -1028,10 +1036,8 @@ var AlertDocuments = ({ alertId, documents }) => {
|
|
|
1028
1036
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
1029
1037
|
!isImageType(doc.name) && /* @__PURE__ */ jsx("div", { className: cn(getFileTypeColor(doc.type)), children: getFileIcon(doc.type) }),
|
|
1030
1038
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1031
|
-
/* @__PURE__ */
|
|
1032
|
-
|
|
1033
|
-
/* @__PURE__ */ jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted", getFileTypeColor(doc.type)), children: doc.type })
|
|
1034
|
-
] }),
|
|
1039
|
+
/* @__PURE__ */ jsx("h4", { className: "font-medium text-sm truncate", children: doc.name }),
|
|
1040
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-xs px-2 py-0.5 rounded-full bg-muted inline-block mt-1", getFileTypeColor(doc.type)), children: doc.type }),
|
|
1035
1041
|
doc.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground mt-1", children: doc.description }),
|
|
1036
1042
|
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
1037
1043
|
doc.size,
|
|
@@ -1103,23 +1109,127 @@ var InfoField = ({ label, value, layout = "vertical", className }) => {
|
|
|
1103
1109
|
/* @__PURE__ */ jsx("div", { className: `text-sm text-foreground ${label ? "mt-1" : ""}`, children: value })
|
|
1104
1110
|
] });
|
|
1105
1111
|
};
|
|
1112
|
+
var ScrollArea = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1113
|
+
ScrollAreaPrimitive.Root,
|
|
1114
|
+
{
|
|
1115
|
+
ref,
|
|
1116
|
+
className: cn("relative overflow-hidden", className),
|
|
1117
|
+
...props,
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
1120
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
1121
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
1122
|
+
]
|
|
1123
|
+
}
|
|
1124
|
+
));
|
|
1125
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1126
|
+
var ScrollBar = React15.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1127
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1128
|
+
{
|
|
1129
|
+
ref,
|
|
1130
|
+
orientation,
|
|
1131
|
+
className: cn(
|
|
1132
|
+
"flex touch-none select-none transition-colors",
|
|
1133
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1134
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
1135
|
+
className
|
|
1136
|
+
),
|
|
1137
|
+
...props,
|
|
1138
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1139
|
+
}
|
|
1140
|
+
));
|
|
1141
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
1142
|
+
var Table = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
1143
|
+
"table",
|
|
1144
|
+
{
|
|
1145
|
+
ref,
|
|
1146
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
1147
|
+
...props
|
|
1148
|
+
}
|
|
1149
|
+
) }));
|
|
1150
|
+
Table.displayName = "Table";
|
|
1151
|
+
var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
1152
|
+
TableHeader.displayName = "TableHeader";
|
|
1153
|
+
var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1154
|
+
"tbody",
|
|
1155
|
+
{
|
|
1156
|
+
ref,
|
|
1157
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
1158
|
+
...props
|
|
1159
|
+
}
|
|
1160
|
+
));
|
|
1161
|
+
TableBody.displayName = "TableBody";
|
|
1162
|
+
var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1163
|
+
"tfoot",
|
|
1164
|
+
{
|
|
1165
|
+
ref,
|
|
1166
|
+
className: cn(
|
|
1167
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1168
|
+
className
|
|
1169
|
+
),
|
|
1170
|
+
...props
|
|
1171
|
+
}
|
|
1172
|
+
));
|
|
1173
|
+
TableFooter.displayName = "TableFooter";
|
|
1174
|
+
var TableRow = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1175
|
+
"tr",
|
|
1176
|
+
{
|
|
1177
|
+
ref,
|
|
1178
|
+
className: cn(
|
|
1179
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1180
|
+
className
|
|
1181
|
+
),
|
|
1182
|
+
...props
|
|
1183
|
+
}
|
|
1184
|
+
));
|
|
1185
|
+
TableRow.displayName = "TableRow";
|
|
1186
|
+
var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1187
|
+
"th",
|
|
1188
|
+
{
|
|
1189
|
+
ref,
|
|
1190
|
+
className: cn(
|
|
1191
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
1192
|
+
className
|
|
1193
|
+
),
|
|
1194
|
+
...props
|
|
1195
|
+
}
|
|
1196
|
+
));
|
|
1197
|
+
TableHead.displayName = "TableHead";
|
|
1198
|
+
var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1199
|
+
"td",
|
|
1200
|
+
{
|
|
1201
|
+
ref,
|
|
1202
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
1203
|
+
...props
|
|
1204
|
+
}
|
|
1205
|
+
));
|
|
1206
|
+
TableCell.displayName = "TableCell";
|
|
1207
|
+
var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1208
|
+
"caption",
|
|
1209
|
+
{
|
|
1210
|
+
ref,
|
|
1211
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1212
|
+
...props
|
|
1213
|
+
}
|
|
1214
|
+
));
|
|
1215
|
+
TableCaption.displayName = "TableCaption";
|
|
1106
1216
|
var Dialog = DialogPrimitive.Root;
|
|
1107
1217
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1108
1218
|
var DialogPortal = DialogPrimitive.Portal;
|
|
1109
1219
|
var DialogClose = DialogPrimitive.Close;
|
|
1110
|
-
var DialogOverlay =
|
|
1220
|
+
var DialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1111
1221
|
DialogPrimitive.Overlay,
|
|
1112
1222
|
{
|
|
1113
1223
|
ref,
|
|
1114
1224
|
className: cn(
|
|
1115
|
-
"fixed inset-0 z-50 bg-
|
|
1225
|
+
"fixed inset-0 z-50 bg-white/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1116
1226
|
className
|
|
1117
1227
|
),
|
|
1118
1228
|
...props
|
|
1119
1229
|
}
|
|
1120
1230
|
));
|
|
1121
1231
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1122
|
-
var DialogContent =
|
|
1232
|
+
var DialogContent = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1123
1233
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1124
1234
|
/* @__PURE__ */ jsxs(
|
|
1125
1235
|
DialogPrimitive.Content,
|
|
@@ -1169,7 +1279,7 @@ var DialogFooter = ({
|
|
|
1169
1279
|
}
|
|
1170
1280
|
);
|
|
1171
1281
|
DialogFooter.displayName = "DialogFooter";
|
|
1172
|
-
var DialogTitle =
|
|
1282
|
+
var DialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1173
1283
|
DialogPrimitive.Title,
|
|
1174
1284
|
{
|
|
1175
1285
|
ref,
|
|
@@ -1181,7 +1291,7 @@ var DialogTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1181
1291
|
}
|
|
1182
1292
|
));
|
|
1183
1293
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1184
|
-
var DialogDescription =
|
|
1294
|
+
var DialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1185
1295
|
DialogPrimitive.Description,
|
|
1186
1296
|
{
|
|
1187
1297
|
ref,
|
|
@@ -1290,45 +1400,124 @@ var JsonNode = ({ data, name, depth, compact = false }) => {
|
|
|
1290
1400
|
] })
|
|
1291
1401
|
] });
|
|
1292
1402
|
};
|
|
1293
|
-
var
|
|
1294
|
-
const [
|
|
1403
|
+
var OFACAlertView = ({ alert }) => {
|
|
1404
|
+
const [isJsonDialogOpen, setIsJsonDialogOpen] = useState(false);
|
|
1405
|
+
const parseOFACMatches = (data) => {
|
|
1406
|
+
if (!data.rawResults || !data.ofacCheckDetails) return [];
|
|
1407
|
+
try {
|
|
1408
|
+
const rawResults = JSON.parse(data.rawResults);
|
|
1409
|
+
const tableRows = [];
|
|
1410
|
+
const getListName = (listType) => {
|
|
1411
|
+
const listNames = {
|
|
1412
|
+
"SDNs": "OFAC SDN List",
|
|
1413
|
+
"altNames": "OFAC Alternate Names",
|
|
1414
|
+
"sectoralSanctions": "OFAC Sectoral Sanctions",
|
|
1415
|
+
"nonSDNMenuBasedSanctionsList": "OFAC Non-SDN List",
|
|
1416
|
+
"ukConsolidatedSanctionsList": "UK Consolidated List"
|
|
1417
|
+
};
|
|
1418
|
+
return listNames[listType] || listType;
|
|
1419
|
+
};
|
|
1420
|
+
const formatCheckKey = (key) => {
|
|
1421
|
+
return key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
1422
|
+
};
|
|
1423
|
+
const listTypes = [
|
|
1424
|
+
{ key: "SDNs", nameField: "sdnName" },
|
|
1425
|
+
{ key: "altNames", nameField: "alternateName" },
|
|
1426
|
+
{ key: "sectoralSanctions", nameField: "Name" },
|
|
1427
|
+
{ key: "nonSDNMenuBasedSanctionsList", nameField: "Name" },
|
|
1428
|
+
{ key: "ukConsolidatedSanctionsList", nameField: "Names" }
|
|
1429
|
+
];
|
|
1430
|
+
listTypes.forEach(({ key, nameField }) => {
|
|
1431
|
+
const list = rawResults[key];
|
|
1432
|
+
if (list && Array.isArray(list)) {
|
|
1433
|
+
list.forEach((item) => {
|
|
1434
|
+
data.ofacCheckDetails.forEach((check) => {
|
|
1435
|
+
tableRows.push({
|
|
1436
|
+
type: formatCheckKey(check.checkKey),
|
|
1437
|
+
name: check.checkValue,
|
|
1438
|
+
matchedName: item.matchedName || item[nameField] || "N/A",
|
|
1439
|
+
list: getListName(key),
|
|
1440
|
+
matchScore: item.match ? `${(item.match * 100).toFixed(2)}%` : "N/A"
|
|
1441
|
+
});
|
|
1442
|
+
});
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
return tableRows;
|
|
1447
|
+
} catch (error) {
|
|
1448
|
+
console.error("Error parsing OFAC results:", error);
|
|
1449
|
+
return [];
|
|
1450
|
+
}
|
|
1451
|
+
};
|
|
1295
1452
|
const renderOFACContext = () => {
|
|
1296
1453
|
const data = alert.contextData;
|
|
1297
1454
|
if (!data) return null;
|
|
1455
|
+
const tableRows = parseOFACMatches(data);
|
|
1456
|
+
const entityName = data.counterpartyName || data.businessName || data.individualName || data.transactionPaymentId || "N/A";
|
|
1457
|
+
const entityType = data.counterpartyName ? "Counterparty" : data.businessName ? "Business" : data.individualName ? "Individual" : data.transactionPaymentId ? "Transaction" : "N/A";
|
|
1458
|
+
const entityId = data.counterpartyId || data.businessId || data.individualId || data.transactionPaymentId;
|
|
1459
|
+
const entityLink = entityId ? data.counterpartyId ? `/counterparties/${entityId}` : data.businessId ? `/businesses/${entityId}` : data.individualId ? `/individuals/${entityId}` : data.transactionPaymentId ? `/transactions/${entityId}` : null : null;
|
|
1298
1460
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1299
1461
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
1300
|
-
/* @__PURE__ */ jsx(
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
/* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx(Badge, { variant: parseInt(item.matchScore) > 90 ? "alert-ofac" : "outline", children: item.matchScore }) })
|
|
1317
|
-
] }, index)) })
|
|
1318
|
-
] }) })
|
|
1462
|
+
/* @__PURE__ */ jsx(
|
|
1463
|
+
InfoField,
|
|
1464
|
+
{
|
|
1465
|
+
label: "Entity Name",
|
|
1466
|
+
value: entityLink ? /* @__PURE__ */ jsx(
|
|
1467
|
+
Link,
|
|
1468
|
+
{
|
|
1469
|
+
to: entityLink,
|
|
1470
|
+
className: "text-primary hover:underline",
|
|
1471
|
+
children: entityName
|
|
1472
|
+
}
|
|
1473
|
+
) : entityName,
|
|
1474
|
+
layout: "horizontal"
|
|
1475
|
+
}
|
|
1476
|
+
),
|
|
1477
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Entity Type", value: entityType, layout: "horizontal" })
|
|
1319
1478
|
] }),
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1479
|
+
tableRows.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(ScrollArea, { className: "h-[300px] rounded-md border", children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
1480
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
1481
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Type" }),
|
|
1482
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Name" }),
|
|
1483
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Matched Name" }),
|
|
1484
|
+
/* @__PURE__ */ jsxs(TableHead, { className: "flex items-center gap-1", children: [
|
|
1485
|
+
/* @__PURE__ */ jsx("span", { children: "List" }),
|
|
1486
|
+
/* @__PURE__ */ jsxs(Dialog, { open: isJsonDialogOpen, onOpenChange: setIsJsonDialogOpen, children: [
|
|
1487
|
+
/* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1488
|
+
Button,
|
|
1489
|
+
{
|
|
1490
|
+
variant: "ghost",
|
|
1491
|
+
size: "icon",
|
|
1492
|
+
className: "h-6 w-6 text-primary hover:text-primary/80",
|
|
1493
|
+
children: /* @__PURE__ */ jsx(FileJson, { className: "h-4 w-4" })
|
|
1494
|
+
}
|
|
1495
|
+
) }),
|
|
1496
|
+
/* @__PURE__ */ jsxs(DialogContent, { className: "max-w-4xl max-h-[80vh]", children: [
|
|
1497
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
1498
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: "OFAC Raw Results" }),
|
|
1499
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: "Complete JSON response from the OFAC screening check" })
|
|
1500
|
+
] }),
|
|
1501
|
+
/* @__PURE__ */ jsx(
|
|
1502
|
+
JsonViewer,
|
|
1503
|
+
{
|
|
1504
|
+
data: data.rawResults ? JSON.parse(data.rawResults) : {},
|
|
1505
|
+
maxHeight: "60vh"
|
|
1506
|
+
}
|
|
1507
|
+
)
|
|
1508
|
+
] })
|
|
1509
|
+
] })
|
|
1510
|
+
] }),
|
|
1511
|
+
/* @__PURE__ */ jsx(TableHead, { children: "Match Score" })
|
|
1512
|
+
] }) }),
|
|
1513
|
+
/* @__PURE__ */ jsx(TableBody, { children: tableRows.map((row, index) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
1514
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.type }),
|
|
1515
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.name }),
|
|
1516
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.matchedName }),
|
|
1517
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.list }),
|
|
1518
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.matchScore })
|
|
1519
|
+
] }, index)) })
|
|
1520
|
+
] }) }) })
|
|
1332
1521
|
] });
|
|
1333
1522
|
};
|
|
1334
1523
|
const renderTransactionContext = () => {
|
|
@@ -1355,20 +1544,6 @@ var ContextSection = ({ alert }) => {
|
|
|
1355
1544
|
/* @__PURE__ */ jsx(InfoField, { label: "Reason", value: "Compliance review required" })
|
|
1356
1545
|
] });
|
|
1357
1546
|
};
|
|
1358
|
-
const getContextTitle = () => {
|
|
1359
|
-
switch (alert.contextType) {
|
|
1360
|
-
case "Ofac":
|
|
1361
|
-
return "OFAC Context";
|
|
1362
|
-
case "Transaction":
|
|
1363
|
-
return "Transaction Context";
|
|
1364
|
-
case "File Record":
|
|
1365
|
-
return "File Processing Context";
|
|
1366
|
-
case "Product":
|
|
1367
|
-
return "Product Context";
|
|
1368
|
-
default:
|
|
1369
|
-
return "Context Information";
|
|
1370
|
-
}
|
|
1371
|
-
};
|
|
1372
1547
|
const renderContext = () => {
|
|
1373
1548
|
switch (alert.contextType) {
|
|
1374
1549
|
case "Ofac":
|
|
@@ -1383,87 +1558,39 @@ var ContextSection = ({ alert }) => {
|
|
|
1383
1558
|
return /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No additional context available" });
|
|
1384
1559
|
}
|
|
1385
1560
|
};
|
|
1386
|
-
return /* @__PURE__ */ jsxs(
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
" - Detail Result"
|
|
1561
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row gap-6", children: [
|
|
1562
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
1563
|
+
/* @__PURE__ */ jsx(FormCard, { title: "Alert Details", className: "lg:col-span-2", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
1564
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Description", value: alert.description, layout: "horizontal" }),
|
|
1565
|
+
renderContext()
|
|
1392
1566
|
] }) }),
|
|
1393
|
-
/* @__PURE__ */ jsx(
|
|
1394
|
-
|
|
1567
|
+
/* @__PURE__ */ jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
|
|
1568
|
+
/* @__PURE__ */ jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
|
|
1569
|
+
] }),
|
|
1570
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(FormCard, { title: "Status Timeline", className: "h-full", children: /* @__PURE__ */ jsx(AlertTimeline, { events: alert.timeline || [] }) }) })
|
|
1395
1571
|
] });
|
|
1396
1572
|
};
|
|
1397
|
-
var
|
|
1398
|
-
|
|
1399
|
-
value,
|
|
1400
|
-
options,
|
|
1401
|
-
onChange,
|
|
1402
|
-
placeholder = "Select...",
|
|
1403
|
-
renderValue,
|
|
1404
|
-
className
|
|
1405
|
-
}) => {
|
|
1406
|
-
const [isEditing, setIsEditing] = useState(false);
|
|
1407
|
-
const handleChange = (newValue) => {
|
|
1408
|
-
onChange(newValue);
|
|
1409
|
-
setIsEditing(false);
|
|
1410
|
-
};
|
|
1411
|
-
if (isEditing) {
|
|
1412
|
-
return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(
|
|
1413
|
-
EnhancedSelect,
|
|
1414
|
-
{
|
|
1415
|
-
label,
|
|
1416
|
-
value: value || "",
|
|
1417
|
-
onValueChange: handleChange,
|
|
1418
|
-
options,
|
|
1419
|
-
placeholder
|
|
1420
|
-
}
|
|
1421
|
-
) });
|
|
1422
|
-
}
|
|
1423
|
-
const displayValue = value ? renderValue ? renderValue(value) : value : placeholder;
|
|
1424
|
-
return /* @__PURE__ */ jsx(
|
|
1425
|
-
"div",
|
|
1426
|
-
{
|
|
1427
|
-
className: cn("cursor-pointer transition-colors hover:bg-muted/50 rounded-md -mx-2 px-2 -my-1 py-1", className),
|
|
1428
|
-
onClick: () => setIsEditing(true),
|
|
1429
|
-
role: "button",
|
|
1430
|
-
tabIndex: 0,
|
|
1431
|
-
onKeyDown: (e) => {
|
|
1432
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
1433
|
-
e.preventDefault();
|
|
1434
|
-
setIsEditing(true);
|
|
1435
|
-
}
|
|
1436
|
-
},
|
|
1437
|
-
children: /* @__PURE__ */ jsx(InfoField, { label, value: displayValue })
|
|
1438
|
-
}
|
|
1439
|
-
);
|
|
1440
|
-
};
|
|
1441
|
-
|
|
1442
|
-
// src/lib/utils/alert-utils.ts
|
|
1443
|
-
var getTypeBadgeVariant = (type) => {
|
|
1444
|
-
switch (type) {
|
|
1573
|
+
var AlertDetailRouter = ({ alert }) => {
|
|
1574
|
+
switch (alert.type) {
|
|
1445
1575
|
case "Ofac":
|
|
1446
|
-
return
|
|
1447
|
-
case "Dual Approval":
|
|
1448
|
-
return "alert-dual";
|
|
1576
|
+
return /* @__PURE__ */ jsx(OFACAlertView, { alert });
|
|
1449
1577
|
case "Transaction Monitoring":
|
|
1450
|
-
return "
|
|
1578
|
+
return /* @__PURE__ */ jsx("div", { children: "Transaction Monitoring view - Coming soon" });
|
|
1579
|
+
case "Prohibited Entity":
|
|
1580
|
+
return /* @__PURE__ */ jsx("div", { children: "Prohibited Entity view - Coming soon" });
|
|
1581
|
+
case "314a":
|
|
1582
|
+
return /* @__PURE__ */ jsx("div", { children: "314a view - Coming soon" });
|
|
1583
|
+
case "Dual Approval":
|
|
1584
|
+
return /* @__PURE__ */ jsx("div", { children: "Dual Approval view - Coming soon" });
|
|
1451
1585
|
case "Transaction Processing Error":
|
|
1452
|
-
return "
|
|
1453
|
-
|
|
1454
|
-
return "
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
var getStatusColor = (status) => {
|
|
1458
|
-
switch (status) {
|
|
1459
|
-
case "Unassigned":
|
|
1460
|
-
return "text-destructive";
|
|
1461
|
-
case "Closed":
|
|
1462
|
-
return "text-success";
|
|
1463
|
-
case "In Progress":
|
|
1464
|
-
return "text-warning";
|
|
1586
|
+
return /* @__PURE__ */ jsx("div", { children: "Transaction Processing Error view - Coming soon" });
|
|
1587
|
+
case "ACH Return":
|
|
1588
|
+
return /* @__PURE__ */ jsx("div", { children: "ACH Return view - Coming soon" });
|
|
1465
1589
|
default:
|
|
1466
|
-
return ""
|
|
1590
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1591
|
+
"Unknown alert type: ",
|
|
1592
|
+
alert.type
|
|
1593
|
+
] });
|
|
1467
1594
|
}
|
|
1468
1595
|
};
|
|
1469
1596
|
|
|
@@ -1501,135 +1628,506 @@ var ASSIGNEE_OPTIONS = [
|
|
|
1501
1628
|
{ value: "approverdev", label: "approverdev" },
|
|
1502
1629
|
{ value: "Unassigned", label: "Unassigned" }
|
|
1503
1630
|
];
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1631
|
+
|
|
1632
|
+
// src/lib/utils/alert-utils.ts
|
|
1633
|
+
var getTypeBadgeVariant = (type) => {
|
|
1634
|
+
switch (type) {
|
|
1635
|
+
case "Ofac":
|
|
1636
|
+
return "alert-ofac";
|
|
1637
|
+
case "Dual Approval":
|
|
1638
|
+
return "alert-dual";
|
|
1639
|
+
case "Transaction Monitoring":
|
|
1640
|
+
return "alert-monitoring";
|
|
1641
|
+
case "Transaction Processing Error":
|
|
1642
|
+
return "alert-error";
|
|
1643
|
+
default:
|
|
1644
|
+
return "outline";
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
var getStatusColor = (status) => {
|
|
1648
|
+
switch (status) {
|
|
1649
|
+
case "Unassigned":
|
|
1650
|
+
return "text-destructive";
|
|
1651
|
+
case "Closed":
|
|
1652
|
+
return "text-success";
|
|
1653
|
+
case "In Progress":
|
|
1654
|
+
return "text-warning";
|
|
1655
|
+
default:
|
|
1656
|
+
return "";
|
|
1657
|
+
}
|
|
1658
|
+
};
|
|
1659
|
+
var AlertHeaderControls = ({
|
|
1660
|
+
status,
|
|
1507
1661
|
assignee,
|
|
1508
|
-
|
|
1509
|
-
onAssigneeChange
|
|
1662
|
+
rfiStatus,
|
|
1663
|
+
onAssigneeChange,
|
|
1664
|
+
onRfiStatusChange
|
|
1510
1665
|
}) => {
|
|
1511
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex
|
|
1512
|
-
/* @__PURE__ */ jsxs("div", { className: "flex
|
|
1666
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
1667
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1668
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Status:" }),
|
|
1669
|
+
/* @__PURE__ */ jsx("span", { className: cn("font-medium text-sm", getStatusColor(status)), children: status })
|
|
1670
|
+
] }),
|
|
1671
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-[180px]", children: [
|
|
1672
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Assignee:" }),
|
|
1513
1673
|
/* @__PURE__ */ jsx(
|
|
1514
|
-
|
|
1674
|
+
EnhancedSelect,
|
|
1515
1675
|
{
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
/* @__PURE__ */ jsx(
|
|
1521
|
-
InfoField,
|
|
1522
|
-
{
|
|
1523
|
-
label: "Type",
|
|
1524
|
-
value: /* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
|
|
1525
|
-
}
|
|
1526
|
-
),
|
|
1527
|
-
/* @__PURE__ */ jsx(
|
|
1528
|
-
InfoField,
|
|
1529
|
-
{
|
|
1530
|
-
label: "Status",
|
|
1531
|
-
value: /* @__PURE__ */ jsx("span", { className: cn("font-medium", getStatusColor(alert.status)), children: alert.status })
|
|
1532
|
-
}
|
|
1533
|
-
),
|
|
1534
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Created At", value: alert.createdAt }),
|
|
1535
|
-
/* @__PURE__ */ jsx(
|
|
1536
|
-
InfoField,
|
|
1537
|
-
{
|
|
1538
|
-
label: "Context Type",
|
|
1539
|
-
value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: alert.contextType })
|
|
1540
|
-
}
|
|
1541
|
-
),
|
|
1542
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Context ID", value: alert.contextId || "N/A" }),
|
|
1543
|
-
/* @__PURE__ */ jsx(
|
|
1544
|
-
EditableInfoField,
|
|
1545
|
-
{
|
|
1546
|
-
label: "Assignee",
|
|
1547
|
-
value: assignee,
|
|
1548
|
-
options: ASSIGNEE_OPTIONS,
|
|
1549
|
-
onChange: onAssigneeChange,
|
|
1550
|
-
placeholder: "Unassigned"
|
|
1551
|
-
}
|
|
1552
|
-
),
|
|
1553
|
-
/* @__PURE__ */ jsx(
|
|
1554
|
-
EditableInfoField,
|
|
1555
|
-
{
|
|
1556
|
-
label: "RFI Status",
|
|
1557
|
-
value: rfiStatus,
|
|
1558
|
-
options: RFI_STATUS_OPTIONS,
|
|
1559
|
-
onChange: onRfiStatusChange,
|
|
1560
|
-
placeholder: "Select status",
|
|
1561
|
-
renderValue: (value) => /* @__PURE__ */ jsx(Badge, { variant: "success", children: value })
|
|
1562
|
-
}
|
|
1563
|
-
),
|
|
1564
|
-
/* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(InfoField, { label: "Description", value: alert.description }) })
|
|
1565
|
-
] })
|
|
1676
|
+
value: assignee,
|
|
1677
|
+
onValueChange: onAssigneeChange,
|
|
1678
|
+
options: ASSIGNEE_OPTIONS,
|
|
1679
|
+
placeholder: "Unassigned"
|
|
1566
1680
|
}
|
|
1567
|
-
)
|
|
1568
|
-
/* @__PURE__ */ jsx(ContextSection, { alert }),
|
|
1569
|
-
/* @__PURE__ */ jsx(FormCard, { title: "Notes", children: /* @__PURE__ */ jsx(AlertNotes, { alertId: alert.id, notes: alert.notes || [] }) }),
|
|
1570
|
-
/* @__PURE__ */ jsx(FormCard, { title: "Documents", children: /* @__PURE__ */ jsx(AlertDocuments, { alertId: alert.id, documents: alert.documents || [] }) })
|
|
1681
|
+
)
|
|
1571
1682
|
] }),
|
|
1572
|
-
/* @__PURE__ */
|
|
1683
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-[180px]", children: [
|
|
1684
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "RFI Status:" }),
|
|
1685
|
+
/* @__PURE__ */ jsx(
|
|
1686
|
+
EnhancedSelect,
|
|
1687
|
+
{
|
|
1688
|
+
value: rfiStatus,
|
|
1689
|
+
onValueChange: onRfiStatusChange,
|
|
1690
|
+
options: RFI_STATUS_OPTIONS,
|
|
1691
|
+
placeholder: "Select status"
|
|
1692
|
+
}
|
|
1693
|
+
)
|
|
1694
|
+
] })
|
|
1573
1695
|
] });
|
|
1574
1696
|
};
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1697
|
+
var ContextSection = ({ alert }) => {
|
|
1698
|
+
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
|
1699
|
+
const renderOFACContext = () => {
|
|
1700
|
+
const data = alert.contextData;
|
|
1701
|
+
if (!data) return null;
|
|
1702
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1703
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
1704
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Entity Name", value: data.entityName }),
|
|
1705
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Entity Type", value: data.entityType }),
|
|
1706
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Match Score", value: /* @__PURE__ */ jsx(Badge, { variant: "alert-ofac", children: data.matchScore }) }),
|
|
1707
|
+
/* @__PURE__ */ jsx(InfoField, { label: "List Name", value: data.listName })
|
|
1708
|
+
] }),
|
|
1709
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1710
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium mb-3", children: "Flagged Items" }),
|
|
1711
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto border rounded-lg", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
1712
|
+
/* @__PURE__ */ jsx("thead", { className: "border-b bg-muted/50", children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
1713
|
+
/* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Field" }),
|
|
1714
|
+
/* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Value" }),
|
|
1715
|
+
/* @__PURE__ */ jsx("th", { className: "px-4 py-3 text-left text-sm font-medium", children: "Match Score" })
|
|
1716
|
+
] }) }),
|
|
1717
|
+
/* @__PURE__ */ jsx("tbody", { children: data.flaggedItems?.map((item, index) => /* @__PURE__ */ jsxs("tr", { className: "border-b hover:bg-muted/50", children: [
|
|
1718
|
+
/* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-sm font-medium", children: item.field }),
|
|
1719
|
+
/* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-sm", children: item.value }),
|
|
1720
|
+
/* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx(Badge, { variant: parseInt(item.matchScore) > 90 ? "alert-ofac" : "outline", children: item.matchScore }) })
|
|
1721
|
+
] }, index)) })
|
|
1722
|
+
] }) })
|
|
1723
|
+
] }),
|
|
1724
|
+
alert.contextData && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
1725
|
+
Button,
|
|
1726
|
+
{
|
|
1727
|
+
variant: "ghost",
|
|
1728
|
+
className: "w-full justify-between h-auto py-3 px-4 border rounded-lg hover:bg-muted/50",
|
|
1729
|
+
onClick: () => setIsDialogOpen(true),
|
|
1730
|
+
children: [
|
|
1731
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "Detail Result" }),
|
|
1732
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
1733
|
+
]
|
|
1734
|
+
}
|
|
1735
|
+
) })
|
|
1736
|
+
] });
|
|
1737
|
+
};
|
|
1738
|
+
const renderTransactionContext = () => {
|
|
1739
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
1740
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Transaction ID", value: "TXN-12345" }),
|
|
1741
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Amount", value: "$30,000.00" }),
|
|
1742
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Transaction Type", value: "Wire Transfer" }),
|
|
1743
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Date", value: "2025-09-30" })
|
|
1744
|
+
] });
|
|
1745
|
+
};
|
|
1746
|
+
const renderFileRecordContext = () => {
|
|
1747
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
1748
|
+
/* @__PURE__ */ jsx(InfoField, { label: "File Name", value: "wire_batch_093025.csv" }),
|
|
1749
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Record Count", value: "1,234" }),
|
|
1750
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Error Count", value: "3" }),
|
|
1751
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Status", value: /* @__PURE__ */ jsx(Badge, { variant: "alert-error", children: "Failed" }) })
|
|
1752
|
+
] });
|
|
1753
|
+
};
|
|
1754
|
+
const renderProductContext = () => {
|
|
1755
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
1756
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Product ID", value: "PROD-2787" }),
|
|
1757
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Product Name", value: "Business Checking Account" }),
|
|
1758
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Status", value: "Pending Deactivation" }),
|
|
1759
|
+
/* @__PURE__ */ jsx(InfoField, { label: "Reason", value: "Compliance review required" })
|
|
1760
|
+
] });
|
|
1761
|
+
};
|
|
1762
|
+
const getContextTitle = () => {
|
|
1763
|
+
switch (alert.contextType) {
|
|
1764
|
+
case "Ofac":
|
|
1765
|
+
return "OFAC Context";
|
|
1766
|
+
case "Transaction":
|
|
1767
|
+
return "Transaction Context";
|
|
1768
|
+
case "File Record":
|
|
1769
|
+
return "File Processing Context";
|
|
1770
|
+
case "Product":
|
|
1771
|
+
return "Product Context";
|
|
1772
|
+
default:
|
|
1773
|
+
return "Context Information";
|
|
1605
1774
|
}
|
|
1606
|
-
|
|
1607
|
-
)
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1775
|
+
};
|
|
1776
|
+
const renderContext = () => {
|
|
1777
|
+
switch (alert.contextType) {
|
|
1778
|
+
case "Ofac":
|
|
1779
|
+
return renderOFACContext();
|
|
1780
|
+
case "Transaction":
|
|
1781
|
+
return renderTransactionContext();
|
|
1782
|
+
case "File Record":
|
|
1783
|
+
return renderFileRecordContext();
|
|
1784
|
+
case "Product":
|
|
1785
|
+
return renderProductContext();
|
|
1786
|
+
default:
|
|
1787
|
+
return /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No additional context available" });
|
|
1788
|
+
}
|
|
1789
|
+
};
|
|
1790
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1791
|
+
/* @__PURE__ */ jsx(FormCard, { title: getContextTitle(), children: renderContext() }),
|
|
1792
|
+
/* @__PURE__ */ jsx(Dialog, { open: isDialogOpen, onOpenChange: setIsDialogOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-4xl", children: [
|
|
1793
|
+
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs(DialogTitle, { children: [
|
|
1794
|
+
getContextTitle(),
|
|
1795
|
+
" - Detail Result"
|
|
1796
|
+
] }) }),
|
|
1797
|
+
/* @__PURE__ */ jsx(JsonViewer, { data: alert.contextData })
|
|
1798
|
+
] }) })
|
|
1799
|
+
] });
|
|
1800
|
+
};
|
|
1801
|
+
var FormProvider = ({
|
|
1802
|
+
form,
|
|
1803
|
+
children
|
|
1804
|
+
}) => {
|
|
1805
|
+
return /* @__PURE__ */ jsx(FormProvider$1, { ...form, children });
|
|
1806
|
+
};
|
|
1807
|
+
var FormInput = ({
|
|
1808
|
+
name,
|
|
1809
|
+
...props
|
|
1810
|
+
}) => {
|
|
1811
|
+
const { control, formState } = useFormContext();
|
|
1812
|
+
const error = formState.errors[name]?.message;
|
|
1813
|
+
return /* @__PURE__ */ jsx(
|
|
1814
|
+
Controller,
|
|
1815
|
+
{
|
|
1816
|
+
name,
|
|
1817
|
+
control,
|
|
1818
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
1819
|
+
EnhancedInput,
|
|
1820
|
+
{
|
|
1821
|
+
...props,
|
|
1822
|
+
...field,
|
|
1823
|
+
error
|
|
1824
|
+
}
|
|
1825
|
+
)
|
|
1826
|
+
}
|
|
1827
|
+
);
|
|
1828
|
+
};
|
|
1829
|
+
var FormSelect = ({
|
|
1830
|
+
name,
|
|
1831
|
+
...props
|
|
1832
|
+
}) => {
|
|
1833
|
+
const { control, formState } = useFormContext();
|
|
1834
|
+
const error = formState.errors[name]?.message;
|
|
1835
|
+
return /* @__PURE__ */ jsx(
|
|
1836
|
+
Controller,
|
|
1837
|
+
{
|
|
1838
|
+
name,
|
|
1839
|
+
control,
|
|
1840
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
1841
|
+
EnhancedSelect,
|
|
1842
|
+
{
|
|
1843
|
+
...props,
|
|
1844
|
+
value: field.value,
|
|
1845
|
+
onValueChange: field.onChange,
|
|
1846
|
+
error
|
|
1847
|
+
}
|
|
1848
|
+
)
|
|
1849
|
+
}
|
|
1850
|
+
);
|
|
1851
|
+
};
|
|
1852
|
+
var useFormWithEditState = ({
|
|
1853
|
+
schema,
|
|
1854
|
+
initialEditing = false,
|
|
1855
|
+
onToggleEdit,
|
|
1856
|
+
onSave,
|
|
1857
|
+
onCancel,
|
|
1858
|
+
...formProps
|
|
1859
|
+
}) => {
|
|
1860
|
+
const [localEditing, setLocalEditing] = useState(initialEditing);
|
|
1861
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
1862
|
+
const form = useForm({
|
|
1863
|
+
...formProps,
|
|
1864
|
+
resolver: schema ? zodResolver(schema) : void 0
|
|
1865
|
+
});
|
|
1866
|
+
const { formState, reset, setError } = form;
|
|
1867
|
+
const { isValid, isDirty } = formState;
|
|
1868
|
+
useEffect(() => {
|
|
1869
|
+
setLocalEditing(initialEditing);
|
|
1870
|
+
}, [initialEditing]);
|
|
1871
|
+
const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
|
|
1872
|
+
const handleToggleEdit = useCallback(() => {
|
|
1873
|
+
if (onToggleEdit) {
|
|
1874
|
+
onToggleEdit();
|
|
1875
|
+
} else {
|
|
1876
|
+
setLocalEditing((prev) => !prev);
|
|
1877
|
+
}
|
|
1878
|
+
}, [onToggleEdit]);
|
|
1879
|
+
const handleSave = useCallback(async () => {
|
|
1880
|
+
if (!isValid) return;
|
|
1881
|
+
setIsLoading(true);
|
|
1882
|
+
try {
|
|
1883
|
+
const data = form.getValues();
|
|
1884
|
+
if (onSave) {
|
|
1885
|
+
await onSave(data);
|
|
1886
|
+
}
|
|
1887
|
+
if (onToggleEdit) {
|
|
1888
|
+
onToggleEdit();
|
|
1889
|
+
} else {
|
|
1890
|
+
setLocalEditing(false);
|
|
1891
|
+
}
|
|
1892
|
+
} catch (error) {
|
|
1893
|
+
console.error("Form save error:", error);
|
|
1894
|
+
} finally {
|
|
1895
|
+
setIsLoading(false);
|
|
1896
|
+
}
|
|
1897
|
+
}, [form, isValid, onSave, onToggleEdit]);
|
|
1898
|
+
const handleCancel = useCallback(() => {
|
|
1899
|
+
reset();
|
|
1900
|
+
if (onCancel) {
|
|
1901
|
+
onCancel();
|
|
1902
|
+
}
|
|
1903
|
+
if (onToggleEdit) {
|
|
1904
|
+
onToggleEdit();
|
|
1905
|
+
} else {
|
|
1906
|
+
setLocalEditing(false);
|
|
1907
|
+
}
|
|
1908
|
+
}, [reset, onCancel, onToggleEdit]);
|
|
1909
|
+
const setFieldError = useCallback((field, error) => {
|
|
1910
|
+
setError(field, { type: "manual", message: error });
|
|
1911
|
+
}, [setError]);
|
|
1912
|
+
return {
|
|
1913
|
+
...form,
|
|
1914
|
+
isEditing,
|
|
1915
|
+
isLoading,
|
|
1916
|
+
handleToggleEdit,
|
|
1917
|
+
handleSave,
|
|
1918
|
+
handleCancel,
|
|
1919
|
+
isFormValid: isValid,
|
|
1920
|
+
isDirty,
|
|
1921
|
+
setFieldError
|
|
1922
|
+
};
|
|
1923
|
+
};
|
|
1924
|
+
var resolveAlertSchema = z.object({
|
|
1925
|
+
action: z.enum(["APPROVE", "DECLINE", "CLOSE"], {
|
|
1926
|
+
required_error: "Please select an action"
|
|
1927
|
+
}),
|
|
1928
|
+
changeToAccount: z.string().optional(),
|
|
1929
|
+
note: z.string().min(1, "Note is required").max(1e3, "Note must be less than 1000 characters"),
|
|
1930
|
+
returnCode: z.string().optional()
|
|
1931
|
+
}).refine((data) => {
|
|
1932
|
+
if (data.action === "DECLINE" && !data.returnCode) {
|
|
1933
|
+
return false;
|
|
1934
|
+
}
|
|
1935
|
+
return true;
|
|
1936
|
+
}, {
|
|
1937
|
+
message: "Return code is required when declining",
|
|
1938
|
+
path: ["returnCode"]
|
|
1939
|
+
});
|
|
1940
|
+
var RETURN_CODES = [
|
|
1941
|
+
{ value: "R03_NO_ACCOUNT", label: "R03 - No Account/Unable to Locate Account" },
|
|
1942
|
+
{ value: "R01_INSUFFICIENT_FUNDS", label: "R01 - Insufficient Funds" },
|
|
1943
|
+
{ value: "R02_ACCOUNT_CLOSED", label: "R02 - Account Closed" },
|
|
1944
|
+
{ value: "R04_INVALID_ACCOUNT", label: "R04 - Invalid Account Number" },
|
|
1945
|
+
{ value: "R10_UNAUTHORIZED", label: "R10 - Customer Advises Unauthorized" },
|
|
1946
|
+
{ value: "R07_AUTHORIZATION_REVOKED", label: "R07 - Authorization Revoked" },
|
|
1947
|
+
{ value: "R08_PAYMENT_STOPPED", label: "R08 - Payment Stopped" },
|
|
1948
|
+
{ value: "R09_UNCOLLECTED_FUNDS", label: "R09 - Uncollected Funds" }
|
|
1949
|
+
];
|
|
1950
|
+
var ResolveAlertDialog = ({
|
|
1951
|
+
alertId,
|
|
1952
|
+
open,
|
|
1953
|
+
onOpenChange,
|
|
1954
|
+
onResolve
|
|
1955
|
+
}) => {
|
|
1956
|
+
const form = useFormWithEditState({
|
|
1957
|
+
schema: resolveAlertSchema,
|
|
1958
|
+
defaultValues: {
|
|
1959
|
+
action: "APPROVE",
|
|
1960
|
+
changeToAccount: "",
|
|
1961
|
+
note: "",
|
|
1962
|
+
returnCode: ""
|
|
1963
|
+
}
|
|
1964
|
+
});
|
|
1965
|
+
const { handleSubmit, watch, control, formState } = form;
|
|
1966
|
+
const action = watch("action");
|
|
1967
|
+
const onSubmit = async (data) => {
|
|
1968
|
+
try {
|
|
1969
|
+
await onResolve(data);
|
|
1970
|
+
toast({
|
|
1971
|
+
title: "Alert Resolved",
|
|
1972
|
+
description: `Alert #${alertId} has been ${data.action.toLowerCase()}d successfully.`
|
|
1973
|
+
});
|
|
1974
|
+
onOpenChange(false);
|
|
1975
|
+
form.reset();
|
|
1976
|
+
} catch (error) {
|
|
1977
|
+
toast({
|
|
1978
|
+
title: "Error",
|
|
1979
|
+
description: "Failed to resolve alert. Please try again.",
|
|
1980
|
+
variant: "destructive"
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1983
|
+
};
|
|
1984
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[600px]", children: [
|
|
1985
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
1986
|
+
/* @__PURE__ */ jsxs(DialogTitle, { children: [
|
|
1987
|
+
"Resolve Alert #",
|
|
1988
|
+
alertId
|
|
1989
|
+
] }),
|
|
1990
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: "Select an action and provide details to resolve this alert." })
|
|
1991
|
+
] }),
|
|
1992
|
+
/* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
1993
|
+
/* @__PURE__ */ jsx(
|
|
1994
|
+
FormSelect,
|
|
1995
|
+
{
|
|
1996
|
+
name: "action",
|
|
1997
|
+
label: "Action",
|
|
1998
|
+
placeholder: "Select action",
|
|
1999
|
+
options: [
|
|
2000
|
+
{ value: "APPROVE", label: "Approve" },
|
|
2001
|
+
{ value: "DECLINE", label: "Decline" },
|
|
2002
|
+
{ value: "CLOSE", label: "Close" }
|
|
2003
|
+
]
|
|
2004
|
+
}
|
|
2005
|
+
),
|
|
2006
|
+
/* @__PURE__ */ jsx(
|
|
2007
|
+
FormInput,
|
|
2008
|
+
{
|
|
2009
|
+
name: "changeToAccount",
|
|
2010
|
+
label: "Change to Account (Optional)",
|
|
2011
|
+
placeholder: "Enter account number"
|
|
2012
|
+
}
|
|
2013
|
+
),
|
|
2014
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
2015
|
+
/* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-foreground", children: [
|
|
2016
|
+
"Note ",
|
|
2017
|
+
/* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
|
|
2018
|
+
] }),
|
|
2019
|
+
/* @__PURE__ */ jsx(
|
|
2020
|
+
Controller,
|
|
2021
|
+
{
|
|
2022
|
+
name: "note",
|
|
2023
|
+
control,
|
|
2024
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
2025
|
+
EnhancedTextarea,
|
|
2026
|
+
{
|
|
2027
|
+
...field,
|
|
2028
|
+
placeholder: "Enter resolution notes...",
|
|
2029
|
+
rows: 4,
|
|
2030
|
+
error: formState.errors.note?.message
|
|
2031
|
+
}
|
|
2032
|
+
)
|
|
2033
|
+
}
|
|
2034
|
+
)
|
|
2035
|
+
] }),
|
|
2036
|
+
action === "DECLINE" && /* @__PURE__ */ jsx(
|
|
2037
|
+
FormSelect,
|
|
2038
|
+
{
|
|
2039
|
+
name: "returnCode",
|
|
2040
|
+
label: "Return Code",
|
|
2041
|
+
placeholder: "Select return code",
|
|
2042
|
+
options: RETURN_CODES.map((code) => ({
|
|
2043
|
+
value: code.value,
|
|
2044
|
+
label: code.label
|
|
2045
|
+
}))
|
|
2046
|
+
}
|
|
2047
|
+
),
|
|
2048
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
2049
|
+
/* @__PURE__ */ jsx(
|
|
2050
|
+
Button,
|
|
2051
|
+
{
|
|
2052
|
+
type: "button",
|
|
2053
|
+
variant: "outline",
|
|
2054
|
+
onClick: () => {
|
|
2055
|
+
onOpenChange(false);
|
|
2056
|
+
form.reset();
|
|
2057
|
+
},
|
|
2058
|
+
children: "Cancel"
|
|
2059
|
+
}
|
|
2060
|
+
),
|
|
2061
|
+
/* @__PURE__ */ jsx(
|
|
2062
|
+
Button,
|
|
2063
|
+
{
|
|
2064
|
+
type: "submit",
|
|
2065
|
+
disabled: !formState.isValid || formState.isSubmitting,
|
|
2066
|
+
children: formState.isSubmitting ? "Submitting..." : "Resolve"
|
|
2067
|
+
}
|
|
2068
|
+
)
|
|
2069
|
+
] })
|
|
2070
|
+
] }) })
|
|
2071
|
+
] }) });
|
|
2072
|
+
};
|
|
2073
|
+
|
|
2074
|
+
// src/assets/braid-logo.png
|
|
2075
|
+
var braid_logo_default = "./braid-logo-343BOQZ2.png";
|
|
2076
|
+
var MOBILE_BREAKPOINT = 768;
|
|
2077
|
+
function useIsMobile() {
|
|
2078
|
+
const [isMobile, setIsMobile] = React15.useState(void 0);
|
|
2079
|
+
React15.useEffect(() => {
|
|
2080
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
2081
|
+
const onChange = () => {
|
|
2082
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
2083
|
+
};
|
|
2084
|
+
mql.addEventListener("change", onChange);
|
|
2085
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
2086
|
+
return () => mql.removeEventListener("change", onChange);
|
|
2087
|
+
}, []);
|
|
2088
|
+
return !!isMobile;
|
|
2089
|
+
}
|
|
2090
|
+
var Separator = React15.forwardRef(
|
|
2091
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2092
|
+
SeparatorPrimitive.Root,
|
|
2093
|
+
{
|
|
2094
|
+
ref,
|
|
2095
|
+
decorative,
|
|
2096
|
+
orientation,
|
|
2097
|
+
className: cn(
|
|
2098
|
+
"shrink-0 bg-border",
|
|
2099
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
2100
|
+
className
|
|
2101
|
+
),
|
|
2102
|
+
...props
|
|
2103
|
+
}
|
|
2104
|
+
)
|
|
2105
|
+
);
|
|
2106
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
2107
|
+
var Sheet = DialogPrimitive.Root;
|
|
2108
|
+
var SheetTrigger = DialogPrimitive.Trigger;
|
|
2109
|
+
var SheetClose = DialogPrimitive.Close;
|
|
2110
|
+
var SheetPortal = DialogPrimitive.Portal;
|
|
2111
|
+
var SheetOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2112
|
+
DialogPrimitive.Overlay,
|
|
2113
|
+
{
|
|
2114
|
+
className: cn(
|
|
2115
|
+
"fixed inset-0 z-50 bg-white/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2116
|
+
className
|
|
2117
|
+
),
|
|
2118
|
+
...props,
|
|
2119
|
+
ref
|
|
2120
|
+
}
|
|
2121
|
+
));
|
|
2122
|
+
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
2123
|
+
var sheetVariants = cva(
|
|
2124
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
2125
|
+
{
|
|
2126
|
+
variants: {
|
|
2127
|
+
side: {
|
|
2128
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
2129
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
2130
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1633
2131
|
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1634
2132
|
}
|
|
1635
2133
|
},
|
|
@@ -1638,7 +2136,7 @@ var sheetVariants = cva(
|
|
|
1638
2136
|
}
|
|
1639
2137
|
}
|
|
1640
2138
|
);
|
|
1641
|
-
var SheetContent =
|
|
2139
|
+
var SheetContent = React15.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
1642
2140
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
1643
2141
|
/* @__PURE__ */ jsxs(
|
|
1644
2142
|
DialogPrimitive.Content,
|
|
@@ -1685,7 +2183,7 @@ var SheetFooter = ({
|
|
|
1685
2183
|
}
|
|
1686
2184
|
);
|
|
1687
2185
|
SheetFooter.displayName = "SheetFooter";
|
|
1688
|
-
var SheetTitle =
|
|
2186
|
+
var SheetTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1689
2187
|
DialogPrimitive.Title,
|
|
1690
2188
|
{
|
|
1691
2189
|
ref,
|
|
@@ -1694,7 +2192,7 @@ var SheetTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1694
2192
|
}
|
|
1695
2193
|
));
|
|
1696
2194
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1697
|
-
var SheetDescription =
|
|
2195
|
+
var SheetDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1698
2196
|
DialogPrimitive.Description,
|
|
1699
2197
|
{
|
|
1700
2198
|
ref,
|
|
@@ -1706,7 +2204,7 @@ SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
1706
2204
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1707
2205
|
var Tooltip = TooltipPrimitive.Root;
|
|
1708
2206
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
1709
|
-
var TooltipContent =
|
|
2207
|
+
var TooltipContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1710
2208
|
TooltipPrimitive.Content,
|
|
1711
2209
|
{
|
|
1712
2210
|
ref,
|
|
@@ -1725,15 +2223,15 @@ var SIDEBAR_WIDTH = "15rem";
|
|
|
1725
2223
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1726
2224
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
1727
2225
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1728
|
-
var SidebarContext =
|
|
2226
|
+
var SidebarContext = React15.createContext(null);
|
|
1729
2227
|
function useSidebar() {
|
|
1730
|
-
const context =
|
|
2228
|
+
const context = React15.useContext(SidebarContext);
|
|
1731
2229
|
if (!context) {
|
|
1732
2230
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1733
2231
|
}
|
|
1734
2232
|
return context;
|
|
1735
2233
|
}
|
|
1736
|
-
var SidebarProvider =
|
|
2234
|
+
var SidebarProvider = React15.forwardRef(
|
|
1737
2235
|
({
|
|
1738
2236
|
defaultOpen = true,
|
|
1739
2237
|
open: openProp,
|
|
@@ -1744,10 +2242,10 @@ var SidebarProvider = React13.forwardRef(
|
|
|
1744
2242
|
...props
|
|
1745
2243
|
}, ref) => {
|
|
1746
2244
|
const isMobile = useIsMobile();
|
|
1747
|
-
const [openMobile, setOpenMobile] =
|
|
1748
|
-
const [_open, _setOpen] =
|
|
2245
|
+
const [openMobile, setOpenMobile] = React15.useState(false);
|
|
2246
|
+
const [_open, _setOpen] = React15.useState(defaultOpen);
|
|
1749
2247
|
const open = openProp ?? _open;
|
|
1750
|
-
const setOpen =
|
|
2248
|
+
const setOpen = React15.useCallback(
|
|
1751
2249
|
(value) => {
|
|
1752
2250
|
const openState = typeof value === "function" ? value(open) : value;
|
|
1753
2251
|
if (setOpenProp) {
|
|
@@ -1759,10 +2257,10 @@ var SidebarProvider = React13.forwardRef(
|
|
|
1759
2257
|
},
|
|
1760
2258
|
[setOpenProp, open]
|
|
1761
2259
|
);
|
|
1762
|
-
const toggleSidebar =
|
|
2260
|
+
const toggleSidebar = React15.useCallback(() => {
|
|
1763
2261
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1764
2262
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
1765
|
-
|
|
2263
|
+
React15.useEffect(() => {
|
|
1766
2264
|
const handleKeyDown = (event) => {
|
|
1767
2265
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1768
2266
|
event.preventDefault();
|
|
@@ -1773,7 +2271,7 @@ var SidebarProvider = React13.forwardRef(
|
|
|
1773
2271
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1774
2272
|
}, [toggleSidebar]);
|
|
1775
2273
|
const state = open ? "expanded" : "collapsed";
|
|
1776
|
-
const contextValue =
|
|
2274
|
+
const contextValue = React15.useMemo(
|
|
1777
2275
|
() => ({
|
|
1778
2276
|
state,
|
|
1779
2277
|
open,
|
|
@@ -1805,7 +2303,7 @@ var SidebarProvider = React13.forwardRef(
|
|
|
1805
2303
|
}
|
|
1806
2304
|
);
|
|
1807
2305
|
SidebarProvider.displayName = "SidebarProvider";
|
|
1808
|
-
var Sidebar =
|
|
2306
|
+
var Sidebar = React15.forwardRef(
|
|
1809
2307
|
({
|
|
1810
2308
|
side = "left",
|
|
1811
2309
|
variant = "sidebar",
|
|
@@ -1892,7 +2390,7 @@ var Sidebar = React13.forwardRef(
|
|
|
1892
2390
|
}
|
|
1893
2391
|
);
|
|
1894
2392
|
Sidebar.displayName = "Sidebar";
|
|
1895
|
-
var SidebarTrigger =
|
|
2393
|
+
var SidebarTrigger = React15.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
1896
2394
|
const { toggleSidebar } = useSidebar();
|
|
1897
2395
|
return /* @__PURE__ */ jsxs(
|
|
1898
2396
|
Button,
|
|
@@ -1915,7 +2413,7 @@ var SidebarTrigger = React13.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
1915
2413
|
);
|
|
1916
2414
|
});
|
|
1917
2415
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
1918
|
-
var SidebarRail =
|
|
2416
|
+
var SidebarRail = React15.forwardRef(({ className, ...props }, ref) => {
|
|
1919
2417
|
const { toggleSidebar } = useSidebar();
|
|
1920
2418
|
return /* @__PURE__ */ jsx(
|
|
1921
2419
|
"button",
|
|
@@ -1940,7 +2438,7 @@ var SidebarRail = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
1940
2438
|
);
|
|
1941
2439
|
});
|
|
1942
2440
|
SidebarRail.displayName = "SidebarRail";
|
|
1943
|
-
var SidebarInset =
|
|
2441
|
+
var SidebarInset = React15.forwardRef(({ className, ...props }, ref) => {
|
|
1944
2442
|
return /* @__PURE__ */ jsx(
|
|
1945
2443
|
"main",
|
|
1946
2444
|
{
|
|
@@ -1955,7 +2453,7 @@ var SidebarInset = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
1955
2453
|
);
|
|
1956
2454
|
});
|
|
1957
2455
|
SidebarInset.displayName = "SidebarInset";
|
|
1958
|
-
var SidebarInput =
|
|
2456
|
+
var SidebarInput = React15.forwardRef(({ className, ...props }, ref) => {
|
|
1959
2457
|
return /* @__PURE__ */ jsx(
|
|
1960
2458
|
"input",
|
|
1961
2459
|
{
|
|
@@ -1970,7 +2468,7 @@ var SidebarInput = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
1970
2468
|
);
|
|
1971
2469
|
});
|
|
1972
2470
|
SidebarInput.displayName = "SidebarInput";
|
|
1973
|
-
var SidebarHeader =
|
|
2471
|
+
var SidebarHeader = React15.forwardRef(({ className, ...props }, ref) => {
|
|
1974
2472
|
return /* @__PURE__ */ jsx(
|
|
1975
2473
|
"div",
|
|
1976
2474
|
{
|
|
@@ -1982,7 +2480,7 @@ var SidebarHeader = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
1982
2480
|
);
|
|
1983
2481
|
});
|
|
1984
2482
|
SidebarHeader.displayName = "SidebarHeader";
|
|
1985
|
-
var SidebarFooter =
|
|
2483
|
+
var SidebarFooter = React15.forwardRef(({ className, ...props }, ref) => {
|
|
1986
2484
|
return /* @__PURE__ */ jsx(
|
|
1987
2485
|
"div",
|
|
1988
2486
|
{
|
|
@@ -1994,7 +2492,7 @@ var SidebarFooter = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
1994
2492
|
);
|
|
1995
2493
|
});
|
|
1996
2494
|
SidebarFooter.displayName = "SidebarFooter";
|
|
1997
|
-
var SidebarSeparator =
|
|
2495
|
+
var SidebarSeparator = React15.forwardRef(({ className, ...props }, ref) => {
|
|
1998
2496
|
return /* @__PURE__ */ jsx(
|
|
1999
2497
|
Separator,
|
|
2000
2498
|
{
|
|
@@ -2006,7 +2504,7 @@ var SidebarSeparator = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
2006
2504
|
);
|
|
2007
2505
|
});
|
|
2008
2506
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
2009
|
-
var SidebarContent =
|
|
2507
|
+
var SidebarContent = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2010
2508
|
return /* @__PURE__ */ jsx(
|
|
2011
2509
|
"div",
|
|
2012
2510
|
{
|
|
@@ -2021,7 +2519,7 @@ var SidebarContent = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
2021
2519
|
);
|
|
2022
2520
|
});
|
|
2023
2521
|
SidebarContent.displayName = "SidebarContent";
|
|
2024
|
-
var SidebarGroup =
|
|
2522
|
+
var SidebarGroup = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2025
2523
|
return /* @__PURE__ */ jsx(
|
|
2026
2524
|
"div",
|
|
2027
2525
|
{
|
|
@@ -2033,7 +2531,7 @@ var SidebarGroup = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
2033
2531
|
);
|
|
2034
2532
|
});
|
|
2035
2533
|
SidebarGroup.displayName = "SidebarGroup";
|
|
2036
|
-
var SidebarGroupLabel =
|
|
2534
|
+
var SidebarGroupLabel = React15.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2037
2535
|
const Comp = asChild ? Slot : "div";
|
|
2038
2536
|
return /* @__PURE__ */ jsx(
|
|
2039
2537
|
Comp,
|
|
@@ -2050,7 +2548,7 @@ var SidebarGroupLabel = React13.forwardRef(({ className, asChild = false, ...pro
|
|
|
2050
2548
|
);
|
|
2051
2549
|
});
|
|
2052
2550
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
2053
|
-
var SidebarGroupAction =
|
|
2551
|
+
var SidebarGroupAction = React15.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2054
2552
|
const Comp = asChild ? Slot : "button";
|
|
2055
2553
|
return /* @__PURE__ */ jsx(
|
|
2056
2554
|
Comp,
|
|
@@ -2069,7 +2567,7 @@ var SidebarGroupAction = React13.forwardRef(({ className, asChild = false, ...pr
|
|
|
2069
2567
|
);
|
|
2070
2568
|
});
|
|
2071
2569
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
2072
|
-
var SidebarGroupContent =
|
|
2570
|
+
var SidebarGroupContent = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2073
2571
|
return /* @__PURE__ */ jsx(
|
|
2074
2572
|
"div",
|
|
2075
2573
|
{
|
|
@@ -2081,7 +2579,7 @@ var SidebarGroupContent = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
2081
2579
|
);
|
|
2082
2580
|
});
|
|
2083
2581
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
2084
|
-
var SidebarMenu =
|
|
2582
|
+
var SidebarMenu = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2085
2583
|
return /* @__PURE__ */ jsx(
|
|
2086
2584
|
"ul",
|
|
2087
2585
|
{
|
|
@@ -2093,7 +2591,7 @@ var SidebarMenu = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
2093
2591
|
);
|
|
2094
2592
|
});
|
|
2095
2593
|
SidebarMenu.displayName = "SidebarMenu";
|
|
2096
|
-
var SidebarMenuItem =
|
|
2594
|
+
var SidebarMenuItem = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2097
2595
|
return /* @__PURE__ */ jsx(
|
|
2098
2596
|
"li",
|
|
2099
2597
|
{
|
|
@@ -2125,7 +2623,7 @@ var sidebarMenuButtonVariants = cva(
|
|
|
2125
2623
|
}
|
|
2126
2624
|
}
|
|
2127
2625
|
);
|
|
2128
|
-
var SidebarMenuButton =
|
|
2626
|
+
var SidebarMenuButton = React15.forwardRef(
|
|
2129
2627
|
({
|
|
2130
2628
|
asChild = false,
|
|
2131
2629
|
isActive = false,
|
|
@@ -2171,7 +2669,7 @@ var SidebarMenuButton = React13.forwardRef(
|
|
|
2171
2669
|
}
|
|
2172
2670
|
);
|
|
2173
2671
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2174
|
-
var SidebarMenuAction =
|
|
2672
|
+
var SidebarMenuAction = React15.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
2175
2673
|
const Comp = asChild ? Slot : "button";
|
|
2176
2674
|
return /* @__PURE__ */ jsx(
|
|
2177
2675
|
Comp,
|
|
@@ -2194,7 +2692,7 @@ var SidebarMenuAction = React13.forwardRef(({ className, asChild = false, showOn
|
|
|
2194
2692
|
);
|
|
2195
2693
|
});
|
|
2196
2694
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
2197
|
-
var SidebarMenuBadge =
|
|
2695
|
+
var SidebarMenuBadge = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2198
2696
|
return /* @__PURE__ */ jsx(
|
|
2199
2697
|
"div",
|
|
2200
2698
|
{
|
|
@@ -2214,8 +2712,8 @@ var SidebarMenuBadge = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
2214
2712
|
);
|
|
2215
2713
|
});
|
|
2216
2714
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
2217
|
-
var SidebarMenuSkeleton =
|
|
2218
|
-
const width =
|
|
2715
|
+
var SidebarMenuSkeleton = React15.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
2716
|
+
const width = React15.useMemo(() => {
|
|
2219
2717
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2220
2718
|
}, []);
|
|
2221
2719
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2241,7 +2739,7 @@ var SidebarMenuSkeleton = React13.forwardRef(({ className, showIcon = false, ...
|
|
|
2241
2739
|
);
|
|
2242
2740
|
});
|
|
2243
2741
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
2244
|
-
var SidebarMenuSub =
|
|
2742
|
+
var SidebarMenuSub = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2245
2743
|
return /* @__PURE__ */ jsx(
|
|
2246
2744
|
"ul",
|
|
2247
2745
|
{
|
|
@@ -2257,11 +2755,11 @@ var SidebarMenuSub = React13.forwardRef(({ className, ...props }, ref) => {
|
|
|
2257
2755
|
);
|
|
2258
2756
|
});
|
|
2259
2757
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
2260
|
-
var SidebarMenuSubItem =
|
|
2758
|
+
var SidebarMenuSubItem = React15.forwardRef(({ ...props }, ref) => {
|
|
2261
2759
|
return /* @__PURE__ */ jsx("li", { ref, ...props });
|
|
2262
2760
|
});
|
|
2263
2761
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
2264
|
-
var SidebarMenuSubButton =
|
|
2762
|
+
var SidebarMenuSubButton = React15.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
2265
2763
|
const Comp = asChild ? Slot : "a";
|
|
2266
2764
|
return /* @__PURE__ */ jsx(
|
|
2267
2765
|
Comp,
|
|
@@ -2615,7 +3113,7 @@ var useEditState = ({ initialEditing = false, onToggleEdit, onSave, onCancel })
|
|
|
2615
3113
|
handleCancel
|
|
2616
3114
|
};
|
|
2617
3115
|
};
|
|
2618
|
-
var EditableFormCard =
|
|
3116
|
+
var EditableFormCard = React15.forwardRef(
|
|
2619
3117
|
({
|
|
2620
3118
|
title,
|
|
2621
3119
|
description,
|
|
@@ -2682,109 +3180,9 @@ var EditableFormCard = React13.forwardRef(
|
|
|
2682
3180
|
children: currentlyEditing ? editContent : viewContent
|
|
2683
3181
|
}
|
|
2684
3182
|
);
|
|
2685
|
-
}
|
|
2686
|
-
);
|
|
2687
|
-
EditableFormCard.displayName = "EditableFormCard";
|
|
2688
|
-
var FormProvider = ({
|
|
2689
|
-
form,
|
|
2690
|
-
children
|
|
2691
|
-
}) => {
|
|
2692
|
-
return /* @__PURE__ */ jsx(FormProvider$1, { ...form, children });
|
|
2693
|
-
};
|
|
2694
|
-
var FormInput = ({
|
|
2695
|
-
name,
|
|
2696
|
-
...props
|
|
2697
|
-
}) => {
|
|
2698
|
-
const { control, formState } = useFormContext();
|
|
2699
|
-
const error = formState.errors[name]?.message;
|
|
2700
|
-
return /* @__PURE__ */ jsx(
|
|
2701
|
-
Controller,
|
|
2702
|
-
{
|
|
2703
|
-
name,
|
|
2704
|
-
control,
|
|
2705
|
-
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
2706
|
-
EnhancedInput,
|
|
2707
|
-
{
|
|
2708
|
-
...props,
|
|
2709
|
-
...field,
|
|
2710
|
-
error
|
|
2711
|
-
}
|
|
2712
|
-
)
|
|
2713
|
-
}
|
|
2714
|
-
);
|
|
2715
|
-
};
|
|
2716
|
-
var useFormWithEditState = ({
|
|
2717
|
-
schema,
|
|
2718
|
-
initialEditing = false,
|
|
2719
|
-
onToggleEdit,
|
|
2720
|
-
onSave,
|
|
2721
|
-
onCancel,
|
|
2722
|
-
...formProps
|
|
2723
|
-
}) => {
|
|
2724
|
-
const [localEditing, setLocalEditing] = useState(initialEditing);
|
|
2725
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
2726
|
-
const form = useForm({
|
|
2727
|
-
...formProps,
|
|
2728
|
-
resolver: schema ? zodResolver(schema) : void 0
|
|
2729
|
-
});
|
|
2730
|
-
const { formState, reset, setError } = form;
|
|
2731
|
-
const { isValid, isDirty } = formState;
|
|
2732
|
-
useEffect(() => {
|
|
2733
|
-
setLocalEditing(initialEditing);
|
|
2734
|
-
}, [initialEditing]);
|
|
2735
|
-
const isEditing = onToggleEdit !== void 0 ? initialEditing : localEditing;
|
|
2736
|
-
const handleToggleEdit = useCallback(() => {
|
|
2737
|
-
if (onToggleEdit) {
|
|
2738
|
-
onToggleEdit();
|
|
2739
|
-
} else {
|
|
2740
|
-
setLocalEditing((prev) => !prev);
|
|
2741
|
-
}
|
|
2742
|
-
}, [onToggleEdit]);
|
|
2743
|
-
const handleSave = useCallback(async () => {
|
|
2744
|
-
if (!isValid) return;
|
|
2745
|
-
setIsLoading(true);
|
|
2746
|
-
try {
|
|
2747
|
-
const data = form.getValues();
|
|
2748
|
-
if (onSave) {
|
|
2749
|
-
await onSave(data);
|
|
2750
|
-
}
|
|
2751
|
-
if (onToggleEdit) {
|
|
2752
|
-
onToggleEdit();
|
|
2753
|
-
} else {
|
|
2754
|
-
setLocalEditing(false);
|
|
2755
|
-
}
|
|
2756
|
-
} catch (error) {
|
|
2757
|
-
console.error("Form save error:", error);
|
|
2758
|
-
} finally {
|
|
2759
|
-
setIsLoading(false);
|
|
2760
|
-
}
|
|
2761
|
-
}, [form, isValid, onSave, onToggleEdit]);
|
|
2762
|
-
const handleCancel = useCallback(() => {
|
|
2763
|
-
reset();
|
|
2764
|
-
if (onCancel) {
|
|
2765
|
-
onCancel();
|
|
2766
|
-
}
|
|
2767
|
-
if (onToggleEdit) {
|
|
2768
|
-
onToggleEdit();
|
|
2769
|
-
} else {
|
|
2770
|
-
setLocalEditing(false);
|
|
2771
|
-
}
|
|
2772
|
-
}, [reset, onCancel, onToggleEdit]);
|
|
2773
|
-
const setFieldError = useCallback((field, error) => {
|
|
2774
|
-
setError(field, { type: "manual", message: error });
|
|
2775
|
-
}, [setError]);
|
|
2776
|
-
return {
|
|
2777
|
-
...form,
|
|
2778
|
-
isEditing,
|
|
2779
|
-
isLoading,
|
|
2780
|
-
handleToggleEdit,
|
|
2781
|
-
handleSave,
|
|
2782
|
-
handleCancel,
|
|
2783
|
-
isFormValid: isValid,
|
|
2784
|
-
isDirty,
|
|
2785
|
-
setFieldError
|
|
2786
|
-
};
|
|
2787
|
-
};
|
|
3183
|
+
}
|
|
3184
|
+
);
|
|
3185
|
+
EditableFormCard.displayName = "EditableFormCard";
|
|
2788
3186
|
var achBasicInfoSchema = z.object({
|
|
2789
3187
|
counterpartyName: z.string().min(1, "Counterparty name is required"),
|
|
2790
3188
|
shortName: z.string().min(1, "Short name is required"),
|
|
@@ -2883,29 +3281,6 @@ var ACHBankCard = ({ data, onDataChange, isEditing, onToggleEdit, className, hid
|
|
|
2883
3281
|
}
|
|
2884
3282
|
);
|
|
2885
3283
|
};
|
|
2886
|
-
var FormSelect = ({
|
|
2887
|
-
name,
|
|
2888
|
-
...props
|
|
2889
|
-
}) => {
|
|
2890
|
-
const { control, formState } = useFormContext();
|
|
2891
|
-
const error = formState.errors[name]?.message;
|
|
2892
|
-
return /* @__PURE__ */ jsx(
|
|
2893
|
-
Controller,
|
|
2894
|
-
{
|
|
2895
|
-
name,
|
|
2896
|
-
control,
|
|
2897
|
-
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
2898
|
-
EnhancedSelect,
|
|
2899
|
-
{
|
|
2900
|
-
...props,
|
|
2901
|
-
value: field.value,
|
|
2902
|
-
onValueChange: field.onChange,
|
|
2903
|
-
error
|
|
2904
|
-
}
|
|
2905
|
-
)
|
|
2906
|
-
}
|
|
2907
|
-
);
|
|
2908
|
-
};
|
|
2909
3284
|
var ACHBasicInfoCard = ({
|
|
2910
3285
|
data,
|
|
2911
3286
|
onDataChange,
|
|
@@ -3001,7 +3376,7 @@ var gapClasses = {
|
|
|
3001
3376
|
lg: "gap-6",
|
|
3002
3377
|
xl: "gap-8"
|
|
3003
3378
|
};
|
|
3004
|
-
var ResponsiveGrid =
|
|
3379
|
+
var ResponsiveGrid = React15.forwardRef(
|
|
3005
3380
|
({ children, type = "cards", gap = "md", editMode = false, className }, ref) => {
|
|
3006
3381
|
const gridClasses2 = editMode ? "grid-cols-1" : typeClasses[type];
|
|
3007
3382
|
return /* @__PURE__ */ jsx(
|
|
@@ -3681,8 +4056,8 @@ var columnClasses = {
|
|
|
3681
4056
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
3682
4057
|
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
3683
4058
|
};
|
|
3684
|
-
var DataGrid =
|
|
3685
|
-
({ data, columns = 2, gap = "md", className }, ref) => {
|
|
4059
|
+
var DataGrid = React15.forwardRef(
|
|
4060
|
+
({ data, columns: columns2 = 2, gap = "md", className }, ref) => {
|
|
3686
4061
|
const isItemArray = data.length > 0 && "label" in data[0];
|
|
3687
4062
|
if (isItemArray) {
|
|
3688
4063
|
const items = data;
|
|
@@ -3692,7 +4067,7 @@ var DataGrid = React13.forwardRef(
|
|
|
3692
4067
|
ref,
|
|
3693
4068
|
className: cn(
|
|
3694
4069
|
"grid",
|
|
3695
|
-
columnClasses[
|
|
4070
|
+
columnClasses[columns2],
|
|
3696
4071
|
gapClasses2[gap],
|
|
3697
4072
|
className
|
|
3698
4073
|
),
|
|
@@ -3713,7 +4088,7 @@ var DataGrid = React13.forwardRef(
|
|
|
3713
4088
|
section.title && /* @__PURE__ */ jsx("h4", { className: "text-sm font-medium text-foreground mb-2", children: section.title }),
|
|
3714
4089
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
3715
4090
|
"grid",
|
|
3716
|
-
columnClasses[
|
|
4091
|
+
columnClasses[columns2],
|
|
3717
4092
|
gapClasses2[gap]
|
|
3718
4093
|
), children: section.items.map((item, itemIndex) => /* @__PURE__ */ jsx(
|
|
3719
4094
|
InfoField,
|
|
@@ -4156,7 +4531,7 @@ var ContactInfoCard = ({ isEditing, onToggleEdit, className }) => {
|
|
|
4156
4531
|
var labelVariants = cva(
|
|
4157
4532
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
4158
4533
|
);
|
|
4159
|
-
var Label =
|
|
4534
|
+
var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4160
4535
|
LabelPrimitive.Root,
|
|
4161
4536
|
{
|
|
4162
4537
|
ref,
|
|
@@ -4277,7 +4652,7 @@ var gridClasses = {
|
|
|
4277
4652
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
4278
4653
|
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
4279
4654
|
};
|
|
4280
|
-
var FormSection =
|
|
4655
|
+
var FormSection = React15.forwardRef(
|
|
4281
4656
|
({
|
|
4282
4657
|
title,
|
|
4283
4658
|
description,
|
|
@@ -4285,7 +4660,7 @@ var FormSection = React13.forwardRef(
|
|
|
4285
4660
|
className,
|
|
4286
4661
|
spacing: spacing2 = "md",
|
|
4287
4662
|
layout = "vertical",
|
|
4288
|
-
columns = 2
|
|
4663
|
+
columns: columns2 = 2
|
|
4289
4664
|
}, ref) => {
|
|
4290
4665
|
return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), children: [
|
|
4291
4666
|
(title || description) && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
@@ -4293,7 +4668,7 @@ var FormSection = React13.forwardRef(
|
|
|
4293
4668
|
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
4294
4669
|
] }),
|
|
4295
4670
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
4296
|
-
layout === "grid" ? `grid gap-4 ${gridClasses[
|
|
4671
|
+
layout === "grid" ? `grid gap-4 ${gridClasses[columns2]}` : spacingClasses[spacing2]
|
|
4297
4672
|
), children })
|
|
4298
4673
|
] });
|
|
4299
4674
|
}
|
|
@@ -4743,267 +5118,618 @@ var WireTransferSection = ({ isEditing, onToggleEdit, className, hideActions })
|
|
|
4743
5118
|
] })
|
|
4744
5119
|
] });
|
|
4745
5120
|
return /* @__PURE__ */ jsx(
|
|
4746
|
-
EditableFormCard,
|
|
5121
|
+
EditableFormCard,
|
|
5122
|
+
{
|
|
5123
|
+
title: "Wire Transfer Configuration",
|
|
5124
|
+
description: "Configure wire transfer settings and participants",
|
|
5125
|
+
variant: "subtle",
|
|
5126
|
+
className,
|
|
5127
|
+
isEditing,
|
|
5128
|
+
onToggleEdit,
|
|
5129
|
+
hideActions,
|
|
5130
|
+
editContent,
|
|
5131
|
+
viewContent
|
|
5132
|
+
}
|
|
5133
|
+
);
|
|
5134
|
+
};
|
|
5135
|
+
var sizeClasses = {
|
|
5136
|
+
sm: "max-w-2xl",
|
|
5137
|
+
md: "max-w-4xl",
|
|
5138
|
+
lg: "max-w-6xl",
|
|
5139
|
+
xl: "max-w-7xl",
|
|
5140
|
+
full: "max-w-full"
|
|
5141
|
+
};
|
|
5142
|
+
var paddingClasses = {
|
|
5143
|
+
none: "",
|
|
5144
|
+
sm: "px-4 py-4",
|
|
5145
|
+
md: "px-6 py-6",
|
|
5146
|
+
lg: "px-8 py-8"
|
|
5147
|
+
};
|
|
5148
|
+
var Container = React15.forwardRef(
|
|
5149
|
+
({ children, size = "lg", padding = "md", center = true, className }, ref) => {
|
|
5150
|
+
return /* @__PURE__ */ jsx(
|
|
5151
|
+
"div",
|
|
5152
|
+
{
|
|
5153
|
+
ref,
|
|
5154
|
+
className: cn(
|
|
5155
|
+
sizeClasses[size],
|
|
5156
|
+
paddingClasses[padding],
|
|
5157
|
+
center && "mx-auto",
|
|
5158
|
+
className
|
|
5159
|
+
),
|
|
5160
|
+
children
|
|
5161
|
+
}
|
|
5162
|
+
);
|
|
5163
|
+
}
|
|
5164
|
+
);
|
|
5165
|
+
Container.displayName = "Container";
|
|
5166
|
+
var spacingClasses2 = {
|
|
5167
|
+
vertical: {
|
|
5168
|
+
none: "",
|
|
5169
|
+
xs: "space-y-1",
|
|
5170
|
+
sm: "space-y-2",
|
|
5171
|
+
md: "space-y-4",
|
|
5172
|
+
lg: "space-y-6",
|
|
5173
|
+
xl: "space-y-8"
|
|
5174
|
+
},
|
|
5175
|
+
horizontal: {
|
|
5176
|
+
none: "",
|
|
5177
|
+
xs: "space-x-1",
|
|
5178
|
+
sm: "space-x-2",
|
|
5179
|
+
md: "space-x-4",
|
|
5180
|
+
lg: "space-x-6",
|
|
5181
|
+
xl: "space-x-8"
|
|
5182
|
+
}
|
|
5183
|
+
};
|
|
5184
|
+
var alignClasses = {
|
|
5185
|
+
vertical: {
|
|
5186
|
+
start: "",
|
|
5187
|
+
center: "items-center",
|
|
5188
|
+
end: "items-end",
|
|
5189
|
+
stretch: "items-stretch"
|
|
5190
|
+
},
|
|
5191
|
+
horizontal: {
|
|
5192
|
+
start: "",
|
|
5193
|
+
center: "items-center",
|
|
5194
|
+
end: "items-end",
|
|
5195
|
+
stretch: "items-stretch"
|
|
5196
|
+
}
|
|
5197
|
+
};
|
|
5198
|
+
var justifyClasses = {
|
|
5199
|
+
start: "",
|
|
5200
|
+
center: "justify-center",
|
|
5201
|
+
end: "justify-end",
|
|
5202
|
+
between: "justify-between",
|
|
5203
|
+
around: "justify-around"
|
|
5204
|
+
};
|
|
5205
|
+
var Stack = React15.forwardRef(
|
|
5206
|
+
({ children, direction = "vertical", spacing: spacing2 = "md", align = "start", justify = "start", className }, ref) => {
|
|
5207
|
+
const isHorizontal = direction === "horizontal";
|
|
5208
|
+
return /* @__PURE__ */ jsx(
|
|
5209
|
+
"div",
|
|
5210
|
+
{
|
|
5211
|
+
ref,
|
|
5212
|
+
className: cn(
|
|
5213
|
+
"flex",
|
|
5214
|
+
isHorizontal ? "flex-row" : "flex-col",
|
|
5215
|
+
spacingClasses2[direction][spacing2],
|
|
5216
|
+
alignClasses[direction][align],
|
|
5217
|
+
justifyClasses[justify],
|
|
5218
|
+
className
|
|
5219
|
+
),
|
|
5220
|
+
children
|
|
5221
|
+
}
|
|
5222
|
+
);
|
|
5223
|
+
}
|
|
5224
|
+
);
|
|
5225
|
+
Stack.displayName = "Stack";
|
|
5226
|
+
var Breadcrumb = React15.forwardRef(
|
|
5227
|
+
({ items, showHome = true, separator, className }, ref) => {
|
|
5228
|
+
const defaultSeparator = /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4 text-muted-foreground" });
|
|
5229
|
+
const separatorElement = separator || defaultSeparator;
|
|
5230
|
+
return /* @__PURE__ */ jsxs(
|
|
5231
|
+
"nav",
|
|
5232
|
+
{
|
|
5233
|
+
ref,
|
|
5234
|
+
"aria-label": "Breadcrumb",
|
|
5235
|
+
className: cn("flex items-center space-x-1 text-sm", className),
|
|
5236
|
+
children: [
|
|
5237
|
+
showHome && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5238
|
+
/* @__PURE__ */ jsx(
|
|
5239
|
+
NavLink,
|
|
5240
|
+
{
|
|
5241
|
+
to: "/",
|
|
5242
|
+
className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
|
|
5243
|
+
children: /* @__PURE__ */ jsx(Home, { className: "w-4 h-4" })
|
|
5244
|
+
}
|
|
5245
|
+
),
|
|
5246
|
+
items.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: separatorElement })
|
|
5247
|
+
] }),
|
|
5248
|
+
items.map((item, index) => {
|
|
5249
|
+
const isLast = index === items.length - 1;
|
|
5250
|
+
return /* @__PURE__ */ jsxs(React15.Fragment, { children: [
|
|
5251
|
+
item.href && !isLast ? /* @__PURE__ */ jsxs(
|
|
5252
|
+
NavLink,
|
|
5253
|
+
{
|
|
5254
|
+
to: item.href,
|
|
5255
|
+
className: "flex items-center text-muted-foreground hover:text-foreground transition-colors",
|
|
5256
|
+
children: [
|
|
5257
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: item.icon }),
|
|
5258
|
+
item.label
|
|
5259
|
+
]
|
|
5260
|
+
}
|
|
5261
|
+
) : /* @__PURE__ */ jsxs("span", { className: cn(
|
|
5262
|
+
"flex items-center",
|
|
5263
|
+
isLast ? "text-foreground font-medium" : "text-muted-foreground"
|
|
5264
|
+
), children: [
|
|
5265
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: item.icon }),
|
|
5266
|
+
item.label
|
|
5267
|
+
] }),
|
|
5268
|
+
!isLast && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: separatorElement })
|
|
5269
|
+
] }, index);
|
|
5270
|
+
})
|
|
5271
|
+
]
|
|
5272
|
+
}
|
|
5273
|
+
);
|
|
5274
|
+
}
|
|
5275
|
+
);
|
|
5276
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
5277
|
+
var ListPage = React15.forwardRef(
|
|
5278
|
+
({
|
|
5279
|
+
title,
|
|
5280
|
+
description,
|
|
5281
|
+
breadcrumbs,
|
|
5282
|
+
actions,
|
|
5283
|
+
children,
|
|
5284
|
+
maxWidth = "xl",
|
|
5285
|
+
loading = false,
|
|
5286
|
+
emptyState,
|
|
5287
|
+
className
|
|
5288
|
+
}, ref) => {
|
|
5289
|
+
const hasData = React15.Children.count(children) > 0;
|
|
5290
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-screen bg-gradient-subtle", className), children: /* @__PURE__ */ jsx(Container, { size: maxWidth, children: /* @__PURE__ */ jsxs(Stack, { spacing: "lg", children: [
|
|
5291
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Breadcrumb, { items: breadcrumbs }),
|
|
5292
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
5293
|
+
/* @__PURE__ */ jsxs(Stack, { spacing: "sm", children: [
|
|
5294
|
+
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
|
|
5295
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-2xl", children: description })
|
|
5296
|
+
] }),
|
|
5297
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsx(Stack, { direction: "horizontal", spacing: "sm", children: actions.map((action, index) => /* @__PURE__ */ jsxs(
|
|
5298
|
+
Button,
|
|
5299
|
+
{
|
|
5300
|
+
variant: action.variant || "default",
|
|
5301
|
+
onClick: action.onClick,
|
|
5302
|
+
children: [
|
|
5303
|
+
action.icon,
|
|
5304
|
+
action.label
|
|
5305
|
+
]
|
|
5306
|
+
},
|
|
5307
|
+
index
|
|
5308
|
+
)) })
|
|
5309
|
+
] }),
|
|
5310
|
+
loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) : hasData ? /* @__PURE__ */ jsx(ResponsiveGrid, { type: "cards", gap: "lg", children }) : emptyState ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: emptyState }) : /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "No items found" }) }) })
|
|
5311
|
+
] }) }) });
|
|
5312
|
+
}
|
|
5313
|
+
);
|
|
5314
|
+
ListPage.displayName = "ListPage";
|
|
5315
|
+
var StatementHeader = ({ data, onEdit }) => {
|
|
5316
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
5317
|
+
/* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
|
|
5318
|
+
/* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
|
|
5319
|
+
/* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
|
|
5320
|
+
/* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-2" }),
|
|
5321
|
+
"Edit"
|
|
5322
|
+
] })
|
|
5323
|
+
] }),
|
|
5324
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: [
|
|
5325
|
+
/* @__PURE__ */ jsx(
|
|
5326
|
+
InfoField,
|
|
5327
|
+
{
|
|
5328
|
+
label: "Account",
|
|
5329
|
+
value: data.account,
|
|
5330
|
+
layout: "horizontal"
|
|
5331
|
+
}
|
|
5332
|
+
),
|
|
5333
|
+
/* @__PURE__ */ jsx(
|
|
5334
|
+
InfoField,
|
|
5335
|
+
{
|
|
5336
|
+
label: "Product ID",
|
|
5337
|
+
value: data.productId,
|
|
5338
|
+
layout: "horizontal"
|
|
5339
|
+
}
|
|
5340
|
+
),
|
|
5341
|
+
/* @__PURE__ */ jsx(
|
|
5342
|
+
InfoField,
|
|
5343
|
+
{
|
|
5344
|
+
label: "Program ID",
|
|
5345
|
+
value: data.programId,
|
|
5346
|
+
layout: "horizontal"
|
|
5347
|
+
}
|
|
5348
|
+
),
|
|
5349
|
+
/* @__PURE__ */ jsx(
|
|
5350
|
+
InfoField,
|
|
5351
|
+
{
|
|
5352
|
+
label: "Start Date",
|
|
5353
|
+
value: data.startDate,
|
|
5354
|
+
layout: "horizontal"
|
|
5355
|
+
}
|
|
5356
|
+
),
|
|
5357
|
+
/* @__PURE__ */ jsx(
|
|
5358
|
+
InfoField,
|
|
5359
|
+
{
|
|
5360
|
+
label: "End Date",
|
|
5361
|
+
value: data.endDate,
|
|
5362
|
+
layout: "horizontal"
|
|
5363
|
+
}
|
|
5364
|
+
),
|
|
5365
|
+
/* @__PURE__ */ jsx(
|
|
5366
|
+
InfoField,
|
|
5367
|
+
{
|
|
5368
|
+
label: "Starting Balance",
|
|
5369
|
+
value: data.startingBalance,
|
|
5370
|
+
layout: "horizontal"
|
|
5371
|
+
}
|
|
5372
|
+
),
|
|
5373
|
+
/* @__PURE__ */ jsx(
|
|
5374
|
+
InfoField,
|
|
5375
|
+
{
|
|
5376
|
+
label: "Ending Balance",
|
|
5377
|
+
value: data.endingBalance,
|
|
5378
|
+
layout: "horizontal"
|
|
5379
|
+
}
|
|
5380
|
+
)
|
|
5381
|
+
] }) })
|
|
5382
|
+
] });
|
|
5383
|
+
};
|
|
5384
|
+
function Calendar({
|
|
5385
|
+
className,
|
|
5386
|
+
classNames,
|
|
5387
|
+
showOutsideDays = true,
|
|
5388
|
+
...props
|
|
5389
|
+
}) {
|
|
5390
|
+
return /* @__PURE__ */ jsx(
|
|
5391
|
+
DayPicker,
|
|
4747
5392
|
{
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
5393
|
+
showOutsideDays,
|
|
5394
|
+
className: cn("p-3 pointer-events-auto", className),
|
|
5395
|
+
classNames: {
|
|
5396
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
5397
|
+
month: "space-y-4",
|
|
5398
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
5399
|
+
caption_label: "text-sm font-medium",
|
|
5400
|
+
nav: "space-x-1 flex items-center",
|
|
5401
|
+
button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
5402
|
+
button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
5403
|
+
month_grid: "w-full border-collapse space-y-1",
|
|
5404
|
+
weekdays: "flex",
|
|
5405
|
+
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
5406
|
+
week: "flex w-full mt-2",
|
|
5407
|
+
day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
5408
|
+
day_button: cn(
|
|
5409
|
+
buttonVariants({ variant: "ghost" }),
|
|
5410
|
+
"h-9 w-9 p-0 font-normal"
|
|
5411
|
+
),
|
|
5412
|
+
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
|
|
5413
|
+
today: "bg-accent text-accent-foreground",
|
|
5414
|
+
outside: "text-muted-foreground opacity-50",
|
|
5415
|
+
disabled: "text-muted-foreground opacity-50",
|
|
5416
|
+
hidden: "invisible",
|
|
5417
|
+
...classNames
|
|
5418
|
+
},
|
|
5419
|
+
...props
|
|
4757
5420
|
}
|
|
4758
5421
|
);
|
|
4759
|
-
}
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
({ children, size = "lg", padding = "md", center = true, className }, ref) => {
|
|
4775
|
-
return /* @__PURE__ */ jsx(
|
|
4776
|
-
"div",
|
|
4777
|
-
{
|
|
4778
|
-
ref,
|
|
4779
|
-
className: cn(
|
|
4780
|
-
sizeClasses[size],
|
|
4781
|
-
paddingClasses[padding],
|
|
4782
|
-
center && "mx-auto",
|
|
4783
|
-
className
|
|
4784
|
-
),
|
|
4785
|
-
children
|
|
4786
|
-
}
|
|
4787
|
-
);
|
|
4788
|
-
}
|
|
4789
|
-
);
|
|
4790
|
-
Container.displayName = "Container";
|
|
4791
|
-
var spacingClasses2 = {
|
|
4792
|
-
vertical: {
|
|
4793
|
-
none: "",
|
|
4794
|
-
xs: "space-y-1",
|
|
4795
|
-
sm: "space-y-2",
|
|
4796
|
-
md: "space-y-4",
|
|
4797
|
-
lg: "space-y-6",
|
|
4798
|
-
xl: "space-y-8"
|
|
4799
|
-
},
|
|
4800
|
-
horizontal: {
|
|
4801
|
-
none: "",
|
|
4802
|
-
xs: "space-x-1",
|
|
4803
|
-
sm: "space-x-2",
|
|
4804
|
-
md: "space-x-4",
|
|
4805
|
-
lg: "space-x-6",
|
|
4806
|
-
xl: "space-x-8"
|
|
5422
|
+
}
|
|
5423
|
+
Calendar.displayName = "Calendar";
|
|
5424
|
+
var Popover = PopoverPrimitive.Root;
|
|
5425
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
5426
|
+
var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
5427
|
+
PopoverPrimitive.Content,
|
|
5428
|
+
{
|
|
5429
|
+
ref,
|
|
5430
|
+
align,
|
|
5431
|
+
sideOffset,
|
|
5432
|
+
className: cn(
|
|
5433
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
5434
|
+
className
|
|
5435
|
+
),
|
|
5436
|
+
...props
|
|
4807
5437
|
}
|
|
4808
|
-
};
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
5438
|
+
) }));
|
|
5439
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
5440
|
+
function DataTable({
|
|
5441
|
+
columns: columns2,
|
|
5442
|
+
data,
|
|
5443
|
+
sortBy,
|
|
5444
|
+
sortDirection,
|
|
5445
|
+
onSort,
|
|
5446
|
+
onRowClick,
|
|
5447
|
+
loading = false,
|
|
5448
|
+
emptyMessage = "No data available",
|
|
5449
|
+
className
|
|
5450
|
+
}) {
|
|
5451
|
+
const handleSort = (key) => {
|
|
5452
|
+
if (onSort) {
|
|
5453
|
+
onSort(key);
|
|
5454
|
+
}
|
|
5455
|
+
};
|
|
5456
|
+
const renderSortIcon = (column) => {
|
|
5457
|
+
if (!column.sortable || !onSort) return null;
|
|
5458
|
+
if (sortBy === column.key) {
|
|
5459
|
+
return sortDirection === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "w-4 h-4 ml-1" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "w-4 h-4 ml-1" });
|
|
5460
|
+
}
|
|
5461
|
+
return /* @__PURE__ */ jsx(ChevronsUpDown, { className: "w-4 h-4 ml-1 opacity-50" });
|
|
5462
|
+
};
|
|
5463
|
+
const renderCell = (column, row) => {
|
|
5464
|
+
const value = row[column.key];
|
|
5465
|
+
if (column.render) {
|
|
5466
|
+
return column.render(value, row);
|
|
5467
|
+
}
|
|
5468
|
+
if (typeof value === "boolean") {
|
|
5469
|
+
return /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "secondary", children: value ? "Yes" : "No" });
|
|
5470
|
+
}
|
|
5471
|
+
if (Array.isArray(value)) {
|
|
5472
|
+
return value.join(", ");
|
|
5473
|
+
}
|
|
5474
|
+
return value?.toString() || "-";
|
|
5475
|
+
};
|
|
5476
|
+
if (loading) {
|
|
5477
|
+
return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) });
|
|
4821
5478
|
}
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
center: "justify-center",
|
|
4826
|
-
end: "justify-end",
|
|
4827
|
-
between: "justify-between",
|
|
4828
|
-
around: "justify-around"
|
|
4829
|
-
};
|
|
4830
|
-
var Stack = React13.forwardRef(
|
|
4831
|
-
({ children, direction = "vertical", spacing: spacing2 = "md", align = "start", justify = "start", className }, ref) => {
|
|
4832
|
-
const isHorizontal = direction === "horizontal";
|
|
4833
|
-
return /* @__PURE__ */ jsx(
|
|
4834
|
-
"div",
|
|
5479
|
+
return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
5480
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/50", children: columns2.map((column) => /* @__PURE__ */ jsx(
|
|
5481
|
+
"th",
|
|
4835
5482
|
{
|
|
4836
|
-
ref,
|
|
4837
5483
|
className: cn(
|
|
4838
|
-
"
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
justifyClasses[justify],
|
|
4843
|
-
className
|
|
5484
|
+
"px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
|
|
5485
|
+
column.align === "center" && "text-center",
|
|
5486
|
+
column.align === "right" && "text-right",
|
|
5487
|
+
column.width && `w-[${column.width}]`
|
|
4844
5488
|
),
|
|
4845
|
-
children
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
5489
|
+
children: column.sortable && onSort ? /* @__PURE__ */ jsx(
|
|
5490
|
+
Button,
|
|
5491
|
+
{
|
|
5492
|
+
variant: "ghost",
|
|
5493
|
+
size: "sm",
|
|
5494
|
+
className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
|
|
5495
|
+
onClick: () => handleSort(column.key),
|
|
5496
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
|
|
5497
|
+
column.title,
|
|
5498
|
+
renderSortIcon(column)
|
|
5499
|
+
] })
|
|
5500
|
+
}
|
|
5501
|
+
) : column.title
|
|
5502
|
+
},
|
|
5503
|
+
column.key
|
|
5504
|
+
)) }) }),
|
|
5505
|
+
/* @__PURE__ */ jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns2.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsx(
|
|
5506
|
+
"tr",
|
|
4857
5507
|
{
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
5508
|
+
className: cn(
|
|
5509
|
+
"border-b transition-colors hover:bg-muted/50",
|
|
5510
|
+
onRowClick && "cursor-pointer"
|
|
5511
|
+
),
|
|
5512
|
+
onClick: () => onRowClick?.(row),
|
|
5513
|
+
children: columns2.map((column) => /* @__PURE__ */ jsx(
|
|
5514
|
+
"td",
|
|
5515
|
+
{
|
|
5516
|
+
className: cn(
|
|
5517
|
+
"px-3 py-2 align-middle text-sm",
|
|
5518
|
+
column.align === "center" && "text-center",
|
|
5519
|
+
column.align === "right" && "text-right"
|
|
4870
5520
|
),
|
|
4871
|
-
|
|
5521
|
+
children: renderCell(column, row)
|
|
5522
|
+
},
|
|
5523
|
+
column.key
|
|
5524
|
+
))
|
|
5525
|
+
},
|
|
5526
|
+
index
|
|
5527
|
+
)) })
|
|
5528
|
+
] }) }) });
|
|
5529
|
+
}
|
|
5530
|
+
var statementTypes = [
|
|
5531
|
+
{ value: "root", label: "Root" },
|
|
5532
|
+
{ value: "program", label: "Program" },
|
|
5533
|
+
{ value: "product", label: "Product" },
|
|
5534
|
+
{ value: "account", label: "Account" }
|
|
5535
|
+
];
|
|
5536
|
+
var columns = [
|
|
5537
|
+
{
|
|
5538
|
+
key: "transactionType",
|
|
5539
|
+
title: "Transaction Type",
|
|
5540
|
+
sortable: true,
|
|
5541
|
+
align: "left"
|
|
5542
|
+
},
|
|
5543
|
+
{
|
|
5544
|
+
key: "direction",
|
|
5545
|
+
title: "Direction",
|
|
5546
|
+
sortable: true,
|
|
5547
|
+
align: "left",
|
|
5548
|
+
render: (value) => /* @__PURE__ */ jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
|
|
5549
|
+
},
|
|
5550
|
+
{
|
|
5551
|
+
key: "amount",
|
|
5552
|
+
title: "Amount",
|
|
5553
|
+
sortable: true,
|
|
5554
|
+
align: "right",
|
|
5555
|
+
render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
|
|
5556
|
+
},
|
|
5557
|
+
{
|
|
5558
|
+
key: "count",
|
|
5559
|
+
title: "Count",
|
|
5560
|
+
sortable: true,
|
|
5561
|
+
align: "right"
|
|
5562
|
+
}
|
|
5563
|
+
];
|
|
5564
|
+
var StatementView = ({
|
|
5565
|
+
statementType,
|
|
5566
|
+
selectedProgram,
|
|
5567
|
+
selectedProduct,
|
|
5568
|
+
accountNumber,
|
|
5569
|
+
startDate,
|
|
5570
|
+
endDate,
|
|
5571
|
+
statementGenerated,
|
|
5572
|
+
programs,
|
|
5573
|
+
products,
|
|
5574
|
+
statementHeader,
|
|
5575
|
+
statementTransactions,
|
|
5576
|
+
onStatementTypeChange,
|
|
5577
|
+
onProgramChange,
|
|
5578
|
+
onProductChange,
|
|
5579
|
+
onAccountNumberChange,
|
|
5580
|
+
onStartDateChange,
|
|
5581
|
+
onEndDateChange,
|
|
5582
|
+
onGenerateStatement,
|
|
5583
|
+
onEdit,
|
|
5584
|
+
onDownloadCSV,
|
|
5585
|
+
onPrintPDF,
|
|
5586
|
+
isGenerateDisabled,
|
|
5587
|
+
isLoading
|
|
5588
|
+
}) => {
|
|
5589
|
+
return /* @__PURE__ */ jsxs("div", { className: "container mx-auto p-6 space-y-6", children: [
|
|
5590
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
5591
|
+
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Statement" }),
|
|
5592
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1", children: "Generate and view statement reports" })
|
|
5593
|
+
] }),
|
|
5594
|
+
!statementGenerated && /* @__PURE__ */ jsxs(Card, { children: [
|
|
5595
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
|
|
5596
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
|
|
5597
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
|
|
5598
|
+
/* @__PURE__ */ jsx(
|
|
5599
|
+
EnhancedSelect,
|
|
5600
|
+
{
|
|
5601
|
+
label: "Statement Type",
|
|
5602
|
+
placeholder: "Select type",
|
|
5603
|
+
options: statementTypes,
|
|
5604
|
+
value: statementType,
|
|
5605
|
+
onValueChange: onStatementTypeChange
|
|
5606
|
+
}
|
|
5607
|
+
),
|
|
5608
|
+
statementType === "program" && /* @__PURE__ */ jsx(
|
|
5609
|
+
EnhancedSelect,
|
|
5610
|
+
{
|
|
5611
|
+
label: "Program Name",
|
|
5612
|
+
placeholder: "Select program",
|
|
5613
|
+
options: programs,
|
|
5614
|
+
value: selectedProgram,
|
|
5615
|
+
onValueChange: onProgramChange
|
|
5616
|
+
}
|
|
5617
|
+
),
|
|
5618
|
+
statementType === "product" && /* @__PURE__ */ jsx(
|
|
5619
|
+
EnhancedSelect,
|
|
5620
|
+
{
|
|
5621
|
+
label: "Product Name",
|
|
5622
|
+
placeholder: "Select product",
|
|
5623
|
+
options: products,
|
|
5624
|
+
value: selectedProduct,
|
|
5625
|
+
onValueChange: onProductChange
|
|
5626
|
+
}
|
|
5627
|
+
),
|
|
5628
|
+
statementType === "account" && /* @__PURE__ */ jsx(
|
|
5629
|
+
EnhancedInput,
|
|
5630
|
+
{
|
|
5631
|
+
label: "Account Number",
|
|
5632
|
+
placeholder: "Enter account number",
|
|
5633
|
+
value: accountNumber,
|
|
5634
|
+
onChange: (e) => onAccountNumberChange(e.target.value)
|
|
5635
|
+
}
|
|
5636
|
+
),
|
|
5637
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
5638
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
|
|
5639
|
+
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
5640
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
5641
|
+
Button,
|
|
5642
|
+
{
|
|
5643
|
+
variant: "outline",
|
|
5644
|
+
className: cn(
|
|
5645
|
+
"justify-start text-left font-normal",
|
|
5646
|
+
!startDate && "text-muted-foreground"
|
|
5647
|
+
),
|
|
5648
|
+
children: [
|
|
5649
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
5650
|
+
startDate ? format(startDate, "MM/dd/yyyy") : "Select date"
|
|
5651
|
+
]
|
|
5652
|
+
}
|
|
5653
|
+
) }),
|
|
5654
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
|
|
5655
|
+
Calendar,
|
|
5656
|
+
{
|
|
5657
|
+
mode: "single",
|
|
5658
|
+
selected: startDate,
|
|
5659
|
+
onSelect: onStartDateChange,
|
|
5660
|
+
initialFocus: true
|
|
5661
|
+
}
|
|
5662
|
+
) })
|
|
5663
|
+
] })
|
|
4872
5664
|
] }),
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
5665
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
5666
|
+
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
|
|
5667
|
+
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
5668
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
5669
|
+
Button,
|
|
4878
5670
|
{
|
|
4879
|
-
|
|
4880
|
-
className:
|
|
5671
|
+
variant: "outline",
|
|
5672
|
+
className: cn(
|
|
5673
|
+
"justify-start text-left font-normal",
|
|
5674
|
+
!endDate && "text-muted-foreground"
|
|
5675
|
+
),
|
|
4881
5676
|
children: [
|
|
4882
|
-
|
|
4883
|
-
|
|
5677
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
5678
|
+
endDate ? format(endDate, "MM/dd/yyyy") : "Select date"
|
|
4884
5679
|
]
|
|
4885
5680
|
}
|
|
4886
|
-
)
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
);
|
|
4899
|
-
}
|
|
4900
|
-
);
|
|
4901
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
4902
|
-
var ListPage = React13.forwardRef(
|
|
4903
|
-
({
|
|
4904
|
-
title,
|
|
4905
|
-
description,
|
|
4906
|
-
breadcrumbs,
|
|
4907
|
-
actions,
|
|
4908
|
-
children,
|
|
4909
|
-
maxWidth = "xl",
|
|
4910
|
-
loading = false,
|
|
4911
|
-
emptyState,
|
|
4912
|
-
className
|
|
4913
|
-
}, ref) => {
|
|
4914
|
-
const hasData = React13.Children.count(children) > 0;
|
|
4915
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-screen bg-gradient-subtle", className), children: /* @__PURE__ */ jsx(Container, { size: maxWidth, children: /* @__PURE__ */ jsxs(Stack, { spacing: "lg", children: [
|
|
4916
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Breadcrumb, { items: breadcrumbs }),
|
|
4917
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
4918
|
-
/* @__PURE__ */ jsxs(Stack, { spacing: "sm", children: [
|
|
4919
|
-
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground", children: title }),
|
|
4920
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-2xl", children: description })
|
|
5681
|
+
) }),
|
|
5682
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
|
|
5683
|
+
Calendar,
|
|
5684
|
+
{
|
|
5685
|
+
mode: "single",
|
|
5686
|
+
selected: endDate,
|
|
5687
|
+
onSelect: onEndDateChange,
|
|
5688
|
+
initialFocus: true
|
|
5689
|
+
}
|
|
5690
|
+
) })
|
|
5691
|
+
] })
|
|
5692
|
+
] })
|
|
4921
5693
|
] }),
|
|
4922
|
-
|
|
5694
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs(
|
|
4923
5695
|
Button,
|
|
4924
5696
|
{
|
|
4925
|
-
|
|
4926
|
-
|
|
5697
|
+
onClick: onGenerateStatement,
|
|
5698
|
+
disabled: isGenerateDisabled || isLoading,
|
|
4927
5699
|
children: [
|
|
4928
|
-
|
|
4929
|
-
|
|
5700
|
+
isLoading && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
5701
|
+
isLoading ? "Generating..." : "Generate Statement"
|
|
4930
5702
|
]
|
|
4931
|
-
}
|
|
4932
|
-
|
|
4933
|
-
)) })
|
|
4934
|
-
] }),
|
|
4935
|
-
loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) : hasData ? /* @__PURE__ */ jsx(ResponsiveGrid, { type: "cards", gap: "lg", children }) : emptyState ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: emptyState }) : /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "No items found" }) }) })
|
|
4936
|
-
] }) }) });
|
|
4937
|
-
}
|
|
4938
|
-
);
|
|
4939
|
-
ListPage.displayName = "ListPage";
|
|
4940
|
-
var StatementHeader = ({ data, onEdit }) => {
|
|
4941
|
-
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
4942
|
-
/* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
|
|
4943
|
-
/* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
|
|
4944
|
-
/* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onEdit, children: [
|
|
4945
|
-
/* @__PURE__ */ jsx(Edit, { className: "h-4 w-4 mr-2" }),
|
|
4946
|
-
"Edit"
|
|
5703
|
+
}
|
|
5704
|
+
) })
|
|
4947
5705
|
] })
|
|
4948
5706
|
] }),
|
|
4949
|
-
|
|
4950
|
-
/* @__PURE__ */ jsx(
|
|
4951
|
-
|
|
4952
|
-
{
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
}
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
}
|
|
4973
|
-
)
|
|
4974
|
-
|
|
4975
|
-
InfoField,
|
|
4976
|
-
{
|
|
4977
|
-
label: "Start Date",
|
|
4978
|
-
value: data.startDate,
|
|
4979
|
-
layout: "horizontal"
|
|
4980
|
-
}
|
|
4981
|
-
),
|
|
4982
|
-
/* @__PURE__ */ jsx(
|
|
4983
|
-
InfoField,
|
|
4984
|
-
{
|
|
4985
|
-
label: "End Date",
|
|
4986
|
-
value: data.endDate,
|
|
4987
|
-
layout: "horizontal"
|
|
4988
|
-
}
|
|
4989
|
-
),
|
|
4990
|
-
/* @__PURE__ */ jsx(
|
|
4991
|
-
InfoField,
|
|
4992
|
-
{
|
|
4993
|
-
label: "Starting Balance",
|
|
4994
|
-
value: data.startingBalance,
|
|
4995
|
-
layout: "horizontal"
|
|
4996
|
-
}
|
|
4997
|
-
),
|
|
4998
|
-
/* @__PURE__ */ jsx(
|
|
4999
|
-
InfoField,
|
|
5000
|
-
{
|
|
5001
|
-
label: "Ending Balance",
|
|
5002
|
-
value: data.endingBalance,
|
|
5003
|
-
layout: "horizontal"
|
|
5004
|
-
}
|
|
5005
|
-
)
|
|
5006
|
-
] }) })
|
|
5707
|
+
statementGenerated && statementHeader && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5708
|
+
/* @__PURE__ */ jsx(StatementHeader, { data: statementHeader, onEdit }),
|
|
5709
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
5710
|
+
/* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
|
|
5711
|
+
/* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
|
|
5712
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5713
|
+
/* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onDownloadCSV, children: [
|
|
5714
|
+
/* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
|
|
5715
|
+
"Download CSV"
|
|
5716
|
+
] }),
|
|
5717
|
+
/* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onPrintPDF, children: [
|
|
5718
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 mr-2" }),
|
|
5719
|
+
"Print PDF"
|
|
5720
|
+
] })
|
|
5721
|
+
] })
|
|
5722
|
+
] }),
|
|
5723
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
|
|
5724
|
+
DataTable,
|
|
5725
|
+
{
|
|
5726
|
+
columns,
|
|
5727
|
+
data: statementTransactions,
|
|
5728
|
+
emptyMessage: "No transactions found"
|
|
5729
|
+
}
|
|
5730
|
+
) })
|
|
5731
|
+
] })
|
|
5732
|
+
] })
|
|
5007
5733
|
] });
|
|
5008
5734
|
};
|
|
5009
5735
|
var ACHDetailsSection = ({ data }) => {
|
|
@@ -5138,7 +5864,7 @@ var typeLabels = {
|
|
|
5138
5864
|
credit: "Credit",
|
|
5139
5865
|
investment: "Investment"
|
|
5140
5866
|
};
|
|
5141
|
-
var AccountCard =
|
|
5867
|
+
var AccountCard = React15.forwardRef(
|
|
5142
5868
|
({ account, showBalance = true, className }, ref) => {
|
|
5143
5869
|
const TypeIcon = typeIcons[account.type];
|
|
5144
5870
|
const accountData = [
|
|
@@ -5200,136 +5926,25 @@ var BusinessTypeBadge = ({ type, className }) => {
|
|
|
5200
5926
|
config.label
|
|
5201
5927
|
] });
|
|
5202
5928
|
};
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
classNames: {
|
|
5215
|
-
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
5216
|
-
month: "space-y-4",
|
|
5217
|
-
caption: "flex justify-center pt-1 relative items-center",
|
|
5218
|
-
caption_label: "text-sm font-medium",
|
|
5219
|
-
nav: "space-x-1 flex items-center",
|
|
5220
|
-
button_previous: "absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
5221
|
-
button_next: "absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
|
|
5222
|
-
month_grid: "w-full border-collapse space-y-1",
|
|
5223
|
-
weekdays: "flex",
|
|
5224
|
-
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
5225
|
-
week: "flex w-full mt-2",
|
|
5226
|
-
day: "h-9 w-9 text-center text-sm p-0 relative hover:bg-accent hover:text-accent-foreground rounded-md",
|
|
5227
|
-
day_button: cn(
|
|
5228
|
-
buttonVariants({ variant: "ghost" }),
|
|
5229
|
-
"h-9 w-9 p-0 font-normal"
|
|
5230
|
-
),
|
|
5231
|
-
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
|
|
5232
|
-
today: "bg-accent text-accent-foreground",
|
|
5233
|
-
outside: "text-muted-foreground opacity-50",
|
|
5234
|
-
disabled: "text-muted-foreground opacity-50",
|
|
5235
|
-
hidden: "invisible",
|
|
5236
|
-
...classNames
|
|
5237
|
-
},
|
|
5238
|
-
...props
|
|
5239
|
-
}
|
|
5240
|
-
);
|
|
5241
|
-
}
|
|
5242
|
-
Calendar.displayName = "Calendar";
|
|
5243
|
-
function DataTable({
|
|
5244
|
-
columns,
|
|
5245
|
-
data,
|
|
5246
|
-
sortBy,
|
|
5247
|
-
sortDirection,
|
|
5248
|
-
onSort,
|
|
5249
|
-
onRowClick,
|
|
5250
|
-
loading = false,
|
|
5251
|
-
emptyMessage = "No data available",
|
|
5252
|
-
className
|
|
5253
|
-
}) {
|
|
5254
|
-
const handleSort = (key) => {
|
|
5255
|
-
if (onSort) {
|
|
5256
|
-
onSort(key);
|
|
5257
|
-
}
|
|
5258
|
-
};
|
|
5259
|
-
const renderSortIcon = (column) => {
|
|
5260
|
-
if (!column.sortable || !onSort) return null;
|
|
5261
|
-
if (sortBy === column.key) {
|
|
5262
|
-
return sortDirection === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "w-4 h-4 ml-1" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "w-4 h-4 ml-1" });
|
|
5263
|
-
}
|
|
5264
|
-
return /* @__PURE__ */ jsx(ChevronsUpDown, { className: "w-4 h-4 ml-1 opacity-50" });
|
|
5265
|
-
};
|
|
5266
|
-
const renderCell = (column, row) => {
|
|
5267
|
-
const value = row[column.key];
|
|
5268
|
-
if (column.render) {
|
|
5269
|
-
return column.render(value, row);
|
|
5270
|
-
}
|
|
5271
|
-
if (typeof value === "boolean") {
|
|
5272
|
-
return /* @__PURE__ */ jsx(Badge, { variant: value ? "success" : "secondary", children: value ? "Yes" : "No" });
|
|
5273
|
-
}
|
|
5274
|
-
if (Array.isArray(value)) {
|
|
5275
|
-
return value.join(", ");
|
|
5276
|
-
}
|
|
5277
|
-
return value?.toString() || "-";
|
|
5278
|
-
};
|
|
5279
|
-
if (loading) {
|
|
5280
|
-
return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse text-muted-foreground", children: "Loading..." }) }) });
|
|
5281
|
-
}
|
|
5282
|
-
return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border", className), children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
5283
|
-
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b bg-muted/50", children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
5284
|
-
"th",
|
|
5285
|
-
{
|
|
5286
|
-
className: cn(
|
|
5287
|
-
"px-3 py-2 text-left align-middle text-sm font-medium bg-muted/50",
|
|
5288
|
-
column.align === "center" && "text-center",
|
|
5289
|
-
column.align === "right" && "text-right",
|
|
5290
|
-
column.width && `w-[${column.width}]`
|
|
5291
|
-
),
|
|
5292
|
-
children: column.sortable && onSort ? /* @__PURE__ */ jsx(
|
|
5293
|
-
Button,
|
|
5294
|
-
{
|
|
5295
|
-
variant: "ghost",
|
|
5296
|
-
size: "sm",
|
|
5297
|
-
className: "h-auto p-0 text-sm font-medium hover:bg-transparent",
|
|
5298
|
-
onClick: () => handleSort(column.key),
|
|
5299
|
-
children: /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
|
|
5300
|
-
column.title,
|
|
5301
|
-
renderSortIcon(column)
|
|
5302
|
-
] })
|
|
5303
|
-
}
|
|
5304
|
-
) : column.title
|
|
5305
|
-
},
|
|
5306
|
-
column.key
|
|
5307
|
-
)) }) }),
|
|
5308
|
-
/* @__PURE__ */ jsx("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns.length, className: "h-24 text-center text-muted-foreground", children: emptyMessage }) }) : data.map((row, index) => /* @__PURE__ */ jsx(
|
|
5309
|
-
"tr",
|
|
5929
|
+
var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5930
|
+
CheckboxPrimitive.Root,
|
|
5931
|
+
{
|
|
5932
|
+
ref,
|
|
5933
|
+
className: cn(
|
|
5934
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
5935
|
+
className
|
|
5936
|
+
),
|
|
5937
|
+
...props,
|
|
5938
|
+
children: /* @__PURE__ */ jsx(
|
|
5939
|
+
CheckboxPrimitive.Indicator,
|
|
5310
5940
|
{
|
|
5311
|
-
className: cn(
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
{
|
|
5319
|
-
className: cn(
|
|
5320
|
-
"px-3 py-2 align-middle text-sm",
|
|
5321
|
-
column.align === "center" && "text-center",
|
|
5322
|
-
column.align === "right" && "text-right"
|
|
5323
|
-
),
|
|
5324
|
-
children: renderCell(column, row)
|
|
5325
|
-
},
|
|
5326
|
-
column.key
|
|
5327
|
-
))
|
|
5328
|
-
},
|
|
5329
|
-
index
|
|
5330
|
-
)) })
|
|
5331
|
-
] }) }) });
|
|
5332
|
-
}
|
|
5941
|
+
className: cn("flex items-center justify-center text-current"),
|
|
5942
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
|
|
5943
|
+
}
|
|
5944
|
+
)
|
|
5945
|
+
}
|
|
5946
|
+
));
|
|
5947
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
5333
5948
|
var maxWidthClasses = {
|
|
5334
5949
|
sm: "max-w-2xl",
|
|
5335
5950
|
md: "max-w-4xl",
|
|
@@ -5361,7 +5976,7 @@ var getGridClasses = (gridCols, responsive) => {
|
|
|
5361
5976
|
return "grid-cols-1 lg:grid-cols-2";
|
|
5362
5977
|
}
|
|
5363
5978
|
};
|
|
5364
|
-
var PageLayout =
|
|
5979
|
+
var PageLayout = React15.forwardRef(
|
|
5365
5980
|
({
|
|
5366
5981
|
title,
|
|
5367
5982
|
description,
|
|
@@ -5372,9 +5987,10 @@ var PageLayout = React13.forwardRef(
|
|
|
5372
5987
|
maxWidth = "xl",
|
|
5373
5988
|
gridCols = 2,
|
|
5374
5989
|
responsive = true,
|
|
5375
|
-
className
|
|
5990
|
+
className,
|
|
5991
|
+
headerContent
|
|
5376
5992
|
}, ref) => {
|
|
5377
|
-
const [editingCards, setEditingCards] =
|
|
5993
|
+
const [editingCards, setEditingCards] = React15.useState(/* @__PURE__ */ new Set());
|
|
5378
5994
|
const toggleEdit = (cardKey) => {
|
|
5379
5995
|
setEditingCards((prev) => {
|
|
5380
5996
|
const next = new Set(prev);
|
|
@@ -5391,11 +6007,12 @@ var PageLayout = React13.forwardRef(
|
|
|
5391
6007
|
"sticky top-0 z-10 bg-gradient-subtle border-b border-border/40",
|
|
5392
6008
|
"container mx-auto px-4 pt-8 pb-4",
|
|
5393
6009
|
maxWidthClasses[maxWidth]
|
|
5394
|
-
), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
5395
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
6010
|
+
), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
6011
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
5396
6012
|
/* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold text-foreground mb-2", children: title }),
|
|
5397
6013
|
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
|
|
5398
6014
|
] }),
|
|
6015
|
+
headerContent && /* @__PURE__ */ jsx("div", { className: "flex items-center", children: headerContent }),
|
|
5399
6016
|
actions.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
|
|
5400
6017
|
const Icon2 = action.icon;
|
|
5401
6018
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5502,7 +6119,7 @@ var DetailPageLayout = ({
|
|
|
5502
6119
|
};
|
|
5503
6120
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
5504
6121
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
5505
|
-
var DropdownMenuContent =
|
|
6122
|
+
var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
5506
6123
|
DropdownMenuPrimitive.Content,
|
|
5507
6124
|
{
|
|
5508
6125
|
ref,
|
|
@@ -5515,7 +6132,7 @@ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
5515
6132
|
}
|
|
5516
6133
|
) }));
|
|
5517
6134
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
5518
|
-
var DropdownMenuItem =
|
|
6135
|
+
var DropdownMenuItem = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5519
6136
|
DropdownMenuPrimitive.Item,
|
|
5520
6137
|
{
|
|
5521
6138
|
ref,
|
|
@@ -5528,7 +6145,7 @@ var DropdownMenuItem = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
5528
6145
|
}
|
|
5529
6146
|
));
|
|
5530
6147
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
5531
|
-
var DropdownMenuLabel =
|
|
6148
|
+
var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5532
6149
|
DropdownMenuPrimitive.Label,
|
|
5533
6150
|
{
|
|
5534
6151
|
ref,
|
|
@@ -5541,7 +6158,7 @@ var DropdownMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref)
|
|
|
5541
6158
|
}
|
|
5542
6159
|
));
|
|
5543
6160
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
5544
|
-
var DropdownMenuSeparator =
|
|
6161
|
+
var DropdownMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5545
6162
|
DropdownMenuPrimitive.Separator,
|
|
5546
6163
|
{
|
|
5547
6164
|
ref,
|
|
@@ -5550,7 +6167,51 @@ var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) =>
|
|
|
5550
6167
|
}
|
|
5551
6168
|
));
|
|
5552
6169
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
5553
|
-
var
|
|
6170
|
+
var EditableInfoField = ({
|
|
6171
|
+
label,
|
|
6172
|
+
value,
|
|
6173
|
+
options,
|
|
6174
|
+
onChange,
|
|
6175
|
+
placeholder = "Select...",
|
|
6176
|
+
renderValue,
|
|
6177
|
+
className
|
|
6178
|
+
}) => {
|
|
6179
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
6180
|
+
const handleChange = (newValue) => {
|
|
6181
|
+
onChange(newValue);
|
|
6182
|
+
setIsEditing(false);
|
|
6183
|
+
};
|
|
6184
|
+
if (isEditing) {
|
|
6185
|
+
return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(
|
|
6186
|
+
EnhancedSelect,
|
|
6187
|
+
{
|
|
6188
|
+
label,
|
|
6189
|
+
value: value || "",
|
|
6190
|
+
onValueChange: handleChange,
|
|
6191
|
+
options,
|
|
6192
|
+
placeholder
|
|
6193
|
+
}
|
|
6194
|
+
) });
|
|
6195
|
+
}
|
|
6196
|
+
const displayValue = value ? renderValue ? renderValue(value) : value : placeholder;
|
|
6197
|
+
return /* @__PURE__ */ jsx(
|
|
6198
|
+
"div",
|
|
6199
|
+
{
|
|
6200
|
+
className: cn("cursor-pointer transition-colors hover:bg-muted/50 rounded-md -mx-2 px-2 -my-1 py-1", className),
|
|
6201
|
+
onClick: () => setIsEditing(true),
|
|
6202
|
+
role: "button",
|
|
6203
|
+
tabIndex: 0,
|
|
6204
|
+
onKeyDown: (e) => {
|
|
6205
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
6206
|
+
e.preventDefault();
|
|
6207
|
+
setIsEditing(true);
|
|
6208
|
+
}
|
|
6209
|
+
},
|
|
6210
|
+
children: /* @__PURE__ */ jsx(InfoField, { label, value: displayValue })
|
|
6211
|
+
}
|
|
6212
|
+
);
|
|
6213
|
+
};
|
|
6214
|
+
var EntityCard = React15.forwardRef(
|
|
5554
6215
|
({
|
|
5555
6216
|
entity,
|
|
5556
6217
|
actions,
|
|
@@ -5596,7 +6257,7 @@ var EntityCard = React13.forwardRef(
|
|
|
5596
6257
|
] }),
|
|
5597
6258
|
allActions.length > 0 && /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
5598
6259
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", children: /* @__PURE__ */ jsx(MoreVertical, { className: "w-4 h-4" }) }) }),
|
|
5599
|
-
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: allActions.map((action, index) => /* @__PURE__ */ jsxs(
|
|
6260
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: allActions.map((action, index) => /* @__PURE__ */ jsxs(React15.Fragment, { children: [
|
|
5600
6261
|
/* @__PURE__ */ jsxs(
|
|
5601
6262
|
DropdownMenuItem,
|
|
5602
6263
|
{
|
|
@@ -5622,7 +6283,7 @@ var EntityCard = React13.forwardRef(
|
|
|
5622
6283
|
}
|
|
5623
6284
|
);
|
|
5624
6285
|
EntityCard.displayName = "EntityCard";
|
|
5625
|
-
var FormField =
|
|
6286
|
+
var FormField = React15.forwardRef(
|
|
5626
6287
|
({ label, description, error, required, children, className, layout = "vertical" }, ref) => {
|
|
5627
6288
|
const isHorizontal = layout === "horizontal";
|
|
5628
6289
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5668,7 +6329,7 @@ var trendColors = {
|
|
|
5668
6329
|
down: "destructive",
|
|
5669
6330
|
neutral: "secondary"
|
|
5670
6331
|
};
|
|
5671
|
-
var MetricCard =
|
|
6332
|
+
var MetricCard = React15.forwardRef(
|
|
5672
6333
|
({ title, value, description, trend, icon, variant = "default", className }, ref) => {
|
|
5673
6334
|
const TrendIcon = trend ? trendIcons[trend.direction] : null;
|
|
5674
6335
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5700,22 +6361,6 @@ var MetricCard = React13.forwardRef(
|
|
|
5700
6361
|
}
|
|
5701
6362
|
);
|
|
5702
6363
|
MetricCard.displayName = "MetricCard";
|
|
5703
|
-
var Popover = PopoverPrimitive.Root;
|
|
5704
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
5705
|
-
var PopoverContent = React13.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
5706
|
-
PopoverPrimitive.Content,
|
|
5707
|
-
{
|
|
5708
|
-
ref,
|
|
5709
|
-
align,
|
|
5710
|
-
sideOffset,
|
|
5711
|
-
className: cn(
|
|
5712
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
5713
|
-
className
|
|
5714
|
-
),
|
|
5715
|
-
...props
|
|
5716
|
-
}
|
|
5717
|
-
) }));
|
|
5718
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
5719
6364
|
var Toaster = ({ ...props }) => {
|
|
5720
6365
|
const { theme = "system" } = useTheme();
|
|
5721
6366
|
return /* @__PURE__ */ jsx(
|
|
@@ -5736,7 +6381,7 @@ var Toaster = ({ ...props }) => {
|
|
|
5736
6381
|
);
|
|
5737
6382
|
};
|
|
5738
6383
|
var Tabs = TabsPrimitive.Root;
|
|
5739
|
-
var TabsList =
|
|
6384
|
+
var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5740
6385
|
TabsPrimitive.List,
|
|
5741
6386
|
{
|
|
5742
6387
|
ref,
|
|
@@ -5748,7 +6393,7 @@ var TabsList = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
5748
6393
|
}
|
|
5749
6394
|
));
|
|
5750
6395
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
5751
|
-
var TabsTrigger =
|
|
6396
|
+
var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5752
6397
|
TabsPrimitive.Trigger,
|
|
5753
6398
|
{
|
|
5754
6399
|
ref,
|
|
@@ -5760,7 +6405,7 @@ var TabsTrigger = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5760
6405
|
}
|
|
5761
6406
|
));
|
|
5762
6407
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
5763
|
-
var TabsContent =
|
|
6408
|
+
var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5764
6409
|
TabsPrimitive.Content,
|
|
5765
6410
|
{
|
|
5766
6411
|
ref,
|
|
@@ -5773,7 +6418,7 @@ var TabsContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5773
6418
|
));
|
|
5774
6419
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
5775
6420
|
var ToastProvider = ToastPrimitives.Provider;
|
|
5776
|
-
var ToastViewport =
|
|
6421
|
+
var ToastViewport = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5777
6422
|
ToastPrimitives.Viewport,
|
|
5778
6423
|
{
|
|
5779
6424
|
ref,
|
|
@@ -5799,7 +6444,7 @@ var toastVariants = cva(
|
|
|
5799
6444
|
}
|
|
5800
6445
|
}
|
|
5801
6446
|
);
|
|
5802
|
-
var Toast =
|
|
6447
|
+
var Toast = React15.forwardRef(({ className, variant, ...props }, ref) => {
|
|
5803
6448
|
return /* @__PURE__ */ jsx(
|
|
5804
6449
|
ToastPrimitives.Root,
|
|
5805
6450
|
{
|
|
@@ -5810,7 +6455,7 @@ var Toast = React13.forwardRef(({ className, variant, ...props }, ref) => {
|
|
|
5810
6455
|
);
|
|
5811
6456
|
});
|
|
5812
6457
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
5813
|
-
var ToastAction =
|
|
6458
|
+
var ToastAction = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5814
6459
|
ToastPrimitives.Action,
|
|
5815
6460
|
{
|
|
5816
6461
|
ref,
|
|
@@ -5822,7 +6467,7 @@ var ToastAction = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5822
6467
|
}
|
|
5823
6468
|
));
|
|
5824
6469
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
5825
|
-
var ToastClose =
|
|
6470
|
+
var ToastClose = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5826
6471
|
ToastPrimitives.Close,
|
|
5827
6472
|
{
|
|
5828
6473
|
ref,
|
|
@@ -5836,7 +6481,7 @@ var ToastClose = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5836
6481
|
}
|
|
5837
6482
|
));
|
|
5838
6483
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
5839
|
-
var ToastTitle =
|
|
6484
|
+
var ToastTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5840
6485
|
ToastPrimitives.Title,
|
|
5841
6486
|
{
|
|
5842
6487
|
ref,
|
|
@@ -5845,7 +6490,7 @@ var ToastTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5845
6490
|
}
|
|
5846
6491
|
));
|
|
5847
6492
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
5848
|
-
var ToastDescription =
|
|
6493
|
+
var ToastDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5849
6494
|
ToastPrimitives.Description,
|
|
5850
6495
|
{
|
|
5851
6496
|
ref,
|
|
@@ -5854,6 +6499,19 @@ var ToastDescription = React13.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5854
6499
|
}
|
|
5855
6500
|
));
|
|
5856
6501
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
6502
|
+
var TransactionTypeBadge = ({
|
|
6503
|
+
transactionType,
|
|
6504
|
+
isInbound,
|
|
6505
|
+
className
|
|
6506
|
+
}) => {
|
|
6507
|
+
const Icon2 = isInbound ? ArrowDownRight : ArrowUpRight;
|
|
6508
|
+
const variant = "outline";
|
|
6509
|
+
return /* @__PURE__ */ jsxs(Badge, { variant, className, children: [
|
|
6510
|
+
isInbound && /* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 mr-1" }),
|
|
6511
|
+
transactionType,
|
|
6512
|
+
!isInbound && /* @__PURE__ */ jsx(Icon2, { className: "w-3 h-3 ml-1" })
|
|
6513
|
+
] });
|
|
6514
|
+
};
|
|
5857
6515
|
var mockCounterparties = [
|
|
5858
6516
|
{
|
|
5859
6517
|
id: "1",
|
|
@@ -6068,8 +6726,8 @@ var transactionColumns = [
|
|
|
6068
6726
|
{ key: "date", title: "Date", sortable: true }
|
|
6069
6727
|
];
|
|
6070
6728
|
function DashboardDemo() {
|
|
6071
|
-
const [sortBy, setSortBy] =
|
|
6072
|
-
const [sortDirection, setSortDirection] =
|
|
6729
|
+
const [sortBy, setSortBy] = React15.useState();
|
|
6730
|
+
const [sortDirection, setSortDirection] = React15.useState("asc");
|
|
6073
6731
|
const handleSort = (key) => {
|
|
6074
6732
|
if (sortBy === key) {
|
|
6075
6733
|
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
@@ -6203,7 +6861,7 @@ var badgeVariants2 = [
|
|
|
6203
6861
|
"suspended"
|
|
6204
6862
|
];
|
|
6205
6863
|
function ColorSwatch({ color }) {
|
|
6206
|
-
const [copied, setCopied] =
|
|
6864
|
+
const [copied, setCopied] = React15.useState(false);
|
|
6207
6865
|
const copyToClipboard = () => {
|
|
6208
6866
|
navigator.clipboard.writeText(color.value);
|
|
6209
6867
|
setCopied(true);
|
|
@@ -6309,8 +6967,8 @@ var tableColumns = [
|
|
|
6309
6967
|
{ key: "verified", title: "Verified", sortable: true }
|
|
6310
6968
|
];
|
|
6311
6969
|
function UIKitShowcase() {
|
|
6312
|
-
const [sortBy, setSortBy] =
|
|
6313
|
-
const [sortDirection, setSortDirection] =
|
|
6970
|
+
const [sortBy, setSortBy] = React15.useState();
|
|
6971
|
+
const [sortDirection, setSortDirection] = React15.useState("asc");
|
|
6314
6972
|
const handleSort = (key) => {
|
|
6315
6973
|
if (sortBy === key) {
|
|
6316
6974
|
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
@@ -6447,10 +7105,15 @@ var mockAlerts = [
|
|
|
6447
7105
|
type: "Ofac",
|
|
6448
7106
|
status: "Unassigned",
|
|
6449
7107
|
contextType: "Ofac",
|
|
6450
|
-
description: "
|
|
7108
|
+
description: "WIRE TRANSFER: Multiple OFAC matches detected for beneficiary bank",
|
|
6451
7109
|
timeline: [
|
|
6452
7110
|
{ id: "1", timestamp: "2025-09-30 03:00:21", user: "System", action: "Alert Created", status: "Unassigned" },
|
|
6453
|
-
{ id: "2", timestamp: "2025-09-30 09:15:32", user: "John Smith", action: "Alert Assigned", details: "Assigned to compliance team", status: "In Progress" }
|
|
7111
|
+
{ id: "2", timestamp: "2025-09-30 09:15:32", user: "John Smith", action: "Alert Assigned", details: "Assigned to compliance team", status: "In Progress" },
|
|
7112
|
+
{ id: "3", timestamp: "2025-09-30 10:22:15", user: "John Smith", action: "Note added", details: "Added RFI note requesting documentation" },
|
|
7113
|
+
{ id: "4", timestamp: "2025-09-30 10:25:00", user: "John Smith", action: "Document added", details: "Uploaded passport_scan.pdf" },
|
|
7114
|
+
{ id: "5", timestamp: "2025-09-30 11:50:00", user: "Sarah Johnson", action: "Document added", details: "Uploaded proof_of_address.jpg" },
|
|
7115
|
+
{ id: "6", timestamp: "2025-10-01 08:30:00", user: "System", action: "RFI Status change", details: "Status changed from Pending to Provided" },
|
|
7116
|
+
{ id: "7", timestamp: "2025-10-01 14:20:00", user: "Michael Chen", action: "Alert Approved", details: "Approved after review - false positive confirmed" }
|
|
6454
7117
|
],
|
|
6455
7118
|
notes: [
|
|
6456
7119
|
{ id: "1", timestamp: "2025-09-30 10:22:15", user: "John Smith", content: "Reviewing OFAC match. Need to verify identity documents.", type: "RFI Note" },
|
|
@@ -6481,111 +7144,45 @@ var mockAlerts = [
|
|
|
6481
7144
|
}
|
|
6482
7145
|
],
|
|
6483
7146
|
contextData: {
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
nationalities: ["Syria", "Lebanon"],
|
|
6502
|
-
citizenships: ["Syria"],
|
|
6503
|
-
dateOfBirthList: [
|
|
6504
|
-
{ dateOfBirth: "1985-03-12", mainEntry: true },
|
|
6505
|
-
{ dateOfBirth: "1985-03-15", mainEntry: false }
|
|
6506
|
-
],
|
|
6507
|
-
placeOfBirthList: [
|
|
6508
|
-
{ placeOfBirth: "Damascus, Syria", mainEntry: true },
|
|
6509
|
-
{ placeOfBirth: "Aleppo, Syria", mainEntry: false }
|
|
6510
|
-
],
|
|
6511
|
-
akaList: [
|
|
6512
|
-
{ category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
|
|
6513
|
-
{ category: "weak", firstName: "Ali", lastName: "Hasan" },
|
|
6514
|
-
{ category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" }
|
|
6515
|
-
],
|
|
6516
|
-
idList: [
|
|
6517
|
-
{ idType: "Passport", idNumber: "D1234567", idCountry: "Syria", issueDate: "2010-01-15", expirationDate: "2020-01-15" },
|
|
6518
|
-
{ idType: "Passport", idNumber: "E7654321", idCountry: "Lebanon", issueDate: "2015-06-20", expirationDate: "2025-06-20" },
|
|
6519
|
-
{ idType: "National ID", idNumber: "SY123456789", idCountry: "Syria" }
|
|
6520
|
-
]
|
|
6521
|
-
}
|
|
6522
|
-
],
|
|
6523
|
-
addresses: [
|
|
6524
|
-
{
|
|
6525
|
-
uid: 67890,
|
|
6526
|
-
address1: "Building 42, Al-Mazzeh",
|
|
6527
|
-
city: "Damascus",
|
|
6528
|
-
stateOrProvince: "Damascus Governorate",
|
|
6529
|
-
postalCode: "12345",
|
|
6530
|
-
country: "Syria",
|
|
6531
|
-
addressRemarks: "Primary Residence"
|
|
6532
|
-
},
|
|
7147
|
+
ofacId: 5043462,
|
|
7148
|
+
counterpartyName: null,
|
|
7149
|
+
counterpartyId: null,
|
|
7150
|
+
businessName: null,
|
|
7151
|
+
businessId: null,
|
|
7152
|
+
individualName: null,
|
|
7153
|
+
individualId: null,
|
|
7154
|
+
uboId: null,
|
|
7155
|
+
transactionPaymentId: "5c73200c-3ade-4ba5-b6e6-39ad4b519fab",
|
|
7156
|
+
tenantId: "JakeUAT",
|
|
7157
|
+
alertId: 4425,
|
|
7158
|
+
note: null,
|
|
7159
|
+
status: "REVIEW",
|
|
7160
|
+
createdAt: 1760162113,
|
|
7161
|
+
updatedAt: 176016211300416e-5,
|
|
7162
|
+
updatedBy: null,
|
|
7163
|
+
ofacCheckDetails: [
|
|
6533
7164
|
{
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
country: "Lebanon",
|
|
6538
|
-
addressRemarks: "Secondary Address"
|
|
7165
|
+
id: 24870,
|
|
7166
|
+
checkKey: "originatorName",
|
|
7167
|
+
checkValue: "Kim jung un"
|
|
6539
7168
|
},
|
|
6540
7169
|
{
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
stateOrProvince: "Aleppo Governorate",
|
|
6545
|
-
country: "Syria",
|
|
6546
|
-
addressRemarks: "Business Address - Suspected Front Company"
|
|
6547
|
-
}
|
|
6548
|
-
],
|
|
6549
|
-
alt_names: [
|
|
6550
|
-
{ uid: 54321, type: "aka", category: "strong", firstName: "Ali", lastName: "Al-Hassan" },
|
|
6551
|
-
{ uid: 54322, type: "aka", category: "weak", firstName: "Ali", lastName: "Hasan" },
|
|
6552
|
-
{ uid: 54323, type: "aka", category: "strong", firstName: "Ali Hassan", lastName: "Mohamed" },
|
|
6553
|
-
{ uid: 54324, type: "fka", category: "weak", firstName: "Ali", lastName: "Hassani" }
|
|
6554
|
-
],
|
|
6555
|
-
sanctions_entries: [
|
|
6556
|
-
{
|
|
6557
|
-
program: "SYRIA",
|
|
6558
|
-
effectiveDate: "2015-03-15",
|
|
6559
|
-
authority: "Executive Order 13572",
|
|
6560
|
-
legalBasis: "Involvement in human rights abuses in Syria"
|
|
7170
|
+
id: 24871,
|
|
7171
|
+
checkKey: "originatorBankName",
|
|
7172
|
+
checkValue: "TD bank"
|
|
6561
7173
|
},
|
|
6562
7174
|
{
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
legalBasis: "Specially Designated Global Terrorist"
|
|
6567
|
-
}
|
|
6568
|
-
],
|
|
6569
|
-
associated_entities: [
|
|
6570
|
-
{
|
|
6571
|
-
entityName: "XYZ Trading Company",
|
|
6572
|
-
relationship: "Director",
|
|
6573
|
-
entityType: "Business"
|
|
7175
|
+
id: 24872,
|
|
7176
|
+
checkKey: "beneficiaryName",
|
|
7177
|
+
checkValue: "Jake from Braid LLC"
|
|
6574
7178
|
},
|
|
6575
7179
|
{
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
7180
|
+
id: 24873,
|
|
7181
|
+
checkKey: "beneficiaryBankName",
|
|
7182
|
+
checkValue: "RUssian bank"
|
|
6579
7183
|
}
|
|
6580
7184
|
],
|
|
6581
|
-
screening_metadata: {
|
|
6582
|
-
screenedAt: "2025-09-30T03:00:21Z",
|
|
6583
|
-
screeningEngine: "OFAC Advanced Matcher v3.2",
|
|
6584
|
-
datasetVersion: "2025-09-25",
|
|
6585
|
-
totalRecordsScreened: 1,
|
|
6586
|
-
matchAlgorithm: "Fuzzy + Phonetic",
|
|
6587
|
-
confidenceThreshold: 0.85
|
|
6588
|
-
}
|
|
7185
|
+
rawResults: `{"SDNs":[{"entityID":"51656","sdnName":"RUSSIAN UNIVERSAL BANK","sdnType":"","program":["RUSSIA-EO14024"],"title":"","callSign":"","vesselType":"","tonnage":"","grossRegisteredTonnage":"","vesselFlag":"","vesselOwner":"","remarks":"SWIFT/BIC RUNIRUMM; Website www.rubank.ru; Secondary sanctions risk: See Section 11 of Executive Order 14024.; Target Type Financial Institution; Tax ID No. 7718120593 (Russia); Legal Entity Number 253400YYHA5GJQB46R62; Registration Number 1027739671288 (Russia).","match":0.9325,"matchedName":"russian universal bank"},{"entityID":"17755","sdnName":"RUSSIAN NATIONAL COMMERCIAL BANK","sdnType":"","program":["UKRAINE-EO13685"],"title":"","callSign":"","vesselType":"","tonnage":"","grossRegisteredTonnage":"","vesselFlag":"","vesselOwner":"","remarks":"SWIFT/BIC RNCORUMM; Website http://www.rncb.ru; Email Address rncb@rncb.ru; BIK (RU) 044525607; Secondary sanctions risk: Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209; Registration ID 1027700381290 (Russia); Tax ID No. 7701105460 (Russia); Government Gazette Number 09610705 (Russia); a.k.a. 'RNCB'.","match":0.906896551724138,"matchedName":"russian national commercial bank"}],"altNames":[{"entityID":"51760","alternateID":"81078","alternateType":"aka","alternateName":"RUSSITA BANK","alternateRemarks":"","match":0.9636363636363636,"matchedName":"russita bank"},{"entityID":"18268","alternateID":"28201","alternateType":"aka","alternateName":"RUSSIAN EXPORT-IMPORT BANK","alternateRemarks":"","match":0.9217391304347826,"matchedName":"russian export import bank"},{"entityID":"16681","alternateID":"25333","alternateType":"fka","alternateName":"AKTSIONERNY BANK RUSSIAN FEDERATION","alternateRemarks":"","match":0.9015625,"matchedName":"aktsionerny bank russian federation"}],"sectoralSanctions":[{"Addresses":["3, Gagarinsky Pereulok, Moscow, 119034, RU","3 Gagarinsky per., Moscow, 119034, RU"],"AlternateNames":["Russian Agricultural Bank","Russian Agricultural Bank Open Joint Stock Company","Rosselkhozbank","Russian Agricultural Bank OJSC","RusAg"],"EntityID":"17014","IDsOnRecord":["Registration Number, 1027700342890, RU","Government Gazette Number, 52750822, RU","Website, http://www.rshb.ru","SWIFT/BIC, RUAGRUMM","Executive Order 13662 Directive Determination -, Subject to Directive 1","Executive Order 14024 Directive Information -, For more information on directives, please visit the following link: https://home.treasury.gov/policy-issues/financial-sanctions/sanctions-programs-and-country-information/russian-harmful-foreign-activities-sanctions#directives","Executive Order 14024 Directive Information, Subject to Directive 3 - All transactions in, provision of financing for, and other dealings in new debt of longer than 14 days maturity or new equity where such new debt or new equity is issued on or after the 'Effective Date (EO 14024 Directive)' associated with this name are prohibited.","Listing Date (EO 14024 Directive 3):, 2022-02-24","Effective Date (EO 14024 Directive 3):, 2022-03-26","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209"],"Name":"Joint Stock Company Russian Agricultural Bank","Programs":["UKRAINE-EO13662","RUSSIA-EO14024"],"Remarks":["For more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","SourceListURL":"https://sanctionslist.ofac.treas.gov/Home/ConsolidatedList","Type":"Entity","match":0.9217391304347826,"matchedName":"russian agricultural bank"},{"Addresses":["12 Krasnopresnenskaya Embankments, Moscow, 123610, RU"],"AlternateNames":["ROSEKSIMBANK, ZAO","RUSSIAN EXPORT-IMPORT BANK","GOSUDARSTVENNY SPETSIALIZIROVANNY ROSSISKI EKSPORTNO-IMPORTNY BANK (ZAKRYTOE AKTSIONERNOE OBSHCHESTVO)","STATE SPECIALIZED RUSSIAN EXPORT-IMPORT BANK JOINT-STOCK COMPANY","Eximbank of Russia ZAO","Eximbank of Russia","AO Roseksimbank"],"EntityID":"18268","IDsOnRecord":["Registration Number, 1027739109133, RU","Tax ID No., 7704001959, RU","Legal Entity Number, 253400HA6URWT39X2982","SWIFT/BIC, EXIRRUMM","Website, eximbank.ru","Executive Order 13662 Directive Determination -, Subject to Directive 1","Organization Established Date, 1994-05-24","Target Type, Financial Institution","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209","Secondary sanctions risk:, See Section 11 of Executive Order 14024."],"Name":"EXIMBANK OF RUSSIA JSC","Programs":["UKRAINE-EO13662","RUSSIA-EO14024"],"Remarks":["All offices worldwide","for more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","SourceListURL":"https://sanctionslist.ofac.treas.gov/Home/ConsolidatedList","Type":"Entity","match":0.9217391304347826,"matchedName":"russian export import bank"},{"Addresses":["65/1 Suschevsky Val, Moscow, 129594, RU","65 Sushchevskiy val, Moscow, 129594, RU"],"AlternateNames":["RUSSIAN REGIONAL DEVELOPMENT BANK","VBRR"],"EntityID":"18298","IDsOnRecord":["Registration ID, 3287, RU","Website, www.vbrr.ru","Executive Order 13662 Directive Determination -, Subject to Directive 2","Executive Order 13662 Directive Determination -, Subject to Directive 4","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209"],"Name":"OJSC RUSSIAN REGIONAL DEVELOPMENT BANK","Programs":["UKRAINE-EO13662"],"Remarks":["For more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","SourceListURL":"https://sanctionslist.ofac.treas.gov/Home/ConsolidatedList","Type":"Entity","match":0.905,"matchedName":"russian regional development bank"}],"nonSDNMenuBasedSanctionsList":[{"Addresses":["Neglinnaya St 12, Moscow, 107016, RU","Moscow, RU"],"AlternateNames":["Bank Rossi, Federal State Budgetary Institution","Bank of Russia","Bank of Russia, Central Bank","Tsentralny Bank Rossiskoi Federatsii","Central Bank of Russia"],"EntityID":"31695","EntityNumber":"31695","IDs":["Registration Number, 1037700013020, RU","Government Gazette Number, 00032253, RU","Tax ID No., 7702235133, RU","SWIFT/BIC, CBRFRUMM","Website, www.cbr.ru","Organization Established Date, 1990-07-13","Organization Type:, Central banking","Executive Order 14024 Directive Information -, For more information on directives, please visit the following link: https://home.treasury.gov/policy-issues/financial-sanctions/sanctions-programs-and-country-information/russian-harmful-foreign-activities-sanctions#directives","Executive Order 14024 Directive Information, Subject to Directive 1a - As of the effective date, participation in the secondary market for ruble or non-ruble denominated bonds issued on or after the effective date by the Central Bank of the Russian Federation, the National Wealth Fund of the Russian Federation, or the Ministry of Finance of the Russian Federation is prohibited.","Target Type, Government Entity","Listing Date (EO 14024 Directive 1a):, 2022-02-22","Effective Date (EO 14024 Directive 1a):, 2022-03-01","Executive Order 14024 Directive Information, Subject to Directive 4 - any transaction involving the Central Bank of the Russian Federation, the National Wealth Fund of the Russian Federation, or the Ministry of Finance of the Russian Federation, including any transfer of assets to such entities or any foreign exchange transaction for or on behalf of such entities is prohibited."],"Name":"Central Bank of the Russian Federation","Programs":["RUSSIA-EO14024"],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","Type":"Entity","match":0.9326268221574344,"matchedName":"bank of russia"},{"Addresses":["3, Gagarinsky Pereulok, Moscow, 119034, RU","3 Gagarinsky per., Moscow, 119034, RU"],"AlternateNames":["Russian Agricultural Bank","Russian Agricultural Bank Open Joint Stock Company","Rosselkhozbank","Russian Agricultural Bank OJSC","RusAg"],"EntityID":"17014","EntityNumber":"17014","IDs":["Registration Number, 1027700342890, RU","Government Gazette Number, 52750822, RU","Website, http://www.rshb.ru","SWIFT/BIC, RUAGRUMM","Executive Order 13662 Directive Determination -, Subject to Directive 1","Executive Order 14024 Directive Information -, For more information on directives, please visit the following link: https://home.treasury.gov/policy-issues/financial-sanctions/sanctions-programs-and-country-information/russian-harmful-foreign-activities-sanctions#directives","Executive Order 14024 Directive Information, Subject to Directive 3 - All transactions in, provision of financing for, and other dealings in new debt of longer than 14 days maturity or new equity where such new debt or new equity is issued on or after the 'Effective Date (EO 14024 Directive)' associated with this name are prohibited.","Listing Date (EO 14024 Directive 3):, 2022-02-24","Effective Date (EO 14024 Directive 3):, 2022-03-26","Secondary sanctions risk:, Ukraine-/Russia-Related Sanctions Regulations, 31 CFR 589.201 and/or 589.209"],"Name":"Joint Stock Company Russian Agricultural Bank","Programs":["UKRAINE-EO13662","RUSSIA-EO14024"],"Remarks":["For more information on directives, please visit the following link: http://www.treasury.gov/resource-center/sanctions/Programs/Pages/ukraine.aspx#directives."],"SourceInfoURL":"https://ofac.treasury.gov/other-ofac-sanctions-lists","Type":"Entity","match":0.9217391304347826,"matchedName":"russian agricultural bank"}],"ukConsolidatedSanctionsList":[{"Addresses":["Rastrelli Square, 2A, Saint-Petersburg"],"GroupID":14177,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["22/02/2022"],"Names":["BANK OF RUSSIA","BANK ROSSIYA","RUSSIA BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS0232. Financial sanctions imposed in addition to an asset freeze: Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 21/03/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):Bank \\"Rossiya\\" is a Russian bank privately owned by elite Russian billionaires with direct links to Putin. Bank \\"Rossiya\\" also has important stakes in the National Media Group, which controls television stations which actively support the Russian Government's policies of destabilisation in Ukraine. Since the annexation of Crimea, Bank \\"Rossiya\\" has opened branches across Crimea and Sevastopol, and provided travel cards for the public to travel across the peninsula thereby supporting the integration of Crimea and Sevastopol into the Russian Federation through the financial system. Bank \\"Rossiya\\" has also contributed to the provision of insurance and investment throughout Crimea and Sevastopol and services to support military capability and major transport links. Bank \\"Rossiya\\" therefore is or has been involved in providing financial services, or making available funds, economic resources, goods or technology and engaging in, providing support for, or promoting any policy or action that could contribute to destabilising Ukraine or undermining or threatening the territorial integrity, sovereignty or independence of Ukraine. (Website):https://abr.ru/ (Type of entity):Public Joint Stock Company (PJSC) (Business Reg No):License number: 328 INN: 7831000122 OGRN: 1027800000084"],"PostalCodes":["191124"],"SanctionListDates":["22/02/2022"],"match":0.9565403304178814,"matchedName":"russia bank"},{"Addresses":["0 Bld. 2 Presnenskaya Emb. (Moscow City, IQ-quarter Complex), Moscow","3, Gagarinsky Pereulok, Moscow"],"Countries":["Russia"],"GroupID":15016,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["24/03/2022"],"Names":["JSC ROSSELKHOZBANK","RUSAG","RUSSIAN AGRICULTURAL BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS1073. Financial sanctions imposed in addition to an asset freeze: Dealing with transferable securities or money-market instruments. Loans and credit arrangements. Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 21/03/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):RUSSIAN AGRICULTURAL BANK is a Russian bank. RUSSIAN AGRICULTURAL BANK is or has been involved in obtaining a benefit from or supporting the Government of Russia by carrying on business in the financial services sector - a sector of strategic significance to the Government of Russia. (Phone number):(1) 7 (495) 777-11-00 (2) 7 (495) 787-7-787 (3) 8 (800) 100-0-100 (Website):(1) http://www.rshb.ru/en/ (2) https://www.rshb.ru/ (Email address):office@rshb.ru"],"PostalCodes":["123112","119034"],"SanctionListDates":["24/03/2022"],"match":0.9217391304347826,"matchedName":"russian agricultural bank"},{"Addresses":["27 Kalanchevskaya str., Moscow"],"Countries":["Russia"],"GroupID":15017,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["24/03/2022"],"Names":["ALFA-BANK JSC","ALFA-BANK RUSSIA"],"OtherInfos":["(UK Sanctions List Ref):RUS1074. Financial sanctions imposed in addition to an asset freeze: Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 21/03/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):Alfa-Bank JSC is a Russian bank. There are reasonable grounds to suspect that Alfa-Bank JSC is or has been involved in obtaining a benefit from or supporting the Government of Russia by carrying on business in the financial services sector - a sector of strategic significance to the Government of Russia. (Phone number):7 495 755-58-58. 7 495 78-888-78 (Website):https://alfabank.ru/ (Type of entity):Bank, Financial Services Company, JSC"],"PostalCodes":["107078"],"SanctionListDates":["24/03/2022"],"match":0.9155457448285437,"matchedName":"alfa bank russia"},{"Addresses":["Naberezhnaja street, 34, Simferopol, The Autonomous Republic of Crimea and the city of Sevastopol"],"Countries":["Ukraine"],"GroupID":13078,"GroupType":"Entity","LastUpdates":["21/03/2023"],"ListedDates":["31/07/2014"],"Names":["RUSSIAN NATIONAL COMMERCIAL BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS0193. Financial sanctions imposed in addition to an asset freeze: Trust services. Date trust services sanctions imposed: 21/03/2023. (UK Statement of Reasons):After the illegal annexation of Crimea, Russian National Commercial Bank (RNCB) became fully owned by the so-called 'Republic of Crimea'. In January 2016 became a property of Federal Agency for State Property Management also known as Rosimushchestvo. It has become the dominant player in the market, while it had no presence in Crimea before the annexation. By buying or taking over from branches of retreating banks operating in Crimea, RNBC supported materially and financially the actions of the Russian government to integrate Crimea into the Russian Federation, thus undermining Ukraine's territorial integrity. (Website):http://www.rncb.ru"],"PostalCodes":["295000"],"SanctionListDates":["31/12/2020"],"match":0.906896551724138,"matchedName":"russian national commercial bank"},{"Addresses":["65 Sushchevskiy val, Moscow"],"Countries":["Russia"],"GroupID":15918,"GroupType":"Entity","LastUpdates":["15/12/2023"],"ListedDates":["19/05/2023"],"Names":["RUSSIAN REGIONAL DEVELOPMENT BANK"],"OtherInfos":["(UK Sanctions List Ref):RUS1860. Financial sanctions imposed in addition to an asset freeze: Correspondent banking relationships etc. Trust services. Date trust services sanctions imposed: 18/05/2023. The prohibition on correspondent banking relationships etc. measure was imposed on 15/12/2023. (UK Statement of Reasons):RUSSIAN REGIONAL DEVELOPMENT BANK is an involved person under the Russia (EU Exit) (Sanctions) Regulations 2019 because it is or has been involved in obtaining a benefit from or supporting the Government of Russia by carrying on business in a sector of strategic significance to the Government of Russia, namely the Russian financial services sector."],"PostalCodes":["129594"],"SanctionListDates":["18/05/2023"],"match":0.905,"matchedName":"russian regional development bank"}],"refreshedAt":"2025-10-11T00:54:13.808076626Z"}`
|
|
6589
7186
|
}
|
|
6590
7187
|
},
|
|
6591
7188
|
{
|
|
@@ -6685,6 +7282,11 @@ var useAlertDetail = (id) => {
|
|
|
6685
7282
|
setAssignee(newAssignee);
|
|
6686
7283
|
console.log("Assignee updated to:", newAssignee);
|
|
6687
7284
|
};
|
|
7285
|
+
const handleResolveAlert = async (data) => {
|
|
7286
|
+
console.log("Resolving alert with data:", data);
|
|
7287
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
7288
|
+
console.log("Alert resolved successfully");
|
|
7289
|
+
};
|
|
6688
7290
|
return {
|
|
6689
7291
|
alert,
|
|
6690
7292
|
isLoading: false,
|
|
@@ -6692,18 +7294,21 @@ var useAlertDetail = (id) => {
|
|
|
6692
7294
|
rfiStatus,
|
|
6693
7295
|
assignee,
|
|
6694
7296
|
handleRfiStatusChange,
|
|
6695
|
-
handleAssigneeChange
|
|
7297
|
+
handleAssigneeChange,
|
|
7298
|
+
handleResolveAlert
|
|
6696
7299
|
};
|
|
6697
7300
|
};
|
|
6698
7301
|
var AlertDetail = () => {
|
|
6699
7302
|
const { id } = useParams();
|
|
6700
7303
|
const navigate = useNavigate();
|
|
7304
|
+
const [resolveDialogOpen, setResolveDialogOpen] = useState(false);
|
|
6701
7305
|
const {
|
|
6702
7306
|
alert,
|
|
6703
7307
|
rfiStatus,
|
|
6704
7308
|
assignee,
|
|
6705
7309
|
handleRfiStatusChange,
|
|
6706
|
-
handleAssigneeChange
|
|
7310
|
+
handleAssigneeChange,
|
|
7311
|
+
handleResolveAlert
|
|
6707
7312
|
} = useAlertDetail(id);
|
|
6708
7313
|
if (!alert) {
|
|
6709
7314
|
return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
@@ -6716,39 +7321,46 @@ var AlertDetail = () => {
|
|
|
6716
7321
|
/* @__PURE__ */ jsx(Button, { onClick: () => navigate("/alerts"), children: "Back to Alerts" })
|
|
6717
7322
|
] }) });
|
|
6718
7323
|
}
|
|
6719
|
-
return /* @__PURE__ */
|
|
7324
|
+
return /* @__PURE__ */ jsxs(
|
|
6720
7325
|
PageLayout,
|
|
6721
7326
|
{
|
|
6722
|
-
title:
|
|
6723
|
-
|
|
7327
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7328
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
7329
|
+
"Alert #",
|
|
7330
|
+
alert.id
|
|
7331
|
+
] }),
|
|
7332
|
+
/* @__PURE__ */ jsx(Badge, { variant: getTypeBadgeVariant(alert.type), children: alert.type })
|
|
7333
|
+
] }),
|
|
6724
7334
|
maxWidth: "full",
|
|
6725
|
-
|
|
7335
|
+
headerContent: /* @__PURE__ */ jsx(
|
|
7336
|
+
AlertHeaderControls,
|
|
6726
7337
|
{
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
},
|
|
7338
|
+
status: alert.status,
|
|
7339
|
+
assignee,
|
|
7340
|
+
rfiStatus,
|
|
7341
|
+
onAssigneeChange: handleAssigneeChange,
|
|
7342
|
+
onRfiStatusChange: handleRfiStatusChange
|
|
7343
|
+
}
|
|
7344
|
+
),
|
|
7345
|
+
actions: [
|
|
6736
7346
|
{
|
|
6737
|
-
label: "
|
|
7347
|
+
label: "Resolve Alert",
|
|
6738
7348
|
variant: "default",
|
|
6739
|
-
onClick: () =>
|
|
7349
|
+
onClick: () => setResolveDialogOpen(true)
|
|
6740
7350
|
}
|
|
6741
7351
|
],
|
|
6742
|
-
children:
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
7352
|
+
children: [
|
|
7353
|
+
/* @__PURE__ */ jsx(AlertDetailRouter, { alert }),
|
|
7354
|
+
/* @__PURE__ */ jsx(
|
|
7355
|
+
ResolveAlertDialog,
|
|
7356
|
+
{
|
|
7357
|
+
alertId: alert.id,
|
|
7358
|
+
open: resolveDialogOpen,
|
|
7359
|
+
onOpenChange: setResolveDialogOpen,
|
|
7360
|
+
onResolve: handleResolveAlert
|
|
7361
|
+
}
|
|
7362
|
+
)
|
|
7363
|
+
]
|
|
6752
7364
|
}
|
|
6753
7365
|
);
|
|
6754
7366
|
};
|
|
@@ -7173,7 +7785,7 @@ var Businesses = () => {
|
|
|
7173
7785
|
const handleRowClick = (business) => {
|
|
7174
7786
|
navigate(`/business/${business.id}`);
|
|
7175
7787
|
};
|
|
7176
|
-
const
|
|
7788
|
+
const columns2 = [
|
|
7177
7789
|
{
|
|
7178
7790
|
key: "id",
|
|
7179
7791
|
title: "Business ID",
|
|
@@ -7350,7 +7962,7 @@ var Businesses = () => {
|
|
|
7350
7962
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 h-full max-w-none flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 mt-4 overflow-auto", children: /* @__PURE__ */ jsx(
|
|
7351
7963
|
DataTable,
|
|
7352
7964
|
{
|
|
7353
|
-
columns,
|
|
7965
|
+
columns: columns2,
|
|
7354
7966
|
data: sortedBusinesses,
|
|
7355
7967
|
sortBy,
|
|
7356
7968
|
sortDirection,
|
|
@@ -7434,6 +8046,9 @@ var businessCounterparties = [
|
|
|
7434
8046
|
}
|
|
7435
8047
|
];
|
|
7436
8048
|
var Business = () => {
|
|
8049
|
+
const { id } = useParams();
|
|
8050
|
+
const business = mockBusinessesList.find((b) => b.id === id);
|
|
8051
|
+
const [currentStatus, setCurrentStatus] = useState(business?.status || "active");
|
|
7437
8052
|
const accountColumns = [
|
|
7438
8053
|
{
|
|
7439
8054
|
key: "number",
|
|
@@ -7457,76 +8072,103 @@ var Business = () => {
|
|
|
7457
8072
|
render: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value })
|
|
7458
8073
|
}
|
|
7459
8074
|
];
|
|
7460
|
-
|
|
7461
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */
|
|
7462
|
-
|
|
7463
|
-
/* @__PURE__ */
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
),
|
|
7472
|
-
/* @__PURE__ */ jsx(
|
|
7473
|
-
TabsTrigger,
|
|
7474
|
-
{
|
|
7475
|
-
value: "kyc",
|
|
7476
|
-
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
7477
|
-
children: "KYC"
|
|
7478
|
-
}
|
|
7479
|
-
),
|
|
8075
|
+
if (!business) {
|
|
8076
|
+
return /* @__PURE__ */ jsx("div", { className: "container mx-auto px-4 py-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
8077
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-2", children: "Business Not Found" }),
|
|
8078
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "The business could not be found." })
|
|
8079
|
+
] }) });
|
|
8080
|
+
}
|
|
8081
|
+
return /* @__PURE__ */ jsx(
|
|
8082
|
+
PageLayout,
|
|
8083
|
+
{
|
|
8084
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8085
|
+
/* @__PURE__ */ jsx("span", { children: business.businessName }),
|
|
7480
8086
|
/* @__PURE__ */ jsx(
|
|
7481
|
-
|
|
8087
|
+
EditableInfoField,
|
|
7482
8088
|
{
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
8089
|
+
label: "",
|
|
8090
|
+
value: currentStatus,
|
|
8091
|
+
options: [
|
|
8092
|
+
{ value: "active", label: "Active" },
|
|
8093
|
+
{ value: "inactive", label: "Inactive" },
|
|
8094
|
+
{ value: "suspended", label: "Suspended" }
|
|
8095
|
+
],
|
|
8096
|
+
onChange: (newStatus) => setCurrentStatus(newStatus),
|
|
8097
|
+
renderValue: (value) => /* @__PURE__ */ jsx(StatusBadge, { status: value.toUpperCase() }),
|
|
8098
|
+
className: "inline-block"
|
|
7486
8099
|
}
|
|
7487
8100
|
)
|
|
7488
8101
|
] }),
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
8102
|
+
maxWidth: "full",
|
|
8103
|
+
children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "profile", className: "space-y-6", children: [
|
|
8104
|
+
/* @__PURE__ */ jsxs(TabsList, { className: "inline-flex gap-8 h-auto bg-transparent border-b border-border w-full p-0 rounded-none justify-start", children: [
|
|
8105
|
+
/* @__PURE__ */ jsx(
|
|
8106
|
+
TabsTrigger,
|
|
8107
|
+
{
|
|
8108
|
+
value: "profile",
|
|
8109
|
+
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
8110
|
+
children: "Profile"
|
|
8111
|
+
}
|
|
8112
|
+
),
|
|
8113
|
+
/* @__PURE__ */ jsx(
|
|
8114
|
+
TabsTrigger,
|
|
8115
|
+
{
|
|
8116
|
+
value: "kyc",
|
|
8117
|
+
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
8118
|
+
children: "KYC"
|
|
8119
|
+
}
|
|
8120
|
+
),
|
|
8121
|
+
/* @__PURE__ */ jsx(
|
|
8122
|
+
TabsTrigger,
|
|
8123
|
+
{
|
|
8124
|
+
value: "counterparty",
|
|
8125
|
+
className: "rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none pb-3",
|
|
8126
|
+
children: "Counterparty"
|
|
8127
|
+
}
|
|
8128
|
+
)
|
|
7507
8129
|
] }),
|
|
7508
|
-
/* @__PURE__ */ jsx("
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
8130
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "profile", className: "space-y-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
|
|
8131
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
|
|
8132
|
+
/* @__PURE__ */ jsx(BusinessProfileCard, { isEditing: false, onToggleEdit: () => {
|
|
8133
|
+
} }),
|
|
8134
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
8135
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
8136
|
+
/* @__PURE__ */ jsx(CardTitle, { children: "Accounts" }),
|
|
8137
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", children: "+ New Account" })
|
|
8138
|
+
] }),
|
|
8139
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
|
|
8140
|
+
DataTable,
|
|
8141
|
+
{
|
|
8142
|
+
columns: accountColumns,
|
|
8143
|
+
data: businessAccounts,
|
|
8144
|
+
emptyMessage: "No accounts found"
|
|
8145
|
+
}
|
|
8146
|
+
) })
|
|
8147
|
+
] })
|
|
7517
8148
|
] }),
|
|
7518
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
/* @__PURE__ */
|
|
8149
|
+
/* @__PURE__ */ jsx("div", { className: "lg:w-64", children: /* @__PURE__ */ jsx(BusinessStatusCard, { isEditing: false, onToggleEdit: () => {
|
|
8150
|
+
} }) })
|
|
8151
|
+
] }) }),
|
|
8152
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "kyc", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "p-8 text-center text-muted-foreground", children: "KYC content coming soon" }) }),
|
|
8153
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "counterparty", className: "space-y-0", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6", children: businessCounterparties.map((counterparty) => /* @__PURE__ */ jsxs(Card, { children: [
|
|
8154
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
8155
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
8156
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: counterparty.name }),
|
|
8157
|
+
/* @__PURE__ */ jsx(CounterpartyTypeBadge, { type: counterparty.type })
|
|
8158
|
+
] }),
|
|
8159
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mt-2", children: /* @__PURE__ */ jsx(Badge, { variant: counterparty.status === "active" ? "default" : "secondary", children: counterparty.status }) })
|
|
8160
|
+
] }),
|
|
8161
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
|
|
8162
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: counterparty.description }),
|
|
8163
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-sm", children: [
|
|
8164
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Last Transaction" }),
|
|
8165
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: counterparty.lastTransaction })
|
|
8166
|
+
] })
|
|
7525
8167
|
] })
|
|
7526
|
-
] })
|
|
7527
|
-
] }
|
|
7528
|
-
|
|
7529
|
-
|
|
8168
|
+
] }, counterparty.id)) }) })
|
|
8169
|
+
] })
|
|
8170
|
+
}
|
|
8171
|
+
);
|
|
7530
8172
|
};
|
|
7531
8173
|
var BusinessDetail_default = Business;
|
|
7532
8174
|
var CreateBusiness = () => {
|
|
@@ -7937,12 +8579,6 @@ var mockProducts = [
|
|
|
7937
8579
|
{ value: "PROD-003", label: "Money Market Account" },
|
|
7938
8580
|
{ value: "PROD-004", label: "Business Checking" }
|
|
7939
8581
|
];
|
|
7940
|
-
var statementTypes = [
|
|
7941
|
-
{ value: "root", label: "Root" },
|
|
7942
|
-
{ value: "program", label: "Program" },
|
|
7943
|
-
{ value: "product", label: "Product" },
|
|
7944
|
-
{ value: "account", label: "Account" }
|
|
7945
|
-
];
|
|
7946
8582
|
function Statement() {
|
|
7947
8583
|
const [statementType, setStatementType] = useState("");
|
|
7948
8584
|
const [selectedProgram, setSelectedProgram] = useState("");
|
|
@@ -7951,18 +8587,39 @@ function Statement() {
|
|
|
7951
8587
|
const [startDate, setStartDate] = useState();
|
|
7952
8588
|
const [endDate, setEndDate] = useState();
|
|
7953
8589
|
const [statementGenerated, setStatementGenerated] = useState(false);
|
|
8590
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
8591
|
+
const [programs] = useState(mockPrograms);
|
|
8592
|
+
const [products] = useState(mockProducts);
|
|
8593
|
+
const [statementHeader, setStatementHeader] = useState(null);
|
|
8594
|
+
const [statementTransactions, setStatementTransactions] = useState([]);
|
|
7954
8595
|
const handleStatementTypeChange = (value) => {
|
|
7955
8596
|
setStatementType(value);
|
|
7956
8597
|
setSelectedProgram("");
|
|
7957
8598
|
setSelectedProduct("");
|
|
7958
8599
|
setAccountNumber("");
|
|
7959
8600
|
};
|
|
7960
|
-
const handleGenerateStatement = () => {
|
|
8601
|
+
const handleGenerateStatement = async () => {
|
|
7961
8602
|
if (!statementType || !startDate || !endDate) return;
|
|
7962
8603
|
if (statementType === "program" && !selectedProgram) return;
|
|
7963
8604
|
if (statementType === "product" && !selectedProduct) return;
|
|
7964
8605
|
if (statementType === "account" && !accountNumber) return;
|
|
7965
|
-
|
|
8606
|
+
setIsLoading(true);
|
|
8607
|
+
try {
|
|
8608
|
+
console.log("Generating statement with:", {
|
|
8609
|
+
statementType,
|
|
8610
|
+
selectedProgram,
|
|
8611
|
+
selectedProduct,
|
|
8612
|
+
accountNumber,
|
|
8613
|
+
startDate,
|
|
8614
|
+
endDate
|
|
8615
|
+
});
|
|
8616
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
8617
|
+
setStatementHeader(mockStatementHeader);
|
|
8618
|
+
setStatementTransactions(mockStatementTransactions);
|
|
8619
|
+
setStatementGenerated(true);
|
|
8620
|
+
} finally {
|
|
8621
|
+
setIsLoading(false);
|
|
8622
|
+
}
|
|
7966
8623
|
};
|
|
7967
8624
|
const isGenerateDisabled = () => {
|
|
7968
8625
|
if (!statementType || !startDate || !endDate) return true;
|
|
@@ -7971,34 +8628,6 @@ function Statement() {
|
|
|
7971
8628
|
if (statementType === "account" && !accountNumber) return true;
|
|
7972
8629
|
return false;
|
|
7973
8630
|
};
|
|
7974
|
-
const columns = [
|
|
7975
|
-
{
|
|
7976
|
-
key: "transactionType",
|
|
7977
|
-
title: "Transaction Type",
|
|
7978
|
-
sortable: true,
|
|
7979
|
-
align: "left"
|
|
7980
|
-
},
|
|
7981
|
-
{
|
|
7982
|
-
key: "direction",
|
|
7983
|
-
title: "Direction",
|
|
7984
|
-
sortable: true,
|
|
7985
|
-
align: "left",
|
|
7986
|
-
render: (value) => /* @__PURE__ */ jsx(Badge, { variant: value === "CREDIT" ? "success" : "secondary", children: value })
|
|
7987
|
-
},
|
|
7988
|
-
{
|
|
7989
|
-
key: "amount",
|
|
7990
|
-
title: "Amount",
|
|
7991
|
-
sortable: true,
|
|
7992
|
-
align: "right",
|
|
7993
|
-
render: (value) => `$${value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
|
|
7994
|
-
},
|
|
7995
|
-
{
|
|
7996
|
-
key: "count",
|
|
7997
|
-
title: "Count",
|
|
7998
|
-
sortable: true,
|
|
7999
|
-
align: "right"
|
|
8000
|
-
}
|
|
8001
|
-
];
|
|
8002
8631
|
const handleDownloadCSV = () => {
|
|
8003
8632
|
console.log("Downloading CSV...");
|
|
8004
8633
|
};
|
|
@@ -8008,148 +8637,34 @@ function Statement() {
|
|
|
8008
8637
|
const handleEdit = () => {
|
|
8009
8638
|
setStatementGenerated(false);
|
|
8010
8639
|
};
|
|
8011
|
-
return /* @__PURE__ */
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
),
|
|
8040
|
-
statementType === "product" && /* @__PURE__ */ jsx(
|
|
8041
|
-
EnhancedSelect,
|
|
8042
|
-
{
|
|
8043
|
-
label: "Product Name",
|
|
8044
|
-
placeholder: "Select product",
|
|
8045
|
-
options: mockProducts,
|
|
8046
|
-
value: selectedProduct,
|
|
8047
|
-
onValueChange: setSelectedProduct
|
|
8048
|
-
}
|
|
8049
|
-
),
|
|
8050
|
-
statementType === "account" && /* @__PURE__ */ jsx(
|
|
8051
|
-
EnhancedInput,
|
|
8052
|
-
{
|
|
8053
|
-
label: "Account Number",
|
|
8054
|
-
placeholder: "Enter account number",
|
|
8055
|
-
value: accountNumber,
|
|
8056
|
-
onChange: (e) => setAccountNumber(e.target.value)
|
|
8057
|
-
}
|
|
8058
|
-
),
|
|
8059
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
8060
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
|
|
8061
|
-
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
8062
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
8063
|
-
Button,
|
|
8064
|
-
{
|
|
8065
|
-
variant: "outline",
|
|
8066
|
-
className: cn(
|
|
8067
|
-
"justify-start text-left font-normal",
|
|
8068
|
-
!startDate && "text-muted-foreground"
|
|
8069
|
-
),
|
|
8070
|
-
children: [
|
|
8071
|
-
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
8072
|
-
startDate ? format(startDate, "MM/dd/yyyy") : "Select date"
|
|
8073
|
-
]
|
|
8074
|
-
}
|
|
8075
|
-
) }),
|
|
8076
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
|
|
8077
|
-
Calendar,
|
|
8078
|
-
{
|
|
8079
|
-
mode: "single",
|
|
8080
|
-
selected: startDate,
|
|
8081
|
-
onSelect: setStartDate,
|
|
8082
|
-
initialFocus: true
|
|
8083
|
-
}
|
|
8084
|
-
) })
|
|
8085
|
-
] })
|
|
8086
|
-
] }),
|
|
8087
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
8088
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
|
|
8089
|
-
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
8090
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
8091
|
-
Button,
|
|
8092
|
-
{
|
|
8093
|
-
variant: "outline",
|
|
8094
|
-
className: cn(
|
|
8095
|
-
"justify-start text-left font-normal",
|
|
8096
|
-
!endDate && "text-muted-foreground"
|
|
8097
|
-
),
|
|
8098
|
-
children: [
|
|
8099
|
-
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
8100
|
-
endDate ? format(endDate, "MM/dd/yyyy") : "Select date"
|
|
8101
|
-
]
|
|
8102
|
-
}
|
|
8103
|
-
) }),
|
|
8104
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
|
|
8105
|
-
Calendar,
|
|
8106
|
-
{
|
|
8107
|
-
mode: "single",
|
|
8108
|
-
selected: endDate,
|
|
8109
|
-
onSelect: setEndDate,
|
|
8110
|
-
initialFocus: true
|
|
8111
|
-
}
|
|
8112
|
-
) })
|
|
8113
|
-
] })
|
|
8114
|
-
] })
|
|
8115
|
-
] }),
|
|
8116
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
|
|
8117
|
-
Button,
|
|
8118
|
-
{
|
|
8119
|
-
onClick: handleGenerateStatement,
|
|
8120
|
-
disabled: isGenerateDisabled(),
|
|
8121
|
-
children: "Generate Statement"
|
|
8122
|
-
}
|
|
8123
|
-
) })
|
|
8124
|
-
] })
|
|
8125
|
-
] }),
|
|
8126
|
-
statementGenerated && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8127
|
-
/* @__PURE__ */ jsx(StatementHeader, { data: mockStatementHeader, onEdit: handleEdit }),
|
|
8128
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
8129
|
-
/* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
|
|
8130
|
-
/* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Transaction Summary" }),
|
|
8131
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
8132
|
-
/* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: handleDownloadCSV, children: [
|
|
8133
|
-
/* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
|
|
8134
|
-
"Download CSV"
|
|
8135
|
-
] }),
|
|
8136
|
-
/* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: handlePrintPDF, children: [
|
|
8137
|
-
/* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 mr-2" }),
|
|
8138
|
-
"Print PDF"
|
|
8139
|
-
] })
|
|
8140
|
-
] })
|
|
8141
|
-
] }),
|
|
8142
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
|
|
8143
|
-
DataTable,
|
|
8144
|
-
{
|
|
8145
|
-
columns,
|
|
8146
|
-
data: mockStatementTransactions,
|
|
8147
|
-
emptyMessage: "No transactions found"
|
|
8148
|
-
}
|
|
8149
|
-
) })
|
|
8150
|
-
] })
|
|
8151
|
-
] })
|
|
8152
|
-
] });
|
|
8640
|
+
return /* @__PURE__ */ jsx(
|
|
8641
|
+
StatementView,
|
|
8642
|
+
{
|
|
8643
|
+
statementType,
|
|
8644
|
+
selectedProgram,
|
|
8645
|
+
selectedProduct,
|
|
8646
|
+
accountNumber,
|
|
8647
|
+
startDate,
|
|
8648
|
+
endDate,
|
|
8649
|
+
statementGenerated,
|
|
8650
|
+
programs,
|
|
8651
|
+
products,
|
|
8652
|
+
statementHeader,
|
|
8653
|
+
statementTransactions,
|
|
8654
|
+
onStatementTypeChange: handleStatementTypeChange,
|
|
8655
|
+
onProgramChange: setSelectedProgram,
|
|
8656
|
+
onProductChange: setSelectedProduct,
|
|
8657
|
+
onAccountNumberChange: setAccountNumber,
|
|
8658
|
+
onStartDateChange: setStartDate,
|
|
8659
|
+
onEndDateChange: setEndDate,
|
|
8660
|
+
onGenerateStatement: handleGenerateStatement,
|
|
8661
|
+
onEdit: handleEdit,
|
|
8662
|
+
onDownloadCSV: handleDownloadCSV,
|
|
8663
|
+
onPrintPDF: handlePrintPDF,
|
|
8664
|
+
isGenerateDisabled: isGenerateDisabled(),
|
|
8665
|
+
isLoading
|
|
8666
|
+
}
|
|
8667
|
+
);
|
|
8153
8668
|
}
|
|
8154
8669
|
|
|
8155
8670
|
// src/lib/mock-data/transaction-data.ts
|
|
@@ -8158,13 +8673,15 @@ var mockTransactions = [
|
|
|
8158
8673
|
id: "1",
|
|
8159
8674
|
created: "2025-10-01 00:16",
|
|
8160
8675
|
accountNumber: "126713605718",
|
|
8161
|
-
amount:
|
|
8676
|
+
amount: 34539.18,
|
|
8162
8677
|
customer: "Rise Works Inc",
|
|
8163
8678
|
counterparty: "VEDANT JAYESHKUMAR PATI",
|
|
8164
8679
|
description: "4NnuJKyD9a8LUmkm",
|
|
8165
8680
|
transactionType: "Ach Originator Credit",
|
|
8166
8681
|
status: "PENDING",
|
|
8682
|
+
processingStatus: "SENT",
|
|
8167
8683
|
updated: "2025-10-01 00:16",
|
|
8684
|
+
isInbound: true,
|
|
8168
8685
|
achDetails: {
|
|
8169
8686
|
type: "ACH Credit",
|
|
8170
8687
|
originatorName: "Rise Works Inc",
|
|
@@ -8219,7 +8736,9 @@ var mockTransactions = [
|
|
|
8219
8736
|
description: "ACH Fee",
|
|
8220
8737
|
transactionType: "Fee Ach Transaction",
|
|
8221
8738
|
status: "POSTED",
|
|
8222
|
-
|
|
8739
|
+
processingStatus: "CONFIRMED",
|
|
8740
|
+
updated: "2025-10-01 00:09",
|
|
8741
|
+
isInbound: false
|
|
8223
8742
|
},
|
|
8224
8743
|
{
|
|
8225
8744
|
id: "3",
|
|
@@ -8231,7 +8750,9 @@ var mockTransactions = [
|
|
|
8231
8750
|
description: "Invoice Payment #INV-2024-089",
|
|
8232
8751
|
transactionType: "Wire Domestic Credit",
|
|
8233
8752
|
status: "POSTED",
|
|
8753
|
+
processingStatus: "CONFIRMED",
|
|
8234
8754
|
updated: "2025-10-01 00:12",
|
|
8755
|
+
isInbound: false,
|
|
8235
8756
|
wireDetails: {
|
|
8236
8757
|
type: "Domestic Wire",
|
|
8237
8758
|
originatorName: "Tech Solutions LLC",
|
|
@@ -8329,7 +8850,9 @@ var mockTransactions = [
|
|
|
8329
8850
|
description: "Vendor Payment",
|
|
8330
8851
|
transactionType: "Ach Originator Debit",
|
|
8331
8852
|
status: "POSTED",
|
|
8332
|
-
|
|
8853
|
+
processingStatus: "CONFIRMED",
|
|
8854
|
+
updated: "2025-09-30 23:01",
|
|
8855
|
+
isInbound: false
|
|
8333
8856
|
},
|
|
8334
8857
|
{
|
|
8335
8858
|
id: "5",
|
|
@@ -8341,7 +8864,9 @@ var mockTransactions = [
|
|
|
8341
8864
|
description: "Contractor Payment",
|
|
8342
8865
|
transactionType: "Ach Originator Credit",
|
|
8343
8866
|
status: "PENDING",
|
|
8344
|
-
|
|
8867
|
+
processingStatus: "CUSTOMER_REVIEW",
|
|
8868
|
+
updated: "2025-09-30 21:05",
|
|
8869
|
+
isInbound: false
|
|
8345
8870
|
},
|
|
8346
8871
|
{
|
|
8347
8872
|
id: "6",
|
|
@@ -8353,7 +8878,9 @@ var mockTransactions = [
|
|
|
8353
8878
|
description: "Monthly Rent Payment",
|
|
8354
8879
|
transactionType: "Wire Domestic Debit",
|
|
8355
8880
|
status: "POSTED",
|
|
8356
|
-
|
|
8881
|
+
processingStatus: "CONFIRMED",
|
|
8882
|
+
updated: "2025-09-30 20:15",
|
|
8883
|
+
isInbound: false
|
|
8357
8884
|
},
|
|
8358
8885
|
{
|
|
8359
8886
|
id: "7",
|
|
@@ -8365,7 +8892,9 @@ var mockTransactions = [
|
|
|
8365
8892
|
description: "Wire Transfer Fee",
|
|
8366
8893
|
transactionType: "Fee Wire Transaction",
|
|
8367
8894
|
status: "POSTED",
|
|
8368
|
-
|
|
8895
|
+
processingStatus: "CONFIRMED",
|
|
8896
|
+
updated: "2025-09-30 17:22",
|
|
8897
|
+
isInbound: false
|
|
8369
8898
|
},
|
|
8370
8899
|
{
|
|
8371
8900
|
id: "8",
|
|
@@ -8377,7 +8906,9 @@ var mockTransactions = [
|
|
|
8377
8906
|
description: "R&D Funding Transfer",
|
|
8378
8907
|
transactionType: "Ach Originator Credit",
|
|
8379
8908
|
status: "FAILED",
|
|
8380
|
-
|
|
8909
|
+
processingStatus: "MANUAL_REVIEW",
|
|
8910
|
+
updated: "2025-09-30 16:10",
|
|
8911
|
+
isInbound: false
|
|
8381
8912
|
}
|
|
8382
8913
|
];
|
|
8383
8914
|
var mockTransactionTimeline = [
|
|
@@ -8916,7 +9447,10 @@ var newTransactionSchema = z.object({
|
|
|
8916
9447
|
counterpartyName: z.string().min(1, "Counterparty name is required"),
|
|
8917
9448
|
amount: z.string().min(1, "Amount is required"),
|
|
8918
9449
|
currency: z.string().min(1, "Currency is required"),
|
|
8919
|
-
description: z.string().optional()
|
|
9450
|
+
description: z.string().optional(),
|
|
9451
|
+
certifyInformation: z.boolean().refine((val) => val === true, {
|
|
9452
|
+
message: "You must certify the information is correct"
|
|
9453
|
+
})
|
|
8920
9454
|
});
|
|
8921
9455
|
var TRANSACTION_TYPES = [
|
|
8922
9456
|
{ value: "transfer", label: "Transfer", icon: ArrowLeftRight },
|
|
@@ -8972,7 +9506,8 @@ function NewTransaction() {
|
|
|
8972
9506
|
counterpartyName: "",
|
|
8973
9507
|
amount: "",
|
|
8974
9508
|
currency: "USD",
|
|
8975
|
-
description: ""
|
|
9509
|
+
description: "",
|
|
9510
|
+
certifyInformation: false
|
|
8976
9511
|
}
|
|
8977
9512
|
});
|
|
8978
9513
|
const transactionType = form.watch("transactionType");
|
|
@@ -9098,7 +9633,6 @@ function NewTransaction() {
|
|
|
9098
9633
|
PageLayout,
|
|
9099
9634
|
{
|
|
9100
9635
|
title: "New Transaction",
|
|
9101
|
-
description: "Complete the form below to initiate a new transaction",
|
|
9102
9636
|
children: /* @__PURE__ */ jsxs("div", { className: "max-w-4xl mx-auto space-y-6", children: [
|
|
9103
9637
|
/* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsxs("form", { onSubmit: (e) => e.preventDefault(), children: [
|
|
9104
9638
|
!accountLookedUp ? /* @__PURE__ */ jsx(
|
|
@@ -9106,21 +9640,20 @@ function NewTransaction() {
|
|
|
9106
9640
|
{
|
|
9107
9641
|
title: "Account Lookup",
|
|
9108
9642
|
variant: "default",
|
|
9109
|
-
children: /* @__PURE__ */ jsxs("div", { className: "
|
|
9110
|
-
/* @__PURE__ */ jsx(
|
|
9643
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3 items-start w-full", children: [
|
|
9644
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
9111
9645
|
FormInput,
|
|
9112
9646
|
{
|
|
9113
9647
|
name: "accountNumber",
|
|
9114
|
-
label: "Account Number",
|
|
9115
9648
|
placeholder: "Enter account number"
|
|
9116
9649
|
}
|
|
9117
|
-
),
|
|
9650
|
+
) }),
|
|
9118
9651
|
/* @__PURE__ */ jsxs(
|
|
9119
9652
|
Button,
|
|
9120
9653
|
{
|
|
9121
9654
|
onClick: handleAccountLookup,
|
|
9122
|
-
className: "w-full sm:w-auto",
|
|
9123
9655
|
disabled: !accountNumber,
|
|
9656
|
+
className: "shrink-0 mt-0 w-48",
|
|
9124
9657
|
children: [
|
|
9125
9658
|
/* @__PURE__ */ jsx(Search, { className: "h-4 w-4 mr-2" }),
|
|
9126
9659
|
"Lookup Account"
|
|
@@ -9197,22 +9730,21 @@ function NewTransaction() {
|
|
|
9197
9730
|
title: "Counterparty Lookup",
|
|
9198
9731
|
variant: "default",
|
|
9199
9732
|
className: cn(!transactionType && "opacity-50 pointer-events-none"),
|
|
9200
|
-
children: /* @__PURE__ */ jsxs("div", { className: "
|
|
9201
|
-
/* @__PURE__ */ jsx(
|
|
9733
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3 items-start w-full", children: [
|
|
9734
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
9202
9735
|
FormInput,
|
|
9203
9736
|
{
|
|
9204
9737
|
name: "counterpartyName",
|
|
9205
|
-
label: "Counterparty Name",
|
|
9206
9738
|
placeholder: "Enter counterparty name",
|
|
9207
9739
|
disabled: !transactionType
|
|
9208
9740
|
}
|
|
9209
|
-
),
|
|
9741
|
+
) }),
|
|
9210
9742
|
/* @__PURE__ */ jsxs(
|
|
9211
9743
|
Button,
|
|
9212
9744
|
{
|
|
9213
9745
|
onClick: handleCounterpartyLookup,
|
|
9214
|
-
className: "w-full sm:w-auto",
|
|
9215
9746
|
disabled: !transactionType || !counterpartyName,
|
|
9747
|
+
className: "shrink-0 mt-0 w-48",
|
|
9216
9748
|
children: [
|
|
9217
9749
|
/* @__PURE__ */ jsx(Search, { className: "h-4 w-4 mr-2" }),
|
|
9218
9750
|
"Lookup Counterparty"
|
|
@@ -9271,7 +9803,8 @@ function NewTransaction() {
|
|
|
9271
9803
|
name: "currency",
|
|
9272
9804
|
label: "Currency",
|
|
9273
9805
|
options: CURRENCY_OPTIONS,
|
|
9274
|
-
disabled: !counterpartyLookedUp
|
|
9806
|
+
disabled: !counterpartyLookedUp,
|
|
9807
|
+
className: "w-48"
|
|
9275
9808
|
}
|
|
9276
9809
|
)
|
|
9277
9810
|
] }),
|
|
@@ -9294,6 +9827,34 @@ function NewTransaction() {
|
|
|
9294
9827
|
variant: "default",
|
|
9295
9828
|
children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
9296
9829
|
/* @__PURE__ */ jsx(DataGrid, { data: reviewData, columns: 2 }),
|
|
9830
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted/30 rounded-lg p-4 border border-border/50", children: /* @__PURE__ */ jsx(
|
|
9831
|
+
Controller,
|
|
9832
|
+
{
|
|
9833
|
+
name: "certifyInformation",
|
|
9834
|
+
control: form.control,
|
|
9835
|
+
render: ({ field }) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9836
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
9837
|
+
/* @__PURE__ */ jsx(
|
|
9838
|
+
Checkbox,
|
|
9839
|
+
{
|
|
9840
|
+
id: "certifyInformation",
|
|
9841
|
+
checked: field.value,
|
|
9842
|
+
onCheckedChange: field.onChange
|
|
9843
|
+
}
|
|
9844
|
+
),
|
|
9845
|
+
/* @__PURE__ */ jsx(
|
|
9846
|
+
"label",
|
|
9847
|
+
{
|
|
9848
|
+
htmlFor: "certifyInformation",
|
|
9849
|
+
className: "text-sm font-medium leading-relaxed cursor-pointer select-none",
|
|
9850
|
+
children: "I certify that all information entered is correct and accurate to the best of my knowledge"
|
|
9851
|
+
}
|
|
9852
|
+
)
|
|
9853
|
+
] }),
|
|
9854
|
+
form.formState.errors.certifyInformation && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive ml-7", children: form.formState.errors.certifyInformation.message })
|
|
9855
|
+
] })
|
|
9856
|
+
}
|
|
9857
|
+
) }),
|
|
9297
9858
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-end pt-4 border-t border-border", children: [
|
|
9298
9859
|
/* @__PURE__ */ jsx(
|
|
9299
9860
|
Button,
|
|
@@ -9311,7 +9872,7 @@ function NewTransaction() {
|
|
|
9311
9872
|
type: "button",
|
|
9312
9873
|
onClick: handleSubmit,
|
|
9313
9874
|
className: "w-48",
|
|
9314
|
-
disabled: !transactionType || !accountNumber || !counterpartyName || !amount,
|
|
9875
|
+
disabled: !transactionType || !accountNumber || !counterpartyName || !amount || !form.watch("certifyInformation"),
|
|
9315
9876
|
children: [
|
|
9316
9877
|
/* @__PURE__ */ jsx(CheckCircle2, { className: "h-4 w-4 mr-2" }),
|
|
9317
9878
|
"Submit Transaction"
|
|
@@ -9421,6 +9982,24 @@ var TransactionDetail = () => {
|
|
|
9421
9982
|
return "outline";
|
|
9422
9983
|
}
|
|
9423
9984
|
};
|
|
9985
|
+
const getProcessingStatusVariant = (status) => {
|
|
9986
|
+
switch (status) {
|
|
9987
|
+
case "CONFIRMED":
|
|
9988
|
+
return "success";
|
|
9989
|
+
case "SENT":
|
|
9990
|
+
return "success";
|
|
9991
|
+
case "SUBMITTED":
|
|
9992
|
+
return "warning";
|
|
9993
|
+
case "CUSTOMER_REVIEW":
|
|
9994
|
+
return "warning";
|
|
9995
|
+
case "MANUAL_REVIEW":
|
|
9996
|
+
return "warning";
|
|
9997
|
+
case "INITIATED":
|
|
9998
|
+
return "outline";
|
|
9999
|
+
default:
|
|
10000
|
+
return "outline";
|
|
10001
|
+
}
|
|
10002
|
+
};
|
|
9424
10003
|
const formatCurrency = (value) => {
|
|
9425
10004
|
return new Intl.NumberFormat("en-US", {
|
|
9426
10005
|
style: "currency",
|
|
@@ -9433,7 +10012,21 @@ var TransactionDetail = () => {
|
|
|
9433
10012
|
return /* @__PURE__ */ jsx(
|
|
9434
10013
|
PageLayout,
|
|
9435
10014
|
{
|
|
9436
|
-
title:
|
|
10015
|
+
title: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
10016
|
+
/* @__PURE__ */ jsx("span", { className: cn(
|
|
10017
|
+
"font-semibold",
|
|
10018
|
+
transaction.amount < 0 ? "text-destructive" : "text-success"
|
|
10019
|
+
), children: formatCurrency(transaction.amount) }),
|
|
10020
|
+
/* @__PURE__ */ jsx(
|
|
10021
|
+
TransactionTypeBadge,
|
|
10022
|
+
{
|
|
10023
|
+
transactionType: transaction.transactionType,
|
|
10024
|
+
isInbound: transaction.isInbound
|
|
10025
|
+
}
|
|
10026
|
+
),
|
|
10027
|
+
/* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
|
|
10028
|
+
/* @__PURE__ */ jsx(Badge, { variant: getProcessingStatusVariant(transaction.processingStatus), children: transaction.processingStatus })
|
|
10029
|
+
] }),
|
|
9437
10030
|
maxWidth: "full",
|
|
9438
10031
|
actions: [
|
|
9439
10032
|
{
|
|
@@ -9450,33 +10043,6 @@ var TransactionDetail = () => {
|
|
|
9450
10043
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row items-start gap-6", children: [
|
|
9451
10044
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6", children: [
|
|
9452
10045
|
/* @__PURE__ */ jsx(FormCard, { title: "Details", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4", children: [
|
|
9453
|
-
/* @__PURE__ */ jsx(
|
|
9454
|
-
InfoField,
|
|
9455
|
-
{
|
|
9456
|
-
label: "Transaction Type",
|
|
9457
|
-
value: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: transaction.transactionType }),
|
|
9458
|
-
layout: "horizontal"
|
|
9459
|
-
}
|
|
9460
|
-
),
|
|
9461
|
-
/* @__PURE__ */ jsx(
|
|
9462
|
-
InfoField,
|
|
9463
|
-
{
|
|
9464
|
-
label: "Status",
|
|
9465
|
-
value: /* @__PURE__ */ jsx(Badge, { variant: getStatusVariant(transaction.status), children: transaction.status }),
|
|
9466
|
-
layout: "horizontal"
|
|
9467
|
-
}
|
|
9468
|
-
),
|
|
9469
|
-
/* @__PURE__ */ jsx(
|
|
9470
|
-
InfoField,
|
|
9471
|
-
{
|
|
9472
|
-
label: "Amount",
|
|
9473
|
-
value: /* @__PURE__ */ jsx("span", { className: cn(
|
|
9474
|
-
"font-semibold",
|
|
9475
|
-
transaction.amount < 0 ? "text-destructive" : "text-success"
|
|
9476
|
-
), children: formatCurrency(transaction.amount) }),
|
|
9477
|
-
layout: "horizontal"
|
|
9478
|
-
}
|
|
9479
|
-
),
|
|
9480
10046
|
/* @__PURE__ */ jsx(
|
|
9481
10047
|
InfoField,
|
|
9482
10048
|
{
|
|
@@ -9488,7 +10054,7 @@ var TransactionDetail = () => {
|
|
|
9488
10054
|
/* @__PURE__ */ jsx(
|
|
9489
10055
|
InfoField,
|
|
9490
10056
|
{
|
|
9491
|
-
label: "Customer
|
|
10057
|
+
label: "Customer",
|
|
9492
10058
|
value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.customer }),
|
|
9493
10059
|
layout: "horizontal"
|
|
9494
10060
|
}
|
|
@@ -9497,21 +10063,18 @@ var TransactionDetail = () => {
|
|
|
9497
10063
|
/* @__PURE__ */ jsx(
|
|
9498
10064
|
InfoField,
|
|
9499
10065
|
{
|
|
9500
|
-
label: "
|
|
9501
|
-
value:
|
|
10066
|
+
label: "Counterparty",
|
|
10067
|
+
value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: transaction.counterparty }),
|
|
9502
10068
|
layout: "horizontal"
|
|
9503
10069
|
}
|
|
9504
10070
|
),
|
|
9505
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Counterparty Name", value: transaction.counterparty, layout: "horizontal" }),
|
|
9506
10071
|
/* @__PURE__ */ jsx(InfoField, { label: "Post Date", value: transaction.created.split(" ")[0], layout: "horizontal" }),
|
|
9507
10072
|
/* @__PURE__ */ jsx(InfoField, { label: "OFAC ID", value: /* @__PURE__ */ jsx(Button, { variant: "link", className: "h-auto p-0 text-sm", children: "18323208" }), layout: "horizontal" }),
|
|
9508
10073
|
/* @__PURE__ */ jsx(InfoField, { label: "Original Filename", value: "-", layout: "horizontal" }),
|
|
9509
10074
|
/* @__PURE__ */ jsx(InfoField, { label: "Loaded From File", value: "iso21130757012764355B7.xml.126534273Q299", layout: "horizontal" }),
|
|
9510
10075
|
/* @__PURE__ */ jsx(InfoField, { label: "Payment ID", value: transaction.id, layout: "horizontal" }),
|
|
9511
10076
|
/* @__PURE__ */ jsx(InfoField, { label: "Linked Payment ID", value: "-", layout: "horizontal" }),
|
|
9512
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Is Inbound", value: "True", layout: "horizontal" }),
|
|
9513
10077
|
/* @__PURE__ */ jsx(InfoField, { label: "Pending until Date", value: "-", layout: "horizontal" }),
|
|
9514
|
-
/* @__PURE__ */ jsx(InfoField, { label: "Processing Status", value: "Sent", layout: "horizontal" }),
|
|
9515
10078
|
/* @__PURE__ */ jsx(InfoField, { label: "Further Credit To", value: "-", layout: "horizontal" }),
|
|
9516
10079
|
/* @__PURE__ */ jsx(InfoField, { label: "Balance Available Date", value: "-", layout: "horizontal" }),
|
|
9517
10080
|
/* @__PURE__ */ jsx(InfoField, { label: "Requester Username", value: "-", layout: "horizontal" }),
|
|
@@ -9561,6 +10124,6 @@ function UIKit() {
|
|
|
9561
10124
|
] }) }) });
|
|
9562
10125
|
}
|
|
9563
10126
|
|
|
9564
|
-
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail,
|
|
10127
|
+
export { ACHBankCard, ACHBasicInfoCard, ACHDetailsSection, ACHTransferSection, AccountCard, AddressForm, AlertDetail_default as AlertDetail, AlertDetailRouter, AlertDocuments, AlertHeaderControls, AlertNotes, AlertTimeline, Alerts_default as Alerts, AppSidebar, Badge, BankAddressCard, BankingDetailsCard, BasicInfoCard, BasicInfoSection, BeneficiaryAddress, BeneficiaryCard, BeneficiaryDomesticWire, Breadcrumb, BusinessDetail_default as BusinessDetail, BusinessProfileCard, BusinessStatusCard, BusinessTypeBadge, Businesses_default as Businesses, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cases_default as Cases, Checkbox, ContactInfoCard, Container, ContextSection, CounterpartyBasicInfo, DomesticWire_default as CounterpartyDomesticWire, Manage_default as CounterpartyManage, CounterpartyProfileCard, CounterpartyRecordsCard, CounterpartyTypeBadge, Create_default as CreateBusiness, Create_default2 as CreateCounterparty, Dashboard_default as Dashboard, DashboardDemo, DataGrid, DataTable, DetailPageLayout, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EditableFormCard, EditableInfoField, EnhancedInput, EnhancedSelect, EnhancedTextarea, EntityCard, FormCard, FormField, FormInput, FormProvider, FormSection, FormSelect, InfoField, IntermediaryCard, IntermediaryFI, IntermediaryFIAddress, JsonViewer, Label, ListPage, MainLayout, MetricCard, NewTransaction, NotFound_default as NotFound, OFACAlertView, OriginatorCard, OriginatorFI, OriginatorFIAddress, PageLayout, PatternLibrary, PaymentInformationSection, Popover, PopoverContent, PopoverTrigger, ReceiverCard, ResolveAlertDialog, ResponsiveGrid, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Stack, Statement, StatementHeader, StatementView, StatusBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionDetail_default as TransactionDetail, TransactionHistory_default as TransactionHistory, TransactionTypeBadge, UIKit, UIKitShowcase, WireDetailsSection, WireTransferSection, badgeVariants, buttonVariants, cardVariants, inputVariants, reducer, textareaVariants, toast, useAlertDetail, useEditState, useFormWithEditState, useIsMobile, useSidebar, useToast };
|
|
9565
10128
|
//# sourceMappingURL=index.js.map
|
|
9566
10129
|
//# sourceMappingURL=index.js.map
|