forge
Explore
Log in

Don't you dare go Hollow

🧹 streamline tables and list surfaces

Browse files at this commit

0202be52bdb5c132ae46df0e44e19187d0773642Burak BoduroğluParent: 38b2f34
  • refactor
    • 🧹 streamline tables and list surfaces
Show full message
refactor: 🧹 streamline tables and list surfaces

- simplify list tables and keep detailed content on detail pages
- align shared table surfaces, pagination, tabs, and numeric typography
- tidy course, homework, event, staff, payment, and insight views
src/components/ai/insights-board.tsxmodified+1 -21
@@ -10,7 +10,7 @@ import { Alert } from "@/components/ui/alert";
10 import { Button } from "@/components/ui/button";10 import { Button } from "@/components/ui/button";
11 import { DataTableSkeleton } from "@/components/ui/data-table";11 import { DataTableSkeleton } from "@/components/ui/data-table";
12 import { ErrorAlert } from "@/components/ui/error-alert";12 import { ErrorAlert } from "@/components/ui/error-alert";
13-import { IconRefresh, IconSparkles } from "@/components/ui/icons";13+import { IconSparkles } from "@/components/ui/icons";
14 import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";14 import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
15 import { createFlash } from "@/lib/flash";15 import { createFlash } from "@/lib/flash";
16 import { toStudentSignal, type StudentSignal } from "@/lib/insight-run-report";16 import { toStudentSignal, type StudentSignal } from "@/lib/insight-run-report";
@@ -62,18 +62,6 @@ export function InsightsBoard() {
62 const rows = createMemo(() => Object.values(signals()));62 const rows = createMemo(() => Object.values(signals()));
63 const overview = createMemo(() => insightOverview(rows(), students.latest?.length ?? 0));63 const overview = createMemo(() => insightOverview(rows(), students.latest?.length ?? 0));
64 64
65- const refreshPage = async () => {
66- setPageError("");
67- try {
68- const tasks: Promise<unknown>[] = [Promise.resolve(refetchSelfInsight())];
69- if (canBrowseStudents()) tasks.push(Promise.resolve(refetchStudents()));
70- if (canManageRuns()) tasks.push(Promise.resolve(refetchRuns()));
71- await Promise.all(tasks);
72- } catch (error) {
73- setPageError(formatApiError(error));
74- }
75- };
76-
77 const queueSchoolRefresh = async () => {65 const queueSchoolRefresh = async () => {
78 if (refreshingAll() || !canManageRuns()) return;66 if (refreshingAll() || !canManageRuns()) return;
79 setRefreshingAll(true);67 setRefreshingAll(true);
@@ -105,10 +93,6 @@ export function InsightsBoard() {
105 empty={role() === "parent" ? tx("insights.emptyLinkedStudents") : tx("insights.emptyStudents")}93 empty={role() === "parent" ? tx("insights.emptyLinkedStudents") : tx("insights.emptyStudents")}
106 actions={94 actions={
107 <>95 <>
108- <Button variant="outline" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => void refreshPage()}>
109- <IconRefresh class="h-4 w-4" />
110- {tx("common.refresh")}
111- </Button>
112 <Show when={canManageRuns()}>96 <Show when={canManageRuns()}>
113 <Button97 <Button
114 size="sm"98 size="sm"
@@ -155,10 +139,6 @@ export function InsightsBoard() {
155 <h2 class="text-base font-semibold text-text-strong">{tx("insights.myAnalysis")}</h2>139 <h2 class="text-base font-semibold text-text-strong">{tx("insights.myAnalysis")}</h2>
156 <p class="mt-1 text-sm text-muted-foreground">{tx("insights.myAnalysisSubtitle")}</p>140 <p class="mt-1 text-sm text-muted-foreground">{tx("insights.myAnalysisSubtitle")}</p>
157 </div>141 </div>
158- <Button variant="outline" size="sm" class="rounded-lg" onClick={() => void refetchSelfInsight()}>
159- <IconRefresh class="h-4 w-4" />
160- {tx("common.refresh")}
161- </Button>
162 </div>142 </div>
163 <Suspense fallback={<p class="py-8 text-center text-sm text-muted-foreground">{tx("common.loading")}</p>}>143 <Suspense fallback={<p class="py-8 text-center text-sm text-muted-foreground">{tx("common.loading")}</p>}>
164 <Show when={selfInsight.error}>144 <Show when={selfInsight.error}>
src/components/ai/note-studio-panel.tsxmodified+9 -20
@@ -9,7 +9,7 @@ import { RagOutputsPanel } from "@/components/notes/rag-outputs-panel";
9 import { StudioOutputLibrary } from "@/components/ai/studio-output-library";9 import { StudioOutputLibrary } from "@/components/ai/studio-output-library";
10 import { EmptyState } from "@/components/ui/empty-state";10 import { EmptyState } from "@/components/ui/empty-state";
11 import { ErrorAlert } from "@/components/ui/error-alert";11 import { ErrorAlert } from "@/components/ui/error-alert";
12-import { IconSparkles, IconWaveform } from "@/components/ui/icons";12+import { IconSparkles } from "@/components/ui/icons";
13 import { Label } from "@/components/ui/label";13 import { Label } from "@/components/ui/label";
14 import { PageSpinner } from "@/components/ui/page-spinner";14 import { PageSpinner } from "@/components/ui/page-spinner";
15 import { SearchableSelect } from "@/components/ui/searchable-select";15 import { SearchableSelect } from "@/components/ui/searchable-select";
@@ -94,20 +94,7 @@ export function NoteStudioPanel() {
94 />94 />
95 </div>95 </div>
96 </section>96 </section>
97- <Show97+ <Show when={selected()}>
98- when={selected()}
99- fallback={
100- <section class="flex min-h-48 flex-col items-center justify-center gap-3 rounded-2xl border border-dashed border-primary/25 bg-primary/[0.03] px-6 py-8 text-center">
101- <div class="flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary-text">
102- <IconWaveform class="h-5 w-5" />
103- </div>
104- <div>
105- <p class="font-medium text-text-strong">{t("podcast.selectPrompt")}</p>
106- <p class="mt-1 text-sm text-muted-foreground">{t("podcast.selectPromptHint")}</p>
107- </div>
108- </section>
109- }
110- >
111 {(note) => (98 {(note) => (
112 <section ref={outputsSection} class="scroll-mt-20 space-y-3 rounded-2xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">99 <section ref={outputsSection} class="scroll-mt-20 space-y-3 rounded-2xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
113 <div class="flex flex-wrap items-center justify-between gap-2 px-1">100 <div class="flex flex-wrap items-center justify-between gap-2 px-1">
@@ -133,11 +120,13 @@ export function NoteStudioPanel() {
133 </section>120 </section>
134 )}121 )}
135 </Show>122 </Show>
136- <StudioOutputLibrary123+ <Show when={!selected()}>
137- notes={(notes() ?? []).map((note) => ({ id: note.id, title: note.title, courseTitle: note.courseTitle }))}124+ <StudioOutputLibrary
138- selectedId={selectedId()}125+ notes={(notes() ?? []).map((note) => ({ id: note.id, title: note.title, courseTitle: note.courseTitle }))}
139- onSelect={selectLibraryNote}126+ selectedId={selectedId()}
140- />127+ onSelect={selectLibraryNote}
128+ />
129+ </Show>
141 </div>130 </div>
142 </Show>131 </Show>
143 </Show>132 </Show>
src/components/ai/studio-output-library.tsxmodified+3 -4
@@ -68,9 +68,6 @@ export function StudioOutputLibrary(props: {
68 <section class="overflow-hidden rounded-xl border border-border-line bg-surface-base">68 <section class="overflow-hidden rounded-xl border border-border-line bg-surface-base">
69 <header class="flex flex-wrap items-start justify-between gap-3 border-b border-border-hairline px-4 py-4 sm:px-5">69 <header class="flex flex-wrap items-start justify-between gap-3 border-b border-border-hairline px-4 py-4 sm:px-5">
70 <div class="flex min-w-0 items-start gap-3">70 <div class="flex min-w-0 items-start gap-3">
71- <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-surface-tint text-text-subtle">
72- <IconNote class="h-4 w-4" />
73- </span>
74 <div class="min-w-0">71 <div class="min-w-0">
75 <h2 class="text-sm font-semibold text-text-strong">{t("aiStudio.library.title")}</h2>72 <h2 class="text-sm font-semibold text-text-strong">{t("aiStudio.library.title")}</h2>
76 <p class="mt-0.5 text-xs text-muted-foreground">{t("aiStudio.library.description")}</p>73 <p class="mt-0.5 text-xs text-muted-foreground">{t("aiStudio.library.description")}</p>
@@ -107,7 +104,9 @@ export function StudioOutputLibrary(props: {
107 >104 >
108 <div class="flex w-full items-start gap-3">105 <div class="flex w-full items-start gap-3">
109 <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary-text">106 <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary-text">
110- <IconNote class="h-4 w-4" />107+ <Show when={item.podcastCount > 0} fallback={<IconNote class="h-4 w-4" />}>
108+ <IconWaveform class="h-4 w-4" />
109+ </Show>
111 </span>110 </span>
112 <div class="min-w-0 flex-1">111 <div class="min-w-0 flex-1">
113 <p class="truncate text-sm font-semibold text-text-strong">{item.title}</p>112 <p class="truncate text-sm font-semibold text-text-strong">{item.title}</p>
src/components/appointments/book-appointment-form.tsxmodified+1 -1
@@ -47,7 +47,7 @@ export function BookAppointmentForm(props: {
47 <span class="text-muted-foreground">{t("appointments.teacher")}:</span>{" "}47 <span class="text-muted-foreground">{t("appointments.teacher")}:</span>{" "}
48 <span class="font-medium">{personLabel(props.slot.teacher)}</span>48 <span class="font-medium">{personLabel(props.slot.teacher)}</span>
49 </p>49 </p>
50- <p class="mono text-xs text-muted-foreground">50+ <p class="text-xs text-muted-foreground">
51 {formatDateTime(props.slot.starts_at, locale())} — {formatDateTime(props.slot.ends_at, locale())}51 {formatDateTime(props.slot.starts_at, locale())} — {formatDateTime(props.slot.ends_at, locale())}
52 </p>52 </p>
53 </div>53 </div>
src/components/attendance/attendance-report-view.tsxmodified+3 -3
@@ -57,7 +57,7 @@ export function AttendanceReportView(props: { report: AttendanceReport; compact?
57 header: () => <span title={t(status.detailKey)}>{compact() ? t(status.key).slice(0, 1) : t(status.key)}</span>,57 header: () => <span title={t(status.detailKey)}>{compact() ? t(status.key).slice(0, 1) : t(status.key)}</span>,
58 meta: { align: "right" as const, divider: index === 0 ? ("left" as const) : undefined },58 meta: { align: "right" as const, divider: index === 0 ? ("left" as const) : undefined },
59 cell: (cell) => (59 cell: (cell) => (
60- <span class={cn("mono inline-flex min-w-7 justify-center rounded-md border px-1.5 py-0.5 text-[11px] font-semibold tabular-nums", status.class)}>60+ <span class={cn("inline-flex min-w-7 justify-center rounded-md border px-1.5 py-0.5 text-[11px] font-semibold tabular-nums", status.class)}>
61 {cell.row.original.counts[status.value]}61 {cell.row.original.counts[status.value]}
62 </span>62 </span>
63 ),63 ),
@@ -65,13 +65,13 @@ export function AttendanceReportView(props: { report: AttendanceReport; compact?
65 {65 {
66 id: "total",66 id: "total",
67 header: () => <span>{compact() ? "Σ" : t("common.all")}</span>,67 header: () => <span>{compact() ? "Σ" : t("common.all")}</span>,
68- meta: { align: "right", cellClass: "mono" },68+ meta: { align: "right", cellClass: "" },
69 cell: (cell) => cell.row.original.counts.total,69 cell: (cell) => cell.row.original.counts.total,
70 },70 },
71 {71 {
72 id: "rate",72 id: "rate",
73 header: () => <span>%</span>,73 header: () => <span>%</span>,
74- meta: { align: "right", cellClass: "mono font-semibold" },74+ meta: { align: "right", cellClass: "font-semibold" },
75 cell: (cell) => percent(cell.row.original.counts.rate),75 cell: (cell) => percent(cell.row.original.counts.rate),
76 },76 },
77 ]);77 ]);
src/components/courses/course-card.tsxmodified+7 -39
@@ -2,9 +2,7 @@ import { Show } from "solid-js";
2 import { Link } from "@tanstack/solid-router";2 import { Link } from "@tanstack/solid-router";
3 import type { Course } from "@/api/client";3 import type { Course } from "@/api/client";
4 import { Badge } from "@/components/ui/badge";4 import { Badge } from "@/components/ui/badge";
5-import { Button } from "@/components/ui/button";5+import { IconChevronRight, IconUsers } from "@/components/ui/icons";
6-import { ComingSoonBadge } from "@/components/ui/coming-soon";
7-import { IconBook, IconChevronRight, IconClipboardCheck, IconClock, IconTarget, IconUsers } from "@/components/ui/icons";
8 import { personLabel } from "@/lib/person";6 import { personLabel } from "@/lib/person";
9 7
10 const courseInitials = (title: string) =>8 const courseInitials = (title: string) =>
@@ -15,17 +13,9 @@ export function CourseCard(props: {
15 /** The şubeler line under the title: "3 sections", or a dash. */13 /** The şubeler line under the title: "3 sections", or a dash. */
16 sections: string;14 sections: string;
17 enrolled?: boolean;15 enrolled?: boolean;
18- showTeacherActions?: boolean;
19 labels: {16 labels: {
20- taughtIn: string;
21- enrolled: string;
22 kind: string;17 kind: string;
23- weeklyHours: string;18+ enrolled: string;
24- competency: string;
25- attendance: string;
26- progress: string;
27- takeAttendance: string;
28- analysis: string;
29 };19 };
30 }) {20 }) {
31 // Teaching staff is per instance now, so a catalog card can only name the21 // Teaching staff is per instance now, so a catalog card can only name the
@@ -36,10 +26,10 @@ export function CourseCard(props: {
36 <Link26 <Link
37 to="/courses/$id"27 to="/courses/$id"
38 params={{ id: props.course.id }}28 params={{ id: props.course.id }}
39- class="group flex h-full flex-col gap-3 rounded-xl border border-border-line bg-surface-base p-4 outline-hidden transition-colors hover:border-primary/35 hover:bg-surface-tint focus-visible:ring-2 focus-visible:ring-ring"29+ class="group flex h-full min-h-40 flex-col gap-3 rounded-xl border border-border-line bg-surface-base p-4 outline-hidden transition-colors hover:border-primary/35 hover:bg-surface-tint focus-visible:ring-2 focus-visible:ring-ring"
40 >30 >
41 <div class="flex items-start gap-3">31 <div class="flex items-start gap-3">
42- <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-xs font-semibold text-text-subtle">32+ <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-xs font-semibold text-primary-text">
43 {courseInitials(props.course.title)}33 {courseInitials(props.course.title)}
44 </span>34 </span>
45 <div class="min-w-0 flex-1">35 <div class="min-w-0 flex-1">
@@ -54,7 +44,9 @@ export function CourseCard(props: {
54 <IconChevronRight class="mt-1 h-4 w-4 shrink-0 text-text-subtle transition-transform group-hover:translate-x-0.5 group-hover:text-text-default" />44 <IconChevronRight class="mt-1 h-4 w-4 shrink-0 text-text-subtle transition-transform group-hover:translate-x-0.5 group-hover:text-text-default" />
55 </div>45 </div>
56 46
57- <p class="line-clamp-2 min-h-8 text-sm text-text-subtle">{props.course.description || "—"}</p>47+ <Show when={props.course.description}>
48+ <p class="line-clamp-2 text-sm leading-5 text-text-subtle">{props.course.description}</p>
49+ </Show>
58 50
59 <div class="mt-auto flex items-center justify-between gap-3 border-t border-border-hairline pt-3 text-xs text-text-subtle">51 <div class="mt-auto flex items-center justify-between gap-3 border-t border-border-hairline pt-3 text-xs text-text-subtle">
60 <span class="min-w-0 flex-1 truncate">{props.sections}</span>52 <span class="min-w-0 flex-1 truncate">{props.sections}</span>
@@ -63,30 +55,6 @@ export function CourseCard(props: {
63 <span class="max-w-32 truncate">{teachers().map(personLabel).join(", ")}</span>55 <span class="max-w-32 truncate">{teachers().map(personLabel).join(", ")}</span>
64 </span>56 </span>
65 </div>57 </div>
66-
67- <div class="flex items-center gap-2 rounded-lg bg-surface-tint px-3 py-2 text-xs text-text-subtle">
68- <IconBook class="h-3.5 w-3.5 shrink-0" />
69- <span class="font-medium text-text-default">{props.labels.taughtIn}:</span>
70- <span class="tabular-nums">{props.course.class_course_count}</span>
71- </div>
72-
73- <div class="flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-hairline px-3 py-2">
74- <div class="flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-text-subtle">
75- <span class="flex items-center gap-1"><IconClock class="h-3 w-3 shrink-0" />{props.labels.weeklyHours}</span>
76- <span class="flex items-center gap-1"><IconTarget class="h-3 w-3 shrink-0" />{props.labels.competency}</span>
77- <span class="flex items-center gap-1"><IconClipboardCheck class="h-3 w-3 shrink-0" />{props.labels.attendance}</span>
78- <span>{props.labels.progress}</span>
79- </div>
80- <ComingSoonBadge />
81- </div>
82-
83- <Show when={props.showTeacherActions}>
84- <div class="flex flex-wrap items-center gap-2 border-t border-border-hairline pt-3">
85- <Button size="sm" variant="outline" disabled class="h-[26px] rounded-lg px-2.5 text-xs">{props.labels.takeAttendance}</Button>
86- <Button size="sm" variant="outline" disabled class="h-[26px] rounded-lg px-2.5 text-xs">{props.labels.analysis}</Button>
87- <ComingSoonBadge class="ml-auto" />
88- </div>
89- </Show>
90 </Link>58 </Link>
91 );59 );
92 }60 }
src/components/courses/course-notes-panel.tsxmodified+74 -41
@@ -5,12 +5,15 @@ import { formatApiError } from "@/api/client";
5 import { NoteForm } from "@/components/notes/note-form";5 import { NoteForm } from "@/components/notes/note-form";
6 import { NoteList } from "@/components/notes/note-list";6 import { NoteList } from "@/components/notes/note-list";
7 import { Alert } from "@/components/ui/alert";7 import { Alert } from "@/components/ui/alert";
8+import { Button } from "@/components/ui/button";
9+import { DataToolbar } from "@/components/ui/data-toolbar";
10+import { IconPlus } from "@/components/ui/icons";
8 import { PageSpinner } from "@/components/ui/page-spinner";11 import { PageSpinner } from "@/components/ui/page-spinner";
9 import { PaginationControls } from "@/components/ui/pagination-controls";12 import { PaginationControls } from "@/components/ui/pagination-controls";
10 import { SidePanel } from "@/components/ui/side-panel";13 import { SidePanel } from "@/components/ui/side-panel";
11 import { createFlash } from "@/lib/flash";14 import { createFlash } from "@/lib/flash";
12-import { loadListPage, totalPages as pagesOf } from "@/lib/list-page";
13 import { courseNoteFiles } from "@/lib/note-source";15 import { courseNoteFiles } from "@/lib/note-source";
16+import { matchesSearch } from "@/lib/search-text";
14 import { useT } from "@/stores/preferences-context";17 import { useT } from "@/stores/preferences-context";
15 18
16 const NOTE_PAGE_SIZE = 6;19 const NOTE_PAGE_SIZE = 6;
@@ -18,7 +21,6 @@ const NOTE_PAGE_SIZE = 6;
18 export function CourseNotesPanel(props: {21 export function CourseNotesPanel(props: {
19 courseId: string;22 courseId: string;
20 canManage: boolean;23 canManage: boolean;
21- active: boolean;
22 createOpen: boolean;24 createOpen: boolean;
23 onCreateOpenChange: (open: boolean) => void;25 onCreateOpenChange: (open: boolean) => void;
24 onCountChange: (count: number) => void;26 onCountChange: (count: number) => void;
@@ -27,24 +29,36 @@ export function CourseNotesPanel(props: {
27 const [error, setError] = createSignal("");29 const [error, setError] = createSignal("");
28 const [flash, setFlash] = createFlash();30 const [flash, setFlash] = createFlash();
29 const [page, setPage] = createSignal(0);31 const [page, setPage] = createSignal(0);
32+ const [search, setSearch] = createSignal("");
30 33
31 const [list, { refetch }] = createResource(34 const [list, { refetch }] = createResource(
32- () => (props.active ? ({ courseId: props.courseId, page: page() }) : null),35+ () => props.courseId,
33- async (key) =>36+ (courseId) => getCourseNotes(courseId, { limit: 100 }),
34- loadListPage({
35- page: key.page,
36- pageSize: NOTE_PAGE_SIZE,
37- clientMode: false,
38- fetch: (params) => getCourseNotes(key.courseId, params),
39- }),
40 );37 );
41 38
42- const total = () => list()?.total ?? 0;39+ const allNotes = () => list()?.items ?? [];
43- const pageItems = () => list()?.items ?? [];40+ const filteredNotes = createMemo(() => {
44- const totalPages = createMemo(() => pagesOf(total(), NOTE_PAGE_SIZE));41+ const query = search().trim();
42+ return query ? allNotes().filter((note) => matchesSearch(query, note.title, note.content)) : allNotes();
43+ });
44+ const total = () => filteredNotes().length;
45+ const pageItems = createMemo(() => filteredNotes().slice(page() * NOTE_PAGE_SIZE, (page() + 1) * NOTE_PAGE_SIZE));
46+ const totalPages = createMemo(() => Math.max(1, Math.ceil(total() / NOTE_PAGE_SIZE)));
45 const safePage = createMemo(() => Math.min(page(), totalPages() - 1));47 const safePage = createMemo(() => Math.min(page(), totalPages() - 1));
46 48
47- createEffect(() => props.onCountChange(total()));49+ createEffect(() => {
50+ search();
51+ setPage(0);
52+ });
53+
54+ createEffect(() => {
55+ const result = list();
56+ if (result) props.onCountChange(result.total);
57+ });
58+
59+ createEffect(() => {
60+ if (page() > totalPages() - 1) setPage(totalPages() - 1);
61+ });
48 62
49 const wrap = async (fn: () => Promise<void>, okMessage: string) => {63 const wrap = async (fn: () => Promise<void>, okMessage: string) => {
50 setError("");64 setError("");
@@ -58,7 +72,7 @@ export function CourseNotesPanel(props: {
58 };72 };
59 73
60 return (74 return (
61- <section class="min-w-0 space-y-4 rounded-xl border border-border-line bg-surface-base p-3 sm:p-4">75+ <section class="min-w-0 space-y-4">
62 <Show when={flash()}>76 <Show when={flash()}>
63 <Alert variant="success">{flash()}</Alert>77 <Alert variant="success">{flash()}</Alert>
64 </Show>78 </Show>
@@ -66,6 +80,23 @@ export function CourseNotesPanel(props: {
66 <Alert variant="destructive">{error()}</Alert>80 <Alert variant="destructive">{error()}</Alert>
67 </Show>81 </Show>
68 82
83+ <div class="space-y-3 rounded-lg border border-border-line bg-surface-base p-3">
84+ <DataToolbar
85+ inline
86+ searchValue={search()}
87+ searchPlaceholder={t("common.searchPlaceholder")}
88+ searchHint={t("search.hint.courseNotes")}
89+ onSearchInput={setSearch}
90+ actions={
91+ <Show when={props.canManage}>
92+ <Button type="button" size="sm" class="shrink-0 rounded-lg" onClick={() => props.onCreateOpenChange(true)}>
93+ <IconPlus class="h-4 w-4" />{t("courseNotes.add")}
94+ </Button>
95+ </Show>
96+ }
97+ />
98+ </div>
99+
69 <Show when={props.canManage}>100 <Show when={props.canManage}>
70 <SidePanel guardUnsaved open={props.createOpen} onOpenChange={props.onCreateOpenChange} title={t("courseNotes.new")}>101 <SidePanel guardUnsaved open={props.createOpen} onOpenChange={props.onCreateOpenChange} title={t("courseNotes.new")}>
71 <NoteForm102 <NoteForm
@@ -99,33 +130,35 @@ export function CourseNotesPanel(props: {
99 </SidePanel>130 </SidePanel>
100 </Show>131 </Show>
101 132
102- <Suspense fallback={<PageSpinner />}>133+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
103- <Show when={list.error}>134+ <Suspense fallback={<PageSpinner />}>
104- <Alert variant="destructive">{formatApiError(list.error)}</Alert>135+ <Show when={list.error}>
105- </Show>136+ <Alert variant="destructive">{formatApiError(list.error)}</Alert>
106- <Show when={list()}>137+ </Show>
107- <NoteList138+ <Show when={list()}>
108- notes={pageItems()}139+ <NoteList
109- source={courseNoteFiles}140+ notes={pageItems()}
110- canManage={props.canManage}141+ source={courseNoteFiles}
111- emptyTitle={t("courseNotes.empty")}142+ canManage={props.canManage}
112- emptyDescription={props.canManage ? t("courseNotes.emptyManageHint") : undefined}143+ emptyTitle={t("courseNotes.empty")}
113- onUpdate={(id, values) =>144+ emptyDescription={props.canManage ? t("courseNotes.emptyManageHint") : undefined}
114- wrap(async () => {145+ onUpdate={(id, values) =>
115- await patchCourseNoteById(id, values);146+ wrap(async () => {
116- }, t("common.saved"))147+ await patchCourseNoteById(id, values);
117- }148+ }, t("common.saved"))
118- onDelete={(id) =>149+ }
119- wrap(async () => {150+ onDelete={(id) =>
120- await deleteCourseNoteById(id);151+ wrap(async () => {
121- }, t("common.deleted"))152+ await deleteCourseNoteById(id);
122- }153+ }, t("common.deleted"))
123- />154+ }
124- <Show when={total() > NOTE_PAGE_SIZE}>155+ />
125- <PaginationControls page={safePage()} totalPages={totalPages()} onPageChange={setPage} />156+ <Show when={total() > NOTE_PAGE_SIZE}>
157+ <PaginationControls page={safePage()} totalPages={totalPages()} onPageChange={setPage} />
158+ </Show>
126 </Show>159 </Show>
127- </Show>160+ </Suspense>
128- </Suspense>161+ </div>
129 </section>162 </section>
130 );163 );
131 }164 }
src/components/courses/course-subjects-panel.tsxmodified+34 -11
@@ -11,20 +11,22 @@ import { Alert } from "@/components/ui/alert";
11 import { Button } from "@/components/ui/button";11 import { Button } from "@/components/ui/button";
12 import { ConfirmDialog } from "@/components/ui/confirm-dialog";12 import { ConfirmDialog } from "@/components/ui/confirm-dialog";
13 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";13 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";
14+import { DataToolbar } from "@/components/ui/data-toolbar";
14 import { EmptyState } from "@/components/ui/empty-state";15 import { EmptyState } from "@/components/ui/empty-state";
15-import { IconEdit, IconTrash } from "@/components/ui/icons";16+import { IconEdit, IconPlus, IconTrash } from "@/components/ui/icons";
16 import { Input } from "@/components/ui/input";17 import { Input } from "@/components/ui/input";
17 import { Label } from "@/components/ui/label";18 import { Label } from "@/components/ui/label";
18 import { SidePanel } from "@/components/ui/side-panel";19 import { SidePanel } from "@/components/ui/side-panel";
19 import { TableRowActions } from "@/components/ui/table-row-actions";20 import { TableRowActions } from "@/components/ui/table-row-actions";
20 import { Textarea } from "@/components/ui/textarea";21 import { Textarea } from "@/components/ui/textarea";
21 import { createFlash } from "@/lib/flash";22 import { createFlash } from "@/lib/flash";
23+import { matchesSearch } from "@/lib/search-text";
22 import { useT } from "@/stores/preferences-context";24 import { useT } from "@/stores/preferences-context";
23 25
24-export function CourseSubjectsPanel(props: { courseId: string; canManage: boolean; active: boolean; createOpen: boolean; onCreateOpenChange: (open: boolean) => void; onCountChange: (count: number) => void }) {26+export function CourseSubjectsPanel(props: { courseId: string; canManage: boolean; createOpen: boolean; onCreateOpenChange: (open: boolean) => void }) {
25 const t = useT();27 const t = useT();
26 const [subjects, { refetch }] = createResource(28 const [subjects, { refetch }] = createResource(
27- () => (props.active ? props.courseId : null),29+ () => props.courseId,
28 async (courseId) => (courseId ? (await getCourseSubjects(courseId)).items : []),30 async (courseId) => (courseId ? (await getCourseSubjects(courseId)).items : []),
29 );31 );
30 const [editing, setEditing] = createSignal<Subject | null>(null);32 const [editing, setEditing] = createSignal<Subject | null>(null);
@@ -34,6 +36,11 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea
34 const [error, setError] = createSignal("");36 const [error, setError] = createSignal("");
35 const [pending, setPending] = createSignal(false);37 const [pending, setPending] = createSignal(false);
36 const [flash, setFlash] = createFlash();38 const [flash, setFlash] = createFlash();
39+ const [search, setSearch] = createSignal("");
40+ const visibleSubjects = createMemo(() => {
41+ const query = search().trim();
42+ return query ? (subjects() ?? []).filter((subject) => matchesSearch(query, subject.name, subject.description)) : subjects() ?? [];
43+ });
37 const columns = createMemo<ColumnDef<Subject>[]>(() => [44 const columns = createMemo<ColumnDef<Subject>[]>(() => [
38 {45 {
39 accessorKey: "name",46 accessorKey: "name",
@@ -75,8 +82,6 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea
75 setDescription(subject?.description ?? "");82 setDescription(subject?.description ?? "");
76 });83 });
77 84
78- createEffect(() => props.onCountChange(subjects()?.length ?? 0));
79-
80 const openEdit = (subject: Subject) => {85 const openEdit = (subject: Subject) => {
81 setEditing(subject);86 setEditing(subject);
82 props.onCreateOpenChange(true);87 props.onCreateOpenChange(true);
@@ -108,7 +113,7 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea
108 };113 };
109 114
110 return (115 return (
111- <div class="space-y-4">116+ <div class="space-y-3">
112 <Show when={flash()}>117 <Show when={flash()}>
113 <Alert variant="success">{flash()}</Alert>118 <Alert variant="success">{flash()}</Alert>
114 </Show>119 </Show>
@@ -160,11 +165,29 @@ export function CourseSubjectsPanel(props: { courseId: string; canManage: boolea
160 165
161 {error() && <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}166 {error() && <p class="rounded-xl bg-destructive/10 px-3 py-2 text-sm text-destructive-text">{error()}</p>}
162 167
163- <Suspense fallback={<DataTableSkeleton />}>168+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs">
164- <Show when={(subjects() ?? []).length > 0} fallback={<EmptyState kind="courses" title={t("subjects.empty")} />}>169+ <DataToolbar
165- <DataTable columns={columns()} data={subjects() ?? []} filterColumn="name" enablePagination pageSize={10} />170+ inline
166- </Show>171+ searchValue={search()}
167- </Suspense>172+ searchPlaceholder={t("common.searchPlaceholder")}
173+ onSearchInput={setSearch}
174+ actions={
175+ <Show when={props.canManage}>
176+ <Button type="button" size="sm" class="rounded-lg" onClick={() => props.onCreateOpenChange(true)}>
177+ <IconPlus class="h-4 w-4" />{t("subjects.add")}
178+ </Button>
179+ </Show>
180+ }
181+ />
182+ </div>
183+
184+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
185+ <Suspense fallback={<DataTableSkeleton />}>
186+ <Show when={visibleSubjects().length > 0} fallback={<EmptyState kind="courses" title={t("subjects.empty")} />}>
187+ <DataTable columns={columns()} data={visibleSubjects()} enablePagination pageSize={10} />
188+ </Show>
189+ </Suspense>
190+ </div>
168 </div>191 </div>
169 );192 );
170 }193 }
src/components/dashboard/child-homework-panel.tsxmodified+1 -1
@@ -40,7 +40,7 @@ export function ChildHomeworkPanel(props: { childId: string; now: number; class?
40 <li class="flex items-center gap-3 py-2">40 <li class="flex items-center gap-3 py-2">
41 <span class={cn("h-2 w-2 shrink-0 rounded-full", tone === "late" ? "bg-destructive" : "bg-warning")} aria-hidden="true" />41 <span class={cn("h-2 w-2 shrink-0 rounded-full", tone === "late" ? "bg-destructive" : "bg-warning")} aria-hidden="true" />
42 <span class="min-w-0 flex-1 truncate text-sm text-text-default">{row.title}</span>42 <span class="min-w-0 flex-1 truncate text-sm text-text-default">{row.title}</span>
43- <span class="mono shrink-0 text-xs tabular-nums text-muted-foreground">{formatDateTime(row.due_at, locale())}</span>43+ <span class="shrink-0 text-xs tabular-nums text-muted-foreground">{formatDateTime(row.due_at, locale())}</span>
44 </li>44 </li>
45 )}45 )}
46 </For>46 </For>
src/components/dashboard/homework-queue-panel.tsxmodified+1 -1
@@ -67,7 +67,7 @@ export function HomeworkQueuePanel(props: { homework: Homework[]; teacherId: str
67 ].filter(Boolean).join(" · ")}67 ].filter(Boolean).join(" · ")}
68 </span>68 </span>
69 </span>69 </span>
70- <span class="mono shrink-0 text-xs tabular-nums text-muted-foreground">{formatDateTime(row.homework.due_at, locale())}</span>70+ <span class="shrink-0 text-xs tabular-nums text-muted-foreground">{formatDateTime(row.homework.due_at, locale())}</span>
71 <IconChevronRight class="h-4 w-4 shrink-0 text-muted-foreground/60" />71 <IconChevronRight class="h-4 w-4 shrink-0 text-muted-foreground/60" />
72 </Link>72 </Link>
73 </li>73 </li>
src/components/dashboard/stat-tile.tsxmodified+2 -2
@@ -8,7 +8,7 @@ export type StatTileProps = {
8 Icon: Component<{ class?: string }>;8 Icon: Component<{ class?: string }>;
9 };9 };
10 10
11-/** Figma "Web / Stat Tile": subtle label + icon on top, a large mono value, an11+/** Figma "Web / Stat Tile": subtle label + icon on top, a large value, an
12 * optional plain-text caption below. No delta arrow is drawn here — this12 * optional plain-text caption below. No delta arrow is drawn here — this
13 * project has no historical baseline to diff against, and a fabricated trend13 * project has no historical baseline to diff against, and a fabricated trend
14 * is worse than none. */14 * is worse than none. */
@@ -19,7 +19,7 @@ export function StatTile(props: StatTileProps) {
19 <p class="min-w-0 flex-1 truncate text-[13px] font-medium text-text-subtle">{props.label}</p>19 <p class="min-w-0 flex-1 truncate text-[13px] font-medium text-text-subtle">{props.label}</p>
20 <props.Icon class="h-[13px] w-[13px] shrink-0 text-text-subtle" />20 <props.Icon class="h-[13px] w-[13px] shrink-0 text-text-subtle" />
21 </div>21 </div>
22- <p class="mono tabular-nums text-[26px] font-semibold leading-8 tracking-[-0.02em] text-text-strong">{props.value}</p>22+ <p class="tabular-nums text-[26px] font-semibold leading-8 tracking-[-0.02em] text-text-strong">{props.value}</p>
23 <Show when={props.caption}>23 <Show when={props.caption}>
24 <p class="truncate text-[13px] text-text-subtle">{props.caption}</p>24 <p class="truncate text-[13px] text-text-subtle">{props.caption}</p>
25 </Show>25 </Show>
src/components/dashboard/today-lessons-panel.tsxmodified+1 -1
@@ -105,7 +105,7 @@ export function TodayLessonsPanel(props: {
105 search={(forStudent() ? { tab: "sessions" } : { tab: "sessions", rollCall: lesson.session.id }) as never}105 search={(forStudent() ? { tab: "sessions" } : { tab: "sessions", rollCall: lesson.session.id }) as never}
106 class="flex items-center gap-3 py-2.5 outline-hidden hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring"106 class="flex items-center gap-3 py-2.5 outline-hidden hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring"
107 >107 >
108- <span class="mono w-24 shrink-0 text-xs tabular-nums text-muted-foreground">108+ <span class="w-24 shrink-0 text-xs tabular-nums text-muted-foreground">
109 {time(lesson.session.starts_at)}109 {time(lesson.session.starts_at)}
110 <Show when={lesson.session.ends_at}>–{time(lesson.session.ends_at)}</Show>110 <Show when={lesson.session.ends_at}>–{time(lesson.session.ends_at)}</Show>
111 </span>111 </span>
src/components/homework/course-homework-panel.tsxmodified+1 -1
@@ -175,7 +175,7 @@ export function CourseHomeworkPanel(props: {
175 id: "due_at",175 id: "due_at",
176 accessorFn: (row) => row.due_at,176 accessorFn: (row) => row.due_at,
177 header: t("homework.dueAt"),177 header: t("homework.dueAt"),
178- meta: { cellClass: "mono text-xs text-text-subtle" },178+ meta: { cellClass: "text-xs text-text-subtle" },
179 cell: (cell) => formatDateTime(cell.row.original.due_at, locale()),179 cell: (cell) => formatDateTime(cell.row.original.due_at, locale()),
180 },180 },
181 {181 {
src/components/homework/homework-report-view.tsxmodified+1 -1
@@ -50,7 +50,7 @@ export function HomeworkReportView(props: { userId: string }) {
50 id: "due_at",50 id: "due_at",
51 accessorFn: (row) => row.due_at,51 accessorFn: (row) => row.due_at,
52 header: t("homework.dueAt"),52 header: t("homework.dueAt"),
53- meta: { cellClass: "mono whitespace-nowrap text-xs text-muted-foreground" },53+ meta: { cellClass: "whitespace-nowrap text-xs text-muted-foreground" },
54 cell: (cell) => formatDateTime(cell.row.original.due_at, locale()),54 cell: (cell) => formatDateTime(cell.row.original.due_at, locale()),
55 },55 },
56 {56 {
src/components/homework/homework-submissions-panel.tsxmodified+10 -6
@@ -40,11 +40,12 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; instanceId
40 );40 );
41 const [enrollments] = createResource(41 const [enrollments] = createResource(
42 () => props.instanceId,42 () => props.instanceId,
43- async (instanceId) => (await getInstanceEnrollments(instanceId)).items,43+ async (instanceId) => (await getInstanceEnrollments(instanceId, { limit: 200 })).items,
44 );44 );
45+ const enrollmentUsers = createMemo(() => new Map((enrollments() ?? []).map((row) => [row.user.id, row.user])));
45 const studentLabel = (userId: string) => {46 const studentLabel = (userId: string) => {
46- const user = (enrollments() ?? []).find((row) => row.user.id === userId)?.user;47+ const user = enrollmentUsers().get(userId);
47- return user?.username ?? userId;48+ return user?.display_name?.trim() || user?.username || userId;
48 };49 };
49 50
50 const openGrade = (row: HomeworkRosterEntry) => {51 const openGrade = (row: HomeworkRosterEntry) => {
@@ -85,7 +86,9 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; instanceId
85 setPending(false);86 setPending(false);
86 }87 }
87 };88 };
88- const columns = createMemo<ColumnDef<HomeworkRosterEntry>[]>(() => [89+ const columns = createMemo<ColumnDef<HomeworkRosterEntry>[]>(() => {
90+ enrollmentUsers();
91+ return [
89 {92 {
90 id: "user",93 id: "user",
91 accessorFn: (row) => studentLabel(row.user),94 accessorFn: (row) => studentLabel(row.user),
@@ -141,7 +144,8 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; instanceId
141 />144 />
142 ),145 ),
143 },146 },
144- ]);147+ ];
148+ });
145 149
146 return (150 return (
147 <section class="data-shell space-y-4 p-5">151 <section class="data-shell space-y-4 p-5">
@@ -155,7 +159,7 @@ export function HomeworkSubmissionsPanel(props: { homeworkId: string; instanceId
155 <Show when={submissions.error}><Alert variant="destructive">{formatApiError(submissions.error, locale())}</Alert></Show>159 <Show when={submissions.error}><Alert variant="destructive">{formatApiError(submissions.error, locale())}</Alert></Show>
156 <DataTable columns={columns()} data={submissions()?.items ?? []} filterColumn="user" enablePagination pageSize={10} empty={t("common.noResults")} />160 <DataTable columns={columns()} data={submissions()?.items ?? []} filterColumn="user" enablePagination pageSize={10} empty={t("common.noResults")} />
157 </Suspense>161 </Suspense>
158- <SidePanel guardUnsaved open={gradeTarget() != null} onOpenChange={(open) => !open && closeGrade()} title={t("homework.grade")} description={gradeTarget() ? studentLabel(gradeTarget()!.user) : ""}>162+ <SidePanel open={gradeTarget() != null} onOpenChange={(open) => !open && closeGrade()} title={t("homework.grade")} description={gradeTarget() ? studentLabel(gradeTarget()!.user) : ""}>
159 <form class="space-y-4" onSubmit={(event) => void saveGrade(event)}>163 <form class="space-y-4" onSubmit={(event) => void saveGrade(event)}>
160 <Show when={error()}><Alert variant="destructive">{error()}</Alert></Show>164 <Show when={error()}><Alert variant="destructive">{error()}</Alert></Show>
161 <div class="space-y-1.5">165 <div class="space-y-1.5">
src/components/insights/insight-detail.tsxmodified+6 -6
@@ -127,11 +127,11 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
127 <div class="grid gap-2 @md:grid-cols-2">127 <div class="grid gap-2 @md:grid-cols-2">
128 <div class="detail-metric-card">128 <div class="detail-metric-card">
129 <p class="text-xs text-muted-foreground">{tx("insights.computedAt")}</p>129 <p class="text-xs text-muted-foreground">{tx("insights.computedAt")}</p>
130- <p class="mono mt-1 text-sm font-medium">{formatDateTime(summary().computed_at, prefs.locale())}</p>130+ <p class="mt-1 text-sm font-medium">{formatDateTime(summary().computed_at, prefs.locale())}</p>
131 </div>131 </div>
132 <div class="detail-metric-card">132 <div class="detail-metric-card">
133 <p class="text-xs text-muted-foreground">{tx("insights.retainUntil")}</p>133 <p class="text-xs text-muted-foreground">{tx("insights.retainUntil")}</p>
134- <p class="mono mt-1 text-sm font-medium">{formatDateTime(summary().retain_until, prefs.locale())}</p>134+ <p class="mt-1 text-sm font-medium">{formatDateTime(summary().retain_until, prefs.locale())}</p>
135 </div>135 </div>
136 </div>136 </div>
137 <div class="space-y-3">137 <div class="space-y-3">
@@ -258,7 +258,7 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
258 <div class="space-y-1.5">258 <div class="space-y-1.5">
259 <div class="flex items-center justify-between text-xs">259 <div class="flex items-center justify-between text-xs">
260 <span class="text-muted-foreground">{tx("insights.accuracy")}</span>260 <span class="text-muted-foreground">{tx("insights.accuracy")}</span>
261- <span class="font-mono font-semibold">{percent(segment.accuracy)}</span>261+ <span class="font-semibold">{percent(segment.accuracy)}</span>
262 </div>262 </div>
263 <div class="h-2.5 overflow-hidden rounded-full bg-surface-fill">263 <div class="h-2.5 overflow-hidden rounded-full bg-surface-fill">
264 <div class="h-full rounded-full bg-info" style={{ width: `${clampPercent(segment.accuracy)}%` }} />264 <div class="h-full rounded-full bg-info" style={{ width: `${clampPercent(segment.accuracy)}%` }} />
@@ -266,15 +266,15 @@ export function InsightDetail(props: { insight: StudentInsight; mode?: "full" |
266 </div>266 </div>
267 <div class="grid grid-cols-3 gap-2 text-center">267 <div class="grid grid-cols-3 gap-2 text-center">
268 <div class="rounded-lg bg-surface-overlay px-2 py-2">268 <div class="rounded-lg bg-surface-overlay px-2 py-2">
269- <p class="font-mono text-sm font-semibold">{segment.n_correct}/{segment.n_answers}</p>269+ <p class="text-sm font-semibold">{segment.n_correct}/{segment.n_answers}</p>
270 <p class="text-[11px] text-muted-foreground">{tx("insights.answers")}</p>270 <p class="text-[11px] text-muted-foreground">{tx("insights.answers")}</p>
271 </div>271 </div>
272 <div class="rounded-lg bg-surface-overlay px-2 py-2">272 <div class="rounded-lg bg-surface-overlay px-2 py-2">
273- <p class="font-mono text-sm font-semibold">{percent(segment.overall_accuracy)}</p>273+ <p class="text-sm font-semibold">{percent(segment.overall_accuracy)}</p>
274 <p class="text-[11px] text-muted-foreground">{tx("insights.overall")}</p>274 <p class="text-[11px] text-muted-foreground">{tx("insights.overall")}</p>
275 </div>275 </div>
276 <div class="rounded-lg bg-surface-overlay px-2 py-2">276 <div class="rounded-lg bg-surface-overlay px-2 py-2">
277- <p class={cn("font-mono text-sm font-semibold", segment.contrast < 0 ? "text-destructive-text" : "text-success-text")}>277+ <p class={cn("text-sm font-semibold", segment.contrast < 0 ? "text-destructive-text" : "text-success-text")}>
278 {segment.contrast > 0 ? "+" : ""}{percent(segment.contrast)}278 {segment.contrast > 0 ? "+" : ""}{percent(segment.contrast)}
279 </p>279 </p>
280 <p class="text-[11px] text-muted-foreground">{tx("insights.contrast")}</p>280 <p class="text-[11px] text-muted-foreground">{tx("insights.contrast")}</p>
src/components/insights/insight-module-views.tsxmodified+4 -4
@@ -86,7 +86,7 @@ export function LabeledRow(props: { label: string; value: string | null; mono?:
86 <dd86 <dd
87 class={cn(87 class={cn(
88 "min-w-0 text-right font-medium text-foreground",88 "min-w-0 text-right font-medium text-foreground",
89- props.mono && "font-mono",89+ props.mono && "",
90 )}90 )}
91 >91 >
92 {props.value ?? detailText("detail.value.missing")}92 {props.value ?? detailText("detail.value.missing")}
@@ -111,7 +111,7 @@ export function NoteLine(props: { label?: string; children: JSX.Element }) {
111 function StatCell(props: { label: string; value: string | null }) {111 function StatCell(props: { label: string; value: string | null }) {
112 return (112 return (
113 <div class="rounded-lg bg-surface-overlay px-2.5 py-2 text-center">113 <div class="rounded-lg bg-surface-overlay px-2.5 py-2 text-center">
114- <p class="font-mono text-sm font-semibold text-foreground">114+ <p class="text-sm font-semibold text-foreground">
115 {props.value ?? detailText("detail.value.missing")}115 {props.value ?? detailText("detail.value.missing")}
116 </p>116 </p>
117 <p class="mt-0.5 text-[11px] text-muted-foreground">{props.label}</p>117 <p class="mt-0.5 text-[11px] text-muted-foreground">{props.label}</p>
@@ -417,8 +417,8 @@ function MarksView(props: { value: Rec; courseTitle: CourseTitle }) {
417 }}417 }}
418 >418 >
419 <TableCell class="font-medium text-text-strong">{str(obj(stat).course_title) ?? courseLabel(id, props.courseTitle, index())}</TableCell>419 <TableCell class="font-medium text-text-strong">{str(obj(stat).course_title) ?? courseLabel(id, props.courseTitle, index())}</TableCell>
420- <TableCell class="text-center font-mono">{nText(obj(stat).average) ?? "—"}</TableCell>420+ <TableCell class="text-center">{nText(obj(stat).average) ?? "—"}</TableCell>
421- <TableCell class="text-center font-mono">{String(num(obj(stat).n_marks) ?? 0)}</TableCell>421+ <TableCell class="text-center">{String(num(obj(stat).n_marks) ?? 0)}</TableCell>
422 <TableCell class="text-center"><Badge variant={bandVariant(stat)} class="rounded-full">{bandLabel(stat)}</Badge></TableCell>422 <TableCell class="text-center"><Badge variant={bandVariant(stat)} class="rounded-full">{bandLabel(stat)}</Badge></TableCell>
423 <TableCell class="text-center text-xs text-muted-foreground">{trendLabel(stat)}</TableCell>423 <TableCell class="text-center text-xs text-muted-foreground">{trendLabel(stat)}</TableCell>
424 </TableRow>424 </TableRow>
src/components/insights/insight-overview.tsxmodified+1 -1
@@ -15,7 +15,7 @@ export function InsightOverview(props: { overview: Overview }) {
15 const tile = (label: string, value: string, hint: string, tone?: "warn") => (15 const tile = (label: string, value: string, hint: string, tone?: "warn") => (
16 <div class="rounded-xl border border-border-line bg-surface-base px-4 py-3">16 <div class="rounded-xl border border-border-line bg-surface-base px-4 py-3">
17 <p class="text-xs font-medium text-muted-foreground">{label}</p>17 <p class="text-xs font-medium text-muted-foreground">{label}</p>
18- <p class={cn("mono mt-1 text-2xl font-semibold tabular-nums text-text-strong", tone === "warn" && "text-warning-text")}>{value}</p>18+ <p class={cn("mt-1 text-2xl font-semibold tabular-nums text-text-strong", tone === "warn" && "text-warning-text")}>{value}</p>
19 <p class="mt-0.5 text-xs text-muted-foreground">{hint}</p>19 <p class="mt-0.5 text-xs text-muted-foreground">{hint}</p>
20 </div>20 </div>
21 );21 );
src/components/insights/insight-run-report.tsxmodified+8 -8
@@ -123,7 +123,7 @@ function ReportDocument(props: {
123 {(metric) => (123 {(metric) => (
124 <div class="detail-metric-card">124 <div class="detail-metric-card">
125 <dt class="text-xs text-muted-foreground">{metric.label}</dt>125 <dt class="text-xs text-muted-foreground">{metric.label}</dt>
126- <dd class="mono mt-1 text-sm font-medium">{metric.value}</dd>126+ <dd class="mt-1 text-sm font-medium">{metric.value}</dd>
127 </div>127 </div>
128 )}128 )}
129 </For>129 </For>
@@ -182,9 +182,9 @@ function ReportDocument(props: {
182 <p class="text-xs text-muted-foreground">{tx("modulesEmpty")}</p>182 <p class="text-xs text-muted-foreground">{tx("modulesEmpty")}</p>
183 </Show>183 </Show>
184 <p class="text-sm">184 <p class="text-sm">
185- {tx("attention")}: <span class="mono tabular-nums">{props.model.totals.attention}</span> · {tx("cards")}:{" "}185+ {tx("attention")}: <span class="tabular-nums">{props.model.totals.attention}</span> · {tx("cards")}:{" "}
186- <span class="mono tabular-nums">{props.model.totals.cards}</span> · {tx("segments")}:{" "}186+ <span class="tabular-nums">{props.model.totals.cards}</span> · {tx("segments")}:{" "}
187- <span class="mono tabular-nums">{props.model.totals.segments}</span>187+ <span class="tabular-nums">{props.model.totals.segments}</span>
188 </p>188 </p>
189 <Show when={props.model.roster_error}>189 <Show when={props.model.roster_error}>
190 {(message) => <p class="text-xs text-destructive-text">{tx("rosterFailed", { message: message() })}</p>}190 {(message) => <p class="text-xs text-destructive-text">{tx("rosterFailed", { message: message() })}</p>}
@@ -229,10 +229,10 @@ function ReportDocument(props: {
229 <td class="py-2 pr-3 text-muted-foreground">229 <td class="py-2 pr-3 text-muted-foreground">
230 {student.confidence == null ? tx("noData") : confidenceText(prefs.locale(), student.confidence)}230 {student.confidence == null ? tx("noData") : confidenceText(prefs.locale(), student.confidence)}
231 </td>231 </td>
232- <td class="mono py-2 pr-3 text-right tabular-nums">{student.attention}</td>232+ <td class="py-2 pr-3 text-right tabular-nums">{student.attention}</td>
233- <td class="mono py-2 pr-3 text-right tabular-nums">{student.cards}</td>233+ <td class="py-2 pr-3 text-right tabular-nums">{student.cards}</td>
234- <td class="mono py-2 pr-3 tabular-nums">{studentMarksText(prefs.locale(), student)}</td>234+ <td class="py-2 pr-3 tabular-nums">{studentMarksText(prefs.locale(), student)}</td>
235- <td class="mono py-2 pr-3 tabular-nums">{studentAttendanceText(prefs.locale(), student)}</td>235+ <td class="py-2 pr-3 tabular-nums">{studentAttendanceText(prefs.locale(), student)}</td>
236 <td class="py-2 pr-3 text-muted-foreground">{formatDateTime(student.computed_at, prefs.locale())}</td>236 <td class="py-2 pr-3 text-muted-foreground">{formatDateTime(student.computed_at, prefs.locale())}</td>
237 <Show when={props.onOpenStudent}>237 <Show when={props.onOpenStudent}>
238 <td class="py-2">238 <td class="py-2">
src/components/insights/insight-runs-table.tsxmodified+4 -4
@@ -57,7 +57,7 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) {
57 const run = cell.row.original;57 const run = cell.row.original;
58 return (58 return (
59 <div class="text-center">59 <div class="text-center">
60- <p class="mono font-medium tabular-nums">{run.students_ok}/{run.students_total}</p>60+ <p class="font-medium tabular-nums">{run.students_ok}/{run.students_total}</p>
61 <p class="text-[11px] text-muted-foreground">{run.students_failed} / {run.students_skipped}</p>61 <p class="text-[11px] text-muted-foreground">{run.students_failed} / {run.students_skipped}</p>
62 </div>62 </div>
63 );63 );
@@ -66,13 +66,13 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) {
66 {66 {
67 accessorKey: "rows_written",67 accessorKey: "rows_written",
68 header: tx("insights.written"),68 header: tx("insights.written"),
69- meta: { align: "center", cellClass: "mono tabular-nums" },69+ meta: { align: "center", cellClass: "tabular-nums" },
70 },70 },
71 {71 {
72 accessorKey: "duration_ms",72 accessorKey: "duration_ms",
73 header: tx("insights.duration"),73 header: tx("insights.duration"),
74 meta: { align: "center" },74 meta: { align: "center" },
75- cell: (cell) => <span class="mono tabular-nums">{formatDurationMinutes(cell.row.original.duration_ms, prefs.locale())}</span>,75+ cell: (cell) => <span class="tabular-nums">{formatDurationMinutes(cell.row.original.duration_ms, prefs.locale())}</span>,
76 },76 },
77 {77 {
78 id: "issues",78 id: "issues",
@@ -135,7 +135,7 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) {
135 columns={columns()}135 columns={columns()}
136 data={props.runs}136 data={props.runs}
137 empty={tx("insights.emptyRuns")}137 empty={tx("insights.emptyRuns")}
138- tableClass="insight-grid-table min-w-[980px]"138+ tableClass="insight-grid-table min-w-[56rem]"
139 enablePagination139 enablePagination
140 pageSize={10}140 pageSize={10}
141 storageKey="insight-runs"141 storageKey="insight-runs"
src/components/insights/insight-student-analysis-tabs.tsxmodified+2 -2
@@ -103,11 +103,11 @@ function StudyChart(props: { value: unknown; t: (key: string) => string }) {
103 <dl class="grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-border-line bg-border-line lg:grid-cols-1">103 <dl class="grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-border-line bg-border-line lg:grid-cols-1">
104 <div class="bg-surface-base p-4">104 <div class="bg-surface-base p-4">
105 <dt class="text-xs text-muted-foreground">{props.t("insights.analysis.activeDays")}</dt>105 <dt class="text-xs text-muted-foreground">{props.t("insights.analysis.activeDays")}</dt>
106- <dd class="mt-1 font-mono text-2xl font-semibold tabular-nums text-text-strong">{String(num(recent().active_days) ?? "—")}</dd>106+ <dd class="mt-1 text-2xl font-semibold tabular-nums text-text-strong">{String(num(recent().active_days) ?? "—")}</dd>
107 </div>107 </div>
108 <div class="bg-surface-base p-4">108 <div class="bg-surface-base p-4">
109 <dt class="text-xs text-muted-foreground">{props.t("insights.analysis.sessions")}</dt>109 <dt class="text-xs text-muted-foreground">{props.t("insights.analysis.sessions")}</dt>
110- <dd class="mt-1 font-mono text-2xl font-semibold tabular-nums text-text-strong">{String(num(recent().n_stints) ?? "—")}</dd>110+ <dd class="mt-1 text-2xl font-semibold tabular-nums text-text-strong">{String(num(recent().n_stints) ?? "—")}</dd>
111 </div>111 </div>
112 </dl>112 </dl>
113 </div>113 </div>
src/components/insights/insight-students-table.tsxmodified+21 -30
@@ -1,9 +1,9 @@
1-import { For, createMemo, createSignal, type JSX } from "solid-js";1+import { createMemo, createSignal, type JSX } from "solid-js";
2 import { Link, useNavigate } from "@tanstack/solid-router";2 import { Link, useNavigate } from "@tanstack/solid-router";
3 import type { ColumnDef } from "@tanstack/solid-table";3 import type { ColumnDef } from "@tanstack/solid-table";
4 import { Badge } from "@/components/ui/badge";4 import { Badge } from "@/components/ui/badge";
5-import { Button } from "@/components/ui/button";
6 import { DataTable } from "@/components/ui/data-table";5 import { DataTable } from "@/components/ui/data-table";
6+import { DropdownSelect } from "@/components/ui/select";
7 import { IconEye } from "@/components/ui/icons";7 import { IconEye } from "@/components/ui/icons";
8 import { TableRowActions } from "@/components/ui/table-row-actions";8 import { TableRowActions } from "@/components/ui/table-row-actions";
9 import { runReportText } from "@/i18n/insights-run-report";9 import { runReportText } from "@/i18n/insights-run-report";
@@ -102,7 +102,7 @@ export function InsightStudentsTable(props: {
102 header: rt("attention"),102 header: rt("attention"),
103 meta: { align: "center" },103 meta: { align: "center" },
104 cell: (cell) => (104 cell: (cell) => (
105- <span class={cn("mono tabular-nums", cell.row.original.attention > 0 ? "font-semibold text-warning-text" : muted)}>105+ <span class={cn("tabular-nums", cell.row.original.attention > 0 ? "font-semibold text-warning-text" : muted)}>
106 {loaded(cell.row.original) || cell.row.original.state === "no_summary" ? cell.row.original.attention : "—"}106 {loaded(cell.row.original) || cell.row.original.state === "no_summary" ? cell.row.original.attention : "—"}
107 </span>107 </span>
108 ),108 ),
@@ -112,14 +112,14 @@ export function InsightStudentsTable(props: {
112 accessorFn: (row) => row.cards,112 accessorFn: (row) => row.cards,
113 header: rt("cards"),113 header: rt("cards"),
114 meta: { align: "center" },114 meta: { align: "center" },
115- cell: (cell) => <span class="mono tabular-nums">{cell.row.original.state === "not_loaded" ? "—" : cell.row.original.cards}</span>,115+ cell: (cell) => <span class="tabular-nums">{cell.row.original.state === "not_loaded" ? "—" : cell.row.original.cards}</span>,
116 },116 },
117 {117 {
118 id: "marks",118 id: "marks",
119 accessorFn: (row) => row.marks.average ?? -1,119 accessorFn: (row) => row.marks.average ?? -1,
120 header: rt("marksAverage"),120 header: rt("marksAverage"),
121 meta: { align: "center" },121 meta: { align: "center" },
122- cell: (cell) => <span class={cn("mono tabular-nums", !loaded(cell.row.original) && muted)}>{studentMarksText(locale(), cell.row.original)}</span>,122+ cell: (cell) => <span class={cn("tabular-nums", !loaded(cell.row.original) && muted)}>{studentMarksText(locale(), cell.row.original)}</span>,
123 },123 },
124 {124 {
125 id: "attendance",125 id: "attendance",
@@ -129,7 +129,7 @@ export function InsightStudentsTable(props: {
129 cell: (cell) => {129 cell: (cell) => {
130 const row = cell.row.original;130 const row = cell.row.original;
131 const low = loaded(row) && row.attendance.observed > 0 && (row.attendance.rate ?? 1) < 0.85;131 const low = loaded(row) && row.attendance.observed > 0 && (row.attendance.rate ?? 1) < 0.85;
132- return <span class={cn("mono tabular-nums", low && "font-semibold text-warning-text", !loaded(row) && muted)}>{studentAttendanceText(locale(), row)}</span>;132+ return <span class={cn("tabular-nums", low && "font-semibold text-warning-text", !loaded(row) && muted)}>{studentAttendanceText(locale(), row)}</span>;
133 },133 },
134 },134 },
135 {135 {
@@ -137,7 +137,7 @@ export function InsightStudentsTable(props: {
137 accessorFn: (row) => row.study.stints,137 accessorFn: (row) => row.study.stints,
138 header: t("insights.studyStints"),138 header: t("insights.studyStints"),
139 meta: { align: "center" },139 meta: { align: "center" },
140- cell: (cell) => <span class={cn("mono tabular-nums", !loaded(cell.row.original) && muted)}>{loaded(cell.row.original) ? cell.row.original.study.stints : "—"}</span>,140+ cell: (cell) => <span class={cn("tabular-nums", !loaded(cell.row.original) && muted)}>{loaded(cell.row.original) ? cell.row.original.study.stints : "—"}</span>,
141 },141 },
142 {142 {
143 id: "confidence",143 id: "confidence",
@@ -150,7 +150,7 @@ export function InsightStudentsTable(props: {
150 id: "computedAt",150 id: "computedAt",
151 accessorFn: (row) => row.computed_at ?? 0,151 accessorFn: (row) => row.computed_at ?? 0,
152 header: t("insights.computedAt"),152 header: t("insights.computedAt"),
153- meta: { align: "center", cellClass: "mono text-xs text-muted-foreground whitespace-nowrap" },153+ meta: { align: "center", cellClass: "text-xs text-muted-foreground whitespace-nowrap" },
154 cell: (cell) => calculatedDate(cell.row.original.computed_at),154 cell: (cell) => calculatedDate(cell.row.original.computed_at),
155 },155 },
156 {156 {
@@ -175,11 +175,11 @@ export function InsightStudentsTable(props: {
175 },175 },
176 ]);176 ]);
177 177
178- const filters: { id: Filter; label: string }[] = [178+ const filters = createMemo(() => [
179- { id: "all", label: t("insights.filter.all") },179+ { value: "all" as Filter, label: `${t("insights.filter.all")} (${counts().all})` },
180- { id: "attention", label: t("insights.filter.attention") },180+ { value: "attention" as Filter, label: `${t("insights.filter.attention")} (${counts().attention})` },
181- { id: "none", label: t("insights.filter.noAnalysis") },181+ { value: "none" as Filter, label: `${t("insights.filter.noAnalysis")} (${counts().none})` },
182- ];182+ ]);
183 183
184 return (184 return (
185 <DataTable185 <DataTable
@@ -195,26 +195,17 @@ export function InsightStudentsTable(props: {
195 filterHint={t("search.hint.people")}195 filterHint={t("search.hint.people")}
196 searchPredicate={(row, query) => matchesSearch(query, row.name)}196 searchPredicate={(row, query) => matchesSearch(query, row.name)}
197 filters={197 filters={
198- <div class="flex flex-wrap items-center gap-1.5" role="group" aria-label={t("insights.filter.all")}>198+ <DropdownSelect
199- <For each={filters}>199+ options={filters()}
200- {(item) => (200+ value={filter()}
201- <Button201+ onChange={setFilter}
202- type="button"202+ labelPrefix={t("common.filter")}
203- size="sm"203+ class="min-w-44"
204- variant={filter() === item.id ? "default" : "outline"}204+ />
205- aria-pressed={filter() === item.id}
206- onClick={() => setFilter(item.id)}
207- >
208- {item.label}
209- <span class="mono ml-1 tabular-nums opacity-70">{counts()[item.id]}</span>
210- </Button>
211- )}
212- </For>
213- </div>
214 }205 }
215 enablePagination206 enablePagination
216 pageSize={10}207 pageSize={10}
217- tableClass="insight-grid-table min-w-[70rem]"208+ tableClass="insight-grid-table min-w-[60rem]"
218 storageKey="insight-students-v2"209 storageKey="insight-students-v2"
219 />210 />
220 );211 );
src/components/layout/app-shell.tsxmodified+3 -3
@@ -13,7 +13,7 @@ import { ShellMessagesButton } from "@/components/layout/shell-messages-button";
13 import { MobileNavSheet } from "@/components/layout/mobile-nav-sheet";13 import { MobileNavSheet } from "@/components/layout/mobile-nav-sheet";
14 import { SideNav } from "@/components/layout/side-nav";14 import { SideNav } from "@/components/layout/side-nav";
15 import { SidebarAccount } from "@/components/layout/sidebar-account";15 import { SidebarAccount } from "@/components/layout/sidebar-account";
16-import { IconChevronLeft, IconSparkles } from "@/components/ui/icons";16+import { IconPanelLeft, IconSparkles } from "@/components/ui/icons";
17 import { Toaster } from "@/components/ui/toast";17 import { Toaster } from "@/components/ui/toast";
18 import { useAuth } from "@/stores/auth-context";18 import { useAuth } from "@/stores/auth-context";
19 import { useModules } from "@/stores/modules-context";19 import { useModules } from "@/stores/modules-context";
@@ -107,13 +107,13 @@ export function AppShell(props: ParentProps) {
107 meets the header's bottom border. */}107 meets the header's bottom border. */}
108 <button108 <button
109 type="button"109 type="button"
110- class="absolute right-0 top-[45px] z-10 flex h-6 w-6 -translate-y-1/2 translate-x-1/2 items-center justify-center rounded-full border border-border bg-background text-muted-foreground shadow-xs outline-hidden transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"110+ class="absolute right-0 top-[45px] z-10 flex h-7 w-7 -translate-y-1/2 translate-x-1/2 items-center justify-center rounded-md border border-border bg-background text-muted-foreground shadow-xs outline-hidden transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
111 aria-label={collapsed() ? t("nav.expand") : t("nav.collapse")}111 aria-label={collapsed() ? t("nav.expand") : t("nav.collapse")}
112 aria-expanded={!collapsed()}112 aria-expanded={!collapsed()}
113 title={collapsed() ? t("nav.expand") : t("nav.collapse")}113 title={collapsed() ? t("nav.expand") : t("nav.collapse")}
114 onClick={() => prefs.toggleSidebar()}114 onClick={() => prefs.toggleSidebar()}
115 >115 >
116- <IconChevronLeft class={cn("h-3.5 w-3.5 transition-transform duration-200", collapsed() && "rotate-180")} />116+ <IconPanelLeft class={cn("h-4 w-4 transition-transform duration-200", collapsed() && "rotate-180")} />
117 </button>117 </button>
118 118
119 </aside>119 </aside>
src/components/marks/karne-view.tsxmodified+2 -2
@@ -29,12 +29,12 @@ export function KarneView(props: {
29 29
30 const columns = createMemo<ColumnDef<KarneInstance>[]>(() => [30 const columns = createMemo<ColumnDef<KarneInstance>[]>(() => [
31 { accessorKey: "course", header: t("nav.courses"), meta: { cellClass: "font-medium" } },31 { accessorKey: "course", header: t("nav.courses"), meta: { cellClass: "font-medium" } },
32- { accessorKey: "ders_saati", header: t("instances.dersSaati"), meta: { cellClass: "mono tabular-nums text-muted-foreground" } },32+ { accessorKey: "ders_saati", header: t("instances.dersSaati"), meta: { cellClass: "tabular-nums text-muted-foreground" } },
33 {33 {
34 id: "average",34 id: "average",
35 accessorFn: (line) => formatAverage(line.average),35 accessorFn: (line) => formatAverage(line.average),
36 header: t("marks.courseAvg"),36 header: t("marks.courseAvg"),
37- meta: { cellClass: "mono font-semibold tabular-nums" },37+ meta: { cellClass: "font-semibold tabular-nums" },
38 },38 },
39 {39 {
40 id: "band",40 id: "band",
src/components/marks/marks-report-view.tsxmodified+3 -3
@@ -58,7 +58,7 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean
58 <div class="h-1.5 w-12 min-w-8 shrink overflow-hidden rounded-full bg-muted">58 <div class="h-1.5 w-12 min-w-8 shrink overflow-hidden rounded-full bg-muted">
59 <div class="h-full rounded-full bg-primary" style={{ width: scoreWidth(cell.row.original.average) }} />59 <div class="h-full rounded-full bg-primary" style={{ width: scoreWidth(cell.row.original.average) }} />
60 </div>60 </div>
61- <span class="mono shrink-0 text-xs font-semibold tabular-nums">{markWithGrade(cell.row.original.average, cell.row.original.average_grade)}</span>61+ <span class="shrink-0 text-xs font-semibold tabular-nums">{markWithGrade(cell.row.original.average, cell.row.original.average_grade)}</span>
62 </div>62 </div>
63 ),63 ),
64 },64 },
@@ -100,13 +100,13 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean
100 {100 {
101 id: "weight",101 id: "weight",
102 header: t("marks.weight"),102 header: t("marks.weight"),
103- meta: { align: "right", divider: "left", cellClass: "mono" },103+ meta: { align: "right", divider: "left", cellClass: "" },
104 cell: (cell) => examWeight(cell.row.original, settings()?.exam_kinds) ?? "—",104 cell: (cell) => examWeight(cell.row.original, settings()?.exam_kinds) ?? "—",
105 },105 },
106 {106 {
107 accessorKey: "mark",107 accessorKey: "mark",
108 header: t("marks.mark"),108 header: t("marks.mark"),
109- meta: { align: "right", cellClass: "mono font-semibold" },109+ meta: { align: "right", cellClass: "font-semibold" },
110 cell: (cell) => markWithGrade(cell.row.original.mark, cell.row.original.grade),110 cell: (cell) => markWithGrade(cell.row.original.mark, cell.row.original.grade),
111 },111 },
112 ]);112 ]);
src/components/meals/meal-menu-card.tsxmodified+3 -3
@@ -31,7 +31,7 @@ export function MealMenuCard(props: {
31 <div class="flex items-start justify-between gap-3">31 <div class="flex items-start justify-between gap-3">
32 <div class="flex min-w-0 items-center gap-3">32 <div class="flex min-w-0 items-center gap-3">
33 <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border-hairline bg-surface-tint"><IconUtensils class="h-5 w-5" /></span>33 <span class="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border-hairline bg-surface-tint"><IconUtensils class="h-5 w-5" /></span>
34- <div class="min-w-0"><h2 class="truncate font-semibold text-text-strong">{props.menu.slot}</h2><time class="mono text-xs text-text-subtle" datetime={props.menu.date}>{props.menu.date}</time></div>34+ <div class="min-w-0"><h2 class="truncate font-semibold text-text-strong">{props.menu.slot}</h2><time class="text-xs text-text-subtle" datetime={props.menu.date}>{props.menu.date}</time></div>
35 </div>35 </div>
36 <span class="shrink-0 font-semibold tabular-nums">{formatTry(total(), props.locale)}</span>36 <span class="shrink-0 font-semibold tabular-nums">{formatTry(total(), props.locale)}</span>
37 </div>37 </div>
@@ -46,7 +46,7 @@ export function MealMenuCard(props: {
46 <div class="mt-3 space-y-1">46 <div class="mt-3 space-y-1">
47 <div class="flex justify-between text-xs text-text-subtle">47 <div class="flex justify-between text-xs text-text-subtle">
48 <span>{props.labels.reservations}: {props.reservationCount}</span>48 <span>{props.labels.reservations}: {props.reservationCount}</span>
49- <span class="mono">%{occupancyPct()}</span>49+ <span>%{occupancyPct()}</span>
50 </div>50 </div>
51 <div class="h-1.5 overflow-hidden rounded-full bg-surface-fill">51 <div class="h-1.5 overflow-hidden rounded-full bg-surface-fill">
52 <div class="h-full rounded-full bg-success" style={{ width: `${occupancyPct()}%` }} />52 <div class="h-full rounded-full bg-success" style={{ width: `${occupancyPct()}%` }} />
@@ -55,7 +55,7 @@ export function MealMenuCard(props: {
55 </Show>55 </Show>
56 <div class="mt-auto flex justify-between border-t border-border-hairline pt-3 text-xs text-text-subtle">56 <div class="mt-auto flex justify-between border-t border-border-hairline pt-3 text-xs text-text-subtle">
57 <span>{props.menu.dishes.length} {props.labels.dishes}</span>57 <span>{props.menu.dishes.length} {props.labels.dishes}</span>
58- <span>{props.labels.capacity}: <span class="mono">{props.menu.capacity ?? "∞"}</span></span>58+ <span>{props.labels.capacity}: <span>{props.menu.capacity ?? "∞"}</span></span>
59 </div>59 </div>
60 <div class="mt-2 flex items-center justify-between text-xs text-text-subtle">60 <div class="mt-2 flex items-center justify-between text-xs text-text-subtle">
61 <span>{props.labels.topPick}</span>61 <span>{props.labels.topPick}</span>
src/components/notes/note-reader-panel.tsxmodified+0 -6
@@ -2,8 +2,6 @@ import { Show } from "solid-js";
2 import type { Note } from "@/api/client";2 import type { Note } from "@/api/client";
3 import type { NoteFileSource } from "@/lib/note-source";3 import type { NoteFileSource } from "@/lib/note-source";
4 import { NoteFilesPanel } from "@/components/notes/note-files-panel";4 import { NoteFilesPanel } from "@/components/notes/note-files-panel";
5-import { RagOutputsPanel } from "@/components/notes/rag-outputs-panel";
6-import { PodcastPanel } from "@/components/notes/podcast-panel";
7 import { SidePanel } from "@/components/ui/side-panel";5 import { SidePanel } from "@/components/ui/side-panel";
8 import { toRichTextHtml } from "@/lib/rich-text";6 import { toRichTextHtml } from "@/lib/rich-text";
9 import { useT } from "@/stores/preferences-context";7 import { useT } from "@/stores/preferences-context";
@@ -38,10 +36,6 @@ export function NoteReaderPanel(props: {
38 </Show>36 </Show>
39 </article>37 </article>
40 <NoteFilesPanel noteId={n().id} source={props.source} canManage={props.canManage} active={props.open} />38 <NoteFilesPanel noteId={n().id} source={props.source} canManage={props.canManage} active={props.open} />
41- <Show when={props.source.listRagOutputs}>
42- <RagOutputsPanel noteId={n().id} source={props.source} canManage={props.canManage} active={props.open} noteTitle={n().title} />
43- <PodcastPanel noteId={n().id} noteTitle={n().title} active={props.open} />
44- </Show>
45 </div>39 </div>
46 )}40 )}
47 </Show>41 </Show>
src/components/notes/podcast-history.test.tsxmodified+23 -4
@@ -12,8 +12,8 @@ const podcastApi = vi.hoisted(() => ({
12 12
13 vi.mock("@/api/podcast", () => podcastApi);13 vi.mock("@/api/podcast", () => podcastApi);
14 14
15-function page(items: PodcastJobSummary[]) {15+function page(items: PodcastJobSummary[], total = items.length, offset = 0) {
16- return { items, total: items.length, limit: 10, offset: 0 };16+ return { items, total, limit: 10, offset };
17 }17 }
18 18
19 function job(over: Partial<PodcastJobSummary>): PodcastJobSummary {19 function job(over: Partial<PodcastJobSummary>): PodcastJobSummary {
@@ -105,7 +105,7 @@ describe("PodcastHistory", () => {
105 renderHistory("note-1");105 renderHistory("note-1");
106 106
107 await waitFor(() =>107 await waitFor(() =>
108- expect(podcastApi.listPodcastJobs).toHaveBeenCalledWith({ limit: 10, sourceId: "note-1" }),108+ expect(podcastApi.listPodcastJobs).toHaveBeenCalledWith({ limit: 10, offset: 0, sourceId: "note-1" }),
109 );109 );
110 expect(screen.queryByRole("button", { name: "Tümü" })).toBeNull();110 expect(screen.queryByRole("button", { name: "Tümü" })).toBeNull();
111 expect(screen.queryByRole("button", { name: "Bu not" })).toBeNull();111 expect(screen.queryByRole("button", { name: "Bu not" })).toBeNull();
@@ -117,7 +117,7 @@ describe("PodcastHistory", () => {
117 renderHistory("note-1");117 renderHistory("note-1");
118 await waitFor(() => expect(podcastApi.listPodcastJobs).toHaveBeenCalledTimes(1));118 await waitFor(() => expect(podcastApi.listPodcastJobs).toHaveBeenCalledTimes(1));
119 119
120- expect(podcastApi.listPodcastJobs).toHaveBeenLastCalledWith({ limit: 10, sourceId: "note-1" });120+ expect(podcastApi.listPodcastJobs).toHaveBeenLastCalledWith({ limit: 10, offset: 0, sourceId: "note-1" });
121 expect(screen.queryByText("Tüm notlarınızdaki bölümler gösteriliyor.")).toBeNull();121 expect(screen.queryByText("Tüm notlarınızdaki bölümler gösteriliyor.")).toBeNull();
122 });122 });
123 123
@@ -162,4 +162,23 @@ describe("PodcastHistory", () => {
162 setKey("job-2");162 setKey("job-2");
163 await waitFor(() => expect(podcastApi.listPodcastJobs).toHaveBeenCalledTimes(2));163 await waitFor(() => expect(podcastApi.listPodcastJobs).toHaveBeenCalledTimes(2));
164 });164 });
165+
166+ it("paginates the selected note's podcast history", async () => {
167+ const first = job({ job_id: "job-1", source_title: "İlk bölüm" });
168+ const second = job({ job_id: "job-2", source_title: "İkinci bölüm" });
169+ podcastApi.listPodcastJobs
170+ .mockResolvedValueOnce(page([first], 11, 0))
171+ .mockResolvedValueOnce(page([second], 11, 10));
172+
173+ renderHistory("note-1");
174+
175+ await waitFor(() => expect(screen.getByText("İlk bölüm")).toBeTruthy());
176+ expect(screen.getByText("1 / 2")).toBeTruthy();
177+
178+ fireEvent.click(screen.getByRole("button", { name: "Sonraki" }));
179+
180+ await waitFor(() => expect(screen.getByText("İkinci bölüm")).toBeTruthy());
181+ expect(podcastApi.listPodcastJobs).toHaveBeenLastCalledWith({ limit: 10, offset: 10, sourceId: "note-1" });
182+ expect(screen.getByText("2 / 2")).toBeTruthy();
183+ });
165 });184 });
src/components/notes/podcast-history.tsxmodified+20 -3
@@ -1,4 +1,4 @@
1-import { For, Show, Suspense, createEffect, createSignal } from "solid-js";1+import { For, Show, Suspense, createEffect, createMemo, createSignal } from "solid-js";
2 import { createResource } from "@/lib/create-resource";2 import { createResource } from "@/lib/create-resource";
3 import { formatApiError } from "@/api/client";3 import { formatApiError } from "@/api/client";
4 import { listPodcastJobs, podcastAudioUrl } from "@/api/podcast";4 import { listPodcastJobs, podcastAudioUrl } from "@/api/podcast";
@@ -7,6 +7,7 @@ import { Badge } from "@/components/ui/badge";
7 import { Button, buttonVariants } from "@/components/ui/button";7 import { Button, buttonVariants } from "@/components/ui/button";
8 import { EmptyInline } from "@/components/ui/empty-inline";8 import { EmptyInline } from "@/components/ui/empty-inline";
9 import { PageSpinner } from "@/components/ui/page-spinner";9 import { PageSpinner } from "@/components/ui/page-spinner";
10+import { PaginationControls } from "@/components/ui/pagination-controls";
10 import { IconDownload, IconWaveform } from "@/components/ui/icons";11 import { IconDownload, IconWaveform } from "@/components/ui/icons";
11 import { cn } from "@/lib/cn";12 import { cn } from "@/lib/cn";
12 import { podcastDownloadFilename, usePodcastDownloadT } from "@/components/notes/podcast-download";13 import { podcastDownloadFilename, usePodcastDownloadT } from "@/components/notes/podcast-download";
@@ -28,13 +29,20 @@ export function PodcastHistory(props: { noteId?: string; active?: boolean; refet
28 const downloadT = usePodcastDownloadT();29 const downloadT = usePodcastDownloadT();
29 const { locale } = usePreferences();30 const { locale } = usePreferences();
30 const [playing, setPlaying] = createSignal("");31 const [playing, setPlaying] = createSignal("");
32+ const [page, setPage] = createSignal(0);
31 const active = () => props.active !== false;33 const active = () => props.active !== false;
32 34
35+ createEffect(() => {
36+ props.noteId;
37+ setPage(0);
38+ });
39+
33 // The source is the scope string, not a fresh object: an identity-stable40 // The source is the scope string, not a fresh object: an identity-stable
34 // value keeps the resource from refetching when nothing about it changed.41 // value keeps the resource from refetching when nothing about it changed.
42+ const source = createMemo(() => (active() && props.noteId ? { noteId: props.noteId, page: page() } : null));
35 const [list, { refetch }] = createResource(43 const [list, { refetch }] = createResource(
36- () => (active() ? props.noteId ?? null : null),44+ source,
37- (noteId) => listPodcastJobs({ limit: HISTORY_PAGE_SIZE, sourceId: noteId }),45+ (scope) => listPodcastJobs({ limit: HISTORY_PAGE_SIZE, offset: scope.page * HISTORY_PAGE_SIZE, sourceId: scope.noteId }),
38 );46 );
39 47
40 // The panel bumps the key ("", then the job id) when a generation finishes;48 // The panel bumps the key ("", then the job id) when a generation finishes;
@@ -45,6 +53,12 @@ export function PodcastHistory(props: { noteId?: string; active?: boolean; refet
45 });53 });
46 54
47 const jobs = () => list()?.items ?? [];55 const jobs = () => list()?.items ?? [];
56+ const totalPages = createMemo(() => Math.max(1, Math.ceil((list()?.total ?? 0) / HISTORY_PAGE_SIZE)));
57+ const safePage = createMemo(() => Math.min(page(), totalPages() - 1));
58+
59+ createEffect(() => {
60+ if (page() > totalPages() - 1) setPage(totalPages() - 1);
61+ });
48 62
49 const stateVariant = (state: string) => {63 const stateVariant = (state: string) => {
50 if (state === "done") return "success" as const;64 if (state === "done") return "success" as const;
@@ -132,6 +146,9 @@ export function PodcastHistory(props: { noteId?: string; active?: boolean; refet
132 </For>146 </For>
133 </ul>147 </ul>
134 </Show>148 </Show>
149+ <Show when={(list()?.total ?? 0) > HISTORY_PAGE_SIZE}>
150+ <PaginationControls page={safePage()} totalPages={totalPages()} onPageChange={setPage} />
151+ </Show>
135 </Suspense>152 </Suspense>
136 </Show>153 </Show>
137 154
src/components/notes/rag-output-drawer.test.tsxmodified+1 -1
@@ -176,7 +176,7 @@ describe("RagOutputDrawer", () => {
176 renderPanel(HEALTHY);176 renderPanel(HEALTHY);
177 await waitFor(() => expect(screen.getByText(SUMMARY)).toBeTruthy());177 await waitFor(() => expect(screen.getByText(SUMMARY)).toBeTruthy());
178 178
179- expect(screen.getByText("Markdown preview")).toBeTruthy();179+ expect(screen.getByText("Preview")).toBeTruthy();
180 expect(screen.getByText("hücre zarı")).toBeTruthy();180 expect(screen.getByText("hücre zarı")).toBeTruthy();
181 expect(screen.getByText("organel")).toBeTruthy();181 expect(screen.getByText("organel")).toBeTruthy();
182 expect(screen.getByRole("button", { name: "Actions" })).toBeTruthy();182 expect(screen.getByRole("button", { name: "Actions" })).toBeTruthy();
src/components/notes/rag-output-drawer.tsxmodified+1 -1
@@ -174,7 +174,7 @@ export function RagOutputDrawer(props: {
174 174
175 <dl class="grid gap-1 text-sm sm:grid-cols-[auto_1fr] sm:gap-x-3">175 <dl class="grid gap-1 text-sm sm:grid-cols-[auto_1fr] sm:gap-x-3">
176 <dt class="text-muted-foreground">{rt("date")}</dt>176 <dt class="text-muted-foreground">{rt("date")}</dt>
177- <dd class="mono text-xs sm:pt-0.5">{formatDateTime(output().generated_at, locale())}</dd>177+ <dd class="text-xs sm:pt-0.5">{formatDateTime(output().generated_at, locale())}</dd>
178 <Show when={noteTitle()}>178 <Show when={noteTitle()}>
179 <dt class="text-muted-foreground">{rt("note")}</dt>179 <dt class="text-muted-foreground">{rt("note")}</dt>
180 <dd>{noteTitle()}</dd>180 <dd>{noteTitle()}</dd>
src/components/notes/rag-outputs-panel.tsxmodified+1 -1
@@ -271,7 +271,7 @@ export function RagOutputsPanel(props: {
271 <article class="overflow-hidden rounded-lg border border-border/60 bg-background/50">271 <article class="overflow-hidden rounded-lg border border-border/60 bg-background/50">
272 <header class="flex flex-wrap items-center justify-between gap-2 border-b border-border/60 px-3 py-2">272 <header class="flex flex-wrap items-center justify-between gap-2 border-b border-border/60 px-3 py-2">
273 <span class="text-xs font-semibold uppercase tracking-wide text-muted-foreground">{t("courseNotes.markdownPreview")}</span>273 <span class="text-xs font-semibold uppercase tracking-wide text-muted-foreground">{t("courseNotes.markdownPreview")}</span>
274- <span class="mono text-xs text-muted-foreground">{formatDateTime(current().generated_at, locale())}</span>274+ <span class="text-xs text-muted-foreground">{formatDateTime(current().generated_at, locale())}</span>
275 </header>275 </header>
276 <div class="p-4">276 <div class="p-4">
277 <RagOutputContent payload={current().payload} />277 <RagOutputContent payload={current().payload} />
src/components/pomodoro/pomodoro-log-view.tsxmodified+4 -4
@@ -19,17 +19,17 @@ export function PomodoroLogView(props: { log: PomodoroLog }) {
19 {19 {
20 accessorKey: "started_at",20 accessorKey: "started_at",
21 header: t("pomodoro.startedAt"),21 header: t("pomodoro.startedAt"),
22- cell: (cell) => <span class="mono whitespace-nowrap">{formatDateTime(cell.row.original.started_at, locale())}</span>,22+ cell: (cell) => <span class="whitespace-nowrap">{formatDateTime(cell.row.original.started_at, locale())}</span>,
23 },23 },
24 {24 {
25 accessorKey: "finished_at",25 accessorKey: "finished_at",
26 header: t("pomodoro.finishedAt"),26 header: t("pomodoro.finishedAt"),
27- cell: (cell) => <span class="mono whitespace-nowrap">{formatDateTime(cell.row.original.finished_at, locale())}</span>,27+ cell: (cell) => <span class="whitespace-nowrap">{formatDateTime(cell.row.original.finished_at, locale())}</span>,
28 },28 },
29 {29 {
30 accessorKey: "duration_ms",30 accessorKey: "duration_ms",
31 header: t("pomodoro.duration"),31 header: t("pomodoro.duration"),
32- cell: (cell) => <span class="mono tabular-nums">{formatDurationClock(cell.row.original.duration_ms)}</span>,32+ cell: (cell) => <span class="tabular-nums">{formatDurationClock(cell.row.original.duration_ms)}</span>,
33 },33 },
34 {34 {
35 accessorKey: "counted",35 accessorKey: "counted",
@@ -50,7 +50,7 @@ export function PomodoroLogView(props: { log: PomodoroLog }) {
50 <div class="space-y-4">50 <div class="space-y-4">
51 <div class="detail-metric-card">51 <div class="detail-metric-card">
52 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.total")}</p>52 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.total")}</p>
53- <p class="mono mt-2 text-3xl font-semibold tabular-nums">{formatDurationClock(props.log.total_focus_ms)}</p>53+ <p class="mt-2 text-3xl font-semibold tabular-nums">{formatDurationClock(props.log.total_focus_ms)}</p>
54 </div>54 </div>
55 <DataTable columns={columns()} data={props.log.items} empty={t("pomodoro.empty")} enablePagination pageSize={10} />55 <DataTable columns={columns()} data={props.log.items} empty={t("pomodoro.empty")} enablePagination pageSize={10} />
56 </div>56 </div>
src/components/rag/rag-copy.tsmodified+2 -0
@@ -35,6 +35,7 @@ const copy = {
35 pages: "Pages",35 pages: "Pages",
36 document: "Course document",36 document: "Course document",
37 rename: "Rename chat",37 rename: "Rename chat",
38+ actions: "Chat actions",
38 renameHint: "Give this chat a short, recognisable name.",39 renameHint: "Give this chat a short, recognisable name.",
39 renameLabel: "Chat name",40 renameLabel: "Chat name",
40 renamePlaceholder: "e.g. Newton's laws",41 renamePlaceholder: "e.g. Newton's laws",
@@ -83,6 +84,7 @@ const copy = {
83 pages: "Sayfalar",84 pages: "Sayfalar",
84 document: "Ders belgesi",85 document: "Ders belgesi",
85 rename: "Sohbeti yeniden adlandır",86 rename: "Sohbeti yeniden adlandır",
87+ actions: "Sohbet işlemleri",
86 renameHint: "Bu sohbete kısa ve ayırt edilebilir bir ad ver.",88 renameHint: "Bu sohbete kısa ve ayırt edilebilir bir ad ver.",
87 renameLabel: "Sohbet adı",89 renameLabel: "Sohbet adı",
88 renamePlaceholder: "Örn. Newton yasaları",90 renamePlaceholder: "Örn. Newton yasaları",
src/components/rag/rag-thread-list.tsxmodified+10 -17
@@ -6,6 +6,7 @@ import { EmptyInline } from "@/components/ui/empty-inline";
6 import { IconEdit, IconTrash } from "@/components/ui/icons";6 import { IconEdit, IconTrash } from "@/components/ui/icons";
7 import { PageSpinner } from "@/components/ui/page-spinner";7 import { PageSpinner } from "@/components/ui/page-spinner";
8 import { PaginationControls } from "@/components/ui/pagination-controls";8 import { PaginationControls } from "@/components/ui/pagination-controls";
9+import { TableRowActions } from "@/components/ui/table-row-actions";
9 import { cn } from "@/lib/cn";10 import { cn } from "@/lib/cn";
10 import { formatDateTime } from "@/lib/format";11 import { formatDateTime } from "@/lib/format";
11 import type { Locale } from "@/i18n/messages";12 import type { Locale } from "@/i18n/messages";
@@ -16,7 +17,7 @@ export function RagThreadList(props: {
16 activeId?: string;17 activeId?: string;
17 version: number;18 version: number;
18 locale: Locale;19 locale: Locale;
19- labels: { untitled: string; emptyThreads: string; emptyThreadsHint: string; rename: string; delete: string };20+ labels: { untitled: string; emptyThreads: string; emptyThreadsHint: string; rename: string; actions: string; delete: string };
20 onOpen: (thread: RagThread) => void;21 onOpen: (thread: RagThread) => void;
21 onRename: (thread: RagThread) => void;22 onRename: (thread: RagThread) => void;
22 onRemove: (thread: RagThread) => void;23 onRemove: (thread: RagThread) => void;
@@ -53,22 +54,14 @@ export function RagThreadList(props: {
53 <span class="w-full truncate text-sm font-medium">{thread.title || props.labels.untitled}</span>54 <span class="w-full truncate text-sm font-medium">{thread.title || props.labels.untitled}</span>
54 <span class="text-[11px] tabular-nums text-muted-foreground">{formatDateTime(thread.updated_at, props.locale)}</span>55 <span class="text-[11px] tabular-nums text-muted-foreground">{formatDateTime(thread.updated_at, props.locale)}</span>
55 </button>56 </button>
56- <button57+ <TableRowActions
57- type="button"58+ compact
58- class="flex w-9 shrink-0 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"59+ label={props.labels.actions}
59- aria-label={props.labels.rename}60+ actions={[
60- onClick={() => props.onRename(thread)}61+ { label: props.labels.rename, icon: <IconEdit class="h-4 w-4" />, onSelect: () => props.onRename(thread) },
61- >62+ { label: props.labels.delete, icon: <IconTrash class="h-4 w-4" />, destructive: true, onSelect: () => props.onRemove(thread) },
62- <IconEdit class="h-3.5 w-3.5" />63+ ]}
63- </button>64+ />
64- <button
65- type="button"
66- class="flex w-9 shrink-0 items-center justify-center border-l border-border text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive-text"
67- aria-label={props.labels.delete}
68- onClick={() => props.onRemove(thread)}
69- >
70- <IconTrash class="h-3.5 w-3.5" />
71- </button>
72 </li>65 </li>
73 )}66 )}
74 </For>67 </For>
src/components/sessions/course-sessions-panel.tsxmodified+2 -2
@@ -217,7 +217,7 @@ export function CourseSessionsPanel(props: {
217 id: "time",217 id: "time",
218 accessorFn: (row) => row.starts_at,218 accessorFn: (row) => row.starts_at,
219 header: t("appointments.time"),219 header: t("appointments.time"),
220- meta: { cellClass: "mono text-xs text-muted-foreground" },220+ meta: { cellClass: "text-xs text-muted-foreground" },
221 cell: (cell) => (221 cell: (cell) => (
222 <div class="whitespace-nowrap">222 <div class="whitespace-nowrap">
223 <p>{formatDateTime(cell.row.original.starts_at, locale())}</p>223 <p>{formatDateTime(cell.row.original.starts_at, locale())}</p>
@@ -363,7 +363,7 @@ export function CourseSessionsPanel(props: {
363 <DetailField label={t("events.starts")} value={formatDateTime(session.starts_at, locale())} />363 <DetailField label={t("events.starts")} value={formatDateTime(session.starts_at, locale())} />
364 <DetailField label={t("events.ends")} value={formatDateTime(session.ends_at, locale())} />364 <DetailField label={t("events.ends")} value={formatDateTime(session.ends_at, locale())} />
365 <Show when={props.canManage}>365 <Show when={props.canManage}>
366- <DetailField label={t("attendance.title")} value={`${detailAttendance()?.length ?? 0} / ${attendanceTargetCount(session)}`} mono />366+ <DetailField label={t("attendance.title")} value={`${detailAttendance()?.length ?? 0} / ${attendanceTargetCount(session)}`} />
367 </Show>367 </Show>
368 </div>368 </div>
369 <Show when={props.canManage}>369 <Show when={props.canManage}>
src/components/ui/data-table.tsxmodified+22 -22
@@ -67,7 +67,6 @@ export type DataTableProps<TData, TValue = unknown> = {
67 pageSize: number;67 pageSize: number;
68 total: number;68 total: number;
69 onPageChange: (pageIndex: number) => void;69 onPageChange: (pageIndex: number) => void;
70- onPageSizeChange?: (pageSize: number) => void;
71 };70 };
72 /**71 /**
73 * Below the `sm` breakpoint rows render as cards (first column as the72 * Below the `sm` breakpoint rows render as cards (first column as the
@@ -85,6 +84,8 @@ export type DataTableProps<TData, TValue = unknown> = {
85 * Without a key the same controls remain available for the current mount.84 * Without a key the same controls remain available for the current mount.
86 */85 */
87 storageKey?: string;86 storageKey?: string;
87+ /** Split the title/toolbar and table into the same inner surfaces as detail pages. */
88+ surfaceSections?: boolean;
88 };89 };
89 90
90 const resolveUpdater = <T,>(updater: Updater<T>, old: T): T =>91 const resolveUpdater = <T,>(updater: Updater<T>, old: T): T =>
@@ -114,6 +115,11 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
114 return props.data.filter((row) => props.searchPredicate?.(row, query));115 return props.data.filter((row) => props.searchPredicate?.(row, query));
115 };116 };
116 const table = createSolidTable({117 const table = createSolidTable({
118+ defaultColumn: {
119+ size: 120,
120+ minSize: 72,
121+ maxSize: 360,
122+ },
117 get data() {123 get data() {
118 return tableData();124 return tableData();
119 },125 },
@@ -202,8 +208,9 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
202 };208 };
203 const showColumnMenu = () => (props.enableColumnVisibility ?? true) && hideableColumns().length > 0;209 const showColumnMenu = () => (props.enableColumnVisibility ?? true) && hideableColumns().length > 0;
204 const showSearch = () => props.searchPredicate != null || props.filterColumn != null || props.onSearchInput != null;210 const showSearch = () => props.searchPredicate != null || props.filterColumn != null || props.onSearchInput != null;
205- const showHeader = () => props.title != null || props.description != null || props.actions != null;211+ const sectioned = () => props.surfaceSections !== false;
206- const showToolbar = () => showSearch() || props.filters != null || showColumnMenu();212+ const showHeader = () => false;
213+ const showToolbar = () => showSearch() || props.filters != null || showColumnMenu() || props.actions != null;
207 const pageCount = () => props.manualPagination ? Math.max(1, Math.ceil(props.manualPagination.total / props.manualPagination.pageSize)) : table.getPageCount();214 const pageCount = () => props.manualPagination ? Math.max(1, Math.ceil(props.manualPagination.total / props.manualPagination.pageSize)) : table.getPageCount();
208 const pageIndex = () => props.manualPagination?.pageIndex ?? table.getState().pagination.pageIndex;215 const pageIndex = () => props.manualPagination?.pageIndex ?? table.getState().pagination.pageIndex;
209 const pageSize = () => props.manualPagination?.pageSize ?? table.getState().pagination.pageSize;216 const pageSize = () => props.manualPagination?.pageSize ?? table.getState().pagination.pageSize;
@@ -256,10 +263,8 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
256 };263 };
257 const renderHeader = (header: ReturnType<typeof table.getHeaderGroups>[number]["headers"][number]) => {264 const renderHeader = (header: ReturnType<typeof table.getHeaderGroups>[number]["headers"][number]) => {
258 const content = flexRender(header.column.columnDef.header, header.getContext());265 const content = flexRender(header.column.columnDef.header, header.getContext());
259- const align = alignOf(header.column);
260 if (!sortingEnabled() || !header.column.getCanSort()) {266 if (!sortingEnabled() || !header.column.getCanSort()) {
261- // The th already carries alignClass; the block span makes text-align resolve.267+ return <span class="block truncate whitespace-nowrap text-center">{content}</span>;
262- return <span class="block truncate whitespace-nowrap">{content}</span>;
263 }268 }
264 const sorted = () => header.column.getIsSorted();269 const sorted = () => header.column.getIsSorted();
265 return (270 return (
@@ -267,9 +272,7 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
267 type="button"272 type="button"
268 variant="ghost"273 variant="ghost"
269 size="sm"274 size="sm"
270- // th text-align positions this inline-flex button; -ml-2 cancels the button's275+ class={cn("mx-auto h-8 min-w-0 max-w-full justify-center px-2 text-center font-medium tracking-normal normal-case", sorted() && "text-foreground")}
271- // px-2 so header text starts at the same gutter as the cell text below it.
272- class={cn("h-8 min-w-0 max-w-full px-2 font-medium tracking-normal normal-case", align === "left" && "-ml-2", sorted() && "text-foreground")}
273 onClick={() => header.column.toggleSorting(sorted() === "asc")}276 onClick={() => header.column.toggleSorting(sorted() === "asc")}
274 >277 >
275 <span class="truncate">{content}</span>278 <span class="truncate">{content}</span>
@@ -293,7 +296,7 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
293 return (296 return (
294 <div class={cn("space-y-3", props.class)}>297 <div class={cn("space-y-3", props.class)}>
295 <Show when={showHeader()}>298 <Show when={showHeader()}>
296- <div class="flex flex-wrap items-start justify-between gap-3">299+ <div class={cn("flex flex-wrap items-start justify-between gap-3", sectioned() && "rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4")}>
297 <div class="min-w-0">300 <div class="min-w-0">
298 <Show when={props.title}>301 <Show when={props.title}>
299 <h2 class="truncate text-lg font-semibold tracking-tight text-foreground">{props.title}</h2>302 <h2 class="truncate text-lg font-semibold tracking-tight text-foreground">{props.title}</h2>
@@ -308,7 +311,7 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
308 </div>311 </div>
309 </Show>312 </Show>
310 <Show when={showToolbar()}>313 <Show when={showToolbar()}>
311- <div class="flex flex-col gap-2 lg:flex-row lg:items-center lg:justify-between">314+ <div class={cn("flex flex-col gap-2 lg:flex-row lg:items-center lg:justify-between", sectioned() && "rounded-xl border border-border-line bg-surface-base p-3 shadow-xs")}>
312 <div class="flex flex-1 flex-wrap items-center gap-2">315 <div class="flex flex-1 flex-wrap items-center gap-2">
313 <Show when={showSearch()}>316 <Show when={showSearch()}>
314 <DataTableSearch317 <DataTableSearch
@@ -322,11 +325,14 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
322 <div class="flex flex-wrap items-center gap-2 [&_button]:h-8 [&_button]:rounded-lg [&_button]:text-[13px] [&_select]:h-8 [&_select]:rounded-lg [&_select]:text-[13px]">{props.filters}</div>325 <div class="flex flex-wrap items-center gap-2 [&_button]:h-8 [&_button]:rounded-lg [&_button]:text-[13px] [&_select]:h-8 [&_select]:rounded-lg [&_select]:text-[13px]">{props.filters}</div>
323 </Show>326 </Show>
324 </div>327 </div>
325- <Show when={showColumnMenu()}>328+ <div class="flex shrink-0 flex-wrap items-center justify-end gap-2">
326- <div class="flex justify-end">329+ <Show when={props.actions}>
330+ <div class="flex min-w-0 flex-wrap items-center gap-2 [&_button]:h-9 [&_button]:rounded-md">{props.actions}</div>
331+ </Show>
332+ <Show when={showColumnMenu()}>
327 <DataTableViewMenu columns={viewMenuColumns()} />333 <DataTableViewMenu columns={viewMenuColumns()} />
328- </div>334+ </Show>
329- </Show>335+ </div>
330 </div>336 </div>
331 </Show>337 </Show>
332 <Show when={useCards()}>338 <Show when={useCards()}>
@@ -394,7 +400,7 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
394 </ul>400 </ul>
395 </Show>401 </Show>
396 <Show when={!useCards()}>402 <Show when={!useCards()}>
397- <DataTableFrame>403+ <DataTableFrame class={sectioned() ? "rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4" : undefined}>
398 <Table404 <Table
399 class={cn("data-table table-fixed", props.tableClass)}405 class={cn("data-table table-fixed", props.tableClass)}
400 style={{ width: `max(100%, ${tableWidth()}px)` }}406 style={{ width: `max(100%, ${tableWidth()}px)` }}
@@ -414,7 +420,6 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
414 colSpan={header.colSpan}420 colSpan={header.colSpan}
415 class={cn(421 class={cn(
416 "group/head relative overflow-hidden",422 "group/head relative overflow-hidden",
417- alignClass[alignOf(header.column)],
418 dividerClass(header.column),423 dividerClass(header.column),
419 stickyHeadClass(header.column),424 stickyHeadClass(header.column),
420 header.column.columnDef.meta?.headerClass,425 header.column.columnDef.meta?.headerClass,
@@ -508,11 +513,6 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData,
508 pageSize={pageSize()}513 pageSize={pageSize()}
509 total={totalRows()}514 total={totalRows()}
510 onPageChange={setPageIndex}515 onPageChange={setPageIndex}
511- onPageSizeChange={
512- props.manualPagination
513- ? props.manualPagination.onPageSizeChange
514- : (size) => { table.setPageSize(size); setPageIndex(0); }
515- }
516 />516 />
517 </Show>517 </Show>
518 </div>518 </div>
src/components/ui/table-pagination.tsxmodified+12 -28
@@ -1,6 +1,5 @@
1-import { Show } from "solid-js";
2 import { Button } from "@/components/ui/button";1 import { Button } from "@/components/ui/button";
3-import { DropdownSelect } from "@/components/ui/select";2+import { IconChevronLeft, IconChevronRight } from "@/components/ui/icons";
4 import { useT } from "@/stores/preferences-context";3 import { useT } from "@/stores/preferences-context";
5 4
6 export type TablePaginationProps = {5 export type TablePaginationProps = {
@@ -11,59 +10,44 @@ export type TablePaginationProps = {
11 /** Total row count (across all pages). */10 /** Total row count (across all pages). */
12 total: number;11 total: number;
13 onPageChange: (pageIndex: number) => void;12 onPageChange: (pageIndex: number) => void;
14- onPageSizeChange?: (pageSize: number) => void;
15- pageSizeOptions?: number[];
16 };13 };
17 14
18-/** Footer: "X kayıttan a-b arası" + page-size select + prev/next + "page / total". */15+/** Footer: "X kayıttan a-b arası" + prev/next + "page / total". */
19 export function TablePagination(props: TablePaginationProps) {16 export function TablePagination(props: TablePaginationProps) {
20 const t = useT();17 const t = useT();
21- // Always include the active page size so the select shows a selected value
22- // instead of rendering blank when a page passes a non-standard size (e.g. 12).
23- const options = () => {
24- const base = props.pageSizeOptions ?? [10, 25, 50];
25- return base.includes(props.pageSize) ? base : [...base, props.pageSize].sort((a, b) => a - b);
26- };
27 const start = () => (props.total === 0 ? 0 : props.pageIndex * props.pageSize + 1);18 const start = () => (props.total === 0 ? 0 : props.pageIndex * props.pageSize + 1);
28 const end = () => Math.min((props.pageIndex + 1) * props.pageSize, props.total);19 const end = () => Math.min((props.pageIndex + 1) * props.pageSize, props.total);
29 20
30 return (21 return (
31- <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">22+ <div class="flex w-full flex-col gap-2 rounded-lg border border-border-line bg-surface-overlay px-2.5 py-1.5 sm:flex-row sm:items-center sm:justify-between">
32- <span class="text-sm tabular-nums text-muted-foreground">23+ <span class="text-[11px] font-medium tabular-nums text-muted-foreground">
33 {t("common.pageRange", { start: start(), end: end(), total: props.total })}24 {t("common.pageRange", { start: start(), end: end(), total: props.total })}
34 </span>25 </span>
35- <div class="flex flex-wrap items-center gap-2">26+ <div class="flex items-center justify-end gap-1">
36- <Show when={props.onPageSizeChange}>
37- <DropdownSelect
38- triggerClass="h-8 rounded-md text-xs"
39- value={String(props.pageSize)}
40- options={options().map((size) => ({
41- value: String(size),
42- label: t("common.rowsPerPage", { size }),
43- }))}
44- onChange={(value) => props.onPageSizeChange?.(Number(value))}
45- />
46- </Show>
47 <Button27 <Button
48 type="button"28 type="button"
49 variant="outline"29 variant="outline"
50 size="sm"30 size="sm"
31+ class="h-7 gap-1 px-1.5 text-[11px]"
51 disabled={props.pageIndex <= 0}32 disabled={props.pageIndex <= 0}
52 onClick={() => props.onPageChange(Math.max(0, props.pageIndex - 1))}33 onClick={() => props.onPageChange(Math.max(0, props.pageIndex - 1))}
53 >34 >
54- {t("common.prev")}35+ <IconChevronLeft class="h-3 w-3" />
36+ <span class="hidden sm:inline">{t("common.prev")}</span>
55 </Button>37 </Button>
56- <span class="text-sm tabular-nums text-muted-foreground">38+ <span class="min-w-12 rounded-md border border-border-line bg-surface-base px-1.5 py-0.5 text-center text-[11px] font-semibold tabular-nums text-foreground">
57 {t("common.pageOf", { page: props.pageIndex + 1, total: props.pageCount })}39 {t("common.pageOf", { page: props.pageIndex + 1, total: props.pageCount })}
58 </span>40 </span>
59 <Button41 <Button
60 type="button"42 type="button"
61 variant="outline"43 variant="outline"
62 size="sm"44 size="sm"
45+ class="h-7 gap-1 px-1.5 text-[11px]"
63 disabled={props.pageIndex >= props.pageCount - 1}46 disabled={props.pageIndex >= props.pageCount - 1}
64 onClick={() => props.onPageChange(Math.min(props.pageCount - 1, props.pageIndex + 1))}47 onClick={() => props.onPageChange(Math.min(props.pageCount - 1, props.pageIndex + 1))}
65 >48 >
66- {t("common.next")}49+ <span class="hidden sm:inline">{t("common.next")}</span>
50+ <IconChevronRight class="h-3 w-3" />
67 </Button>51 </Button>
68 </div>52 </div>
69 </div>53 </div>
src/components/ui/table-row-actions.tsxmodified+1 -1
@@ -25,7 +25,7 @@ export function TableRowActions(props: { label: string; actions: TableRowAction[
25 <DropdownMenu placement="bottom-end" gutter={6}>25 <DropdownMenu placement="bottom-end" gutter={6}>
26 <DropdownMenuTrigger26 <DropdownMenuTrigger
27 class={props.compact27 class={props.compact
28- ? "inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg border border-border/80 bg-muted/45 text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary-text focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary-text"28+ ? "inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground outline-hidden transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring data-expanded:bg-muted data-expanded:text-foreground"
29 : "inline-flex h-8 min-w-[78px] cursor-pointer items-center justify-center gap-1.5 rounded-lg border border-border/80 bg-muted/45 px-2 text-xs font-semibold text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary-text focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary-text"}29 : "inline-flex h-8 min-w-[78px] cursor-pointer items-center justify-center gap-1.5 rounded-lg border border-border/80 bg-muted/45 px-2 text-xs font-semibold text-foreground outline-hidden transition-colors hover:border-primary/30 hover:bg-primary/8 hover:text-primary-text focus-visible:ring-2 focus-visible:ring-ring data-expanded:border-primary/30 data-expanded:bg-primary/10 data-expanded:text-primary-text"}
30 aria-label={props.label}30 aria-label={props.label}
31 title={props.label}31 title={props.label}
src/components/ui/table.tsxmodified+2 -2
@@ -48,7 +48,7 @@ export function TableHead(props: ParentProps<ComponentProps<"th">>) {
48 return (48 return (
49 <th49 <th
50 class={cn(50 class={cn(
51- "sticky top-0 z-20 h-11 whitespace-nowrap px-3 text-left align-middle text-xs font-medium tracking-normal text-text-subtle first:pl-4 last:pr-4 has-[[role=checkbox]]:pr-0",51+ "sticky top-0 z-20 h-11 whitespace-nowrap border-r border-border-hairline px-3 text-center align-middle text-xs font-medium tracking-normal text-text-subtle last:border-r-0 first:pl-4 last:pr-4 has-[[role=checkbox]]:pr-0",
52 local.class,52 local.class,
53 )}53 )}
54 {...rest}54 {...rest}
@@ -61,7 +61,7 @@ export function TableHead(props: ParentProps<ComponentProps<"th">>) {
61 export function TableCell(props: ParentProps<ComponentProps<"td">>) {61 export function TableCell(props: ParentProps<ComponentProps<"td">>) {
62 const [local, rest] = splitProps(props, ["class", "children"]);62 const [local, rest] = splitProps(props, ["class", "children"]);
63 return (63 return (
64- <td class={cn("px-3 py-3 align-middle first:pl-4 last:pr-4 has-[[role=checkbox]]:pr-0", local.class)} {...rest}>64+ <td class={cn("border-r border-border-hairline px-3 py-3 align-middle last:border-r-0 first:pl-4 last:pr-4 has-[[role=checkbox]]:pr-0", local.class)} {...rest}>
65 {local.children}65 {local.children}
66 </td>66 </td>
67 );67 );
src/components/ui/tabs.tsxmodified+3 -5
@@ -12,10 +12,7 @@ export function TabsList<T extends ValidComponent = "div">(
12 return (12 return (
13 <TabsPrimitive.List13 <TabsPrimitive.List
14 class={cn(14 class={cn(
15- // Segmented pill bar: a bordered "well" the active tab sits inside,15+ "inline-flex h-auto w-full max-w-full items-stretch justify-start gap-0 overflow-x-auto rounded-lg border border-border-line bg-surface-base p-0 text-muted-foreground shadow-none sm:w-fit",
16- // reading as a switch control rather than a subtle underline —
17- // matches what appointments/marks/course-detail already used ad hoc.
18- "inline-flex h-auto w-full max-w-full items-center gap-1 overflow-x-auto rounded-xl border border-border/70 bg-card/80 p-1 text-muted-foreground shadow-xs sm:w-fit",
19 local.class,16 local.class,
20 )}17 )}
21 {...rest}18 {...rest}
@@ -29,8 +26,9 @@ export function TabsTrigger<T extends ValidComponent = "button">(
29 const [local, rest] = splitProps(props as ComponentProps<typeof TabsPrimitive.Trigger>, ["children", "class"]);26 const [local, rest] = splitProps(props as ComponentProps<typeof TabsPrimitive.Trigger>, ["children", "class"]);
30 return (27 return (
31 <TabsPrimitive.Trigger28 <TabsPrimitive.Trigger
29+ type="button"
32 class={cn(30 class={cn(
33- "group inline-flex h-8 shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 text-sm font-medium text-muted-foreground transition-[background-color,border-color,box-shadow,color] duration-200 hover:bg-muted/70 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-selected:border-border data-selected:bg-surface-base data-selected:text-foreground data-selected:shadow-xs",31+ "group inline-flex h-10 shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-none border-b-2 border-r border-transparent border-r-border-line px-3 text-sm font-medium text-muted-foreground transition-[background-color,border-color,box-shadow,color] duration-200 last:border-r-0 hover:bg-muted/50 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-selected:border-b-primary data-selected:bg-surface-base data-selected:text-foreground data-selected:shadow-none",
34 local.class,32 local.class,
35 )}33 )}
36 {...rest}34 {...rest}
src/components/users/user-table.tsxmodified+6 -5
@@ -78,7 +78,7 @@ export function UserTable(props: {
78 const t = useT();78 const t = useT();
79 const navigate = useNavigate();79 const navigate = useNavigate();
80 const searchUser = (user: User, query: string) =>80 const searchUser = (user: User, query: string) =>
81- matchesSearch(query, user.username, displayName(user), user.email, t(`role.${user.role}` as MessageKey));81+ matchesSearch(query, user.username, user.phone, displayName(user), user.email, t(`role.${user.role}` as MessageKey));
82 const columns = createMemo<ColumnDef<User>[]>(() => [82 const columns = createMemo<ColumnDef<User>[]>(() => [
83 {83 {
84 accessorKey: "username",84 accessorKey: "username",
@@ -88,12 +88,12 @@ export function UserTable(props: {
88 meta: { cellClass: "truncate font-medium" },88 meta: { cellClass: "truncate font-medium" },
89 },89 },
90 {90 {
91- id: "name",91+ id: "phone",
92- header: t("profile.name"),92+ header: t("profile.phone"),
93 size: 180,93 size: 180,
94- minSize: 120,94+ minSize: 130,
95 meta: { cellClass: "truncate" },95 meta: { cellClass: "truncate" },
96- cell: (cell) => displayName(cell.row.original),96+ cell: (cell) => cell.row.original.phone || "—",
97 },97 },
98 {98 {
99 accessorKey: "email",99 accessorKey: "email",
@@ -164,6 +164,7 @@ export function UserTable(props: {
164 storageKey="admin-users"164 storageKey="admin-users"
165 searchPredicate={searchUser}165 searchPredicate={searchUser}
166 filterHint={t("search.hint.users")}166 filterHint={t("search.hint.users")}
167+ surfaceSections
167 enablePagination168 enablePagination
168 pageSize={20}169 pageSize={20}
169 onRowClick={props.onUserClick}170 onRowClick={props.onUserClick}
src/i18n/messages.tsmodified+12 -12
@@ -966,8 +966,6 @@ export type MessageKey =
966 | "podcast.pageDescription"966 | "podcast.pageDescription"
967 | "podcast.source"967 | "podcast.source"
968 | "podcast.selectNote"968 | "podcast.selectNote"
969- | "podcast.selectPrompt"
970- | "podcast.selectPromptHint"
971 | "podcast.noNotes"969 | "podcast.noNotes"
972 | "podcast.noNotesHint"970 | "podcast.noNotesHint"
973 | "podcast.format"971 | "podcast.format"
@@ -2042,11 +2040,13 @@ export type MessageKey =
2042 | "search.hint.exams"2040 | "search.hint.exams"
2043 | "search.hint.events"2041 | "search.hint.events"
2044 | "search.hint.courses"2042 | "search.hint.courses"
2043+ | "search.hint.courseNotes"
2045 | "search.hint.classes"2044 | "search.hint.classes"
2046 | "search.hint.bank"2045 | "search.hint.bank"
2047 | "search.hint.whiteboards"2046 | "search.hint.whiteboards"
2048 | "search.hint.chat"2047 | "search.hint.chat"
2049 | "search.hint.deadlines"2048 | "search.hint.deadlines"
2049+ | "search.hint.homework"
2050 | "search.hint.paymentsStudents"2050 | "search.hint.paymentsStudents"
2051 | "work.userNotFound"2051 | "work.userNotFound"
2052 | "messages.inbox"2052 | "messages.inbox"
@@ -2812,7 +2812,7 @@ const en: Dict = {
2812 "common.export": "Export",2812 "common.export": "Export",
2813 "common.columns": "Columns",2813 "common.columns": "Columns",
2814 "common.visibleColumns": "Visible columns",2814 "common.visibleColumns": "Visible columns",
2815- "common.pageRange": "{start}-{end} of {total}",2815+ "common.pageRange": "{start}-{end} / {total}",
2816 "common.rowsPerPage": "{size} / page",2816 "common.rowsPerPage": "{size} / page",
2817 "common.moreFilters": "More filters",2817 "common.moreFilters": "More filters",
2818 "common.lessFilters": "Less filters",2818 "common.lessFilters": "Less filters",
@@ -3192,7 +3192,7 @@ const en: Dict = {
3192 "courseNotes.empty": "No notes on this course yet.",3192 "courseNotes.empty": "No notes on this course yet.",
3193 "courseNotes.emptyManageHint": "Write a note the whole class can read, and attach files to it.",3193 "courseNotes.emptyManageHint": "Write a note the whole class can read, and attach files to it.",
3194 "courseNotes.ragTitle": "AI summary",3194 "courseNotes.ragTitle": "AI summary",
3195- "courseNotes.markdownPreview": "Markdown preview",3195+ "courseNotes.markdownPreview": "Preview",
3196 "courseNotes.ragEmpty": "No AI outputs on this note yet.",3196 "courseNotes.ragEmpty": "No AI outputs on this note yet.",
3197 "courseNotes.ragHint": "Create a fresh summary from this note and its attachments.",3197 "courseNotes.ragHint": "Create a fresh summary from this note and its attachments.",
3198 "courseNotes.ragGenerate": "Create summary",3198 "courseNotes.ragGenerate": "Create summary",
@@ -3206,8 +3206,6 @@ const en: Dict = {
3206 "podcast.pageDescription": "Choose a lesson note, pick a narration style, and create its audio.",3206 "podcast.pageDescription": "Choose a lesson note, pick a narration style, and create its audio.",
3207 "podcast.source": "Lesson note",3207 "podcast.source": "Lesson note",
3208 "podcast.selectNote": "Choose a lesson note…",3208 "podcast.selectNote": "Choose a lesson note…",
3209- "podcast.selectPrompt": "Please choose a lesson note",
3210- "podcast.selectPromptHint": "The narration options will appear here after you select a note above.",
3211 "podcast.noNotes": "No lesson notes are available.",3209 "podcast.noNotes": "No lesson notes are available.",
3212 "podcast.noNotesHint": "Add a note to one of your courses before creating audio.",3210 "podcast.noNotesHint": "Add a note to one of your courses before creating audio.",
3213 "podcast.format": "Narration style",3211 "podcast.format": "Narration style",
@@ -4362,15 +4360,17 @@ const en: Dict = {
4362 "search.hint.students": "Matches name, surname and username. Use the filter next to it for a class.",4360 "search.hint.students": "Matches name, surname and username. Use the filter next to it for a class.",
4363 "search.hint.teachers": "Matches name, surname and username.",4361 "search.hint.teachers": "Matches name, surname and username.",
4364 "search.hint.people": "Matches name, surname, username and user id.",4362 "search.hint.people": "Matches name, surname, username and user id.",
4365- "search.hint.users": "Matches username, name, e-mail, user id and role.",4363+ "search.hint.users": "Matches username, phone, name, e-mail, user id and role.",
4366 "search.hint.exams": "Matches exam title, description, course, exam kind and status.",4364 "search.hint.exams": "Matches exam title, description, course, exam kind and status.",
4367 "search.hint.events": "Matches event title, description, audience and date.",4365 "search.hint.events": "Matches event title, description, audience and date.",
4368 "search.hint.courses": "Matches course title, description, creator, teacher and term.",4366 "search.hint.courses": "Matches course title, description, creator, teacher and term.",
4367+ "search.hint.courseNotes": "Matches note title and content.",
4369 "search.hint.classes": "Matches class name, grade and homeroom teacher.",4368 "search.hint.classes": "Matches class name, grade and homeroom teacher.",
4370 "search.hint.bank": "Matches a phrase inside the question text.",4369 "search.hint.bank": "Matches a phrase inside the question text.",
4371 "search.hint.whiteboards": "Matches board titles on the page you are viewing.",4370 "search.hint.whiteboards": "Matches board titles on the page you are viewing.",
4372 "search.hint.chat": "Matches the text of the messages in this chat.",4371 "search.hint.chat": "Matches the text of the messages in this chat.",
4373 "search.hint.deadlines": "Matches the title of the upcoming items.",4372 "search.hint.deadlines": "Matches the title of the upcoming items.",
4373+ "search.hint.homework": "Matches homework title, description and course.",
4374 "search.hint.paymentsStudents": "Matches a student's name, surname or username.",4374 "search.hint.paymentsStudents": "Matches a student's name, surname or username.",
4375 "work.userNotFound": "No work log found for this user.",4375 "work.userNotFound": "No work log found for this user.",
4376 "work.show": "Show log",4376 "work.show": "Show log",
@@ -5054,7 +5054,7 @@ const tr: Dict = {
5054 "common.export": "Dışa aktar",5054 "common.export": "Dışa aktar",
5055 "common.columns": "Sütunlar",5055 "common.columns": "Sütunlar",
5056 "common.visibleColumns": "Görünür sütunlar",5056 "common.visibleColumns": "Görünür sütunlar",
5057- "common.pageRange": "{total} kayıttan {start}-{end}",5057+ "common.pageRange": "{start}-{end} / {total}",
5058 "common.rowsPerPage": "{size} / sayfa",5058 "common.rowsPerPage": "{size} / sayfa",
5059 "common.moreFilters": "Daha fazla filtre",5059 "common.moreFilters": "Daha fazla filtre",
5060 "common.lessFilters": "Daha az filtre",5060 "common.lessFilters": "Daha az filtre",
@@ -5434,7 +5434,7 @@ const tr: Dict = {
5434 "courseNotes.empty": "Bu derse ait henüz not yok.",5434 "courseNotes.empty": "Bu derse ait henüz not yok.",
5435 "courseNotes.emptyManageHint": "Tüm sınıfın okuyabileceği bir not yazın, dosya da ekleyebilirsiniz.",5435 "courseNotes.emptyManageHint": "Tüm sınıfın okuyabileceği bir not yazın, dosya da ekleyebilirsiniz.",
5436 "courseNotes.ragTitle": "Yapay zekâ özeti",5436 "courseNotes.ragTitle": "Yapay zekâ özeti",
5437- "courseNotes.markdownPreview": "Markdown önizleme",5437+ "courseNotes.markdownPreview": "Önizleme",
5438 "courseNotes.ragEmpty": "Bu notta henüz YZ çıktısı yok.",5438 "courseNotes.ragEmpty": "Bu notta henüz YZ çıktısı yok.",
5439 "courseNotes.ragHint": "Bu not ve eklerinden güncel bir özet oluşturun.",5439 "courseNotes.ragHint": "Bu not ve eklerinden güncel bir özet oluşturun.",
5440 "courseNotes.ragGenerate": "Özet oluştur",5440 "courseNotes.ragGenerate": "Özet oluştur",
@@ -5448,8 +5448,6 @@ const tr: Dict = {
5448 "podcast.pageDescription": "Ders notunu seçin, anlatım biçimini belirleyin ve ses kaydını oluşturun.",5448 "podcast.pageDescription": "Ders notunu seçin, anlatım biçimini belirleyin ve ses kaydını oluşturun.",
5449 "podcast.source": "Ders notu",5449 "podcast.source": "Ders notu",
5450 "podcast.selectNote": "Bir ders notu seçin…",5450 "podcast.selectNote": "Bir ders notu seçin…",
5451- "podcast.selectPrompt": "Lütfen bir ders notu seçin",
5452- "podcast.selectPromptHint": "Yukarıdan bir not seçtiğinizde anlatım seçenekleri burada açılacak.",
5453 "podcast.noNotes": "Kullanılabilir ders notu yok.",5451 "podcast.noNotes": "Kullanılabilir ders notu yok.",
5454 "podcast.noNotesHint": "Ses oluşturmadan önce derslerinizden birine not ekleyin.",5452 "podcast.noNotesHint": "Ses oluşturmadan önce derslerinizden birine not ekleyin.",
5455 "podcast.format": "Anlatım biçimi",5453 "podcast.format": "Anlatım biçimi",
@@ -6604,15 +6602,17 @@ const tr: Dict = {
6604 "search.hint.students": "Ad, soyad ve kullan\u0131c\u0131 ad\u0131nda arar. S\u0131n\u0131f i\u00e7in yan\u0131ndaki filtreyi kullan\u0131n.",6602 "search.hint.students": "Ad, soyad ve kullan\u0131c\u0131 ad\u0131nda arar. S\u0131n\u0131f i\u00e7in yan\u0131ndaki filtreyi kullan\u0131n.",
6605 "search.hint.teachers": "Ad, soyad ve kullan\u0131c\u0131 ad\u0131nda arar.",6603 "search.hint.teachers": "Ad, soyad ve kullan\u0131c\u0131 ad\u0131nda arar.",
6606 "search.hint.people": "Ad, soyad, kullan\u0131c\u0131 ad\u0131 ve kullan\u0131c\u0131 ID'sinde arar.",6604 "search.hint.people": "Ad, soyad, kullan\u0131c\u0131 ad\u0131 ve kullan\u0131c\u0131 ID'sinde arar.",
6607- "search.hint.users": "Kullan\u0131c\u0131 ad\u0131, ad, e-posta, kullan\u0131c\u0131 ID'si ve rolde arar.",6605+ "search.hint.users": "Kullan\u0131c\u0131 ad\u0131, telefon, ad, e-posta, kullan\u0131c\u0131 ID'si ve rolde arar.",
6608 "search.hint.exams": "S\u0131nav ad\u0131, a\u00e7\u0131klama, ders, s\u0131nav t\u00fcr\u00fc ve durumda arar.",6606 "search.hint.exams": "S\u0131nav ad\u0131, a\u00e7\u0131klama, ders, s\u0131nav t\u00fcr\u00fc ve durumda arar.",
6609 "search.hint.events": "Etkinlik ad\u0131, a\u00e7\u0131klama, kat\u0131l\u0131mc\u0131 kitlesi ve tarihte arar.",6607 "search.hint.events": "Etkinlik ad\u0131, a\u00e7\u0131klama, kat\u0131l\u0131mc\u0131 kitlesi ve tarihte arar.",
6610 "search.hint.courses": "Ders ad\u0131, a\u00e7\u0131klama, olu\u015fturan, \u00f6\u011fretmen ve d\u00f6nemde arar.",6608 "search.hint.courses": "Ders ad\u0131, a\u00e7\u0131klama, olu\u015fturan, \u00f6\u011fretmen ve d\u00f6nemde arar.",
6609+ "search.hint.courseNotes": "Not ba\u015fl\u0131\u011f\u0131 ve i\u00e7eri\u011finde arar.",
6611 "search.hint.classes": "\u015eube ad\u0131, s\u0131n\u0131f d\u00fczeyi ve dan\u0131\u015fman \u00f6\u011fretmende arar.",6610 "search.hint.classes": "\u015eube ad\u0131, s\u0131n\u0131f d\u00fczeyi ve dan\u0131\u015fman \u00f6\u011fretmende arar.",
6612 "search.hint.bank": "Soru metninde ge\u00e7en bir ifadeyi arar.",6611 "search.hint.bank": "Soru metninde ge\u00e7en bir ifadeyi arar.",
6613 "search.hint.whiteboards": "A\u00e7\u0131k olan sayfadaki tahta ba\u015fl\u0131klar\u0131nda arar.",6612 "search.hint.whiteboards": "A\u00e7\u0131k olan sayfadaki tahta ba\u015fl\u0131klar\u0131nda arar.",
6614 "search.hint.chat": "Bu sohbetteki mesajlar\u0131n metninde arar.",6613 "search.hint.chat": "Bu sohbetteki mesajlar\u0131n metninde arar.",
6615 "search.hint.deadlines": "Yakla\u015fan kay\u0131tlar\u0131n ba\u015fl\u0131\u011f\u0131nda arar.",6614 "search.hint.deadlines": "Yakla\u015fan kay\u0131tlar\u0131n ba\u015fl\u0131\u011f\u0131nda arar.",
6615+ "search.hint.homework": "\u00d6dev ad\u0131, a\u00e7\u0131klamas\u0131 ve dersinde arar.",
6616 "search.hint.paymentsStudents": "\u00d6\u011frencinin ad\u0131nda, soyad\u0131nda veya kullan\u0131c\u0131 ad\u0131nda arar.",6616 "search.hint.paymentsStudents": "\u00d6\u011frencinin ad\u0131nda, soyad\u0131nda veya kullan\u0131c\u0131 ad\u0131nda arar.",
6617 "work.userNotFound": "Bu kullanıcı için mesai kaydı bulunamadı.",6617 "work.userNotFound": "Bu kullanıcı için mesai kaydı bulunamadı.",
6618 "work.show": "Kaydı göster",6618 "work.show": "Kaydı göster",
src/pages/academic-years-page.tsxmodified+20 -7
@@ -146,9 +146,12 @@ function AcademicYearsContent() {
146 {146 {
147 accessorKey: "name",147 accessorKey: "name",
148 header: t("settings.name"),148 header: t("settings.name"),
149+ size: 190,
150+ minSize: 170,
151+ meta: { cellClass: "min-w-0" },
149 cell: (cell) => (152 cell: (cell) => (
150- <span class="flex items-center gap-2 font-medium">153+ <span class="flex min-w-0 items-center gap-2 font-medium">
151- {cell.row.original.name}154+ <span class="truncate">{cell.row.original.name}</span>
152 <Show when={cell.row.original.archived_at != null}>155 <Show when={cell.row.original.archived_at != null}>
153 <Badge variant="secondary" class="rounded-full">{t("academicYears.archived")}</Badge>156 <Badge variant="secondary" class="rounded-full">{t("academicYears.archived")}</Badge>
154 </Show>157 </Show>
@@ -158,24 +161,34 @@ function AcademicYearsContent() {
158 {161 {
159 accessorKey: "starts_at",162 accessorKey: "starts_at",
160 header: t("events.starts"),163 header: t("events.starts"),
161- cell: (cell) => <span class="mono text-sm">{formatDateTime(cell.row.original.starts_at, locale())}</span>,164+ size: 150,
165+ minSize: 145,
166+ meta: { cellClass: "whitespace-nowrap" },
167+ cell: (cell) => <span class="whitespace-nowrap text-sm">{formatDateTime(cell.row.original.starts_at, locale())}</span>,
162 },168 },
163 {169 {
164 accessorKey: "ends_at",170 accessorKey: "ends_at",
165 header: t("events.ends"),171 header: t("events.ends"),
166- cell: (cell) => <span class="mono text-sm">{formatDateTime(cell.row.original.ends_at, locale())}</span>,172+ size: 150,
173+ minSize: 145,
174+ meta: { cellClass: "whitespace-nowrap" },
175+ cell: (cell) => <span class="whitespace-nowrap text-sm">{formatDateTime(cell.row.original.ends_at, locale())}</span>,
167 },176 },
168 {177 {
169 id: "classes",178 id: "classes",
170 accessorFn: (row) => row.class_count,179 accessorFn: (row) => row.class_count,
171 header: t("academicYears.classCount"),180 header: t("academicYears.classCount"),
172- meta: { cellClass: "mono" },181+ size: 90,
182+ minSize: 80,
183+ meta: { cellClass: "text-center", align: "center" },
173 },184 },
174 {185 {
175 id: "terms",186 id: "terms",
176 accessorFn: (row) => row.term_count,187 accessorFn: (row) => row.term_count,
177 header: t("academicYears.termCount"),188 header: t("academicYears.termCount"),
178- meta: { cellClass: "mono" },189+ size: 90,
190+ minSize: 80,
191+ meta: { cellClass: "text-center", align: "center" },
179 },192 },
180 {193 {
181 id: "actions",194 id: "actions",
@@ -230,7 +243,7 @@ function AcademicYearsContent() {
230 <Alert variant="destructive">{error()}</Alert>243 <Alert variant="destructive">{error()}</Alert>
231 </Show>244 </Show>
232 245
233- <section class="data-shell space-y-4 p-4">246+ <section class="space-y-4 p-0">
234 <Suspense fallback={<DataTableSkeleton columns={6} rows={6} />}>247 <Suspense fallback={<DataTableSkeleton columns={6} rows={6} />}>
235 <Show when={list.error}>248 <Show when={list.error}>
236 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />249 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />
src/pages/admin-user-detail-page.tsxmodified+5 -5
@@ -69,7 +69,7 @@ function AdminUserDetailContent() {
69 <Show when={error()}>69 <Show when={error()}>
70 <Alert variant="destructive">{error()}</Alert>70 <Alert variant="destructive">{error()}</Alert>
71 </Show>71 </Show>
72- <div class="space-y-2">72+ <section class="rounded-xl border border-border-line bg-surface-base px-4 py-3 shadow-xs sm:px-5">
73 <Breadcrumbs73 <Breadcrumbs
74 items={[74 items={[
75 { label: t("nav.users"), to: "/admin/users" },75 { label: t("nav.users"), to: "/admin/users" },
@@ -82,17 +82,17 @@ function AdminUserDetailContent() {
82 actions={82 actions={
83 <>83 <>
84 <Link to="/profile/$userId" params={{ userId: current().id }}>84 <Link to="/profile/$userId" params={{ userId: current().id }}>
85- <Button variant="outline" size="sm">85+ <Button type="button" variant="outline" size="sm">
86 <IconExternalLink class="h-4 w-4" />86 <IconExternalLink class="h-4 w-4" />
87 {t("profile.viewProfile")}87 {t("profile.viewProfile")}
88 </Button>88 </Button>
89 </Link>89 </Link>
90- <Button variant="outline" size="sm" onClick={() => setEditing(true)}>90+ <Button type="button" variant="outline" size="sm" onClick={() => setEditing(true)}>
91 <IconEdit class="h-4 w-4" />91 <IconEdit class="h-4 w-4" />
92 {t("common.edit")}92 {t("common.edit")}
93 </Button>93 </Button>
94 <Show when={current().role === "parent"}>94 <Show when={current().role === "parent"}>
95- <Button variant="outline" size="sm" onClick={() => setStudentsOpen(true)}>95+ <Button type="button" variant="outline" size="sm" onClick={() => setStudentsOpen(true)}>
96 <IconUsers class="h-4 w-4" />96 <IconUsers class="h-4 w-4" />
97 {t("parentLink.manage")}97 {t("parentLink.manage")}
98 </Button>98 </Button>
@@ -100,7 +100,7 @@ function AdminUserDetailContent() {
100 </>100 </>
101 }101 }
102 />102 />
103- </div>103+ </section>
104 104
105 <section class="data-shell grid gap-4 p-5 sm:grid-cols-2 lg:grid-cols-3">105 <section class="data-shell grid gap-4 p-5 sm:grid-cols-2 lg:grid-cols-3">
106 <DetailField label={t("admin.username")} value={current().username} />106 <DetailField label={t("admin.username")} value={current().username} />
src/pages/admin-users-page.tsxmodified+1 -1
@@ -90,7 +90,7 @@ function AdminUsersContent() {
90 </TabsList>90 </TabsList>
91 </Tabs>91 </Tabs>
92 92
93- <section class="data-shell space-y-4 p-4">93+ <section class="space-y-4 p-0">
94 <Suspense fallback={<DataTableSkeleton columns={6} rows={8} />}>94 <Suspense fallback={<DataTableSkeleton columns={6} rows={8} />}>
95 <TruncationNotice95 <TruncationNotice
96 shown={list()?.items.length ?? 0}96 shown={list()?.items.length ?? 0}
src/pages/ai-insight-student-page.tsxmodified+1 -1
@@ -127,7 +127,7 @@ function AiInsightStudentContent() {
127 >127 >
128 {(summary) => (128 {(summary) => (
129 <div class="flex flex-wrap items-center gap-2 text-xs text-muted-foreground">129 <div class="flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
130- <span class="font-mono tabular-nums">{numericDate(summary().computed_at)}</span>130+ <span class="tabular-nums">{numericDate(summary().computed_at)}</span>
131 <span aria-hidden="true">·</span>131 <span aria-hidden="true">·</span>
132 <Badge variant={confidenceVariant(summary().confidence)} class="rounded-full">132 <Badge variant={confidenceVariant(summary().confidence)} class="rounded-full">
133 {confidenceLabel(summary().confidence)}133 {confidenceLabel(summary().confidence)}
src/pages/appointments-page.tsxmodified+6 -6
@@ -144,7 +144,7 @@ function AppointmentsContent() {
144 // digits line up across rows). Same-day windows show one date; cross-day144 // digits line up across rows). Same-day windows show one date; cross-day
145 // spells out the end date on the second line.145 // spells out the end date on the second line.
146 const timeCell = (starts: number | null, ends: number | null) => (146 const timeCell = (starts: number | null, ends: number | null) => (
147- <div class="mono flex flex-col text-xs leading-tight tabular-nums">147+ <div class="flex flex-col text-xs leading-tight tabular-nums">
148 <span class="text-foreground">{formatDate(starts, locale())}</span>148 <span class="text-foreground">{formatDate(starts, locale())}</span>
149 <span class="text-muted-foreground">149 <span class="text-muted-foreground">
150 {sameDay(starts, ends)150 {sameDay(starts, ends)
@@ -466,7 +466,7 @@ function AppointmentsContent() {
466 466
467 <TabsContent value="appointments" class="mt-0 space-y-4 border-0 bg-transparent p-0 shadow-none">467 <TabsContent value="appointments" class="mt-0 space-y-4 border-0 bg-transparent p-0 shadow-none">
468 <Show when={isStaff()} fallback={468 <Show when={isStaff()} fallback={
469- <section class="data-shell space-y-4 p-4">469+ <section class="space-y-4 p-0">
470 <Show when={loaded()} fallback={<DataTableSkeleton columns={4} rows={6} />}>470 <Show when={loaded()} fallback={<DataTableSkeleton columns={4} rows={6} />}>
471 <Show when={appts.error}><Alert variant="destructive">{formatApiError(appts.error)}</Alert></Show>471 <Show when={appts.error}><Alert variant="destructive">{formatApiError(appts.error)}</Alert></Show>
472 <Show when={nextBooking()}>472 <Show when={nextBooking()}>
@@ -477,7 +477,7 @@ function AppointmentsContent() {
477 </span>477 </span>
478 <div class="min-w-0 flex-1">478 <div class="min-w-0 flex-1">
479 <p class="truncate text-sm font-medium text-text-strong">{personLabel(booking().teacher)}</p>479 <p class="truncate text-sm font-medium text-text-strong">{personLabel(booking().teacher)}</p>
480- <p class="mono truncate text-xs text-text-subtle">{timeWindow(booking().starts_at, booking().ends_at)}</p>480+ <p class="truncate text-xs text-text-subtle">{timeWindow(booking().starts_at, booking().ends_at)}</p>
481 </div>481 </div>
482 {statusBadge(booking().status)}482 {statusBadge(booking().status)}
483 </div>483 </div>
@@ -498,7 +498,7 @@ function AppointmentsContent() {
498 </Show>498 </Show>
499 </section>499 </section>
500 }>500 }>
501- <section class="data-shell space-y-4 p-4">501+ <section class="space-y-4 p-0">
502 <Show when={loaded()} fallback={<DataTableSkeleton columns={5} rows={6} />}>502 <Show when={loaded()} fallback={<DataTableSkeleton columns={5} rows={6} />}>
503 <Show when={appts.error}><Alert variant="destructive">{formatApiError(appts.error)}</Alert></Show>503 <Show when={appts.error}><Alert variant="destructive">{formatApiError(appts.error)}</Alert></Show>
504 <DataTable504 <DataTable
@@ -520,7 +520,7 @@ function AppointmentsContent() {
520 520
521 <TabsContent value="availability" class="mt-0 border-0 bg-transparent p-0 shadow-none">521 <TabsContent value="availability" class="mt-0 border-0 bg-transparent p-0 shadow-none">
522 <Show when={isStaff()} fallback={522 <Show when={isStaff()} fallback={
523- <section class="data-shell space-y-4 p-4">523+ <section class="space-y-4 p-0">
524 <Show when={loaded()} fallback={<DataTableSkeleton columns={4} rows={6} />}>524 <Show when={loaded()} fallback={<DataTableSkeleton columns={4} rows={6} />}>
525 <Show when={slots.error}><Alert variant="destructive">{formatApiError(slots.error)}</Alert></Show>525 <Show when={slots.error}><Alert variant="destructive">{formatApiError(slots.error)}</Alert></Show>
526 <DataTable526 <DataTable
@@ -538,7 +538,7 @@ function AppointmentsContent() {
538 </Show>538 </Show>
539 </section>539 </section>
540 }>540 }>
541- <section class="data-shell space-y-4 p-4">541+ <section class="space-y-4 p-0">
542 <Show when={loaded()} fallback={<DataTableSkeleton columns={5} rows={6} />}>542 <Show when={loaded()} fallback={<DataTableSkeleton columns={5} rows={6} />}>
543 <Show when={slots.error}><Alert variant="destructive">{formatApiError(slots.error)}</Alert></Show>543 <Show when={slots.error}><Alert variant="destructive">{formatApiError(slots.error)}</Alert></Show>
544 <DataTable544 <DataTable
src/pages/builder-schools-page.tsxmodified+4 -4
@@ -74,13 +74,13 @@ function BuilderSchoolsContent() {
74 {74 {
75 id: "modules",75 id: "modules",
76 header: t("builder.modules"),76 header: t("builder.modules"),
77- meta: { align: "right", cellClass: "mono tabular-nums" },77+ meta: { align: "right", cellClass: "tabular-nums" },
78 cell: (cell) => cell.row.original.modules.length,78 cell: (cell) => cell.row.original.modules.length,
79 },79 },
80 {80 {
81 accessorKey: "created_at",81 accessorKey: "created_at",
82 header: t("builder.createdAt"),82 header: t("builder.createdAt"),
83- cell: (cell) => <span class="mono text-sm">{formatDateTime(cell.row.original.created_at, locale())}</span>,83+ cell: (cell) => <span class="text-sm">{formatDateTime(cell.row.original.created_at, locale())}</span>,
84 },84 },
85 {85 {
86 id: "actions",86 id: "actions",
@@ -111,7 +111,7 @@ function BuilderSchoolsContent() {
111 <Alert variant="destructive">{error()}</Alert>111 <Alert variant="destructive">{error()}</Alert>
112 </Show>112 </Show>
113 113
114- <section class="data-shell space-y-4 p-4">114+ <section class="space-y-4 p-0">
115 <Suspense fallback={<DataTableSkeleton columns={5} rows={6} />}>115 <Suspense fallback={<DataTableSkeleton columns={5} rows={6} />}>
116 <Show when={list.error}>116 <Show when={list.error}>
117 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />117 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />
@@ -128,7 +128,7 @@ function BuilderSchoolsContent() {
128 }128 }
129 columns={columns()}129 columns={columns()}
130 data={list() ?? []}130 data={list() ?? []}
131- tableClass="min-w-176"131+ tableClass="min-w-[52rem]"
132 empty={t("builder.noSchools")}132 empty={t("builder.noSchools")}
133 filterColumn="name"133 filterColumn="name"
134 enablePagination134 enablePagination
src/pages/class-detail-page.tsxmodified+2 -2
@@ -189,13 +189,13 @@ function ClassDetailContent() {
189 id: "dersSaati",189 id: "dersSaati",
190 accessorFn: (row) => row.ders_saati,190 accessorFn: (row) => row.ders_saati,
191 header: t("instances.dersSaati"),191 header: t("instances.dersSaati"),
192- meta: { cellClass: "mono" },192+ meta: { cellClass: "" },
193 },193 },
194 {194 {
195 id: "roster",195 id: "roster",
196 accessorFn: (row) => row.enrollment_count,196 accessorFn: (row) => row.enrollment_count,
197 header: t("courses.roster"),197 header: t("courses.roster"),
198- meta: { cellClass: "mono" },198+ meta: { cellClass: "" },
199 },199 },
200 {200 {
201 id: "attachedBy",201 id: "attachedBy",
src/pages/classes-page.tsxmodified+31 -24
@@ -8,7 +8,8 @@ import { getLimits } from "@/api/limits";
8 import { formatApiError, type BlueprintSkip, type ClassGroup } from "@/api/client";8 import { formatApiError, type BlueprintSkip, type ClassGroup } from "@/api/client";
9 import { BlueprintSkippedReport } from "@/components/classes/blueprint-skipped-report";9 import { BlueprintSkippedReport } from "@/components/classes/blueprint-skipped-report";
10 import { RouteGuard } from "@/components/layout/route-guard";10 import { RouteGuard } from "@/components/layout/route-guard";
11-import { DataTableSearch } from "@/components/ui/data-table-search";11+import { DataToolbar } from "@/components/ui/data-toolbar";
12+import { DropdownSelect, Select } from "@/components/ui/select";
12 import { DataSection } from "@/components/ui/data-section";13 import { DataSection } from "@/components/ui/data-section";
13 import { Alert } from "@/components/ui/alert";14 import { Alert } from "@/components/ui/alert";
14 import { Badge } from "@/components/ui/badge";15 import { Badge } from "@/components/ui/badge";
@@ -18,7 +19,6 @@ import { EmptyState } from "@/components/ui/empty-state";
18 import { IconChevronRight, IconPlus } from "@/components/ui/icons";19 import { IconChevronRight, IconPlus } from "@/components/ui/icons";
19 import { Input } from "@/components/ui/input";20 import { Input } from "@/components/ui/input";
20 import { Label } from "@/components/ui/label";21 import { Label } from "@/components/ui/label";
21-import { Select } from "@/components/ui/select";
22 import { SidePanel } from "@/components/ui/side-panel";22 import { SidePanel } from "@/components/ui/side-panel";
23 import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";23 import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
24 import { BlueprintsTab } from "@/components/classes/blueprints-tab";24 import { BlueprintsTab } from "@/components/classes/blueprints-tab";
@@ -226,29 +226,36 @@ function ClassesContent() {
226 <DataSection226 <DataSection
227 title={t("classGroups.title")}227 title={t("classGroups.title")}
228 description={t("classGroups.subtitle")}228 description={t("classGroups.subtitle")}
229- actions={
230- <Show when={canManage()}>
231- <Button size="sm" variant="outline" class="rounded-lg" disabled title={t("comingSoon.title")}>
232- {t("classGroups.mergeClasses")}
233- <ComingSoonBadge class="ml-1.5" />
234- </Button>
235- <Button size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => setShowForm(true)}>
236- <IconPlus class="h-4 w-4" />
237- {t("classGroups.newClass")}
238- </Button>
239- </Show>
240- }
241 >229 >
242- <div class="flex flex-wrap items-center gap-2">230+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs">
243- <DataTableSearch value={query()} onChange={setQuery} placeholder={t("classGroups.searchPlaceholder")} hint={t("search.hint.classes")} />231+ <DataToolbar
244- <Show when={grades().length > 0}>232+ searchValue={query()}
245- <Tabs value={gradeFilter()} onChange={setGradeFilter}>233+ searchPlaceholder={t("classGroups.searchPlaceholder")}
246- <TabsList>234+ searchHint={t("search.hint.classes")}
247- <TabsTrigger value="all">{t("classGroups.allGrades")}</TabsTrigger>235+ onSearchInput={setQuery}
248- <For each={grades()}>{(g) => <TabsTrigger value={g}>{g}</TabsTrigger>}</For>236+ filters={
249- </TabsList>237+ <Show when={grades().length > 0}>
250- </Tabs>238+ <DropdownSelect
251- </Show>239+ options={[{ value: "all", label: t("classGroups.allGrades") }, ...grades().map((g) => ({ value: g, label: g }))]}
240+ value={gradeFilter()}
241+ onChange={setGradeFilter}
242+ class="min-w-44"
243+ />
244+ </Show>
245+ }
246+ actions={
247+ <Show when={canManage()}>
248+ <Button type="button" size="sm" variant="outline" class="rounded-lg" disabled title={t("comingSoon.title")}>
249+ {t("classGroups.mergeClasses")}
250+ <ComingSoonBadge class="ml-1.5" />
251+ </Button>
252+ <Button type="button" size="sm" class="rounded-lg" onClick={() => setShowForm(true)}>
253+ <IconPlus class="h-4 w-4" />
254+ {t("classGroups.newClass")}
255+ </Button>
256+ </Show>
257+ }
258+ />
252 </div>259 </div>
253 260
254 <Suspense fallback={<DataTableSkeleton />}>261 <Suspense fallback={<DataTableSkeleton />}>
src/pages/course-detail-page.tsxmodified+68 -103
@@ -23,6 +23,7 @@ import { Badge } from "@/components/ui/badge";
23 import { Button } from "@/components/ui/button";23 import { Button } from "@/components/ui/button";
24 import { ConfirmDialog } from "@/components/ui/confirm-dialog";24 import { ConfirmDialog } from "@/components/ui/confirm-dialog";
25 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";25 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";
26+import { DataToolbar } from "@/components/ui/data-toolbar";
26 import { EmptyState } from "@/components/ui/empty-state";27 import { EmptyState } from "@/components/ui/empty-state";
27 import { IconBook, IconEdit, IconNote, IconPlus, IconSchool, IconTrash, IconUsers } from "@/components/ui/icons";28 import { IconBook, IconEdit, IconNote, IconPlus, IconSchool, IconTrash, IconUsers } from "@/components/ui/icons";
28 import { createFlash } from "@/lib/flash";29 import { createFlash } from "@/lib/flash";
@@ -38,6 +39,8 @@ import { UserSearchSelect } from "@/components/users/user-search-select";
38 import { useAuth } from "@/stores/auth-context";39 import { useAuth } from "@/stores/auth-context";
39 import { useT } from "@/stores/preferences-context";40 import { useT } from "@/stores/preferences-context";
40 import { hasMinRole } from "@/lib/roles";41 import { hasMinRole } from "@/lib/roles";
42+import { cn } from "@/lib/cn";
43+import { matchesSearch } from "@/lib/search-text";
41 44
42 const COURSE_KINDS: CourseKind[] = ["course", "study", "club"];45 const COURSE_KINDS: CourseKind[] = ["course", "study", "club"];
43 46
@@ -127,8 +130,8 @@ function CourseDetailContent() {
127 const [showSubjectForm, setShowSubjectForm] = createSignal(false);130 const [showSubjectForm, setShowSubjectForm] = createSignal(false);
128 const [showNoteForm, setShowNoteForm] = createSignal(false);131 const [showNoteForm, setShowNoteForm] = createSignal(false);
129 const [showMemberForm, setShowMemberForm] = createSignal(false);132 const [showMemberForm, setShowMemberForm] = createSignal(false);
130- const [subjectCount, setSubjectCount] = createSignal(0);133+ const [noteCount, setNoteCount] = createSignal<number | null>(null);
131- const [noteCount, setNoteCount] = createSignal(0);134+ const [sectionSearch, setSectionSearch] = createSignal("");
132 const [memberUserId, setMemberUserId] = createSignal("");135 const [memberUserId, setMemberUserId] = createSignal("");
133 const [error, setError] = createSignal("");136 const [error, setError] = createSignal("");
134 const [pending, setPending] = createSignal(false);137 const [pending, setPending] = createSignal(false);
@@ -146,9 +149,11 @@ function CourseDetailContent() {
146 const courseKindLabel = (value: CourseKind | undefined) =>149 const courseKindLabel = (value: CourseKind | undefined) =>
147 value === "study" ? t("courses.kind.study") : value === "club" ? t("courses.kind.club") : t("courses.kind.course");150 value === "study" ? t("courses.kind.study") : value === "club" ? t("courses.kind.club") : t("courses.kind.course");
148 const courseListSearch = (value: CourseKind | undefined) => (value ? ({ kind: value } as never) : ({} as never));151 const courseListSearch = (value: CourseKind | undefined) => (value ? ({ kind: value } as never) : ({} as never));
149- const countDescription = (count: number, item: string) => t("common.countItem", { count, item });
150-
151 const sectionCount = createMemo(() => sections()?.length ?? 0);152 const sectionCount = createMemo(() => sections()?.length ?? 0);
153+ const visibleSections = createMemo(() => {
154+ const query = sectionSearch().trim();
155+ return query ? (sections() ?? []).filter((section) => matchesSearch(query, section.className)) : sections() ?? [];
156+ });
152 const memberCount = createMemo(() => members()?.length ?? 0);157 const memberCount = createMemo(() => members()?.length ?? 0);
153 const memberUserIds = () => (members() ?? []).map((row) => row.user.id);158 const memberUserIds = () => (members() ?? []).map((row) => row.user.id);
154 159
@@ -168,13 +173,13 @@ function CourseDetailContent() {
168 id: "dersSaati",173 id: "dersSaati",
169 accessorFn: (row) => row.instance.ders_saati,174 accessorFn: (row) => row.instance.ders_saati,
170 header: t("instances.dersSaati"),175 header: t("instances.dersSaati"),
171- meta: { cellClass: "mono" },176+ meta: { cellClass: "" },
172 },177 },
173 {178 {
174 id: "roster",179 id: "roster",
175 accessorFn: (row) => row.instance.enrollment_count,180 accessorFn: (row) => row.instance.enrollment_count,
176 header: t("courses.roster"),181 header: t("courses.roster"),
177- meta: { cellClass: "mono" },182+ meta: { cellClass: "" },
178 },183 },
179 {184 {
180 id: "karne",185 id: "karne",
@@ -260,7 +265,7 @@ function CourseDetailContent() {
260 <Show when={accessReady()} fallback={<PageSpinner />}>265 <Show when={accessReady()} fallback={<PageSpinner />}>
261 <Show when={canViewCourse()} fallback={<Alert variant="destructive">{t("common.accessDenied")}</Alert>}>266 <Show when={canViewCourse()} fallback={<Alert variant="destructive">{t("common.accessDenied")}</Alert>}>
262 <div class="mx-auto w-full max-w-[1440px] space-y-4">267 <div class="mx-auto w-full max-w-[1440px] space-y-4">
263- <div class="space-y-1.5">268+ <section class="rounded-xl border border-border-line bg-surface-base px-4 py-3 shadow-xs sm:px-5">
264 <Breadcrumbs269 <Breadcrumbs
265 items={[270 items={[
266 { label: courseKindLabel(c().kind), to: "/courses", search: courseListSearch(c().kind) },271 { label: courseKindLabel(c().kind), to: "/courses", search: courseListSearch(c().kind) },
@@ -269,7 +274,7 @@ function CourseDetailContent() {
269 />274 />
270 <PageHeader275 <PageHeader
271 title={c().title}276 title={c().title}
272- description={c().description || "—"}277+ description={c().description || undefined}
273 class="border-border-line"278 class="border-border-line"
274 actions={279 actions={
275 <Show when={canManageCatalog()}>280 <Show when={canManageCatalog()}>
@@ -288,36 +293,7 @@ function CourseDetailContent() {
288 </Show>293 </Show>
289 }294 }
290 />295 />
291- <div class="grid gap-2 sm:grid-cols-2 xl:grid-cols-3">296+ </section>
292- <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3">
293- <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle">
294- <IconBook class="h-4 w-4" />
295- </span>
296- <div class="min-w-0">
297- <p class="text-xs font-medium text-text-subtle">{t("courses.kind")}</p>
298- <p class="truncate text-sm font-semibold text-text-default">{courseKindLabel(c().kind)}</p>
299- </div>
300- </div>
301- <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3">
302- <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle">
303- <IconSchool class="h-4 w-4" />
304- </span>
305- <div class="min-w-0">
306- <p class="text-xs font-medium text-text-subtle">{t("instances.taughtIn")}</p>
307- <p class="mono truncate text-sm font-semibold text-text-default">{c().class_course_count}</p>
308- </div>
309- </div>
310- <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3">
311- <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-surface-tint text-text-subtle">
312- <IconUsers class="h-4 w-4" />
313- </span>
314- <div class="min-w-0">
315- <p class="text-xs font-medium text-text-subtle">{t("courses.members")}</p>
316- <p class="mono truncate text-sm font-semibold text-text-default">{c().course_membership_count}</p>
317- </div>
318- </div>
319- </div>
320- </div>
321 297
322 <ConfirmDialog298 <ConfirmDialog
323 open={deleteOpen()}299 open={deleteOpen()}
@@ -453,95 +429,84 @@ function CourseDetailContent() {
453 </Show>429 </Show>
454 430
455 <Tabs value={courseTab()} onChange={setCourseTab} class="space-y-4">431 <Tabs value={courseTab()} onChange={setCourseTab} class="space-y-4">
456- <TabsList class="flex w-full justify-start overflow-x-auto sm:grid sm:grid-cols-4" aria-label={c().title}>432+ <TabsList class={cn("w-full justify-start gap-0 overflow-x-auto rounded-lg border-border-line bg-surface-base p-0 shadow-none sm:grid", hasMembers() ? "sm:grid-cols-4" : "sm:grid-cols-3")} aria-label={c().title}>
457- <TabsTrigger value="subjects" class="min-w-0"><IconBook class="h-4 w-4" />{t("subjects.title")}<Badge variant="secondary" class="h-5 min-w-5 justify-center rounded-full px-1.5 py-0 text-[11px] group-data-selected:bg-background group-data-selected:text-foreground">{subjectCount()}</Badge></TabsTrigger>433+ <TabsTrigger value="subjects" onClick={(event) => { event.preventDefault(); setCourseTab("subjects"); }} class="min-w-0 rounded-none border-r border-border-line last:border-r-0 data-selected:border-b-2 data-selected:border-b-primary data-selected:bg-surface-base data-selected:shadow-none"><IconBook class="h-4 w-4" />{t("subjects.title")}</TabsTrigger>
458- <TabsTrigger value="sections" class="min-w-0"><IconSchool class="h-4 w-4" />{t("instances.title")}<Badge variant="secondary" class="h-5 min-w-5 justify-center rounded-full px-1.5 py-0 text-[11px] group-data-selected:bg-background group-data-selected:text-foreground">{sectionCount()}</Badge></TabsTrigger>434+ <TabsTrigger value="sections" onClick={(event) => { event.preventDefault(); setCourseTab("sections"); }} class="min-w-0 rounded-none border-r border-border-line last:border-r-0 data-selected:border-b-2 data-selected:border-b-primary data-selected:bg-surface-base data-selected:shadow-none"><IconSchool class="h-4 w-4" />{t("instances.title")}</TabsTrigger>
459- <TabsTrigger value="notes" class="min-w-0"><IconNote class="h-4 w-4" />{t("courseNotes.title")}<Badge variant="secondary" class="h-5 min-w-5 justify-center rounded-full px-1.5 py-0 text-[11px] group-data-selected:bg-background group-data-selected:text-foreground">{noteCount()}</Badge></TabsTrigger>435+ <TabsTrigger value="notes" onClick={(event) => { event.preventDefault(); setCourseTab("notes"); }} class="min-w-0 rounded-none border-r border-border-line last:border-r-0 data-selected:border-b-2 data-selected:border-b-primary data-selected:bg-surface-base data-selected:shadow-none"><IconNote class="h-4 w-4" />{t("courseNotes.title")}<Show when={noteCount() != null}><span class="ml-0.5 tabular-nums">{noteCount()}</span></Show></TabsTrigger>
460 <Show when={hasMembers()}>436 <Show when={hasMembers()}>
461- <TabsTrigger value="members" class="min-w-0"><IconUsers class="h-4 w-4" />{t("courses.members")}<Badge variant="secondary" class="h-5 min-w-5 justify-center rounded-full px-1.5 py-0 text-[11px] group-data-selected:bg-background group-data-selected:text-foreground">{c().course_membership_count}</Badge></TabsTrigger>437+ <TabsTrigger value="members" onClick={(event) => { event.preventDefault(); setCourseTab("members"); }} class="min-w-0 rounded-none border-r border-border-line last:border-r-0 data-selected:border-b-2 data-selected:border-b-primary data-selected:bg-surface-base data-selected:shadow-none"><IconUsers class="h-4 w-4" />{t("courses.members")}</TabsTrigger>
462 </Show>438 </Show>
463 </TabsList>439 </TabsList>
464 440
465- <TabsContent value="subjects" class="space-y-3">441+ <TabsContent value="subjects" forceMount class="space-y-3">
466- <div class="flex flex-wrap items-center gap-2">
467- <Badge variant="secondary" class="rounded-full">{countDescription(subjectCount(), t("subjects.item"))}</Badge>
468- <Show when={canManageCatalog()}>
469- <Button type="button" variant="outline" size="sm" class="ml-auto rounded-lg" onClick={() => setShowSubjectForm(true)}>
470- <IconPlus class="h-4 w-4" />{t("subjects.add")}
471- </Button>
472- </Show>
473- </div>
474 <CourseSubjectsPanel442 <CourseSubjectsPanel
475 courseId={id()}443 courseId={id()}
476 canManage={canManageCatalog()}444 canManage={canManageCatalog()}
477- active={courseTab() === "subjects"}
478 createOpen={showSubjectForm()}445 createOpen={showSubjectForm()}
479 onCreateOpenChange={setShowSubjectForm}446 onCreateOpenChange={setShowSubjectForm}
480- onCountChange={setSubjectCount}
481 />447 />
482 </TabsContent>448 </TabsContent>
483 449
484- <TabsContent value="sections" class="space-y-3">450+ <TabsContent value="sections" forceMount class="space-y-3">
485- <div class="flex flex-wrap items-center gap-2">451+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs">
486- <Badge variant="secondary" class="rounded-full">{countDescription(sectionCount(), t("instances.item"))}</Badge>452+ <DataToolbar
487- <span class="text-xs text-text-subtle">{t("instances.selectSectionHelp")}</span>453+ inline
454+ searchValue={sectionSearch()}
455+ searchPlaceholder={t("common.searchPlaceholder")}
456+ onSearchInput={setSectionSearch}
457+ />
488 </div>458 </div>
489- <Suspense fallback={<DataTableSkeleton />}>459+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
490- <Show460+ <Suspense fallback={<DataTableSkeleton />}>
491- when={sectionCount() > 0}461+ <Show
492- fallback={<EmptyState kind="people" title={t("instances.empty")} description={t("instances.emptyHelp")} />}462+ when={sectionCount() > 0}
493- >463+ fallback={<EmptyState kind="people" title={t("instances.empty")} description={t("instances.emptyHelp")} />}
494- <DataTable464+ >
495- columns={sectionColumns()}465+ <DataTable
496- data={sections() ?? []}466+ columns={sectionColumns()}
497- filterColumn="class"467+ data={visibleSections()}
498- enablePagination468+ enablePagination
499- pageSize={10}469+ pageSize={10}
500- onRowClick={(row) => void navigate({ to: "/instances/$id", params: { id: row.instance.id } })}470+ empty={t("common.noMatches")}
501- />471+ onRowClick={(row) => void navigate({ to: "/instances/$id", params: { id: row.instance.id } })}
502- </Show>472+ />
503- </Suspense>473+ </Show>
504- </TabsContent>474+ </Suspense>
505-
506- <TabsContent value="notes" class="space-y-3">
507- <div class="flex flex-wrap items-center gap-2">
508- <Badge variant="secondary" class="rounded-full">{countDescription(noteCount(), t("courseNotes.item"))}</Badge>
509- <Show when={canManageCatalog()}>
510- <Button type="button" variant="outline" size="sm" class="ml-auto rounded-lg" onClick={() => setShowNoteForm(true)}>
511- <IconPlus class="h-4 w-4" />{t("courseNotes.add")}
512- </Button>
513- </Show>
514 </div>475 </div>
515- <CourseNotesPanel
516- courseId={id()}
517- canManage={canManageCatalog()}
518- active={courseTab() === "notes"}
519- createOpen={showNoteForm()}
520- onCreateOpenChange={setShowNoteForm}
521- onCountChange={setNoteCount}
522- />
523 </TabsContent>476 </TabsContent>
524 477
478+ <TabsContent value="notes" forceMount class="space-y-3" />
479+
525 <Show when={hasMembers()}>480 <Show when={hasMembers()}>
526- <TabsContent value="members" class="space-y-3">481+ <TabsContent value="members" forceMount class="space-y-3">
527- <div class="flex flex-wrap items-center gap-2">482+ <Show when={canManageCatalog()}>
528- <Badge variant="secondary" class="rounded-full">{countDescription(memberCount(), t("courses.memberItem"))}</Badge>483+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs">
529- <Show when={canManageCatalog()}>484+ <Button type="button" size="sm" class="rounded-lg" onClick={() => setShowMemberForm(true)}>
530- <Button type="button" variant="outline" size="sm" class="ml-auto rounded-lg" onClick={() => setShowMemberForm(true)}>
531 <IconPlus class="h-4 w-4" />{t("courses.addMember")}485 <IconPlus class="h-4 w-4" />{t("courses.addMember")}
532 </Button>486 </Button>
487+ </div>
488+ </Show>
489+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
490+ <Show when={canManageCatalog()} fallback={<EmptyState kind="people" title={t("common.accessDenied")} />}>
491+ <Suspense fallback={<DataTableSkeleton />}>
492+ <Show when={memberCount() > 0} fallback={<EmptyState kind="people" title={t("exams.emptyRoster")} />}>
493+ <DataTable columns={memberColumns()} data={members() ?? []} filterColumn="username" enablePagination pageSize={10} />
494+ </Show>
495+ </Suspense>
533 </Show>496 </Show>
534 </div>497 </div>
535- <Show when={canManageCatalog()} fallback={<EmptyState kind="people" title={t("common.accessDenied")} />}>
536- <Suspense fallback={<DataTableSkeleton />}>
537- <Show when={memberCount() > 0} fallback={<EmptyState kind="people" title={t("exams.emptyRoster")} />}>
538- <DataTable columns={memberColumns()} data={members() ?? []} filterColumn="username" enablePagination pageSize={10} />
539- </Show>
540- </Suspense>
541- </Show>
542 </TabsContent>498 </TabsContent>
543 </Show>499 </Show>
544 </Tabs>500 </Tabs>
501+ <div class={courseTab() === "notes" ? "" : "hidden"}>
502+ <CourseNotesPanel
503+ courseId={id()}
504+ canManage={canManageCatalog()}
505+ createOpen={showNoteForm()}
506+ onCreateOpenChange={setShowNoteForm}
507+ onCountChange={setNoteCount}
508+ />
509+ </div>
545 </div>510 </div>
546 </Show>511 </Show>
547 </Show>512 </Show>
src/pages/courses-page.tsxmodified+10 -18
@@ -156,16 +156,8 @@ function CoursesContent() {
156 <DataSection156 <DataSection
157 title={pageLabel()}157 title={pageLabel()}
158 description={t("courses.pageSubtitle")}158 description={t("courses.pageSubtitle")}
159- actions={
160- <Show when={canCreate()}>
161- <Button size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => setShowForm(true)}>
162- <IconPlus class="h-4 w-4" />
163- {t("common.createItem", { item: kindInSentence() })}
164- </Button>
165- </Show>
166- }
167 >159 >
168- <div aria-label={t("common.search")}>160+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs" aria-label={t("common.search")}>
169 <DataToolbar161 <DataToolbar
170 inline162 inline
171 searchValue={search()}163 searchValue={search()}
@@ -179,6 +171,14 @@ function CoursesContent() {
179 <option value="untaught">{t("instances.empty")}</option>171 <option value="untaught">{t("instances.empty")}</option>
180 </Select>172 </Select>
181 }173 }
174+ actions={
175+ <Show when={canCreate()}>
176+ <Button type="button" size="sm" class="rounded-lg" onClick={() => setShowForm(true)}>
177+ <IconPlus class="h-4 w-4" />
178+ {t("common.createItem", { item: kindInSentence() })}
179+ </Button>
180+ </Show>
181+ }
182 />182 />
183 </div>183 </div>
184 184
@@ -198,17 +198,9 @@ function CoursesContent() {
198 course={course}198 course={course}
199 sections={t("common.countItem", { count: course.class_course_count, item: t("instances.item") })}199 sections={t("common.countItem", { count: course.class_course_count, item: t("instances.item") })}
200 enrolled={auth.user()?.role === "student"}200 enrolled={auth.user()?.role === "student"}
201- showTeacherActions={hasMinRole(auth.user()?.role, "teacher")}
202 labels={{201 labels={{
203- taughtIn: t("instances.taughtIn"),
204- enrolled: t("courses.enrolled"),
205 kind: courseKindLabel(course.kind, t),202 kind: courseKindLabel(course.kind, t),
206- weeklyHours: t("courses.weeklyHours"),203+ enrolled: t("courses.enrolled"),
207- competency: t("courses.competency"),
208- attendance: t("courses.attendanceRate"),
209- progress: t("courses.progress"),
210- takeAttendance: t("courses.takeAttendance"),
211- analysis: t("courses.analysis"),
212 }}204 }}
213 />205 />
214 )}206 )}
src/pages/dashboard-page.tsxmodified+8 -8
@@ -837,7 +837,7 @@ function DashboardContent() {
837 )}837 )}
838 </For>838 </For>
839 </div>839 </div>
840- <p class="mono text-xs tabular-nums text-text-subtle">{t("dashboard.student.thisWeekTotal", { minutes: String(weeklyFocusTotal()) })}</p>840+ <p class="text-xs tabular-nums text-text-subtle">{t("dashboard.student.thisWeekTotal", { minutes: String(weeklyFocusTotal()) })}</p>
841 </div>841 </div>
842 </Show>842 </Show>
843 </div>843 </div>
@@ -981,19 +981,19 @@ function DashboardContent() {
981 <div class="grid grid-cols-2 gap-2 sm:grid-cols-4">981 <div class="grid grid-cols-2 gap-2 sm:grid-cols-4">
982 <div class="rounded-lg bg-surface-tint px-3 py-2">982 <div class="rounded-lg bg-surface-tint px-3 py-2">
983 <p class="text-xs text-text-subtle">{t("dashboard.attend.present")}</p>983 <p class="text-xs text-text-subtle">{t("dashboard.attend.present")}</p>
984- <p class="mono text-lg font-semibold tabular-nums text-text-strong">{breakdown().present}</p>984+ <p class="text-lg font-semibold tabular-nums text-text-strong">{breakdown().present}</p>
985 </div>985 </div>
986 <div class="rounded-lg bg-surface-tint px-3 py-2">986 <div class="rounded-lg bg-surface-tint px-3 py-2">
987 <p class="text-xs text-text-subtle">{t("dashboard.attend.absent")}</p>987 <p class="text-xs text-text-subtle">{t("dashboard.attend.absent")}</p>
988- <p class="mono text-lg font-semibold tabular-nums text-text-strong">{breakdown().absent}</p>988+ <p class="text-lg font-semibold tabular-nums text-text-strong">{breakdown().absent}</p>
989 </div>989 </div>
990 <div class="rounded-lg bg-surface-tint px-3 py-2">990 <div class="rounded-lg bg-surface-tint px-3 py-2">
991 <p class="text-xs text-text-subtle">{t("dashboard.attend.excused")}</p>991 <p class="text-xs text-text-subtle">{t("dashboard.attend.excused")}</p>
992- <p class="mono text-lg font-semibold tabular-nums text-text-strong">{breakdown().excused}</p>992+ <p class="text-lg font-semibold tabular-nums text-text-strong">{breakdown().excused}</p>
993 </div>993 </div>
994 <div class="rounded-lg bg-surface-tint px-3 py-2">994 <div class="rounded-lg bg-surface-tint px-3 py-2">
995 <p class="text-xs text-text-subtle">{t("dashboard.parent.attendanceRate")}</p>995 <p class="text-xs text-text-subtle">{t("dashboard.parent.attendanceRate")}</p>
996- <p class="mono text-lg font-semibold tabular-nums text-text-strong">{breakdown().rate == null ? "—" : `${breakdown().rate}%`}</p>996+ <p class="text-lg font-semibold tabular-nums text-text-strong">{breakdown().rate == null ? "—" : `${breakdown().rate}%`}</p>
997 </div>997 </div>
998 </div>998 </div>
999 )}999 )}
@@ -1013,14 +1013,14 @@ function DashboardContent() {
1013 >1013 >
1014 {(summary) => (1014 {(summary) => (
1015 <div class="flex flex-col gap-2 pt-1">1015 <div class="flex flex-col gap-2 pt-1">
1016- <p class="mono text-sm tabular-nums text-text-strong">1016+ <p class="text-sm tabular-nums text-text-strong">
1017 {t("dashboard.parent.installmentsPaid", { paid: String(summary().paidCount), total: String(summary().total) })}1017 {t("dashboard.parent.installmentsPaid", { paid: String(summary().paidCount), total: String(summary().total) })}
1018 </p>1018 </p>
1019- <p class="text-xs text-text-subtle">{t("dashboard.parent.balance")}: <span class="mono tabular-nums text-text-default">{formatTry(summary().balanceMinor, locale() === "tr" ? "tr-TR" : "en-US")}</span></p>1019+ <p class="text-xs text-text-subtle">{t("dashboard.parent.balance")}: <span class="tabular-nums text-text-default">{formatTry(summary().balanceMinor, locale() === "tr" ? "tr-TR" : "en-US")}</span></p>
1020 <Show when={summary().next}>1020 <Show when={summary().next}>
1021 {(next) => (1021 {(next) => (
1022 <p class="text-xs text-text-subtle">1022 <p class="text-xs text-text-subtle">
1023- {t("dashboard.parent.nextInstallment")}: {formatDateTime(next().due_at!, locale())} · <span class="mono tabular-nums text-text-default">{formatTry(next().amount_minor, locale() === "tr" ? "tr-TR" : "en-US")}</span>1023+ {t("dashboard.parent.nextInstallment")}: {formatDateTime(next().due_at!, locale())} · <span class="tabular-nums text-text-default">{formatTry(next().amount_minor, locale() === "tr" ? "tr-TR" : "en-US")}</span>
1024 </p>1024 </p>
1025 )}1025 )}
1026 </Show>1026 </Show>
src/pages/event-detail-page.tsxmodified+50 -33
@@ -25,6 +25,7 @@ import { Badge } from "@/components/ui/badge";
25 import { Button } from "@/components/ui/button";25 import { Button } from "@/components/ui/button";
26 import { ConfirmDialog } from "@/components/ui/confirm-dialog";26 import { ConfirmDialog } from "@/components/ui/confirm-dialog";
27 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";27 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";
28+import { DataToolbar } from "@/components/ui/data-toolbar";
28 import { EmptyState } from "@/components/ui/empty-state";29 import { EmptyState } from "@/components/ui/empty-state";
29 import { IconEdit, IconTrash } from "@/components/ui/icons";30 import { IconEdit, IconTrash } from "@/components/ui/icons";
30 import { PageSpinner } from "@/components/ui/page-spinner";31 import { PageSpinner } from "@/components/ui/page-spinner";
@@ -37,6 +38,7 @@ import { cn } from "@/lib/cn";
37 import { createFlash } from "@/lib/flash";38 import { createFlash } from "@/lib/flash";
38 import { formatDateTime } from "@/lib/format";39 import { formatDateTime } from "@/lib/format";
39 import { personId, personLabel } from "@/lib/person";40 import { personId, personLabel } from "@/lib/person";
41+import { matchesSearch } from "@/lib/search-text";
40 import { hasMinRole } from "@/lib/roles";42 import { hasMinRole } from "@/lib/roles";
41 import { useAuth } from "@/stores/auth-context";43 import { useAuth } from "@/stores/auth-context";
42 import { usePreferences, useT } from "@/stores/preferences-context";44 import { usePreferences, useT } from "@/stores/preferences-context";
@@ -74,6 +76,7 @@ function EventDetailContent() {
74 const [editing, setEditing] = createSignal(false);76 const [editing, setEditing] = createSignal(false);
75 const [deleteOpen, setDeleteOpen] = createSignal(false);77 const [deleteOpen, setDeleteOpen] = createSignal(false);
76 const [registrationTarget, setRegistrationTarget] = createSignal<string | null>(null);78 const [registrationTarget, setRegistrationTarget] = createSignal<string | null>(null);
79+ const [rosterSearch, setRosterSearch] = createSignal("");
77 const [eventTab, setEventTab] = createSignal("studentAttendance");80 const [eventTab, setEventTab] = createSignal("studentAttendance");
78 const [error, setError] = createSignal("");81 const [error, setError] = createSignal("");
79 const [pending, setPending] = createSignal(false);82 const [pending, setPending] = createSignal(false);
@@ -89,6 +92,11 @@ function EventDetailContent() {
89 () => (isTeacherPlus() ? id() : null),92 () => (isTeacherPlus() ? id() : null),
90 async (eventId) => (eventId ? (await getEventAttendance(eventId)).items : []),93 async (eventId) => (eventId ? (await getEventAttendance(eventId)).items : []),
91 );94 );
95+ const visibleRoster = createMemo(() => {
96+ const query = rosterSearch().trim();
97+ const rows = roster() ?? [];
98+ return query ? rows.filter((row) => matchesSearch(query, personLabel(row.user))) : rows;
99+ });
92 100
93 const canManage = () => {101 const canManage = () => {
94 const e = event();102 const e = event();
@@ -166,12 +174,12 @@ function EventDetailContent() {
166 }174 }
167 >175 >
168 {(ev) => (176 {(ev) => (
169- <div class="space-y-6">177+ <div class="space-y-5">
170- <div class="space-y-2">178+ <section class="rounded-xl border border-border-line bg-surface-base px-4 py-3 shadow-xs sm:px-5">
171 <Breadcrumbs items={[{ label: t("events.title"), to: "/events" }, { label: ev().title }]} />179 <Breadcrumbs items={[{ label: t("events.title"), to: "/events" }, { label: ev().title }]} />
172 <PageHeader180 <PageHeader
173 title={ev().title}181 title={ev().title}
174- description={ev().description || "—"}182+ description={ev().description || undefined}
175 actions={183 actions={
176 canManage() ? (184 canManage() ? (
177 <div class="detail-action-group">185 <div class="detail-action-group">
@@ -187,21 +195,21 @@ function EventDetailContent() {
187 ) : undefined195 ) : undefined
188 }196 }
189 />197 />
190- <div class="grid gap-3 text-sm sm:grid-cols-3">198+ <div class="grid gap-3 border-t border-border-hairline pt-3 text-sm sm:grid-cols-3">
191 <div class="detail-metric-card">199 <div class="detail-metric-card">
192 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("events.audience")}</p>200 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("events.audience")}</p>
193 <p class="mt-1 font-medium">{audienceLabel(ev().audience, t)}</p>201 <p class="mt-1 font-medium">{audienceLabel(ev().audience, t)}</p>
194 </div>202 </div>
195 <div class="detail-metric-card">203 <div class="detail-metric-card">
196 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("events.starts")}</p>204 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("events.starts")}</p>
197- <p class="mono mt-1 font-medium">{formatDateTime(ev().starts_at, locale())}</p>205+ <p class="mt-1 font-medium">{formatDateTime(ev().starts_at, locale())}</p>
198 </div>206 </div>
199 <div class="detail-metric-card">207 <div class="detail-metric-card">
200 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("events.ends")}</p>208 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("events.ends")}</p>
201- <p class="mono mt-1 font-medium">{formatDateTime(ev().ends_at, locale())}</p>209+ <p class="mt-1 font-medium">{formatDateTime(ev().ends_at, locale())}</p>
202 </div>210 </div>
203 </div>211 </div>
204- </div>212+ </section>
205 213
206 <ConfirmDialog214 <ConfirmDialog
207 open={deleteOpen()}215 open={deleteOpen()}
@@ -263,19 +271,20 @@ function EventDetailContent() {
263 />271 />
264 272
265 <Show when={isTeacherPlus()}>273 <Show when={isTeacherPlus()}>
266- <Tabs value={eventTab()} onChange={setEventTab} class="space-y-3">274+ <Tabs value={eventTab()} onChange={setEventTab} class="space-y-4">
267- <TabsList>275+ <TabsList class={cn("w-full justify-start gap-0 overflow-x-auto rounded-lg border-border-line bg-surface-base p-0 shadow-none sm:grid", ev().audience.kind === "registration" ? "sm:grid-cols-3" : "sm:grid-cols-2")}>
268 <Show when={ev().audience.kind === "registration"}>276 <Show when={ev().audience.kind === "registration"}>
269- <TabsTrigger value="registration">{t("events.registrationRoster")}</TabsTrigger>277+ <TabsTrigger value="registration" class="min-w-0 rounded-none border-r border-border-line last:border-r-0 data-selected:border-b-2 data-selected:border-b-primary data-selected:bg-surface-base data-selected:shadow-none">{t("events.registrationRoster")}</TabsTrigger>
270 </Show>278 </Show>
271- <TabsTrigger value="studentAttendance">{t("events.studentAttendance")}</TabsTrigger>279+ <TabsTrigger value="studentAttendance" class="min-w-0 rounded-none border-r border-border-line last:border-r-0 data-selected:border-b-2 data-selected:border-b-primary data-selected:bg-surface-base data-selected:shadow-none">{t("events.studentAttendance")}</TabsTrigger>
272- <TabsTrigger value="attendanceRecords">{t("events.attendanceRecords")}</TabsTrigger>280+ <TabsTrigger value="attendanceRecords" class="min-w-0 rounded-none border-r border-border-line last:border-r-0 data-selected:border-b-2 data-selected:border-b-primary data-selected:bg-surface-base data-selected:shadow-none">{t("events.attendanceRecords")}</TabsTrigger>
273 </TabsList>281 </TabsList>
274 282
275 <Show when={ev().audience.kind === "registration"}>283 <Show when={ev().audience.kind === "registration"}>
276 <TabsContent value="registration" forceMount class="space-y-3">284 <TabsContent value="registration" forceMount class="space-y-3">
277- <p class="tab-panel-note">{t("events.registrationRosterHelp")}</p>285+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
278- <div class="grid gap-3 rounded-lg border bg-muted/20 p-3 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end">286+ <p class="mb-3 text-sm text-muted-foreground">{t("events.registrationRosterHelp")}</p>
287+ <div class="grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end">
279 <UserSearchSelect id="registration-user" label={t("events.attendee")} value={registrationUserId()} placeholder={t("events.selectAttendee")} emptyMessage={t("events.noAttendees")} role="student" onChange={setRegistrationUserId} />288 <UserSearchSelect id="registration-user" label={t("events.attendee")} value={registrationUserId()} placeholder={t("events.selectAttendee")} emptyMessage={t("events.noAttendees")} role="student" onChange={setRegistrationUserId} />
280 <Button289 <Button
281 type="button"290 type="button"
@@ -296,22 +305,25 @@ function EventDetailContent() {
296 >305 >
297 {t("events.registerStudent")}306 {t("events.registerStudent")}
298 </Button>307 </Button>
308+ </div>
309+ </div>
310+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs">
311+ <DataToolbar searchValue={rosterSearch()} searchPlaceholder={t("common.searchPlaceholder")} onSearchInput={setRosterSearch} />
299 </div>312 </div>
300 <Suspense fallback={<DataTableSkeleton columns={4} />}>313 <Suspense fallback={<DataTableSkeleton columns={4} />}>
301 <Show when={roster()}>314 <Show when={roster()}>
302- {(rows) => (315+ <Show when={visibleRoster().length > 0} fallback={<EmptyState kind="events" title={t("events.noRoster")} />}>
303- <Show when={rows().length > 0} fallback={<EmptyState kind="events" title={t("events.noRoster")} />}>316+ <DataTable columns={rosterColumns()} data={visibleRoster()} enablePagination pageSize={10} />
304- <DataTable columns={rosterColumns()} data={rows()} filterColumn="attendee" enablePagination pageSize={10} />317+ </Show>
305- </Show>
306- )}
307 </Show>318 </Show>
308 </Suspense>319 </Suspense>
309 </TabsContent>320 </TabsContent>
310 </Show>321 </Show>
311 322
312 <TabsContent value="studentAttendance" forceMount class="space-y-3">323 <TabsContent value="studentAttendance" forceMount class="space-y-3">
313- <p class="tab-panel-note">{t("events.studentAttendanceHelp")}</p>324+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
314- <div class="grid gap-3">325+ <p class="mb-3 text-sm text-muted-foreground">{t("events.studentAttendanceHelp")}</p>
326+ <div class="grid gap-3">
315 <UserSearchSelect id="other-user" label={t("events.attendee")} value={otherUserId()} placeholder={t("events.selectAttendee")} emptyMessage={t("events.noAttendees")} role="student" onChange={setOtherUserId} />327 <UserSearchSelect id="other-user" label={t("events.attendee")} value={otherUserId()} placeholder={t("events.selectAttendee")} emptyMessage={t("events.noAttendees")} role="student" onChange={setOtherUserId} />
316 <AttendanceStatusPicker id="other-status" value={status()} onChange={setStatus} label={t("events.status")} />328 <AttendanceStatusPicker id="other-status" value={status()} onChange={setStatus} label={t("events.status")} />
317 <Button329 <Button
@@ -333,25 +345,30 @@ function EventDetailContent() {
333 >345 >
334 {t("events.saveStudentAttendance")}346 {t("events.saveStudentAttendance")}
335 </Button>347 </Button>
348+ </div>
336 </div>349 </div>
337 </TabsContent>350 </TabsContent>
338 351
339 <TabsContent value="attendanceRecords" forceMount class="space-y-3">352 <TabsContent value="attendanceRecords" forceMount class="space-y-3">
340- <p class="tab-panel-note">{t("events.attendanceRecordsHelp")}</p>
341 <Suspense fallback={<DataTableSkeleton columns={4} />}>353 <Suspense fallback={<DataTableSkeleton columns={4} />}>
342 <Show when={attendance()}>354 <Show when={attendance()}>
343 {(rows) => (355 {(rows) => (
344- <AttendanceTable356+ <div class="space-y-3">
345- rows={rows()}357+ <div class="rounded-xl border border-border-line bg-surface-base p-3 text-sm text-muted-foreground shadow-xs">
346- emptyLabel={t("events.noAttendance")}358+ {t("events.attendanceRecordsHelp")}
347- canRemove={isTeacherPlus()}359+ </div>
348- onRemove={async (userId) => {360+ <AttendanceTable
349- await wrap(async () => {361+ rows={rows()}
350- await deleteEventAttendanceByUserId(id(), userId);362+ emptyLabel={t("events.noAttendance")}
351- await refetchAttendance();363+ canRemove={isTeacherPlus()}
352- }, t("common.deleted"));364+ onRemove={async (userId) => {
353- }}365+ await wrap(async () => {
354- />366+ await deleteEventAttendanceByUserId(id(), userId);
367+ await refetchAttendance();
368+ }, t("common.deleted"));
369+ }}
370+ />
371+ </div>
355 )}372 )}
356 </Show>373 </Show>
357 </Suspense>374 </Suspense>
src/pages/events-page.tsxmodified+9 -4
@@ -98,12 +98,13 @@ function EventsContent() {
98 {98 {
99 accessorKey: "title",99 accessorKey: "title",
100 header: t("events.title"),100 header: t("events.title"),
101+ size: 220,
102+ minSize: 180,
101 cell: (cell) => (103 cell: (cell) => (
102 <div class="min-w-0">104 <div class="min-w-0">
103 <Link to="/events/$id" params={{ id: cell.row.original.id }} class="truncate font-medium hover:text-primary-text hover:underline">105 <Link to="/events/$id" params={{ id: cell.row.original.id }} class="truncate font-medium hover:text-primary-text hover:underline">
104 {cell.row.original.title}106 {cell.row.original.title}
105 </Link>107 </Link>
106- <p class="truncate text-xs text-muted-foreground">{cell.row.original.description || "—"}</p>
107 </div>108 </div>
108 ),109 ),
109 },110 },
@@ -111,7 +112,9 @@ function EventsContent() {
111 id: "time",112 id: "time",
112 accessorFn: (event) => event.starts_at ?? event.ends_at ?? 0,113 accessorFn: (event) => event.starts_at ?? event.ends_at ?? 0,
113 header: t("events.starts"),114 header: t("events.starts"),
114- meta: { cellClass: "mono text-xs text-muted-foreground" },115+ size: 190,
116+ minSize: 160,
117+ meta: { cellClass: "text-xs text-muted-foreground" },
115 cell: (cell) => (118 cell: (cell) => (
116 <div class="whitespace-nowrap">119 <div class="whitespace-nowrap">
117 <p>{formatDateTime(cell.row.original.starts_at, locale())}</p>120 <p>{formatDateTime(cell.row.original.starts_at, locale())}</p>
@@ -125,6 +128,8 @@ function EventsContent() {
125 id: "audience",128 id: "audience",
126 accessorFn: (event) => audienceLabel(event.audience),129 accessorFn: (event) => audienceLabel(event.audience),
127 header: t("events.audience"),130 header: t("events.audience"),
131+ size: 140,
132+ minSize: 120,
128 cell: (cell) => <Badge variant="outline" class="rounded-full">{audienceLabel(cell.row.original.audience)}</Badge>,133 cell: (cell) => <Badge variant="outline" class="rounded-full">{audienceLabel(cell.row.original.audience)}</Badge>,
129 },134 },
130 {135 {
@@ -197,7 +202,7 @@ function EventsContent() {
197 <Alert variant="destructive">{error()}</Alert>202 <Alert variant="destructive">{error()}</Alert>
198 </Show>203 </Show>
199 204
200- <section class="data-shell space-y-4 p-4">205+ <section class="space-y-4 p-0">
201 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>206 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>
202 <Show when={list.error}>207 <Show when={list.error}>
203 <Alert variant="destructive">{formatApiError(list.error)}</Alert>208 <Alert variant="destructive">{formatApiError(list.error)}</Alert>
@@ -221,7 +226,7 @@ function EventsContent() {
221 }226 }
222 columns={columns()}227 columns={columns()}
223 data={rows()}228 data={rows()}
224- tableClass="table-fixed min-w-232"229+ tableClass="table-fixed min-w-[42rem]"
225 searchPredicate={searchEvent}230 searchPredicate={searchEvent}
226 filterHint={t("search.hint.events")}231 filterHint={t("search.hint.events")}
227 enablePagination232 enablePagination
src/pages/exam-detail-page.tsxmodified+6 -6
@@ -477,7 +477,7 @@ function ExamDetailContent() {
477 </span>477 </span>
478 <div class="min-w-0">478 <div class="min-w-0">
479 <p class="text-xs font-medium text-muted-foreground">{t("exams.maxAttempts")}</p>479 <p class="text-xs font-medium text-muted-foreground">{t("exams.maxAttempts")}</p>
480- <p class="mono truncate text-sm font-semibold">480+ <p class="truncate text-sm font-semibold">
481 <Show when={isStudent()} fallback={ex().max_attempts}>481 <Show when={isStudent()} fallback={ex().max_attempts}>
482 {ownAttemptSummary() ? `${ownAttemptSummary()!.attempts_used} / ${ex().max_attempts}` : `0 / ${ex().max_attempts}`}482 {ownAttemptSummary() ? `${ownAttemptSummary()!.attempts_used} / ${ex().max_attempts}` : `0 / ${ex().max_attempts}`}
483 </Show>483 </Show>
@@ -507,7 +507,7 @@ function ExamDetailContent() {
507 </span>507 </span>
508 <div class="min-w-0">508 <div class="min-w-0">
509 <p class="text-xs font-medium text-muted-foreground">{t("exams.durationMinutes")}</p>509 <p class="text-xs font-medium text-muted-foreground">{t("exams.durationMinutes")}</p>
510- <p class="mono truncate text-sm font-semibold">510+ <p class="truncate text-sm font-semibold">
511 {formatDurationMinutes(examDurationMs(ex().duration_ms, ex().starts_at, ex().ends_at), locale())}511 {formatDurationMinutes(examDurationMs(ex().duration_ms, ex().starts_at, ex().ends_at), locale())}
512 </p>512 </p>
513 </div>513 </div>
@@ -672,19 +672,19 @@ function ExamDetailContent() {
672 <div class="grid gap-2 text-sm sm:grid-cols-2 lg:grid-cols-4">672 <div class="grid gap-2 text-sm sm:grid-cols-2 lg:grid-cols-4">
673 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">673 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">
674 <p class="text-xs font-medium text-text-subtle">{t("exams.graded")}</p>674 <p class="text-xs font-medium text-text-subtle">{t("exams.graded")}</p>
675- <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().graded}</p>675+ <p class="mt-1 text-2xl font-semibold tabular-nums">{s().graded}</p>
676 </div>676 </div>
677 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">677 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">
678 <p class="text-xs font-medium text-text-subtle">{t("exams.average")}</p>678 <p class="text-xs font-medium text-text-subtle">{t("exams.average")}</p>
679- <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().average == null ? "—" : s().average}</p>679+ <p class="mt-1 text-2xl font-semibold tabular-nums">{s().average == null ? "—" : s().average}</p>
680 </div>680 </div>
681 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">681 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">
682 <p class="text-xs font-medium text-text-subtle">{t("exams.min")}</p>682 <p class="text-xs font-medium text-text-subtle">{t("exams.min")}</p>
683- <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().min == null ? "—" : s().min}</p>683+ <p class="mt-1 text-2xl font-semibold tabular-nums">{s().min == null ? "—" : s().min}</p>
684 </div>684 </div>
685 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">685 <div class="rounded-xl border border-border-line bg-surface-overlay p-4">
686 <p class="text-xs font-medium text-text-subtle">{t("exams.max")}</p>686 <p class="text-xs font-medium text-text-subtle">{t("exams.max")}</p>
687- <p class="mono mt-1 text-2xl font-semibold tabular-nums">{s().max == null ? "—" : s().max}</p>687+ <p class="mt-1 text-2xl font-semibold tabular-nums">{s().max == null ? "—" : s().max}</p>
688 </div>688 </div>
689 </div>689 </div>
690 )}690 )}
src/pages/exams-page.tsxmodified+11 -4
@@ -177,10 +177,11 @@ function ExamsContent() {
177 {177 {
178 accessorKey: "title",178 accessorKey: "title",
179 header: t("exams.title"),179 header: t("exams.title"),
180+ size: 220,
181+ minSize: 180,
180 cell: (cell) => (182 cell: (cell) => (
181 <div class="min-w-0">183 <div class="min-w-0">
182 <p class="truncate font-medium">{cell.row.original.title}</p>184 <p class="truncate font-medium">{cell.row.original.title}</p>
183- <p class="truncate text-xs text-muted-foreground">{cell.row.original.description || "—"}</p>
184 </div>185 </div>
185 ),186 ),
186 },187 },
@@ -188,19 +189,25 @@ function ExamsContent() {
188 id: "course",189 id: "course",
189 accessorFn: (exam) => courseTitle(exam.class_course),190 accessorFn: (exam) => courseTitle(exam.class_course),
190 header: t("instances.title"),191 header: t("instances.title"),
192+ size: 180,
193+ minSize: 140,
191 meta: { cellClass: "truncate text-muted-foreground" },194 meta: { cellClass: "truncate text-muted-foreground" },
192 cell: (cell) => courseTitle(cell.row.original.class_course),195 cell: (cell) => courseTitle(cell.row.original.class_course),
193 },196 },
194 {197 {
195 accessorKey: "starts_at",198 accessorKey: "starts_at",
196 header: t("events.starts"),199 header: t("events.starts"),
197- meta: { cellClass: "mono whitespace-nowrap text-muted-foreground" },200+ size: 160,
201+ minSize: 140,
202+ meta: { cellClass: "whitespace-nowrap text-muted-foreground" },
198 cell: (cell) => formatDateTime(cell.row.original.starts_at, locale()),203 cell: (cell) => formatDateTime(cell.row.original.starts_at, locale()),
199 },204 },
200 {205 {
201 id: "status",206 id: "status",
202 accessorFn: (exam) => statusLabel(exam.displayStatus),207 accessorFn: (exam) => statusLabel(exam.displayStatus),
203 header: t("attempt.status"),208 header: t("attempt.status"),
209+ size: 130,
210+ minSize: 110,
204 meta: { headerClass: "text-center", cellClass: "text-center" },211 meta: { headerClass: "text-center", cellClass: "text-center" },
205 cell: (cell) => {212 cell: (cell) => {
206 const status = cell.row.original.displayStatus;213 const status = cell.row.original.displayStatus;
@@ -308,7 +315,7 @@ function ExamsContent() {
308 </TabsList>315 </TabsList>
309 316
310 <TabsContent value={tab()} class="mt-4 border-0 bg-transparent p-0 shadow-none">317 <TabsContent value={tab()} class="mt-4 border-0 bg-transparent p-0 shadow-none">
311- <section class="data-shell space-y-4 p-4">318+ <section class="space-y-4 p-0">
312 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>319 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>
313 <Show when={list.error}>320 <Show when={list.error}>
314 <Alert variant="destructive">{formatApiError(list.error)}</Alert>321 <Alert variant="destructive">{formatApiError(list.error)}</Alert>
@@ -332,7 +339,7 @@ function ExamsContent() {
332 }339 }
333 columns={columns()}340 columns={columns()}
334 data={rows()}341 data={rows()}
335- tableClass="table-fixed min-w-5xl"342+ tableClass="table-fixed min-w-[46rem]"
336 filterPlaceholder={t("exams.searchPlaceholder")}343 filterPlaceholder={t("exams.searchPlaceholder")}
337 filterHint={t("search.hint.exams")}344 filterHint={t("search.hint.exams")}
338 searchPredicate={searchExam}345 searchPredicate={searchExam}
src/pages/homework-detail-page.tsxmodified+1 -1
@@ -66,7 +66,7 @@ export default function HomeworkDetailPage() {
66 </div>66 </div>
67 <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4">67 <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4">
68 <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("homework.dueAt")}</p>68 <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("homework.dueAt")}</p>
69- <p class="mono mt-1 font-medium tabular-nums text-text-default">{formatDateTime(item().due_at, locale())}</p>69+ <p class="mt-1 font-medium text-text-default">{formatDateTime(item().due_at, locale())}</p>
70 </div>70 </div>
71 <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4">71 <div class="rounded-xl border border-border-line bg-surface-base px-4 py-4">
72 <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("homework.assigned")}</p>72 <p class="text-xs font-medium uppercase tracking-[0.08em] text-text-subtle">{t("homework.assigned")}</p>
src/pages/homework-page.tsxmodified+34 -30
@@ -163,11 +163,12 @@ function HomeworkContent() {
163 {163 {
164 accessorKey: "title",164 accessorKey: "title",
165 header: t("form.title"),165 header: t("form.title"),
166+ size: 220,
167+ minSize: 180,
166 meta: { cellClass: "font-medium" },168 meta: { cellClass: "font-medium" },
167 cell: (cell) => (169 cell: (cell) => (
168 <div class="min-w-0">170 <div class="min-w-0">
169 <p class="truncate font-medium">{cell.row.original.title}</p>171 <p class="truncate font-medium">{cell.row.original.title}</p>
170- <p class="truncate text-xs text-text-subtle">{cell.row.original.description || "—"}</p>
171 </div>172 </div>
172 ),173 ),
173 },174 },
@@ -175,6 +176,8 @@ function HomeworkContent() {
175 id: "course",176 id: "course",
176 accessorFn: (row) => courseName(row.class_course),177 accessorFn: (row) => courseName(row.class_course),
177 header: t("nav.courses"),178 header: t("nav.courses"),
179+ size: 180,
180+ minSize: 140,
178 meta: { cellClass: "max-w-0 truncate text-text-subtle" },181 meta: { cellClass: "max-w-0 truncate text-text-subtle" },
179 cell: (cell) => <span class="block truncate">{courseName(cell.row.original.class_course)}</span>,182 cell: (cell) => <span class="block truncate">{courseName(cell.row.original.class_course)}</span>,
180 },183 },
@@ -182,13 +185,17 @@ function HomeworkContent() {
182 id: "due_at",185 id: "due_at",
183 accessorFn: (row) => row.due_at,186 accessorFn: (row) => row.due_at,
184 header: t("homework.dueAt"),187 header: t("homework.dueAt"),
185- meta: { cellClass: "mono whitespace-nowrap text-text-subtle" },188+ size: 150,
189+ minSize: 130,
190+ meta: { cellClass: "whitespace-nowrap text-text-subtle" },
186 cell: (cell) => formatDateTime(cell.row.original.due_at, locale()),191 cell: (cell) => formatDateTime(cell.row.original.due_at, locale()),
187 },192 },
188 {193 {
189 id: "assigned",194 id: "assigned",
190 accessorFn: (row) => row.assigned?.length ?? 0,195 accessorFn: (row) => row.assigned?.length ?? 0,
191 header: t("homework.assigned"),196 header: t("homework.assigned"),
197+ size: 150,
198+ minSize: 120,
192 cell: (cell) => cell.row.original.assigned?.length ? t("common.countItem", { count: cell.row.original.assigned.length, item: t("courses.rosterItem") }) : t("homework.wholeCourse"),199 cell: (cell) => cell.row.original.assigned?.length ? t("common.countItem", { count: cell.row.original.assigned.length, item: t("courses.rosterItem") }) : t("homework.wholeCourse"),
193 },200 },
194 {201 {
@@ -253,34 +260,31 @@ function HomeworkContent() {
253 </TabsList>260 </TabsList>
254 261
255 <TabsContent value={dueTab()} class="mt-4 border-0 bg-transparent p-0 shadow-none">262 <TabsContent value={dueTab()} class="mt-4 border-0 bg-transparent p-0 shadow-none">
256- <section class="data-shell space-y-4 p-4">263+ <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>
257- <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>264+ <Show when={list.error}>
258- <Show when={list.error}>265+ <Alert variant="destructive">{formatApiError(list.error)}</Alert>
259- <Alert variant="destructive">{formatApiError(list.error)}</Alert>266+ </Show>
260- </Show>267+ <DataTable
261- <DataTable268+ columns={columns()}
262- title={pageTitle()}269+ data={dueFilteredList()}
263- description={t("homework.listHelp")}270+ tableClass="table-fixed min-w-[44rem]"
264- actions={271+ filterColumn="title"
265- <Show when={canCreate()}>272+ filterHint={t("search.hint.homework")}
266- <Button type="button" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => setCreateOpen(true)}>273+ enablePagination
267- <IconPlus class="h-4 w-4" />274+ pageSize={10}
268- {t("homework.add")}275+ empty={t("homework.empty")}
269- </Button>276+ storageKey="homework"
270- </Show>277+ actions={
271- }278+ <Show when={canCreate()}>
272- columns={columns()}279+ <Button type="button" size="sm" class="rounded-lg" onClick={() => setCreateOpen(true)}>
273- data={dueFilteredList()}280+ <IconPlus class="h-4 w-4" />
274- tableClass="table-fixed min-w-5xl"281+ {t("homework.add")}
275- filterColumn="title"282+ </Button>
276- enablePagination283+ </Show>
277- pageSize={10}284+ }
278- empty={t("homework.empty")}285+ onRowClick={(item) => void navigate({ to: "/homework/$id", params: { id: item.id } })}
279- storageKey="homework"286+ />
280- onRowClick={(item) => void navigate({ to: "/homework/$id", params: { id: item.id } })}287+ </Suspense>
281- />
282- </Suspense>
283- </section>
284 </TabsContent>288 </TabsContent>
285 </Tabs>289 </Tabs>
286 </div>290 </div>
src/pages/instance-detail-page.tsxmodified+3 -3
@@ -287,7 +287,7 @@ function InstanceDetailContent() {
287 <p class="text-xs font-medium text-text-subtle">{t("instances.dersSaati")}</p>287 <p class="text-xs font-medium text-text-subtle">{t("instances.dersSaati")}</p>
288 <Show288 <Show
289 when={canManage()}289 when={canManage()}
290- fallback={<p class="mono truncate text-sm font-semibold text-text-default">{inst().ders_saati}</p>}290+ fallback={<p class="truncate text-sm font-semibold text-text-default">{inst().ders_saati}</p>}
291 >291 >
292 <Input292 <Input
293 aria-label={t("instances.dersSaati")}293 aria-label={t("instances.dersSaati")}
@@ -339,7 +339,7 @@ function InstanceDetailContent() {
339 </span>339 </span>
340 <div class="min-w-0">340 <div class="min-w-0">
341 <p class="text-xs font-medium text-text-subtle">{t("courses.roster")}</p>341 <p class="text-xs font-medium text-text-subtle">{t("courses.roster")}</p>
342- <p class="mono truncate text-sm font-semibold text-text-default">{inst().enrollment_count}</p>342+ <p class="truncate text-sm font-semibold text-text-default">{inst().enrollment_count}</p>
343 </div>343 </div>
344 </div>344 </div>
345 <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3">345 <div class="flex min-w-0 items-center gap-3 rounded-xl border border-border-line bg-surface-base p-3">
@@ -348,7 +348,7 @@ function InstanceDetailContent() {
348 </span>348 </span>
349 <div class="min-w-0">349 <div class="min-w-0">
350 <p class="text-xs font-medium text-text-subtle">{t("courses.exams")}</p>350 <p class="text-xs font-medium text-text-subtle">{t("courses.exams")}</p>
351- <p class="mono truncate text-sm font-semibold text-text-default">{examCount()}</p>351+ <p class="truncate text-sm font-semibold text-text-default">{examCount()}</p>
352 </div>352 </div>
353 </div>353 </div>
354 </div>354 </div>
src/pages/license-modules-page.tsxmodified+1 -1
@@ -134,7 +134,7 @@ function LicenseModulesContent() {
134 </div>134 </div>
135 </section>135 </section>
136 136
137- <section class="data-shell space-y-4 p-4">137+ <section class="space-y-4 p-0">
138 <DataTable138 <DataTable
139 title={t("nav.licenseModules")}139 title={t("nav.licenseModules")}
140 description={t("modules.subtitle")}140 description={t("modules.subtitle")}
src/pages/live-monitor-page.tsxmodified+2 -2
@@ -307,7 +307,7 @@ function LiveMonitorContent() {
307 </div>307 </div>
308 </section>308 </section>
309 309
310- <section class="data-shell space-y-4 p-5">310+ <section class="space-y-4 p-0">
311 <div class="flex flex-wrap items-center justify-between gap-3">311 <div class="flex flex-wrap items-center justify-between gap-3">
312 <div>312 <div>
313 <h2 class="text-lg font-semibold">{t("exams.liveRoster")}</h2>313 <h2 class="text-lg font-semibold">{t("exams.liveRoster")}</h2>
@@ -343,7 +343,7 @@ function LiveMonitorContent() {
343 {(row) => (343 {(row) => (
344 <div class="grid gap-4 sm:grid-cols-2">344 <div class="grid gap-4 sm:grid-cols-2">
345 <DetailField label={t("attempt.attempt")} value={attemptLabel(row, snapshot()?.exam.max_attempts ?? 0)} />345 <DetailField label={t("attempt.attempt")} value={attemptLabel(row, snapshot()?.exam.max_attempts ?? 0)} />
346- <DetailField label={t("marks.mark")} value={row.mark == null ? "—" : String(row.mark)} mono />346+ <DetailField label={t("marks.mark")} value={row.mark == null ? "—" : String(row.mark)} />
347 <DetailField label={t("events.starts")} value={formatDateTime(row.started_at, locale())} />347 <DetailField label={t("events.starts")} value={formatDateTime(row.started_at, locale())} />
348 <DetailField label={t("events.ends")} value={formatDateTime(row.finished_at, locale())} />348 <DetailField label={t("events.ends")} value={formatDateTime(row.finished_at, locale())} />
349 <DetailField label={t("attempt.left")} value={formatDateTime(row.left_at, locale())} />349 <DetailField label={t("attempt.left")} value={formatDateTime(row.left_at, locale())} />
src/pages/meal-detail-page.tsxmodified+1 -1
@@ -199,7 +199,7 @@ function MealDetailContent() {
199 199
200 <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">200 <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
201 <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.total")}</p><p class="mt-1 font-semibold">{formatTry(total(), moneyLocale())}</p></div>201 <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.total")}</p><p class="mt-1 font-semibold">{formatTry(total(), moneyLocale())}</p></div>
202- <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.capacity")}</p><p class="mono mt-1 font-semibold">{current().capacity ?? "∞"}</p></div>202+ <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.capacity")}</p><p class="mt-1 font-semibold">{current().capacity ?? "∞"}</p></div>
203 <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.cutoff")}</p><p class="mt-1 font-semibold">{cutoff() == null ? t("meals.noCutoff") : formatDateTime(cutoff(), locale())}</p></div>203 <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.cutoff")}</p><p class="mt-1 font-semibold">{cutoff() == null ? t("meals.noCutoff") : formatDateTime(cutoff(), locale())}</p></div>
204 <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.bookingStatus")}</p><p class="mt-1 font-semibold">{cutoffClosed() ? t("meals.closed") : t("meals.open")}</p></div>204 <div class="detail-metric-card"><p class="text-xs uppercase text-muted-foreground">{t("meals.bookingStatus")}</p><p class="mt-1 font-semibold">{cutoffClosed() ? t("meals.closed") : t("meals.open")}</p></div>
205 </div>205 </div>
src/pages/my-students-page.tsxmodified+2 -2
@@ -172,13 +172,13 @@ function StudentDetailPanel(props: { student: PersonRef | null; initialTab: Stud
172 {172 {
173 accessorKey: "weight",173 accessorKey: "weight",
174 header: t("marks.weight"),174 header: t("marks.weight"),
175- meta: { align: "right", cellClass: "mono tabular-nums" },175+ meta: { align: "right", cellClass: "tabular-nums" },
176 cell: (cell) => cell.row.original.weight,176 cell: (cell) => cell.row.original.weight,
177 },177 },
178 {178 {
179 accessorKey: "mark",179 accessorKey: "mark",
180 header: t("marks.mark"),180 header: t("marks.mark"),
181- meta: { align: "right", cellClass: "mono font-semibold tabular-nums" },181+ meta: { align: "right", cellClass: "font-semibold tabular-nums" },
182 cell: (cell) => formatNumber(cell.row.original.mark),182 cell: (cell) => formatNumber(cell.row.original.mark),
183 },183 },
184 ]);184 ]);
src/pages/payment-statement-page.tsxmodified+4 -4
@@ -80,7 +80,7 @@ function StatementContent() {
80 {80 {
81 accessorKey: "due_at",81 accessorKey: "due_at",
82 header: t("payments.due"),82 header: t("payments.due"),
83- cell: (cell) => <span class="mono block whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive-text": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,83+ cell: (cell) => <span class="block whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive-text": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,
84 },84 },
85 {85 {
86 accessorKey: "outstanding_minor",86 accessorKey: "outstanding_minor",
@@ -127,7 +127,7 @@ function StatementContent() {
127 <section class="data-shell p-4">127 <section class="data-shell p-4">
128 <div class="flex flex-wrap items-baseline justify-between gap-2">128 <div class="flex flex-wrap items-baseline justify-between gap-2">
129 <p class="text-sm font-medium text-text-subtle">{t("payments.collected")}</p>129 <p class="text-sm font-medium text-text-subtle">{t("payments.collected")}</p>
130- <p class="mono text-lg font-semibold tabular-nums text-text-strong">130+ <p class="text-lg font-semibold tabular-nums text-text-strong">
131 {formatTry(summary().collected, moneyLocale())}131 {formatTry(summary().collected, moneyLocale())}
132 <span class="font-normal text-text-subtle"> / {formatTry(summary().billed, moneyLocale())}</span>132 <span class="font-normal text-text-subtle"> / {formatTry(summary().billed, moneyLocale())}</span>
133 </p>133 </p>
@@ -150,7 +150,7 @@ function StatementContent() {
150 </div>150 </div>
151 </section>151 </section>
152 152
153- <section class="data-shell space-y-4 p-4">153+ <section class="space-y-4 p-0">
154 <Suspense fallback={<DataTableSkeleton columns={5} rows={6} />}>154 <Suspense fallback={<DataTableSkeleton columns={5} rows={6} />}>
155 <Show when={statement.error}>155 <Show when={statement.error}>
156 <ErrorAlert message={formatApiError(statement.error)} onRetry={() => void refetch()} />156 <ErrorAlert message={formatApiError(statement.error)} onRetry={() => void refetch()} />
@@ -183,7 +183,7 @@ function StatementContent() {
183 <DetailField label={t("payments.credited")} value={formatTry(entry.credited_minor, moneyLocale())} />183 <DetailField label={t("payments.credited")} value={formatTry(entry.credited_minor, moneyLocale())} />
184 <DetailField label={t("payments.outstanding")} value={formatTry(entry.outstanding_minor, moneyLocale())} />184 <DetailField label={t("payments.outstanding")} value={formatTry(entry.outstanding_minor, moneyLocale())} />
185 <DetailField label={t("payments.reversed")} value={entry.reversed ? t("payments.reversed") : "—"} />185 <DetailField label={t("payments.reversed")} value={entry.reversed ? t("payments.reversed") : "—"} />
186- <DetailField label={t("payments.plan")} value={entry.plan ?? "—"} mono />186+ <DetailField label={t("payments.plan")} value={entry.plan ?? "—"} />
187 <DetailField label={t("admin.id")} value={entry.charge_id} mono />187 <DetailField label={t("admin.id")} value={entry.charge_id} mono />
188 </div>188 </div>
189 )}189 )}
src/pages/payments-page.tsxmodified+9 -14
@@ -117,7 +117,6 @@ function PaymentsContent() {
117 onCleanup(() => clearTimeout(queryTimer));117 onCleanup(() => clearTimeout(queryTimer));
118 118
119 const [studentPage, setStudentPage] = createSignal(0);119 const [studentPage, setStudentPage] = createSignal(0);
120- const [studentPageSize, setStudentPageSize] = createSignal(STUDENT_PAGE_SIZE);
121 // Reset to page 1 whenever the query or plan filter changes underneath it.120 // Reset to page 1 whenever the query or plan filter changes underneath it.
122 createEffect(() => {121 createEffect(() => {
123 debouncedQuery();122 debouncedQuery();
@@ -134,7 +133,7 @@ function PaymentsContent() {
134 // (already name-resolved) plan roster and filters/pages it client-side —133 // (already name-resolved) plan roster and filters/pages it client-side —
135 // a plan's assignees are a small, bounded list on their own.134 // a plan's assignees are a small, bounded list on their own.
136 const [studentsPage, { refetch: refetchStudents }] = createResource(135 const [studentsPage, { refetch: refetchStudents }] = createResource(
137- () => ({ plan: planFilter(), q: debouncedQuery(), page: studentPage(), size: studentPageSize() }),136+ () => ({ plan: planFilter(), q: debouncedQuery(), page: studentPage(), size: STUDENT_PAGE_SIZE }),
138 async ({ plan, q, page, size }): Promise<{ items: PersonRef[]; total: number }> => {137 async ({ plan, q, page, size }): Promise<{ items: PersonRef[]; total: number }> => {
139 if (plan) {138 if (plan) {
140 const assignments = await getPlanAssignments(plan, { limit: 500 });139 const assignments = await getPlanAssignments(plan, { limit: 500 });
@@ -352,7 +351,7 @@ function PaymentsContent() {
352 accessorKey: "due_at",351 accessorKey: "due_at",
353 header: t("payments.due"),352 header: t("payments.due"),
354 size: 120,353 size: 120,
355- cell: (cell) => <span class="mono whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive-text": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,354+ cell: (cell) => <span class="whitespace-nowrap text-sm" classList={{ "font-semibold text-destructive-text": cell.row.original.overdue }}>{cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())}</span>,
356 },355 },
357 {356 {
358 accessorKey: "outstanding_minor",357 accessorKey: "outstanding_minor",
@@ -450,7 +449,7 @@ function PaymentsContent() {
450 const planTotal = (plan: FeePlan) => plan.installments.reduce((sum, item) => sum + item.amount_minor, 0);449 const planTotal = (plan: FeePlan) => plan.installments.reduce((sum, item) => sum + item.amount_minor, 0);
451 const planColumns = createMemo<ColumnDef<FeePlan>[]>(() => [450 const planColumns = createMemo<ColumnDef<FeePlan>[]>(() => [
452 { accessorKey: "name", header: t("payments.planName"), cell: (cell) => <span class="font-medium">{cell.row.original.name}</span> },451 { accessorKey: "name", header: t("payments.planName"), cell: (cell) => <span class="font-medium">{cell.row.original.name}</span> },
453- { id: "installments", header: t("payments.installments"), cell: (cell) => <span class="mono text-sm">{cell.row.original.installments.length}</span> },452+ { id: "installments", header: t("payments.installments"), cell: (cell) => <span class="text-sm">{cell.row.original.installments.length}</span> },
454 { id: "total", header: t("payments.total"), cell: (cell) => <span class="tabular-nums">{formatTry(planTotal(cell.row.original), moneyLocale())}</span> },453 { id: "total", header: t("payments.total"), cell: (cell) => <span class="tabular-nums">{formatTry(planTotal(cell.row.original), moneyLocale())}</span> },
455 {454 {
456 id: "actions",455 id: "actions",
@@ -601,7 +600,7 @@ function PaymentsContent() {
601 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.periodOverdue")}</p><ComingSoonValue class="mt-1" /></div>600 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.periodOverdue")}</p><ComingSoonValue class="mt-1" /></div>
602 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.periodExpected")}</p><ComingSoonValue class="mt-1" /></div>601 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.periodExpected")}</p><ComingSoonValue class="mt-1" /></div>
603 </div>602 </div>
604- <section class="data-shell space-y-4 p-4">603+ <section class="space-y-4 p-0">
605 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>604 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>
606 <Show when={studentsPage.error}>605 <Show when={studentsPage.error}>
607 <ErrorAlert message={formatApiError(studentsPage.error)} onRetry={() => void refetchStudents()} />606 <ErrorAlert message={formatApiError(studentsPage.error)} onRetry={() => void refetchStudents()} />
@@ -638,13 +637,9 @@ function PaymentsContent() {
638 enablePagination637 enablePagination
639 manualPagination={{638 manualPagination={{
640 pageIndex: studentPage(),639 pageIndex: studentPage(),
641- pageSize: studentPageSize(),640+ pageSize: STUDENT_PAGE_SIZE,
642 total: studentsTotal(),641 total: studentsTotal(),
643 onPageChange: setStudentPage,642 onPageChange: setStudentPage,
644- onPageSizeChange: (size) => {
645- setStudentPageSize(size);
646- setStudentPage(0);
647- },
648 }}643 }}
649 />644 />
650 </Suspense>645 </Suspense>
@@ -669,7 +664,7 @@ function PaymentsContent() {
669 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.overdueCount")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive-text": summary().overdue > 0 }}>{summary().overdue}</p></div>664 <div class="detail-metric-card"><p class="text-xs font-medium text-text-subtle">{t("payments.overdueCount")}</p><p class="mt-1 font-semibold tabular-nums" classList={{ "text-destructive-text": summary().overdue > 0 }}>{summary().overdue}</p></div>
670 </div>665 </div>
671 666
672- <section class="data-shell space-y-4 p-4">667+ <section class="space-y-4 p-0">
673 <Suspense fallback={<DataTableSkeleton columns={5} rows={5} />}>668 <Suspense fallback={<DataTableSkeleton columns={5} rows={5} />}>
674 <Show when={statement.error}>669 <Show when={statement.error}>
675 <ErrorAlert message={formatApiError(statement.error)} onRetry={() => void refetchStatement()} />670 <ErrorAlert message={formatApiError(statement.error)} onRetry={() => void refetchStatement()} />
@@ -750,7 +745,7 @@ function PaymentsContent() {
750 745
751 {/* ---------------- Fee plans ---------------- */}746 {/* ---------------- Fee plans ---------------- */}
752 <TabsContent value="plans" class="space-y-4">747 <TabsContent value="plans" class="space-y-4">
753- <section class="data-shell space-y-4 p-4">748+ <section class="space-y-4 p-0">
754 <Suspense fallback={<DataTableSkeleton columns={4} rows={6} />}>749 <Suspense fallback={<DataTableSkeleton columns={4} rows={6} />}>
755 <Show when={plans.error}>750 <Show when={plans.error}>
756 <ErrorAlert message={formatApiError(plans.error)} onRetry={() => void refetchPlans()} />751 <ErrorAlert message={formatApiError(plans.error)} onRetry={() => void refetchPlans()} />
@@ -793,7 +788,7 @@ function PaymentsContent() {
793 <DetailField label={t("payments.credited")} value={formatTry(entry.credited_minor, moneyLocale())} />788 <DetailField label={t("payments.credited")} value={formatTry(entry.credited_minor, moneyLocale())} />
794 <DetailField label={t("payments.outstanding")} value={formatTry(entry.outstanding_minor, moneyLocale())} />789 <DetailField label={t("payments.outstanding")} value={formatTry(entry.outstanding_minor, moneyLocale())} />
795 <DetailField label={t("payments.reversed")} value={entry.reversed ? t("payments.reversed") : "—"} />790 <DetailField label={t("payments.reversed")} value={entry.reversed ? t("payments.reversed") : "—"} />
796- <DetailField label={t("payments.plan")} value={entry.plan ?? "—"} mono />791+ <DetailField label={t("payments.plan")} value={entry.plan ?? "—"} />
797 <DetailField label={t("admin.id")} value={entry.charge_id} mono />792 <DetailField label={t("admin.id")} value={entry.charge_id} mono />
798 </div>793 </div>
799 <Show when={!entry.reversed && entry.outstanding_minor > 0}>794 <Show when={!entry.reversed && entry.outstanding_minor > 0}>
@@ -816,7 +811,7 @@ function PaymentsContent() {
816 <div class="space-y-5">811 <div class="space-y-5">
817 <div class="grid gap-4 sm:grid-cols-2">812 <div class="grid gap-4 sm:grid-cols-2">
818 <DetailField label={t("payments.total")} value={formatTry(planTotal(plan), moneyLocale())} />813 <DetailField label={t("payments.total")} value={formatTry(planTotal(plan), moneyLocale())} />
819- <DetailField label={t("payments.installments")} value={String(plan.installments.length)} mono />814+ <DetailField label={t("payments.installments")} value={String(plan.installments.length)} />
820 <DetailField label={t("bank.owner")} value={personLabel(plan.created_by)} />815 <DetailField label={t("bank.owner")} value={personLabel(plan.created_by)} />
821 <DetailField label={t("bank.created")} value={formatDate(plan.created_at, locale())} />816 <DetailField label={t("bank.created")} value={formatDate(plan.created_at, locale())} />
822 </div>817 </div>
src/pages/pomodoro-page.tsxmodified+8 -8
@@ -116,17 +116,17 @@ function PomodoroContent() {
116 {116 {
117 accessorKey: "started_at",117 accessorKey: "started_at",
118 header: t("pomodoro.startedAt"),118 header: t("pomodoro.startedAt"),
119- cell: (cell) => <span class="mono whitespace-nowrap">{formatDateTime(cell.row.original.started_at, locale())}</span>,119+ cell: (cell) => <span class="whitespace-nowrap">{formatDateTime(cell.row.original.started_at, locale())}</span>,
120 },120 },
121 {121 {
122 accessorKey: "finished_at",122 accessorKey: "finished_at",
123 header: t("pomodoro.finishedAt"),123 header: t("pomodoro.finishedAt"),
124- cell: (cell) => <span class="mono whitespace-nowrap">{formatDateTime(cell.row.original.finished_at, locale())}</span>,124+ cell: (cell) => <span class="whitespace-nowrap">{formatDateTime(cell.row.original.finished_at, locale())}</span>,
125 },125 },
126 {126 {
127 accessorKey: "duration_ms",127 accessorKey: "duration_ms",
128 header: t("pomodoro.duration"),128 header: t("pomodoro.duration"),
129- cell: (cell) => <span class="mono tabular-nums">{formatDurationClock(cell.row.original.duration_ms)}</span>,129+ cell: (cell) => <span class="tabular-nums">{formatDurationClock(cell.row.original.duration_ms)}</span>,
130 },130 },
131 {131 {
132 accessorKey: "counted",132 accessorKey: "counted",
@@ -236,7 +236,7 @@ function PomodoroContent() {
236 <p class={cn("text-xs font-medium uppercase tracking-[0.08em]", running() && isOvertime() ? "text-destructive-text" : "text-muted-foreground")}>236 <p class={cn("text-xs font-medium uppercase tracking-[0.08em]", running() && isOvertime() ? "text-destructive-text" : "text-muted-foreground")}>
237 {running() ? (isOvertime() ? t("pomodoro.overtime") : t("pomodoro.remaining")) : t("pomodoro.total")}237 {running() ? (isOvertime() ? t("pomodoro.overtime") : t("pomodoro.remaining")) : t("pomodoro.total")}
238 </p>238 </p>
239- <p class={cn("mono mt-2 text-5xl font-semibold leading-none tracking-tight tabular-nums sm:text-6xl", running() && isOvertime() && "text-destructive-text")}>239+ <p class={cn("mt-2 text-5xl font-semibold leading-none tracking-tight tabular-nums sm:text-6xl", running() && isOvertime() && "text-destructive-text")}>
240 {running() && isOvertime() && "+"}240 {running() && isOvertime() && "+"}
241 {formatDurationClock(running() ? (isOvertime() ? overtimeMs() : remainingMs()) : log()?.total_focus_ms)}241 {formatDurationClock(running() ? (isOvertime() ? overtimeMs() : remainingMs()) : log()?.total_focus_ms)}
242 </p>242 </p>
@@ -311,20 +311,20 @@ function PomodoroContent() {
311 <div class="grid gap-3 sm:grid-cols-3 xl:grid-cols-1">311 <div class="grid gap-3 sm:grid-cols-3 xl:grid-cols-1">
312 <div class="detail-metric-card">312 <div class="detail-metric-card">
313 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.today")}</p>313 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.today")}</p>
314- <p class="mono mt-2 text-2xl font-semibold tabular-nums">{formatDurationClock(todayFocus())}</p>314+ <p class="mt-2 text-2xl font-semibold tabular-nums">{formatDurationClock(todayFocus())}</p>
315 </div>315 </div>
316 <div class="detail-metric-card">316 <div class="detail-metric-card">
317 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.average")}</p>317 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.average")}</p>
318- <p class="mono mt-2 text-2xl font-semibold tabular-nums">{formatDurationClock(averageFocus())}</p>318+ <p class="mt-2 text-2xl font-semibold tabular-nums">{formatDurationClock(averageFocus())}</p>
319 </div>319 </div>
320 <div class="detail-metric-card">320 <div class="detail-metric-card">
321 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.sessions")}</p>321 <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("pomodoro.sessions")}</p>
322- <p class="mono mt-2 text-2xl font-semibold tabular-nums">{log()?.total ?? 0}</p>322+ <p class="mt-2 text-2xl font-semibold tabular-nums">{log()?.total ?? 0}</p>
323 </div>323 </div>
324 </div>324 </div>
325 </section>325 </section>
326 326
327- <section class="data-shell space-y-4 p-4">327+ <section class="space-y-4 p-0">
328 <div class="flex flex-wrap items-end justify-between gap-2">328 <div class="flex flex-wrap items-end justify-between gap-2">
329 <div>329 <div>
330 <h2 class="text-lg font-semibold">{t("pomodoro.history")}</h2>330 <h2 class="text-lg font-semibold">{t("pomodoro.history")}</h2>
src/pages/question-bank-page.tsxmodified+4 -4
@@ -128,12 +128,12 @@ function QuestionBankContent() {
128 {128 {
129 accessorKey: "points",129 accessorKey: "points",
130 header: t("questions.points"),130 header: t("questions.points"),
131- meta: { headerClass: "text-center", cellClass: "mono text-center" },131+ meta: { headerClass: "text-center", cellClass: "text-center" },
132 },132 },
133 {133 {
134 accessorKey: "used_count",134 accessorKey: "used_count",
135 header: t("bank.usedCount"),135 header: t("bank.usedCount"),
136- meta: { headerClass: "text-center", cellClass: "mono text-center" },136+ meta: { headerClass: "text-center", cellClass: "text-center" },
137 },137 },
138 {138 {
139 id: "visibility",139 id: "visibility",
@@ -220,7 +220,7 @@ function QuestionBankContent() {
220 </TabsList>220 </TabsList>
221 221
222 <TabsContent value={bankTab()} class="mt-4 border-0 bg-transparent p-0 shadow-none">222 <TabsContent value={bankTab()} class="mt-4 border-0 bg-transparent p-0 shadow-none">
223- <section class="data-shell space-y-4 p-4">223+ <section class="space-y-4 p-0">
224 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>224 <Suspense fallback={<DataTableSkeleton columns={5} rows={8} />}>
225 <Show when={list.error}>225 <Show when={list.error}>
226 <Alert variant="destructive">{formatApiError(list.error)}</Alert>226 <Alert variant="destructive">{formatApiError(list.error)}</Alert>
@@ -238,7 +238,7 @@ function QuestionBankContent() {
238 }238 }
239 columns={columns()}239 columns={columns()}
240 data={list()?.items ?? []}240 data={list()?.items ?? []}
241- tableClass="min-w-[48rem]"241+ tableClass="min-w-[40rem]"
242 filterPlaceholder={t("bank.search")}242 filterPlaceholder={t("bank.search")}
243 filterHint={t("search.hint.bank")}243 filterHint={t("search.hint.bank")}
244 searchValue={query()}244 searchValue={query()}
src/pages/settings-page.tsxmodified+5 -5
@@ -231,7 +231,7 @@ function SettingsContent() {
231 <h2 class="text-base font-semibold">{t("settings.examKinds")}</h2>231 <h2 class="text-base font-semibold">{t("settings.examKinds")}</h2>
232 <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.examKindsHelp")}</p>232 <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.examKindsHelp")}</p>
233 </div>233 </div>
234- <Badge variant="secondary" class="mono shrink-0 tabular-nums">234+ <Badge variant="secondary" class="shrink-0 tabular-nums">
235 {examKinds().length}235 {examKinds().length}
236 </Badge>236 </Badge>
237 </div>237 </div>
@@ -324,7 +324,7 @@ function SettingsContent() {
324 <h2 class="text-base font-semibold">{t("settings.attendanceStatuses")}</h2>324 <h2 class="text-base font-semibold">{t("settings.attendanceStatuses")}</h2>
325 <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.attendanceHelp")}</p>325 <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.attendanceHelp")}</p>
326 </div>326 </div>
327- <Badge variant="secondary" class="mono shrink-0 tabular-nums">327+ <Badge variant="secondary" class="shrink-0 tabular-nums">
328 {attendanceStatuses().length}328 {attendanceStatuses().length}
329 </Badge>329 </Badge>
330 </div>330 </div>
@@ -413,7 +413,7 @@ function SettingsContent() {
413 <h2 class="text-base font-semibold">{t("settings.gradeBands")}</h2>413 <h2 class="text-base font-semibold">{t("settings.gradeBands")}</h2>
414 <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.gradeBandsHelp")}</p>414 <p class="mt-0.5 text-xs leading-relaxed text-muted-foreground">{t("settings.gradeBandsHelp")}</p>
415 </div>415 </div>
416- <Badge variant="secondary" class="mono shrink-0 tabular-nums">416+ <Badge variant="secondary" class="shrink-0 tabular-nums">
417 {gradeBands().length}417 {gradeBands().length}
418 </Badge>418 </Badge>
419 </div>419 </div>
@@ -510,7 +510,7 @@ function SettingsContent() {
510 <header class="border-b border-border/70 px-4 py-3">510 <header class="border-b border-border/70 px-4 py-3">
511 <div class="flex items-start justify-between gap-3">511 <div class="flex items-start justify-between gap-3">
512 <h2 class="text-base font-semibold">{t("settings.mealSlot")}</h2>512 <h2 class="text-base font-semibold">{t("settings.mealSlot")}</h2>
513- <Badge variant="secondary" class="mono shrink-0 tabular-nums">{mealSlots().length}</Badge>513+ <Badge variant="secondary" class="shrink-0 tabular-nums">{mealSlots().length}</Badge>
514 </div>514 </div>
515 </header>515 </header>
516 <div class="flex-1 space-y-2 p-4">516 <div class="flex-1 space-y-2 p-4">
@@ -553,7 +553,7 @@ function SettingsContent() {
553 <header class="border-b border-border/70 px-4 py-3">553 <header class="border-b border-border/70 px-4 py-3">
554 <div class="flex items-start justify-between gap-3">554 <div class="flex items-start justify-between gap-3">
555 <h2 class="text-base font-semibold">{t("settings.dietaryTags")}</h2>555 <h2 class="text-base font-semibold">{t("settings.dietaryTags")}</h2>
556- <Badge variant="secondary" class="mono shrink-0 tabular-nums">{dietaryTags().length}</Badge>556+ <Badge variant="secondary" class="shrink-0 tabular-nums">{dietaryTags().length}</Badge>
557 </div>557 </div>
558 </header>558 </header>
559 <div class="flex-1 space-y-2 p-4">559 <div class="flex-1 space-y-2 p-4">
src/pages/staff-work-page.tsxmodified+50 -54
@@ -10,12 +10,11 @@ import { ApiError } from "@/api/client";
10 import type { Page, PersonRef, WorkEntry } from "@/api/client";10 import type { Page, PersonRef, WorkEntry } from "@/api/client";
11 import type { Locale } from "@/i18n/messages";11 import type { Locale } from "@/i18n/messages";
12 import { RouteGuard } from "@/components/layout/route-guard";12 import { RouteGuard } from "@/components/layout/route-guard";
13-import { DataTableSearch } from "@/components/ui/data-table-search";13+import { DataToolbar } from "@/components/ui/data-toolbar";
14-import { DataSection } from "@/components/ui/data-section";
15 import { Alert } from "@/components/ui/alert";14 import { Alert } from "@/components/ui/alert";
16 import { Badge } from "@/components/ui/badge";15 import { Badge } from "@/components/ui/badge";
17 import { Button } from "@/components/ui/button";16 import { Button } from "@/components/ui/button";
18-import { ComingSoonBadge, ComingSoonValue } from "@/components/ui/coming-soon";17+import { ComingSoonBadge } from "@/components/ui/coming-soon";
19 import { ConfirmDialog } from "@/components/ui/confirm-dialog";18 import { ConfirmDialog } from "@/components/ui/confirm-dialog";
20 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";19 import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";
21 import { EmptyState } from "@/components/ui/empty-state";20 import { EmptyState } from "@/components/ui/empty-state";
@@ -188,7 +187,7 @@ function StaffWorkContent() {
188 id: "time",187 id: "time",
189 accessorFn: (row) => row.check_in,188 accessorFn: (row) => row.check_in,
190 header: t("work.checkIn"),189 header: t("work.checkIn"),
191- meta: { cellClass: "mono text-xs" },190+ meta: { cellClass: "text-xs" },
192 cell: (cell) => (191 cell: (cell) => (
193 <div class="whitespace-nowrap">192 <div class="whitespace-nowrap">
194 <p>{formatDateTime(cell.row.original.check_in, locale())}</p>193 <p>{formatDateTime(cell.row.original.check_in, locale())}</p>
@@ -199,7 +198,7 @@ function StaffWorkContent() {
199 {198 {
200 accessorKey: "duration_ms",199 accessorKey: "duration_ms",
201 header: t("work.duration"),200 header: t("work.duration"),
202- meta: { cellClass: "mono text-xs" },201+ meta: { cellClass: "text-xs" },
203 cell: (cell) => formatDurationMinutes(cell.row.original.duration_ms, locale()),202 cell: (cell) => formatDurationMinutes(cell.row.original.duration_ms, locale()),
204 },203 },
205 {204 {
@@ -287,45 +286,51 @@ function StaffWorkContent() {
287 <Alert variant="destructive">{error()}</Alert>286 <Alert variant="destructive">{error()}</Alert>
288 </Show>287 </Show>
289 288
290- <DataSection289+ <div class="space-y-3">
291- title={t("work.staffTitle")}290+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs">
292- description={t("work.staffSubtitle")}291+ <DataToolbar
293- actions={292+ searchValue={staffSearch()}
294- <>293+ searchPlaceholder={t("work.searchPlaceholder")}
295- <Button size="sm" variant="outline" class="rounded-lg" disabled title={t("comingSoon.title")}>294+ searchHint={t("search.hint.people")}
296- {t("work.addEntry")}295+ onSearchInput={setStaffSearch}
297- <ComingSoonBadge class="ml-1.5" />296+ actions={
298- </Button>297+ <>
299- <Button size="sm" variant="outline" class="rounded-lg" disabled title={t("comingSoon.title")}>298+ <Button type="button" size="sm" variant="outline" class="rounded-lg" disabled title={t("comingSoon.title")}>
300- {t("work.planShift")}299+ {t("work.addEntry")}
301- <ComingSoonBadge class="ml-1.5" />300+ <ComingSoonBadge class="ml-1.5" />
302- </Button>301+ </Button>
303- </>302+ <Button type="button" size="sm" variant="outline" class="rounded-lg" disabled title={t("comingSoon.title")}>
304- }303+ {t("work.planShift")}
305- >304+ <ComingSoonBadge class="ml-1.5" />
306- <DataTableSearch value={staffSearch()} onChange={setStaffSearch} placeholder={t("work.searchPlaceholder")} hint={t("search.hint.people")} />305+ </Button>
306+ </>
307+ }
308+ />
309+ </div>
307 310
308- <Show when={!peopleLoading()} fallback={<DataTableSkeleton columns={3} rows={6} />}>311+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs sm:p-4">
309- <Show when={pagedPeople().length > 0} fallback={<EmptyState kind="people" title={t("work.noTeachers")} />}>312+ <Show when={!peopleLoading()} fallback={<DataTableSkeleton columns={3} rows={6} />}>
310- <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3">313+ <Show when={pagedPeople().length > 0} fallback={<EmptyState kind="people" title={t("work.noTeachers")} />}>
311- <For each={pagedPeople()}>314+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3">
312- {(person) => (315+ <For each={pagedPeople()}>
313- <StaffCard316+ {(person) => (
314- person={person}317+ <StaffCard
315- stats={cardStats()?.get(person.id) ?? undefined}318+ person={person}
316- locale={locale()}319+ stats={cardStats()?.get(person.id) ?? undefined}
317- onClick={() => {320+ locale={locale()}
318- setError("");321+ onClick={() => {
319- setViewUser(person);322+ setError("");
320- }}323+ setViewUser(person);
321- />324+ }}
322- )}325+ />
323- </For>326+ )}
324- </div>327+ </For>
325- <PaginationControls page={staffPage()} totalPages={staffPageCount()} onPageChange={setStaffPage} />328+ </div>
329+ <PaginationControls page={staffPage()} totalPages={staffPageCount()} onPageChange={setStaffPage} />
330+ </Show>
326 </Show>331 </Show>
327- </Show>332+ </div>
328- </DataSection>333+ </div>
329 334
330 <SidePanel335 <SidePanel
331 size="wide"336 size="wide"
@@ -446,13 +451,8 @@ function StaffCard(props: { person: PersonRef; stats: StaffCardStats | null | un
446 <Show when={isOpen()}>451 <Show when={isOpen()}>
447 <Badge>{t("work.open")}</Badge>452 <Badge>{t("work.open")}</Badge>
448 </Show>453 </Show>
449- <ComingSoonBadge class="shrink-0" />
450 <IconChevronRight class="h-4 w-4 shrink-0 text-text-subtle" />454 <IconChevronRight class="h-4 w-4 shrink-0 text-text-subtle" />
451 </div>455 </div>
452- <div class="flex items-center justify-between gap-2 text-xs">
453- <span class="text-text-subtle">{t("work.location")}</span>
454- <ComingSoonValue />
455- </div>
456 456
457 <Show457 <Show
458 when={latest()}458 when={latest()}
@@ -462,15 +462,15 @@ function StaffCard(props: { person: PersonRef; stats: StaffCardStats | null | un
462 <div class="grid grid-cols-3 gap-2 text-xs">462 <div class="grid grid-cols-3 gap-2 text-xs">
463 <div>463 <div>
464 <p class="text-text-subtle">{t("work.checkIn")}</p>464 <p class="text-text-subtle">{t("work.checkIn")}</p>
465- <p class="mono font-medium text-text-default">{formatDateTime(entry().check_in, props.locale)}</p>465+ <p class="font-medium text-text-default">{formatDateTime(entry().check_in, props.locale)}</p>
466 </div>466 </div>
467 <div>467 <div>
468 <p class="text-text-subtle">{t("work.checkOut")}</p>468 <p class="text-text-subtle">{t("work.checkOut")}</p>
469- <p class="mono font-medium text-text-default">{entry().check_out == null ? "—" : formatDateTime(entry().check_out, props.locale)}</p>469+ <p class="font-medium text-text-default">{entry().check_out == null ? "—" : formatDateTime(entry().check_out, props.locale)}</p>
470 </div>470 </div>
471 <div>471 <div>
472 <p class="text-text-subtle">{t("work.duration")}</p>472 <p class="text-text-subtle">{t("work.duration")}</p>
473- <p class="mono font-medium text-text-default">{duration() == null ? "—" : formatDurationMinutes(duration(), props.locale)}</p>473+ <p class="font-medium text-text-default">{duration() == null ? "—" : formatDurationMinutes(duration(), props.locale)}</p>
474 </div>474 </div>
475 </div>475 </div>
476 )}476 )}
@@ -484,10 +484,6 @@ function StaffCard(props: { person: PersonRef; stats: StaffCardStats | null | un
484 {t("work.daysThisMonth", { count: String(props.stats?.daysThisMonth) })}484 {t("work.daysThisMonth", { count: String(props.stats?.daysThisMonth) })}
485 </Show>485 </Show>
486 </div>486 </div>
487- <div class="flex items-center justify-between gap-2 text-xs">
488- <span class="text-text-subtle">{t("work.quality")}</span>
489- <ComingSoonValue />
490- </div>
491 </button>487 </button>
492 );488 );
493 }489 }
src/pages/student-attendance-page.tsxmodified+1 -1
@@ -104,7 +104,7 @@ function StudentAttendanceContent() {
104 104
105 return (105 return (
106 <div class="space-y-6">106 <div class="space-y-6">
107- <section class="data-shell space-y-4 p-4">107+ <section class="space-y-4 p-0">
108 <Show when={error() && !viewUser()}>108 <Show when={error() && !viewUser()}>
109 <Alert variant="destructive">{error()}</Alert>109 <Alert variant="destructive">{error()}</Alert>
110 </Show>110 </Show>
src/pages/student-marks-page.tsxmodified+2 -2
@@ -125,7 +125,7 @@ function StudentMarksContent() {
125 if (rep.overall_average == null)125 if (rep.overall_average == null)
126 return <span class="text-sm text-muted-foreground">{rep.overall_grade ?? "—"}</span>;126 return <span class="text-sm text-muted-foreground">{rep.overall_grade ?? "—"}</span>;
127 return (127 return (
128- <span class={cn("mono font-semibold tabular-nums", avgTone(rep.overall_average))}>128+ <span class={cn("font-semibold tabular-nums", avgTone(rep.overall_average))}>
129 {round(rep.overall_average)}129 {round(rep.overall_average)}
130 <Show when={rep.overall_grade}>{(g) => <span class="ml-1 font-medium text-muted-foreground">/ {g()}</span>}</Show>130 <Show when={rep.overall_grade}>{(g) => <span class="ml-1 font-medium text-muted-foreground">/ {g()}</span>}</Show>
131 </span>131 </span>
@@ -159,7 +159,7 @@ function StudentMarksContent() {
159 159
160 return (160 return (
161 <div class="space-y-6">161 <div class="space-y-6">
162- <section class="data-shell space-y-4 p-4">162+ <section class="space-y-4 p-0">
163 <Show when={error() && !viewUser()}>163 <Show when={error() && !viewUser()}>
164 <Alert variant="destructive">{error()}</Alert>164 <Alert variant="destructive">{error()}</Alert>
165 </Show>165 </Show>
src/pages/student-pomodoro-page.tsxmodified+1 -1
@@ -101,7 +101,7 @@ function StudentPomodoroContent() {
101 101
102 return (102 return (
103 <div class="space-y-6">103 <div class="space-y-6">
104- <section class="data-shell space-y-4 p-4">104+ <section class="space-y-4 p-0">
105 <Show when={error() && !viewUser()}>105 <Show when={error() && !viewUser()}>
106 <Alert variant="destructive">{error()}</Alert>106 <Alert variant="destructive">{error()}</Alert>
107 </Show>107 </Show>
src/pages/students-roster-page.tsxmodified+3 -2
@@ -121,7 +121,7 @@ function StudentsRosterContent() {
121 </Tabs>121 </Tabs>
122 122
123 123
124- <section class="data-shell space-y-4 p-4">124+ <section class="space-y-4 p-0">
125 <Suspense fallback={<DataTableSkeleton columns={6} rows={8} />}>125 <Suspense fallback={<DataTableSkeleton columns={6} rows={8} />}>
126 <Show when={data.error}>126 <Show when={data.error}>
127 <ErrorAlert message={formatApiError(data.error)} onRetry={() => void refetch()} />127 <ErrorAlert message={formatApiError(data.error)} onRetry={() => void refetch()} />
@@ -129,6 +129,7 @@ function StudentsRosterContent() {
129 <Show when={!data.error && data()}>129 <Show when={!data.error && data()}>
130 {(value) => (130 {(value) => (
131 <DataTable131 <DataTable
132+ surfaceSections
132 title={t("nav.studentsRoster")}133 title={t("nav.studentsRoster")}
133 description={t("roster.studentsSubtitle")}134 description={t("roster.studentsSubtitle")}
134 actions={<><Button size="sm" variant="outline" class="min-w-[7.5rem] rounded-lg" disabled title={t("comingSoon.title")}>135 actions={<><Button size="sm" variant="outline" class="min-w-[7.5rem] rounded-lg" disabled title={t("comingSoon.title")}>
@@ -144,7 +145,7 @@ function StudentsRosterContent() {
144 </Show></>}145 </Show></>}
145 columns={columns()}146 columns={columns()}
146 data={rows()}147 data={rows()}
147- tableClass="min-w-[940px]"148+ tableClass="min-w-[52rem]"
148 empty={t("form.noStudents")}149 empty={t("form.noStudents")}
149 filterPlaceholder={t("roster.searchStudents")}150 filterPlaceholder={t("roster.searchStudents")}
150 filterHint={t("search.hint.students")}151 filterHint={t("search.hint.students")}
src/pages/teachers-roster-page.tsxmodified+4 -3
@@ -58,7 +58,7 @@ function TeachersRosterContent() {
58 accessorKey: "homeroomClasses",58 accessorKey: "homeroomClasses",
59 size: 90,59 size: 90,
60 header: t("roster.class"),60 header: t("roster.class"),
61- meta: { cellClass: "mono tabular-nums" },61+ meta: { cellClass: "tabular-nums" },
62 cell: (cell) => (cell.row.original.homeroomClasses > 0 ? cell.row.original.homeroomClasses : "—"),62 cell: (cell) => (cell.row.original.homeroomClasses > 0 ? cell.row.original.homeroomClasses : "—"),
63 },63 },
64 { id: "weekly", size: 130, header: t("roster.weeklyLessons"), enableSorting: false, meta: { hideInCards: true }, cell: () => <ComingSoonValue /> },64 { id: "weekly", size: 130, header: t("roster.weeklyLessons"), enableSorting: false, meta: { hideInCards: true }, cell: () => <ComingSoonValue /> },
@@ -94,7 +94,7 @@ function TeachersRosterContent() {
94 </Tabs>94 </Tabs>
95 95
96 96
97- <section class="data-shell space-y-4 p-4">97+ <section class="space-y-4 p-0">
98 <Suspense fallback={<DataTableSkeleton columns={6} rows={8} />}>98 <Suspense fallback={<DataTableSkeleton columns={6} rows={8} />}>
99 <Show when={data.error}>99 <Show when={data.error}>
100 <ErrorAlert message={formatApiError(data.error)} onRetry={() => void refetch()} />100 <ErrorAlert message={formatApiError(data.error)} onRetry={() => void refetch()} />
@@ -102,6 +102,7 @@ function TeachersRosterContent() {
102 <Show when={!data.error && data()}>102 <Show when={!data.error && data()}>
103 {(rows) => (103 {(rows) => (
104 <DataTable104 <DataTable
105+ surfaceSections
105 title={t("nav.teachersRoster")}106 title={t("nav.teachersRoster")}
106 description={t("roster.teachersSubtitle")}107 description={t("roster.teachersSubtitle")}
107 actions={<><Button size="sm" variant="outline" class="min-w-[7.5rem] rounded-lg" disabled title={t("comingSoon.title")}>108 actions={<><Button size="sm" variant="outline" class="min-w-[7.5rem] rounded-lg" disabled title={t("comingSoon.title")}>
@@ -117,7 +118,7 @@ function TeachersRosterContent() {
117 </Show></>}118 </Show></>}
118 columns={columns()}119 columns={columns()}
119 data={rows()}120 data={rows()}
120- tableClass="min-w-[940px]"121+ tableClass="min-w-[52rem]"
121 empty={t("roster.noTeachers")}122 empty={t("roster.noTeachers")}
122 filterPlaceholder={t("roster.searchTeachers")}123 filterPlaceholder={t("roster.searchTeachers")}
123 filterHint={t("search.hint.teachers")}124 filterHint={t("search.hint.teachers")}
src/pages/terms-page.tsxmodified+19 -4
@@ -80,27 +80,42 @@ function TermsContent() {
80 {80 {
81 accessorKey: "name",81 accessorKey: "name",
82 header: t("settings.name"),82 header: t("settings.name"),
83+ size: 170,
84+ minSize: 150,
85+ meta: { cellClass: "min-w-0" },
83 cell: (cell) => <span class="font-medium">{cell.row.original.name}</span>,86 cell: (cell) => <span class="font-medium">{cell.row.original.name}</span>,
84 },87 },
85 {88 {
86 id: "year",89 id: "year",
87 accessorFn: (row) => yearName(row.year),90 accessorFn: (row) => yearName(row.year),
88 header: t("academicYears.year"),91 header: t("academicYears.year"),
89- cell: (cell) => <span class="text-sm text-muted-foreground">{yearName(cell.row.original.year)}</span>,92+ size: 180,
93+ minSize: 150,
94+ meta: { cellClass: "min-w-0" },
95+ cell: (cell) => <span class="block truncate text-sm text-muted-foreground">{yearName(cell.row.original.year)}</span>,
90 },96 },
91 {97 {
92 accessorKey: "starts_at",98 accessorKey: "starts_at",
93 header: t("events.starts"),99 header: t("events.starts"),
94- cell: (cell) => <span class="mono text-sm">{formatDateTime(cell.row.original.starts_at, locale())}</span>,100+ size: 150,
101+ minSize: 145,
102+ meta: { cellClass: "whitespace-nowrap" },
103+ cell: (cell) => <span class="whitespace-nowrap text-sm">{formatDateTime(cell.row.original.starts_at, locale())}</span>,
95 },104 },
96 {105 {
97 accessorKey: "ends_at",106 accessorKey: "ends_at",
98 header: t("events.ends"),107 header: t("events.ends"),
99- cell: (cell) => <span class="mono text-sm">{formatDateTime(cell.row.original.ends_at, locale())}</span>,108+ size: 150,
109+ minSize: 145,
110+ meta: { cellClass: "whitespace-nowrap" },
111+ cell: (cell) => <span class="whitespace-nowrap text-sm">{formatDateTime(cell.row.original.ends_at, locale())}</span>,
100 },112 },
101 {113 {
102 accessorKey: "archived_at",114 accessorKey: "archived_at",
103 header: t("terms.archived"),115 header: t("terms.archived"),
116+ size: 115,
117+ minSize: 105,
118+ meta: { cellClass: "whitespace-nowrap" },
104 cell: (cell) => (119 cell: (cell) => (
105 <Show when={cell.row.original.archived_at != null} fallback={<span class="text-muted-foreground">—</span>}>120 <Show when={cell.row.original.archived_at != null} fallback={<span class="text-muted-foreground">—</span>}>
106 <Badge variant="secondary" class="rounded-full">{t("terms.archived")}</Badge>121 <Badge variant="secondary" class="rounded-full">{t("terms.archived")}</Badge>
@@ -226,7 +241,7 @@ function TermsContent() {
226 <Alert variant="destructive">{error()}</Alert>241 <Alert variant="destructive">{error()}</Alert>
227 </Show>242 </Show>
228 243
229- <section class="data-shell space-y-4 p-4">244+ <section class="space-y-4 p-0">
230 <Suspense fallback={<DataTableSkeleton columns={4} rows={6} />}>245 <Suspense fallback={<DataTableSkeleton columns={4} rows={6} />}>
231 <Show when={list.error}>246 <Show when={list.error}>
232 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />247 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />
src/pages/whiteboards-page.tsxmodified+16 -9
@@ -5,7 +5,7 @@ import { getBoards, postBoard, type Board } from "@/api/boards";
5 import { getUserSearch } from "@/api/users";5 import { getUserSearch } from "@/api/users";
6 import { formatApiError, type PersonRef } from "@/api/client";6 import { formatApiError, type PersonRef } from "@/api/client";
7 import { RouteGuard } from "@/components/layout/route-guard";7 import { RouteGuard } from "@/components/layout/route-guard";
8-import { DataTableSearch } from "@/components/ui/data-table-search";8+import { DataToolbar } from "@/components/ui/data-toolbar";
9 import { DataSection } from "@/components/ui/data-section";9 import { DataSection } from "@/components/ui/data-section";
10 import { Badge } from "@/components/ui/badge";10 import { Badge } from "@/components/ui/badge";
11 import { Button } from "@/components/ui/button";11 import { Button } from "@/components/ui/button";
@@ -64,12 +64,6 @@ function WhiteboardsContent() {
64 <DataSection64 <DataSection
65 title={t("whiteboard.title")}65 title={t("whiteboard.title")}
66 description={t("whiteboard.subtitle")}66 description={t("whiteboard.subtitle")}
67- actions={
68- <Button type="button" size="sm" class="min-w-[7.5rem] rounded-lg" onClick={() => setCreateOpen(true)}>
69- <IconPlus class="h-4 w-4" />
70- {t("whiteboard.create")}
71- </Button>
72- }
73 >67 >
74 <Suspense fallback={<PageSpinner />}>68 <Suspense fallback={<PageSpinner />}>
75 <Show when={boards.error}>69 <Show when={boards.error}>
@@ -79,8 +73,21 @@ function WhiteboardsContent() {
79 when={(boards()?.items ?? []).length > 0}73 when={(boards()?.items ?? []).length > 0}
80 fallback={<EmptyState kind="whiteboard" title={t("whiteboard.empty")} description={t("whiteboard.subtitle")} />}74 fallback={<EmptyState kind="whiteboard" title={t("whiteboard.empty")} description={t("whiteboard.subtitle")} />}
81 >75 >
82- <div class="space-y-4">76+ <div class="space-y-3">
83- <DataTableSearch value={query()} onChange={setQuery} placeholder={t("whiteboard.searchPlaceholder")} hint={t("search.hint.whiteboards")} />77+ <div class="rounded-xl border border-border-line bg-surface-base p-3 shadow-xs">
78+ <DataToolbar
79+ searchValue={query()}
80+ searchPlaceholder={t("whiteboard.searchPlaceholder")}
81+ searchHint={t("search.hint.whiteboards")}
82+ onSearchInput={setQuery}
83+ actions={
84+ <Button type="button" size="sm" class="rounded-lg" onClick={() => setCreateOpen(true)}>
85+ <IconPlus class="h-4 w-4" />
86+ {t("whiteboard.create")}
87+ </Button>
88+ }
89+ />
90+ </div>
84 <Show when={visibleBoards().length > 0} fallback={<EmptyState kind="search" title={t("common.noResults")} />}>91 <Show when={visibleBoards().length > 0} fallback={<EmptyState kind="search" title={t("common.noResults")} />}>
85 <div class="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3">92 <div class="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3">
86 <For each={visibleBoards()}>93 <For each={visibleBoards()}>
src/pages/work-log-page.tsxmodified+4 -4
@@ -52,17 +52,17 @@ function WorkLogContent() {
52 {52 {
53 accessorKey: "check_in",53 accessorKey: "check_in",
54 header: t("work.checkIn"),54 header: t("work.checkIn"),
55- cell: (cell) => <span class="mono">{formatDateTime(cell.row.original.check_in, locale())}</span>,55+ cell: (cell) => formatDateTime(cell.row.original.check_in, locale()),
56 },56 },
57 {57 {
58 accessorKey: "check_out",58 accessorKey: "check_out",
59 header: t("work.checkOut"),59 header: t("work.checkOut"),
60- cell: (cell) => <span class="mono">{formatDateTime(cell.row.original.check_out, locale())}</span>,60+ cell: (cell) => formatDateTime(cell.row.original.check_out, locale()),
61 },61 },
62 {62 {
63 accessorKey: "duration_ms",63 accessorKey: "duration_ms",
64 header: t("work.duration"),64 header: t("work.duration"),
65- cell: (cell) => <span class="mono">{formatDurationMinutes(cell.row.original.duration_ms, locale())}</span>,65+ cell: (cell) => formatDurationMinutes(cell.row.original.duration_ms, locale()),
66 },66 },
67 {67 {
68 id: "status",68 id: "status",
@@ -112,7 +112,7 @@ function WorkLogContent() {
112 }112 }
113 />113 />
114 114
115- <section class="data-shell space-y-4 p-4">115+ <section class="space-y-4 p-0">
116 <Suspense fallback={<PageSpinner />}>116 <Suspense fallback={<PageSpinner />}>
117 <Show when={list.error}>117 <Show when={list.error}>
118 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />118 <ErrorAlert message={formatApiError(list.error)} onRetry={() => void refetch()} />