braid-ui 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +374 -260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.js +375 -261
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ 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 { 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,
|
|
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, Loader2, ArrowDownRight, ArrowUpRight, Filter, ChevronLeft, CheckCircle2, StickyNote, FileUp, RotateCcw, Send, PlayCircle, Circle, UserPlus, ChevronsUpDown, CalendarIcon, FileJson } from 'lucide-react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -290,6 +290,12 @@ var AlertTimeline = ({ events }) => {
|
|
|
290
290
|
if (action.includes("Alert Approved")) return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
|
|
291
291
|
if (action.includes("Alert Declined")) return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
|
|
292
292
|
if (action.includes("RFI Status change")) return /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" });
|
|
293
|
+
if (action.includes("Manual Review")) return /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" });
|
|
294
|
+
if (action.includes("Returned")) return /* @__PURE__ */ jsx(RotateCcw, { className: "h-4 w-4" });
|
|
295
|
+
if (action.includes("Cancelled")) return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
|
|
296
|
+
if (action.includes("Sent")) return /* @__PURE__ */ jsx(Send, { className: "h-4 w-4" });
|
|
297
|
+
if (action.includes("Submitted")) return /* @__PURE__ */ jsx(FileUp, { className: "h-4 w-4" });
|
|
298
|
+
if (action.includes("Initiated")) return /* @__PURE__ */ jsx(PlayCircle, { className: "h-4 w-4" });
|
|
293
299
|
if (action.includes("Created")) return /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4" });
|
|
294
300
|
if (action.includes("Assigned")) return /* @__PURE__ */ jsx(UserPlus, { className: "h-4 w-4" });
|
|
295
301
|
if (action.includes("Updated") || action.includes("Modified")) return /* @__PURE__ */ jsx(Edit, { className: "h-4 w-4" });
|
|
@@ -303,6 +309,12 @@ var AlertTimeline = ({ events }) => {
|
|
|
303
309
|
if (action?.includes("Alert Approved")) return "text-success";
|
|
304
310
|
if (action?.includes("Alert Declined")) return "text-destructive";
|
|
305
311
|
if (action?.includes("RFI Status change")) return "text-warning";
|
|
312
|
+
if (action?.includes("Manual Review")) return "text-warning";
|
|
313
|
+
if (action?.includes("Returned")) return "text-warning";
|
|
314
|
+
if (action?.includes("Cancelled")) return "text-destructive";
|
|
315
|
+
if (action?.includes("Sent")) return "text-success";
|
|
316
|
+
if (action?.includes("Submitted")) return "text-blue-500";
|
|
317
|
+
if (action?.includes("Initiated")) return "text-blue-500";
|
|
306
318
|
switch (status) {
|
|
307
319
|
case "Unassigned":
|
|
308
320
|
return "text-destructive";
|
|
@@ -5312,7 +5324,100 @@ var ListPage = React15.forwardRef(
|
|
|
5312
5324
|
}
|
|
5313
5325
|
);
|
|
5314
5326
|
ListPage.displayName = "ListPage";
|
|
5327
|
+
|
|
5328
|
+
// src/lib/mock-data/statement-data.ts
|
|
5329
|
+
var calculateBalanceChange = (startingBalance, endingBalance) => {
|
|
5330
|
+
const parseCurrency = (str) => {
|
|
5331
|
+
return parseFloat(str.replace(/[$,]/g, ""));
|
|
5332
|
+
};
|
|
5333
|
+
const start = parseCurrency(startingBalance);
|
|
5334
|
+
const end = parseCurrency(endingBalance);
|
|
5335
|
+
const change = end - start;
|
|
5336
|
+
const isPositive = change >= 0;
|
|
5337
|
+
const prefix = isPositive ? "+" : "";
|
|
5338
|
+
return {
|
|
5339
|
+
amount: change,
|
|
5340
|
+
formatted: `${prefix}$${Math.abs(change).toLocaleString("en-US", {
|
|
5341
|
+
minimumFractionDigits: 2,
|
|
5342
|
+
maximumFractionDigits: 2
|
|
5343
|
+
})}`,
|
|
5344
|
+
isPositive
|
|
5345
|
+
};
|
|
5346
|
+
};
|
|
5347
|
+
var mockStatementHeader = {
|
|
5348
|
+
account: "1234567890",
|
|
5349
|
+
productId: "PROD-001",
|
|
5350
|
+
programId: "PROG-001",
|
|
5351
|
+
startDate: "01/01/2024 00:00:00",
|
|
5352
|
+
endDate: "01/31/2024 23:59:59",
|
|
5353
|
+
startingBalance: "$125,450.00",
|
|
5354
|
+
endingBalance: "$158,320.50"
|
|
5355
|
+
};
|
|
5356
|
+
var mockStatementTransactions = [
|
|
5357
|
+
{ transactionType: "ACH Credit", direction: "CREDIT", amount: 45e3, count: 12 },
|
|
5358
|
+
{ transactionType: "ACH Debit", direction: "DEBIT", amount: 23500, count: 8 },
|
|
5359
|
+
{ transactionType: "Wire Transfer In", direction: "CREDIT", amount: 15e3, count: 3 },
|
|
5360
|
+
{ transactionType: "Wire Transfer Out", direction: "DEBIT", amount: 8200, count: 2 },
|
|
5361
|
+
{ transactionType: "Card Purchase", direction: "DEBIT", amount: 5430.5, count: 45 },
|
|
5362
|
+
{ transactionType: "Direct Deposit", direction: "CREDIT", amount: 12500, count: 5 },
|
|
5363
|
+
{ transactionType: "ATM Withdrawal", direction: "DEBIT", amount: 3200, count: 16 },
|
|
5364
|
+
{ transactionType: "Check Deposit", direction: "CREDIT", amount: 8900, count: 4 },
|
|
5365
|
+
{ transactionType: "Bill Payment", direction: "DEBIT", amount: 6780, count: 18 },
|
|
5366
|
+
{ transactionType: "Transfer In", direction: "CREDIT", amount: 5200, count: 7 },
|
|
5367
|
+
{ transactionType: "Transfer Out", direction: "DEBIT", amount: 4350, count: 6 },
|
|
5368
|
+
{ transactionType: "Fee", direction: "DEBIT", amount: 125, count: 3 },
|
|
5369
|
+
{ transactionType: "Interest", direction: "CREDIT", amount: 85.5, count: 1 },
|
|
5370
|
+
{ transactionType: "Refund", direction: "CREDIT", amount: 450, count: 2 }
|
|
5371
|
+
];
|
|
5372
|
+
var mockPrograms = [
|
|
5373
|
+
{ value: "PROG-001", label: "Consumer Banking Program" },
|
|
5374
|
+
{ value: "PROG-002", label: "Business Banking Program" },
|
|
5375
|
+
{ value: "PROG-003", label: "Premium Rewards Program" },
|
|
5376
|
+
{ value: "PROG-004", label: "Premium Rewards Program 1" },
|
|
5377
|
+
{ value: "PROG-005", label: "Premium Rewards Program 2" },
|
|
5378
|
+
{ value: "PROG-006", label: "Premium Rewards Program 3" },
|
|
5379
|
+
{ value: "PROG-007", label: "Premium Rewards Program 4" },
|
|
5380
|
+
{ value: "PROG-008", label: "Premium Rewards Program 5" },
|
|
5381
|
+
{ value: "PROG-009", label: "Premium Rewards Program 6" },
|
|
5382
|
+
{ value: "PROG-0010", label: "Consumer Banking Program" },
|
|
5383
|
+
{ value: "PROG-0011", label: "Business Banking Program" },
|
|
5384
|
+
{ value: "PROG-0013", label: "Premium Rewards Program" },
|
|
5385
|
+
{ value: "PROG-0041", label: "Premium Rewards Program 1" },
|
|
5386
|
+
{ value: "PROG-0051", label: "Premium Rewards Program 2" },
|
|
5387
|
+
{ value: "PROG-0061", label: "Premium Rewards Program 3" },
|
|
5388
|
+
{ value: "PROG-0071", label: "Premium Rewards Program 4" },
|
|
5389
|
+
{ value: "PROG-0081", label: "Premium Rewards Program 5" },
|
|
5390
|
+
{ value: "PROG-0091", label: "Premium Rewards Program 6" },
|
|
5391
|
+
{ value: "PROG-0014", label: "Consumer Banking Program" },
|
|
5392
|
+
{ value: "PROG-0024", label: "Business Banking Program" },
|
|
5393
|
+
{ value: "PROG-0034", label: "Premium Rewards Program" },
|
|
5394
|
+
{ value: "PROG-0044", label: "Premium Rewards Program 1" },
|
|
5395
|
+
{ value: "PROG-0054", label: "Premium Rewards Program 2" },
|
|
5396
|
+
{ value: "PROG-0064", label: "Premium Rewards Program 3" },
|
|
5397
|
+
{ value: "PROG-0074", label: "Premium Rewards Program 4" },
|
|
5398
|
+
{ value: "PROG-0084", label: "Premium Rewards Program 5" },
|
|
5399
|
+
{ value: "PROG-0094", label: "Premium Rewards Program 6" },
|
|
5400
|
+
{ value: "PROG-00104", label: "Consumer Banking Program" },
|
|
5401
|
+
{ value: "PROG-00114", label: "Business Banking Program" },
|
|
5402
|
+
{ value: "PROG-00134", label: "Premium Rewards Program" },
|
|
5403
|
+
{ value: "PROG-00414", label: "Premium Rewards Program 1" },
|
|
5404
|
+
{ value: "PROG-00514", label: "Premium Rewards Program 2" },
|
|
5405
|
+
{ value: "PROG-00614", label: "Premium Rewards Program 3" },
|
|
5406
|
+
{ value: "PROG-00714", label: "Premium Rewards Program 4" },
|
|
5407
|
+
{ value: "PROG-00814", label: "Premium Rewards Program 5" },
|
|
5408
|
+
{ value: "PROG-00914", label: "Premium Rewards Program 6" }
|
|
5409
|
+
];
|
|
5410
|
+
var mockProducts = [
|
|
5411
|
+
{ value: "PROD-001", label: "Checking Account" },
|
|
5412
|
+
{ value: "PROD-002", label: "Savings Account" },
|
|
5413
|
+
{ value: "PROD-003", label: "Money Market Account" },
|
|
5414
|
+
{ value: "PROD-004", label: "Business Checking" }
|
|
5415
|
+
];
|
|
5315
5416
|
var StatementHeader = ({ data, onEdit }) => {
|
|
5417
|
+
const hasValue = (value) => {
|
|
5418
|
+
return value !== void 0 && value !== null && value.trim() !== "";
|
|
5419
|
+
};
|
|
5420
|
+
const balanceChange = data.startingBalance && data.endingBalance ? calculateBalanceChange(data.startingBalance, data.endingBalance) : null;
|
|
5316
5421
|
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
5317
5422
|
/* @__PURE__ */ jsxs(CardHeader, { direction: "row", children: [
|
|
5318
5423
|
/* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Summary" }),
|
|
@@ -5322,7 +5427,7 @@ var StatementHeader = ({ data, onEdit }) => {
|
|
|
5322
5427
|
] })
|
|
5323
5428
|
] }),
|
|
5324
5429
|
/* @__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(
|
|
5430
|
+
hasValue(data.account) && /* @__PURE__ */ jsx(
|
|
5326
5431
|
InfoField,
|
|
5327
5432
|
{
|
|
5328
5433
|
label: "Account",
|
|
@@ -5330,7 +5435,7 @@ var StatementHeader = ({ data, onEdit }) => {
|
|
|
5330
5435
|
layout: "horizontal"
|
|
5331
5436
|
}
|
|
5332
5437
|
),
|
|
5333
|
-
/* @__PURE__ */ jsx(
|
|
5438
|
+
hasValue(data.productId) && /* @__PURE__ */ jsx(
|
|
5334
5439
|
InfoField,
|
|
5335
5440
|
{
|
|
5336
5441
|
label: "Product ID",
|
|
@@ -5338,7 +5443,7 @@ var StatementHeader = ({ data, onEdit }) => {
|
|
|
5338
5443
|
layout: "horizontal"
|
|
5339
5444
|
}
|
|
5340
5445
|
),
|
|
5341
|
-
/* @__PURE__ */ jsx(
|
|
5446
|
+
hasValue(data.programId) && /* @__PURE__ */ jsx(
|
|
5342
5447
|
InfoField,
|
|
5343
5448
|
{
|
|
5344
5449
|
label: "Program ID",
|
|
@@ -5346,7 +5451,7 @@ var StatementHeader = ({ data, onEdit }) => {
|
|
|
5346
5451
|
layout: "horizontal"
|
|
5347
5452
|
}
|
|
5348
5453
|
),
|
|
5349
|
-
/* @__PURE__ */ jsx(
|
|
5454
|
+
hasValue(data.startDate) && /* @__PURE__ */ jsx(
|
|
5350
5455
|
InfoField,
|
|
5351
5456
|
{
|
|
5352
5457
|
label: "Start Date",
|
|
@@ -5354,7 +5459,7 @@ var StatementHeader = ({ data, onEdit }) => {
|
|
|
5354
5459
|
layout: "horizontal"
|
|
5355
5460
|
}
|
|
5356
5461
|
),
|
|
5357
|
-
/* @__PURE__ */ jsx(
|
|
5462
|
+
hasValue(data.endDate) && /* @__PURE__ */ jsx(
|
|
5358
5463
|
InfoField,
|
|
5359
5464
|
{
|
|
5360
5465
|
label: "End Date",
|
|
@@ -5362,7 +5467,7 @@ var StatementHeader = ({ data, onEdit }) => {
|
|
|
5362
5467
|
layout: "horizontal"
|
|
5363
5468
|
}
|
|
5364
5469
|
),
|
|
5365
|
-
/* @__PURE__ */ jsx(
|
|
5470
|
+
hasValue(data.startingBalance) && /* @__PURE__ */ jsx(
|
|
5366
5471
|
InfoField,
|
|
5367
5472
|
{
|
|
5368
5473
|
label: "Starting Balance",
|
|
@@ -5370,13 +5475,21 @@ var StatementHeader = ({ data, onEdit }) => {
|
|
|
5370
5475
|
layout: "horizontal"
|
|
5371
5476
|
}
|
|
5372
5477
|
),
|
|
5373
|
-
/* @__PURE__ */ jsx(
|
|
5478
|
+
hasValue(data.endingBalance) && /* @__PURE__ */ jsx(
|
|
5374
5479
|
InfoField,
|
|
5375
5480
|
{
|
|
5376
5481
|
label: "Ending Balance",
|
|
5377
5482
|
value: data.endingBalance,
|
|
5378
5483
|
layout: "horizontal"
|
|
5379
5484
|
}
|
|
5485
|
+
),
|
|
5486
|
+
balanceChange && /* @__PURE__ */ jsx(
|
|
5487
|
+
InfoField,
|
|
5488
|
+
{
|
|
5489
|
+
label: "Balance Change",
|
|
5490
|
+
value: /* @__PURE__ */ jsx("span", { className: balanceChange.isPositive ? "text-green-600 font-medium" : "text-red-600 font-medium", children: balanceChange.formatted }),
|
|
5491
|
+
layout: "horizontal"
|
|
5492
|
+
}
|
|
5380
5493
|
)
|
|
5381
5494
|
] }) })
|
|
5382
5495
|
] });
|
|
@@ -5437,6 +5550,52 @@ var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffs
|
|
|
5437
5550
|
}
|
|
5438
5551
|
) }));
|
|
5439
5552
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
5553
|
+
function DatePicker({
|
|
5554
|
+
date,
|
|
5555
|
+
onDateChange,
|
|
5556
|
+
placeholder = "Pick a date",
|
|
5557
|
+
disabled = false,
|
|
5558
|
+
className,
|
|
5559
|
+
buttonClassName,
|
|
5560
|
+
calendarClassName,
|
|
5561
|
+
align = "start",
|
|
5562
|
+
disabledDates
|
|
5563
|
+
}) {
|
|
5564
|
+
const [open, setOpen] = React15.useState(false);
|
|
5565
|
+
const handleSelect = (selectedDate) => {
|
|
5566
|
+
onDateChange?.(selectedDate);
|
|
5567
|
+
setOpen(false);
|
|
5568
|
+
};
|
|
5569
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
5570
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
5571
|
+
Button,
|
|
5572
|
+
{
|
|
5573
|
+
variant: "outline",
|
|
5574
|
+
disabled,
|
|
5575
|
+
className: cn(
|
|
5576
|
+
"justify-start text-left font-normal",
|
|
5577
|
+
!date && "text-muted-foreground",
|
|
5578
|
+
buttonClassName
|
|
5579
|
+
),
|
|
5580
|
+
children: [
|
|
5581
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
5582
|
+
date ? format(date, "MM/dd/yyyy") : placeholder
|
|
5583
|
+
]
|
|
5584
|
+
}
|
|
5585
|
+
) }),
|
|
5586
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: cn("w-auto p-0", className), align, children: /* @__PURE__ */ jsx(
|
|
5587
|
+
Calendar,
|
|
5588
|
+
{
|
|
5589
|
+
mode: "single",
|
|
5590
|
+
selected: date,
|
|
5591
|
+
onSelect: handleSelect,
|
|
5592
|
+
disabled: disabledDates,
|
|
5593
|
+
initialFocus: true,
|
|
5594
|
+
className: cn("pointer-events-auto", calendarClassName)
|
|
5595
|
+
}
|
|
5596
|
+
) })
|
|
5597
|
+
] });
|
|
5598
|
+
}
|
|
5440
5599
|
function DataTable({
|
|
5441
5600
|
columns: columns2,
|
|
5442
5601
|
data,
|
|
@@ -5573,6 +5732,10 @@ var StatementView = ({
|
|
|
5573
5732
|
products,
|
|
5574
5733
|
statementHeader,
|
|
5575
5734
|
statementTransactions,
|
|
5735
|
+
programsLoading,
|
|
5736
|
+
productsLoading,
|
|
5737
|
+
programsError,
|
|
5738
|
+
productsError,
|
|
5576
5739
|
onStatementTypeChange,
|
|
5577
5740
|
onProgramChange,
|
|
5578
5741
|
onProductChange,
|
|
@@ -5583,6 +5746,8 @@ var StatementView = ({
|
|
|
5583
5746
|
onEdit,
|
|
5584
5747
|
onDownloadCSV,
|
|
5585
5748
|
onPrintPDF,
|
|
5749
|
+
onRetryFetch,
|
|
5750
|
+
shouldShowRetry,
|
|
5586
5751
|
isGenerateDisabled,
|
|
5587
5752
|
isLoading
|
|
5588
5753
|
}) => {
|
|
@@ -5594,6 +5759,50 @@ var StatementView = ({
|
|
|
5594
5759
|
!statementGenerated && /* @__PURE__ */ jsxs(Card, { children: [
|
|
5595
5760
|
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { size: "md", children: "Statement Parameters" }) }),
|
|
5596
5761
|
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
|
|
5762
|
+
statementType === "program" && programsError && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-md", children: [
|
|
5763
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5764
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5 text-destructive flex-shrink-0" }),
|
|
5765
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
5766
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-destructive", children: "Failed to load programs" }),
|
|
5767
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-destructive/80 mt-0.5", children: programsError })
|
|
5768
|
+
] })
|
|
5769
|
+
] }),
|
|
5770
|
+
/* @__PURE__ */ jsxs(
|
|
5771
|
+
Button,
|
|
5772
|
+
{
|
|
5773
|
+
onClick: onRetryFetch,
|
|
5774
|
+
variant: "outline",
|
|
5775
|
+
size: "sm",
|
|
5776
|
+
disabled: programsLoading,
|
|
5777
|
+
children: [
|
|
5778
|
+
programsLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" }),
|
|
5779
|
+
"Retry"
|
|
5780
|
+
]
|
|
5781
|
+
}
|
|
5782
|
+
)
|
|
5783
|
+
] }),
|
|
5784
|
+
statementType === "product" && productsError && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 p-4 bg-destructive/10 border border-destructive/20 rounded-md", children: [
|
|
5785
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5786
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5 text-destructive flex-shrink-0" }),
|
|
5787
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
5788
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-destructive", children: "Failed to load products" }),
|
|
5789
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-destructive/80 mt-0.5", children: productsError })
|
|
5790
|
+
] })
|
|
5791
|
+
] }),
|
|
5792
|
+
/* @__PURE__ */ jsxs(
|
|
5793
|
+
Button,
|
|
5794
|
+
{
|
|
5795
|
+
onClick: onRetryFetch,
|
|
5796
|
+
variant: "outline",
|
|
5797
|
+
size: "sm",
|
|
5798
|
+
disabled: productsLoading,
|
|
5799
|
+
children: [
|
|
5800
|
+
productsLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" }),
|
|
5801
|
+
"Retry"
|
|
5802
|
+
]
|
|
5803
|
+
}
|
|
5804
|
+
)
|
|
5805
|
+
] }),
|
|
5597
5806
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", children: [
|
|
5598
5807
|
/* @__PURE__ */ jsx(
|
|
5599
5808
|
EnhancedSelect,
|
|
@@ -5609,20 +5818,22 @@ var StatementView = ({
|
|
|
5609
5818
|
EnhancedSelect,
|
|
5610
5819
|
{
|
|
5611
5820
|
label: "Program Name",
|
|
5612
|
-
placeholder: "Select program",
|
|
5821
|
+
placeholder: programsLoading ? "Loading programs..." : "Select program",
|
|
5613
5822
|
options: programs,
|
|
5614
5823
|
value: selectedProgram,
|
|
5615
|
-
onValueChange: onProgramChange
|
|
5824
|
+
onValueChange: onProgramChange,
|
|
5825
|
+
disabled: programsLoading || !!programsError
|
|
5616
5826
|
}
|
|
5617
5827
|
),
|
|
5618
5828
|
statementType === "product" && /* @__PURE__ */ jsx(
|
|
5619
5829
|
EnhancedSelect,
|
|
5620
5830
|
{
|
|
5621
5831
|
label: "Product Name",
|
|
5622
|
-
placeholder: "Select product",
|
|
5832
|
+
placeholder: productsLoading ? "Loading products..." : "Select product",
|
|
5623
5833
|
options: products,
|
|
5624
5834
|
value: selectedProduct,
|
|
5625
|
-
onValueChange: onProductChange
|
|
5835
|
+
onValueChange: onProductChange,
|
|
5836
|
+
disabled: productsLoading || !!productsError
|
|
5626
5837
|
}
|
|
5627
5838
|
),
|
|
5628
5839
|
statementType === "account" && /* @__PURE__ */ jsx(
|
|
@@ -5636,59 +5847,27 @@ var StatementView = ({
|
|
|
5636
5847
|
),
|
|
5637
5848
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
5638
5849
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Start Date" }),
|
|
5639
|
-
/* @__PURE__ */
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
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
|
-
] })
|
|
5850
|
+
/* @__PURE__ */ jsx(
|
|
5851
|
+
DatePicker,
|
|
5852
|
+
{
|
|
5853
|
+
date: startDate,
|
|
5854
|
+
onDateChange: onStartDateChange,
|
|
5855
|
+
placeholder: "Select start date",
|
|
5856
|
+
buttonClassName: "w-full"
|
|
5857
|
+
}
|
|
5858
|
+
)
|
|
5664
5859
|
] }),
|
|
5665
5860
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
5666
5861
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "End Date" }),
|
|
5667
|
-
/* @__PURE__ */
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
children: [
|
|
5677
|
-
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
5678
|
-
endDate ? format(endDate, "MM/dd/yyyy") : "Select date"
|
|
5679
|
-
]
|
|
5680
|
-
}
|
|
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
|
-
] })
|
|
5862
|
+
/* @__PURE__ */ jsx(
|
|
5863
|
+
DatePicker,
|
|
5864
|
+
{
|
|
5865
|
+
date: endDate,
|
|
5866
|
+
onDateChange: onEndDateChange,
|
|
5867
|
+
placeholder: "Select end date",
|
|
5868
|
+
buttonClassName: "w-full"
|
|
5869
|
+
}
|
|
5870
|
+
)
|
|
5692
5871
|
] })
|
|
5693
5872
|
] }),
|
|
5694
5873
|
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs(
|
|
@@ -7892,61 +8071,29 @@ var Businesses = () => {
|
|
|
7892
8071
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7893
8072
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
7894
8073
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date Start" }),
|
|
7895
|
-
/* @__PURE__ */
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
|
|
7906
|
-
filters.createdDateStart ? format(filters.createdDateStart, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
|
|
7907
|
-
]
|
|
7908
|
-
}
|
|
7909
|
-
) }),
|
|
7910
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
|
|
7911
|
-
Calendar,
|
|
7912
|
-
{
|
|
7913
|
-
mode: "single",
|
|
7914
|
-
selected: filters.createdDateStart,
|
|
7915
|
-
onSelect: (date) => handleFilterChange("createdDateStart", date),
|
|
7916
|
-
initialFocus: true,
|
|
7917
|
-
className: "pointer-events-auto"
|
|
7918
|
-
}
|
|
7919
|
-
) })
|
|
7920
|
-
] })
|
|
8074
|
+
/* @__PURE__ */ jsx(
|
|
8075
|
+
DatePicker,
|
|
8076
|
+
{
|
|
8077
|
+
date: filters.createdDateStart,
|
|
8078
|
+
onDateChange: (date) => handleFilterChange("createdDateStart", date),
|
|
8079
|
+
placeholder: "MM/DD/YYYY",
|
|
8080
|
+
buttonClassName: "w-full",
|
|
8081
|
+
className: "bg-background z-50"
|
|
8082
|
+
}
|
|
8083
|
+
)
|
|
7921
8084
|
] }),
|
|
7922
8085
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
7923
8086
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Created Date End" }),
|
|
7924
|
-
/* @__PURE__ */
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
|
|
7935
|
-
filters.createdDateEnd ? format(filters.createdDateEnd, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
|
|
7936
|
-
]
|
|
7937
|
-
}
|
|
7938
|
-
) }),
|
|
7939
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
|
|
7940
|
-
Calendar,
|
|
7941
|
-
{
|
|
7942
|
-
mode: "single",
|
|
7943
|
-
selected: filters.createdDateEnd,
|
|
7944
|
-
onSelect: (date) => handleFilterChange("createdDateEnd", date),
|
|
7945
|
-
initialFocus: true,
|
|
7946
|
-
className: "pointer-events-auto"
|
|
7947
|
-
}
|
|
7948
|
-
) })
|
|
7949
|
-
] })
|
|
8087
|
+
/* @__PURE__ */ jsx(
|
|
8088
|
+
DatePicker,
|
|
8089
|
+
{
|
|
8090
|
+
date: filters.createdDateEnd,
|
|
8091
|
+
onDateChange: (date) => handleFilterChange("createdDateEnd", date),
|
|
8092
|
+
placeholder: "MM/DD/YYYY",
|
|
8093
|
+
buttonClassName: "w-full",
|
|
8094
|
+
className: "bg-background z-50"
|
|
8095
|
+
}
|
|
8096
|
+
)
|
|
7950
8097
|
] })
|
|
7951
8098
|
] })
|
|
7952
8099
|
] }),
|
|
@@ -8541,57 +8688,68 @@ var NotFound = () => {
|
|
|
8541
8688
|
] }) });
|
|
8542
8689
|
};
|
|
8543
8690
|
var NotFound_default = NotFound;
|
|
8544
|
-
|
|
8545
|
-
// src/lib/mock-data/statement-data.ts
|
|
8546
|
-
var mockStatementHeader = {
|
|
8547
|
-
account: "1234567890",
|
|
8548
|
-
productId: "PROD-001",
|
|
8549
|
-
programId: "PROG-001",
|
|
8550
|
-
startDate: "01/01/2024 00:00:00",
|
|
8551
|
-
endDate: "01/31/2024 23:59:59",
|
|
8552
|
-
startingBalance: "$125,450.00",
|
|
8553
|
-
endingBalance: "$158,320.50"
|
|
8554
|
-
};
|
|
8555
|
-
var mockStatementTransactions = [
|
|
8556
|
-
{ transactionType: "ACH Credit", direction: "CREDIT", amount: 45e3, count: 12 },
|
|
8557
|
-
{ transactionType: "ACH Debit", direction: "DEBIT", amount: 23500, count: 8 },
|
|
8558
|
-
{ transactionType: "Wire Transfer In", direction: "CREDIT", amount: 15e3, count: 3 },
|
|
8559
|
-
{ transactionType: "Wire Transfer Out", direction: "DEBIT", amount: 8200, count: 2 },
|
|
8560
|
-
{ transactionType: "Card Purchase", direction: "DEBIT", amount: 5430.5, count: 45 },
|
|
8561
|
-
{ transactionType: "Direct Deposit", direction: "CREDIT", amount: 12500, count: 5 },
|
|
8562
|
-
{ transactionType: "ATM Withdrawal", direction: "DEBIT", amount: 3200, count: 16 },
|
|
8563
|
-
{ transactionType: "Check Deposit", direction: "CREDIT", amount: 8900, count: 4 },
|
|
8564
|
-
{ transactionType: "Bill Payment", direction: "DEBIT", amount: 6780, count: 18 },
|
|
8565
|
-
{ transactionType: "Transfer In", direction: "CREDIT", amount: 5200, count: 7 },
|
|
8566
|
-
{ transactionType: "Transfer Out", direction: "DEBIT", amount: 4350, count: 6 },
|
|
8567
|
-
{ transactionType: "Fee", direction: "DEBIT", amount: 125, count: 3 },
|
|
8568
|
-
{ transactionType: "Interest", direction: "CREDIT", amount: 85.5, count: 1 },
|
|
8569
|
-
{ transactionType: "Refund", direction: "CREDIT", amount: 450, count: 2 }
|
|
8570
|
-
];
|
|
8571
|
-
var mockPrograms = [
|
|
8572
|
-
{ value: "PROG-001", label: "Consumer Banking Program" },
|
|
8573
|
-
{ value: "PROG-002", label: "Business Banking Program" },
|
|
8574
|
-
{ value: "PROG-003", label: "Premium Rewards Program" }
|
|
8575
|
-
];
|
|
8576
|
-
var mockProducts = [
|
|
8577
|
-
{ value: "PROD-001", label: "Checking Account" },
|
|
8578
|
-
{ value: "PROD-002", label: "Savings Account" },
|
|
8579
|
-
{ value: "PROD-003", label: "Money Market Account" },
|
|
8580
|
-
{ value: "PROD-004", label: "Business Checking" }
|
|
8581
|
-
];
|
|
8582
8691
|
function Statement() {
|
|
8583
|
-
const [statementType, setStatementType] = useState("");
|
|
8692
|
+
const [statementType, setStatementType] = useState("root");
|
|
8584
8693
|
const [selectedProgram, setSelectedProgram] = useState("");
|
|
8585
8694
|
const [selectedProduct, setSelectedProduct] = useState("");
|
|
8586
8695
|
const [accountNumber, setAccountNumber] = useState("");
|
|
8587
|
-
const [startDate, setStartDate] = useState()
|
|
8588
|
-
|
|
8696
|
+
const [startDate, setStartDate] = useState(() => {
|
|
8697
|
+
const now = /* @__PURE__ */ new Date();
|
|
8698
|
+
return new Date(now.getFullYear(), now.getMonth(), 1);
|
|
8699
|
+
});
|
|
8700
|
+
const [endDate, setEndDate] = useState(/* @__PURE__ */ new Date());
|
|
8589
8701
|
const [statementGenerated, setStatementGenerated] = useState(false);
|
|
8590
8702
|
const [isLoading, setIsLoading] = useState(false);
|
|
8591
|
-
const [programs] = useState(
|
|
8592
|
-
const [products] = useState(
|
|
8703
|
+
const [programs, setPrograms] = useState([]);
|
|
8704
|
+
const [products, setProducts] = useState([]);
|
|
8705
|
+
const [programsLoading, setProgramsLoading] = useState(false);
|
|
8706
|
+
const [productsLoading, setProductsLoading] = useState(false);
|
|
8707
|
+
const [programsError, setProgramsError] = useState(null);
|
|
8708
|
+
const [productsError, setProductsError] = useState(null);
|
|
8593
8709
|
const [statementHeader, setStatementHeader] = useState(null);
|
|
8594
8710
|
const [statementTransactions, setStatementTransactions] = useState([]);
|
|
8711
|
+
const fetchPrograms = async () => {
|
|
8712
|
+
setProgramsLoading(true);
|
|
8713
|
+
setProgramsError(null);
|
|
8714
|
+
try {
|
|
8715
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
8716
|
+
setPrograms(mockPrograms);
|
|
8717
|
+
} catch (error) {
|
|
8718
|
+
const errorMessage = error instanceof Error ? error.message : "Failed to load programs";
|
|
8719
|
+
setProgramsError(errorMessage);
|
|
8720
|
+
setPrograms([]);
|
|
8721
|
+
toast({
|
|
8722
|
+
title: "Error loading programs",
|
|
8723
|
+
description: errorMessage,
|
|
8724
|
+
variant: "destructive"
|
|
8725
|
+
});
|
|
8726
|
+
} finally {
|
|
8727
|
+
setProgramsLoading(false);
|
|
8728
|
+
}
|
|
8729
|
+
};
|
|
8730
|
+
const fetchProducts = async () => {
|
|
8731
|
+
setProductsLoading(true);
|
|
8732
|
+
setProductsError(null);
|
|
8733
|
+
try {
|
|
8734
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
8735
|
+
setProducts(mockProducts);
|
|
8736
|
+
} catch (error) {
|
|
8737
|
+
const errorMessage = error instanceof Error ? error.message : "Failed to load products";
|
|
8738
|
+
setProductsError(errorMessage);
|
|
8739
|
+
setProducts([]);
|
|
8740
|
+
toast({
|
|
8741
|
+
title: "Error loading products",
|
|
8742
|
+
description: errorMessage,
|
|
8743
|
+
variant: "destructive"
|
|
8744
|
+
});
|
|
8745
|
+
} finally {
|
|
8746
|
+
setProductsLoading(false);
|
|
8747
|
+
}
|
|
8748
|
+
};
|
|
8749
|
+
useEffect(() => {
|
|
8750
|
+
fetchPrograms();
|
|
8751
|
+
fetchProducts();
|
|
8752
|
+
}, []);
|
|
8595
8753
|
const handleStatementTypeChange = (value) => {
|
|
8596
8754
|
setStatementType(value);
|
|
8597
8755
|
setSelectedProgram("");
|
|
@@ -8623,11 +8781,25 @@ function Statement() {
|
|
|
8623
8781
|
};
|
|
8624
8782
|
const isGenerateDisabled = () => {
|
|
8625
8783
|
if (!statementType || !startDate || !endDate) return true;
|
|
8784
|
+
if (statementType === "program" && (programsError || programsLoading)) return true;
|
|
8785
|
+
if (statementType === "product" && (productsError || productsLoading)) return true;
|
|
8626
8786
|
if (statementType === "program" && !selectedProgram) return true;
|
|
8627
8787
|
if (statementType === "product" && !selectedProduct) return true;
|
|
8628
8788
|
if (statementType === "account" && !accountNumber) return true;
|
|
8629
8789
|
return false;
|
|
8630
8790
|
};
|
|
8791
|
+
const handleRetryFetch = () => {
|
|
8792
|
+
if (statementType === "program" && programsError) {
|
|
8793
|
+
fetchPrograms();
|
|
8794
|
+
} else if (statementType === "product" && productsError) {
|
|
8795
|
+
fetchProducts();
|
|
8796
|
+
}
|
|
8797
|
+
};
|
|
8798
|
+
const shouldShowRetry = () => {
|
|
8799
|
+
if (statementType === "program" && programsError) return true;
|
|
8800
|
+
if (statementType === "product" && productsError) return true;
|
|
8801
|
+
return false;
|
|
8802
|
+
};
|
|
8631
8803
|
const handleDownloadCSV = () => {
|
|
8632
8804
|
console.log("Downloading CSV...");
|
|
8633
8805
|
};
|
|
@@ -8651,6 +8823,10 @@ function Statement() {
|
|
|
8651
8823
|
products,
|
|
8652
8824
|
statementHeader,
|
|
8653
8825
|
statementTransactions,
|
|
8826
|
+
programsLoading,
|
|
8827
|
+
productsLoading,
|
|
8828
|
+
programsError,
|
|
8829
|
+
productsError,
|
|
8654
8830
|
onStatementTypeChange: handleStatementTypeChange,
|
|
8655
8831
|
onProgramChange: setSelectedProgram,
|
|
8656
8832
|
onProductChange: setSelectedProduct,
|
|
@@ -8661,6 +8837,8 @@ function Statement() {
|
|
|
8661
8837
|
onEdit: handleEdit,
|
|
8662
8838
|
onDownloadCSV: handleDownloadCSV,
|
|
8663
8839
|
onPrintPDF: handlePrintPDF,
|
|
8840
|
+
onRetryFetch: handleRetryFetch,
|
|
8841
|
+
shouldShowRetry: shouldShowRetry(),
|
|
8664
8842
|
isGenerateDisabled: isGenerateDisabled(),
|
|
8665
8843
|
isLoading
|
|
8666
8844
|
}
|
|
@@ -9220,121 +9398,57 @@ var TransactionHistory = () => {
|
|
|
9220
9398
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9221
9399
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9222
9400
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Creation Date Start" }),
|
|
9223
|
-
/* @__PURE__ */
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
|
|
9234
|
-
filters.creationDateStart ? format(filters.creationDateStart, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
|
|
9235
|
-
]
|
|
9236
|
-
}
|
|
9237
|
-
) }),
|
|
9238
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
|
|
9239
|
-
Calendar,
|
|
9240
|
-
{
|
|
9241
|
-
mode: "single",
|
|
9242
|
-
selected: filters.creationDateStart,
|
|
9243
|
-
onSelect: (date) => handleFilterChange("creationDateStart", date),
|
|
9244
|
-
initialFocus: true,
|
|
9245
|
-
className: "pointer-events-auto"
|
|
9246
|
-
}
|
|
9247
|
-
) })
|
|
9248
|
-
] })
|
|
9401
|
+
/* @__PURE__ */ jsx(
|
|
9402
|
+
DatePicker,
|
|
9403
|
+
{
|
|
9404
|
+
date: filters.creationDateStart,
|
|
9405
|
+
onDateChange: (date) => handleFilterChange("creationDateStart", date),
|
|
9406
|
+
placeholder: "MM/DD/YYYY",
|
|
9407
|
+
buttonClassName: "w-full",
|
|
9408
|
+
className: "bg-background z-50"
|
|
9409
|
+
}
|
|
9410
|
+
)
|
|
9249
9411
|
] }),
|
|
9250
9412
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9251
9413
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Creation Date End" }),
|
|
9252
|
-
/* @__PURE__ */
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
|
|
9263
|
-
filters.creationDateEnd ? format(filters.creationDateEnd, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
|
|
9264
|
-
]
|
|
9265
|
-
}
|
|
9266
|
-
) }),
|
|
9267
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
|
|
9268
|
-
Calendar,
|
|
9269
|
-
{
|
|
9270
|
-
mode: "single",
|
|
9271
|
-
selected: filters.creationDateEnd,
|
|
9272
|
-
onSelect: (date) => handleFilterChange("creationDateEnd", date),
|
|
9273
|
-
initialFocus: true,
|
|
9274
|
-
className: "pointer-events-auto"
|
|
9275
|
-
}
|
|
9276
|
-
) })
|
|
9277
|
-
] })
|
|
9414
|
+
/* @__PURE__ */ jsx(
|
|
9415
|
+
DatePicker,
|
|
9416
|
+
{
|
|
9417
|
+
date: filters.creationDateEnd,
|
|
9418
|
+
onDateChange: (date) => handleFilterChange("creationDateEnd", date),
|
|
9419
|
+
placeholder: "MM/DD/YYYY",
|
|
9420
|
+
buttonClassName: "w-full",
|
|
9421
|
+
className: "bg-background z-50"
|
|
9422
|
+
}
|
|
9423
|
+
)
|
|
9278
9424
|
] })
|
|
9279
9425
|
] }),
|
|
9280
9426
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9281
9427
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9282
9428
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Post Date Start" }),
|
|
9283
|
-
/* @__PURE__ */
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
|
|
9294
|
-
filters.postDateStart ? format(filters.postDateStart, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
|
|
9295
|
-
]
|
|
9296
|
-
}
|
|
9297
|
-
) }),
|
|
9298
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
|
|
9299
|
-
Calendar,
|
|
9300
|
-
{
|
|
9301
|
-
mode: "single",
|
|
9302
|
-
selected: filters.postDateStart,
|
|
9303
|
-
onSelect: (date) => handleFilterChange("postDateStart", date),
|
|
9304
|
-
initialFocus: true,
|
|
9305
|
-
className: "pointer-events-auto"
|
|
9306
|
-
}
|
|
9307
|
-
) })
|
|
9308
|
-
] })
|
|
9429
|
+
/* @__PURE__ */ jsx(
|
|
9430
|
+
DatePicker,
|
|
9431
|
+
{
|
|
9432
|
+
date: filters.postDateStart,
|
|
9433
|
+
onDateChange: (date) => handleFilterChange("postDateStart", date),
|
|
9434
|
+
placeholder: "MM/DD/YYYY",
|
|
9435
|
+
buttonClassName: "w-full",
|
|
9436
|
+
className: "bg-background z-50"
|
|
9437
|
+
}
|
|
9438
|
+
)
|
|
9309
9439
|
] }),
|
|
9310
9440
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
9311
9441
|
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: "Post Date End" }),
|
|
9312
|
-
/* @__PURE__ */
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }),
|
|
9323
|
-
filters.postDateEnd ? format(filters.postDateEnd, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "MM/DD/YYYY" })
|
|
9324
|
-
]
|
|
9325
|
-
}
|
|
9326
|
-
) }),
|
|
9327
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 bg-background z-50", align: "start", children: /* @__PURE__ */ jsx(
|
|
9328
|
-
Calendar,
|
|
9329
|
-
{
|
|
9330
|
-
mode: "single",
|
|
9331
|
-
selected: filters.postDateEnd,
|
|
9332
|
-
onSelect: (date) => handleFilterChange("postDateEnd", date),
|
|
9333
|
-
initialFocus: true,
|
|
9334
|
-
className: "pointer-events-auto"
|
|
9335
|
-
}
|
|
9336
|
-
) })
|
|
9337
|
-
] })
|
|
9442
|
+
/* @__PURE__ */ jsx(
|
|
9443
|
+
DatePicker,
|
|
9444
|
+
{
|
|
9445
|
+
date: filters.postDateEnd,
|
|
9446
|
+
onDateChange: (date) => handleFilterChange("postDateEnd", date),
|
|
9447
|
+
placeholder: "MM/DD/YYYY",
|
|
9448
|
+
buttonClassName: "w-full",
|
|
9449
|
+
className: "bg-background z-50"
|
|
9450
|
+
}
|
|
9451
|
+
)
|
|
9338
9452
|
] })
|
|
9339
9453
|
] })
|
|
9340
9454
|
] }),
|