@wealthx/shadcn 1.5.22 → 1.5.24
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/.turbo/turbo-build.log +58 -58
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-NEMWMXGL.mjs → chunk-3HFOSFOM.mjs} +76 -48
- package/dist/{chunk-F3MIRXRF.mjs → chunk-ONYADWSO.mjs} +7 -1
- package/dist/{chunk-K4GJTP6N.mjs → chunk-RYGZRDP6.mjs} +24 -1
- package/dist/{chunk-SET6GFGL.mjs → chunk-ZSMQZ3VN.mjs} +96 -73
- package/dist/components/ui/ai-conversations.js +24 -1
- package/dist/components/ui/ai-conversations.mjs +1 -1
- package/dist/components/ui/appointment-action-dialogs.js +96 -73
- package/dist/components/ui/appointment-action-dialogs.mjs +1 -1
- package/dist/components/ui/appointment-book-dialog.js +76 -48
- package/dist/components/ui/appointment-book-dialog.mjs +1 -1
- package/dist/components/ui/appointment-detail-sheet.js +102 -73
- package/dist/components/ui/appointment-detail-sheet.mjs +2 -2
- package/dist/index.js +204 -124
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
- package/src/components/ui/ai-conversations.tsx +58 -1
- package/src/components/ui/appointment-action-dialogs.tsx +67 -21
- package/src/components/ui/appointment-book-dialog.tsx +150 -53
- package/src/components/ui/appointment-detail-sheet.tsx +18 -0
|
@@ -1405,12 +1405,17 @@ var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
|
1405
1405
|
function ClientSearch({
|
|
1406
1406
|
clients,
|
|
1407
1407
|
value,
|
|
1408
|
-
onValueChange
|
|
1408
|
+
onValueChange,
|
|
1409
|
+
onSearch,
|
|
1410
|
+
isSearching,
|
|
1411
|
+
hasMore,
|
|
1412
|
+
onLoadMore,
|
|
1413
|
+
isLoadingMore
|
|
1409
1414
|
}) {
|
|
1410
1415
|
const [query, setQuery] = import_react3.default.useState("");
|
|
1411
1416
|
const [open, setOpen] = import_react3.default.useState(false);
|
|
1412
1417
|
const selected = clients.find((c) => c.id === value);
|
|
1413
|
-
const filtered = clients.filter((c) => {
|
|
1418
|
+
const filtered = onSearch ? clients : clients.filter((c) => {
|
|
1414
1419
|
const q = query.toLowerCase();
|
|
1415
1420
|
return c.name.toLowerCase().includes(q) || c.email.toLowerCase().includes(q);
|
|
1416
1421
|
});
|
|
@@ -1420,67 +1425,79 @@ function ClientSearch({
|
|
|
1420
1425
|
{
|
|
1421
1426
|
value: selected ? selected.name : query,
|
|
1422
1427
|
onChange: (e) => {
|
|
1423
|
-
|
|
1428
|
+
const v = e.target.value;
|
|
1429
|
+
setQuery(v);
|
|
1424
1430
|
if (selected) onValueChange(void 0);
|
|
1425
|
-
setOpen(
|
|
1431
|
+
setOpen(v.length > 0);
|
|
1432
|
+
onSearch == null ? void 0 : onSearch(v);
|
|
1426
1433
|
},
|
|
1427
1434
|
onBlur: () => setTimeout(() => setOpen(false), 150),
|
|
1428
1435
|
placeholder: "Search by name or email\u2026",
|
|
1429
1436
|
autoComplete: "off"
|
|
1430
1437
|
}
|
|
1431
1438
|
),
|
|
1432
|
-
open && (filtered.length > 0 || query.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute z-50 mt-1 w-full border border-border bg-popover shadow-md", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No clients found." }) :
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1439
|
+
open && (filtered.length > 0 || query.length > 0 || isSearching) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute z-50 mt-1 max-h-64 w-full overflow-y-auto border border-border bg-popover shadow-md", children: isSearching ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "Searching..." }) : filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No clients found." }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
1440
|
+
filtered.map((c) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1441
|
+
Button,
|
|
1442
|
+
{
|
|
1443
|
+
type: "button",
|
|
1444
|
+
variant: "ghost",
|
|
1445
|
+
className: "h-auto w-full flex-col items-start gap-0.5 px-3 py-2 text-left hover:bg-primary/5",
|
|
1446
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1447
|
+
onClick: () => {
|
|
1448
|
+
onValueChange(c.id);
|
|
1449
|
+
setQuery("");
|
|
1450
|
+
setOpen(false);
|
|
1451
|
+
},
|
|
1452
|
+
children: [
|
|
1453
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium", children: c.name }),
|
|
1454
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-xs text-muted-foreground", children: c.email })
|
|
1455
|
+
]
|
|
1443
1456
|
},
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1457
|
+
c.id
|
|
1458
|
+
)),
|
|
1459
|
+
hasMore && onLoadMore && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1460
|
+
Button,
|
|
1461
|
+
{
|
|
1462
|
+
type: "button",
|
|
1463
|
+
variant: "ghost",
|
|
1464
|
+
size: "sm",
|
|
1465
|
+
className: "w-full text-sm text-primary",
|
|
1466
|
+
disabled: isLoadingMore,
|
|
1467
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1468
|
+
onClick: onLoadMore,
|
|
1469
|
+
children: isLoadingMore ? "Loading..." : "Load more"
|
|
1470
|
+
}
|
|
1471
|
+
)
|
|
1472
|
+
] }) })
|
|
1451
1473
|
] });
|
|
1452
1474
|
}
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1475
|
+
function getFormatOptions(platform) {
|
|
1476
|
+
const call = {
|
|
1477
|
+
value: "call",
|
|
1478
|
+
label: "Call",
|
|
1479
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Phone, { className: "h-4 w-4" })
|
|
1480
|
+
};
|
|
1481
|
+
const googleMeet = {
|
|
1456
1482
|
value: "google-meet",
|
|
1457
1483
|
label: "Google Meet",
|
|
1458
1484
|
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Video, { className: "h-4 w-4" })
|
|
1459
|
-
}
|
|
1460
|
-
{
|
|
1485
|
+
};
|
|
1486
|
+
const msTeams = {
|
|
1461
1487
|
value: "microsoft-teams",
|
|
1462
1488
|
label: "MS Teams",
|
|
1463
1489
|
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Users, { className: "h-4 w-4" })
|
|
1464
|
-
}
|
|
1465
|
-
{
|
|
1466
|
-
value: "offline",
|
|
1467
|
-
label: "Offline",
|
|
1468
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.MapPin, { className: "h-4 w-4" })
|
|
1469
|
-
}
|
|
1470
|
-
];
|
|
1471
|
-
var CLIENT_FORMAT_OPTIONS = [
|
|
1472
|
-
{ value: "call", label: "Call", icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Phone, { className: "h-4 w-4" }) },
|
|
1473
|
-
{
|
|
1474
|
-
value: "online",
|
|
1475
|
-
label: "Online Meeting",
|
|
1476
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.Video, { className: "h-4 w-4" })
|
|
1477
|
-
},
|
|
1478
|
-
{
|
|
1490
|
+
};
|
|
1491
|
+
const offline = {
|
|
1479
1492
|
value: "offline",
|
|
1480
1493
|
label: "Offline Meeting",
|
|
1481
1494
|
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react7.MapPin, { className: "h-4 w-4" })
|
|
1482
|
-
}
|
|
1483
|
-
];
|
|
1495
|
+
};
|
|
1496
|
+
if (platform === "google-meet") return [call, googleMeet, offline];
|
|
1497
|
+
if (platform === "microsoft-teams") return [call, msTeams, offline];
|
|
1498
|
+
if (platform === "any") return [call, googleMeet, msTeams, offline];
|
|
1499
|
+
return [call, offline];
|
|
1500
|
+
}
|
|
1484
1501
|
function MeetingFormatSection({
|
|
1485
1502
|
format: format2,
|
|
1486
1503
|
onFormatChange,
|
|
@@ -1610,6 +1627,11 @@ function AppointmentBookDialog({
|
|
|
1610
1627
|
open,
|
|
1611
1628
|
onOpenChange,
|
|
1612
1629
|
clients = [],
|
|
1630
|
+
onSearchClients,
|
|
1631
|
+
isSearchingClients,
|
|
1632
|
+
hasMoreClients,
|
|
1633
|
+
onLoadMoreClients,
|
|
1634
|
+
isLoadingMoreClients,
|
|
1613
1635
|
meetingTypes = [],
|
|
1614
1636
|
amSlots,
|
|
1615
1637
|
pmSlots,
|
|
@@ -1620,11 +1642,12 @@ function AppointmentBookDialog({
|
|
|
1620
1642
|
advisorInfo,
|
|
1621
1643
|
initialClientId,
|
|
1622
1644
|
defaultMeetingFormat,
|
|
1645
|
+
onlinePlatform,
|
|
1623
1646
|
guestInfo,
|
|
1624
1647
|
onBook
|
|
1625
1648
|
}) {
|
|
1626
1649
|
var _a, _b, _c;
|
|
1627
|
-
const isClientMode = clients.length === 0;
|
|
1650
|
+
const isClientMode = clients.length === 0 && !onSearchClients;
|
|
1628
1651
|
const showGuestForm = isClientMode && !((guestInfo == null ? void 0 : guestInfo.name) && (guestInfo == null ? void 0 : guestInfo.email));
|
|
1629
1652
|
const disabledDayOfWeek = import_react3.default.useMemo(
|
|
1630
1653
|
() => schedule == null ? void 0 : schedule.filter((d) => !d.enabled).map((d) => DAY_MAP[d.day]).filter((n) => n !== void 0),
|
|
@@ -1716,7 +1739,12 @@ function AppointmentBookDialog({
|
|
|
1716
1739
|
{
|
|
1717
1740
|
clients,
|
|
1718
1741
|
value: clientId,
|
|
1719
|
-
onValueChange: setClientId
|
|
1742
|
+
onValueChange: setClientId,
|
|
1743
|
+
onSearch: onSearchClients,
|
|
1744
|
+
isSearching: isSearchingClients,
|
|
1745
|
+
hasMore: hasMoreClients,
|
|
1746
|
+
onLoadMore: onLoadMoreClients,
|
|
1747
|
+
isLoadingMore: isLoadingMoreClients
|
|
1720
1748
|
}
|
|
1721
1749
|
)
|
|
1722
1750
|
] }),
|
|
@@ -1774,7 +1802,7 @@ function AppointmentBookDialog({
|
|
|
1774
1802
|
)
|
|
1775
1803
|
] })
|
|
1776
1804
|
] }),
|
|
1777
|
-
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1778
1806
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { children: "Meeting format" }),
|
|
1779
1807
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1780
1808
|
MeetingFormatSection,
|
|
@@ -1788,7 +1816,7 @@ function AppointmentBookDialog({
|
|
|
1788
1816
|
advisorOfficeAddress,
|
|
1789
1817
|
clientHomeAddress,
|
|
1790
1818
|
isClientMode,
|
|
1791
|
-
formatOptions:
|
|
1819
|
+
formatOptions: getFormatOptions(onlinePlatform)
|
|
1792
1820
|
}
|
|
1793
1821
|
)
|
|
1794
1822
|
] }),
|
|
@@ -1181,6 +1181,15 @@ function AppointmentConfirmDialog({
|
|
|
1181
1181
|
] })
|
|
1182
1182
|
] }) });
|
|
1183
1183
|
}
|
|
1184
|
+
var DAY_MAP = {
|
|
1185
|
+
Sun: 0,
|
|
1186
|
+
Mon: 1,
|
|
1187
|
+
Tue: 2,
|
|
1188
|
+
Wed: 3,
|
|
1189
|
+
Thu: 4,
|
|
1190
|
+
Fri: 5,
|
|
1191
|
+
Sat: 6
|
|
1192
|
+
};
|
|
1184
1193
|
function AppointmentRescheduleDialog({
|
|
1185
1194
|
open,
|
|
1186
1195
|
onOpenChange,
|
|
@@ -1189,11 +1198,19 @@ function AppointmentRescheduleDialog({
|
|
|
1189
1198
|
currentDate,
|
|
1190
1199
|
currentTimeStart,
|
|
1191
1200
|
currentTimeEnd,
|
|
1201
|
+
onDateChange,
|
|
1202
|
+
schedule,
|
|
1203
|
+
isLoadingSlots,
|
|
1192
1204
|
onReschedule
|
|
1193
1205
|
}) {
|
|
1194
1206
|
const [date, setDate] = import_react3.default.useState(/* @__PURE__ */ new Date());
|
|
1195
1207
|
const [slot, setSlot] = import_react3.default.useState();
|
|
1196
1208
|
const [note, setNote] = import_react3.default.useState("");
|
|
1209
|
+
const today = import_react3.default.useMemo(() => /* @__PURE__ */ new Date(), []);
|
|
1210
|
+
const disabledDayOfWeek = import_react3.default.useMemo(
|
|
1211
|
+
() => schedule == null ? void 0 : schedule.filter((d) => !d.enabled).map((d) => DAY_MAP[d.day]).filter((n) => n !== void 0),
|
|
1212
|
+
[schedule]
|
|
1213
|
+
);
|
|
1197
1214
|
const handleOpenChange = (next) => {
|
|
1198
1215
|
if (!next) {
|
|
1199
1216
|
setDate(/* @__PURE__ */ new Date());
|
|
@@ -1211,87 +1228,93 @@ function AppointmentRescheduleDialog({
|
|
|
1211
1228
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogDescription, { children: "Select a new date and time slot. The client will be notified by email." })
|
|
1212
1229
|
] }),
|
|
1213
1230
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, {}),
|
|
1214
|
-
|
|
1215
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.
|
|
1223
|
-
|
|
1224
|
-
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-4 overflow-y-auto max-h-[calc(90vh-200px)]", children: [
|
|
1232
|
+
(currentDate || currentTimeStart) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Current booking" }),
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-4 border border-border bg-muted/30 px-3 py-2.5 text-sm text-muted-foreground", children: [
|
|
1235
|
+
currentDate && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Calendar, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
1237
|
+
currentDate
|
|
1238
|
+
] }),
|
|
1239
|
+
currentTimeStart && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Clock, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
1241
|
+
currentTimeStart,
|
|
1242
|
+
currentTimeEnd ? ` \u2013 ${currentTimeEnd}` : ""
|
|
1243
|
+
] })
|
|
1225
1244
|
] })
|
|
1226
|
-
] })
|
|
1227
|
-
] }),
|
|
1228
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "grid grid-cols-[auto_1fr] items-start gap-5", children: [
|
|
1229
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1230
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label, { children: "New date" }),
|
|
1231
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1232
|
-
Calendar,
|
|
1233
|
-
{
|
|
1234
|
-
mode: "single",
|
|
1235
|
-
selected: date,
|
|
1236
|
-
onSelect: (d) => {
|
|
1237
|
-
setDate(d);
|
|
1238
|
-
setSlot(void 0);
|
|
1239
|
-
},
|
|
1240
|
-
captionLayout: "label",
|
|
1241
|
-
fromDate: /* @__PURE__ */ new Date(),
|
|
1242
|
-
disabled: { before: /* @__PURE__ */ new Date() },
|
|
1243
|
-
className: "border border-border"
|
|
1244
|
-
}
|
|
1245
|
-
)
|
|
1246
1245
|
] }),
|
|
1247
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.
|
|
1248
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex
|
|
1246
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "grid grid-cols-[auto_1fr] items-start gap-5", children: [
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label, { children: "New date" }),
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1250
|
+
Calendar,
|
|
1251
|
+
{
|
|
1252
|
+
mode: "single",
|
|
1253
|
+
selected: date,
|
|
1254
|
+
onSelect: (d) => {
|
|
1255
|
+
setDate(d);
|
|
1256
|
+
setSlot(void 0);
|
|
1257
|
+
if (d) onDateChange == null ? void 0 : onDateChange(d);
|
|
1258
|
+
},
|
|
1259
|
+
captionLayout: "label",
|
|
1260
|
+
fromDate: today,
|
|
1261
|
+
disabled: disabledDayOfWeek && disabledDayOfWeek.length > 0 ? [{ before: today }, { dayOfWeek: disabledDayOfWeek }] : { before: today },
|
|
1262
|
+
className: "border border-border"
|
|
1263
|
+
}
|
|
1264
|
+
)
|
|
1265
|
+
] }),
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col gap-5", children: date ? isLoadingSlots ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-8 text-center", children: [
|
|
1267
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-semibold", children: "Loading slots\u2026" }),
|
|
1268
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground", children: "Fetching available times for the selected date." })
|
|
1269
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1270
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
1271
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-semibold", children: "Select a time slot" }),
|
|
1272
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
1273
|
+
totalAvailable,
|
|
1274
|
+
" available"
|
|
1275
|
+
] })
|
|
1276
|
+
] }),
|
|
1277
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1278
|
+
AppointmentSlotSection,
|
|
1279
|
+
{
|
|
1280
|
+
label: "Morning",
|
|
1281
|
+
slots: amSlots,
|
|
1282
|
+
selectedSlotId: slot == null ? void 0 : slot.id,
|
|
1283
|
+
onSelect: setSlot
|
|
1284
|
+
}
|
|
1285
|
+
),
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1287
|
+
AppointmentSlotSection,
|
|
1288
|
+
{
|
|
1289
|
+
label: "Afternoon",
|
|
1290
|
+
slots: pmSlots,
|
|
1291
|
+
selectedSlotId: slot == null ? void 0 : slot.id,
|
|
1292
|
+
onSelect: setSlot
|
|
1293
|
+
}
|
|
1294
|
+
)
|
|
1295
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-8 text-center", children: [
|
|
1249
1296
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-semibold", children: "Select a time slot" }),
|
|
1250
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground", children: "Pick a date on the left to see available slots." })
|
|
1298
|
+
] }) })
|
|
1299
|
+
] }),
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1301
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Label, { htmlFor: "reschedule-note", children: [
|
|
1302
|
+
"Note",
|
|
1303
|
+
" ",
|
|
1304
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
1254
1305
|
] }),
|
|
1255
1306
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1256
|
-
|
|
1257
|
-
{
|
|
1258
|
-
label: "Morning",
|
|
1259
|
-
slots: amSlots,
|
|
1260
|
-
selectedSlotId: slot == null ? void 0 : slot.id,
|
|
1261
|
-
onSelect: setSlot
|
|
1262
|
-
}
|
|
1263
|
-
),
|
|
1264
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1265
|
-
AppointmentSlotSection,
|
|
1307
|
+
Textarea,
|
|
1266
1308
|
{
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1309
|
+
id: "reschedule-note",
|
|
1310
|
+
placeholder: "e.g. Rescheduling due to an internal conflict \u2014 apologies for the inconvenience\u2026",
|
|
1311
|
+
value: note,
|
|
1312
|
+
onChange: (e) => setNote(e.target.value),
|
|
1313
|
+
className: "w-full resize-none",
|
|
1314
|
+
rows: 2
|
|
1271
1315
|
}
|
|
1272
1316
|
)
|
|
1273
|
-
] })
|
|
1274
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-semibold", children: "Select a time slot" }),
|
|
1275
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground", children: "Pick a date on the left to see available slots." })
|
|
1276
|
-
] }) })
|
|
1277
|
-
] }),
|
|
1278
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1279
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Label, { htmlFor: "reschedule-note", children: [
|
|
1280
|
-
"Note",
|
|
1281
|
-
" ",
|
|
1282
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
1283
|
-
] }),
|
|
1284
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1285
|
-
Textarea,
|
|
1286
|
-
{
|
|
1287
|
-
id: "reschedule-note",
|
|
1288
|
-
placeholder: "e.g. Rescheduling due to an internal conflict \u2014 apologies for the inconvenience\u2026",
|
|
1289
|
-
value: note,
|
|
1290
|
-
onChange: (e) => setNote(e.target.value),
|
|
1291
|
-
className: "w-full resize-none",
|
|
1292
|
-
rows: 2
|
|
1293
|
-
}
|
|
1294
|
-
)
|
|
1317
|
+
] })
|
|
1295
1318
|
] }),
|
|
1296
1319
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogFooter, { children: [
|
|
1297
1320
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogClose, { render: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { variant: "outline" }), children: "Cancel" }),
|
|
@@ -1361,6 +1384,9 @@ function AppointmentDetailSheet({
|
|
|
1361
1384
|
clientProfile,
|
|
1362
1385
|
amSlots,
|
|
1363
1386
|
pmSlots,
|
|
1387
|
+
onDateChange,
|
|
1388
|
+
schedule,
|
|
1389
|
+
isLoadingSlots,
|
|
1364
1390
|
onAccept,
|
|
1365
1391
|
onDecline,
|
|
1366
1392
|
onReschedule,
|
|
@@ -1561,6 +1587,9 @@ function AppointmentDetailSheet({
|
|
|
1561
1587
|
currentDate: appointment.date,
|
|
1562
1588
|
currentTimeStart: appointment.timeStart,
|
|
1563
1589
|
currentTimeEnd: appointment.timeEnd,
|
|
1590
|
+
onDateChange,
|
|
1591
|
+
schedule,
|
|
1592
|
+
isLoadingSlots,
|
|
1564
1593
|
onReschedule: (date, slot, note) => {
|
|
1565
1594
|
onReschedule == null ? void 0 : onReschedule(appointment.id, date, slot, note);
|
|
1566
1595
|
setRescheduleOpen(false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AppointmentDetailSheet
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-ONYADWSO.mjs";
|
|
4
|
+
import "../../chunk-ZSMQZ3VN.mjs";
|
|
5
5
|
import "../../chunk-CQ7HKBEX.mjs";
|
|
6
6
|
import "../../chunk-H3PTREG6.mjs";
|
|
7
7
|
import "../../chunk-2GIYVERS.mjs";
|