@exxatdesignux/ui 0.2.17 → 0.2.19
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/CHANGELOG.md +30 -0
- package/consumer-extras/AGENTS.md +76 -0
- package/consumer-extras/README.md +5 -1
- package/consumer-extras/cursor-skills/exxat-centralized-list-dataset/SKILL.md +14 -3
- package/consumer-extras/cursor-skills/exxat-consumer-app/SKILL.md +37 -0
- package/consumer-extras/cursor-skills/exxat-ds-skill/SKILL.md +22 -7
- package/consumer-extras/cursor-skills/exxat-focused-workflow-page/SKILL.md +57 -0
- package/consumer-extras/cursor-skills/exxat-kpi-flat-band/SKILL.md +38 -0
- package/consumer-extras/cursor-skills/exxat-primary-nav-secondary-panel/SKILL.md +10 -3
- package/consumer-extras/patterns/consumer-app-pattern.md +39 -0
- package/consumer-extras/patterns/consumer-upgrade-checklist.md +20 -0
- package/consumer-extras/patterns/data-views-pattern.md +42 -3
- package/consumer-extras/patterns/focused-workflow-page-pattern.md +84 -0
- package/consumer-extras/patterns/kpi-flat-band-pattern.md +57 -0
- package/consumer-extras/patterns/shell-surface-elevation-pattern.md +54 -0
- package/package.json +2 -1
- package/src/components/ui/button-group.tsx +81 -0
- package/src/components/ui/button.tsx +4 -4
- package/src/components/ui/sidebar.tsx +2 -2
- package/src/globals.css +7 -1807
- package/src/theme.css +10 -1126
- package/src/tokens/README.md +15 -0
- package/src/tokens/base.css +337 -0
- package/src/tokens/high-contrast.css +1195 -0
- package/src/tokens/layers.css +224 -0
- package/src/tokens/tailwind-bridge.css +118 -0
- package/src/tokens/themes.css +201 -0
- package/template/.cursor/rules/exxat-kbd-shortcuts.mdc +1 -1
- package/template/AGENTS.md +66 -21
- package/template/app/(app)/dashboard/loading.tsx +3 -15
- package/template/app/(app)/dashboard/page.tsx +2 -14
- package/template/app/(app)/data-list/layout.tsx +43 -0
- package/template/app/(app)/data-list/page.tsx +2 -2
- package/template/app/(app)/error.tsx +22 -6
- package/template/app/(app)/examples/focused-workflow/page.tsx +5 -0
- package/template/app/(app)/examples/page.tsx +1 -0
- package/template/app/(app)/layout.tsx +13 -6
- package/template/app/(app)/loading.tsx +1 -18
- package/template/app/(app)/question-bank/find/page.tsx +2 -1
- package/template/app/(app)/question-bank/library/page.tsx +2 -1
- package/template/app/(app)/question-bank/list/page.tsx +2 -1
- package/template/app/(app)/question-bank/new/page.tsx +15 -23
- package/template/app/(app)/question-bank/page.tsx +2 -1
- package/template/app/(app)/settings/page.tsx +4 -5
- package/template/app/global-error.tsx +63 -0
- package/template/app/globals.css +7 -1934
- package/template/app/layout.tsx +2 -0
- package/template/components/app-route-loading.tsx +14 -0
- package/template/components/app-sidebar.tsx +71 -55
- package/template/components/data-table/index.tsx +31 -67
- package/template/components/data-table/use-table-state.ts +33 -6
- package/template/components/data-views/index.ts +37 -9
- package/template/components/data-views/list-page-calendar-view.tsx +593 -0
- package/template/components/data-views/list-page-connected-view-body.tsx +66 -0
- package/template/components/data-views/list-page-folder-columns-panel.tsx +345 -0
- package/template/components/data-views/list-page-split-hub-chrome.tsx +8 -0
- package/template/components/dev-chunk-load-recovery.tsx +41 -0
- package/template/components/examples/focused-workflow-showcase.tsx +183 -0
- package/template/components/exxat-product-logo.tsx +2 -6
- package/template/components/key-metrics.tsx +54 -22
- package/template/components/list-hub-board-view.tsx +68 -0
- package/template/components/list-hub-client.tsx +186 -0
- package/template/components/list-hub-list-view.tsx +36 -0
- package/template/components/list-hub-panel-activator.tsx +8 -0
- package/template/components/list-hub-secondary-nav.tsx +121 -0
- package/template/components/list-hub-table.tsx +336 -0
- package/template/components/new-question-composer.tsx +6 -24
- package/template/components/product-switcher.tsx +5 -5
- package/template/components/product-wordmark.tsx +4 -7
- package/template/components/question-bank-client.tsx +4 -1
- package/template/components/question-bank-folder-columns-panel.tsx +104 -0
- package/template/components/question-bank-hub-client.tsx +2 -5
- package/template/components/question-bank-table.tsx +155 -509
- package/template/components/secondary-panel/nav-link-rows.tsx +83 -0
- package/template/components/secondary-panel.tsx +4 -44
- package/template/components/secondary-panels/list-hub-panel.tsx +39 -0
- package/template/components/secondary-panels/question-bank-panel.tsx +39 -0
- package/template/components/secondary-panels/registry.tsx +15 -0
- package/template/components/settings-appearance-card.tsx +3 -2
- package/template/components/settings-client.tsx +59 -15
- package/template/components/settings-form-row.tsx +9 -4
- package/template/components/sidebar-shell.tsx +2 -1
- package/template/components/table-properties/drawer-button.tsx +51 -20
- package/template/components/table-properties/drawer.tsx +81 -17
- package/template/components/templates/focused-workflow-layouts.tsx +448 -0
- package/template/components/templates/focused-workflow-page-template.tsx +69 -0
- package/template/components/templates/list-page.tsx +40 -13
- package/template/components/templates/nested-secondary-panel-shell.tsx +3 -2
- package/template/components/templates/page-loading-shell.tsx +262 -0
- package/template/components/ui/button-group.tsx +1 -0
- package/template/contexts/product-context.tsx +21 -2
- package/template/docs/consumer-app-pattern.md +39 -0
- package/template/docs/data-views-pattern.md +42 -3
- package/template/docs/drawer-vs-dialog-pattern.md +3 -1
- package/template/docs/focused-workflow-page-pattern.md +84 -0
- package/template/docs/kpi-flat-band-pattern.md +57 -0
- package/template/docs/kpi-strip-max-four-pattern.md +1 -0
- package/template/docs/shell-surface-elevation-pattern.md +54 -0
- package/template/lib/chunk-load-error.ts +13 -0
- package/template/lib/command-menu-search-data.ts +11 -27
- package/template/lib/conditional-rule-match.ts +87 -22
- package/template/lib/data-list-display-options.ts +16 -2
- package/template/lib/data-list-view-registry.ts +104 -0
- package/template/lib/data-list-view-surface.ts +15 -1
- package/template/lib/data-list-view.ts +16 -1
- package/template/lib/data-view-dashboard-storage.ts +38 -35
- package/template/lib/hub-connected-view-renderers.ts +58 -0
- package/template/lib/list-hub-nav.ts +121 -0
- package/template/lib/list-hub-supported-views.ts +10 -0
- package/template/lib/list-page-table-properties.ts +3 -7
- package/template/lib/list-status-badges.ts +4 -97
- package/template/lib/mock/list-hub-directory.ts +27 -0
- package/template/lib/mock/list-hub-kpi.ts +27 -0
- package/template/lib/mock/navigation.tsx +1 -0
- package/template/lib/page-loading-variant.ts +40 -0
- package/template/lib/question-bank-supported-views.ts +13 -0
- package/template/lib/sidebar-state-cookie.ts +9 -0
- package/template/lib/table-state-lifecycle.ts +60 -13
- package/template/app/(app)/data-list/[id]/page.tsx +0 -44
- package/template/app/(app)/data-list/new/page.tsx +0 -34
- package/template/components/compliance-board-view.tsx +0 -142
- package/template/components/compliance-client.tsx +0 -92
- package/template/components/compliance-list-view.tsx +0 -54
- package/template/components/compliance-page-header.tsx +0 -89
- package/template/components/compliance-table.tsx +0 -632
- package/template/components/data-view-dashboard-charts-compliance.tsx +0 -963
- package/template/components/data-view-dashboard-charts-team.tsx +0 -971
- package/template/components/data-view-dashboard-charts.tsx +0 -1503
- package/template/components/new-placement-back-btn.tsx +0 -28
- package/template/components/new-placement-form.tsx +0 -1068
- package/template/components/placement-board-card.tsx +0 -262
- package/template/components/placement-detail.tsx +0 -438
- package/template/components/placements-board-view.tsx +0 -404
- package/template/components/placements-client.tsx +0 -252
- package/template/components/placements-list-view.tsx +0 -171
- package/template/components/placements-page-header.tsx +0 -166
- package/template/components/placements-table-cells.test.tsx +0 -22
- package/template/components/placements-table-cells.tsx +0 -173
- package/template/components/placements-table-columns.tsx +0 -640
- package/template/components/placements-table.tsx +0 -1675
- package/template/components/rotations-empty-state.tsx +0 -50
- package/template/components/rotations-panel-activator.tsx +0 -8
- package/template/components/sites-all-client.tsx +0 -154
- package/template/components/sites-board-view.tsx +0 -67
- package/template/components/sites-list-view.tsx +0 -42
- package/template/components/sites-table.tsx +0 -402
- package/template/components/team-board-view.tsx +0 -122
- package/template/components/team-client.tsx +0 -100
- package/template/components/team-list-view.tsx +0 -59
- package/template/components/team-page-header.tsx +0 -92
- package/template/components/team-table.tsx +0 -714
- package/template/lib/data-view-dashboard-placements-layout.ts +0 -215
- package/template/lib/mock/compliance-kpi.ts +0 -61
- package/template/lib/mock/compliance.ts +0 -146
- package/template/lib/mock/placements-kpi.ts +0 -134
- package/template/lib/mock/placements.ts +0 -183
- package/template/lib/mock/sites-directory.ts +0 -16
- package/template/lib/mock/sites-kpi.ts +0 -25
- package/template/lib/mock/team-kpi.ts +0 -60
- package/template/lib/mock/team.ts +0 -118
- package/template/lib/placement-board-card-layout.ts +0 -79
- package/template/lib/placement-lifecycle.ts +0 -5
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { useState } from "react"
|
|
5
|
-
import { Badge } from "@/components/ui/badge"
|
|
6
|
-
import { Button } from "@/components/ui/button"
|
|
7
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
8
|
-
import { Tip } from "@/components/ui/tip"
|
|
9
|
-
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
|
|
10
|
-
import { Separator } from "@/components/ui/separator"
|
|
11
|
-
import {
|
|
12
|
-
DropdownMenu,
|
|
13
|
-
DropdownMenuContent,
|
|
14
|
-
DropdownMenuItem,
|
|
15
|
-
DropdownMenuSeparator,
|
|
16
|
-
DropdownMenuTrigger,
|
|
17
|
-
} from "@/components/ui/dropdown-menu"
|
|
18
|
-
import { cn } from "@/lib/utils"
|
|
19
|
-
import type { Placement } from "@/lib/mock/placements"
|
|
20
|
-
import { StatusBadge as PlacementStatusBadge } from "@/components/placements-table-cells"
|
|
21
|
-
import { placementReadinessBadgeClass } from "@/lib/list-status-badges"
|
|
22
|
-
|
|
23
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
24
|
-
// Info row — <dl> pattern for structured data
|
|
25
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
26
|
-
|
|
27
|
-
function InfoRow({
|
|
28
|
-
label,
|
|
29
|
-
value,
|
|
30
|
-
icon,
|
|
31
|
-
}: {
|
|
32
|
-
label: string
|
|
33
|
-
value: React.ReactNode
|
|
34
|
-
icon?: string
|
|
35
|
-
}) {
|
|
36
|
-
return (
|
|
37
|
-
<div className="flex items-start gap-3 py-2.5">
|
|
38
|
-
{icon && (
|
|
39
|
-
<i
|
|
40
|
-
className={cn(
|
|
41
|
-
"fa-light",
|
|
42
|
-
icon,
|
|
43
|
-
"text-muted-foreground text-[13px] mt-0.5 w-4 shrink-0"
|
|
44
|
-
)}
|
|
45
|
-
aria-hidden="true"
|
|
46
|
-
/>
|
|
47
|
-
)}
|
|
48
|
-
<dt className="text-sm text-muted-foreground w-32 shrink-0">{label}</dt>
|
|
49
|
-
<dd className="text-sm text-foreground">{value}</dd>
|
|
50
|
-
</div>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
55
|
-
// Tabs config
|
|
56
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
57
|
-
|
|
58
|
-
type TabId = "overview" | "schedule" | "compliance" | "activity"
|
|
59
|
-
|
|
60
|
-
const TABS: { id: TabId; label: string; icon: string }[] = [
|
|
61
|
-
{ id: "overview", label: "Overview", icon: "fa-circle-info" },
|
|
62
|
-
{ id: "schedule", label: "Schedule", icon: "fa-calendar-days" },
|
|
63
|
-
{ id: "compliance", label: "Compliance", icon: "fa-shield-check" },
|
|
64
|
-
{ id: "activity", label: "Activity", icon: "fa-clock-rotate-left" },
|
|
65
|
-
]
|
|
66
|
-
|
|
67
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
68
|
-
// Overview tab
|
|
69
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
70
|
-
|
|
71
|
-
function OverviewTab({ placement }: { placement: Placement }) {
|
|
72
|
-
return (
|
|
73
|
-
<div className="grid gap-6 md:grid-cols-2" role="tabpanel" aria-label="Overview">
|
|
74
|
-
<Card>
|
|
75
|
-
<CardHeader>
|
|
76
|
-
<CardTitle className="text-base">Placement Info</CardTitle>
|
|
77
|
-
</CardHeader>
|
|
78
|
-
<CardContent>
|
|
79
|
-
<dl>
|
|
80
|
-
<InfoRow icon="fa-hospital" label="Site" value={placement.site} />
|
|
81
|
-
<InfoRow icon="fa-location-dot" label="Address" value={placement.siteAddress} />
|
|
82
|
-
<Separator />
|
|
83
|
-
<InfoRow icon="fa-briefcase" label="Internship" value={placement.internship} />
|
|
84
|
-
<InfoRow icon="fa-stethoscope" label="Specialization" value={placement.specialization} />
|
|
85
|
-
<InfoRow icon="fa-user-doctor" label="Supervisor" value={placement.supervisor} />
|
|
86
|
-
<InfoRow icon="fa-user-nurse" label="Preceptor" value={placement.supervisor} />
|
|
87
|
-
<Separator />
|
|
88
|
-
<InfoRow icon="fa-rotate" label="Rotation type" value="Clinical" />
|
|
89
|
-
<InfoRow icon="fa-graduation-cap" label="Credit hours" value="3" />
|
|
90
|
-
</dl>
|
|
91
|
-
</CardContent>
|
|
92
|
-
</Card>
|
|
93
|
-
|
|
94
|
-
<Card>
|
|
95
|
-
<CardHeader>
|
|
96
|
-
<CardTitle className="text-base">Supervisor & Notes</CardTitle>
|
|
97
|
-
</CardHeader>
|
|
98
|
-
<CardContent>
|
|
99
|
-
<dl>
|
|
100
|
-
<InfoRow
|
|
101
|
-
icon="fa-user"
|
|
102
|
-
label="Supervisor"
|
|
103
|
-
value={placement.supervisor}
|
|
104
|
-
/>
|
|
105
|
-
<InfoRow
|
|
106
|
-
icon="fa-envelope"
|
|
107
|
-
label="Email"
|
|
108
|
-
value={`${placement.supervisor.toLowerCase().replace(/\s|dr\.\s?/gi, ".")}@clinic.org`}
|
|
109
|
-
/>
|
|
110
|
-
<InfoRow icon="fa-phone" label="Phone" value="(312) 555-0147" />
|
|
111
|
-
<Separator />
|
|
112
|
-
<InfoRow
|
|
113
|
-
icon="fa-bullseye"
|
|
114
|
-
label="Learning objectives"
|
|
115
|
-
value="Develop clinical assessment skills and patient communication techniques in a supervised healthcare environment."
|
|
116
|
-
/>
|
|
117
|
-
<InfoRow
|
|
118
|
-
icon="fa-triangle-exclamation"
|
|
119
|
-
label="Special requirements"
|
|
120
|
-
value="Must complete CPR certification before start date. Scrubs required on-site."
|
|
121
|
-
/>
|
|
122
|
-
<InfoRow
|
|
123
|
-
icon="fa-note-sticky"
|
|
124
|
-
label="Notes"
|
|
125
|
-
value="Student has expressed interest in extending the placement if performance is satisfactory."
|
|
126
|
-
/>
|
|
127
|
-
</dl>
|
|
128
|
-
</CardContent>
|
|
129
|
-
</Card>
|
|
130
|
-
</div>
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
135
|
-
// Schedule tab
|
|
136
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
137
|
-
|
|
138
|
-
function ScheduleTab({ placement }: { placement: Placement }) {
|
|
139
|
-
const progressPct =
|
|
140
|
-
placement.progressWeeksTotal > 0
|
|
141
|
-
? Math.round(
|
|
142
|
-
(placement.progressWeeksDone / placement.progressWeeksTotal) * 100
|
|
143
|
-
)
|
|
144
|
-
: 0
|
|
145
|
-
|
|
146
|
-
return (
|
|
147
|
-
<div role="tabpanel" aria-label="Schedule">
|
|
148
|
-
<Card>
|
|
149
|
-
<CardHeader>
|
|
150
|
-
<CardTitle className="text-base">Schedule</CardTitle>
|
|
151
|
-
</CardHeader>
|
|
152
|
-
<CardContent>
|
|
153
|
-
<dl className="grid gap-x-8 md:grid-cols-2">
|
|
154
|
-
<InfoRow icon="fa-calendar-days" label="Start date" value={placement.start} />
|
|
155
|
-
<InfoRow icon="fa-calendar-check" label="End date" value={placement.endDate} />
|
|
156
|
-
<InfoRow icon="fa-clock" label="Duration" value={placement.duration} />
|
|
157
|
-
<InfoRow icon="fa-hourglass-half" label="Hours/week" value="20" />
|
|
158
|
-
<InfoRow icon="fa-sun" label="Shift" value="Day" />
|
|
159
|
-
<InfoRow icon="fa-sigma" label="Total hours" value="240" />
|
|
160
|
-
<InfoRow icon="fa-building" label="Work arrangement" value="On-site" />
|
|
161
|
-
<InfoRow icon="fa-calendar-week" label="Weekends" value="No" />
|
|
162
|
-
</dl>
|
|
163
|
-
|
|
164
|
-
{placement.placementPhase === "ongoing" && (
|
|
165
|
-
<>
|
|
166
|
-
<Separator className="my-4" />
|
|
167
|
-
<div className="space-y-2">
|
|
168
|
-
<div className="flex items-center justify-between text-sm">
|
|
169
|
-
<span className="text-muted-foreground">Progress</span>
|
|
170
|
-
<span className="font-medium">
|
|
171
|
-
{placement.progressWeeksDone} / {placement.progressWeeksTotal} weeks ({progressPct}%)
|
|
172
|
-
</span>
|
|
173
|
-
</div>
|
|
174
|
-
<div
|
|
175
|
-
className="h-2 w-full rounded-full bg-muted overflow-hidden"
|
|
176
|
-
role="progressbar"
|
|
177
|
-
aria-valuenow={progressPct}
|
|
178
|
-
aria-valuemin={0}
|
|
179
|
-
aria-valuemax={100}
|
|
180
|
-
aria-label={`Placement progress: ${progressPct}%`}
|
|
181
|
-
>
|
|
182
|
-
<div
|
|
183
|
-
className="h-full rounded-full bg-primary transition-all"
|
|
184
|
-
style={{ width: `${progressPct}%` }}
|
|
185
|
-
/>
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
</>
|
|
189
|
-
)}
|
|
190
|
-
</CardContent>
|
|
191
|
-
</Card>
|
|
192
|
-
</div>
|
|
193
|
-
)
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
197
|
-
// Compliance tab
|
|
198
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
199
|
-
|
|
200
|
-
const COMPLIANCE_ITEMS = [
|
|
201
|
-
{ label: "Background check", passed: true },
|
|
202
|
-
{ label: "Immunizations", passed: true },
|
|
203
|
-
{ label: "HIPAA training", passed: true },
|
|
204
|
-
]
|
|
205
|
-
|
|
206
|
-
function ComplianceTab({ placement }: { placement: Placement }) {
|
|
207
|
-
return (
|
|
208
|
-
<div role="tabpanel" aria-label="Compliance">
|
|
209
|
-
<Card>
|
|
210
|
-
<CardHeader>
|
|
211
|
-
<CardTitle className="text-base">Compliance Checklist</CardTitle>
|
|
212
|
-
</CardHeader>
|
|
213
|
-
<CardContent className="space-y-4">
|
|
214
|
-
<ul className="space-y-3" aria-label="Compliance items">
|
|
215
|
-
{COMPLIANCE_ITEMS.map((item) => (
|
|
216
|
-
<li key={item.label} className="flex items-center gap-3 text-sm">
|
|
217
|
-
{item.passed ? (
|
|
218
|
-
<i
|
|
219
|
-
className="fa-solid fa-circle-check text-emerald-600 text-base"
|
|
220
|
-
aria-hidden="true"
|
|
221
|
-
/>
|
|
222
|
-
) : (
|
|
223
|
-
<i
|
|
224
|
-
className="fa-solid fa-circle-xmark text-red-500 text-base"
|
|
225
|
-
aria-hidden="true"
|
|
226
|
-
/>
|
|
227
|
-
)}
|
|
228
|
-
<span>{item.label}</span>
|
|
229
|
-
<span className="sr-only">
|
|
230
|
-
{item.passed ? "completed" : "incomplete"}
|
|
231
|
-
</span>
|
|
232
|
-
</li>
|
|
233
|
-
))}
|
|
234
|
-
</ul>
|
|
235
|
-
|
|
236
|
-
<Separator />
|
|
237
|
-
|
|
238
|
-
<dl>
|
|
239
|
-
<InfoRow
|
|
240
|
-
icon="fa-shield-check"
|
|
241
|
-
label="Readiness"
|
|
242
|
-
value={
|
|
243
|
-
<Badge
|
|
244
|
-
variant="outline"
|
|
245
|
-
className={cn(
|
|
246
|
-
"text-xs",
|
|
247
|
-
placementReadinessBadgeClass(placement.readiness),
|
|
248
|
-
)}
|
|
249
|
-
>
|
|
250
|
-
{placement.readiness}
|
|
251
|
-
</Badge>
|
|
252
|
-
}
|
|
253
|
-
/>
|
|
254
|
-
|
|
255
|
-
{placement.placementPhase === "upcoming" &&
|
|
256
|
-
placement.daysUntilStart > 0 && (
|
|
257
|
-
<InfoRow
|
|
258
|
-
icon="fa-calendar-days"
|
|
259
|
-
label="Days until start"
|
|
260
|
-
value={`${placement.daysUntilStart} days`}
|
|
261
|
-
/>
|
|
262
|
-
)}
|
|
263
|
-
|
|
264
|
-
<InfoRow
|
|
265
|
-
icon="fa-clipboard-check"
|
|
266
|
-
label="Compliance status"
|
|
267
|
-
value={placement.compliance}
|
|
268
|
-
/>
|
|
269
|
-
</dl>
|
|
270
|
-
</CardContent>
|
|
271
|
-
</Card>
|
|
272
|
-
</div>
|
|
273
|
-
)
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
277
|
-
// Activity tab
|
|
278
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
279
|
-
|
|
280
|
-
const MOCK_ACTIVITY = [
|
|
281
|
-
{
|
|
282
|
-
date: "03/23/2026",
|
|
283
|
-
description: "Supervisor evaluation submitted",
|
|
284
|
-
icon: "fa-file-check",
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
date: "03/22/2026",
|
|
288
|
-
description: "Weekly check-in completed",
|
|
289
|
-
icon: "fa-comments",
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
date: "03/18/2026",
|
|
293
|
-
description: "Hours log approved (20 hrs)",
|
|
294
|
-
icon: "fa-clock",
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
date: "03/15/2026",
|
|
298
|
-
description: "Placement started",
|
|
299
|
-
icon: "fa-play",
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
date: "03/10/2026",
|
|
303
|
-
description: "Compliance documents verified",
|
|
304
|
-
icon: "fa-shield-check",
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
date: "03/05/2026",
|
|
308
|
-
description: "Placement confirmed by coordinator",
|
|
309
|
-
icon: "fa-circle-check",
|
|
310
|
-
},
|
|
311
|
-
]
|
|
312
|
-
|
|
313
|
-
function ActivityTab() {
|
|
314
|
-
return (
|
|
315
|
-
<div role="tabpanel" aria-label="Activity">
|
|
316
|
-
<Card>
|
|
317
|
-
<CardHeader>
|
|
318
|
-
<CardTitle className="text-base">Activity Timeline</CardTitle>
|
|
319
|
-
</CardHeader>
|
|
320
|
-
<CardContent>
|
|
321
|
-
<ol className="relative border-s border-border ms-3" aria-label="Activity timeline">
|
|
322
|
-
{MOCK_ACTIVITY.map((item, idx) => (
|
|
323
|
-
<li key={idx} className="mb-6 ms-6 last:mb-0">
|
|
324
|
-
<span className="absolute -start-3 flex size-6 items-center justify-center rounded-full bg-muted ring-4 ring-background">
|
|
325
|
-
<i
|
|
326
|
-
className={cn("fa-light", item.icon, "text-xs text-muted-foreground")}
|
|
327
|
-
aria-hidden="true"
|
|
328
|
-
/>
|
|
329
|
-
</span>
|
|
330
|
-
<div className="flex flex-col gap-0.5">
|
|
331
|
-
<time className="text-xs text-muted-foreground">{item.date}</time>
|
|
332
|
-
<p className="text-sm text-foreground">{item.description}</p>
|
|
333
|
-
</div>
|
|
334
|
-
</li>
|
|
335
|
-
))}
|
|
336
|
-
</ol>
|
|
337
|
-
</CardContent>
|
|
338
|
-
</Card>
|
|
339
|
-
</div>
|
|
340
|
-
)
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
344
|
-
// Main component
|
|
345
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
346
|
-
|
|
347
|
-
export function PlacementDetail({ placement }: { placement: Placement }) {
|
|
348
|
-
const [activeTab, setActiveTab] = useState<TabId>("overview")
|
|
349
|
-
|
|
350
|
-
return (
|
|
351
|
-
<div className="space-y-6">
|
|
352
|
-
{/* Header */}
|
|
353
|
-
<div className="flex items-start gap-4">
|
|
354
|
-
<Avatar size="lg" className="size-12 shrink-0">
|
|
355
|
-
<AvatarFallback className="text-sm font-bold bg-primary/10 text-primary">
|
|
356
|
-
{placement.initials}
|
|
357
|
-
</AvatarFallback>
|
|
358
|
-
</Avatar>
|
|
359
|
-
<div className="flex-1 min-w-0">
|
|
360
|
-
<h1
|
|
361
|
-
className="text-xl font-semibold"
|
|
362
|
-
style={{ fontFamily: "var(--font-heading)" }}
|
|
363
|
-
>
|
|
364
|
-
{placement.student}
|
|
365
|
-
</h1>
|
|
366
|
-
<p className="text-sm text-muted-foreground">{placement.email}</p>
|
|
367
|
-
<div className="flex items-center gap-2 mt-2 flex-wrap">
|
|
368
|
-
<Badge variant="secondary">{placement.specialization}</Badge>
|
|
369
|
-
<PlacementStatusBadge status={placement.status} />
|
|
370
|
-
<Badge variant="outline">{placement.placementPhase}</Badge>
|
|
371
|
-
</div>
|
|
372
|
-
</div>
|
|
373
|
-
<div className="flex items-center gap-2 shrink-0">
|
|
374
|
-
<Tip label="Edit placement">
|
|
375
|
-
<Button size="sm" variant="outline">
|
|
376
|
-
<i className="fa-light fa-pen-to-square" aria-hidden="true" />{" "}
|
|
377
|
-
Edit
|
|
378
|
-
</Button>
|
|
379
|
-
</Tip>
|
|
380
|
-
<DropdownMenu>
|
|
381
|
-
<DropdownMenuTrigger asChild>
|
|
382
|
-
<Button size="sm" variant="outline" aria-label="More actions">
|
|
383
|
-
<i className="fa-light fa-ellipsis" aria-hidden="true" />
|
|
384
|
-
</Button>
|
|
385
|
-
</DropdownMenuTrigger>
|
|
386
|
-
<DropdownMenuContent align="end">
|
|
387
|
-
<DropdownMenuItem>
|
|
388
|
-
<i className="fa-light fa-download" aria-hidden="true" /> Export
|
|
389
|
-
</DropdownMenuItem>
|
|
390
|
-
<DropdownMenuItem>
|
|
391
|
-
<i className="fa-light fa-box-archive" aria-hidden="true" />{" "}
|
|
392
|
-
Archive
|
|
393
|
-
</DropdownMenuItem>
|
|
394
|
-
<DropdownMenuSeparator />
|
|
395
|
-
<DropdownMenuItem className="text-destructive">
|
|
396
|
-
<i className="fa-light fa-trash" aria-hidden="true" /> Delete
|
|
397
|
-
</DropdownMenuItem>
|
|
398
|
-
</DropdownMenuContent>
|
|
399
|
-
</DropdownMenu>
|
|
400
|
-
</div>
|
|
401
|
-
</div>
|
|
402
|
-
|
|
403
|
-
{/* Tab bar */}
|
|
404
|
-
<div
|
|
405
|
-
role="tablist"
|
|
406
|
-
aria-label="Placement sections"
|
|
407
|
-
className="inline-flex items-center gap-0.5 rounded-lg bg-muted/60 p-[3px]"
|
|
408
|
-
>
|
|
409
|
-
{TABS.map((tab) => (
|
|
410
|
-
<button
|
|
411
|
-
key={tab.id}
|
|
412
|
-
role="tab"
|
|
413
|
-
aria-selected={activeTab === tab.id}
|
|
414
|
-
onClick={() => setActiveTab(tab.id)}
|
|
415
|
-
className={cn(
|
|
416
|
-
"px-3 py-1.5 text-xs rounded-md transition-all inline-flex items-center gap-1.5",
|
|
417
|
-
activeTab === tab.id
|
|
418
|
-
? "bg-background text-foreground font-medium shadow-sm"
|
|
419
|
-
: "text-muted-foreground hover:text-interactive-hover-foreground"
|
|
420
|
-
)}
|
|
421
|
-
>
|
|
422
|
-
<i
|
|
423
|
-
className={cn("fa-light", tab.icon, "text-xs")}
|
|
424
|
-
aria-hidden="true"
|
|
425
|
-
/>{" "}
|
|
426
|
-
{tab.label}
|
|
427
|
-
</button>
|
|
428
|
-
))}
|
|
429
|
-
</div>
|
|
430
|
-
|
|
431
|
-
{/* Tab content */}
|
|
432
|
-
{activeTab === "overview" && <OverviewTab placement={placement} />}
|
|
433
|
-
{activeTab === "schedule" && <ScheduleTab placement={placement} />}
|
|
434
|
-
{activeTab === "compliance" && <ComplianceTab placement={placement} />}
|
|
435
|
-
{activeTab === "activity" && <ActivityTab />}
|
|
436
|
-
</div>
|
|
437
|
-
)
|
|
438
|
-
}
|