@exxatdesignux/ui 0.0.6 → 0.0.7

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 (264) hide show
  1. package/bin/init.mjs +29 -0
  2. package/package.json +7 -2
  3. package/template/.nvmrc +1 -0
  4. package/template/.prettierignore +7 -0
  5. package/template/.prettierrc +11 -0
  6. package/template/AGENTS.md +485 -0
  7. package/template/Logo/Exxat_Prism.svg +39 -0
  8. package/template/Logo/Exxat_one.svg +36 -0
  9. package/template/README.md +58 -0
  10. package/template/app/(app)/compliance/page.tsx +10 -0
  11. package/template/app/(app)/dashboard/loading.tsx +18 -0
  12. package/template/app/(app)/dashboard/page.tsx +36 -0
  13. package/template/app/(app)/data-list/[id]/page.tsx +28 -0
  14. package/template/app/(app)/data-list/new/page.tsx +31 -0
  15. package/template/app/(app)/data-list/page.tsx +10 -0
  16. package/template/app/(app)/error.tsx +43 -0
  17. package/template/app/(app)/help/page.tsx +34 -0
  18. package/template/app/(app)/layout.tsx +54 -0
  19. package/template/app/(app)/loading.tsx +18 -0
  20. package/template/app/(app)/question-bank/page.tsx +10 -0
  21. package/template/app/(app)/rotations/page.tsx +15 -0
  22. package/template/app/(app)/settings/page.tsx +17 -0
  23. package/template/app/(app)/sites/all/page.tsx +13 -0
  24. package/template/app/(app)/team/page.tsx +10 -0
  25. package/template/app/favicon.ico +0 -0
  26. package/template/app/globals.css +1811 -0
  27. package/template/app/layout.tsx +95 -0
  28. package/template/app/page.tsx +9 -0
  29. package/template/components/.gitkeep +0 -0
  30. package/template/components/app-sidebar-dynamic.tsx +15 -0
  31. package/template/components/app-sidebar.tsx +901 -0
  32. package/template/components/ask-leo-composer.tsx +216 -0
  33. package/template/components/ask-leo-sidebar.tsx +509 -0
  34. package/template/components/chart-area-interactive.tsx +293 -0
  35. package/template/components/charts-overview.tsx +2321 -0
  36. package/template/components/command-menu-01.tsx +133 -0
  37. package/template/components/command-menu-02.tsx +386 -0
  38. package/template/components/command-menu.tsx +182 -0
  39. package/template/components/compliance-board-view.tsx +134 -0
  40. package/template/components/compliance-client.tsx +92 -0
  41. package/template/components/compliance-list-view.tsx +59 -0
  42. package/template/components/compliance-page-header.tsx +89 -0
  43. package/template/components/compliance-table.tsx +525 -0
  44. package/template/components/dashboard-onboarding-gallery.tsx +13 -0
  45. package/template/components/dashboard-onboarding.tsx +21 -0
  46. package/template/components/dashboard-promo-banner.tsx +67 -0
  47. package/template/components/dashboard-quota-progress-card.tsx +369 -0
  48. package/template/components/dashboard-report-charts.tsx +69 -0
  49. package/template/components/dashboard-section-heading.tsx +68 -0
  50. package/template/components/dashboard-tabs.tsx +598 -0
  51. package/template/components/data-list-client.tsx +239 -0
  52. package/template/components/data-list-table-cells.test.tsx +22 -0
  53. package/template/components/data-list-table-cells.tsx +173 -0
  54. package/template/components/data-list-table.tsx +879 -0
  55. package/template/components/data-table/filter-date-calendar.tsx +38 -0
  56. package/template/components/data-table/filter-text-value-input.tsx +77 -0
  57. package/template/components/data-table/index.tsx +1612 -0
  58. package/template/components/data-table/pagination.tsx +256 -0
  59. package/template/components/data-table/types.ts +91 -0
  60. package/template/components/data-table/use-table-state.ts +566 -0
  61. package/template/components/data-view-dashboard-charts-compliance.tsx +960 -0
  62. package/template/components/data-view-dashboard-charts-team.tsx +968 -0
  63. package/template/components/data-view-dashboard-charts.tsx +1668 -0
  64. package/template/components/data-views/board-card-primitives.tsx +93 -0
  65. package/template/components/data-views/index.ts +41 -0
  66. package/template/components/data-views/list-page-board-card.tsx +192 -0
  67. package/template/components/data-views/list-page-board-template.tsx +122 -0
  68. package/template/components/data-views/placement-board-card.tsx +262 -0
  69. package/template/components/export-drawer.tsx +375 -0
  70. package/template/components/exxat-product-logo.tsx +453 -0
  71. package/template/components/form-layout-01.tsx +131 -0
  72. package/template/components/getting-started.tsx +625 -0
  73. package/template/components/key-metrics.tsx +920 -0
  74. package/template/components/leo-insight-indicator.tsx +364 -0
  75. package/template/components/leo-typing-dots.tsx +121 -0
  76. package/template/components/list-hub-status-badge.tsx +51 -0
  77. package/template/components/list-page-dashboard-charts.tsx +18 -0
  78. package/template/components/nav-documents.tsx +89 -0
  79. package/template/components/nav-main.tsx +58 -0
  80. package/template/components/nav-secondary.tsx +64 -0
  81. package/template/components/nav-user.tsx +190 -0
  82. package/template/components/new-placement-back-btn.tsx +28 -0
  83. package/template/components/new-placement-form.tsx +1066 -0
  84. package/template/components/onboarding/index.ts +4 -0
  85. package/template/components/onboarding/onboarding-01.tsx +7 -0
  86. package/template/components/onboarding/onboarding-02.tsx +7 -0
  87. package/template/components/onboarding/onboarding-03.tsx +7 -0
  88. package/template/components/onboarding/onboarding-04.tsx +7 -0
  89. package/template/components/page-header.tsx +57 -0
  90. package/template/components/placement-detail.tsx +438 -0
  91. package/template/components/placements-board-view.tsx +404 -0
  92. package/template/components/placements-list-view.tsx +285 -0
  93. package/template/components/placements-page-header.tsx +160 -0
  94. package/template/components/placements-table-columns.tsx +639 -0
  95. package/template/components/product-switcher.tsx +116 -0
  96. package/template/components/question-bank-board-view.tsx +205 -0
  97. package/template/components/question-bank-client.tsx +77 -0
  98. package/template/components/question-bank-list-view.tsx +59 -0
  99. package/template/components/question-bank-page-header.tsx +89 -0
  100. package/template/components/question-bank-table.tsx +586 -0
  101. package/template/components/rotations-empty-state.tsx +47 -0
  102. package/template/components/rotations-panel-activator.tsx +8 -0
  103. package/template/components/secondary-nav.tsx +394 -0
  104. package/template/components/secondary-panel.tsx +239 -0
  105. package/template/components/section-cards.tsx +106 -0
  106. package/template/components/settings-appearance-card.tsx +424 -0
  107. package/template/components/settings-client.tsx +537 -0
  108. package/template/components/settings-form-row.tsx +42 -0
  109. package/template/components/sidebar-auto-collapse.tsx +23 -0
  110. package/template/components/sidebar-auto-open.tsx +18 -0
  111. package/template/components/sidebar-shell.tsx +37 -0
  112. package/template/components/site-header.tsx +93 -0
  113. package/template/components/sites-all-client.tsx +154 -0
  114. package/template/components/sites-board-view.tsx +67 -0
  115. package/template/components/sites-list-view.tsx +47 -0
  116. package/template/components/sites-table.tsx +312 -0
  117. package/template/components/system-banner-slot.tsx +66 -0
  118. package/template/components/table-properties/column-row.tsx +90 -0
  119. package/template/components/table-properties/draggable-list.ts +49 -0
  120. package/template/components/table-properties/drawer-button.tsx +231 -0
  121. package/template/components/table-properties/drawer.tsx +1102 -0
  122. package/template/components/table-properties/filter-card.tsx +251 -0
  123. package/template/components/table-properties/index.ts +22 -0
  124. package/template/components/table-properties/sort-card.tsx +59 -0
  125. package/template/components/table-properties/types.ts +124 -0
  126. package/template/components/task-list-panel.tsx +98 -0
  127. package/template/components/task-priority-badge.tsx +28 -0
  128. package/template/components/team-board-view.tsx +114 -0
  129. package/template/components/team-client.tsx +93 -0
  130. package/template/components/team-list-view.tsx +62 -0
  131. package/template/components/team-page-header.tsx +92 -0
  132. package/template/components/team-table.tsx +525 -0
  133. package/template/components/templates/list-page.tsx +576 -0
  134. package/template/components/templates/primary-page-template.tsx +56 -0
  135. package/template/components/theme-color-sync.tsx +32 -0
  136. package/template/components/theme-provider.tsx +71 -0
  137. package/template/components/tinted-icon-disc.tsx +53 -0
  138. package/template/components/ui/ai-thinking-surface.tsx +121 -0
  139. package/template/components/ui/avatar.tsx +1 -0
  140. package/template/components/ui/badge.tsx +1 -0
  141. package/template/components/ui/banner.tsx +1 -0
  142. package/template/components/ui/breadcrumb.tsx +1 -0
  143. package/template/components/ui/button.tsx +1 -0
  144. package/template/components/ui/calendar.tsx +1 -0
  145. package/template/components/ui/card.tsx +1 -0
  146. package/template/components/ui/chart.tsx +1 -0
  147. package/template/components/ui/checkbox.tsx +1 -0
  148. package/template/components/ui/coach-mark.tsx +1 -0
  149. package/template/components/ui/collapsible.tsx +1 -0
  150. package/template/components/ui/command.tsx +1 -0
  151. package/template/components/ui/date-picker-field.tsx +1 -0
  152. package/template/components/ui/dialog.tsx +1 -0
  153. package/template/components/ui/dot-pattern.tsx +159 -0
  154. package/template/components/ui/drag-handle-grip.tsx +1 -0
  155. package/template/components/ui/drawer.tsx +1 -0
  156. package/template/components/ui/dropdown-menu.tsx +1 -0
  157. package/template/components/ui/field.tsx +1 -0
  158. package/template/components/ui/form.tsx +1 -0
  159. package/template/components/ui/input-group.tsx +1 -0
  160. package/template/components/ui/input-mask.tsx +1 -0
  161. package/template/components/ui/input.tsx +1 -0
  162. package/template/components/ui/kbd.tsx +1 -0
  163. package/template/components/ui/label.tsx +1 -0
  164. package/template/components/ui/leo-icon.tsx +726 -0
  165. package/template/components/ui/payment-card-fields.tsx +1 -0
  166. package/template/components/ui/popover.tsx +1 -0
  167. package/template/components/ui/radio-group.tsx +1 -0
  168. package/template/components/ui/select.tsx +1 -0
  169. package/template/components/ui/selection-tile-grid.tsx +1 -0
  170. package/template/components/ui/separator.tsx +1 -0
  171. package/template/components/ui/sheet.tsx +1 -0
  172. package/template/components/ui/sidebar.tsx +1 -0
  173. package/template/components/ui/skeleton.tsx +1 -0
  174. package/template/components/ui/sonner.tsx +1 -0
  175. package/template/components/ui/status-badge.tsx +1 -0
  176. package/template/components/ui/table.tsx +1 -0
  177. package/template/components/ui/tabs.tsx +1 -0
  178. package/template/components/ui/textarea.tsx +1 -0
  179. package/template/components/ui/tip.tsx +1 -0
  180. package/template/components/ui/toggle-group.tsx +1 -0
  181. package/template/components/ui/toggle-switch.tsx +1 -0
  182. package/template/components/ui/toggle.tsx +1 -0
  183. package/template/components/ui/tooltip.tsx +1 -0
  184. package/template/components/ui/view-segmented-control.tsx +1 -0
  185. package/template/components.json +27 -0
  186. package/template/contexts/chart-variant-context.tsx +35 -0
  187. package/template/contexts/command-menu-context.tsx +28 -0
  188. package/template/contexts/dashboard-view-context.tsx +35 -0
  189. package/template/contexts/product-context.tsx +38 -0
  190. package/template/contexts/system-banner-context.tsx +127 -0
  191. package/template/docs/command-menu-pattern.md +45 -0
  192. package/template/docs/data-views-pattern.md +160 -0
  193. package/template/ecosystem.config.cjs +20 -0
  194. package/template/eslint.config.mjs +18 -0
  195. package/template/fontawesome-subset.manifest.json +190 -0
  196. package/template/hooks/.gitkeep +0 -0
  197. package/template/hooks/use-app-theme.ts +1 -0
  198. package/template/hooks/use-coach-mark.ts +1 -0
  199. package/template/hooks/use-mobile.ts +1 -0
  200. package/template/hooks/use-mod-key-label.ts +1 -0
  201. package/template/lib/.gitkeep +0 -0
  202. package/template/lib/ask-leo-route-context.ts +133 -0
  203. package/template/lib/chart-keyboard-selection.test.ts +20 -0
  204. package/template/lib/chart-keyboard-selection.ts +17 -0
  205. package/template/lib/chart-line-dash.ts +16 -0
  206. package/template/lib/coach-mark-registry.ts +68 -0
  207. package/template/lib/command-menu-config.ts +127 -0
  208. package/template/lib/command-menu-search-data.ts +44 -0
  209. package/template/lib/conditional-rule-match.ts +32 -0
  210. package/template/lib/dashboard-customize-coach-mark.ts +18 -0
  211. package/template/lib/dashboard-layout-merge.ts +63 -0
  212. package/template/lib/data-list-display-options.ts +35 -0
  213. package/template/lib/data-list-persistence.ts +280 -0
  214. package/template/lib/data-list-view-surface.ts +58 -0
  215. package/template/lib/data-list-view.ts +29 -0
  216. package/template/lib/data-view-dashboard-storage.ts +101 -0
  217. package/template/lib/date-filter.ts +8 -0
  218. package/template/lib/dev-log.test.ts +28 -0
  219. package/template/lib/dev-log.ts +8 -0
  220. package/template/lib/editable-target.ts +10 -0
  221. package/template/lib/floating-sheet-panel.ts +72 -0
  222. package/template/lib/initials-from-name.ts +7 -0
  223. package/template/lib/list-page-table-properties.ts +52 -0
  224. package/template/lib/list-status-badges.ts +168 -0
  225. package/template/lib/logo-dev.ts +12 -0
  226. package/template/lib/mock/compliance-kpi.ts +61 -0
  227. package/template/lib/mock/compliance.ts +146 -0
  228. package/template/lib/mock/dashboard.ts +105 -0
  229. package/template/lib/mock/navigation.tsx +231 -0
  230. package/template/lib/mock/placements-kpi.ts +134 -0
  231. package/template/lib/mock/placements.ts +183 -0
  232. package/template/lib/mock/question-bank-kpi.ts +61 -0
  233. package/template/lib/mock/question-bank.ts +142 -0
  234. package/template/lib/mock/sites-directory.ts +16 -0
  235. package/template/lib/mock/sites-kpi.ts +25 -0
  236. package/template/lib/mock/team-kpi.ts +60 -0
  237. package/template/lib/mock/team.ts +118 -0
  238. package/template/lib/motion-ui.ts +17 -0
  239. package/template/lib/placement-board-card-layout.ts +79 -0
  240. package/template/lib/placement-lifecycle.ts +5 -0
  241. package/template/lib/row-height.ts +10 -0
  242. package/template/lib/stock-portrait.ts +11 -0
  243. package/template/lib/utils.test.ts +13 -0
  244. package/template/lib/utils.ts +1 -0
  245. package/template/next.config.mjs +15 -0
  246. package/template/package.json +83 -0
  247. package/template/postcss.config.mjs +8 -0
  248. package/template/public/.gitkeep +0 -0
  249. package/template/public/Illustration/Rotation.svg +74 -0
  250. package/template/public/avatars/user.svg +11 -0
  251. package/template/public/favicon/favicon.ico +0 -0
  252. package/template/public/favicon.ico +0 -0
  253. package/template/public/logos/exxat-one.svg +36 -0
  254. package/template/public/logos/exxat-prism.svg +39 -0
  255. package/template/public/mock-schools/emory.svg +4 -0
  256. package/template/public/mock-schools/rush.svg +4 -0
  257. package/template/scripts/fontawesome-subset-audit.mjs +190 -0
  258. package/template/scripts/pm2-startup-macos.sh +13 -0
  259. package/template/skills-lock.json +10 -0
  260. package/template/stores/app-store.ts +33 -0
  261. package/template/tests/setup.ts +1 -0
  262. package/template/tsconfig.json +35 -0
  263. package/template/types/react-payment-inputs.d.ts +19 -0
  264. package/template/vitest.config.ts +18 -0
@@ -0,0 +1,639 @@
1
+ "use client"
2
+
3
+ /**
4
+ * Placements lifecycle columns, empty states, and Properties drawer labels.
5
+ * Owned by the placements data-list feature (`DataListClient` / `/data-list`), not `DataListTable`.
6
+ */
7
+
8
+ import { Badge } from "@/components/ui/badge"
9
+ import type { FilterFieldDef, FilterOperator } from "@/components/table-properties/types"
10
+ import type { ColumnDef } from "@/components/data-table/types"
11
+ import {
12
+ AvatarCircle,
13
+ HireBadge,
14
+ PLACEMENT_ROW_ACTIONS,
15
+ ReadinessBadge,
16
+ RowActions,
17
+ StatusBadge,
18
+ WeeksProgressCell,
19
+ } from "@/components/data-list-table-cells"
20
+ import { uniquePlacementFieldOptions, type Placement } from "@/lib/mock/placements"
21
+ import type { PlacementLifecycleTabId } from "@/lib/placement-lifecycle"
22
+
23
+ const COLUMN_SELECT: ColumnDef<Placement> = {
24
+ key: "select",
25
+ label: "",
26
+ width: 40,
27
+ minWidth: 40,
28
+ defaultPin: "left",
29
+ lockPin: true,
30
+ }
31
+
32
+ const COLUMN_ACTIONS: ColumnDef<Placement> = {
33
+ key: "actions",
34
+ label: "",
35
+ width: 48,
36
+ minWidth: 48,
37
+ defaultPin: "right",
38
+ lockPin: true,
39
+ cell: (row) => (
40
+ <div className="flex items-center justify-center">
41
+ <RowActions row={row} actions={PLACEMENT_ROW_ACTIONS} />
42
+ </div>
43
+ ),
44
+ }
45
+
46
+ const CELL_STUDENT: ColumnDef<Placement>["cell"] = (row) => (
47
+ <div className="flex items-center gap-2.5 min-w-0">
48
+ <AvatarCircle initials={row.initials} />
49
+ <div className="flex flex-col min-w-0">
50
+ <span className="font-medium text-foreground text-sm leading-tight truncate">
51
+ {row.student}
52
+ </span>
53
+ <span className="text-xs text-muted-foreground leading-tight mt-0.5 truncate">
54
+ {row.email}
55
+ </span>
56
+ </div>
57
+ </div>
58
+ )
59
+
60
+ const CELL_SITE_LOCATION: ColumnDef<Placement>["cell"] = (row) => (
61
+ <div className="min-w-0" title={`${row.site} · ${row.siteAddress}`}>
62
+ <span className="block truncate text-sm font-medium text-foreground leading-tight">{row.site}</span>
63
+ <span className="block truncate text-xs text-muted-foreground mt-0.5 leading-tight">{row.siteAddress}</span>
64
+ </div>
65
+ )
66
+
67
+ function placementColumnToFilterFieldDef(c: ColumnDef<Placement>): FilterFieldDef | null {
68
+ if (!c.filter) return null
69
+ const f = c.filter
70
+ const defaultOps =
71
+ f.type === "select" || f.type === "date"
72
+ ? (["is", "is_not"] as FilterOperator[])
73
+ : (["contains", "not_contains"] as FilterOperator[])
74
+ return {
75
+ key: c.key,
76
+ label: c.label,
77
+ icon: f.icon ?? "fa-filter",
78
+ type: f.type,
79
+ operators: (f.operators ?? defaultOps) as FilterOperator[],
80
+ options:
81
+ f.type === "date"
82
+ ? uniquePlacementFieldOptions(c.key as keyof Placement)
83
+ : f.options,
84
+ ...(f.textMask ? { textMask: f.textMask } : {}),
85
+ }
86
+ }
87
+
88
+ export function columnsToFilterFields(cols: ColumnDef<Placement>[]): FilterFieldDef[] {
89
+ return cols.map(placementColumnToFilterFieldDef).filter((x): x is FilterFieldDef => x !== null)
90
+ }
91
+
92
+ /** All columns — original placements overview */
93
+ const PLACEMENT_COLUMNS_ALL: ColumnDef<Placement>[] = [
94
+ COLUMN_SELECT,
95
+ {
96
+ key: "student",
97
+ label: "Student",
98
+ width: 210,
99
+ minWidth: 180,
100
+ sortable: true,
101
+ sortKey: "student",
102
+ defaultPin: "left",
103
+ filter: {
104
+ type: "select",
105
+ icon: "fa-user",
106
+ operators: ["is", "is_not"],
107
+ options: uniquePlacementFieldOptions("student"),
108
+ },
109
+ cell: CELL_STUDENT,
110
+ },
111
+ {
112
+ key: "specialization",
113
+ label: "Specialization",
114
+ width: 160,
115
+ minWidth: 100,
116
+ sortable: true,
117
+ sortKey: "specialization",
118
+ filter: {
119
+ type: "select",
120
+ icon: "fa-stethoscope",
121
+ operators: ["is", "is_not"],
122
+ options: uniquePlacementFieldOptions("specialization"),
123
+ },
124
+ cell: (row) => (
125
+ <span className="block truncate text-sm text-foreground/80">{row.specialization}</span>
126
+ ),
127
+ },
128
+ {
129
+ key: "site",
130
+ label: "Site",
131
+ width: 180,
132
+ minWidth: 100,
133
+ sortable: true,
134
+ sortKey: "site",
135
+ filter: {
136
+ type: "select",
137
+ icon: "fa-hospital",
138
+ operators: ["is", "is_not"],
139
+ options: uniquePlacementFieldOptions("site"),
140
+ },
141
+ cell: (row) => (
142
+ <div className="min-w-0" title={`${row.site} · ${row.siteAddress}`}>
143
+ <span className="block truncate text-sm font-medium text-foreground leading-tight">{row.site}</span>
144
+ <span className="block truncate text-xs text-muted-foreground mt-0.5 leading-tight">{row.siteAddress}</span>
145
+ </div>
146
+ ),
147
+ },
148
+ {
149
+ key: "status",
150
+ label: "Status",
151
+ width: 130,
152
+ minWidth: 110,
153
+ sortable: true,
154
+ sortKey: "status",
155
+ filter: {
156
+ type: "select",
157
+ icon: "fa-circle-dot",
158
+ operators: ["is", "is_not"],
159
+ options: [
160
+ { value: "confirmed", label: "Confirmed" },
161
+ { value: "pending", label: "Pending" },
162
+ { value: "under-review", label: "Under Review" },
163
+ { value: "rejected", label: "Rejected" },
164
+ { value: "completed", label: "Completed" },
165
+ ],
166
+ },
167
+ cell: (row) => <StatusBadge status={row.status} />,
168
+ },
169
+ {
170
+ key: "start",
171
+ label: "Start Date",
172
+ width: 130,
173
+ minWidth: 110,
174
+ sortable: true,
175
+ sortKey: "start",
176
+ filter: {
177
+ type: "date",
178
+ icon: "fa-calendar-days",
179
+ operators: ["is", "is_not"],
180
+ },
181
+ cell: (row) => (
182
+ <span className="text-sm text-foreground/80 tabular-nums whitespace-nowrap">{row.start}</span>
183
+ ),
184
+ },
185
+ {
186
+ key: "duration",
187
+ label: "Duration",
188
+ width: 96,
189
+ minWidth: 80,
190
+ cell: (row) => (
191
+ <span className="text-sm text-foreground/80 whitespace-nowrap">{row.duration}</span>
192
+ ),
193
+ },
194
+ {
195
+ key: "supervisor",
196
+ label: "Supervisor",
197
+ width: 152,
198
+ minWidth: 100,
199
+ filter: {
200
+ type: "select",
201
+ icon: "fa-user-tie",
202
+ operators: ["is", "is_not"],
203
+ options: uniquePlacementFieldOptions("supervisor"),
204
+ },
205
+ cell: (row) => (
206
+ <span className="block truncate text-sm text-foreground/80">{row.supervisor}</span>
207
+ ),
208
+ },
209
+ COLUMN_ACTIONS,
210
+ ]
211
+
212
+ /** Upcoming lifecycle */
213
+ const PLACEMENT_COLUMNS_UPCOMING: ColumnDef<Placement>[] = [
214
+ COLUMN_SELECT,
215
+ {
216
+ key: "student",
217
+ label: "Student",
218
+ width: 200,
219
+ minWidth: 170,
220
+ sortable: true,
221
+ sortKey: "student",
222
+ defaultPin: "left",
223
+ filter: {
224
+ type: "select",
225
+ icon: "fa-user",
226
+ operators: ["is", "is_not"],
227
+ options: uniquePlacementFieldOptions("student"),
228
+ },
229
+ cell: CELL_STUDENT,
230
+ },
231
+ {
232
+ key: "site",
233
+ label: "Site & Location",
234
+ width: 200,
235
+ minWidth: 140,
236
+ sortable: true,
237
+ sortKey: "site",
238
+ filter: {
239
+ type: "select",
240
+ icon: "fa-hospital",
241
+ operators: ["is", "is_not"],
242
+ options: uniquePlacementFieldOptions("site"),
243
+ },
244
+ cell: CELL_SITE_LOCATION,
245
+ },
246
+ {
247
+ key: "internship",
248
+ label: "Internship",
249
+ width: 180,
250
+ minWidth: 120,
251
+ sortable: true,
252
+ sortKey: "internship",
253
+ filter: {
254
+ type: "select",
255
+ icon: "fa-briefcase",
256
+ operators: ["is", "is_not"],
257
+ options: uniquePlacementFieldOptions("internship"),
258
+ },
259
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.internship}</span>,
260
+ },
261
+ {
262
+ key: "supervisor",
263
+ label: "Preceptor",
264
+ width: 140,
265
+ minWidth: 100,
266
+ sortable: true,
267
+ sortKey: "supervisor",
268
+ filter: {
269
+ type: "select",
270
+ icon: "fa-user-tie",
271
+ operators: ["is", "is_not"],
272
+ options: uniquePlacementFieldOptions("supervisor"),
273
+ },
274
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.supervisor}</span>,
275
+ },
276
+ {
277
+ key: "specialization",
278
+ label: "Specialization",
279
+ width: 140,
280
+ minWidth: 100,
281
+ sortable: true,
282
+ sortKey: "specialization",
283
+ filter: {
284
+ type: "select",
285
+ icon: "fa-stethoscope",
286
+ operators: ["is", "is_not"],
287
+ options: uniquePlacementFieldOptions("specialization"),
288
+ },
289
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.specialization}</span>,
290
+ },
291
+ {
292
+ key: "start",
293
+ label: "Start Date",
294
+ width: 110,
295
+ minWidth: 100,
296
+ sortable: true,
297
+ sortKey: "start",
298
+ filter: { type: "date", icon: "fa-calendar-days", operators: ["is", "is_not"] },
299
+ cell: (row) => (
300
+ <span className="text-sm text-foreground/80 tabular-nums whitespace-nowrap">{row.start}</span>
301
+ ),
302
+ },
303
+ {
304
+ key: "compliance",
305
+ label: "Compliance",
306
+ width: 120,
307
+ minWidth: 100,
308
+ sortable: true,
309
+ sortKey: "compliance",
310
+ filter: {
311
+ type: "select",
312
+ icon: "fa-shield-check",
313
+ operators: ["is", "is_not"],
314
+ options: uniquePlacementFieldOptions("compliance"),
315
+ },
316
+ cell: (row) => <span className="text-sm text-foreground/80">{row.compliance}</span>,
317
+ },
318
+ {
319
+ key: "daysUntilStart",
320
+ label: "Days Until Start",
321
+ width: 120,
322
+ minWidth: 100,
323
+ sortable: true,
324
+ sortKey: "daysUntilStart",
325
+ cell: (row) => (
326
+ <span className="text-sm tabular-nums text-foreground/80">
327
+ {row.daysUntilStart > 0 ? `${row.daysUntilStart} days` : "—"}
328
+ </span>
329
+ ),
330
+ },
331
+ {
332
+ key: "readiness",
333
+ label: "Readiness",
334
+ width: 120,
335
+ minWidth: 100,
336
+ sortable: true,
337
+ sortKey: "readiness",
338
+ filter: {
339
+ type: "select",
340
+ icon: "fa-flag",
341
+ operators: ["is", "is_not"],
342
+ options: uniquePlacementFieldOptions("readiness"),
343
+ },
344
+ cell: (row) => <ReadinessBadge value={row.readiness} />,
345
+ },
346
+ COLUMN_ACTIONS,
347
+ ]
348
+
349
+ /** Ongoing lifecycle */
350
+ const PLACEMENT_COLUMNS_ONGOING: ColumnDef<Placement>[] = [
351
+ COLUMN_SELECT,
352
+ {
353
+ key: "student",
354
+ label: "Student",
355
+ width: 200,
356
+ minWidth: 170,
357
+ sortable: true,
358
+ sortKey: "student",
359
+ defaultPin: "left",
360
+ filter: {
361
+ type: "select",
362
+ icon: "fa-user",
363
+ operators: ["is", "is_not"],
364
+ options: uniquePlacementFieldOptions("student"),
365
+ },
366
+ cell: CELL_STUDENT,
367
+ },
368
+ {
369
+ key: "site",
370
+ label: "Site & Location",
371
+ width: 200,
372
+ minWidth: 140,
373
+ sortable: true,
374
+ sortKey: "site",
375
+ filter: {
376
+ type: "select",
377
+ icon: "fa-hospital",
378
+ operators: ["is", "is_not"],
379
+ options: uniquePlacementFieldOptions("site"),
380
+ },
381
+ cell: CELL_SITE_LOCATION,
382
+ },
383
+ {
384
+ key: "internship",
385
+ label: "Internship",
386
+ width: 180,
387
+ minWidth: 120,
388
+ sortable: true,
389
+ sortKey: "internship",
390
+ filter: {
391
+ type: "select",
392
+ icon: "fa-briefcase",
393
+ operators: ["is", "is_not"],
394
+ options: uniquePlacementFieldOptions("internship"),
395
+ },
396
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.internship}</span>,
397
+ },
398
+ {
399
+ key: "supervisor",
400
+ label: "Preceptor",
401
+ width: 140,
402
+ minWidth: 100,
403
+ sortable: true,
404
+ sortKey: "supervisor",
405
+ filter: {
406
+ type: "select",
407
+ icon: "fa-user-tie",
408
+ operators: ["is", "is_not"],
409
+ options: uniquePlacementFieldOptions("supervisor"),
410
+ },
411
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.supervisor}</span>,
412
+ },
413
+ {
414
+ key: "specialization",
415
+ label: "Specialization",
416
+ width: 140,
417
+ minWidth: 100,
418
+ sortable: true,
419
+ sortKey: "specialization",
420
+ filter: {
421
+ type: "select",
422
+ icon: "fa-stethoscope",
423
+ operators: ["is", "is_not"],
424
+ options: uniquePlacementFieldOptions("specialization"),
425
+ },
426
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.specialization}</span>,
427
+ },
428
+ {
429
+ key: "progressWeeksDone",
430
+ label: "Progress",
431
+ width: 160,
432
+ minWidth: 140,
433
+ sortable: true,
434
+ sortKey: "progressWeeksDone",
435
+ cell: (row) => <WeeksProgressCell row={row} />,
436
+ },
437
+ {
438
+ key: "endDate",
439
+ label: "End Date",
440
+ width: 110,
441
+ minWidth: 100,
442
+ sortable: true,
443
+ sortKey: "endDate",
444
+ filter: { type: "date", icon: "fa-calendar-days", operators: ["is", "is_not"] },
445
+ cell: (row) => (
446
+ <span className="text-sm text-foreground/80 tabular-nums whitespace-nowrap">{row.endDate}</span>
447
+ ),
448
+ },
449
+ {
450
+ key: "lastCheckin",
451
+ label: "Last Check-In",
452
+ width: 120,
453
+ minWidth: 100,
454
+ sortable: true,
455
+ sortKey: "lastCheckin",
456
+ cell: (row) => (
457
+ <span className="text-sm text-foreground/80 whitespace-nowrap">{row.lastCheckin}</span>
458
+ ),
459
+ },
460
+ COLUMN_ACTIONS,
461
+ ]
462
+
463
+ /** Completed lifecycle */
464
+ const PLACEMENT_COLUMNS_COMPLETED: ColumnDef<Placement>[] = [
465
+ COLUMN_SELECT,
466
+ {
467
+ key: "student",
468
+ label: "Student",
469
+ width: 200,
470
+ minWidth: 170,
471
+ sortable: true,
472
+ sortKey: "student",
473
+ defaultPin: "left",
474
+ filter: {
475
+ type: "select",
476
+ icon: "fa-user",
477
+ operators: ["is", "is_not"],
478
+ options: uniquePlacementFieldOptions("student"),
479
+ },
480
+ cell: CELL_STUDENT,
481
+ },
482
+ {
483
+ key: "site",
484
+ label: "Site & Location",
485
+ width: 200,
486
+ minWidth: 140,
487
+ sortable: true,
488
+ sortKey: "site",
489
+ filter: {
490
+ type: "select",
491
+ icon: "fa-hospital",
492
+ operators: ["is", "is_not"],
493
+ options: uniquePlacementFieldOptions("site"),
494
+ },
495
+ cell: CELL_SITE_LOCATION,
496
+ },
497
+ {
498
+ key: "internship",
499
+ label: "Internship",
500
+ width: 180,
501
+ minWidth: 120,
502
+ sortable: true,
503
+ sortKey: "internship",
504
+ filter: {
505
+ type: "select",
506
+ icon: "fa-briefcase",
507
+ operators: ["is", "is_not"],
508
+ options: uniquePlacementFieldOptions("internship"),
509
+ },
510
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.internship}</span>,
511
+ },
512
+ {
513
+ key: "supervisor",
514
+ label: "Preceptor",
515
+ width: 140,
516
+ minWidth: 100,
517
+ sortable: true,
518
+ sortKey: "supervisor",
519
+ filter: {
520
+ type: "select",
521
+ icon: "fa-user-tie",
522
+ operators: ["is", "is_not"],
523
+ options: uniquePlacementFieldOptions("supervisor"),
524
+ },
525
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.supervisor}</span>,
526
+ },
527
+ {
528
+ key: "specialization",
529
+ label: "Specialization",
530
+ width: 140,
531
+ minWidth: 100,
532
+ sortable: true,
533
+ sortKey: "specialization",
534
+ filter: {
535
+ type: "select",
536
+ icon: "fa-stethoscope",
537
+ operators: ["is", "is_not"],
538
+ options: uniquePlacementFieldOptions("specialization"),
539
+ },
540
+ cell: (row) => <span className="block truncate text-sm text-foreground/80">{row.specialization}</span>,
541
+ },
542
+ {
543
+ key: "completionDate",
544
+ label: "Completion Date",
545
+ width: 120,
546
+ minWidth: 100,
547
+ sortable: true,
548
+ sortKey: "completionDate",
549
+ filter: { type: "date", icon: "fa-calendar-days", operators: ["is", "is_not"] },
550
+ cell: (row) => (
551
+ <span className="text-sm text-foreground/80 tabular-nums whitespace-nowrap">{row.completionDate}</span>
552
+ ),
553
+ },
554
+ {
555
+ key: "finalStatus",
556
+ label: "Final Status",
557
+ width: 120,
558
+ minWidth: 100,
559
+ sortable: true,
560
+ sortKey: "finalStatus",
561
+ filter: {
562
+ type: "select",
563
+ icon: "fa-circle-check",
564
+ operators: ["is", "is_not"],
565
+ options: uniquePlacementFieldOptions("finalStatus"),
566
+ },
567
+ cell: (row) => (
568
+ <Badge variant="outline" className="h-6 px-2 py-1 text-xs font-medium leading-none">
569
+ {row.finalStatus}
570
+ </Badge>
571
+ ),
572
+ },
573
+ {
574
+ key: "rating",
575
+ label: "Rating",
576
+ width: 100,
577
+ minWidth: 88,
578
+ sortable: true,
579
+ sortKey: "rating",
580
+ cell: (row) =>
581
+ row.rating > 0 ? (
582
+ <span className="inline-flex items-center gap-1 text-sm font-medium tabular-nums">
583
+ {row.rating.toFixed(1)}
584
+ <i className="fa-solid fa-star text-xs text-chart-4" aria-hidden="true" />
585
+ </span>
586
+ ) : (
587
+ <span className="text-sm text-muted-foreground">—</span>
588
+ ),
589
+ },
590
+ {
591
+ key: "suggestedToHire",
592
+ label: "Suggested To Hire",
593
+ width: 130,
594
+ minWidth: 110,
595
+ sortable: true,
596
+ sortKey: "suggestedToHire",
597
+ filter: {
598
+ type: "select",
599
+ icon: "fa-user-plus",
600
+ operators: ["is", "is_not"],
601
+ options: uniquePlacementFieldOptions("suggestedToHire"),
602
+ },
603
+ cell: (row) => <HireBadge value={row.suggestedToHire} />,
604
+ },
605
+ COLUMN_ACTIONS,
606
+ ]
607
+
608
+ export function getPlacementColumnsForLifecycle(tab: PlacementLifecycleTabId): ColumnDef<Placement>[] {
609
+ switch (tab) {
610
+ case "upcoming":
611
+ return PLACEMENT_COLUMNS_UPCOMING
612
+ case "ongoing":
613
+ return PLACEMENT_COLUMNS_ONGOING
614
+ case "completed":
615
+ return PLACEMENT_COLUMNS_COMPLETED
616
+ default:
617
+ return PLACEMENT_COLUMNS_ALL
618
+ }
619
+ }
620
+
621
+ export function emptyCopyForPlacementLifecycleTab(tab: PlacementLifecycleTabId): string {
622
+ switch (tab) {
623
+ case "upcoming":
624
+ return "No upcoming placements match your filters."
625
+ case "ongoing":
626
+ return "No ongoing placements match your filters."
627
+ case "completed":
628
+ return "No completed placements match your filters."
629
+ default:
630
+ return "No placements match your filters."
631
+ }
632
+ }
633
+
634
+ export const placementLifecycleDrawerLabels: Record<PlacementLifecycleTabId, string> = {
635
+ all: "Lifecycle: All placements",
636
+ upcoming: "Lifecycle: Upcoming",
637
+ ongoing: "Lifecycle: Ongoing",
638
+ completed: "Lifecycle: Completed",
639
+ }