@mieweb/ui 0.1.1 → 0.2.0
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/brands/index.cjs +7 -7
- package/dist/brands/index.js +2 -2
- package/dist/chunk-4T2ZNPTC.js +220 -0
- package/dist/chunk-4T2ZNPTC.js.map +1 -0
- package/dist/{chunk-NL3CZNBH.cjs → chunk-5UUL5EEO.cjs} +16 -5
- package/dist/chunk-5UUL5EEO.cjs.map +1 -0
- package/dist/chunk-BV75DAKO.cjs +245 -0
- package/dist/chunk-BV75DAKO.cjs.map +1 -0
- package/dist/{chunk-6DP6RKUA.cjs → chunk-CLJZHS7Y.cjs} +2 -2
- package/dist/{chunk-6DP6RKUA.cjs.map → chunk-CLJZHS7Y.cjs.map} +1 -1
- package/dist/{chunk-MFB4FS7D.js → chunk-QSMMFATL.js} +16 -5
- package/dist/chunk-QSMMFATL.js.map +1 -0
- package/dist/{chunk-FIUNOH6W.js → chunk-S4DK5WN6.js} +2 -2
- package/dist/{chunk-FIUNOH6W.js.map → chunk-S4DK5WN6.js.map} +1 -1
- package/dist/components/Select/index.cjs +3 -3
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Slider/index.cjs +25 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.cts +82 -0
- package/dist/components/Slider/index.d.ts +82 -0
- package/dist/components/Slider/index.js +4 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/index.cjs +1032 -584
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -14
- package/dist/index.d.ts +52 -14
- package/dist/index.js +1012 -580
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-MFB4FS7D.js.map +0 -1
- package/dist/chunk-NL3CZNBH.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
import { Textarea } from './chunk-4AWW5WPF.js';
|
|
2
|
+
export { Textarea, textareaVariants } from './chunk-4AWW5WPF.js';
|
|
1
3
|
export { ThemeProvider, ThemeProviderContext, ThemeToggle, themeToggleIconVariants, themeToggleVariants, useThemeContext } from './chunk-TA6FVVCM.js';
|
|
2
4
|
import { Tooltip } from './chunk-UZUBLXVC.js';
|
|
3
5
|
export { Tooltip } from './chunk-UZUBLXVC.js';
|
|
4
6
|
export { VisuallyHidden } from './chunk-H2CIKJQI.js';
|
|
5
|
-
export { brands } from './chunk-
|
|
7
|
+
export { brands } from './chunk-S4DK5WN6.js';
|
|
8
|
+
export { enterpriseHealthBrand } from './chunk-MTZPVOP6.js';
|
|
6
9
|
export { miewebBrand } from './chunk-UHSPAFY6.js';
|
|
7
10
|
export { wagglelineBrand } from './chunk-OWPWP46L.js';
|
|
8
11
|
export { webchartBrand } from './chunk-C6MDPPPL.js';
|
|
9
12
|
export { createBrandPreset, generateBrandCSS, generateTailwindTheme } from './chunk-SOFX4T7M.js';
|
|
10
13
|
export { bluehiveBrand } from './chunk-ULOA7WBW.js';
|
|
11
14
|
export { defaultBrand } from './chunk-4LTN2LEN.js';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
import { Select } from './chunk-QSMMFATL.js';
|
|
16
|
+
export { Select, selectTriggerVariants } from './chunk-QSMMFATL.js';
|
|
17
|
+
import { Skeleton } from './chunk-6OCIIIAI.js';
|
|
15
18
|
export { Skeleton, SkeletonCard, SkeletonTable, SkeletonText, skeletonVariants } from './chunk-6OCIIIAI.js';
|
|
19
|
+
export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants } from './chunk-4T2ZNPTC.js';
|
|
16
20
|
import { Spinner, SpinnerWithLabel } from './chunk-GV5JQBPX.js';
|
|
17
21
|
export { FullPageSpinner, Spinner, SpinnerWithLabel, spinnerVariants } from './chunk-GV5JQBPX.js';
|
|
18
22
|
import { Switch } from './chunk-QL2YTVTR.js';
|
|
@@ -23,8 +27,6 @@ import { Tabs, TabsList, TabsTrigger, TabsContent } from './chunk-JFAXLE2J.js';
|
|
|
23
27
|
export { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants, tabsTriggerVariants } from './chunk-JFAXLE2J.js';
|
|
24
28
|
import { Text } from './chunk-RCMF6KZA.js';
|
|
25
29
|
export { SmallMuted, Text, textVariants } from './chunk-RCMF6KZA.js';
|
|
26
|
-
import { Textarea } from './chunk-4AWW5WPF.js';
|
|
27
|
-
export { Textarea, textareaVariants } from './chunk-4AWW5WPF.js';
|
|
28
30
|
import { Modal, ModalHeader, ModalTitle, ModalBody, ModalFooter, ModalClose } from './chunk-SD44QJIP.js';
|
|
29
31
|
export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-SD44QJIP.js';
|
|
30
32
|
export { Pagination, SimplePagination, paginationButtonVariants } from './chunk-ONWOB76P.js';
|
|
@@ -32,7 +34,7 @@ export { PhoneInput, PhoneInputGroup } from './chunk-4YRAEFYW.js';
|
|
|
32
34
|
import { Progress } from './chunk-4MHTSFPX.js';
|
|
33
35
|
export { CircularProgress, Progress, circularProgressVariants, progressBarFillVariants, progressBarTrackVariants } from './chunk-4MHTSFPX.js';
|
|
34
36
|
export { QuickAction, QuickActionGroup, QuickActionIcons, quickActionIconVariants, quickActionVariants } from './chunk-6Q4SU72T.js';
|
|
35
|
-
import { Radio } from './chunk-OW2BWGST.js';
|
|
37
|
+
import { RadioGroup, Radio } from './chunk-OW2BWGST.js';
|
|
36
38
|
export { Radio, RadioGroup, radioVariants } from './chunk-OW2BWGST.js';
|
|
37
39
|
export { RecordButton, formatDuration, recordButtonVariants } from './chunk-XVZ4SLQB.js';
|
|
38
40
|
export { DateButton, DatePicker, RadioOption, SchedulePicker, TimeButton, TimePicker, dateButtonVariants, radioOptionVariants, timeButtonVariants } from './chunk-DMA74PZ7.js';
|
|
@@ -80,7 +82,7 @@ import { cva } from 'class-variance-authority';
|
|
|
80
82
|
import { AgGridReact } from 'ag-grid-react';
|
|
81
83
|
export { AgGridReact } from 'ag-grid-react';
|
|
82
84
|
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
83
|
-
import { Mail, Phone, Linkedin, Globe, CheckCircle, Clock, Filter, ChevronDown, Calendar, Printer, Download, FolderUp,
|
|
85
|
+
import { FileUp, X, AlertCircle, Mail, Phone, Linkedin, Globe, CheckCircle, Clock, Filter, ChevronDown, Calendar, Printer, Download, FolderUp, Upload, Edit2, Check, ChevronUp, MapPin, Shield, ChevronRight, Building2, SlidersHorizontal, Trash2, Pencil, Plus, Link, AlertTriangle, RefreshCw, Scan, Camera, ScanLine, FileText, Image } from 'lucide-react';
|
|
84
86
|
|
|
85
87
|
var SEX_OPTIONS = [
|
|
86
88
|
{ value: "F", label: "Female" },
|
|
@@ -2287,6 +2289,35 @@ var TOOL_ICONS = {
|
|
|
2287
2289
|
)
|
|
2288
2290
|
}
|
|
2289
2291
|
),
|
|
2292
|
+
// Provider tools
|
|
2293
|
+
search_providers: /* @__PURE__ */ jsxs(
|
|
2294
|
+
"svg",
|
|
2295
|
+
{
|
|
2296
|
+
className: "h-4 w-4",
|
|
2297
|
+
fill: "none",
|
|
2298
|
+
viewBox: "0 0 24 24",
|
|
2299
|
+
stroke: "currentColor",
|
|
2300
|
+
strokeWidth: "1.5",
|
|
2301
|
+
children: [
|
|
2302
|
+
/* @__PURE__ */ jsx(
|
|
2303
|
+
"path",
|
|
2304
|
+
{
|
|
2305
|
+
strokeLinecap: "round",
|
|
2306
|
+
strokeLinejoin: "round",
|
|
2307
|
+
d: "M15 10.5a3 3 0 11-6 0 3 3 0 016 0z"
|
|
2308
|
+
}
|
|
2309
|
+
),
|
|
2310
|
+
/* @__PURE__ */ jsx(
|
|
2311
|
+
"path",
|
|
2312
|
+
{
|
|
2313
|
+
strokeLinecap: "round",
|
|
2314
|
+
strokeLinejoin: "round",
|
|
2315
|
+
d: "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z"
|
|
2316
|
+
}
|
|
2317
|
+
)
|
|
2318
|
+
]
|
|
2319
|
+
}
|
|
2320
|
+
),
|
|
2290
2321
|
// Default tool icon
|
|
2291
2322
|
default: /* @__PURE__ */ jsx(
|
|
2292
2323
|
"svg",
|
|
@@ -2390,6 +2421,34 @@ function ResourceLink({ link, onClick, className }) {
|
|
|
2390
2421
|
)
|
|
2391
2422
|
}
|
|
2392
2423
|
),
|
|
2424
|
+
provider: /* @__PURE__ */ jsxs(
|
|
2425
|
+
"svg",
|
|
2426
|
+
{
|
|
2427
|
+
className: "h-4 w-4",
|
|
2428
|
+
fill: "none",
|
|
2429
|
+
viewBox: "0 0 24 24",
|
|
2430
|
+
stroke: "currentColor",
|
|
2431
|
+
strokeWidth: "1.5",
|
|
2432
|
+
children: [
|
|
2433
|
+
/* @__PURE__ */ jsx(
|
|
2434
|
+
"path",
|
|
2435
|
+
{
|
|
2436
|
+
strokeLinecap: "round",
|
|
2437
|
+
strokeLinejoin: "round",
|
|
2438
|
+
d: "M15 10.5a3 3 0 11-6 0 3 3 0 016 0z"
|
|
2439
|
+
}
|
|
2440
|
+
),
|
|
2441
|
+
/* @__PURE__ */ jsx(
|
|
2442
|
+
"path",
|
|
2443
|
+
{
|
|
2444
|
+
strokeLinecap: "round",
|
|
2445
|
+
strokeLinejoin: "round",
|
|
2446
|
+
d: "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z"
|
|
2447
|
+
}
|
|
2448
|
+
)
|
|
2449
|
+
]
|
|
2450
|
+
}
|
|
2451
|
+
),
|
|
2393
2452
|
external: /* @__PURE__ */ jsx(
|
|
2394
2453
|
"svg",
|
|
2395
2454
|
{
|
|
@@ -2576,7 +2635,8 @@ var TOOL_FRIENDLY_NAMES = {
|
|
|
2576
2635
|
search_documents: "Searching documents",
|
|
2577
2636
|
create_order: "Creating order",
|
|
2578
2637
|
send_message: "Sending message",
|
|
2579
|
-
search: "Searching"
|
|
2638
|
+
search: "Searching",
|
|
2639
|
+
search_providers: "Searching for providers"
|
|
2580
2640
|
};
|
|
2581
2641
|
function getToolFriendlyName(toolName, status) {
|
|
2582
2642
|
const baseName = TOOL_FRIENDLY_NAMES[toolName] || toolName.replace(/_/g, " ");
|
|
@@ -2585,8 +2645,10 @@ function getToolFriendlyName(toolName, status) {
|
|
|
2585
2645
|
return baseName.replace("Creating", "Created");
|
|
2586
2646
|
if (baseName.startsWith("Scheduling"))
|
|
2587
2647
|
return baseName.replace("Scheduling", "Scheduled");
|
|
2648
|
+
if (baseName.startsWith("Searching for"))
|
|
2649
|
+
return baseName.replace("Searching for", "Found");
|
|
2588
2650
|
if (baseName.startsWith("Searching"))
|
|
2589
|
-
return baseName.replace("Searching", "
|
|
2651
|
+
return baseName.replace("Searching", "Found");
|
|
2590
2652
|
if (baseName.startsWith("Looking"))
|
|
2591
2653
|
return baseName.replace("Looking", "Found");
|
|
2592
2654
|
if (baseName.startsWith("Updating"))
|
|
@@ -2616,6 +2678,10 @@ function getParameterSummary(toolName, params) {
|
|
|
2616
2678
|
const date = paramMap.preferredDate || paramMap.date;
|
|
2617
2679
|
return date ? `${paramMap.patientName} on ${date}` : String(paramMap.patientName);
|
|
2618
2680
|
}
|
|
2681
|
+
if (toolName === "search_providers" && paramMap.zipcode) {
|
|
2682
|
+
const service = paramMap.service;
|
|
2683
|
+
return service ? `${service} near ${paramMap.zipcode}` : `near ${paramMap.zipcode}`;
|
|
2684
|
+
}
|
|
2619
2685
|
return null;
|
|
2620
2686
|
}
|
|
2621
2687
|
function MCPToolCallDisplay({
|
|
@@ -25097,9 +25163,13 @@ function RecurringServiceCard({
|
|
|
25097
25163
|
onDelete,
|
|
25098
25164
|
onEdit,
|
|
25099
25165
|
showProvider = true,
|
|
25166
|
+
state,
|
|
25100
25167
|
className,
|
|
25101
25168
|
labels = {}
|
|
25102
25169
|
}) {
|
|
25170
|
+
if (!service) {
|
|
25171
|
+
return null;
|
|
25172
|
+
}
|
|
25103
25173
|
const {
|
|
25104
25174
|
provider = "Provider",
|
|
25105
25175
|
occurrence = "Occurrence",
|
|
@@ -25126,56 +25196,188 @@ function RecurringServiceCard({
|
|
|
25126
25196
|
const getOccurrenceLabel = (occ) => {
|
|
25127
25197
|
return occurrenceLabels[occ] || occ;
|
|
25128
25198
|
};
|
|
25199
|
+
const effectiveState = state ?? "default";
|
|
25200
|
+
const stateStyles = {
|
|
25201
|
+
default: {
|
|
25202
|
+
border: "border-border",
|
|
25203
|
+
icon: null,
|
|
25204
|
+
showNote: !service?.overrideConsent
|
|
25205
|
+
// Still show consent note if needed
|
|
25206
|
+
},
|
|
25207
|
+
success: {
|
|
25208
|
+
border: "border-success/30",
|
|
25209
|
+
icon: /* @__PURE__ */ jsx("span", { className: "bg-success text-success-foreground flex h-5 w-5 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(
|
|
25210
|
+
"svg",
|
|
25211
|
+
{
|
|
25212
|
+
className: "h-3 w-3",
|
|
25213
|
+
fill: "none",
|
|
25214
|
+
viewBox: "0 0 24 24",
|
|
25215
|
+
stroke: "currentColor",
|
|
25216
|
+
strokeWidth: 3,
|
|
25217
|
+
children: /* @__PURE__ */ jsx(
|
|
25218
|
+
"path",
|
|
25219
|
+
{
|
|
25220
|
+
strokeLinecap: "round",
|
|
25221
|
+
strokeLinejoin: "round",
|
|
25222
|
+
d: "M5 13l4 4L19 7"
|
|
25223
|
+
}
|
|
25224
|
+
)
|
|
25225
|
+
}
|
|
25226
|
+
) }),
|
|
25227
|
+
showNote: false
|
|
25228
|
+
},
|
|
25229
|
+
primary: {
|
|
25230
|
+
border: "border-primary/30",
|
|
25231
|
+
icon: /* @__PURE__ */ jsx("span", { className: "bg-primary text-primary-foreground flex h-5 w-5 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(
|
|
25232
|
+
"svg",
|
|
25233
|
+
{
|
|
25234
|
+
className: "h-3 w-3",
|
|
25235
|
+
fill: "none",
|
|
25236
|
+
viewBox: "0 0 24 24",
|
|
25237
|
+
stroke: "currentColor",
|
|
25238
|
+
strokeWidth: 2,
|
|
25239
|
+
children: /* @__PURE__ */ jsx(
|
|
25240
|
+
"path",
|
|
25241
|
+
{
|
|
25242
|
+
strokeLinecap: "round",
|
|
25243
|
+
strokeLinejoin: "round",
|
|
25244
|
+
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
25245
|
+
}
|
|
25246
|
+
)
|
|
25247
|
+
}
|
|
25248
|
+
) }),
|
|
25249
|
+
showNote: false
|
|
25250
|
+
},
|
|
25251
|
+
warning: {
|
|
25252
|
+
border: "border-warning/30",
|
|
25253
|
+
icon: /* @__PURE__ */ jsx("span", { className: "bg-warning text-warning-foreground flex h-5 w-5 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxs("svg", { className: "h-3 w-3", fill: "currentColor", viewBox: "0 0 24 24", children: [
|
|
25254
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor" }),
|
|
25255
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4", className: "fill-warning" })
|
|
25256
|
+
] }) }),
|
|
25257
|
+
showNote: true
|
|
25258
|
+
},
|
|
25259
|
+
error: {
|
|
25260
|
+
border: "border-destructive/30",
|
|
25261
|
+
icon: /* @__PURE__ */ jsx("span", { className: "bg-destructive text-destructive-foreground flex h-5 w-5 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(
|
|
25262
|
+
"svg",
|
|
25263
|
+
{
|
|
25264
|
+
className: "h-3 w-3",
|
|
25265
|
+
fill: "none",
|
|
25266
|
+
viewBox: "0 0 24 24",
|
|
25267
|
+
stroke: "currentColor",
|
|
25268
|
+
strokeWidth: 3,
|
|
25269
|
+
children: /* @__PURE__ */ jsx(
|
|
25270
|
+
"path",
|
|
25271
|
+
{
|
|
25272
|
+
strokeLinecap: "round",
|
|
25273
|
+
strokeLinejoin: "round",
|
|
25274
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
25275
|
+
}
|
|
25276
|
+
)
|
|
25277
|
+
}
|
|
25278
|
+
) }),
|
|
25279
|
+
showNote: true
|
|
25280
|
+
},
|
|
25281
|
+
disabled: {
|
|
25282
|
+
border: "border-border",
|
|
25283
|
+
icon: null,
|
|
25284
|
+
showNote: false
|
|
25285
|
+
}
|
|
25286
|
+
};
|
|
25287
|
+
const currentStyle = stateStyles[effectiveState];
|
|
25288
|
+
const isDisabled = effectiveState === "disabled";
|
|
25129
25289
|
return /* @__PURE__ */ jsxs(
|
|
25130
25290
|
"div",
|
|
25131
25291
|
{
|
|
25132
25292
|
className: cn(
|
|
25133
|
-
"rounded-
|
|
25134
|
-
|
|
25293
|
+
"bg-card text-card-foreground rounded-xl border-2 shadow-sm",
|
|
25294
|
+
currentStyle.border,
|
|
25295
|
+
isDisabled && "opacity-50",
|
|
25296
|
+
onEdit && !isDisabled && "cursor-pointer transition-shadow hover:shadow-md",
|
|
25135
25297
|
className
|
|
25136
25298
|
),
|
|
25137
|
-
onClick: () => onEdit?.(service),
|
|
25138
|
-
role: onEdit ? "button" : void 0,
|
|
25139
|
-
tabIndex: onEdit ? 0 : void 0,
|
|
25299
|
+
onClick: () => !isDisabled && onEdit?.(service),
|
|
25300
|
+
role: onEdit && !isDisabled ? "button" : void 0,
|
|
25301
|
+
tabIndex: onEdit && !isDisabled ? 0 : void 0,
|
|
25140
25302
|
onKeyDown: (e) => {
|
|
25141
|
-
if (onEdit && (e.key === "Enter" || e.key === " ")) {
|
|
25303
|
+
if (onEdit && !isDisabled && (e.key === "Enter" || e.key === " ")) {
|
|
25142
25304
|
e.preventDefault();
|
|
25143
25305
|
onEdit(service);
|
|
25144
25306
|
}
|
|
25145
25307
|
},
|
|
25146
25308
|
children: [
|
|
25147
|
-
/* @__PURE__ */
|
|
25148
|
-
|
|
25149
|
-
|
|
25150
|
-
|
|
25151
|
-
|
|
25309
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
|
|
25310
|
+
currentStyle.icon,
|
|
25311
|
+
/* @__PURE__ */ jsx(
|
|
25312
|
+
"h6",
|
|
25313
|
+
{
|
|
25314
|
+
className: "truncate text-sm font-semibold",
|
|
25315
|
+
title: service.serviceName,
|
|
25316
|
+
children: service.serviceName
|
|
25317
|
+
}
|
|
25318
|
+
)
|
|
25319
|
+
] }),
|
|
25320
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4 px-4 pb-4", children: [
|
|
25321
|
+
showProvider && service.providerName && /* @__PURE__ */ jsxs("div", { children: [
|
|
25322
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: provider }),
|
|
25323
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted truncate rounded-md px-3 py-2 text-sm", children: service.providerName })
|
|
25324
|
+
] }),
|
|
25325
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
25326
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: occurrence }),
|
|
25327
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted rounded-md px-3 py-2 text-sm", children: getOccurrenceLabel(service.occurrence) })
|
|
25328
|
+
] }),
|
|
25329
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
25330
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: nextOrder }),
|
|
25331
|
+
/* @__PURE__ */ jsx(
|
|
25332
|
+
"div",
|
|
25333
|
+
{
|
|
25334
|
+
className: "bg-muted rounded-md px-3 py-2 text-sm",
|
|
25335
|
+
title: service.nextOrder?.toString(),
|
|
25336
|
+
children: formatDate4(service.nextOrder)
|
|
25337
|
+
}
|
|
25338
|
+
)
|
|
25152
25339
|
] }),
|
|
25153
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
25154
|
-
/* @__PURE__ */ jsx("
|
|
25155
|
-
|
|
25340
|
+
effectiveState === "warning" && /* @__PURE__ */ jsxs("div", { className: "bg-warning/10 text-warning-800 dark:text-warning-200 rounded-md px-3 py-2 text-xs", children: [
|
|
25341
|
+
/* @__PURE__ */ jsx("i", { className: "fas fa-exclamation-triangle mr-1" }),
|
|
25342
|
+
consentNote
|
|
25156
25343
|
] }),
|
|
25157
|
-
/* @__PURE__ */
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
/* @__PURE__ */ jsx("span", { title: service.nextOrder?.toString(), children: formatDate4(service.nextOrder) })
|
|
25344
|
+
effectiveState === "error" && /* @__PURE__ */ jsxs("div", { className: "bg-destructive/10 text-destructive rounded-md px-3 py-2 text-xs", children: [
|
|
25345
|
+
/* @__PURE__ */ jsx("i", { className: "fas fa-times-circle mr-1" }),
|
|
25346
|
+
consentNote
|
|
25161
25347
|
] }),
|
|
25162
|
-
!
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25348
|
+
!isDisabled && /* @__PURE__ */ jsxs(
|
|
25349
|
+
"button",
|
|
25350
|
+
{
|
|
25351
|
+
type: "button",
|
|
25352
|
+
onClick: (e) => {
|
|
25353
|
+
e.stopPropagation();
|
|
25354
|
+
onDelete?.(service);
|
|
25355
|
+
},
|
|
25356
|
+
className: "text-muted-foreground hover:text-destructive mx-auto flex items-center gap-1 text-xs transition-colors",
|
|
25357
|
+
children: [
|
|
25358
|
+
/* @__PURE__ */ jsx(
|
|
25359
|
+
"svg",
|
|
25360
|
+
{
|
|
25361
|
+
className: "h-3 w-3",
|
|
25362
|
+
fill: "none",
|
|
25363
|
+
viewBox: "0 0 24 24",
|
|
25364
|
+
stroke: "currentColor",
|
|
25365
|
+
strokeWidth: 2,
|
|
25366
|
+
children: /* @__PURE__ */ jsx(
|
|
25367
|
+
"path",
|
|
25368
|
+
{
|
|
25369
|
+
strokeLinecap: "round",
|
|
25370
|
+
strokeLinejoin: "round",
|
|
25371
|
+
d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
|
25372
|
+
}
|
|
25373
|
+
)
|
|
25374
|
+
}
|
|
25375
|
+
),
|
|
25376
|
+
deleteLabel
|
|
25377
|
+
]
|
|
25378
|
+
}
|
|
25379
|
+
)
|
|
25380
|
+
] })
|
|
25179
25381
|
]
|
|
25180
25382
|
}
|
|
25181
25383
|
);
|
|
@@ -25191,7 +25393,7 @@ function RecurringServiceAddCard({
|
|
|
25191
25393
|
type: "button",
|
|
25192
25394
|
onClick,
|
|
25193
25395
|
className: cn(
|
|
25194
|
-
"text-muted-foreground hover:border-primary hover:bg-primary/5 hover:text-primary flex min-h-[200px] w-full flex-col items-center justify-center rounded-
|
|
25396
|
+
"text-muted-foreground hover:border-primary hover:bg-primary/5 hover:text-primary border-border bg-muted/50 flex min-h-[200px] w-full flex-col items-center justify-center rounded-xl border-2 border-dashed p-4 transition-colors",
|
|
25195
25397
|
className
|
|
25196
25398
|
),
|
|
25197
25399
|
children: [
|
|
@@ -25248,15 +25450,15 @@ function RecurringServiceSetupModal({
|
|
|
25248
25450
|
onSave(formData);
|
|
25249
25451
|
};
|
|
25250
25452
|
if (!open) return null;
|
|
25251
|
-
return /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center
|
|
25453
|
+
return /* @__PURE__ */ jsx("div", { className: "bg-foreground/50 fixed inset-0 z-50 flex items-center justify-center", children: /* @__PURE__ */ jsxs(
|
|
25252
25454
|
"div",
|
|
25253
25455
|
{
|
|
25254
25456
|
className: cn(
|
|
25255
|
-
"w-full max-w-lg rounded-lg
|
|
25457
|
+
"bg-card text-card-foreground w-full max-w-lg rounded-lg shadow-xl",
|
|
25256
25458
|
className
|
|
25257
25459
|
),
|
|
25258
25460
|
children: [
|
|
25259
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-primary flex items-center justify-between
|
|
25461
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-primary text-primary-foreground flex items-center justify-between p-4", children: [
|
|
25260
25462
|
/* @__PURE__ */ jsx("h4", { className: "text-lg font-semibold", children: title }),
|
|
25261
25463
|
/* @__PURE__ */ jsx(
|
|
25262
25464
|
"button",
|
|
@@ -25270,13 +25472,13 @@ function RecurringServiceSetupModal({
|
|
|
25270
25472
|
] }),
|
|
25271
25473
|
/* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "p-6", children: [
|
|
25272
25474
|
showProviderSelector && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
25273
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-
|
|
25475
|
+
/* @__PURE__ */ jsx("label", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: provider }),
|
|
25274
25476
|
/* @__PURE__ */ jsxs(
|
|
25275
25477
|
"select",
|
|
25276
25478
|
{
|
|
25277
25479
|
value: formData.providerId,
|
|
25278
25480
|
onChange: (e) => setFormData({ ...formData, providerId: e.target.value }),
|
|
25279
|
-
className: "w-full rounded-lg border
|
|
25481
|
+
className: "bg-card border-input focus:ring-primary w-full rounded-lg border p-2 focus:ring-2 focus:outline-none",
|
|
25280
25482
|
required: showProviderSelector,
|
|
25281
25483
|
children: [
|
|
25282
25484
|
/* @__PURE__ */ jsx("option", { value: "", children: "Select provider..." }),
|
|
@@ -25286,13 +25488,13 @@ function RecurringServiceSetupModal({
|
|
|
25286
25488
|
)
|
|
25287
25489
|
] }),
|
|
25288
25490
|
/* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
25289
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-
|
|
25491
|
+
/* @__PURE__ */ jsx("label", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: service }),
|
|
25290
25492
|
/* @__PURE__ */ jsxs(
|
|
25291
25493
|
"select",
|
|
25292
25494
|
{
|
|
25293
25495
|
value: formData.serviceId,
|
|
25294
25496
|
onChange: (e) => setFormData({ ...formData, serviceId: e.target.value }),
|
|
25295
|
-
className: "w-full rounded-lg border
|
|
25497
|
+
className: "bg-card border-input focus:ring-primary w-full rounded-lg border p-2 focus:ring-2 focus:outline-none",
|
|
25296
25498
|
required: true,
|
|
25297
25499
|
children: [
|
|
25298
25500
|
/* @__PURE__ */ jsx("option", { value: "", children: "Select service..." }),
|
|
@@ -25302,13 +25504,13 @@ function RecurringServiceSetupModal({
|
|
|
25302
25504
|
)
|
|
25303
25505
|
] }),
|
|
25304
25506
|
/* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
25305
|
-
/* @__PURE__ */ jsx("label", { className: "mb-1 block text-
|
|
25507
|
+
/* @__PURE__ */ jsx("label", { className: "text-muted-foreground mb-1 block text-xs font-semibold tracking-wider uppercase", children: occurrence }),
|
|
25306
25508
|
/* @__PURE__ */ jsxs(
|
|
25307
25509
|
"select",
|
|
25308
25510
|
{
|
|
25309
25511
|
value: formData.occurrence,
|
|
25310
25512
|
onChange: (e) => setFormData({ ...formData, occurrence: e.target.value }),
|
|
25311
|
-
className: "w-full rounded-lg border
|
|
25513
|
+
className: "bg-card border-input focus:ring-primary w-full rounded-lg border p-2 focus:ring-2 focus:outline-none",
|
|
25312
25514
|
required: true,
|
|
25313
25515
|
children: [
|
|
25314
25516
|
/* @__PURE__ */ jsx("option", { value: "monthly", children: "Monthly" }),
|
|
@@ -25330,7 +25532,7 @@ function RecurringServiceSetupModal({
|
|
|
25330
25532
|
...formData,
|
|
25331
25533
|
overrideConsent: e.target.checked
|
|
25332
25534
|
}),
|
|
25333
|
-
className: "h-4 w-4 rounded
|
|
25535
|
+
className: "border-input accent-primary h-4 w-4 rounded"
|
|
25334
25536
|
}
|
|
25335
25537
|
),
|
|
25336
25538
|
/* @__PURE__ */ jsx("span", { className: "text-sm", children: overrideConsent })
|
|
@@ -25343,7 +25545,7 @@ function RecurringServiceSetupModal({
|
|
|
25343
25545
|
{
|
|
25344
25546
|
type: "button",
|
|
25345
25547
|
onClick: onClose,
|
|
25346
|
-
className: "rounded-lg border
|
|
25548
|
+
className: "border-border text-muted-foreground hover:bg-muted rounded-lg border px-4 py-2 transition-colors",
|
|
25347
25549
|
children: cancel
|
|
25348
25550
|
}
|
|
25349
25551
|
),
|
|
@@ -25352,7 +25554,7 @@ function RecurringServiceSetupModal({
|
|
|
25352
25554
|
{
|
|
25353
25555
|
type: "submit",
|
|
25354
25556
|
disabled: saving,
|
|
25355
|
-
className: "bg-primary hover:bg-primary/90 rounded-lg px-4 py-2
|
|
25557
|
+
className: "bg-primary text-primary-foreground hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground rounded-lg px-4 py-2 transition-colors",
|
|
25356
25558
|
children: saving ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
25357
25559
|
/* @__PURE__ */ jsx("i", { className: "fas fa-spinner fa-spin" }),
|
|
25358
25560
|
"Saving..."
|
|
@@ -25432,16 +25634,16 @@ function RejectionModal({
|
|
|
25432
25634
|
};
|
|
25433
25635
|
return /* @__PURE__ */ jsx(Modal, { open, onOpenChange, size: "md", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
|
|
25434
25636
|
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(ModalTitle, { children: title }) }),
|
|
25435
|
-
/* @__PURE__ */ jsxs(
|
|
25436
|
-
(description || itemDescription) && /* @__PURE__ */ jsxs("div", { className: "rounded-lg
|
|
25437
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-
|
|
25438
|
-
itemDescription && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm font-medium
|
|
25637
|
+
/* @__PURE__ */ jsxs(ModalBody, { className: "space-y-4", children: [
|
|
25638
|
+
(description || itemDescription) && /* @__PURE__ */ jsxs("div", { className: "bg-muted rounded-lg p-3", children: [
|
|
25639
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: description }),
|
|
25640
|
+
itemDescription && /* @__PURE__ */ jsx("p", { className: "text-foreground mt-1 text-sm font-medium", children: itemDescription })
|
|
25439
25641
|
] }),
|
|
25440
|
-
variant === "danger" && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 rounded-lg border
|
|
25642
|
+
variant === "danger" && /* @__PURE__ */ jsxs("div", { className: "border-destructive/30 bg-destructive/10 flex items-start gap-3 rounded-lg border p-3", children: [
|
|
25441
25643
|
/* @__PURE__ */ jsx(
|
|
25442
25644
|
"svg",
|
|
25443
25645
|
{
|
|
25444
|
-
className: "mt-0.5 h-5 w-5 flex-shrink-0
|
|
25646
|
+
className: "text-destructive mt-0.5 h-5 w-5 flex-shrink-0",
|
|
25445
25647
|
fill: "none",
|
|
25446
25648
|
viewBox: "0 0 24 24",
|
|
25447
25649
|
stroke: "currentColor",
|
|
@@ -25456,14 +25658,17 @@ function RejectionModal({
|
|
|
25456
25658
|
)
|
|
25457
25659
|
}
|
|
25458
25660
|
),
|
|
25459
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
25661
|
+
/* @__PURE__ */ jsx("p", { className: "text-destructive text-sm", children: "This action cannot be undone. The affected party will be notified of this rejection." })
|
|
25460
25662
|
] }),
|
|
25461
25663
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
25462
|
-
/* @__PURE__ */ jsx("span", { className: "mb-2 block text-sm font-medium
|
|
25664
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground mb-2 block text-sm font-medium", children: "Reason for rejection" }),
|
|
25463
25665
|
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: reasons.map((reason) => /* @__PURE__ */ jsxs(
|
|
25464
25666
|
"label",
|
|
25465
25667
|
{
|
|
25466
|
-
className:
|
|
25668
|
+
className: cn(
|
|
25669
|
+
"flex cursor-pointer items-center gap-3 rounded-lg border p-3 transition-colors",
|
|
25670
|
+
selectedReasonId === reason.id ? "border-primary bg-primary/10" : "border-border hover:border-muted-foreground/50"
|
|
25671
|
+
),
|
|
25467
25672
|
children: [
|
|
25468
25673
|
/* @__PURE__ */ jsx(
|
|
25469
25674
|
"input",
|
|
@@ -25473,25 +25678,25 @@ function RejectionModal({
|
|
|
25473
25678
|
value: reason.id,
|
|
25474
25679
|
checked: selectedReasonId === reason.id,
|
|
25475
25680
|
onChange: (e) => setSelectedReasonId(e.target.value),
|
|
25476
|
-
className: "
|
|
25681
|
+
className: "text-primary focus:ring-primary border-border h-4 w-4"
|
|
25477
25682
|
}
|
|
25478
25683
|
),
|
|
25479
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
25480
|
-
reason.requiresDetails && /* @__PURE__ */ jsx("span", { className: "text-
|
|
25684
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground text-sm", children: reason.label }),
|
|
25685
|
+
reason.requiresDetails && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: "(requires details)" })
|
|
25481
25686
|
]
|
|
25482
25687
|
},
|
|
25483
25688
|
reason.id
|
|
25484
25689
|
)) })
|
|
25485
25690
|
] }),
|
|
25486
25691
|
showDetails && /* @__PURE__ */ jsxs("div", { children: [
|
|
25487
|
-
/* @__PURE__ */ jsxs("label", { className: "mb-1 block text-sm font-medium
|
|
25692
|
+
/* @__PURE__ */ jsxs("label", { className: "text-foreground mb-1 block text-sm font-medium", children: [
|
|
25488
25693
|
detailsLabel,
|
|
25489
|
-
needsDetails && /* @__PURE__ */ jsx("span", { className: "ml-1
|
|
25694
|
+
needsDetails && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
25490
25695
|
] }),
|
|
25491
25696
|
/* @__PURE__ */ jsx(
|
|
25492
25697
|
"textarea",
|
|
25493
25698
|
{
|
|
25494
|
-
className: "w-full rounded-md border
|
|
25699
|
+
className: "bg-background text-foreground border-input focus:ring-ring w-full rounded-md border px-3 py-2 shadow-sm focus:ring-2 focus:outline-none",
|
|
25495
25700
|
rows: 3,
|
|
25496
25701
|
value: details,
|
|
25497
25702
|
onChange: (e) => setDetails(e.target.value),
|
|
@@ -25499,7 +25704,7 @@ function RejectionModal({
|
|
|
25499
25704
|
required: needsDetails
|
|
25500
25705
|
}
|
|
25501
25706
|
),
|
|
25502
|
-
needsDetails && !details.trim() && selectedReasonId && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs
|
|
25707
|
+
needsDetails && !details.trim() && selectedReasonId && /* @__PURE__ */ jsx("p", { className: "text-destructive mt-1 text-xs", children: "Please provide additional details for this rejection reason." })
|
|
25503
25708
|
] })
|
|
25504
25709
|
] }),
|
|
25505
25710
|
/* @__PURE__ */ jsxs(ModalFooter, { children: [
|
|
@@ -25802,7 +26007,7 @@ function ReportDashboard({
|
|
|
25802
26007
|
] })
|
|
25803
26008
|
] });
|
|
25804
26009
|
}
|
|
25805
|
-
|
|
26010
|
+
var ResultsEntryForm = React46.forwardRef(function ResultsEntryForm2({
|
|
25806
26011
|
employeeFirstName,
|
|
25807
26012
|
employeeLastName,
|
|
25808
26013
|
initialData = {},
|
|
@@ -25812,7 +26017,7 @@ function ResultsEntryForm({
|
|
|
25812
26017
|
onSubmit,
|
|
25813
26018
|
labels = {},
|
|
25814
26019
|
className
|
|
25815
|
-
}) {
|
|
26020
|
+
}, ref) {
|
|
25816
26021
|
const {
|
|
25817
26022
|
testResults = "Test Results",
|
|
25818
26023
|
passed = "Passed",
|
|
@@ -25869,39 +26074,60 @@ function ResultsEntryForm({
|
|
|
25869
26074
|
(prev) => prev.includes(contactId) ? prev.filter((id) => id !== contactId) : [...prev, contactId]
|
|
25870
26075
|
);
|
|
25871
26076
|
};
|
|
26077
|
+
const validateAndSubmit = React46.useCallback(() => {
|
|
26078
|
+
if (!result) {
|
|
26079
|
+
setShowError(true);
|
|
26080
|
+
return;
|
|
26081
|
+
}
|
|
26082
|
+
setShowError(false);
|
|
26083
|
+
onSubmit({
|
|
26084
|
+
result,
|
|
26085
|
+
alternateText: alternateText || void 0,
|
|
26086
|
+
dateDrawn: dateDrawnValue || void 0,
|
|
26087
|
+
dateCompleted: dateCompletedValue || void 0,
|
|
26088
|
+
recommendations: recommendations || void 0,
|
|
26089
|
+
files: files.length > 0 ? files : void 0,
|
|
26090
|
+
providerContacts: selectedContacts.length > 0 ? selectedContacts : void 0,
|
|
26091
|
+
applyToAllServices: applyToAll
|
|
26092
|
+
});
|
|
26093
|
+
}, [
|
|
26094
|
+
result,
|
|
26095
|
+
alternateText,
|
|
26096
|
+
dateDrawnValue,
|
|
26097
|
+
dateCompletedValue,
|
|
26098
|
+
recommendations,
|
|
26099
|
+
files,
|
|
26100
|
+
selectedContacts,
|
|
26101
|
+
applyToAll,
|
|
26102
|
+
onSubmit
|
|
26103
|
+
]);
|
|
26104
|
+
React46.useImperativeHandle(
|
|
26105
|
+
ref,
|
|
26106
|
+
() => ({
|
|
26107
|
+
submit: validateAndSubmit
|
|
26108
|
+
}),
|
|
26109
|
+
[validateAndSubmit]
|
|
26110
|
+
);
|
|
25872
26111
|
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-6", className), children: [
|
|
25873
26112
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center", children: [
|
|
25874
|
-
/* @__PURE__ */
|
|
25875
|
-
|
|
25876
|
-
|
|
25877
|
-
|
|
25878
|
-
|
|
25879
|
-
|
|
25880
|
-
|
|
25881
|
-
|
|
25882
|
-
|
|
25883
|
-
|
|
25884
|
-
|
|
25885
|
-
|
|
25886
|
-
|
|
25887
|
-
|
|
25888
|
-
}
|
|
25889
|
-
|
|
25890
|
-
|
|
25891
|
-
|
|
25892
|
-
{
|
|
25893
|
-
name: "result",
|
|
25894
|
-
value: "failed",
|
|
25895
|
-
label: failed,
|
|
25896
|
-
checked: result === "failed",
|
|
25897
|
-
onChange: () => {
|
|
25898
|
-
setResult("failed");
|
|
25899
|
-
setShowError(false);
|
|
25900
|
-
}
|
|
25901
|
-
}
|
|
25902
|
-
)
|
|
25903
|
-
] })
|
|
25904
|
-
] }),
|
|
26113
|
+
/* @__PURE__ */ jsx("div", { className: "sm:w-1/2", children: /* @__PURE__ */ jsxs(
|
|
26114
|
+
RadioGroup,
|
|
26115
|
+
{
|
|
26116
|
+
name: "result",
|
|
26117
|
+
label: testResults,
|
|
26118
|
+
value: result ?? "",
|
|
26119
|
+
onValueChange: (value) => {
|
|
26120
|
+
setResult(value);
|
|
26121
|
+
setShowError(false);
|
|
26122
|
+
},
|
|
26123
|
+
orientation: "horizontal",
|
|
26124
|
+
error: showError ? pleaseSelectResult : void 0,
|
|
26125
|
+
children: [
|
|
26126
|
+
/* @__PURE__ */ jsx(Radio, { value: "passed", label: passed }),
|
|
26127
|
+
/* @__PURE__ */ jsx(Radio, { value: "failed", label: failed })
|
|
26128
|
+
]
|
|
26129
|
+
}
|
|
26130
|
+
) }),
|
|
25905
26131
|
/* @__PURE__ */ jsx("div", { className: "sm:w-1/2", children: /* @__PURE__ */ jsx(
|
|
25906
26132
|
Input,
|
|
25907
26133
|
{
|
|
@@ -26077,76 +26303,141 @@ function ResultsEntryForm({
|
|
|
26077
26303
|
] }),
|
|
26078
26304
|
showError && /* @__PURE__ */ jsx("p", { className: "text-destructive text-sm font-medium", children: pleaseSelectResult })
|
|
26079
26305
|
] });
|
|
26080
|
-
}
|
|
26081
|
-
function
|
|
26306
|
+
});
|
|
26307
|
+
function ResultsEntryModal({
|
|
26082
26308
|
serviceName,
|
|
26083
26309
|
employeeFirstName,
|
|
26084
26310
|
employeeLastName,
|
|
26085
|
-
|
|
26086
|
-
|
|
26311
|
+
open,
|
|
26312
|
+
onOpenChange,
|
|
26087
26313
|
onSubmit,
|
|
26314
|
+
isSubmitting = false,
|
|
26088
26315
|
labels = {},
|
|
26089
26316
|
...props
|
|
26090
26317
|
}) {
|
|
26091
26318
|
const { submit = "Submit", close = "Close" } = labels;
|
|
26319
|
+
const formRef = React46.useRef(null);
|
|
26092
26320
|
const employeeName = employeeFirstName || employeeLastName ? `${employeeFirstName ?? ""} ${employeeLastName ?? ""}`.trim() : void 0;
|
|
26093
|
-
|
|
26094
|
-
|
|
26095
|
-
|
|
26096
|
-
|
|
26097
|
-
|
|
26098
|
-
|
|
26099
|
-
|
|
26100
|
-
|
|
26101
|
-
|
|
26321
|
+
const handleSubmitClick = () => {
|
|
26322
|
+
formRef.current?.submit();
|
|
26323
|
+
};
|
|
26324
|
+
return /* @__PURE__ */ jsxs(Modal, { open, onOpenChange, size: "2xl", children: [
|
|
26325
|
+
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(ModalTitle, { children: serviceName }) }),
|
|
26326
|
+
/* @__PURE__ */ jsxs(ModalBody, { children: [
|
|
26327
|
+
employeeName && /* @__PURE__ */ jsx("div", { className: "bg-muted mb-4 rounded-lg p-3", children: /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
26328
|
+
"Employee:",
|
|
26329
|
+
" ",
|
|
26330
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: employeeName })
|
|
26331
|
+
] }) }),
|
|
26332
|
+
/* @__PURE__ */ jsx(
|
|
26333
|
+
ResultsEntryForm,
|
|
26334
|
+
{
|
|
26335
|
+
ref: formRef,
|
|
26336
|
+
employeeFirstName,
|
|
26337
|
+
employeeLastName,
|
|
26338
|
+
onSubmit,
|
|
26339
|
+
labels,
|
|
26340
|
+
...props
|
|
26341
|
+
}
|
|
26342
|
+
)
|
|
26102
26343
|
] }),
|
|
26103
|
-
/* @__PURE__ */
|
|
26104
|
-
ResultsEntryForm,
|
|
26105
|
-
{
|
|
26106
|
-
serviceName,
|
|
26107
|
-
employeeFirstName,
|
|
26108
|
-
employeeLastName,
|
|
26109
|
-
onSubmit: handleSubmit,
|
|
26110
|
-
labels,
|
|
26111
|
-
...props
|
|
26112
|
-
}
|
|
26113
|
-
) }),
|
|
26114
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-3 border-t p-4", children: [
|
|
26115
|
-
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: onClose, children: close }),
|
|
26344
|
+
/* @__PURE__ */ jsxs(ModalFooter, { children: [
|
|
26116
26345
|
/* @__PURE__ */ jsx(
|
|
26117
26346
|
Button,
|
|
26118
26347
|
{
|
|
26119
|
-
|
|
26120
|
-
|
|
26121
|
-
|
|
26122
|
-
|
|
26123
|
-
|
|
26124
|
-
},
|
|
26125
|
-
children: submit
|
|
26348
|
+
type: "button",
|
|
26349
|
+
variant: "outline",
|
|
26350
|
+
onClick: () => onOpenChange(false),
|
|
26351
|
+
disabled: isSubmitting,
|
|
26352
|
+
children: close
|
|
26126
26353
|
}
|
|
26127
|
-
)
|
|
26128
|
-
|
|
26129
|
-
|
|
26130
|
-
|
|
26131
|
-
|
|
26132
|
-
|
|
26133
|
-
|
|
26134
|
-
|
|
26135
|
-
|
|
26136
|
-
|
|
26137
|
-
|
|
26138
|
-
|
|
26139
|
-
|
|
26140
|
-
|
|
26141
|
-
|
|
26142
|
-
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26147
|
-
|
|
26148
|
-
|
|
26149
|
-
|
|
26354
|
+
),
|
|
26355
|
+
/* @__PURE__ */ jsx(
|
|
26356
|
+
Button,
|
|
26357
|
+
{
|
|
26358
|
+
type: "button",
|
|
26359
|
+
onClick: handleSubmitClick,
|
|
26360
|
+
disabled: isSubmitting,
|
|
26361
|
+
children: isSubmitting ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26362
|
+
/* @__PURE__ */ jsxs(
|
|
26363
|
+
"svg",
|
|
26364
|
+
{
|
|
26365
|
+
className: "mr-2 -ml-1 h-4 w-4 animate-spin",
|
|
26366
|
+
fill: "none",
|
|
26367
|
+
viewBox: "0 0 24 24",
|
|
26368
|
+
children: [
|
|
26369
|
+
/* @__PURE__ */ jsx(
|
|
26370
|
+
"circle",
|
|
26371
|
+
{
|
|
26372
|
+
className: "opacity-25",
|
|
26373
|
+
cx: "12",
|
|
26374
|
+
cy: "12",
|
|
26375
|
+
r: "10",
|
|
26376
|
+
stroke: "currentColor",
|
|
26377
|
+
strokeWidth: "4"
|
|
26378
|
+
}
|
|
26379
|
+
),
|
|
26380
|
+
/* @__PURE__ */ jsx(
|
|
26381
|
+
"path",
|
|
26382
|
+
{
|
|
26383
|
+
className: "opacity-75",
|
|
26384
|
+
fill: "currentColor",
|
|
26385
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
26386
|
+
}
|
|
26387
|
+
)
|
|
26388
|
+
]
|
|
26389
|
+
}
|
|
26390
|
+
),
|
|
26391
|
+
"Processing..."
|
|
26392
|
+
] }) : submit
|
|
26393
|
+
}
|
|
26394
|
+
)
|
|
26395
|
+
] })
|
|
26396
|
+
] });
|
|
26397
|
+
}
|
|
26398
|
+
function ResultsEntryCard({
|
|
26399
|
+
isOpen,
|
|
26400
|
+
onClose,
|
|
26401
|
+
onSubmit,
|
|
26402
|
+
...restProps
|
|
26403
|
+
}) {
|
|
26404
|
+
const handleSubmit = (data) => {
|
|
26405
|
+
onSubmit(data);
|
|
26406
|
+
onClose();
|
|
26407
|
+
};
|
|
26408
|
+
return /* @__PURE__ */ jsx(
|
|
26409
|
+
ResultsEntryModal,
|
|
26410
|
+
{
|
|
26411
|
+
open: isOpen,
|
|
26412
|
+
onOpenChange: (nextOpen) => {
|
|
26413
|
+
if (!nextOpen) {
|
|
26414
|
+
onClose();
|
|
26415
|
+
}
|
|
26416
|
+
},
|
|
26417
|
+
onSubmit: handleSubmit,
|
|
26418
|
+
...restProps
|
|
26419
|
+
}
|
|
26420
|
+
);
|
|
26421
|
+
}
|
|
26422
|
+
function ScheduleCalendar({
|
|
26423
|
+
appointments,
|
|
26424
|
+
selectedDate = /* @__PURE__ */ new Date(),
|
|
26425
|
+
onDateSelect,
|
|
26426
|
+
onAppointmentClick,
|
|
26427
|
+
onAddAppointment,
|
|
26428
|
+
view = "day",
|
|
26429
|
+
startHour = 7,
|
|
26430
|
+
endHour = 18,
|
|
26431
|
+
isLoading = false,
|
|
26432
|
+
className = ""
|
|
26433
|
+
}) {
|
|
26434
|
+
const [currentDate, setCurrentDate] = React46.useState(selectedDate);
|
|
26435
|
+
const formatTime4 = (date) => {
|
|
26436
|
+
const d = typeof date === "string" ? new Date(date) : date;
|
|
26437
|
+
return d.toLocaleTimeString("en-US", {
|
|
26438
|
+
hour: "numeric",
|
|
26439
|
+
minute: "2-digit",
|
|
26440
|
+
hour12: true
|
|
26150
26441
|
});
|
|
26151
26442
|
};
|
|
26152
26443
|
const isSameDay = (date1, date2) => {
|
|
@@ -27325,42 +27616,42 @@ function ServiceCard({
|
|
|
27325
27616
|
return /* @__PURE__ */ jsx(
|
|
27326
27617
|
Card,
|
|
27327
27618
|
{
|
|
27328
|
-
className: `h-full transition-all duration-200 ${onClick ? "cursor-pointer hover:shadow-md" : ""} ${selected ? "ring-
|
|
27619
|
+
className: `h-full transition-all duration-200 ${onClick ? "cursor-pointer hover:shadow-md" : ""} ${selected ? "ring-primary ring-2" : ""} ${!currentlyOffered ? "opacity-60" : ""} ${className} `.trim(),
|
|
27329
27620
|
onClick: onClick ? handleCardClick : void 0,
|
|
27330
27621
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col p-4", children: [
|
|
27331
27622
|
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-start justify-between gap-2", children: [
|
|
27332
27623
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
27333
|
-
/* @__PURE__ */ jsx("h3", { className: "truncate font-semibold
|
|
27334
|
-
category && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs
|
|
27624
|
+
/* @__PURE__ */ jsx("h3", { className: "text-foreground truncate font-semibold", children: name }),
|
|
27625
|
+
category && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-0.5 text-xs", children: category })
|
|
27335
27626
|
] }),
|
|
27336
27627
|
!currentlyOffered && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: "Not Offered" })
|
|
27337
27628
|
] }),
|
|
27338
|
-
description && /* @__PURE__ */ jsx("p", { className: "mb-3 line-clamp-2 text-sm
|
|
27629
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-3 line-clamp-2 text-sm", children: description }),
|
|
27339
27630
|
tags.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3 flex flex-wrap gap-1", children: [
|
|
27340
27631
|
tags.slice(0, 3).map((tag) => /* @__PURE__ */ jsx(
|
|
27341
27632
|
"span",
|
|
27342
27633
|
{
|
|
27343
|
-
className: "inline-flex items-center rounded
|
|
27634
|
+
className: "bg-muted text-muted-foreground inline-flex items-center rounded px-2 py-0.5 text-xs font-medium",
|
|
27344
27635
|
children: tag
|
|
27345
27636
|
},
|
|
27346
27637
|
tag
|
|
27347
27638
|
)),
|
|
27348
|
-
tags.length > 3 && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
27639
|
+
tags.length > 3 && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
27349
27640
|
"+",
|
|
27350
27641
|
tags.length - 3
|
|
27351
27642
|
] })
|
|
27352
27643
|
] }),
|
|
27353
27644
|
/* @__PURE__ */ jsxs("div", { className: "mt-auto", children: [
|
|
27354
27645
|
price !== void 0 && /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-baseline justify-between", children: [
|
|
27355
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium
|
|
27356
|
-
/* @__PURE__ */ jsx("span", { className: "text-lg font-bold
|
|
27646
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs font-medium uppercase", children: "Base Price" }),
|
|
27647
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground text-lg font-bold", children: formatCurrency2(price, currency) })
|
|
27357
27648
|
] }),
|
|
27358
27649
|
showInventory && /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between text-sm", children: [
|
|
27359
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
27650
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Inventory" }),
|
|
27360
27651
|
/* @__PURE__ */ jsxs(
|
|
27361
27652
|
"span",
|
|
27362
27653
|
{
|
|
27363
|
-
className: `font-medium ${isLowInventory ? "text-
|
|
27654
|
+
className: `font-medium ${isLowInventory ? "text-destructive" : "text-foreground"}`,
|
|
27364
27655
|
children: [
|
|
27365
27656
|
inventoryCount,
|
|
27366
27657
|
inventoryTotal && ` / ${inventoryTotal}`
|
|
@@ -27368,53 +27659,19 @@ function ServiceCard({
|
|
|
27368
27659
|
}
|
|
27369
27660
|
)
|
|
27370
27661
|
] }),
|
|
27371
|
-
(hasCustomAvailability || customPricingCount > 0) && /* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center gap-2 text-xs
|
|
27372
|
-
/* @__PURE__ */ jsx(
|
|
27373
|
-
"svg",
|
|
27374
|
-
{
|
|
27375
|
-
className: "h-3.5 w-3.5",
|
|
27376
|
-
fill: "none",
|
|
27377
|
-
viewBox: "0 0 24 24",
|
|
27378
|
-
stroke: "currentColor",
|
|
27379
|
-
children: /* @__PURE__ */ jsx(
|
|
27380
|
-
"path",
|
|
27381
|
-
{
|
|
27382
|
-
strokeLinecap: "round",
|
|
27383
|
-
strokeLinejoin: "round",
|
|
27384
|
-
strokeWidth: 2,
|
|
27385
|
-
d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"
|
|
27386
|
-
}
|
|
27387
|
-
)
|
|
27388
|
-
}
|
|
27389
|
-
),
|
|
27662
|
+
(hasCustomAvailability || customPricingCount > 0) && /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground mb-3 flex items-center gap-2 text-xs", children: [
|
|
27663
|
+
/* @__PURE__ */ jsx(SlidersHorizontal, { className: "h-3.5 w-3.5" }),
|
|
27390
27664
|
/* @__PURE__ */ jsx("span", { children: customPricingCount > 0 ? `${customPricingCount} custom pricing tier${customPricingCount > 1 ? "s" : ""}` : "Custom availability" })
|
|
27391
27665
|
] }),
|
|
27392
|
-
(onEdit || onManage || onDelete) && /* @__PURE__ */ jsxs("div", { className: "flex items-center
|
|
27666
|
+
(onEdit || onManage || onDelete) && /* @__PURE__ */ jsxs("div", { className: "border-border flex items-center gap-2 border-t pt-2", children: [
|
|
27393
27667
|
onDelete && /* @__PURE__ */ jsx(
|
|
27394
27668
|
"button",
|
|
27395
27669
|
{
|
|
27396
27670
|
type: "button",
|
|
27397
27671
|
onClick: handleDeleteClick,
|
|
27398
|
-
className: "
|
|
27672
|
+
className: "text-muted-foreground hover:text-destructive p-1.5 transition-colors",
|
|
27399
27673
|
title: "Delete service",
|
|
27400
|
-
children: /* @__PURE__ */ jsx(
|
|
27401
|
-
"svg",
|
|
27402
|
-
{
|
|
27403
|
-
className: "h-4 w-4",
|
|
27404
|
-
fill: "none",
|
|
27405
|
-
viewBox: "0 0 24 24",
|
|
27406
|
-
stroke: "currentColor",
|
|
27407
|
-
children: /* @__PURE__ */ jsx(
|
|
27408
|
-
"path",
|
|
27409
|
-
{
|
|
27410
|
-
strokeLinecap: "round",
|
|
27411
|
-
strokeLinejoin: "round",
|
|
27412
|
-
strokeWidth: 2,
|
|
27413
|
-
d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
|
27414
|
-
}
|
|
27415
|
-
)
|
|
27416
|
-
}
|
|
27417
|
-
)
|
|
27674
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
27418
27675
|
}
|
|
27419
27676
|
),
|
|
27420
27677
|
onEdit && /* @__PURE__ */ jsx(
|
|
@@ -27422,26 +27679,9 @@ function ServiceCard({
|
|
|
27422
27679
|
{
|
|
27423
27680
|
type: "button",
|
|
27424
27681
|
onClick: handleEditClick,
|
|
27425
|
-
className: "
|
|
27682
|
+
className: "text-muted-foreground hover:text-primary p-1.5 transition-colors",
|
|
27426
27683
|
title: "Edit service",
|
|
27427
|
-
children: /* @__PURE__ */ jsx(
|
|
27428
|
-
"svg",
|
|
27429
|
-
{
|
|
27430
|
-
className: "h-4 w-4",
|
|
27431
|
-
fill: "none",
|
|
27432
|
-
viewBox: "0 0 24 24",
|
|
27433
|
-
stroke: "currentColor",
|
|
27434
|
-
children: /* @__PURE__ */ jsx(
|
|
27435
|
-
"path",
|
|
27436
|
-
{
|
|
27437
|
-
strokeLinecap: "round",
|
|
27438
|
-
strokeLinejoin: "round",
|
|
27439
|
-
strokeWidth: 2,
|
|
27440
|
-
d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
|
|
27441
|
-
}
|
|
27442
|
-
)
|
|
27443
|
-
}
|
|
27444
|
-
)
|
|
27684
|
+
children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" })
|
|
27445
27685
|
}
|
|
27446
27686
|
),
|
|
27447
27687
|
onManage && /* @__PURE__ */ jsx(
|
|
@@ -27449,7 +27689,7 @@ function ServiceCard({
|
|
|
27449
27689
|
{
|
|
27450
27690
|
type: "button",
|
|
27451
27691
|
onClick: handleManageClick,
|
|
27452
|
-
className: "rounded px-3 py-1 text-sm font-medium
|
|
27692
|
+
className: "text-primary hover:bg-primary/10 ml-auto rounded px-3 py-1 text-sm font-medium transition-colors",
|
|
27453
27693
|
children: "Manage"
|
|
27454
27694
|
}
|
|
27455
27695
|
)
|
|
@@ -27466,28 +27706,11 @@ function AddServiceCard({
|
|
|
27466
27706
|
return /* @__PURE__ */ jsx(
|
|
27467
27707
|
Card,
|
|
27468
27708
|
{
|
|
27469
|
-
className: `
|
|
27709
|
+
className: `border-border bg-muted/50 hover:border-primary hover:bg-muted h-full cursor-pointer border-2 border-dashed transition-all duration-200 ${className} `.trim(),
|
|
27470
27710
|
onClick,
|
|
27471
27711
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-[160px] flex-col items-center justify-center p-4", children: [
|
|
27472
|
-
/* @__PURE__ */ jsx("div", { className: "mb-3 flex h-12 w-12 items-center justify-center rounded-full
|
|
27473
|
-
|
|
27474
|
-
{
|
|
27475
|
-
className: "h-6 w-6 text-gray-500 dark:text-gray-400",
|
|
27476
|
-
fill: "none",
|
|
27477
|
-
viewBox: "0 0 24 24",
|
|
27478
|
-
stroke: "currentColor",
|
|
27479
|
-
children: /* @__PURE__ */ jsx(
|
|
27480
|
-
"path",
|
|
27481
|
-
{
|
|
27482
|
-
strokeLinecap: "round",
|
|
27483
|
-
strokeLinejoin: "round",
|
|
27484
|
-
strokeWidth: 2,
|
|
27485
|
-
d: "M12 4v16m8-8H4"
|
|
27486
|
-
}
|
|
27487
|
-
)
|
|
27488
|
-
}
|
|
27489
|
-
) }),
|
|
27490
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-gray-600 dark:text-gray-400", children: "Add New Service" })
|
|
27712
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted mb-3 flex h-12 w-12 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(Plus, { className: "text-muted-foreground h-6 w-6" }) }),
|
|
27713
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium", children: "Add New Service" })
|
|
27491
27714
|
] })
|
|
27492
27715
|
}
|
|
27493
27716
|
);
|
|
@@ -27670,18 +27893,18 @@ function ServiceGeneralSettings({
|
|
|
27670
27893
|
] });
|
|
27671
27894
|
}
|
|
27672
27895
|
function ServiceSkeleton() {
|
|
27673
|
-
return /* @__PURE__ */ jsxs("div", { className: "animate-pulse rounded-lg border
|
|
27896
|
+
return /* @__PURE__ */ jsxs("div", { className: "border-border animate-pulse rounded-lg border p-4", children: [
|
|
27674
27897
|
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-start justify-between", children: [
|
|
27675
|
-
/* @__PURE__ */ jsx("div", { className: "h-5 w-32 rounded
|
|
27676
|
-
/* @__PURE__ */ jsx("div", { className: "h-5 w-16 rounded
|
|
27898
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-5 w-32 rounded" }),
|
|
27899
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-5 w-16 rounded" })
|
|
27677
27900
|
] }),
|
|
27678
27901
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 space-y-2", children: [
|
|
27679
|
-
/* @__PURE__ */ jsx("div", { className: "h-4 w-full rounded
|
|
27680
|
-
/* @__PURE__ */ jsx("div", { className: "h-4 w-3/4 rounded
|
|
27902
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-4 w-full rounded" }),
|
|
27903
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-4 w-3/4 rounded" })
|
|
27681
27904
|
] }),
|
|
27682
27905
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
27683
|
-
/* @__PURE__ */ jsx("div", { className: "h-6 w-20 rounded-full
|
|
27684
|
-
/* @__PURE__ */ jsx("div", { className: "h-6 w-20 rounded-full
|
|
27906
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-6 w-20 rounded-full" }),
|
|
27907
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted h-6 w-20 rounded-full" })
|
|
27685
27908
|
] })
|
|
27686
27909
|
] });
|
|
27687
27910
|
}
|
|
@@ -27729,7 +27952,7 @@ function ServiceGrid({
|
|
|
27729
27952
|
/* @__PURE__ */ jsx(
|
|
27730
27953
|
"svg",
|
|
27731
27954
|
{
|
|
27732
|
-
className: "mb-4 h-12 w-12
|
|
27955
|
+
className: "text-muted-foreground mb-4 h-12 w-12",
|
|
27733
27956
|
fill: "none",
|
|
27734
27957
|
viewBox: "0 0 24 24",
|
|
27735
27958
|
stroke: "currentColor",
|
|
@@ -27744,7 +27967,7 @@ function ServiceGrid({
|
|
|
27744
27967
|
)
|
|
27745
27968
|
}
|
|
27746
27969
|
),
|
|
27747
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
27970
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: emptyMessage })
|
|
27748
27971
|
] });
|
|
27749
27972
|
}
|
|
27750
27973
|
return /* @__PURE__ */ jsxs(
|
|
@@ -27858,12 +28081,16 @@ function ServicePicker({
|
|
|
27858
28081
|
return /* @__PURE__ */ jsxs(
|
|
27859
28082
|
"div",
|
|
27860
28083
|
{
|
|
27861
|
-
className: cn(
|
|
28084
|
+
className: cn(
|
|
28085
|
+
"bg-card text-card-foreground border-border shadow-card flex flex-col rounded-xl border",
|
|
28086
|
+
!fullWidth && "lg:max-w-md",
|
|
28087
|
+
className
|
|
28088
|
+
),
|
|
27862
28089
|
children: [
|
|
27863
28090
|
/* @__PURE__ */ jsxs("div", { className: "p-3", children: [
|
|
27864
|
-
!hideHeading && /* @__PURE__ */ jsx("h2", { className: "mb-3 text-xl font-bold
|
|
28091
|
+
!hideHeading && /* @__PURE__ */ jsx("h2", { className: "text-foreground mb-3 text-xl font-bold", children: heading }),
|
|
27865
28092
|
showSearch && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
27866
|
-
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3", children: /* @__PURE__ */ jsx(SearchIcon5, { className: "h-5 w-5
|
|
28093
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3", children: /* @__PURE__ */ jsx(SearchIcon5, { className: "text-muted-foreground h-5 w-5" }) }),
|
|
27867
28094
|
/* @__PURE__ */ jsx(
|
|
27868
28095
|
Input,
|
|
27869
28096
|
{
|
|
@@ -27878,8 +28105,8 @@ function ServicePicker({
|
|
|
27878
28105
|
] })
|
|
27879
28106
|
] }),
|
|
27880
28107
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-3", children: [
|
|
27881
|
-
error && /* @__PURE__ */ jsx("div", { className: "mb-4 rounded-lg
|
|
27882
|
-
loading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2
|
|
28108
|
+
error && /* @__PURE__ */ jsx("div", { className: "bg-destructive/10 text-destructive mb-4 rounded-lg p-4", children: /* @__PURE__ */ jsx("strong", { children: error }) }),
|
|
28109
|
+
loading ? /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-center gap-2", children: [
|
|
27883
28110
|
/* @__PURE__ */ jsx(SpinnerIcon5, { className: "h-5 w-5 animate-spin" }),
|
|
27884
28111
|
/* @__PURE__ */ jsx("span", { children: "Loading available services..." })
|
|
27885
28112
|
] }) : isSearching ? (
|
|
@@ -27893,7 +28120,7 @@ function ServicePicker({
|
|
|
27893
28120
|
multiple
|
|
27894
28121
|
},
|
|
27895
28122
|
service.id
|
|
27896
|
-
)) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("div", { className: "
|
|
28123
|
+
)) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground rounded-lg p-4", children: /* @__PURE__ */ jsx("strong", { children: emptyMessage }) }) }) })
|
|
27897
28124
|
) : (
|
|
27898
28125
|
// Grouped list - accordion style
|
|
27899
28126
|
/* @__PURE__ */ jsx("ul", { className: "space-y-1", children: filteredGroups.length > 0 ? filteredGroups.map((group) => /* @__PURE__ */ jsx(
|
|
@@ -27908,7 +28135,7 @@ function ServicePicker({
|
|
|
27908
28135
|
multiple
|
|
27909
28136
|
},
|
|
27910
28137
|
group.id
|
|
27911
|
-
)) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("div", { className: "
|
|
28138
|
+
)) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("div", { className: "bg-muted text-muted-foreground rounded-lg p-4", children: /* @__PURE__ */ jsx("strong", { children: emptyMessage }) }) }) })
|
|
27912
28139
|
)
|
|
27913
28140
|
] })
|
|
27914
28141
|
]
|
|
@@ -27936,10 +28163,10 @@ function ServiceGroupItem({
|
|
|
27936
28163
|
onClick: () => onToggleGroup(group.id),
|
|
27937
28164
|
className: cn(
|
|
27938
28165
|
"flex w-full items-center justify-between rounded-lg px-3 py-2",
|
|
27939
|
-
"text-left text-sm font-medium",
|
|
27940
|
-
"hover:bg-
|
|
28166
|
+
"text-muted-foreground text-left text-sm font-medium",
|
|
28167
|
+
"hover:bg-muted",
|
|
27941
28168
|
"transition-colors",
|
|
27942
|
-
depth > 0 && "ml-4
|
|
28169
|
+
depth > 0 && "ml-4"
|
|
27943
28170
|
),
|
|
27944
28171
|
"aria-expanded": isExpanded,
|
|
27945
28172
|
children: [
|
|
@@ -27948,7 +28175,7 @@ function ServiceGroupItem({
|
|
|
27948
28175
|
hasSelection && /* @__PURE__ */ jsx(
|
|
27949
28176
|
"span",
|
|
27950
28177
|
{
|
|
27951
|
-
className: "bg-
|
|
28178
|
+
className: "bg-primary h-2 w-2 rounded-full",
|
|
27952
28179
|
"aria-label": "Has selected items"
|
|
27953
28180
|
}
|
|
27954
28181
|
)
|
|
@@ -27957,7 +28184,7 @@ function ServiceGroupItem({
|
|
|
27957
28184
|
ChevronIcon2,
|
|
27958
28185
|
{
|
|
27959
28186
|
className: cn(
|
|
27960
|
-
"h-5 w-5 transition-transform",
|
|
28187
|
+
"text-muted-foreground h-5 w-5 transition-transform",
|
|
27961
28188
|
isExpanded && "rotate-180"
|
|
27962
28189
|
)
|
|
27963
28190
|
}
|
|
@@ -28004,42 +28231,62 @@ function ServiceItem({
|
|
|
28004
28231
|
{
|
|
28005
28232
|
className: cn(
|
|
28006
28233
|
"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2",
|
|
28007
|
-
"hover:bg-
|
|
28234
|
+
"hover:bg-muted",
|
|
28008
28235
|
"transition-colors",
|
|
28009
28236
|
service.disabled && "cursor-not-allowed opacity-50"
|
|
28010
28237
|
),
|
|
28011
28238
|
children: [
|
|
28012
|
-
multiple ? /* @__PURE__ */
|
|
28013
|
-
|
|
28014
|
-
|
|
28015
|
-
|
|
28016
|
-
|
|
28017
|
-
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28021
|
-
|
|
28022
|
-
|
|
28023
|
-
|
|
28024
|
-
|
|
28025
|
-
|
|
28026
|
-
|
|
28027
|
-
|
|
28028
|
-
|
|
28029
|
-
|
|
28030
|
-
|
|
28239
|
+
multiple ? /* @__PURE__ */ jsxs("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
|
|
28240
|
+
/* @__PURE__ */ jsx(
|
|
28241
|
+
"input",
|
|
28242
|
+
{
|
|
28243
|
+
type: "checkbox",
|
|
28244
|
+
checked: selected,
|
|
28245
|
+
onChange: onToggle,
|
|
28246
|
+
disabled: service.disabled,
|
|
28247
|
+
className: cn(
|
|
28248
|
+
"peer h-4 w-4 shrink-0 appearance-none rounded",
|
|
28249
|
+
"border-input bg-background border-2",
|
|
28250
|
+
"cursor-pointer transition-all duration-150",
|
|
28251
|
+
"focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
28252
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
28253
|
+
"checked:bg-primary-500 checked:border-primary-500"
|
|
28254
|
+
)
|
|
28255
|
+
}
|
|
28256
|
+
),
|
|
28257
|
+
/* @__PURE__ */ jsx(CheckIcon4, { className: "pointer-events-none absolute h-3 w-3 text-white opacity-0 transition-opacity peer-checked:opacity-100" })
|
|
28258
|
+
] }) : /* @__PURE__ */ jsxs("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
|
|
28259
|
+
/* @__PURE__ */ jsx(
|
|
28260
|
+
"input",
|
|
28261
|
+
{
|
|
28262
|
+
type: "radio",
|
|
28263
|
+
checked: selected,
|
|
28264
|
+
onChange: onToggle,
|
|
28265
|
+
disabled: service.disabled,
|
|
28266
|
+
className: cn(
|
|
28267
|
+
"peer h-4 w-4 shrink-0 appearance-none rounded-full",
|
|
28268
|
+
"border-input bg-background border-2",
|
|
28269
|
+
"cursor-pointer transition-all duration-150",
|
|
28270
|
+
"focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
28271
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
28272
|
+
"checked:border-primary-500"
|
|
28273
|
+
)
|
|
28274
|
+
}
|
|
28275
|
+
),
|
|
28276
|
+
/* @__PURE__ */ jsx("span", { className: "bg-primary-500 pointer-events-none absolute h-2 w-2 scale-0 rounded-full transition-transform peer-checked:scale-100" })
|
|
28277
|
+
] }),
|
|
28031
28278
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
28032
28279
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
28033
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium
|
|
28034
|
-
service.code && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
28280
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground text-sm font-medium", children: service.name }),
|
|
28281
|
+
service.code && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
28035
28282
|
"(",
|
|
28036
28283
|
service.code,
|
|
28037
28284
|
")"
|
|
28038
28285
|
] })
|
|
28039
28286
|
] }),
|
|
28040
|
-
service.description && /* @__PURE__ */ jsx("p", { className: "
|
|
28287
|
+
service.description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground truncate text-xs", children: service.description })
|
|
28041
28288
|
] }),
|
|
28042
|
-
service.price !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium
|
|
28289
|
+
service.price !== void 0 && /* @__PURE__ */ jsxs("span", { className: "text-foreground text-sm font-medium", children: [
|
|
28043
28290
|
"$",
|
|
28044
28291
|
service.price.toFixed(2)
|
|
28045
28292
|
] })
|
|
@@ -28047,6 +28294,19 @@ function ServiceItem({
|
|
|
28047
28294
|
}
|
|
28048
28295
|
) });
|
|
28049
28296
|
}
|
|
28297
|
+
function CheckIcon4({ className }) {
|
|
28298
|
+
return /* @__PURE__ */ jsx(
|
|
28299
|
+
"svg",
|
|
28300
|
+
{
|
|
28301
|
+
className,
|
|
28302
|
+
fill: "none",
|
|
28303
|
+
viewBox: "0 0 24 24",
|
|
28304
|
+
stroke: "currentColor",
|
|
28305
|
+
strokeWidth: 3,
|
|
28306
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
|
|
28307
|
+
}
|
|
28308
|
+
);
|
|
28309
|
+
}
|
|
28050
28310
|
function SearchIcon5({ className }) {
|
|
28051
28311
|
return /* @__PURE__ */ jsx(
|
|
28052
28312
|
"svg",
|
|
@@ -28692,7 +28952,7 @@ function SetupServiceModal({
|
|
|
28692
28952
|
const isValid = formData.name.trim() && formData.price >= 0;
|
|
28693
28953
|
return /* @__PURE__ */ jsx(Modal, { open, onOpenChange, size: "lg", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
|
|
28694
28954
|
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(ModalTitle, { children: title }) }),
|
|
28695
|
-
/* @__PURE__ */ jsxs(
|
|
28955
|
+
/* @__PURE__ */ jsxs(ModalBody, { className: "min-w-[320px] space-y-4", children: [
|
|
28696
28956
|
errorMessage && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-red-200 bg-red-50 p-3 dark:border-red-800 dark:bg-red-900/20", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-red-600 dark:text-red-400", children: errorMessage }) }),
|
|
28697
28957
|
showServicePicker && availableServices.length > 0 && /* @__PURE__ */ jsx(
|
|
28698
28958
|
Select,
|
|
@@ -28723,7 +28983,7 @@ function SetupServiceModal({
|
|
|
28723
28983
|
"label",
|
|
28724
28984
|
{
|
|
28725
28985
|
htmlFor: "setup-service-description",
|
|
28726
|
-
className: "mb-1 block text-sm font-medium
|
|
28986
|
+
className: "text-foreground mb-1 block text-sm font-medium",
|
|
28727
28987
|
children: "Description"
|
|
28728
28988
|
}
|
|
28729
28989
|
),
|
|
@@ -28731,7 +28991,7 @@ function SetupServiceModal({
|
|
|
28731
28991
|
"textarea",
|
|
28732
28992
|
{
|
|
28733
28993
|
id: "setup-service-description",
|
|
28734
|
-
className: "w-full rounded-md border
|
|
28994
|
+
className: "bg-background text-foreground border-input focus:ring-ring w-full rounded-md border px-3 py-2 shadow-sm focus:ring-2 focus:outline-none",
|
|
28735
28995
|
rows: 3,
|
|
28736
28996
|
value: formData.description,
|
|
28737
28997
|
onChange: (e) => setFormData((prev) => ({
|
|
@@ -28760,12 +29020,12 @@ function SetupServiceModal({
|
|
|
28760
29020
|
"label",
|
|
28761
29021
|
{
|
|
28762
29022
|
htmlFor: "setup-service-price",
|
|
28763
|
-
className: "mb-1 block text-sm font-medium
|
|
29023
|
+
className: "text-foreground mb-1 block text-sm font-medium",
|
|
28764
29024
|
children: "Base Price"
|
|
28765
29025
|
}
|
|
28766
29026
|
),
|
|
28767
29027
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
28768
|
-
/* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-3 -translate-y-1/2
|
|
29028
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground absolute top-1/2 left-3 -translate-y-1/2", children: "$" }),
|
|
28769
29029
|
/* @__PURE__ */ jsx(
|
|
28770
29030
|
"input",
|
|
28771
29031
|
{
|
|
@@ -28773,7 +29033,7 @@ function SetupServiceModal({
|
|
|
28773
29033
|
type: "number",
|
|
28774
29034
|
min: "0",
|
|
28775
29035
|
step: "0.01",
|
|
28776
|
-
className: "w-full rounded-md border
|
|
29036
|
+
className: "bg-background text-foreground border-input focus:ring-ring w-full rounded-md border py-2 pr-4 pl-7 shadow-sm focus:ring-2 focus:outline-none",
|
|
28777
29037
|
value: formData.price,
|
|
28778
29038
|
onChange: (e) => setFormData((prev) => ({
|
|
28779
29039
|
...prev,
|
|
@@ -28786,14 +29046,15 @@ function SetupServiceModal({
|
|
|
28786
29046
|
] })
|
|
28787
29047
|
] }),
|
|
28788
29048
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3 pt-2", children: [
|
|
28789
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
28790
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
28791
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium
|
|
28792
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
29049
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
29050
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
29051
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium", children: "Currently Offered" }),
|
|
29052
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Service is available for orders" })
|
|
28793
29053
|
] }),
|
|
28794
29054
|
/* @__PURE__ */ jsx(
|
|
28795
29055
|
Switch,
|
|
28796
29056
|
{
|
|
29057
|
+
className: "flex-shrink-0",
|
|
28797
29058
|
checked: formData.currentlyOffered,
|
|
28798
29059
|
onCheckedChange: (checked) => setFormData((prev) => ({
|
|
28799
29060
|
...prev,
|
|
@@ -28802,14 +29063,15 @@ function SetupServiceModal({
|
|
|
28802
29063
|
}
|
|
28803
29064
|
)
|
|
28804
29065
|
] }),
|
|
28805
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
28806
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
28807
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium
|
|
28808
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
29066
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
29067
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
29068
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium", children: "Limited Inventory" }),
|
|
29069
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Track inventory for this service" })
|
|
28809
29070
|
] }),
|
|
28810
29071
|
/* @__PURE__ */ jsx(
|
|
28811
29072
|
Switch,
|
|
28812
29073
|
{
|
|
29074
|
+
className: "flex-shrink-0",
|
|
28813
29075
|
checked: formData.limitedInventory,
|
|
28814
29076
|
onCheckedChange: (checked) => setFormData((prev) => ({
|
|
28815
29077
|
...prev,
|
|
@@ -28818,7 +29080,7 @@ function SetupServiceModal({
|
|
|
28818
29080
|
}
|
|
28819
29081
|
)
|
|
28820
29082
|
] }),
|
|
28821
|
-
formData.limitedInventory && /* @__PURE__ */ jsx("div", { className: "ml-4 border-l-2
|
|
29083
|
+
formData.limitedInventory && /* @__PURE__ */ jsx("div", { className: "border-border ml-4 border-l-2 pl-4", children: /* @__PURE__ */ jsx(
|
|
28822
29084
|
Input,
|
|
28823
29085
|
{
|
|
28824
29086
|
label: "Initial Inventory",
|
|
@@ -28832,14 +29094,15 @@ function SetupServiceModal({
|
|
|
28832
29094
|
placeholder: "Enter quantity"
|
|
28833
29095
|
}
|
|
28834
29096
|
) }),
|
|
28835
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
28836
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
28837
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium
|
|
28838
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
29097
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
29098
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
29099
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium", children: "Auto-Accept Referrals" }),
|
|
29100
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Automatically accept incoming referrals" })
|
|
28839
29101
|
] }),
|
|
28840
29102
|
/* @__PURE__ */ jsx(
|
|
28841
29103
|
Switch,
|
|
28842
29104
|
{
|
|
29105
|
+
className: "flex-shrink-0",
|
|
28843
29106
|
checked: formData.autoAcceptReferrals,
|
|
28844
29107
|
onCheckedChange: (checked) => setFormData((prev) => ({
|
|
28845
29108
|
...prev,
|
|
@@ -30907,7 +31170,7 @@ function SSOConfigForm({
|
|
|
30907
31170
|
] })
|
|
30908
31171
|
] });
|
|
30909
31172
|
}
|
|
30910
|
-
function
|
|
31173
|
+
function CheckIcon5({ className }) {
|
|
30911
31174
|
return /* @__PURE__ */ jsx(
|
|
30912
31175
|
"svg",
|
|
30913
31176
|
{
|
|
@@ -30992,66 +31255,89 @@ function StepIndicator({
|
|
|
30992
31255
|
if (allowCompletedStepsOnly) return index <= currentStep;
|
|
30993
31256
|
return true;
|
|
30994
31257
|
};
|
|
31258
|
+
const circleButton = (step, index, status, clickable) => /* @__PURE__ */ jsx(
|
|
31259
|
+
"button",
|
|
31260
|
+
{
|
|
31261
|
+
type: "button",
|
|
31262
|
+
onClick: () => handleStepClick(index),
|
|
31263
|
+
disabled: !clickable,
|
|
31264
|
+
className: `${sizes.circle} flex shrink-0 items-center justify-center rounded-full font-medium transition-all duration-200 focus:ring-2 focus:ring-offset-2 focus:outline-none dark:focus:ring-offset-neutral-900 ${clickable ? "cursor-pointer" : "cursor-default"} ${step.hasError ? "bg-red-100 text-red-600 focus:ring-red-500 dark:bg-red-900/30 dark:text-red-400" : status === "completed" ? "bg-primary-600 focus:ring-primary-500 dark:bg-primary-500 text-white" : status === "current" ? "bg-primary-600 ring-primary-600 focus:ring-primary-500 dark:bg-primary-500 dark:ring-primary-500 text-white ring-2 ring-offset-2 dark:ring-offset-neutral-900" : "bg-neutral-200 text-neutral-500 focus:ring-neutral-400 dark:bg-neutral-700 dark:text-neutral-300"}`.trim(),
|
|
31265
|
+
"aria-current": status === "current" ? "step" : void 0,
|
|
31266
|
+
children: step.hasError ? /* @__PURE__ */ jsx(ErrorIcon, { className: "h-4 w-4" }) : status === "completed" ? step.icon || /* @__PURE__ */ jsx(CheckIcon5, { className: "h-4 w-4" }) : step.icon || /* @__PURE__ */ jsx(
|
|
31267
|
+
"span",
|
|
31268
|
+
{
|
|
31269
|
+
className: status === "current" ? "text-white" : "text-neutral-500 dark:text-neutral-300",
|
|
31270
|
+
children: index + 1
|
|
31271
|
+
}
|
|
31272
|
+
)
|
|
31273
|
+
}
|
|
31274
|
+
);
|
|
31275
|
+
const stepLabel = (step, status, horizontal) => /* @__PURE__ */ jsxs("div", { className: `${horizontal ? "text-center" : "flex-1"} ${sizes.text}`, children: [
|
|
31276
|
+
/* @__PURE__ */ jsxs(
|
|
31277
|
+
"p",
|
|
31278
|
+
{
|
|
31279
|
+
className: `font-medium ${step.hasError ? "text-red-600 dark:text-red-400" : status === "completed" || status === "current" ? "text-neutral-900 dark:text-white" : "text-neutral-500 dark:text-neutral-400"}`.trim(),
|
|
31280
|
+
children: [
|
|
31281
|
+
step.label,
|
|
31282
|
+
step.optional && /* @__PURE__ */ jsxs("span", { className: "font-normal text-neutral-500 dark:text-neutral-400", children: [
|
|
31283
|
+
" ",
|
|
31284
|
+
"(optional)"
|
|
31285
|
+
] })
|
|
31286
|
+
]
|
|
31287
|
+
}
|
|
31288
|
+
),
|
|
31289
|
+
step.description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-neutral-500 dark:text-neutral-400", children: step.description })
|
|
31290
|
+
] });
|
|
31291
|
+
if (orientation === "horizontal") {
|
|
31292
|
+
return /* @__PURE__ */ jsx("nav", { className: `flex ${className}`.trim(), "aria-label": "Progress", children: steps.map((step, index) => {
|
|
31293
|
+
const status = getStepStatus(index);
|
|
31294
|
+
const isLast = index === steps.length - 1;
|
|
31295
|
+
const clickable = isClickable(index);
|
|
31296
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center", children: [
|
|
31297
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-full items-center", children: [
|
|
31298
|
+
index > 0 ? /* @__PURE__ */ jsx(
|
|
31299
|
+
"div",
|
|
31300
|
+
{
|
|
31301
|
+
className: `flex-1 ${sizes.line} ${index <= currentStep ? "bg-primary-600 dark:bg-primary-500" : "bg-neutral-200 dark:bg-neutral-700"}`,
|
|
31302
|
+
"aria-hidden": "true"
|
|
31303
|
+
}
|
|
31304
|
+
) : /* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
31305
|
+
circleButton(step, index, status, clickable),
|
|
31306
|
+
!isLast ? /* @__PURE__ */ jsx(
|
|
31307
|
+
"div",
|
|
31308
|
+
{
|
|
31309
|
+
className: `flex-1 ${sizes.line} ${index < currentStep ? "bg-primary-600 dark:bg-primary-500" : "bg-neutral-200 dark:bg-neutral-700"}`,
|
|
31310
|
+
"aria-hidden": "true"
|
|
31311
|
+
}
|
|
31312
|
+
) : /* @__PURE__ */ jsx("div", { className: "flex-1" })
|
|
31313
|
+
] }),
|
|
31314
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2", children: stepLabel(step, status, true) })
|
|
31315
|
+
] }, step.id);
|
|
31316
|
+
}) });
|
|
31317
|
+
}
|
|
30995
31318
|
return /* @__PURE__ */ jsx(
|
|
30996
31319
|
"nav",
|
|
30997
31320
|
{
|
|
30998
|
-
className: `
|
|
31321
|
+
className: `flex flex-col ${sizes.gap} ${className}`.trim(),
|
|
30999
31322
|
"aria-label": "Progress",
|
|
31000
31323
|
children: steps.map((step, index) => {
|
|
31001
31324
|
const status = getStepStatus(index);
|
|
31002
31325
|
const isLast = index === steps.length - 1;
|
|
31003
31326
|
const clickable = isClickable(index);
|
|
31004
31327
|
return /* @__PURE__ */ jsxs(React46.Fragment, { children: [
|
|
31005
|
-
/* @__PURE__ */ jsxs(
|
|
31006
|
-
|
|
31007
|
-
|
|
31008
|
-
|
|
31009
|
-
children: [
|
|
31010
|
-
/* @__PURE__ */ jsx(
|
|
31011
|
-
"button",
|
|
31012
|
-
{
|
|
31013
|
-
type: "button",
|
|
31014
|
-
onClick: () => handleStepClick(index),
|
|
31015
|
-
disabled: !clickable,
|
|
31016
|
-
className: ` ${sizes.circle} flex items-center justify-center rounded-full font-medium transition-all duration-200 focus:ring-2 focus:ring-offset-2 focus:outline-none ${clickable ? "cursor-pointer" : "cursor-default"} ${step.hasError ? "bg-red-100 text-red-600 focus:ring-red-500 dark:bg-red-900/30 dark:text-red-400" : status === "completed" ? "bg-blue-600 text-white focus:ring-blue-500 dark:bg-blue-500" : status === "current" ? "bg-blue-600 text-white ring-2 ring-blue-600 ring-offset-2 focus:ring-blue-500 dark:bg-blue-500 dark:ring-blue-500" : "bg-gray-200 text-gray-500 focus:ring-gray-400 dark:bg-gray-700 dark:text-gray-400"} `.trim(),
|
|
31017
|
-
"aria-current": status === "current" ? "step" : void 0,
|
|
31018
|
-
children: step.hasError ? /* @__PURE__ */ jsx(ErrorIcon, { className: "h-4 w-4" }) : status === "completed" ? step.icon || /* @__PURE__ */ jsx(CheckIcon4, { className: "h-4 w-4" }) : step.icon || /* @__PURE__ */ jsx("span", { children: index + 1 })
|
|
31019
|
-
}
|
|
31020
|
-
),
|
|
31021
|
-
/* @__PURE__ */ jsxs(
|
|
31022
|
-
"div",
|
|
31023
|
-
{
|
|
31024
|
-
className: ` ${orientation === "horizontal" ? "text-center" : "flex-1"} ${sizes.text} `.trim(),
|
|
31025
|
-
children: [
|
|
31026
|
-
/* @__PURE__ */ jsxs(
|
|
31027
|
-
"p",
|
|
31028
|
-
{
|
|
31029
|
-
className: `font-medium ${step.hasError ? "text-red-600 dark:text-red-400" : status === "completed" || status === "current" ? "text-gray-900 dark:text-white" : "text-gray-500 dark:text-gray-400"} `.trim(),
|
|
31030
|
-
children: [
|
|
31031
|
-
step.label,
|
|
31032
|
-
step.optional && /* @__PURE__ */ jsxs("span", { className: "font-normal text-gray-500 dark:text-gray-400", children: [
|
|
31033
|
-
" ",
|
|
31034
|
-
"(optional)"
|
|
31035
|
-
] })
|
|
31036
|
-
]
|
|
31037
|
-
}
|
|
31038
|
-
),
|
|
31039
|
-
step.description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-gray-500 dark:text-gray-400", children: step.description })
|
|
31040
|
-
]
|
|
31041
|
-
}
|
|
31042
|
-
)
|
|
31043
|
-
]
|
|
31044
|
-
}
|
|
31045
|
-
),
|
|
31328
|
+
/* @__PURE__ */ jsxs("div", { className: `flex flex-row items-center ${sizes.gap}`, children: [
|
|
31329
|
+
circleButton(step, index, status, clickable),
|
|
31330
|
+
stepLabel(step, status, false)
|
|
31331
|
+
] }),
|
|
31046
31332
|
!isLast && /* @__PURE__ */ jsx(
|
|
31047
31333
|
"div",
|
|
31048
31334
|
{
|
|
31049
|
-
className: ` ${
|
|
31335
|
+
className: `flex min-h-4 justify-center ${size === "sm" ? "w-6" : size === "lg" ? "w-10" : "w-8"}`,
|
|
31050
31336
|
"aria-hidden": "true",
|
|
31051
31337
|
children: /* @__PURE__ */ jsx(
|
|
31052
31338
|
"div",
|
|
31053
31339
|
{
|
|
31054
|
-
className: `
|
|
31340
|
+
className: `h-full min-h-4 ${sizes.line} ${index < currentStep ? "bg-primary-600 dark:bg-primary-500" : "bg-neutral-200 dark:bg-neutral-700"}`
|
|
31055
31341
|
}
|
|
31056
31342
|
)
|
|
31057
31343
|
}
|
|
@@ -31195,11 +31481,68 @@ function TimelineProgress({
|
|
|
31195
31481
|
steps,
|
|
31196
31482
|
currentStep,
|
|
31197
31483
|
showTimestamps = true,
|
|
31484
|
+
size = "md",
|
|
31485
|
+
pulse = true,
|
|
31198
31486
|
className
|
|
31199
31487
|
}) {
|
|
31200
31488
|
const visibleSteps = steps.filter((step) => !step.hidden);
|
|
31201
31489
|
const currentIndex = visibleSteps.findIndex((s) => s.key === currentStep);
|
|
31202
|
-
const
|
|
31490
|
+
const sizeConfig = {
|
|
31491
|
+
sm: {
|
|
31492
|
+
wrapper: "h-6 w-6",
|
|
31493
|
+
completed: "h-5 w-5",
|
|
31494
|
+
current: "h-6 w-6",
|
|
31495
|
+
pending: "h-5 w-5",
|
|
31496
|
+
error: "h-6 w-6",
|
|
31497
|
+
checkIcon: "h-3 w-3",
|
|
31498
|
+
xIcon: "h-3.5 w-3.5",
|
|
31499
|
+
currentDot: "h-1.5 w-1.5",
|
|
31500
|
+
pendingDot: "h-1.5 w-1.5",
|
|
31501
|
+
connector: "h-px",
|
|
31502
|
+
timestamp: "text-[10px]",
|
|
31503
|
+
label: "text-[10px]",
|
|
31504
|
+
padding: "py-2",
|
|
31505
|
+
labelMargin: "mt-1.5",
|
|
31506
|
+
timestampMargin: "mb-1"
|
|
31507
|
+
},
|
|
31508
|
+
md: {
|
|
31509
|
+
wrapper: "h-10 w-10",
|
|
31510
|
+
completed: "h-8 w-8",
|
|
31511
|
+
current: "h-10 w-10",
|
|
31512
|
+
pending: "h-8 w-8",
|
|
31513
|
+
error: "h-10 w-10",
|
|
31514
|
+
checkIcon: "h-4 w-4",
|
|
31515
|
+
xIcon: "h-5 w-5",
|
|
31516
|
+
currentDot: "h-2.5 w-2.5",
|
|
31517
|
+
pendingDot: "h-2 w-2",
|
|
31518
|
+
connector: "h-0.5",
|
|
31519
|
+
timestamp: "text-xs",
|
|
31520
|
+
label: "text-xs",
|
|
31521
|
+
padding: "py-4",
|
|
31522
|
+
labelMargin: "mt-2.5",
|
|
31523
|
+
timestampMargin: "mb-2"
|
|
31524
|
+
},
|
|
31525
|
+
lg: {
|
|
31526
|
+
wrapper: "h-14 w-14",
|
|
31527
|
+
completed: "h-11 w-11",
|
|
31528
|
+
current: "h-14 w-14",
|
|
31529
|
+
pending: "h-11 w-11",
|
|
31530
|
+
error: "h-14 w-14",
|
|
31531
|
+
checkIcon: "h-5 w-5",
|
|
31532
|
+
xIcon: "h-6 w-6",
|
|
31533
|
+
currentDot: "h-3.5 w-3.5",
|
|
31534
|
+
pendingDot: "h-2.5 w-2.5",
|
|
31535
|
+
connector: "h-1",
|
|
31536
|
+
timestamp: "text-sm",
|
|
31537
|
+
label: "text-sm",
|
|
31538
|
+
padding: "py-6",
|
|
31539
|
+
labelMargin: "mt-3",
|
|
31540
|
+
timestampMargin: "mb-3"
|
|
31541
|
+
}
|
|
31542
|
+
};
|
|
31543
|
+
const sizes = sizeConfig[size];
|
|
31544
|
+
const getStepState = (index, step) => {
|
|
31545
|
+
if (step.error) return "error";
|
|
31203
31546
|
if (index < currentIndex) return "completed";
|
|
31204
31547
|
if (index === currentIndex) return "current";
|
|
31205
31548
|
return "pending";
|
|
@@ -31211,77 +31554,123 @@ function TimelineProgress({
|
|
|
31211
31554
|
return /* @__PURE__ */ jsx(
|
|
31212
31555
|
"div",
|
|
31213
31556
|
{
|
|
31214
|
-
className: cn("
|
|
31557
|
+
className: cn(sizes.padding, "overflow-x-auto", className),
|
|
31215
31558
|
role: "progressbar",
|
|
31216
31559
|
"aria-valuenow": currentIndex + 1,
|
|
31217
31560
|
"aria-valuemin": 1,
|
|
31218
31561
|
"aria-valuemax": visibleSteps.length,
|
|
31219
|
-
children: visibleSteps.map((step, index) => {
|
|
31220
|
-
const state = getStepState(index);
|
|
31562
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative flex items-start", children: visibleSteps.map((step, index) => {
|
|
31563
|
+
const state = getStepState(index, step);
|
|
31221
31564
|
const isLast = index === visibleSteps.length - 1;
|
|
31222
|
-
return /* @__PURE__ */ jsxs(
|
|
31223
|
-
|
|
31224
|
-
|
|
31225
|
-
|
|
31226
|
-
|
|
31227
|
-
|
|
31565
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col items-center", children: [
|
|
31566
|
+
showTimestamps && /* @__PURE__ */ jsx(
|
|
31567
|
+
"div",
|
|
31568
|
+
{
|
|
31569
|
+
className: cn(
|
|
31570
|
+
"h-4 text-center text-neutral-500 dark:text-neutral-400",
|
|
31571
|
+
sizes.timestamp,
|
|
31572
|
+
sizes.timestampMargin
|
|
31573
|
+
),
|
|
31574
|
+
children: step.completedAt ? formatTimestamp(step.completedAt) : "\xA0"
|
|
31575
|
+
}
|
|
31576
|
+
),
|
|
31577
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex w-full items-center", children: [
|
|
31578
|
+
index > 0 && /* @__PURE__ */ jsx(
|
|
31579
|
+
"div",
|
|
31580
|
+
{
|
|
31581
|
+
className: cn(
|
|
31582
|
+
"flex-1",
|
|
31583
|
+
sizes.connector,
|
|
31584
|
+
state === "completed" || state === "current" || state === "error" ? "bg-primary-600 dark:bg-primary-500" : "bg-neutral-200 dark:bg-neutral-700"
|
|
31585
|
+
)
|
|
31586
|
+
}
|
|
31228
31587
|
),
|
|
31229
|
-
|
|
31230
|
-
|
|
31231
|
-
|
|
31232
|
-
|
|
31233
|
-
|
|
31234
|
-
|
|
31235
|
-
|
|
31236
|
-
"h-1 flex-1",
|
|
31237
|
-
index === 0 ? "bg-transparent" : "",
|
|
31238
|
-
state === "completed" || state === "current" && index > 0 ? "bg-brand-500" : "bg-gray-200 dark:bg-gray-700"
|
|
31239
|
-
)
|
|
31240
|
-
}
|
|
31588
|
+
index === 0 && /* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
31589
|
+
/* @__PURE__ */ jsx(
|
|
31590
|
+
"div",
|
|
31591
|
+
{
|
|
31592
|
+
className: cn(
|
|
31593
|
+
"flex shrink-0 items-center justify-center",
|
|
31594
|
+
sizes.wrapper
|
|
31241
31595
|
),
|
|
31242
|
-
/* @__PURE__ */ jsxs(
|
|
31596
|
+
children: /* @__PURE__ */ jsxs(
|
|
31243
31597
|
"div",
|
|
31244
31598
|
{
|
|
31245
31599
|
className: cn(
|
|
31246
|
-
"relative z-10 flex
|
|
31247
|
-
state === "completed" &&
|
|
31248
|
-
|
|
31249
|
-
|
|
31600
|
+
"relative z-10 flex items-center justify-center rounded-full transition-all duration-200",
|
|
31601
|
+
state === "completed" && cn(
|
|
31602
|
+
"bg-primary-100 text-primary-600 ring-primary-200 dark:bg-primary-900/40 dark:text-primary-400 dark:ring-primary-800 ring-2",
|
|
31603
|
+
sizes.completed
|
|
31604
|
+
),
|
|
31605
|
+
state === "current" && cn(
|
|
31606
|
+
"bg-primary-500 shadow-primary-500/30 ring-primary-100 dark:bg-primary-500 dark:ring-primary-900/50 text-white shadow-md ring-4",
|
|
31607
|
+
sizes.current,
|
|
31608
|
+
pulse && "animate-pulse"
|
|
31609
|
+
),
|
|
31610
|
+
state === "pending" && cn(
|
|
31611
|
+
"bg-neutral-100 text-neutral-400 ring-2 ring-neutral-200 dark:bg-neutral-800 dark:text-neutral-500 dark:ring-neutral-700",
|
|
31612
|
+
sizes.pending
|
|
31613
|
+
),
|
|
31614
|
+
state === "error" && cn(
|
|
31615
|
+
"bg-red-500 text-white shadow-md ring-4 shadow-red-500/30 ring-red-100 dark:bg-red-500 dark:ring-red-900/50",
|
|
31616
|
+
sizes.error
|
|
31617
|
+
)
|
|
31250
31618
|
),
|
|
31251
31619
|
children: [
|
|
31252
|
-
state === "completed" && /* @__PURE__ */ jsx(
|
|
31253
|
-
state === "current" && /* @__PURE__ */ jsx(
|
|
31620
|
+
state === "completed" && /* @__PURE__ */ jsx(CheckIcon6, { className: sizes.checkIcon }),
|
|
31621
|
+
state === "current" && /* @__PURE__ */ jsx(
|
|
31622
|
+
"div",
|
|
31623
|
+
{
|
|
31624
|
+
className: cn(
|
|
31625
|
+
"rounded-full bg-white",
|
|
31626
|
+
sizes.currentDot
|
|
31627
|
+
)
|
|
31628
|
+
}
|
|
31629
|
+
),
|
|
31630
|
+
state === "pending" && /* @__PURE__ */ jsx(
|
|
31631
|
+
"div",
|
|
31632
|
+
{
|
|
31633
|
+
className: cn(
|
|
31634
|
+
"rounded-full bg-neutral-300 dark:bg-neutral-600",
|
|
31635
|
+
sizes.pendingDot
|
|
31636
|
+
)
|
|
31637
|
+
}
|
|
31638
|
+
),
|
|
31639
|
+
state === "error" && /* @__PURE__ */ jsx(XIcon4, { className: sizes.xIcon })
|
|
31254
31640
|
]
|
|
31255
31641
|
}
|
|
31256
|
-
),
|
|
31257
|
-
/* @__PURE__ */ jsx(
|
|
31258
|
-
"div",
|
|
31259
|
-
{
|
|
31260
|
-
className: cn(
|
|
31261
|
-
"h-1 flex-1",
|
|
31262
|
-
isLast ? "bg-transparent" : "",
|
|
31263
|
-
state === "completed" ? "bg-brand-500" : "bg-gray-200 dark:bg-gray-700"
|
|
31264
|
-
)
|
|
31265
|
-
}
|
|
31266
31642
|
)
|
|
31267
|
-
|
|
31268
|
-
|
|
31269
|
-
|
|
31270
|
-
|
|
31271
|
-
|
|
31272
|
-
|
|
31273
|
-
|
|
31274
|
-
|
|
31275
|
-
|
|
31276
|
-
|
|
31277
|
-
|
|
31278
|
-
|
|
31279
|
-
|
|
31280
|
-
|
|
31281
|
-
|
|
31282
|
-
|
|
31283
|
-
|
|
31284
|
-
|
|
31643
|
+
}
|
|
31644
|
+
),
|
|
31645
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
31646
|
+
"div",
|
|
31647
|
+
{
|
|
31648
|
+
className: cn(
|
|
31649
|
+
"flex-1",
|
|
31650
|
+
sizes.connector,
|
|
31651
|
+
state === "completed" ? "bg-primary-600 dark:bg-primary-500" : "bg-neutral-200 dark:bg-neutral-700"
|
|
31652
|
+
)
|
|
31653
|
+
}
|
|
31654
|
+
),
|
|
31655
|
+
isLast && /* @__PURE__ */ jsx("div", { className: "flex-1" })
|
|
31656
|
+
] }),
|
|
31657
|
+
/* @__PURE__ */ jsx(
|
|
31658
|
+
"div",
|
|
31659
|
+
{
|
|
31660
|
+
className: cn(
|
|
31661
|
+
"text-center font-medium capitalize",
|
|
31662
|
+
sizes.label,
|
|
31663
|
+
sizes.labelMargin,
|
|
31664
|
+
state === "completed" && "text-primary-700 dark:text-primary-300",
|
|
31665
|
+
state === "current" && "font-semibold text-neutral-900 dark:text-white",
|
|
31666
|
+
state === "pending" && "text-neutral-400 dark:text-neutral-500",
|
|
31667
|
+
state === "error" && "font-semibold text-red-600 dark:text-red-400"
|
|
31668
|
+
),
|
|
31669
|
+
children: step.label
|
|
31670
|
+
}
|
|
31671
|
+
)
|
|
31672
|
+
] }, step.key);
|
|
31673
|
+
}) })
|
|
31285
31674
|
}
|
|
31286
31675
|
);
|
|
31287
31676
|
}
|
|
@@ -31330,48 +31719,56 @@ function TimelineEventList({
|
|
|
31330
31719
|
const getEventColor = (type) => {
|
|
31331
31720
|
switch (type) {
|
|
31332
31721
|
case "message":
|
|
31333
|
-
return "bg-blue-
|
|
31722
|
+
return "bg-blue-50 text-blue-500 ring-blue-100 dark:bg-blue-900/20 dark:text-blue-400 dark:ring-blue-800/40";
|
|
31334
31723
|
case "status":
|
|
31335
|
-
return "bg-green-
|
|
31724
|
+
return "bg-green-50 text-green-500 ring-green-100 dark:bg-green-900/20 dark:text-green-400 dark:ring-green-800/40";
|
|
31336
31725
|
case "attachment":
|
|
31337
|
-
return "bg-purple-
|
|
31726
|
+
return "bg-purple-50 text-purple-500 ring-purple-100 dark:bg-purple-900/20 dark:text-purple-400 dark:ring-purple-800/40";
|
|
31338
31727
|
case "assignment":
|
|
31339
|
-
return "bg-orange-
|
|
31728
|
+
return "bg-orange-50 text-orange-500 ring-orange-100 dark:bg-orange-900/20 dark:text-orange-400 dark:ring-orange-800/40";
|
|
31340
31729
|
case "note":
|
|
31341
|
-
return "bg-
|
|
31730
|
+
return "bg-neutral-50 text-neutral-500 ring-neutral-100 dark:bg-neutral-800/50 dark:text-neutral-400 dark:ring-neutral-700/40";
|
|
31342
31731
|
default:
|
|
31343
|
-
return "bg-
|
|
31732
|
+
return "bg-neutral-50 text-neutral-500 ring-neutral-100 dark:bg-neutral-800/50 dark:text-neutral-400 dark:ring-neutral-700/40";
|
|
31344
31733
|
}
|
|
31345
31734
|
};
|
|
31346
31735
|
if (events.length === 0) {
|
|
31347
|
-
return /* @__PURE__ */ jsx("div", { className: cn("py-8 text-center text-
|
|
31736
|
+
return /* @__PURE__ */ jsx("div", { className: cn("py-8 text-center text-neutral-500", className), children: "No activity yet." });
|
|
31348
31737
|
}
|
|
31349
|
-
return /* @__PURE__ */
|
|
31350
|
-
|
|
31351
|
-
/* @__PURE__ */ jsx(
|
|
31738
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
31739
|
+
events.length > 1 && /* @__PURE__ */ jsx(
|
|
31352
31740
|
"div",
|
|
31353
31741
|
{
|
|
31354
|
-
className:
|
|
31355
|
-
|
|
31356
|
-
getEventColor(event.type)
|
|
31357
|
-
),
|
|
31358
|
-
children: getEventIcon(event.type)
|
|
31742
|
+
className: "absolute top-0 bottom-0 left-5 w-px bg-neutral-200 dark:bg-neutral-700",
|
|
31743
|
+
"aria-hidden": "true"
|
|
31359
31744
|
}
|
|
31360
31745
|
),
|
|
31361
|
-
/* @__PURE__ */ jsxs("div", { className: "flex
|
|
31362
|
-
/* @__PURE__ */
|
|
31363
|
-
|
|
31364
|
-
|
|
31365
|
-
|
|
31366
|
-
"
|
|
31367
|
-
event.
|
|
31368
|
-
|
|
31746
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-6", children: events.map((event) => /* @__PURE__ */ jsxs("div", { className: "relative flex gap-4", children: [
|
|
31747
|
+
/* @__PURE__ */ jsx(
|
|
31748
|
+
"div",
|
|
31749
|
+
{
|
|
31750
|
+
className: cn(
|
|
31751
|
+
"relative z-10 flex h-10 w-10 shrink-0 items-center justify-center rounded-full ring-2",
|
|
31752
|
+
getEventColor(event.type)
|
|
31753
|
+
),
|
|
31754
|
+
children: getEventIcon(event.type)
|
|
31755
|
+
}
|
|
31756
|
+
),
|
|
31757
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 pt-0.5", children: [
|
|
31758
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
31759
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
31760
|
+
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-neutral-900 dark:text-neutral-100", children: event.title }),
|
|
31761
|
+
event.author && /* @__PURE__ */ jsxs("p", { className: "text-sm text-neutral-500 dark:text-neutral-400", children: [
|
|
31762
|
+
"by ",
|
|
31763
|
+
event.author
|
|
31764
|
+
] })
|
|
31765
|
+
] }),
|
|
31766
|
+
/* @__PURE__ */ jsx("time", { className: "shrink-0 pt-0.5 text-xs text-neutral-400 dark:text-neutral-500", children: formatTime4(event.timestamp) })
|
|
31369
31767
|
] }),
|
|
31370
|
-
/* @__PURE__ */ jsx("
|
|
31371
|
-
] })
|
|
31372
|
-
|
|
31373
|
-
|
|
31374
|
-
] }, event.id)) });
|
|
31768
|
+
event.content && /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-neutral-600 dark:text-neutral-300", children: event.content })
|
|
31769
|
+
] })
|
|
31770
|
+
] }, event.id)) })
|
|
31771
|
+
] });
|
|
31375
31772
|
}
|
|
31376
31773
|
TimelineEventList.displayName = "TimelineEventList";
|
|
31377
31774
|
function OrderConfirmation({
|
|
@@ -31392,21 +31789,21 @@ function OrderConfirmation({
|
|
|
31392
31789
|
role: "dialog",
|
|
31393
31790
|
"aria-modal": "true",
|
|
31394
31791
|
"aria-labelledby": "order-confirmation-title",
|
|
31395
|
-
children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-md rounded-xl bg-white p-6 shadow-xl dark:bg-
|
|
31792
|
+
children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-md rounded-xl bg-white p-6 shadow-xl dark:bg-neutral-800", children: [
|
|
31396
31793
|
/* @__PURE__ */ jsx("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-full bg-green-100 dark:bg-green-900/30", children: /* @__PURE__ */ jsx("div", { className: "animate-bounce", children: /* @__PURE__ */ jsx(PlaneIcon, { className: "h-10 w-10 text-green-600 dark:text-green-400" }) }) }) }),
|
|
31397
31794
|
/* @__PURE__ */ jsx(
|
|
31398
31795
|
"h2",
|
|
31399
31796
|
{
|
|
31400
31797
|
id: "order-confirmation-title",
|
|
31401
|
-
className: "mb-2 text-center text-2xl font-bold text-
|
|
31798
|
+
className: "mb-2 text-center text-2xl font-bold text-neutral-900 dark:text-neutral-100",
|
|
31402
31799
|
children: "Order Submitted!"
|
|
31403
31800
|
}
|
|
31404
31801
|
),
|
|
31405
|
-
orderNumber && /* @__PURE__ */ jsxs("p", { className: "mb-4 text-center text-sm text-
|
|
31802
|
+
orderNumber && /* @__PURE__ */ jsxs("p", { className: "mb-4 text-center text-sm text-neutral-500 dark:text-neutral-400", children: [
|
|
31406
31803
|
"Order #",
|
|
31407
31804
|
orderNumber
|
|
31408
31805
|
] }),
|
|
31409
|
-
/* @__PURE__ */ jsx("p", { className: "mb-6 text-center text-
|
|
31806
|
+
/* @__PURE__ */ jsx("p", { className: "mb-6 text-center text-neutral-600 dark:text-neutral-300", children: message }),
|
|
31410
31807
|
/* @__PURE__ */ jsx(
|
|
31411
31808
|
"button",
|
|
31412
31809
|
{
|
|
@@ -31414,8 +31811,8 @@ function OrderConfirmation({
|
|
|
31414
31811
|
onClick: onClose,
|
|
31415
31812
|
className: cn(
|
|
31416
31813
|
"w-full rounded-lg px-4 py-3 font-medium",
|
|
31417
|
-
"bg-
|
|
31418
|
-
"dark:bg-
|
|
31814
|
+
"bg-primary-600 hover:bg-primary-700 text-white",
|
|
31815
|
+
"dark:bg-primary-500 dark:hover:bg-primary-600",
|
|
31419
31816
|
"transition-colors"
|
|
31420
31817
|
),
|
|
31421
31818
|
children: "Got It"
|
|
@@ -31426,7 +31823,7 @@ function OrderConfirmation({
|
|
|
31426
31823
|
);
|
|
31427
31824
|
}
|
|
31428
31825
|
OrderConfirmation.displayName = "OrderConfirmation";
|
|
31429
|
-
function
|
|
31826
|
+
function CheckIcon6({ className }) {
|
|
31430
31827
|
return /* @__PURE__ */ jsx(
|
|
31431
31828
|
"svg",
|
|
31432
31829
|
{
|
|
@@ -31446,6 +31843,26 @@ function CheckIcon5({ className }) {
|
|
|
31446
31843
|
}
|
|
31447
31844
|
);
|
|
31448
31845
|
}
|
|
31846
|
+
function XIcon4({ className }) {
|
|
31847
|
+
return /* @__PURE__ */ jsx(
|
|
31848
|
+
"svg",
|
|
31849
|
+
{
|
|
31850
|
+
className,
|
|
31851
|
+
fill: "none",
|
|
31852
|
+
viewBox: "0 0 24 24",
|
|
31853
|
+
stroke: "currentColor",
|
|
31854
|
+
strokeWidth: 3,
|
|
31855
|
+
children: /* @__PURE__ */ jsx(
|
|
31856
|
+
"path",
|
|
31857
|
+
{
|
|
31858
|
+
strokeLinecap: "round",
|
|
31859
|
+
strokeLinejoin: "round",
|
|
31860
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
31861
|
+
}
|
|
31862
|
+
)
|
|
31863
|
+
}
|
|
31864
|
+
);
|
|
31865
|
+
}
|
|
31449
31866
|
function MessageIcon({ className }) {
|
|
31450
31867
|
return /* @__PURE__ */ jsx(
|
|
31451
31868
|
"svg",
|
|
@@ -31566,7 +31983,7 @@ function PlaneIcon({ className }) {
|
|
|
31566
31983
|
}
|
|
31567
31984
|
);
|
|
31568
31985
|
}
|
|
31569
|
-
var
|
|
31986
|
+
var CheckIcon7 = () => /* @__PURE__ */ jsx(
|
|
31570
31987
|
"svg",
|
|
31571
31988
|
{
|
|
31572
31989
|
className: "h-5 w-5",
|
|
@@ -31631,7 +32048,7 @@ var InfoIcon = () => /* @__PURE__ */ jsx(
|
|
|
31631
32048
|
)
|
|
31632
32049
|
}
|
|
31633
32050
|
);
|
|
31634
|
-
var
|
|
32051
|
+
var XIcon5 = () => /* @__PURE__ */ jsx(
|
|
31635
32052
|
"svg",
|
|
31636
32053
|
{
|
|
31637
32054
|
className: "h-4 w-4",
|
|
@@ -31668,7 +32085,7 @@ var variantStyles = {
|
|
|
31668
32085
|
}
|
|
31669
32086
|
};
|
|
31670
32087
|
var defaultIcons = {
|
|
31671
|
-
success: /* @__PURE__ */ jsx(
|
|
32088
|
+
success: /* @__PURE__ */ jsx(CheckIcon7, {}),
|
|
31672
32089
|
error: /* @__PURE__ */ jsx(XCircleIcon, {}),
|
|
31673
32090
|
warning: /* @__PURE__ */ jsx(ExclamationIcon, {}),
|
|
31674
32091
|
info: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
@@ -31714,7 +32131,7 @@ function Toast({
|
|
|
31714
32131
|
onClick: onClose,
|
|
31715
32132
|
className: "flex-shrink-0 rounded p-1 transition-colors hover:bg-black/10 focus:ring-2 focus:ring-current focus:outline-none dark:hover:bg-white/10",
|
|
31716
32133
|
"aria-label": "Dismiss notification",
|
|
31717
|
-
children: /* @__PURE__ */ jsx(
|
|
32134
|
+
children: /* @__PURE__ */ jsx(XIcon5, {})
|
|
31718
32135
|
}
|
|
31719
32136
|
)
|
|
31720
32137
|
]
|
|
@@ -31868,6 +32285,7 @@ function WebChartReportViewer({
|
|
|
31868
32285
|
onDateRangeChange,
|
|
31869
32286
|
webchartBrand: webchartBrand2 = { name: "Enterprise Health" },
|
|
31870
32287
|
onReconnect,
|
|
32288
|
+
columnRenderers,
|
|
31871
32289
|
className,
|
|
31872
32290
|
labels = {}
|
|
31873
32291
|
}) {
|
|
@@ -31877,17 +32295,16 @@ function WebChartReportViewer({
|
|
|
31877
32295
|
reconnect = "Reconnect",
|
|
31878
32296
|
noReports = "No reports available",
|
|
31879
32297
|
loadingData = "Fetching latest data from Enterprise Health...",
|
|
31880
|
-
close = "Close",
|
|
31881
32298
|
dateFrom = "From",
|
|
31882
32299
|
dateTo = "To"
|
|
31883
32300
|
} = labels;
|
|
31884
|
-
const [
|
|
32301
|
+
const [modalOpen, setModalOpen] = React46.useState(false);
|
|
31885
32302
|
const handleReportClick = (report) => {
|
|
31886
32303
|
onReportSelect?.(report);
|
|
31887
|
-
|
|
32304
|
+
setModalOpen(true);
|
|
31888
32305
|
};
|
|
31889
32306
|
const handleClose = () => {
|
|
31890
|
-
|
|
32307
|
+
setModalOpen(false);
|
|
31891
32308
|
onClose?.();
|
|
31892
32309
|
};
|
|
31893
32310
|
const formatDate4 = (date) => {
|
|
@@ -31895,144 +32312,153 @@ function WebChartReportViewer({
|
|
|
31895
32312
|
return d.toISOString().split("T")[0];
|
|
31896
32313
|
};
|
|
31897
32314
|
return /* @__PURE__ */ jsxs("div", { className: cn("webchart-report-viewer", className), children: [
|
|
31898
|
-
error && /* @__PURE__ */
|
|
31899
|
-
/* @__PURE__ */ jsx(
|
|
31900
|
-
/* @__PURE__ */ jsxs(
|
|
31901
|
-
|
|
31902
|
-
|
|
31903
|
-
|
|
31904
|
-
|
|
31905
|
-
webchartBrand2.name,
|
|
31906
|
-
"."
|
|
31907
|
-
] }),
|
|
32315
|
+
error && /* @__PURE__ */ jsxs(Alert, { variant: "warning", icon: /* @__PURE__ */ jsx(AlertTriangle, {}), className: "mb-4", children: [
|
|
32316
|
+
/* @__PURE__ */ jsx(AlertTitle, { children: error }),
|
|
32317
|
+
/* @__PURE__ */ jsxs(AlertDescription, { children: [
|
|
32318
|
+
"If this error persists, you can try reconnecting",
|
|
32319
|
+
" ",
|
|
32320
|
+
webchartBrand2.name,
|
|
32321
|
+
".",
|
|
31908
32322
|
onReconnect && /* @__PURE__ */ jsxs(
|
|
31909
|
-
|
|
32323
|
+
Button,
|
|
31910
32324
|
{
|
|
31911
|
-
|
|
32325
|
+
variant: "secondary",
|
|
32326
|
+
size: "sm",
|
|
31912
32327
|
onClick: onReconnect,
|
|
31913
|
-
className: "mt-2
|
|
32328
|
+
className: "mt-2",
|
|
31914
32329
|
children: [
|
|
31915
|
-
/* @__PURE__ */ jsx(
|
|
32330
|
+
/* @__PURE__ */ jsx(Link, { className: "mr-2 h-4 w-4" }),
|
|
31916
32331
|
reconnect
|
|
31917
32332
|
]
|
|
31918
32333
|
}
|
|
31919
32334
|
)
|
|
31920
32335
|
] })
|
|
31921
|
-
] })
|
|
31922
|
-
!error && !loading && /* @__PURE__ */ jsxs(
|
|
31923
|
-
"
|
|
31924
|
-
|
|
31925
|
-
|
|
31926
|
-
onClick: onRefreshReports,
|
|
31927
|
-
className: "bg-primary hover:bg-primary/90 mb-4 rounded-lg px-4 py-2 text-white",
|
|
31928
|
-
title: refreshReports,
|
|
31929
|
-
children: [
|
|
31930
|
-
/* @__PURE__ */ jsx("i", { className: "fas fa-sync-alt mr-2" }),
|
|
31931
|
-
refreshReports
|
|
31932
|
-
]
|
|
31933
|
-
}
|
|
31934
|
-
),
|
|
32336
|
+
] }),
|
|
32337
|
+
!error && !loading && /* @__PURE__ */ jsxs(Button, { onClick: onRefreshReports, className: "mb-4", children: [
|
|
32338
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "mr-2 h-4 w-4" }),
|
|
32339
|
+
refreshReports
|
|
32340
|
+
] }),
|
|
31935
32341
|
/* @__PURE__ */ jsx("div", { className: "mt-4 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3", children: loading ? (
|
|
31936
32342
|
// Loading placeholders
|
|
31937
|
-
/* @__PURE__ */ jsx(Fragment, { children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ jsx(
|
|
32343
|
+
/* @__PURE__ */ jsx(Fragment, { children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ jsx(Skeleton, { variant: "button", className: "h-12 w-full" }, i)) })
|
|
31938
32344
|
) : reports.length > 0 ? (
|
|
31939
32345
|
// Report buttons
|
|
31940
32346
|
reports.map((report) => /* @__PURE__ */ jsx(
|
|
31941
|
-
|
|
32347
|
+
Card,
|
|
31942
32348
|
{
|
|
31943
|
-
|
|
32349
|
+
interactive: true,
|
|
32350
|
+
padding: "none",
|
|
32351
|
+
role: "button",
|
|
32352
|
+
tabIndex: 0,
|
|
32353
|
+
"aria-label": report.description ? `${report.name}: ${report.description}` : report.name,
|
|
31944
32354
|
onClick: () => handleReportClick(report),
|
|
31945
|
-
|
|
31946
|
-
|
|
31947
|
-
|
|
32355
|
+
onKeyDown: (e) => {
|
|
32356
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
32357
|
+
e.preventDefault();
|
|
32358
|
+
handleReportClick(report);
|
|
32359
|
+
}
|
|
32360
|
+
},
|
|
32361
|
+
className: "cursor-pointer",
|
|
32362
|
+
children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsx(
|
|
32363
|
+
"span",
|
|
32364
|
+
{
|
|
32365
|
+
className: "block truncate text-sm font-medium",
|
|
32366
|
+
title: report.description ? `${report.name}: ${report.description}` : report.name,
|
|
32367
|
+
children: report.name
|
|
32368
|
+
}
|
|
32369
|
+
) })
|
|
31948
32370
|
},
|
|
31949
32371
|
report.id
|
|
31950
32372
|
))
|
|
31951
32373
|
) : /* @__PURE__ */ jsx("div", { className: "text-muted-foreground col-span-full py-8 text-center", children: noReports }) }),
|
|
31952
|
-
|
|
31953
|
-
|
|
31954
|
-
|
|
31955
|
-
|
|
31956
|
-
|
|
31957
|
-
|
|
31958
|
-
|
|
31959
|
-
|
|
31960
|
-
|
|
31961
|
-
|
|
31962
|
-
|
|
31963
|
-
|
|
31964
|
-
|
|
31965
|
-
|
|
31966
|
-
|
|
31967
|
-
/* @__PURE__ */ jsx("h5", { className: "text-lg font-semibold", children: currentReport?.name || "Report Results" }),
|
|
31968
|
-
reportResult?.error ? /* @__PURE__ */ jsx("span", { className: "text-yellow-500", title: reportResult.error, children: /* @__PURE__ */ jsx("i", { className: "fas fa-exclamation-triangle" }) }) : reportResult?.success ? /* @__PURE__ */ jsx("span", { className: "text-green-500", children: /* @__PURE__ */ jsx("i", { className: "fas fa-check-circle" }) }) : null
|
|
31969
|
-
] }),
|
|
31970
|
-
/* @__PURE__ */ jsx(
|
|
31971
|
-
"button",
|
|
31972
|
-
{
|
|
31973
|
-
type: "button",
|
|
31974
|
-
onClick: handleClose,
|
|
31975
|
-
className: "text-2xl text-gray-400 hover:text-gray-600",
|
|
31976
|
-
"aria-label": close,
|
|
31977
|
-
children: "\xD7"
|
|
31978
|
-
}
|
|
31979
|
-
)
|
|
31980
|
-
] }),
|
|
31981
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3 border-b bg-gray-50 p-4", children: [
|
|
31982
|
-
onDateRangeChange && dateRange && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
31983
|
-
/* @__PURE__ */ jsxs("label", { className: "text-muted-foreground text-sm", children: [
|
|
31984
|
-
dateFrom,
|
|
31985
|
-
":"
|
|
32374
|
+
/* @__PURE__ */ jsxs(
|
|
32375
|
+
Modal,
|
|
32376
|
+
{
|
|
32377
|
+
open: modalOpen,
|
|
32378
|
+
onOpenChange: (open) => {
|
|
32379
|
+
if (!open) {
|
|
32380
|
+
handleClose();
|
|
32381
|
+
}
|
|
32382
|
+
},
|
|
32383
|
+
size: "4xl",
|
|
32384
|
+
children: [
|
|
32385
|
+
/* @__PURE__ */ jsxs(ModalHeader, { children: [
|
|
32386
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
32387
|
+
/* @__PURE__ */ jsx(ModalTitle, { children: currentReport?.name || "Report Results" }),
|
|
32388
|
+
reportResult?.error ? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-5 w-5 text-yellow-500" }) : reportResult?.success ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5 text-green-500" }) : null
|
|
31986
32389
|
] }),
|
|
31987
|
-
/* @__PURE__ */ jsx(
|
|
31988
|
-
|
|
31989
|
-
|
|
31990
|
-
|
|
31991
|
-
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
}
|
|
31995
|
-
|
|
31996
|
-
|
|
31997
|
-
|
|
31998
|
-
|
|
32390
|
+
/* @__PURE__ */ jsx(ModalClose, {})
|
|
32391
|
+
] }),
|
|
32392
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-muted/50 flex flex-wrap items-center gap-3 border-b px-6 py-4", children: [
|
|
32393
|
+
onDateRangeChange && dateRange && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
32394
|
+
/* @__PURE__ */ jsxs("label", { className: "text-muted-foreground text-sm", children: [
|
|
32395
|
+
dateFrom,
|
|
32396
|
+
":"
|
|
32397
|
+
] }),
|
|
32398
|
+
/* @__PURE__ */ jsx(
|
|
32399
|
+
Input,
|
|
32400
|
+
{
|
|
32401
|
+
type: "date",
|
|
32402
|
+
size: "sm",
|
|
32403
|
+
value: formatDate4(dateRange.start),
|
|
32404
|
+
onChange: (e) => onDateRangeChange(e.target.value, dateRange.end),
|
|
32405
|
+
className: "w-auto"
|
|
32406
|
+
}
|
|
32407
|
+
),
|
|
32408
|
+
/* @__PURE__ */ jsxs("label", { className: "text-muted-foreground text-sm", children: [
|
|
32409
|
+
dateTo,
|
|
32410
|
+
":"
|
|
32411
|
+
] }),
|
|
32412
|
+
/* @__PURE__ */ jsx(
|
|
32413
|
+
Input,
|
|
32414
|
+
{
|
|
32415
|
+
type: "date",
|
|
32416
|
+
size: "sm",
|
|
32417
|
+
value: formatDate4(dateRange.end),
|
|
32418
|
+
onChange: (e) => onDateRangeChange(dateRange.start, e.target.value),
|
|
32419
|
+
className: "w-auto"
|
|
32420
|
+
}
|
|
32421
|
+
)
|
|
31999
32422
|
] }),
|
|
32000
32423
|
/* @__PURE__ */ jsx(
|
|
32001
|
-
|
|
32424
|
+
Button,
|
|
32002
32425
|
{
|
|
32003
|
-
|
|
32004
|
-
|
|
32005
|
-
|
|
32006
|
-
|
|
32426
|
+
size: "sm",
|
|
32427
|
+
onClick: onRefreshReport,
|
|
32428
|
+
title: refreshReport,
|
|
32429
|
+
"aria-label": refreshReport,
|
|
32430
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" })
|
|
32007
32431
|
}
|
|
32008
32432
|
)
|
|
32009
32433
|
] }),
|
|
32010
|
-
/* @__PURE__ */ jsx(
|
|
32011
|
-
"
|
|
32434
|
+
/* @__PURE__ */ jsx(ModalBody, { className: "max-h-[60vh] overflow-auto", children: loadingReport ? /* @__PURE__ */ jsxs("div", { className: "flex h-64 flex-col items-center justify-center", children: [
|
|
32435
|
+
/* @__PURE__ */ jsx(Spinner, { size: "xl" }),
|
|
32436
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground mt-4", children: loadingData })
|
|
32437
|
+
] }) : reportResult?.error ? /* @__PURE__ */ jsx(Alert, { variant: "danger", icon: /* @__PURE__ */ jsx(AlertTriangle, {}), children: /* @__PURE__ */ jsx(AlertDescription, { children: reportResult.error }) }) : reportResult?.data ? typeof reportResult.data === "string" ? /* @__PURE__ */ jsx(
|
|
32438
|
+
"div",
|
|
32012
32439
|
{
|
|
32013
|
-
|
|
32014
|
-
|
|
32015
|
-
className: "bg-primary hover:bg-primary/90 rounded-lg px-3 py-1.5 text-white",
|
|
32016
|
-
title: refreshReport,
|
|
32017
|
-
children: /* @__PURE__ */ jsx("i", { className: "fas fa-sync-alt" })
|
|
32440
|
+
className: "prose dark:prose-invert max-w-none",
|
|
32441
|
+
dangerouslySetInnerHTML: { __html: reportResult.data }
|
|
32018
32442
|
}
|
|
32019
|
-
)
|
|
32020
|
-
|
|
32021
|
-
|
|
32022
|
-
|
|
32023
|
-
|
|
32024
|
-
|
|
32025
|
-
|
|
32026
|
-
|
|
32027
|
-
|
|
32028
|
-
|
|
32029
|
-
{
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32034
|
-
|
|
32035
|
-
|
|
32443
|
+
) : Array.isArray(reportResult.data) && reportResult.data.length > 0 ? (() => {
|
|
32444
|
+
const rows = reportResult.data;
|
|
32445
|
+
const columns = Object.keys(rows[0]);
|
|
32446
|
+
return /* @__PURE__ */ jsxs(Table, { children: [
|
|
32447
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: columns.map((key) => /* @__PURE__ */ jsx(TableHead, { children: key }, key)) }) }),
|
|
32448
|
+
/* @__PURE__ */ jsx(TableBody, { children: rows.map((row) => {
|
|
32449
|
+
const rowKey = columns.map((key) => String(row[key])).join("|") || JSON.stringify(row);
|
|
32450
|
+
return /* @__PURE__ */ jsx(TableRow, { children: columns.map((key) => /* @__PURE__ */ jsx(TableCell, { children: columnRenderers?.[key] ? columnRenderers[key](row[key], row) : row[key] == null ? "" : String(row[key]) }, key)) }, rowKey);
|
|
32451
|
+
}) })
|
|
32452
|
+
] });
|
|
32453
|
+
})() : /* @__PURE__ */ jsx(Table, { children: /* @__PURE__ */ jsx(TableBody, { children: Object.entries(
|
|
32454
|
+
reportResult.data
|
|
32455
|
+
).map(([key, val]) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
32456
|
+
/* @__PURE__ */ jsx(TableCell, { className: "text-muted-foreground font-medium", children: key }),
|
|
32457
|
+
/* @__PURE__ */ jsx(TableCell, { children: val == null ? "" : String(val) })
|
|
32458
|
+
] }, key)) }) }) : /* @__PURE__ */ jsx("div", { className: "text-muted-foreground py-8 text-center", children: "No data available" }) })
|
|
32459
|
+
]
|
|
32460
|
+
}
|
|
32461
|
+
)
|
|
32036
32462
|
] });
|
|
32037
32463
|
}
|
|
32038
32464
|
function ReportDatePicker({
|
|
@@ -32059,7 +32485,7 @@ function ReportDatePicker({
|
|
|
32059
32485
|
setPreset(value);
|
|
32060
32486
|
const now = /* @__PURE__ */ new Date();
|
|
32061
32487
|
let start;
|
|
32062
|
-
|
|
32488
|
+
const end = now;
|
|
32063
32489
|
switch (value) {
|
|
32064
32490
|
case "today":
|
|
32065
32491
|
start = now;
|
|
@@ -32084,34 +32510,40 @@ function ReportDatePicker({
|
|
|
32084
32510
|
}
|
|
32085
32511
|
onChange?.(start, end);
|
|
32086
32512
|
};
|
|
32513
|
+
const selectOptions = presets.map((p) => ({
|
|
32514
|
+
value: p.value,
|
|
32515
|
+
label: p.label
|
|
32516
|
+
}));
|
|
32087
32517
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-center gap-3", className), children: [
|
|
32088
32518
|
/* @__PURE__ */ jsx(
|
|
32089
|
-
|
|
32519
|
+
Select,
|
|
32090
32520
|
{
|
|
32091
32521
|
value: preset,
|
|
32092
|
-
|
|
32093
|
-
|
|
32094
|
-
|
|
32522
|
+
onValueChange: (value) => handlePresetChange(value),
|
|
32523
|
+
options: selectOptions,
|
|
32524
|
+
size: "sm"
|
|
32095
32525
|
}
|
|
32096
32526
|
),
|
|
32097
32527
|
preset === "custom" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32098
32528
|
/* @__PURE__ */ jsx(
|
|
32099
|
-
|
|
32529
|
+
Input,
|
|
32100
32530
|
{
|
|
32101
32531
|
type: "date",
|
|
32532
|
+
size: "sm",
|
|
32102
32533
|
value: formatDate4(startDate),
|
|
32103
32534
|
onChange: (e) => onChange?.(e.target.value, endDate || /* @__PURE__ */ new Date()),
|
|
32104
|
-
className: "
|
|
32535
|
+
className: "w-auto"
|
|
32105
32536
|
}
|
|
32106
32537
|
),
|
|
32107
32538
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "to" }),
|
|
32108
32539
|
/* @__PURE__ */ jsx(
|
|
32109
|
-
|
|
32540
|
+
Input,
|
|
32110
32541
|
{
|
|
32111
32542
|
type: "date",
|
|
32543
|
+
size: "sm",
|
|
32112
32544
|
value: formatDate4(endDate),
|
|
32113
32545
|
onChange: (e) => onChange?.(startDate || /* @__PURE__ */ new Date(), e.target.value),
|
|
32114
|
-
className: "
|
|
32546
|
+
className: "w-auto"
|
|
32115
32547
|
}
|
|
32116
32548
|
)
|
|
32117
32549
|
] })
|
|
@@ -32370,6 +32802,6 @@ function WebsiteInputGroup({
|
|
|
32370
32802
|
}
|
|
32371
32803
|
WebsiteInputGroup.displayName = "WebsiteInputGroup";
|
|
32372
32804
|
|
|
32373
|
-
export { AGGrid, AIChat, AIChatModal, AIChatTrigger, AILogoIcon, AIMessageDisplay, AITypingIndicator, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, AttachmentPicker, AttachmentPreview, AttachmentPreviewItem, AuthButtons, AuthDialog, AvatarNameRenderer, BookAppointmentButton, BookingDialog, BooleanRenderer, BusinessHours, BusinessHoursEditor, CSVColumnMapper, CSVFileUpload, CameraButton, CardSkeleton, CellRenderers, CharacterCounter, CheckrIntegration, ChevronIcon, ClaimListingButton, ClaimProviderForm, CloseIcon, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, CompanyRenderer, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, ConversationHeader, ConversationListItem, ConversationListSkeleton, CookieConsentBanner, CopyrightText, CreateInvoiceModal, CreateReferralModal, CurrencyRenderer, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DateRangeFilter, DateRangePicker, DateRenderer, DateSeparator, DialogOverlay, DisclaimerText, DocumentDetectionOverlay, DocumentScanner, DomainRenderer, DragDropZone, DropZone, DropzoneOverlay, EditUserRoleModal, EmailRenderer, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, EmptyState, EngagementScoreRenderer, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HelpSupportPanel, HeroSearchBar, HoursSummary, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LightboxModal, LinkedInRenderer, LoadMoreButton, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MCPToolCallDisplay, MaintenancePage, MemoizedAvatarNameRenderer, MemoizedBooleanRenderer, MemoizedCompanyRenderer, MemoizedCurrencyRenderer, MemoizedDateRenderer, MemoizedDomainRenderer, MemoizedEmailRenderer, MemoizedEngagementScoreRenderer, MemoizedLinkedInRenderer, MemoizedNumberRenderer, MemoizedPhoneRenderer, MemoizedProgressRenderer, MemoizedStatusBadgeRenderer, MemoizedTagsRenderer, MessageAvatar, MessageBubble, MessageComposer, MessageList, MessageStatusIcon, MessageThread, MessagingSplitView, MobileBackButton, MobileMenuButton, MobileMenuPanel, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, NumberRenderer, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, PageHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PhoneRenderer, ProductVersion, ProductVersionBadge, ProgressRenderer, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, ReadReceiptIndicator, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, RefreshIcon, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ResourceLink, ResultsEntryCard, ResultsEntryForm, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, SendButton, SendIcon, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, SkeletonMessage, SparklesIcon, SpinnerIcon2 as SpinnerIcon, StatusBadgeRenderer, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TagsRenderer, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, ToolStatusIcon, TypingIndicator, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, bubbleVariants2 as bubbleVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, defaultOrderTabs, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, formatDateLabel, formatFileSize2 as formatFileSize, formatLastSeen, formatPhoneDisplay, generateAttachmentId, generateId, getConversationSubtitle, getConversationTitle, getFileType, getGoogleMapsSearchUrl, getGoogleMapsUrl, getToolIcon, groupMessagesByDate, headerVariants, isSameSenderGroup, isValidUrl, sendButtonVariants, statusColors, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDocumentDetection, useDropzone, useFileUpload, useMessageScroll, useMessages, useReadReceipts, useSidebar, useToast, useTypingIndicator, validateFile };
|
|
32805
|
+
export { AGGrid, AIChat, AIChatModal, AIChatTrigger, AILogoIcon, AIMessageDisplay, AITypingIndicator, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, AttachmentPicker, AttachmentPreview, AttachmentPreviewItem, AuthButtons, AuthDialog, AvatarNameRenderer, BookAppointmentButton, BookingDialog, BooleanRenderer, BusinessHours, BusinessHoursEditor, CSVColumnMapper, CSVFileUpload, CameraButton, CardSkeleton, CellRenderers, CharacterCounter, CheckrIntegration, ChevronIcon, ClaimListingButton, ClaimProviderForm, CloseIcon, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, CompanyRenderer, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, ConversationHeader, ConversationListItem, ConversationListSkeleton, CookieConsentBanner, CopyrightText, CreateInvoiceModal, CreateReferralModal, CurrencyRenderer, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DateRangeFilter, DateRangePicker, DateRenderer, DateSeparator, DialogOverlay, DisclaimerText, DocumentDetectionOverlay, DocumentScanner, DomainRenderer, DragDropZone, DropZone, DropzoneOverlay, EditUserRoleModal, EmailRenderer, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, EmptyState, EngagementScoreRenderer, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HelpSupportPanel, HeroSearchBar, HoursSummary, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LightboxModal, LinkedInRenderer, LoadMoreButton, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MCPToolCallDisplay, MaintenancePage, MemoizedAvatarNameRenderer, MemoizedBooleanRenderer, MemoizedCompanyRenderer, MemoizedCurrencyRenderer, MemoizedDateRenderer, MemoizedDomainRenderer, MemoizedEmailRenderer, MemoizedEngagementScoreRenderer, MemoizedLinkedInRenderer, MemoizedNumberRenderer, MemoizedPhoneRenderer, MemoizedProgressRenderer, MemoizedStatusBadgeRenderer, MemoizedTagsRenderer, MessageAvatar, MessageBubble, MessageComposer, MessageList, MessageStatusIcon, MessageThread, MessagingSplitView, MobileBackButton, MobileMenuButton, MobileMenuPanel, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, NumberRenderer, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, PageHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PhoneRenderer, ProductVersion, ProductVersionBadge, ProgressRenderer, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, ReadReceiptIndicator, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, RefreshIcon, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ResourceLink, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, SendButton, SendIcon, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, SkeletonMessage, SparklesIcon, SpinnerIcon2 as SpinnerIcon, StatusBadgeRenderer, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TagsRenderer, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, ToolStatusIcon, TypingIndicator, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, bubbleVariants2 as bubbleVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, defaultOrderTabs, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, formatDateLabel, formatFileSize2 as formatFileSize, formatLastSeen, formatPhoneDisplay, generateAttachmentId, generateId, getConversationSubtitle, getConversationTitle, getFileType, getGoogleMapsSearchUrl, getGoogleMapsUrl, getToolIcon, groupMessagesByDate, headerVariants, isSameSenderGroup, isValidUrl, sendButtonVariants, statusColors, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDocumentDetection, useDropzone, useFileUpload, useMessageScroll, useMessages, useReadReceipts, useSidebar, useToast, useTypingIndicator, validateFile };
|
|
32374
32806
|
//# sourceMappingURL=index.js.map
|
|
32375
32807
|
//# sourceMappingURL=index.js.map
|