@wealthx/shadcn 1.2.2 → 1.3.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.
Files changed (229) hide show
  1. package/.turbo/turbo-build.log +200 -156
  2. package/CHANGELOG.md +22 -0
  3. package/dist/{chunk-4Y6R4WEC.mjs → chunk-2A5RRQGG.mjs} +9 -22
  4. package/dist/{chunk-TS2ZX2VS.mjs → chunk-2UM72RJ7.mjs} +11 -15
  5. package/dist/{chunk-A56YQQHG.mjs → chunk-3NCUZIFP.mjs} +2 -2
  6. package/dist/chunk-3OYFOX3X.mjs +79 -0
  7. package/dist/{chunk-RP3SQYA3.mjs → chunk-3TTACBDP.mjs} +9 -4
  8. package/dist/chunk-4GAWMKMI.mjs +710 -0
  9. package/dist/{chunk-VGSESELX.mjs → chunk-5FQIKDKP.mjs} +5 -5
  10. package/dist/{chunk-K3JYD4IU.mjs → chunk-5IS7G74I.mjs} +11 -4
  11. package/dist/chunk-6AW4KJHE.mjs +235 -0
  12. package/dist/chunk-6CR5N2JW.mjs +302 -0
  13. package/dist/{chunk-XIRTEFKH.mjs → chunk-6DZEXFNB.mjs} +36 -8
  14. package/dist/chunk-6O6KD7CE.mjs +271 -0
  15. package/dist/chunk-7PV3IWCN.mjs +33 -0
  16. package/dist/{chunk-SPJ5KXW7.mjs → chunk-7S5AESZO.mjs} +5 -5
  17. package/dist/{chunk-RYCLWMZ7.mjs → chunk-ABFDMHOR.mjs} +9 -7
  18. package/dist/{chunk-SWGT756Z.mjs → chunk-AMQZRHEZ.mjs} +10 -4
  19. package/dist/{chunk-WAZD7NFU.mjs → chunk-BKNFWEH2.mjs} +6 -6
  20. package/dist/{chunk-CLIN5525.mjs → chunk-C7CQJNMR.mjs} +1 -1
  21. package/dist/{chunk-D4ILTPOG.mjs → chunk-CFMQP5QS.mjs} +5 -4
  22. package/dist/{chunk-VPBN3WOO.mjs → chunk-DGHAXJBN.mjs} +9 -7
  23. package/dist/chunk-DOEO3CDL.mjs +27 -0
  24. package/dist/{chunk-5MEWU56Z.mjs → chunk-DUJTAXMH.mjs} +11 -6
  25. package/dist/{chunk-GGM2UYGG.mjs → chunk-EBXQWIYG.mjs} +10 -4
  26. package/dist/chunk-EWRB4PAD.mjs +468 -0
  27. package/dist/{chunk-ZSHYDDRB.mjs → chunk-FAKPBKLT.mjs} +6 -2
  28. package/dist/chunk-FNQXOAYJ.mjs +169 -0
  29. package/dist/{chunk-A6AAWBPF.mjs → chunk-GHC7LLUX.mjs} +13 -4
  30. package/dist/chunk-HBZLGDIN.mjs +507 -0
  31. package/dist/{chunk-SIZMLSRU.mjs → chunk-HISNT2MG.mjs} +8 -6
  32. package/dist/{chunk-CGH4DRNG.mjs → chunk-HVY6KCCF.mjs} +10 -7
  33. package/dist/chunk-I3RZS7V2.mjs +136 -0
  34. package/dist/chunk-IAE3F7DR.mjs +1962 -0
  35. package/dist/{chunk-UT4KJR7V.mjs → chunk-IHMFS7NZ.mjs} +35 -74
  36. package/dist/{chunk-PCPLO5HT.mjs → chunk-IOJRDS6V.mjs} +96 -14
  37. package/dist/{chunk-LHYCMLVA.mjs → chunk-JKGDCQTZ.mjs} +11 -4
  38. package/dist/{chunk-H45TKD34.mjs → chunk-JMHR3YGZ.mjs} +1 -1
  39. package/dist/{chunk-4MN6UQHG.mjs → chunk-K5A5L6T2.mjs} +17 -39
  40. package/dist/chunk-LV35NGVG.mjs +272 -0
  41. package/dist/{chunk-FZIXGLMV.mjs → chunk-M3FV7LOK.mjs} +5 -12
  42. package/dist/{chunk-FMAXJ2SI.mjs → chunk-MBON7YRJ.mjs} +1 -1
  43. package/dist/chunk-MIZQHHUO.mjs +441 -0
  44. package/dist/chunk-MN5NYQCL.mjs +29 -0
  45. package/dist/chunk-NL3ZO62D.mjs +31 -0
  46. package/dist/{chunk-Q76O3RIQ.mjs → chunk-NMOI6CQD.mjs} +1 -1
  47. package/dist/{chunk-P6AM5V7O.mjs → chunk-OODBHKG7.mjs} +1 -1
  48. package/dist/chunk-PBL4OQV2.mjs +283 -0
  49. package/dist/{chunk-Y4QFWRNR.mjs → chunk-PU4YZQXV.mjs} +17 -18
  50. package/dist/chunk-QMY3AZJH.mjs +80 -0
  51. package/dist/{chunk-BL3DXM2X.mjs → chunk-QZ4RE6NA.mjs} +11 -4
  52. package/dist/{chunk-VACKZOMY.mjs → chunk-R3VSPKNP.mjs} +3 -3
  53. package/dist/{chunk-OPNQAVVH.mjs → chunk-RJI6GKVF.mjs} +8 -6
  54. package/dist/{chunk-WG6JGJXB.mjs → chunk-T4BJLT57.mjs} +1 -1
  55. package/dist/chunk-UMTOX62O.mjs +415 -0
  56. package/dist/{chunk-7MMXNK3C.mjs → chunk-VLARHE5V.mjs} +8 -6
  57. package/dist/{chunk-2I5S2AMY.mjs → chunk-XREGSKX3.mjs} +2 -2
  58. package/dist/{chunk-JNQORUPP.mjs → chunk-YJG55G2H.mjs} +14 -11
  59. package/dist/{chunk-ZRSDX6OW.mjs → chunk-ZC45IGZO.mjs} +33 -30
  60. package/dist/components/ui/add-column-modal.js +42 -14
  61. package/dist/components/ui/add-column-modal.mjs +5 -5
  62. package/dist/components/ui/add-lead-modal.js +42 -11
  63. package/dist/components/ui/add-lead-modal.mjs +3 -3
  64. package/dist/components/ui/advisor-card.js +497 -0
  65. package/dist/components/ui/advisor-card.mjs +13 -0
  66. package/dist/components/ui/ai-assistant-drawer.js +11 -10
  67. package/dist/components/ui/ai-assistant-drawer.mjs +3 -3
  68. package/dist/components/ui/alert-dialog.js +2 -2
  69. package/dist/components/ui/alert-dialog.mjs +2 -2
  70. package/dist/components/ui/appointment-action-dialogs.js +1160 -0
  71. package/dist/components/ui/appointment-action-dialogs.mjs +23 -0
  72. package/dist/components/ui/appointment-availability-settings.js +1590 -0
  73. package/dist/components/ui/appointment-availability-settings.mjs +23 -0
  74. package/dist/components/ui/appointment-book-dialog.js +1744 -0
  75. package/dist/components/ui/appointment-book-dialog.mjs +27 -0
  76. package/dist/components/ui/appointment-calendar-view.js +833 -0
  77. package/dist/components/ui/appointment-calendar-view.mjs +14 -0
  78. package/dist/components/ui/appointment-detail-sheet.js +1517 -0
  79. package/dist/components/ui/appointment-detail-sheet.mjs +24 -0
  80. package/dist/components/ui/appointment-gmail-connect.js +467 -0
  81. package/dist/components/ui/appointment-gmail-connect.mjs +14 -0
  82. package/dist/components/ui/appointment-mini-card.js +345 -0
  83. package/dist/components/ui/appointment-mini-card.mjs +11 -0
  84. package/dist/components/ui/appointment-time-slot-picker.js +311 -0
  85. package/dist/components/ui/appointment-time-slot-picker.mjs +13 -0
  86. package/dist/components/ui/appointment-upcoming-card.js +1268 -0
  87. package/dist/components/ui/appointment-upcoming-card.mjs +21 -0
  88. package/dist/components/ui/backoffice-alert-history-chart.js +11 -5
  89. package/dist/components/ui/backoffice-alert-history-chart.mjs +5 -4
  90. package/dist/components/ui/backoffice-alerts-chart.js +786 -0
  91. package/dist/components/ui/backoffice-alerts-chart.mjs +19 -0
  92. package/dist/components/ui/backoffice-connections-chart.js +817 -0
  93. package/dist/components/ui/backoffice-connections-chart.mjs +19 -0
  94. package/dist/components/ui/backoffice-contact-history-chart.js +11 -5
  95. package/dist/components/ui/backoffice-contact-history-chart.mjs +5 -4
  96. package/dist/components/ui/badge.js +6 -6
  97. package/dist/components/ui/badge.mjs +1 -1
  98. package/dist/components/ui/borrowing-capacity-line-chart.js +30 -21
  99. package/dist/components/ui/borrowing-capacity-line-chart.mjs +5 -4
  100. package/dist/components/ui/button.js +2 -2
  101. package/dist/components/ui/button.mjs +1 -1
  102. package/dist/components/ui/calendar.js +2 -2
  103. package/dist/components/ui/calendar.mjs +2 -2
  104. package/dist/components/ui/card.js +1 -1
  105. package/dist/components/ui/card.mjs +1 -1
  106. package/dist/components/ui/cash-balance-line-chart.js +31 -23
  107. package/dist/components/ui/cash-balance-line-chart.mjs +5 -4
  108. package/dist/components/ui/cashflow-bar-chart.js +12 -5
  109. package/dist/components/ui/cashflow-bar-chart.mjs +5 -4
  110. package/dist/components/ui/chip.js +97 -18
  111. package/dist/components/ui/chip.mjs +3 -2
  112. package/dist/components/ui/color-picker.js +158 -28
  113. package/dist/components/ui/color-picker.mjs +3 -1
  114. package/dist/components/ui/data-table.js +140 -119
  115. package/dist/components/ui/data-table.mjs +3 -2
  116. package/dist/components/ui/date-picker.js +48 -27
  117. package/dist/components/ui/date-picker.mjs +4 -3
  118. package/dist/components/ui/dialog.js +37 -9
  119. package/dist/components/ui/dialog.mjs +2 -2
  120. package/dist/components/ui/expense-bar-chart.js +12 -5
  121. package/dist/components/ui/expense-bar-chart.mjs +5 -4
  122. package/dist/components/ui/field.mjs +2 -2
  123. package/dist/components/ui/financial-cards.js +322 -155
  124. package/dist/components/ui/financial-cards.mjs +5 -3
  125. package/dist/components/ui/financial-drawers.js +2 -2
  126. package/dist/components/ui/financial-drawers.mjs +3 -3
  127. package/dist/components/ui/financial-sections.js +14 -10
  128. package/dist/components/ui/financial-sections.mjs +6 -5
  129. package/dist/components/ui/income-bar-chart.js +12 -5
  130. package/dist/components/ui/income-bar-chart.mjs +5 -4
  131. package/dist/components/ui/input-group.js +2 -2
  132. package/dist/components/ui/input-group.mjs +2 -2
  133. package/dist/components/ui/kanban-column.js +52 -44
  134. package/dist/components/ui/kanban-column.mjs +7 -5
  135. package/dist/components/ui/opportunity-card.js +52 -44
  136. package/dist/components/ui/opportunity-card.mjs +6 -4
  137. package/dist/components/ui/opportunity-edit-modals.js +1367 -1263
  138. package/dist/components/ui/opportunity-edit-modals.mjs +8 -8
  139. package/dist/components/ui/opportunity-summary-tab.js +2744 -2157
  140. package/dist/components/ui/opportunity-summary-tab.mjs +14 -14
  141. package/dist/components/ui/page-header.js +92 -0
  142. package/dist/components/ui/page-header.mjs +8 -0
  143. package/dist/components/ui/page-top-bar.js +88 -0
  144. package/dist/components/ui/page-top-bar.mjs +8 -0
  145. package/dist/components/ui/pagination.js +303 -19
  146. package/dist/components/ui/pagination.mjs +11 -4
  147. package/dist/components/ui/pipeline-board.js +205 -191
  148. package/dist/components/ui/pipeline-board.mjs +9 -7
  149. package/dist/components/ui/pipeline-dialogs.js +114 -65
  150. package/dist/components/ui/pipeline-dialogs.mjs +7 -6
  151. package/dist/components/ui/pipeline-primitives.js +6 -6
  152. package/dist/components/ui/pipeline-primitives.mjs +2 -2
  153. package/dist/components/ui/property-cashflow-doughnut-chart.js +14 -12
  154. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +5 -4
  155. package/dist/components/ui/property-debt-equity-doughnut-chart.js +14 -12
  156. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +5 -4
  157. package/dist/components/ui/property-mobile-estimate-line-chart.js +16 -14
  158. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +5 -4
  159. package/dist/components/ui/sidebar-nav.js +234 -95
  160. package/dist/components/ui/sidebar-nav.mjs +4 -1
  161. package/dist/components/ui/stage-timeline.js +6 -6
  162. package/dist/components/ui/stage-timeline.mjs +3 -3
  163. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +18 -16
  164. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +5 -4
  165. package/dist/components/ui/transactions-income-expense-bar-chart.js +28 -12
  166. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +5 -4
  167. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +18 -16
  168. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +5 -4
  169. package/dist/index.js +12899 -9343
  170. package/dist/index.mjs +256 -190
  171. package/dist/styles.css +1 -1
  172. package/package.json +71 -1
  173. package/src/components/index.tsx +114 -9
  174. package/src/components/ui/add-column-modal.tsx +7 -7
  175. package/src/components/ui/add-lead-modal.tsx +6 -3
  176. package/src/components/ui/advisor-card.tsx +227 -0
  177. package/src/components/ui/ai-assistant-drawer.tsx +4 -3
  178. package/src/components/ui/appointment-action-dialogs.tsx +297 -0
  179. package/src/components/ui/appointment-availability-settings.tsx +645 -0
  180. package/src/components/ui/appointment-book-dialog.tsx +618 -0
  181. package/src/components/ui/appointment-calendar-view.tsx +510 -0
  182. package/src/components/ui/appointment-detail-sheet.tsx +415 -0
  183. package/src/components/ui/appointment-gmail-connect.tsx +188 -0
  184. package/src/components/ui/appointment-mini-card.tsx +104 -0
  185. package/src/components/ui/appointment-time-slot-picker.tsx +123 -0
  186. package/src/components/ui/appointment-upcoming-card.tsx +635 -0
  187. package/src/components/ui/backoffice-alert-history-chart.tsx +10 -2
  188. package/src/components/ui/backoffice-alerts-chart.tsx +312 -0
  189. package/src/components/ui/backoffice-connections-chart.tsx +339 -0
  190. package/src/components/ui/backoffice-contact-history-chart.tsx +10 -2
  191. package/src/components/ui/badge.tsx +12 -6
  192. package/src/components/ui/borrowing-capacity-line-chart.tsx +4 -11
  193. package/src/components/ui/button.tsx +2 -2
  194. package/src/components/ui/card.tsx +1 -1
  195. package/src/components/ui/cash-balance-line-chart.tsx +4 -23
  196. package/src/components/ui/cashflow-bar-chart.tsx +9 -2
  197. package/src/components/ui/chart-shared.tsx +4 -11
  198. package/src/components/ui/chip.tsx +23 -19
  199. package/src/components/ui/color-picker.tsx +4 -2
  200. package/src/components/ui/data-table.tsx +28 -74
  201. package/src/components/ui/date-picker.tsx +42 -37
  202. package/src/components/ui/dialog.tsx +72 -6
  203. package/src/components/ui/expense-bar-chart.tsx +11 -2
  204. package/src/components/ui/financial-cards.tsx +99 -10
  205. package/src/components/ui/income-bar-chart.tsx +11 -2
  206. package/src/components/ui/opportunity-card.tsx +10 -39
  207. package/src/components/ui/opportunity-edit-modals.tsx +98 -36
  208. package/src/components/ui/opportunity-summary-tab.tsx +548 -232
  209. package/src/components/ui/page-header.tsx +57 -0
  210. package/src/components/ui/page-top-bar.tsx +48 -0
  211. package/src/components/ui/pagination.tsx +171 -22
  212. package/src/components/ui/pipeline-board.tsx +12 -5
  213. package/src/components/ui/property-cashflow-doughnut-chart.tsx +3 -1
  214. package/src/components/ui/property-debt-equity-doughnut-chart.tsx +3 -1
  215. package/src/components/ui/property-mobile-estimate-line-chart.tsx +3 -1
  216. package/src/components/ui/sidebar-nav.tsx +36 -37
  217. package/src/components/ui/transactions-expense-categories-doughnut-chart.tsx +3 -1
  218. package/src/components/ui/transactions-income-expense-bar-chart.tsx +12 -9
  219. package/src/components/ui/transactions-liabilities-breakdown-doughnut-chart.tsx +3 -1
  220. package/src/lib/format-currency.ts +44 -0
  221. package/src/lib/format-date.ts +50 -0
  222. package/src/lib/opportunity-constants.ts +12 -0
  223. package/src/styles/globals.css +17 -15
  224. package/src/styles/styles-css.ts +1 -1
  225. package/tsup.config.ts +14 -0
  226. package/dist/chunk-S4QRUQNW.mjs +0 -475
  227. package/dist/chunk-URGMJAE3.mjs +0 -1885
  228. package/dist/chunk-WNGWBVLV.mjs +0 -148
  229. package/dist/{chunk-LLVQKSU3.mjs → chunk-GD4BJDJR.mjs} +3 -3
@@ -0,0 +1,272 @@
1
+ import {
2
+ Sheet,
3
+ SheetContent
4
+ } from "./chunk-462HMNO4.mjs";
5
+ import {
6
+ AppointmentConfirmDialog,
7
+ AppointmentRescheduleDialog
8
+ } from "./chunk-6AW4KJHE.mjs";
9
+ import {
10
+ Avatar,
11
+ AvatarFallback
12
+ } from "./chunk-24FUO7TD.mjs";
13
+ import {
14
+ Badge
15
+ } from "./chunk-BKNFWEH2.mjs";
16
+ import {
17
+ Separator
18
+ } from "./chunk-FH6QVUVZ.mjs";
19
+ import {
20
+ Button
21
+ } from "./chunk-XREGSKX3.mjs";
22
+
23
+ // src/components/ui/appointment-detail-sheet.tsx
24
+ import React from "react";
25
+ import {
26
+ AlertCircle,
27
+ Calendar,
28
+ CalendarClock,
29
+ Check,
30
+ CircleUser,
31
+ Clock,
32
+ FileText,
33
+ Mail,
34
+ MapPin,
35
+ Phone,
36
+ RefreshCw,
37
+ Users,
38
+ Video,
39
+ X
40
+ } from "lucide-react";
41
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
42
+ var STATUS_CONFIG = {
43
+ pending: {
44
+ variant: "warning",
45
+ label: "Pending",
46
+ icon: /* @__PURE__ */ jsx(CalendarClock, { size: 12 })
47
+ },
48
+ confirmed: {
49
+ variant: "success",
50
+ label: "Confirmed",
51
+ icon: /* @__PURE__ */ jsx(Check, { size: 12 })
52
+ },
53
+ cancelled: {
54
+ variant: "destructive",
55
+ label: "Cancelled",
56
+ icon: /* @__PURE__ */ jsx(X, { size: 12 })
57
+ },
58
+ rescheduled: {
59
+ variant: "info",
60
+ label: "Rescheduled",
61
+ icon: /* @__PURE__ */ jsx(RefreshCw, { size: 12 })
62
+ }
63
+ };
64
+ function AppointmentDetailSheet({
65
+ appointment,
66
+ open,
67
+ onOpenChange,
68
+ clientProfile,
69
+ amSlots,
70
+ pmSlots,
71
+ onAccept,
72
+ onDecline,
73
+ onReschedule,
74
+ onBookNew
75
+ }) {
76
+ const [confirmAction, setConfirmAction] = React.useState(null);
77
+ const [rescheduleOpen, setRescheduleOpen] = React.useState(false);
78
+ if (!appointment) return null;
79
+ const { variant, label, icon } = STATUS_CONFIG[appointment.status];
80
+ const isCancelled = appointment.status === "cancelled";
81
+ const isConfirmed = appointment.status === "confirmed";
82
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
83
+ /* @__PURE__ */ jsx(Sheet, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
84
+ SheetContent,
85
+ {
86
+ side: "right",
87
+ className: "flex w-[440px] flex-col gap-0 overflow-y-auto p-0",
88
+ children: [
89
+ /* @__PURE__ */ jsxs("div", { className: "border-b border-border px-6 py-5", children: [
90
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
91
+ /* @__PURE__ */ jsx(Avatar, { className: "h-12 w-12 shrink-0", children: /* @__PURE__ */ jsx(AvatarFallback, { className: "text-base", children: appointment.clientAvatarInitials }) }),
92
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
93
+ /* @__PURE__ */ jsx("p", { className: "text-lg font-semibold leading-tight", children: appointment.clientName }),
94
+ /* @__PURE__ */ jsxs(Badge, { variant, className: "w-fit", children: [
95
+ icon,
96
+ label
97
+ ] })
98
+ ] })
99
+ ] }),
100
+ /* @__PURE__ */ jsx("div", { className: "mt-4 flex gap-2", children: isCancelled ? /* @__PURE__ */ jsx(
101
+ Button,
102
+ {
103
+ size: "sm",
104
+ className: "w-full",
105
+ onClick: () => onBookNew == null ? void 0 : onBookNew(appointment.clientId),
106
+ children: "Book a New Appointment"
107
+ }
108
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
109
+ /* @__PURE__ */ jsxs(
110
+ Button,
111
+ {
112
+ size: "sm",
113
+ disabled: isConfirmed,
114
+ onClick: () => setConfirmAction("accept"),
115
+ className: "flex-1 gap-1.5",
116
+ children: [
117
+ /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5" }),
118
+ "Accept"
119
+ ]
120
+ }
121
+ ),
122
+ /* @__PURE__ */ jsxs(
123
+ Button,
124
+ {
125
+ size: "sm",
126
+ variant: "ghost",
127
+ onClick: () => setConfirmAction("decline"),
128
+ className: "flex-1 gap-1.5 text-destructive hover:text-destructive",
129
+ children: [
130
+ /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" }),
131
+ "Decline"
132
+ ]
133
+ }
134
+ ),
135
+ /* @__PURE__ */ jsxs(
136
+ Button,
137
+ {
138
+ size: "sm",
139
+ variant: "outline",
140
+ onClick: () => setRescheduleOpen(true),
141
+ className: "flex-1 gap-1.5",
142
+ children: [
143
+ /* @__PURE__ */ jsx(RefreshCw, { className: "h-3.5 w-3.5" }),
144
+ "Reschedule"
145
+ ]
146
+ }
147
+ )
148
+ ] }) })
149
+ ] }),
150
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 px-6 py-5", children: [
151
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-sm", children: [
152
+ /* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
153
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: appointment.date })
154
+ ] }),
155
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-sm", children: [
156
+ /* @__PURE__ */ jsx(Clock, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
157
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
158
+ appointment.timeStart,
159
+ " \u2013 ",
160
+ appointment.timeEnd
161
+ ] })
162
+ ] }),
163
+ appointment.meetingFormat && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 text-sm", children: [
164
+ appointment.meetingFormat === "call" && /* @__PURE__ */ jsx(Phone, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
165
+ appointment.meetingFormat === "google-meet" && /* @__PURE__ */ jsx(Video, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
166
+ appointment.meetingFormat === "offline" && /* @__PURE__ */ jsx(MapPin, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" }),
167
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
168
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
169
+ appointment.meetingFormat === "call" && "Phone Call",
170
+ appointment.meetingFormat === "google-meet" && "Google Meet",
171
+ appointment.meetingFormat === "offline" && "In Person"
172
+ ] }),
173
+ appointment.meetingFormat === "offline" && appointment.meetingLocation && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: appointment.meetingLocation })
174
+ ] })
175
+ ] })
176
+ ] }),
177
+ clientProfile && (clientProfile.phone !== void 0 || clientProfile.email !== void 0 || clientProfile.accountType !== void 0 || clientProfile.loanApplicationStatus !== void 0) && /* @__PURE__ */ jsxs(Fragment, { children: [
178
+ /* @__PURE__ */ jsx(Separator, {}),
179
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 px-6 py-5", children: [
180
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: "Client Profile" }),
181
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
182
+ clientProfile.phone && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-sm", children: [
183
+ /* @__PURE__ */ jsx(Phone, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
184
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: clientProfile.phone })
185
+ ] }),
186
+ clientProfile.email && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-sm", children: [
187
+ /* @__PURE__ */ jsx(Mail, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
188
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: clientProfile.email })
189
+ ] }),
190
+ clientProfile.accountType !== void 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm", children: [
191
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Account type" }),
192
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
193
+ clientProfile.accountType === "Joint" ? /* @__PURE__ */ jsx(Users, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ jsx(CircleUser, { className: "h-3.5 w-3.5 text-muted-foreground" }),
194
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: clientProfile.accountType })
195
+ ] })
196
+ ] }),
197
+ clientProfile.loanApplicationStatus !== void 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm", children: [
198
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Loan application" }),
199
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
200
+ /* @__PURE__ */ jsx(FileText, { className: "h-3.5 w-3.5 text-muted-foreground" }),
201
+ clientProfile.loanApplicationStatus === "finished" && /* @__PURE__ */ jsx(Badge, { variant: "success", className: "text-[10px]", children: "Finished" }),
202
+ clientProfile.loanApplicationStatus === "in-progress" && /* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "In Progress" }),
203
+ clientProfile.loanApplicationStatus === "sent-request" && /* @__PURE__ */ jsx(Badge, { variant: "info", className: "text-[10px]", children: "Sent Request" }),
204
+ clientProfile.loanApplicationStatus === "not-start" && /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-[10px]", children: "Not Started" })
205
+ ] })
206
+ ] })
207
+ ] })
208
+ ] })
209
+ ] }),
210
+ appointment.notes && /* @__PURE__ */ jsxs(Fragment, { children: [
211
+ /* @__PURE__ */ jsx(Separator, {}),
212
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-6 py-5", children: [
213
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
214
+ /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 text-muted-foreground" }),
215
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: "Notes" })
216
+ ] }),
217
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: appointment.notes })
218
+ ] })
219
+ ] }),
220
+ appointment.cancelReason && /* @__PURE__ */ jsxs(Fragment, { children: [
221
+ /* @__PURE__ */ jsx(Separator, {}),
222
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-6 py-5", children: [
223
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
224
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 text-destructive" }),
225
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: "Cancellation Reason" })
226
+ ] }),
227
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: appointment.cancelReason })
228
+ ] })
229
+ ] })
230
+ ]
231
+ }
232
+ ) }),
233
+ /* @__PURE__ */ jsx(
234
+ AppointmentConfirmDialog,
235
+ {
236
+ open: confirmAction !== null,
237
+ onOpenChange: (v) => !v && setConfirmAction(null),
238
+ action: confirmAction != null ? confirmAction : "accept",
239
+ clientName: appointment.clientName,
240
+ onConfirm: () => {
241
+ if (confirmAction === "accept") {
242
+ onAccept == null ? void 0 : onAccept(appointment.id);
243
+ } else {
244
+ onDecline == null ? void 0 : onDecline(appointment.id);
245
+ }
246
+ setConfirmAction(null);
247
+ onOpenChange(false);
248
+ }
249
+ }
250
+ ),
251
+ /* @__PURE__ */ jsx(
252
+ AppointmentRescheduleDialog,
253
+ {
254
+ open: rescheduleOpen,
255
+ onOpenChange: setRescheduleOpen,
256
+ amSlots,
257
+ pmSlots,
258
+ currentDate: appointment.date,
259
+ currentTimeStart: appointment.timeStart,
260
+ currentTimeEnd: appointment.timeEnd,
261
+ onReschedule: (date, slot, note) => {
262
+ onReschedule == null ? void 0 : onReschedule(appointment.id, date, slot, note);
263
+ setRescheduleOpen(false);
264
+ }
265
+ }
266
+ )
267
+ ] });
268
+ }
269
+
270
+ export {
271
+ AppointmentDetailSheet
272
+ };
@@ -1,6 +1,9 @@
1
+ import {
2
+ formatCurrencyAbbrev
3
+ } from "./chunk-MN5NYQCL.mjs";
1
4
  import {
2
5
  Button
3
- } from "./chunk-2I5S2AMY.mjs";
6
+ } from "./chunk-XREGSKX3.mjs";
4
7
 
5
8
  // src/components/ui/chart-shared.tsx
6
9
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -35,15 +38,6 @@ var SEVERITY_COLORS = {
35
38
  low: "#4CAF50"
36
39
  // default --success oklch(0.673 0.162 144.2)
37
40
  };
38
- function formatAbbrev(value) {
39
- const abs = Math.abs(value);
40
- const sign = value < 0 ? "-" : "";
41
- if (abs >= 1e9)
42
- return `${sign}$${(abs / 1e9).toFixed(1)}B`;
43
- if (abs >= 1e6) return `${sign}$${(abs / 1e6).toFixed(1)}M`;
44
- if (abs >= 1e3) return `${sign}$${(abs / 1e3).toFixed(0)}K`;
45
- return `${sign}$${abs.toFixed(0)}`;
46
- }
47
41
  function formatTooltipDate(iso, granularity) {
48
42
  const d = new Date(iso);
49
43
  return d.toLocaleDateString(
@@ -126,7 +120,7 @@ function DoughnutLegendRow({
126
120
  /* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground leading-none truncate", children: label })
127
121
  ] }),
128
122
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
129
- /* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium leading-none", children: formatAbbrev(value) }),
123
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium leading-none", children: formatCurrencyAbbrev(value) }),
130
124
  /* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground leading-none w-10 text-right", children: percent })
131
125
  ] })
132
126
  ] });
@@ -163,7 +157,6 @@ export {
163
157
  FALLBACK_TICK,
164
158
  FALLBACK_NEUTRAL,
165
159
  SEVERITY_COLORS,
166
- formatAbbrev,
167
160
  formatTooltipDate,
168
161
  formatMonthLabel,
169
162
  formatCount,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Badge
3
- } from "./chunk-WAZD7NFU.mjs";
3
+ } from "./chunk-BKNFWEH2.mjs";
4
4
  import {
5
5
  Checkbox
6
6
  } from "./chunk-RGVKLTLH.mjs";