diff --git a/src/components/insights/insight-runs-table.tsx b/src/components/insights/insight-runs-table.tsx
index 416d7e8..4d6b2fa 100644
--- a/src/components/insights/insight-runs-table.tsx
+++ b/src/components/insights/insight-runs-table.tsx
@@ -57,7 +57,7 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) {
const run = cell.row.original;
return (
- {run.students_ok}/{run.students_total}
+ {run.students_ok}/{run.students_total}
{run.students_failed} / {run.students_skipped}
);
@@ -66,13 +66,13 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) {
{
accessorKey: "rows_written",
header: tx("insights.written"),
- meta: { align: "center", cellClass: "mono tabular-nums" },
+ meta: { align: "center", cellClass: "tabular-nums" },
},
{
accessorKey: "duration_ms",
header: tx("insights.duration"),
meta: { align: "center" },
- cell: (cell) => {formatDurationMinutes(cell.row.original.duration_ms, prefs.locale())},
+ cell: (cell) => {formatDurationMinutes(cell.row.original.duration_ms, prefs.locale())},
},
{
id: "issues",
@@ -135,7 +135,7 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) {
columns={columns()}
data={props.runs}
empty={tx("insights.emptyRuns")}
- tableClass="insight-grid-table min-w-[980px]"
+ tableClass="insight-grid-table min-w-[56rem]"
enablePagination
pageSize={10}
storageKey="insight-runs"
diff --git a/src/components/insights/insight-student-analysis-tabs.tsx b/src/components/insights/insight-student-analysis-tabs.tsx
index 7a78530..8f410e2 100644
--- a/src/components/insights/insight-student-analysis-tabs.tsx
+++ b/src/components/insights/insight-student-analysis-tabs.tsx
@@ -103,11 +103,11 @@ function StudyChart(props: { value: unknown; t: (key: string) => string }) {
- {props.t("insights.analysis.activeDays")}
- - {String(num(recent().active_days) ?? "—")}
+ - {String(num(recent().active_days) ?? "—")}
- {props.t("insights.analysis.sessions")}
- - {String(num(recent().n_stints) ?? "—")}
+ - {String(num(recent().n_stints) ?? "—")}
diff --git a/src/components/insights/insight-students-table.tsx b/src/components/insights/insight-students-table.tsx
index 7b61e91..58dbac4 100644
--- a/src/components/insights/insight-students-table.tsx
+++ b/src/components/insights/insight-students-table.tsx
@@ -1,9 +1,9 @@
-import { For, createMemo, createSignal, type JSX } from "solid-js";
+import { createMemo, createSignal, type JSX } from "solid-js";
import { Link, useNavigate } from "@tanstack/solid-router";
import type { ColumnDef } from "@tanstack/solid-table";
import { Badge } from "@/components/ui/badge";
-import { Button } from "@/components/ui/button";
import { DataTable } from "@/components/ui/data-table";
+import { DropdownSelect } from "@/components/ui/select";
import { IconEye } from "@/components/ui/icons";
import { TableRowActions } from "@/components/ui/table-row-actions";
import { runReportText } from "@/i18n/insights-run-report";
@@ -102,7 +102,7 @@ export function InsightStudentsTable(props: {
header: rt("attention"),
meta: { align: "center" },
cell: (cell) => (
- 0 ? "font-semibold text-warning-text" : muted)}>
+ 0 ? "font-semibold text-warning-text" : muted)}>
{loaded(cell.row.original) || cell.row.original.state === "no_summary" ? cell.row.original.attention : "—"}
),
@@ -112,14 +112,14 @@ export function InsightStudentsTable(props: {
accessorFn: (row) => row.cards,
header: rt("cards"),
meta: { align: "center" },
- cell: (cell) => {cell.row.original.state === "not_loaded" ? "—" : cell.row.original.cards},
+ cell: (cell) => {cell.row.original.state === "not_loaded" ? "—" : cell.row.original.cards},
},
{
id: "marks",
accessorFn: (row) => row.marks.average ?? -1,
header: rt("marksAverage"),
meta: { align: "center" },
- cell: (cell) => {studentMarksText(locale(), cell.row.original)},
+ cell: (cell) => {studentMarksText(locale(), cell.row.original)},
},
{
id: "attendance",
@@ -129,7 +129,7 @@ export function InsightStudentsTable(props: {
cell: (cell) => {
const row = cell.row.original;
const low = loaded(row) && row.attendance.observed > 0 && (row.attendance.rate ?? 1) < 0.85;
- return {studentAttendanceText(locale(), row)};
+ return {studentAttendanceText(locale(), row)};
},
},
{
@@ -137,7 +137,7 @@ export function InsightStudentsTable(props: {
accessorFn: (row) => row.study.stints,
header: t("insights.studyStints"),
meta: { align: "center" },
- cell: (cell) => {loaded(cell.row.original) ? cell.row.original.study.stints : "—"},
+ cell: (cell) => {loaded(cell.row.original) ? cell.row.original.study.stints : "—"},
},
{
id: "confidence",
@@ -150,7 +150,7 @@ export function InsightStudentsTable(props: {
id: "computedAt",
accessorFn: (row) => row.computed_at ?? 0,
header: t("insights.computedAt"),
- meta: { align: "center", cellClass: "mono text-xs text-muted-foreground whitespace-nowrap" },
+ meta: { align: "center", cellClass: "text-xs text-muted-foreground whitespace-nowrap" },
cell: (cell) => calculatedDate(cell.row.original.computed_at),
},
{
@@ -175,11 +175,11 @@ export function InsightStudentsTable(props: {
},
]);
- const filters: { id: Filter; label: string }[] = [
- { id: "all", label: t("insights.filter.all") },
- { id: "attention", label: t("insights.filter.attention") },
- { id: "none", label: t("insights.filter.noAnalysis") },
- ];
+ const filters = createMemo(() => [
+ { value: "all" as Filter, label: `${t("insights.filter.all")} (${counts().all})` },
+ { value: "attention" as Filter, label: `${t("insights.filter.attention")} (${counts().attention})` },
+ { value: "none" as Filter, label: `${t("insights.filter.noAnalysis")} (${counts().none})` },
+ ]);
return (
matchesSearch(query, row.name)}
filters={
-
-
- {(item) => (
-
- )}
-
-
+
}
enablePagination
pageSize={10}
- tableClass="insight-grid-table min-w-[70rem]"
+ tableClass="insight-grid-table min-w-[60rem]"
storageKey="insight-students-v2"
/>
);
diff --git a/src/components/layout/app-shell.tsx b/src/components/layout/app-shell.tsx
index de978b2..5d20d27 100644
--- a/src/components/layout/app-shell.tsx
+++ b/src/components/layout/app-shell.tsx
@@ -13,7 +13,7 @@ import { ShellMessagesButton } from "@/components/layout/shell-messages-button";
import { MobileNavSheet } from "@/components/layout/mobile-nav-sheet";
import { SideNav } from "@/components/layout/side-nav";
import { SidebarAccount } from "@/components/layout/sidebar-account";
-import { IconChevronLeft, IconSparkles } from "@/components/ui/icons";
+import { IconPanelLeft, IconSparkles } from "@/components/ui/icons";
import { Toaster } from "@/components/ui/toast";
import { useAuth } from "@/stores/auth-context";
import { useModules } from "@/stores/modules-context";
@@ -107,13 +107,13 @@ export function AppShell(props: ParentProps) {
meets the header's bottom border. */}
diff --git a/src/components/marks/karne-view.tsx b/src/components/marks/karne-view.tsx
index 41e6c47..632826d 100644
--- a/src/components/marks/karne-view.tsx
+++ b/src/components/marks/karne-view.tsx
@@ -29,12 +29,12 @@ export function KarneView(props: {
const columns = createMemo[]>(() => [
{ accessorKey: "course", header: t("nav.courses"), meta: { cellClass: "font-medium" } },
- { accessorKey: "ders_saati", header: t("instances.dersSaati"), meta: { cellClass: "mono tabular-nums text-muted-foreground" } },
+ { accessorKey: "ders_saati", header: t("instances.dersSaati"), meta: { cellClass: "tabular-nums text-muted-foreground" } },
{
id: "average",
accessorFn: (line) => formatAverage(line.average),
header: t("marks.courseAvg"),
- meta: { cellClass: "mono font-semibold tabular-nums" },
+ meta: { cellClass: "font-semibold tabular-nums" },
},
{
id: "band",
diff --git a/src/components/marks/marks-report-view.tsx b/src/components/marks/marks-report-view.tsx
index f74aa59..818bc6b 100644
--- a/src/components/marks/marks-report-view.tsx
+++ b/src/components/marks/marks-report-view.tsx
@@ -58,7 +58,7 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean
- {markWithGrade(cell.row.original.average, cell.row.original.average_grade)}
+ {markWithGrade(cell.row.original.average, cell.row.original.average_grade)}
),
},
@@ -100,13 +100,13 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean
{
id: "weight",
header: t("marks.weight"),
- meta: { align: "right", divider: "left", cellClass: "mono" },
+ meta: { align: "right", divider: "left", cellClass: "" },
cell: (cell) => examWeight(cell.row.original, settings()?.exam_kinds) ?? "—",
},
{
accessorKey: "mark",
header: t("marks.mark"),
- meta: { align: "right", cellClass: "mono font-semibold" },
+ meta: { align: "right", cellClass: "font-semibold" },
cell: (cell) => markWithGrade(cell.row.original.mark, cell.row.original.grade),
},
]);
diff --git a/src/components/meals/meal-menu-card.tsx b/src/components/meals/meal-menu-card.tsx
index 837a44b..9c30f82 100644
--- a/src/components/meals/meal-menu-card.tsx
+++ b/src/components/meals/meal-menu-card.tsx
@@ -31,7 +31,7 @@ export function MealMenuCard(props: {
- {props.menu.slot}
+ {props.menu.slot}
{formatTry(total(), props.locale)}
@@ -46,7 +46,7 @@ export function MealMenuCard(props: {
{props.labels.reservations}: {props.reservationCount}
- %{occupancyPct()}
+ %{occupancyPct()}
@@ -55,7 +55,7 @@ export function MealMenuCard(props: {
{props.menu.dishes.length} {props.labels.dishes}
- {props.labels.capacity}: {props.menu.capacity ?? "∞"}
+ {props.labels.capacity}: {props.menu.capacity ?? "∞"}
{props.labels.topPick}
diff --git a/src/components/notes/note-reader-panel.tsx b/src/components/notes/note-reader-panel.tsx
index bb92e96..fac1157 100644
--- a/src/components/notes/note-reader-panel.tsx
+++ b/src/components/notes/note-reader-panel.tsx
@@ -2,8 +2,6 @@ import { Show } from "solid-js";
import type { Note } from "@/api/client";
import type { NoteFileSource } from "@/lib/note-source";
import { NoteFilesPanel } from "@/components/notes/note-files-panel";
-import { RagOutputsPanel } from "@/components/notes/rag-outputs-panel";
-import { PodcastPanel } from "@/components/notes/podcast-panel";
import { SidePanel } from "@/components/ui/side-panel";
import { toRichTextHtml } from "@/lib/rich-text";
import { useT } from "@/stores/preferences-context";
@@ -38,10 +36,6 @@ export function NoteReaderPanel(props: {
-
-
-
-
)}
diff --git a/src/components/notes/podcast-history.test.tsx b/src/components/notes/podcast-history.test.tsx
index 46365e6..3349f40 100644
--- a/src/components/notes/podcast-history.test.tsx
+++ b/src/components/notes/podcast-history.test.tsx
@@ -12,8 +12,8 @@ const podcastApi = vi.hoisted(() => ({
vi.mock("@/api/podcast", () => podcastApi);
-function page(items: PodcastJobSummary[]) {
- return { items, total: items.length, limit: 10, offset: 0 };
+function page(items: PodcastJobSummary[], total = items.length, offset = 0) {
+ return { items, total, limit: 10, offset };
}
function job(over: Partial ): PodcastJobSummary {
@@ -105,7 +105,7 @@ describe("PodcastHistory", () => {
renderHistory("note-1");
await waitFor(() =>
- expect(podcastApi.listPodcastJobs).toHaveBeenCalledWith({ limit: 10, sourceId: "note-1" }),
+ expect(podcastApi.listPodcastJobs).toHaveBeenCalledWith({ limit: 10, offset: 0, sourceId: "note-1" }),
);
expect(screen.queryByRole("button", { name: "Tümü" })).toBeNull();
expect(screen.queryByRole("button", { name: "Bu not" })).toBeNull();
@@ -117,7 +117,7 @@ describe("PodcastHistory", () => {
renderHistory("note-1");
await waitFor(() => expect(podcastApi.listPodcastJobs).toHaveBeenCalledTimes(1));
- expect(podcastApi.listPodcastJobs).toHaveBeenLastCalledWith({ limit: 10, sourceId: "note-1" });
+ expect(podcastApi.listPodcastJobs).toHaveBeenLastCalledWith({ limit: 10, offset: 0, sourceId: "note-1" });
expect(screen.queryByText("Tüm notlarınızdaki bölümler gösteriliyor.")).toBeNull();
});
@@ -162,4 +162,23 @@ describe("PodcastHistory", () => {
setKey("job-2");
await waitFor(() => expect(podcastApi.listPodcastJobs).toHaveBeenCalledTimes(2));
});
+
+ it("paginates the selected note's podcast history", async () => {
+ const first = job({ job_id: "job-1", source_title: "İlk bölüm" });
+ const second = job({ job_id: "job-2", source_title: "İkinci bölüm" });
+ podcastApi.listPodcastJobs
+ .mockResolvedValueOnce(page([first], 11, 0))
+ .mockResolvedValueOnce(page([second], 11, 10));
+
+ renderHistory("note-1");
+
+ await waitFor(() => expect(screen.getByText("İlk bölüm")).toBeTruthy());
+ expect(screen.getByText("1 / 2")).toBeTruthy();
+
+ fireEvent.click(screen.getByRole("button", { name: "Sonraki" }));
+
+ await waitFor(() => expect(screen.getByText("İkinci bölüm")).toBeTruthy());
+ expect(podcastApi.listPodcastJobs).toHaveBeenLastCalledWith({ limit: 10, offset: 10, sourceId: "note-1" });
+ expect(screen.getByText("2 / 2")).toBeTruthy();
+ });
});
diff --git a/src/components/notes/podcast-history.tsx b/src/components/notes/podcast-history.tsx
index 6d46db1..50c4cff 100644
--- a/src/components/notes/podcast-history.tsx
+++ b/src/components/notes/podcast-history.tsx
@@ -1,4 +1,4 @@
-import { For, Show, Suspense, createEffect, createSignal } from "solid-js";
+import { For, Show, Suspense, createEffect, createMemo, createSignal } from "solid-js";
import { createResource } from "@/lib/create-resource";
import { formatApiError } from "@/api/client";
import { listPodcastJobs, podcastAudioUrl } from "@/api/podcast";
@@ -7,6 +7,7 @@ import { Badge } from "@/components/ui/badge";
import { Button, buttonVariants } from "@/components/ui/button";
import { EmptyInline } from "@/components/ui/empty-inline";
import { PageSpinner } from "@/components/ui/page-spinner";
+import { PaginationControls } from "@/components/ui/pagination-controls";
import { IconDownload, IconWaveform } from "@/components/ui/icons";
import { cn } from "@/lib/cn";
import { podcastDownloadFilename, usePodcastDownloadT } from "@/components/notes/podcast-download";
@@ -28,13 +29,20 @@ export function PodcastHistory(props: { noteId?: string; active?: boolean; refet
const downloadT = usePodcastDownloadT();
const { locale } = usePreferences();
const [playing, setPlaying] = createSignal("");
+ const [page, setPage] = createSignal(0);
const active = () => props.active !== false;
+ createEffect(() => {
+ props.noteId;
+ setPage(0);
+ });
+
// The source is the scope string, not a fresh object: an identity-stable
// value keeps the resource from refetching when nothing about it changed.
+ const source = createMemo(() => (active() && props.noteId ? { noteId: props.noteId, page: page() } : null));
const [list, { refetch }] = createResource(
- () => (active() ? props.noteId ?? null : null),
- (noteId) => listPodcastJobs({ limit: HISTORY_PAGE_SIZE, sourceId: noteId }),
+ source,
+ (scope) => listPodcastJobs({ limit: HISTORY_PAGE_SIZE, offset: scope.page * HISTORY_PAGE_SIZE, sourceId: scope.noteId }),
);
// 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
});
const jobs = () => list()?.items ?? [];
+ const totalPages = createMemo(() => Math.max(1, Math.ceil((list()?.total ?? 0) / HISTORY_PAGE_SIZE)));
+ const safePage = createMemo(() => Math.min(page(), totalPages() - 1));
+
+ createEffect(() => {
+ if (page() > totalPages() - 1) setPage(totalPages() - 1);
+ });
const stateVariant = (state: string) => {
if (state === "done") return "success" as const;
@@ -132,6 +146,9 @@ export function PodcastHistory(props: { noteId?: string; active?: boolean; refet
+ HISTORY_PAGE_SIZE}>
+
+
diff --git a/src/components/notes/rag-output-drawer.test.tsx b/src/components/notes/rag-output-drawer.test.tsx
index 88714ef..9625fb7 100644
--- a/src/components/notes/rag-output-drawer.test.tsx
+++ b/src/components/notes/rag-output-drawer.test.tsx
@@ -176,7 +176,7 @@ describe("RagOutputDrawer", () => {
renderPanel(HEALTHY);
await waitFor(() => expect(screen.getByText(SUMMARY)).toBeTruthy());
- expect(screen.getByText("Markdown preview")).toBeTruthy();
+ expect(screen.getByText("Preview")).toBeTruthy();
expect(screen.getByText("hücre zarı")).toBeTruthy();
expect(screen.getByText("organel")).toBeTruthy();
expect(screen.getByRole("button", { name: "Actions" })).toBeTruthy();
diff --git a/src/components/notes/rag-output-drawer.tsx b/src/components/notes/rag-output-drawer.tsx
index 7805cc7..7b78409 100644
--- a/src/components/notes/rag-output-drawer.tsx
+++ b/src/components/notes/rag-output-drawer.tsx
@@ -174,7 +174,7 @@ export function RagOutputDrawer(props: {
- {rt("date")}
- - {formatDateTime(output().generated_at, locale())}
+ - {formatDateTime(output().generated_at, locale())}
- {rt("note")}
- {noteTitle()}
diff --git a/src/components/notes/rag-outputs-panel.tsx b/src/components/notes/rag-outputs-panel.tsx
index 26bca51..5bcfc7a 100644
--- a/src/components/notes/rag-outputs-panel.tsx
+++ b/src/components/notes/rag-outputs-panel.tsx
@@ -271,7 +271,7 @@ export function RagOutputsPanel(props: {
{t("courseNotes.markdownPreview")}
- {formatDateTime(current().generated_at, locale())}
+ {formatDateTime(current().generated_at, locale())}
diff --git a/src/components/pomodoro/pomodoro-log-view.tsx b/src/components/pomodoro/pomodoro-log-view.tsx
index 718ec9e..4643159 100644
--- a/src/components/pomodoro/pomodoro-log-view.tsx
+++ b/src/components/pomodoro/pomodoro-log-view.tsx
@@ -19,17 +19,17 @@ export function PomodoroLogView(props: { log: PomodoroLog }) {
{
accessorKey: "started_at",
header: t("pomodoro.startedAt"),
- cell: (cell) => {formatDateTime(cell.row.original.started_at, locale())},
+ cell: (cell) => {formatDateTime(cell.row.original.started_at, locale())},
},
{
accessorKey: "finished_at",
header: t("pomodoro.finishedAt"),
- cell: (cell) => {formatDateTime(cell.row.original.finished_at, locale())},
+ cell: (cell) => {formatDateTime(cell.row.original.finished_at, locale())},
},
{
accessorKey: "duration_ms",
header: t("pomodoro.duration"),
- cell: (cell) => {formatDurationClock(cell.row.original.duration_ms)},
+ cell: (cell) => {formatDurationClock(cell.row.original.duration_ms)},
},
{
accessorKey: "counted",
@@ -50,7 +50,7 @@ export function PomodoroLogView(props: { log: PomodoroLog }) {
{t("pomodoro.total")}
- {formatDurationClock(props.log.total_focus_ms)}
+ {formatDurationClock(props.log.total_focus_ms)}
diff --git a/src/components/rag/rag-copy.ts b/src/components/rag/rag-copy.ts
index 7eab748..297ccc1 100644
--- a/src/components/rag/rag-copy.ts
+++ b/src/components/rag/rag-copy.ts
@@ -35,6 +35,7 @@ const copy = {
pages: "Pages",
document: "Course document",
rename: "Rename chat",
+ actions: "Chat actions",
renameHint: "Give this chat a short, recognisable name.",
renameLabel: "Chat name",
renamePlaceholder: "e.g. Newton's laws",
@@ -83,6 +84,7 @@ const copy = {
pages: "Sayfalar",
document: "Ders belgesi",
rename: "Sohbeti yeniden adlandır",
+ actions: "Sohbet işlemleri",
renameHint: "Bu sohbete kısa ve ayırt edilebilir bir ad ver.",
renameLabel: "Sohbet adı",
renamePlaceholder: "Örn. Newton yasaları",
diff --git a/src/components/rag/rag-thread-list.tsx b/src/components/rag/rag-thread-list.tsx
index d3f251e..d09260c 100644
--- a/src/components/rag/rag-thread-list.tsx
+++ b/src/components/rag/rag-thread-list.tsx
@@ -6,6 +6,7 @@ import { EmptyInline } from "@/components/ui/empty-inline";
import { IconEdit, IconTrash } from "@/components/ui/icons";
import { PageSpinner } from "@/components/ui/page-spinner";
import { PaginationControls } from "@/components/ui/pagination-controls";
+import { TableRowActions } from "@/components/ui/table-row-actions";
import { cn } from "@/lib/cn";
import { formatDateTime } from "@/lib/format";
import type { Locale } from "@/i18n/messages";
@@ -16,7 +17,7 @@ export function RagThreadList(props: {
activeId?: string;
version: number;
locale: Locale;
- labels: { untitled: string; emptyThreads: string; emptyThreadsHint: string; rename: string; delete: string };
+ labels: { untitled: string; emptyThreads: string; emptyThreadsHint: string; rename: string; actions: string; delete: string };
onOpen: (thread: RagThread) => void;
onRename: (thread: RagThread) => void;
onRemove: (thread: RagThread) => void;
@@ -53,22 +54,14 @@ export function RagThreadList(props: {
{thread.title || props.labels.untitled}
{formatDateTime(thread.updated_at, props.locale)}
-
-
+ , onSelect: () => props.onRename(thread) },
+ { label: props.labels.delete, icon: , destructive: true, onSelect: () => props.onRemove(thread) },
+ ]}
+ />
)}
diff --git a/src/components/sessions/course-sessions-panel.tsx b/src/components/sessions/course-sessions-panel.tsx
index f7849cb..f863ef9 100644
--- a/src/components/sessions/course-sessions-panel.tsx
+++ b/src/components/sessions/course-sessions-panel.tsx
@@ -217,7 +217,7 @@ export function CourseSessionsPanel(props: {
id: "time",
accessorFn: (row) => row.starts_at,
header: t("appointments.time"),
- meta: { cellClass: "mono text-xs text-muted-foreground" },
+ meta: { cellClass: "text-xs text-muted-foreground" },
cell: (cell) => (
{formatDateTime(cell.row.original.starts_at, locale())}
@@ -363,7 +363,7 @@ export function CourseSessionsPanel(props: {
-
+
diff --git a/src/components/ui/data-table.tsx b/src/components/ui/data-table.tsx
index 31096f1..4e7ac0e 100644
--- a/src/components/ui/data-table.tsx
+++ b/src/components/ui/data-table.tsx
@@ -67,7 +67,6 @@ export type DataTableProps = {
pageSize: number;
total: number;
onPageChange: (pageIndex: number) => void;
- onPageSizeChange?: (pageSize: number) => void;
};
/**
* Below the `sm` breakpoint rows render as cards (first column as the
@@ -85,6 +84,8 @@ export type DataTableProps = {
* Without a key the same controls remain available for the current mount.
*/
storageKey?: string;
+ /** Split the title/toolbar and table into the same inner surfaces as detail pages. */
+ surfaceSections?: boolean;
};
const resolveUpdater = (updater: Updater, old: T): T =>
@@ -114,6 +115,11 @@ export function DataTable(props: DataTableProps props.searchPredicate?.(row, query));
};
const table = createSolidTable({
+ defaultColumn: {
+ size: 120,
+ minSize: 72,
+ maxSize: 360,
+ },
get data() {
return tableData();
},
@@ -202,8 +208,9 @@ export function DataTable(props: DataTableProps (props.enableColumnVisibility ?? true) && hideableColumns().length > 0;
const showSearch = () => props.searchPredicate != null || props.filterColumn != null || props.onSearchInput != null;
- const showHeader = () => props.title != null || props.description != null || props.actions != null;
- const showToolbar = () => showSearch() || props.filters != null || showColumnMenu();
+ const sectioned = () => props.surfaceSections !== false;
+ const showHeader = () => false;
+ const showToolbar = () => showSearch() || props.filters != null || showColumnMenu() || props.actions != null;
const pageCount = () => props.manualPagination ? Math.max(1, Math.ceil(props.manualPagination.total / props.manualPagination.pageSize)) : table.getPageCount();
const pageIndex = () => props.manualPagination?.pageIndex ?? table.getState().pagination.pageIndex;
const pageSize = () => props.manualPagination?.pageSize ?? table.getState().pagination.pageSize;
@@ -256,10 +263,8 @@ export function DataTable(props: DataTableProps[number]["headers"][number]) => {
const content = flexRender(header.column.columnDef.header, header.getContext());
- const align = alignOf(header.column);
if (!sortingEnabled() || !header.column.getCanSort()) {
- // The th already carries alignClass; the block span makes text-align resolve.
- return {content};
+ return {content};
}
const sorted = () => header.column.getIsSorted();
return (
@@ -267,9 +272,7 @@ export function DataTable(props: DataTableProps header.column.toggleSorting(sorted() === "asc")}
>
{content}
@@ -293,7 +296,7 @@ export function DataTable(props: DataTableProps
-
+
{props.title}
@@ -308,7 +311,7 @@ export function DataTable(props: DataTableProps
-
+
(props: DataTableProps{props.filters}
-
-
+
+
+ {props.actions}
+
+
-
-
+
+
@@ -394,7 +400,7 @@ export function DataTable(props: DataTableProps
-
+
(props: DataTableProps(props: DataTableProps { table.setPageSize(size); setPageIndex(0); }
- }
/>
diff --git a/src/components/ui/table-pagination.tsx b/src/components/ui/table-pagination.tsx
index 07acb28..5717174 100644
--- a/src/components/ui/table-pagination.tsx
+++ b/src/components/ui/table-pagination.tsx
@@ -1,6 +1,5 @@
-import { Show } from "solid-js";
import { Button } from "@/components/ui/button";
-import { DropdownSelect } from "@/components/ui/select";
+import { IconChevronLeft, IconChevronRight } from "@/components/ui/icons";
import { useT } from "@/stores/preferences-context";
export type TablePaginationProps = {
@@ -11,59 +10,44 @@ export type TablePaginationProps = {
/** Total row count (across all pages). */
total: number;
onPageChange: (pageIndex: number) => void;
- onPageSizeChange?: (pageSize: number) => void;
- pageSizeOptions?: number[];
};
-/** Footer: "X kayıttan a-b arası" + page-size select + prev/next + "page / total". */
+/** Footer: "X kayıttan a-b arası" + prev/next + "page / total". */
export function TablePagination(props: TablePaginationProps) {
const t = useT();
- // Always include the active page size so the select shows a selected value
- // instead of rendering blank when a page passes a non-standard size (e.g. 12).
- const options = () => {
- const base = props.pageSizeOptions ?? [10, 25, 50];
- return base.includes(props.pageSize) ? base : [...base, props.pageSize].sort((a, b) => a - b);
- };
const start = () => (props.total === 0 ? 0 : props.pageIndex * props.pageSize + 1);
const end = () => Math.min((props.pageIndex + 1) * props.pageSize, props.total);
return (
-
-
+
+
{t("common.pageRange", { start: start(), end: end(), total: props.total })}
-
-
- ({
- value: String(size),
- label: t("common.rowsPerPage", { size }),
- }))}
- onChange={(value) => props.onPageSizeChange?.(Number(value))}
- />
-
+
-
+
{t("common.pageOf", { page: props.pageIndex + 1, total: props.pageCount })}
diff --git a/src/components/ui/table-row-actions.tsx b/src/components/ui/table-row-actions.tsx
index 11c5756..874f4f9 100644
--- a/src/components/ui/table-row-actions.tsx
+++ b/src/components/ui/table-row-actions.tsx
@@ -25,7 +25,7 @@ export function TableRowActions(props: { label: string; actions: TableRowAction[
>) {
return (
>) {
export function TableCell(props: ParentProps>) {
const [local, rest] = splitProps(props, ["class", "children"]);
return (
- |
+ |
{local.children}
|
);
diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx
index 952597d..baeaf5b 100644
--- a/src/components/ui/tabs.tsx
+++ b/src/components/ui/tabs.tsx
@@ -12,10 +12,7 @@ export function TabsList(
return (
(
const [local, rest] = splitProps(props as ComponentProps, ["children", "class"]);
return (
- matchesSearch(query, user.username, displayName(user), user.email, t(`role.${user.role}` as MessageKey));
+ matchesSearch(query, user.username, user.phone, displayName(user), user.email, t(`role.${user.role}` as MessageKey));
const columns = createMemo[]>(() => [
{
accessorKey: "username",
@@ -88,12 +88,12 @@ export function UserTable(props: {
meta: { cellClass: "truncate font-medium" },
},
{
- id: "name",
- header: t("profile.name"),
+ id: "phone",
+ header: t("profile.phone"),
size: 180,
- minSize: 120,
+ minSize: 130,
meta: { cellClass: "truncate" },
- cell: (cell) => displayName(cell.row.original),
+ cell: (cell) => cell.row.original.phone || "—",
},
{
accessorKey: "email",
@@ -164,6 +164,7 @@ export function UserTable(props: {
storageKey="admin-users"
searchPredicate={searchUser}
filterHint={t("search.hint.users")}
+ surfaceSections
enablePagination
pageSize={20}
onRowClick={props.onUserClick}
diff --git a/src/i18n/messages.ts b/src/i18n/messages.ts
index 9f4b2ad..d188736 100644
--- a/src/i18n/messages.ts
+++ b/src/i18n/messages.ts
@@ -966,8 +966,6 @@ export type MessageKey =
| "podcast.pageDescription"
| "podcast.source"
| "podcast.selectNote"
- | "podcast.selectPrompt"
- | "podcast.selectPromptHint"
| "podcast.noNotes"
| "podcast.noNotesHint"
| "podcast.format"
@@ -2042,11 +2040,13 @@ export type MessageKey =
| "search.hint.exams"
| "search.hint.events"
| "search.hint.courses"
+ | "search.hint.courseNotes"
| "search.hint.classes"
| "search.hint.bank"
| "search.hint.whiteboards"
| "search.hint.chat"
| "search.hint.deadlines"
+ | "search.hint.homework"
| "search.hint.paymentsStudents"
| "work.userNotFound"
| "messages.inbox"
@@ -2812,7 +2812,7 @@ const en: Dict = {
"common.export": "Export",
"common.columns": "Columns",
"common.visibleColumns": "Visible columns",
- "common.pageRange": "{start}-{end} of {total}",
+ "common.pageRange": "{start}-{end} / {total}",
"common.rowsPerPage": "{size} / page",
"common.moreFilters": "More filters",
"common.lessFilters": "Less filters",
@@ -3192,7 +3192,7 @@ const en: Dict = {
"courseNotes.empty": "No notes on this course yet.",
"courseNotes.emptyManageHint": "Write a note the whole class can read, and attach files to it.",
"courseNotes.ragTitle": "AI summary",
- "courseNotes.markdownPreview": "Markdown preview",
+ "courseNotes.markdownPreview": "Preview",
"courseNotes.ragEmpty": "No AI outputs on this note yet.",
"courseNotes.ragHint": "Create a fresh summary from this note and its attachments.",
"courseNotes.ragGenerate": "Create summary",
@@ -3206,8 +3206,6 @@ const en: Dict = {
"podcast.pageDescription": "Choose a lesson note, pick a narration style, and create its audio.",
"podcast.source": "Lesson note",
"podcast.selectNote": "Choose a lesson note…",
- "podcast.selectPrompt": "Please choose a lesson note",
- "podcast.selectPromptHint": "The narration options will appear here after you select a note above.",
"podcast.noNotes": "No lesson notes are available.",
"podcast.noNotesHint": "Add a note to one of your courses before creating audio.",
"podcast.format": "Narration style",
@@ -4362,15 +4360,17 @@ const en: Dict = {
"search.hint.students": "Matches name, surname and username. Use the filter next to it for a class.",
"search.hint.teachers": "Matches name, surname and username.",
"search.hint.people": "Matches name, surname, username and user id.",
- "search.hint.users": "Matches username, name, e-mail, user id and role.",
+ "search.hint.users": "Matches username, phone, name, e-mail, user id and role.",
"search.hint.exams": "Matches exam title, description, course, exam kind and status.",
"search.hint.events": "Matches event title, description, audience and date.",
"search.hint.courses": "Matches course title, description, creator, teacher and term.",
+ "search.hint.courseNotes": "Matches note title and content.",
"search.hint.classes": "Matches class name, grade and homeroom teacher.",
"search.hint.bank": "Matches a phrase inside the question text.",
"search.hint.whiteboards": "Matches board titles on the page you are viewing.",
"search.hint.chat": "Matches the text of the messages in this chat.",
"search.hint.deadlines": "Matches the title of the upcoming items.",
+ "search.hint.homework": "Matches homework title, description and course.",
"search.hint.paymentsStudents": "Matches a student's name, surname or username.",
"work.userNotFound": "No work log found for this user.",
"work.show": "Show log",
@@ -5054,7 +5054,7 @@ const tr: Dict = {
"common.export": "Dışa aktar",
"common.columns": "Sütunlar",
"common.visibleColumns": "Görünür sütunlar",
- "common.pageRange": "{total} kayıttan {start}-{end}",
+ "common.pageRange": "{start}-{end} / {total}",
"common.rowsPerPage": "{size} / sayfa",
"common.moreFilters": "Daha fazla filtre",
"common.lessFilters": "Daha az filtre",
@@ -5434,7 +5434,7 @@ const tr: Dict = {
"courseNotes.empty": "Bu derse ait henüz not yok.",
"courseNotes.emptyManageHint": "Tüm sınıfın okuyabileceği bir not yazın, dosya da ekleyebilirsiniz.",
"courseNotes.ragTitle": "Yapay zekâ özeti",
- "courseNotes.markdownPreview": "Markdown önizleme",
+ "courseNotes.markdownPreview": "Önizleme",
"courseNotes.ragEmpty": "Bu notta henüz YZ çıktısı yok.",
"courseNotes.ragHint": "Bu not ve eklerinden güncel bir özet oluşturun.",
"courseNotes.ragGenerate": "Özet oluştur",
@@ -5448,8 +5448,6 @@ const tr: Dict = {
"podcast.pageDescription": "Ders notunu seçin, anlatım biçimini belirleyin ve ses kaydını oluşturun.",
"podcast.source": "Ders notu",
"podcast.selectNote": "Bir ders notu seçin…",
- "podcast.selectPrompt": "Lütfen bir ders notu seçin",
- "podcast.selectPromptHint": "Yukarıdan bir not seçtiğinizde anlatım seçenekleri burada açılacak.",
"podcast.noNotes": "Kullanılabilir ders notu yok.",
"podcast.noNotesHint": "Ses oluşturmadan önce derslerinizden birine not ekleyin.",
"podcast.format": "Anlatım biçimi",
@@ -6604,15 +6602,17 @@ const tr: Dict = {
"search.hint.students": "Ad, soyad ve kullan\u0131c\u0131 ad\u0131nda arar. S\u0131n\u0131f i\u00e7in yan\u0131ndaki filtreyi kullan\u0131n.",
"search.hint.teachers": "Ad, soyad ve kullan\u0131c\u0131 ad\u0131nda arar.",
"search.hint.people": "Ad, soyad, kullan\u0131c\u0131 ad\u0131 ve kullan\u0131c\u0131 ID'sinde arar.",
- "search.hint.users": "Kullan\u0131c\u0131 ad\u0131, ad, e-posta, kullan\u0131c\u0131 ID'si ve rolde arar.",
+ "search.hint.users": "Kullan\u0131c\u0131 ad\u0131, telefon, ad, e-posta, kullan\u0131c\u0131 ID'si ve rolde arar.",
"search.hint.exams": "S\u0131nav ad\u0131, a\u00e7\u0131klama, ders, s\u0131nav t\u00fcr\u00fc ve durumda arar.",
"search.hint.events": "Etkinlik ad\u0131, a\u00e7\u0131klama, kat\u0131l\u0131mc\u0131 kitlesi ve tarihte arar.",
"search.hint.courses": "Ders ad\u0131, a\u00e7\u0131klama, olu\u015fturan, \u00f6\u011fretmen ve d\u00f6nemde arar.",
+ "search.hint.courseNotes": "Not ba\u015fl\u0131\u011f\u0131 ve i\u00e7eri\u011finde arar.",
"search.hint.classes": "\u015eube ad\u0131, s\u0131n\u0131f d\u00fczeyi ve dan\u0131\u015fman \u00f6\u011fretmende arar.",
"search.hint.bank": "Soru metninde ge\u00e7en bir ifadeyi arar.",
"search.hint.whiteboards": "A\u00e7\u0131k olan sayfadaki tahta ba\u015fl\u0131klar\u0131nda arar.",
"search.hint.chat": "Bu sohbetteki mesajlar\u0131n metninde arar.",
"search.hint.deadlines": "Yakla\u015fan kay\u0131tlar\u0131n ba\u015fl\u0131\u011f\u0131nda arar.",
+ "search.hint.homework": "\u00d6dev ad\u0131, a\u00e7\u0131klamas\u0131 ve dersinde arar.",
"search.hint.paymentsStudents": "\u00d6\u011frencinin ad\u0131nda, soyad\u0131nda veya kullan\u0131c\u0131 ad\u0131nda arar.",
"work.userNotFound": "Bu kullanıcı için mesai kaydı bulunamadı.",
"work.show": "Kaydı göster",
diff --git a/src/pages/academic-years-page.tsx b/src/pages/academic-years-page.tsx
index 8abfaff..8a298f8 100644
--- a/src/pages/academic-years-page.tsx
+++ b/src/pages/academic-years-page.tsx
@@ -146,9 +146,12 @@ function AcademicYearsContent() {
{
accessorKey: "name",
header: t("settings.name"),
+ size: 190,
+ minSize: 170,
+ meta: { cellClass: "min-w-0" },
cell: (cell) => (
-
- {cell.row.original.name}
+
+ {cell.row.original.name}
{t("academicYears.archived")}
@@ -158,24 +161,34 @@ function AcademicYearsContent() {
{
accessorKey: "starts_at",
header: t("events.starts"),
- cell: (cell) => {formatDateTime(cell.row.original.starts_at, locale())},
+ size: 150,
+ minSize: 145,
+ meta: { cellClass: "whitespace-nowrap" },
+ cell: (cell) => {formatDateTime(cell.row.original.starts_at, locale())},
},
{
accessorKey: "ends_at",
header: t("events.ends"),
- cell: (cell) => {formatDateTime(cell.row.original.ends_at, locale())},
+ size: 150,
+ minSize: 145,
+ meta: { cellClass: "whitespace-nowrap" },
+ cell: (cell) => {formatDateTime(cell.row.original.ends_at, locale())},
},
{
id: "classes",
accessorFn: (row) => row.class_count,
header: t("academicYears.classCount"),
- meta: { cellClass: "mono" },
+ size: 90,
+ minSize: 80,
+ meta: { cellClass: "text-center", align: "center" },
},
{
id: "terms",
accessorFn: (row) => row.term_count,
header: t("academicYears.termCount"),
- meta: { cellClass: "mono" },
+ size: 90,
+ minSize: 80,
+ meta: { cellClass: "text-center", align: "center" },
},
{
id: "actions",
@@ -230,7 +243,7 @@ function AcademicYearsContent() {
{error()}
-
+
}>
void refetch()} />
diff --git a/src/pages/admin-user-detail-page.tsx b/src/pages/admin-user-detail-page.tsx
index 9d1abd6..772bb44 100644
--- a/src/pages/admin-user-detail-page.tsx
+++ b/src/pages/admin-user-detail-page.tsx
@@ -69,7 +69,7 @@ function AdminUserDetailContent() {
{error()}
-
+
-
+
diff --git a/src/pages/admin-users-page.tsx b/src/pages/admin-users-page.tsx
index 6d9fc3e..5ba6471 100644
--- a/src/pages/admin-users-page.tsx
+++ b/src/pages/admin-users-page.tsx
@@ -90,7 +90,7 @@ function AdminUsersContent() {
-
+
}>
{(summary) => (
- {numericDate(summary().computed_at)}
+ {numericDate(summary().computed_at)}
·
{confidenceLabel(summary().confidence)}
diff --git a/src/pages/appointments-page.tsx b/src/pages/appointments-page.tsx
index acd08eb..d249313 100644
--- a/src/pages/appointments-page.tsx
+++ b/src/pages/appointments-page.tsx
@@ -144,7 +144,7 @@ function AppointmentsContent() {
// digits line up across rows). Same-day windows show one date; cross-day
// spells out the end date on the second line.
const timeCell = (starts: number | null, ends: number | null) => (
-
+
{formatDate(starts, locale())}
{sameDay(starts, ends)
@@ -466,7 +466,7 @@ function AppointmentsContent() {
+
}>
{formatApiError(appts.error)}
@@ -477,7 +477,7 @@ function AppointmentsContent() {
{personLabel(booking().teacher)}
- {timeWindow(booking().starts_at, booking().ends_at)}
+ {timeWindow(booking().starts_at, booking().ends_at)}
{statusBadge(booking().status)}
@@ -498,7 +498,7 @@ function AppointmentsContent() {
}>
-
+
}>
{formatApiError(appts.error)}
+
}>
{formatApiError(slots.error)}
}>
-
+
}>
{formatApiError(slots.error)}
cell.row.original.modules.length,
},
{
accessorKey: "created_at",
header: t("builder.createdAt"),
- cell: (cell) => {formatDateTime(cell.row.original.created_at, locale())},
+ cell: (cell) => {formatDateTime(cell.row.original.created_at, locale())},
},
{
id: "actions",
@@ -111,7 +111,7 @@ function BuilderSchoolsContent() {
{error()}
-
+
}>
void refetch()} />
@@ -128,7 +128,7 @@ function BuilderSchoolsContent() {
}
columns={columns()}
data={list() ?? []}
- tableClass="min-w-176"
+ tableClass="min-w-[52rem]"
empty={t("builder.noSchools")}
filterColumn="name"
enablePagination
diff --git a/src/pages/class-detail-page.tsx b/src/pages/class-detail-page.tsx
index aeb9a30..4d3ce9f 100644
--- a/src/pages/class-detail-page.tsx
+++ b/src/pages/class-detail-page.tsx
@@ -189,13 +189,13 @@ function ClassDetailContent() {
id: "dersSaati",
accessorFn: (row) => row.ders_saati,
header: t("instances.dersSaati"),
- meta: { cellClass: "mono" },
+ meta: { cellClass: "" },
},
{
id: "roster",
accessorFn: (row) => row.enrollment_count,
header: t("courses.roster"),
- meta: { cellClass: "mono" },
+ meta: { cellClass: "" },
},
{
id: "attachedBy",
diff --git a/src/pages/classes-page.tsx b/src/pages/classes-page.tsx
index c01c8b3..0868804 100644
--- a/src/pages/classes-page.tsx
+++ b/src/pages/classes-page.tsx
@@ -8,7 +8,8 @@ import { getLimits } from "@/api/limits";
import { formatApiError, type BlueprintSkip, type ClassGroup } from "@/api/client";
import { BlueprintSkippedReport } from "@/components/classes/blueprint-skipped-report";
import { RouteGuard } from "@/components/layout/route-guard";
-import { DataTableSearch } from "@/components/ui/data-table-search";
+import { DataToolbar } from "@/components/ui/data-toolbar";
+import { DropdownSelect, Select } from "@/components/ui/select";
import { DataSection } from "@/components/ui/data-section";
import { Alert } from "@/components/ui/alert";
import { Badge } from "@/components/ui/badge";
@@ -18,7 +19,6 @@ import { EmptyState } from "@/components/ui/empty-state";
import { IconChevronRight, IconPlus } from "@/components/ui/icons";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { Select } from "@/components/ui/select";
import { SidePanel } from "@/components/ui/side-panel";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { BlueprintsTab } from "@/components/classes/blueprints-tab";
@@ -226,29 +226,36 @@ function ClassesContent() {
-
- {t("classGroups.mergeClasses")}
-
-
- setShowForm(true)}>
-
- {t("classGroups.newClass")}
-
-
- }
>
-
-
- 0}>
-
-
- {t("classGroups.allGrades")}
- {(g) => {g}}
-
-
-
+
+ 0}>
+ ({ value: g, label: g }))]}
+ value={gradeFilter()}
+ onChange={setGradeFilter}
+ class="min-w-44"
+ />
+
+ }
+ actions={
+
+
+ {t("classGroups.mergeClasses")}
+
+
+ setShowForm(true)}>
+
+ {t("classGroups.newClass")}
+
+
+ }
+ />
}>
diff --git a/src/pages/course-detail-page.tsx b/src/pages/course-detail-page.tsx
index b22d756..a703b4f 100644
--- a/src/pages/course-detail-page.tsx
+++ b/src/pages/course-detail-page.tsx
@@ -23,6 +23,7 @@ import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { ConfirmDialog } from "@/components/ui/confirm-dialog";
import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";
+import { DataToolbar } from "@/components/ui/data-toolbar";
import { EmptyState } from "@/components/ui/empty-state";
import { IconBook, IconEdit, IconNote, IconPlus, IconSchool, IconTrash, IconUsers } from "@/components/ui/icons";
import { createFlash } from "@/lib/flash";
@@ -38,6 +39,8 @@ import { UserSearchSelect } from "@/components/users/user-search-select";
import { useAuth } from "@/stores/auth-context";
import { useT } from "@/stores/preferences-context";
import { hasMinRole } from "@/lib/roles";
+import { cn } from "@/lib/cn";
+import { matchesSearch } from "@/lib/search-text";
const COURSE_KINDS: CourseKind[] = ["course", "study", "club"];
@@ -127,8 +130,8 @@ function CourseDetailContent() {
const [showSubjectForm, setShowSubjectForm] = createSignal(false);
const [showNoteForm, setShowNoteForm] = createSignal(false);
const [showMemberForm, setShowMemberForm] = createSignal(false);
- const [subjectCount, setSubjectCount] = createSignal(0);
- const [noteCount, setNoteCount] = createSignal(0);
+ const [noteCount, setNoteCount] = createSignal (null);
+ const [sectionSearch, setSectionSearch] = createSignal("");
const [memberUserId, setMemberUserId] = createSignal("");
const [error, setError] = createSignal("");
const [pending, setPending] = createSignal(false);
@@ -146,9 +149,11 @@ function CourseDetailContent() {
const courseKindLabel = (value: CourseKind | undefined) =>
value === "study" ? t("courses.kind.study") : value === "club" ? t("courses.kind.club") : t("courses.kind.course");
const courseListSearch = (value: CourseKind | undefined) => (value ? ({ kind: value } as never) : ({} as never));
- const countDescription = (count: number, item: string) => t("common.countItem", { count, item });
-
const sectionCount = createMemo(() => sections()?.length ?? 0);
+ const visibleSections = createMemo(() => {
+ const query = sectionSearch().trim();
+ return query ? (sections() ?? []).filter((section) => matchesSearch(query, section.className)) : sections() ?? [];
+ });
const memberCount = createMemo(() => members()?.length ?? 0);
const memberUserIds = () => (members() ?? []).map((row) => row.user.id);
@@ -168,13 +173,13 @@ function CourseDetailContent() {
id: "dersSaati",
accessorFn: (row) => row.instance.ders_saati,
header: t("instances.dersSaati"),
- meta: { cellClass: "mono" },
+ meta: { cellClass: "" },
},
{
id: "roster",
accessorFn: (row) => row.instance.enrollment_count,
header: t("courses.roster"),
- meta: { cellClass: "mono" },
+ meta: { cellClass: "" },
},
{
id: "karne",
@@ -260,7 +265,7 @@ function CourseDetailContent() {
}>
{t("common.accessDenied")}}>
-
+
@@ -288,36 +293,7 @@ function CourseDetailContent() {
}
/>
-
-
-
-
-
-
- {t("courses.kind")}
- {courseKindLabel(c().kind)}
-
-
-
-
-
-
-
- {t("instances.taughtIn")}
- {c().class_course_count}
-
-
-
-
-
-
-
- {t("courses.members")}
- {c().course_membership_count}
-
-
-
-
+
-
- {t("subjects.title")}{subjectCount()}
- {t("instances.title")}{sectionCount()}
- {t("courseNotes.title")}{noteCount()}
+
+ { 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">{t("subjects.title")}
+ { 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">{t("instances.title")}
+ { 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">{t("courseNotes.title")}{noteCount()}
- {t("courses.members")}{c().course_membership_count}
+ { 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">{t("courses.members")}
-
-
- {countDescription(subjectCount(), t("subjects.item"))}
-
- setShowSubjectForm(true)}>
- {t("subjects.add")}
-
-
-
+
-
-
- {countDescription(sectionCount(), t("instances.item"))}
- {t("instances.selectSectionHelp")}
+
+
+
- }>
- 0}
- fallback={}
- >
- void navigate({ to: "/instances/$id", params: { id: row.instance.id } })}
- />
-
-
-
-
-
-
- {countDescription(noteCount(), t("courseNotes.item"))}
-
- setShowNoteForm(true)}>
- {t("courseNotes.add")}
-
-
+
+ }>
+ 0}
+ fallback={}
+ >
+ void navigate({ to: "/instances/$id", params: { id: row.instance.id } })}
+ />
+
+
-
+
+
-
-
- {countDescription(memberCount(), t("courses.memberItem"))}
-
- setShowMemberForm(true)}>
+
+
+
+ setShowMemberForm(true)}>
{t("courses.addMember")}
+
+
+
+ }>
+ }>
+ 0} fallback={}>
+
+
+
- }>
- }>
- 0} fallback={}>
-
-
-
-
+
+
+
diff --git a/src/pages/courses-page.tsx b/src/pages/courses-page.tsx
index f890033..a37c548 100644
--- a/src/pages/courses-page.tsx
+++ b/src/pages/courses-page.tsx
@@ -156,16 +156,8 @@ function CoursesContent() {
- setShowForm(true)}>
-
- {t("common.createItem", { item: kindInSentence() })}
-
-
- }
>
-
+
{t("instances.empty")}
}
+ actions={
+
+ setShowForm(true)}>
+
+ {t("common.createItem", { item: kindInSentence() })}
+
+
+ }
/>
@@ -198,17 +198,9 @@ function CoursesContent() {
course={course}
sections={t("common.countItem", { count: course.class_course_count, item: t("instances.item") })}
enrolled={auth.user()?.role === "student"}
- showTeacherActions={hasMinRole(auth.user()?.role, "teacher")}
labels={{
- taughtIn: t("instances.taughtIn"),
- enrolled: t("courses.enrolled"),
kind: courseKindLabel(course.kind, t),
- weeklyHours: t("courses.weeklyHours"),
- competency: t("courses.competency"),
- attendance: t("courses.attendanceRate"),
- progress: t("courses.progress"),
- takeAttendance: t("courses.takeAttendance"),
- analysis: t("courses.analysis"),
+ enrolled: t("courses.enrolled"),
}}
/>
)}
diff --git a/src/pages/dashboard-page.tsx b/src/pages/dashboard-page.tsx
index 54d3b84..800afea 100644
--- a/src/pages/dashboard-page.tsx
+++ b/src/pages/dashboard-page.tsx
@@ -837,7 +837,7 @@ function DashboardContent() {
)}
- {t("dashboard.student.thisWeekTotal", { minutes: String(weeklyFocusTotal()) })}
+ {t("dashboard.student.thisWeekTotal", { minutes: String(weeklyFocusTotal()) })}
@@ -981,19 +981,19 @@ function DashboardContent() {
{t("dashboard.attend.present")}
- {breakdown().present}
+ {breakdown().present}
{t("dashboard.attend.absent")}
- {breakdown().absent}
+ {breakdown().absent}
{t("dashboard.attend.excused")}
- {breakdown().excused}
+ {breakdown().excused}
{t("dashboard.parent.attendanceRate")}
- {breakdown().rate == null ? "—" : `${breakdown().rate}%`}
+ {breakdown().rate == null ? "—" : `${breakdown().rate}%`}
)}
@@ -1013,14 +1013,14 @@ function DashboardContent() {
>
{(summary) => (
-
+
{t("dashboard.parent.installmentsPaid", { paid: String(summary().paidCount), total: String(summary().total) })}
- {t("dashboard.parent.balance")}: {formatTry(summary().balanceMinor, locale() === "tr" ? "tr-TR" : "en-US")}
+ {t("dashboard.parent.balance")}: {formatTry(summary().balanceMinor, locale() === "tr" ? "tr-TR" : "en-US")}
{(next) => (
- {t("dashboard.parent.nextInstallment")}: {formatDateTime(next().due_at!, locale())} · {formatTry(next().amount_minor, locale() === "tr" ? "tr-TR" : "en-US")}
+ {t("dashboard.parent.nextInstallment")}: {formatDateTime(next().due_at!, locale())} · {formatTry(next().amount_minor, locale() === "tr" ? "tr-TR" : "en-US")}
)}
diff --git a/src/pages/event-detail-page.tsx b/src/pages/event-detail-page.tsx
index 3a54b75..5b3c8d3 100644
--- a/src/pages/event-detail-page.tsx
+++ b/src/pages/event-detail-page.tsx
@@ -25,6 +25,7 @@ import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { ConfirmDialog } from "@/components/ui/confirm-dialog";
import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";
+import { DataToolbar } from "@/components/ui/data-toolbar";
import { EmptyState } from "@/components/ui/empty-state";
import { IconEdit, IconTrash } from "@/components/ui/icons";
import { PageSpinner } from "@/components/ui/page-spinner";
@@ -37,6 +38,7 @@ import { cn } from "@/lib/cn";
import { createFlash } from "@/lib/flash";
import { formatDateTime } from "@/lib/format";
import { personId, personLabel } from "@/lib/person";
+import { matchesSearch } from "@/lib/search-text";
import { hasMinRole } from "@/lib/roles";
import { useAuth } from "@/stores/auth-context";
import { usePreferences, useT } from "@/stores/preferences-context";
@@ -74,6 +76,7 @@ function EventDetailContent() {
const [editing, setEditing] = createSignal(false);
const [deleteOpen, setDeleteOpen] = createSignal(false);
const [registrationTarget, setRegistrationTarget] = createSignal (null);
+ const [rosterSearch, setRosterSearch] = createSignal("");
const [eventTab, setEventTab] = createSignal("studentAttendance");
const [error, setError] = createSignal("");
const [pending, setPending] = createSignal(false);
@@ -89,6 +92,11 @@ function EventDetailContent() {
() => (isTeacherPlus() ? id() : null),
async (eventId) => (eventId ? (await getEventAttendance(eventId)).items : []),
);
+ const visibleRoster = createMemo(() => {
+ const query = rosterSearch().trim();
+ const rows = roster() ?? [];
+ return query ? rows.filter((row) => matchesSearch(query, personLabel(row.user))) : rows;
+ });
const canManage = () => {
const e = event();
@@ -166,12 +174,12 @@ function EventDetailContent() {
}
>
{(ev) => (
-
-
+
+
@@ -187,21 +195,21 @@ function EventDetailContent() {
) : undefined
}
/>
-
+
{t("events.audience")}
{audienceLabel(ev().audience, t)}
{t("events.starts")}
- {formatDateTime(ev().starts_at, locale())}
+ {formatDateTime(ev().starts_at, locale())}
{t("events.ends")}
- {formatDateTime(ev().ends_at, locale())}
+ {formatDateTime(ev().ends_at, locale())}
-
+
-
-
+
+
- {t("events.registrationRoster")}
+ {t("events.registrationRoster")}
- {t("events.studentAttendance")}
- {t("events.attendanceRecords")}
+ {t("events.studentAttendance")}
+ {t("events.attendanceRecords")}
- {t("events.registrationRosterHelp")}
-
+
+ {t("events.registrationRosterHelp")}
+
{t("events.registerStudent")}
+
+
+
+
}>
- {(rows) => (
- 0} fallback={}>
-
-
- )}
+ 0} fallback={}>
+
+
- {t("events.studentAttendanceHelp")}
-
+
+ {t("events.studentAttendanceHelp")}
+
{t("events.saveStudentAttendance")}
+
- {t("events.attendanceRecordsHelp")}
}>
{(rows) => (
- {
- await wrap(async () => {
- await deleteEventAttendanceByUserId(id(), userId);
- await refetchAttendance();
- }, t("common.deleted"));
- }}
- />
+
+
+ {t("events.attendanceRecordsHelp")}
+
+ {
+ await wrap(async () => {
+ await deleteEventAttendanceByUserId(id(), userId);
+ await refetchAttendance();
+ }, t("common.deleted"));
+ }}
+ />
+
)}
diff --git a/src/pages/events-page.tsx b/src/pages/events-page.tsx
index 23a798a..ebeba11 100644
--- a/src/pages/events-page.tsx
+++ b/src/pages/events-page.tsx
@@ -98,12 +98,13 @@ function EventsContent() {
{
accessorKey: "title",
header: t("events.title"),
+ size: 220,
+ minSize: 180,
cell: (cell) => (
{cell.row.original.title}
- {cell.row.original.description || "—"}
),
},
@@ -111,7 +112,9 @@ function EventsContent() {
id: "time",
accessorFn: (event) => event.starts_at ?? event.ends_at ?? 0,
header: t("events.starts"),
- meta: { cellClass: "mono text-xs text-muted-foreground" },
+ size: 190,
+ minSize: 160,
+ meta: { cellClass: "text-xs text-muted-foreground" },
cell: (cell) => (
{formatDateTime(cell.row.original.starts_at, locale())}
@@ -125,6 +128,8 @@ function EventsContent() {
id: "audience",
accessorFn: (event) => audienceLabel(event.audience),
header: t("events.audience"),
+ size: 140,
+ minSize: 120,
cell: (cell) => {audienceLabel(cell.row.original.audience)},
},
{
@@ -197,7 +202,7 @@ function EventsContent() {
{error()}
-
+
}>
{formatApiError(list.error)}
@@ -221,7 +226,7 @@ function EventsContent() {
}
columns={columns()}
data={rows()}
- tableClass="table-fixed min-w-232"
+ tableClass="table-fixed min-w-[42rem]"
searchPredicate={searchEvent}
filterHint={t("search.hint.events")}
enablePagination
diff --git a/src/pages/exam-detail-page.tsx b/src/pages/exam-detail-page.tsx
index 185727d..3b7d714 100644
--- a/src/pages/exam-detail-page.tsx
+++ b/src/pages/exam-detail-page.tsx
@@ -477,7 +477,7 @@ function ExamDetailContent() {
{t("exams.maxAttempts")}
-
+
{ownAttemptSummary() ? `${ownAttemptSummary()!.attempts_used} / ${ex().max_attempts}` : `0 / ${ex().max_attempts}`}
@@ -507,7 +507,7 @@ function ExamDetailContent() {
{t("exams.durationMinutes")}
-
+
{formatDurationMinutes(examDurationMs(ex().duration_ms, ex().starts_at, ex().ends_at), locale())}
@@ -672,19 +672,19 @@ function ExamDetailContent() {
{t("exams.graded")}
- {s().graded}
+ {s().graded}
{t("exams.average")}
- {s().average == null ? "—" : s().average}
+ {s().average == null ? "—" : s().average}
{t("exams.min")}
- {s().min == null ? "—" : s().min}
+ {s().min == null ? "—" : s().min}
{t("exams.max")}
- {s().max == null ? "—" : s().max}
+ {s().max == null ? "—" : s().max}
)}
diff --git a/src/pages/exams-page.tsx b/src/pages/exams-page.tsx
index 690989b..baff7c7 100644
--- a/src/pages/exams-page.tsx
+++ b/src/pages/exams-page.tsx
@@ -177,10 +177,11 @@ function ExamsContent() {
{
accessorKey: "title",
header: t("exams.title"),
+ size: 220,
+ minSize: 180,
cell: (cell) => (
{cell.row.original.title}
- {cell.row.original.description || "—"}
),
},
@@ -188,19 +189,25 @@ function ExamsContent() {
id: "course",
accessorFn: (exam) => courseTitle(exam.class_course),
header: t("instances.title"),
+ size: 180,
+ minSize: 140,
meta: { cellClass: "truncate text-muted-foreground" },
cell: (cell) => courseTitle(cell.row.original.class_course),
},
{
accessorKey: "starts_at",
header: t("events.starts"),
- meta: { cellClass: "mono whitespace-nowrap text-muted-foreground" },
+ size: 160,
+ minSize: 140,
+ meta: { cellClass: "whitespace-nowrap text-muted-foreground" },
cell: (cell) => formatDateTime(cell.row.original.starts_at, locale()),
},
{
id: "status",
accessorFn: (exam) => statusLabel(exam.displayStatus),
header: t("attempt.status"),
+ size: 130,
+ minSize: 110,
meta: { headerClass: "text-center", cellClass: "text-center" },
cell: (cell) => {
const status = cell.row.original.displayStatus;
@@ -308,7 +315,7 @@ function ExamsContent() {
-
+
}>
{formatApiError(list.error)}
@@ -332,7 +339,7 @@ function ExamsContent() {
}
columns={columns()}
data={rows()}
- tableClass="table-fixed min-w-5xl"
+ tableClass="table-fixed min-w-[46rem]"
filterPlaceholder={t("exams.searchPlaceholder")}
filterHint={t("search.hint.exams")}
searchPredicate={searchExam}
diff --git a/src/pages/homework-detail-page.tsx b/src/pages/homework-detail-page.tsx
index 7ffe3d0..7ad26dd 100644
--- a/src/pages/homework-detail-page.tsx
+++ b/src/pages/homework-detail-page.tsx
@@ -66,7 +66,7 @@ export default function HomeworkDetailPage() {
{t("homework.dueAt")}
- {formatDateTime(item().due_at, locale())}
+ {formatDateTime(item().due_at, locale())}
{t("homework.assigned")}
diff --git a/src/pages/homework-page.tsx b/src/pages/homework-page.tsx
index e9c7edd..859b09b 100644
--- a/src/pages/homework-page.tsx
+++ b/src/pages/homework-page.tsx
@@ -163,11 +163,12 @@ function HomeworkContent() {
{
accessorKey: "title",
header: t("form.title"),
+ size: 220,
+ minSize: 180,
meta: { cellClass: "font-medium" },
cell: (cell) => (
{cell.row.original.title}
- {cell.row.original.description || "—"}
),
},
@@ -175,6 +176,8 @@ function HomeworkContent() {
id: "course",
accessorFn: (row) => courseName(row.class_course),
header: t("nav.courses"),
+ size: 180,
+ minSize: 140,
meta: { cellClass: "max-w-0 truncate text-text-subtle" },
cell: (cell) => {courseName(cell.row.original.class_course)},
},
@@ -182,13 +185,17 @@ function HomeworkContent() {
id: "due_at",
accessorFn: (row) => row.due_at,
header: t("homework.dueAt"),
- meta: { cellClass: "mono whitespace-nowrap text-text-subtle" },
+ size: 150,
+ minSize: 130,
+ meta: { cellClass: "whitespace-nowrap text-text-subtle" },
cell: (cell) => formatDateTime(cell.row.original.due_at, locale()),
},
{
id: "assigned",
accessorFn: (row) => row.assigned?.length ?? 0,
header: t("homework.assigned"),
+ size: 150,
+ minSize: 120,
cell: (cell) => cell.row.original.assigned?.length ? t("common.countItem", { count: cell.row.original.assigned.length, item: t("courses.rosterItem") }) : t("homework.wholeCourse"),
},
{
@@ -253,34 +260,31 @@ function HomeworkContent() {
-
- }>
-
- {formatApiError(list.error)}
-
-
- setCreateOpen(true)}>
-
- {t("homework.add")}
-
-
- }
- columns={columns()}
- data={dueFilteredList()}
- tableClass="table-fixed min-w-5xl"
- filterColumn="title"
- enablePagination
- pageSize={10}
- empty={t("homework.empty")}
- storageKey="homework"
- onRowClick={(item) => void navigate({ to: "/homework/$id", params: { id: item.id } })}
- />
-
-
+ }>
+
+ {formatApiError(list.error)}
+
+
+ setCreateOpen(true)}>
+
+ {t("homework.add")}
+
+
+ }
+ onRowClick={(item) => void navigate({ to: "/homework/$id", params: { id: item.id } })}
+ />
+
diff --git a/src/pages/instance-detail-page.tsx b/src/pages/instance-detail-page.tsx
index 96edb0a..4c8b109 100644
--- a/src/pages/instance-detail-page.tsx
+++ b/src/pages/instance-detail-page.tsx
@@ -287,7 +287,7 @@ function InstanceDetailContent() {
{t("instances.dersSaati")}
{inst().ders_saati}}
+ fallback={{inst().ders_saati} }
>
{t("courses.roster")}
- {inst().enrollment_count}
+ {inst().enrollment_count}
@@ -348,7 +348,7 @@ function InstanceDetailContent() {
{t("courses.exams")}
- {examCount()}
+ {examCount()}
diff --git a/src/pages/license-modules-page.tsx b/src/pages/license-modules-page.tsx
index 87322ae..abac786 100644
--- a/src/pages/license-modules-page.tsx
+++ b/src/pages/license-modules-page.tsx
@@ -134,7 +134,7 @@ function LicenseModulesContent() {
-
+
-
+
{t("exams.liveRoster")}
@@ -343,7 +343,7 @@ function LiveMonitorContent() {
{(row) => (
-
+
diff --git a/src/pages/meal-detail-page.tsx b/src/pages/meal-detail-page.tsx
index 745796f..ef315a6 100644
--- a/src/pages/meal-detail-page.tsx
+++ b/src/pages/meal-detail-page.tsx
@@ -199,7 +199,7 @@ function MealDetailContent() {
{t("meals.total")} {formatTry(total(), moneyLocale())}
- {t("meals.capacity")} {current().capacity ?? "∞"}
+ {t("meals.capacity")} {current().capacity ?? "∞"}
{t("meals.cutoff")} {cutoff() == null ? t("meals.noCutoff") : formatDateTime(cutoff(), locale())}
{t("meals.bookingStatus")} {cutoffClosed() ? t("meals.closed") : t("meals.open")}
diff --git a/src/pages/my-students-page.tsx b/src/pages/my-students-page.tsx
index 92fa43b..7b0582c 100644
--- a/src/pages/my-students-page.tsx
+++ b/src/pages/my-students-page.tsx
@@ -172,13 +172,13 @@ function StudentDetailPanel(props: { student: PersonRef | null; initialTab: Stud
{
accessorKey: "weight",
header: t("marks.weight"),
- meta: { align: "right", cellClass: "mono tabular-nums" },
+ meta: { align: "right", cellClass: "tabular-nums" },
cell: (cell) => cell.row.original.weight,
},
{
accessorKey: "mark",
header: t("marks.mark"),
- meta: { align: "right", cellClass: "mono font-semibold tabular-nums" },
+ meta: { align: "right", cellClass: "font-semibold tabular-nums" },
cell: (cell) => formatNumber(cell.row.original.mark),
},
]);
diff --git a/src/pages/payment-statement-page.tsx b/src/pages/payment-statement-page.tsx
index 88a02ac..95f5fc9 100644
--- a/src/pages/payment-statement-page.tsx
+++ b/src/pages/payment-statement-page.tsx
@@ -80,7 +80,7 @@ function StatementContent() {
{
accessorKey: "due_at",
header: t("payments.due"),
- cell: (cell) => {cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())},
+ cell: (cell) => {cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())},
},
{
accessorKey: "outstanding_minor",
@@ -127,7 +127,7 @@ function StatementContent() {
{t("payments.collected")}
-
+
{formatTry(summary().collected, moneyLocale())}
/ {formatTry(summary().billed, moneyLocale())}
@@ -150,7 +150,7 @@ function StatementContent() {
-
+
}>
void refetch()} />
@@ -183,7 +183,7 @@ function StatementContent() {
-
+
)}
diff --git a/src/pages/payments-page.tsx b/src/pages/payments-page.tsx
index d21f5a8..1e3504f 100644
--- a/src/pages/payments-page.tsx
+++ b/src/pages/payments-page.tsx
@@ -117,7 +117,6 @@ function PaymentsContent() {
onCleanup(() => clearTimeout(queryTimer));
const [studentPage, setStudentPage] = createSignal(0);
- const [studentPageSize, setStudentPageSize] = createSignal(STUDENT_PAGE_SIZE);
// Reset to page 1 whenever the query or plan filter changes underneath it.
createEffect(() => {
debouncedQuery();
@@ -134,7 +133,7 @@ function PaymentsContent() {
// (already name-resolved) plan roster and filters/pages it client-side —
// a plan's assignees are a small, bounded list on their own.
const [studentsPage, { refetch: refetchStudents }] = createResource(
- () => ({ plan: planFilter(), q: debouncedQuery(), page: studentPage(), size: studentPageSize() }),
+ () => ({ plan: planFilter(), q: debouncedQuery(), page: studentPage(), size: STUDENT_PAGE_SIZE }),
async ({ plan, q, page, size }): Promise<{ items: PersonRef[]; total: number }> => {
if (plan) {
const assignments = await getPlanAssignments(plan, { limit: 500 });
@@ -352,7 +351,7 @@ function PaymentsContent() {
accessorKey: "due_at",
header: t("payments.due"),
size: 120,
- cell: (cell) => {cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())},
+ cell: (cell) => {cell.row.original.due_at == null ? "—" : formatDate(cell.row.original.due_at, locale())},
},
{
accessorKey: "outstanding_minor",
@@ -450,7 +449,7 @@ function PaymentsContent() {
const planTotal = (plan: FeePlan) => plan.installments.reduce((sum, item) => sum + item.amount_minor, 0);
const planColumns = createMemo []>(() => [
{ accessorKey: "name", header: t("payments.planName"), cell: (cell) => {cell.row.original.name} },
- { id: "installments", header: t("payments.installments"), cell: (cell) => {cell.row.original.installments.length} },
+ { id: "installments", header: t("payments.installments"), cell: (cell) => {cell.row.original.installments.length} },
{ id: "total", header: t("payments.total"), cell: (cell) => {formatTry(planTotal(cell.row.original), moneyLocale())} },
{
id: "actions",
@@ -601,7 +600,7 @@ function PaymentsContent() {
{t("payments.periodOverdue")}
{t("payments.periodExpected")}
-
+
}>
void refetchStudents()} />
@@ -638,13 +637,9 @@ function PaymentsContent() {
enablePagination
manualPagination={{
pageIndex: studentPage(),
- pageSize: studentPageSize(),
+ pageSize: STUDENT_PAGE_SIZE,
total: studentsTotal(),
onPageChange: setStudentPage,
- onPageSizeChange: (size) => {
- setStudentPageSize(size);
- setStudentPage(0);
- },
}}
/>
@@ -669,7 +664,7 @@ function PaymentsContent() {
{t("payments.overdueCount")} 0 }}>{summary().overdue}
-
+
}>
void refetchStatement()} />
@@ -750,7 +745,7 @@ function PaymentsContent() {
{/* ---------------- Fee plans ---------------- */}
-
+
}>
void refetchPlans()} />
@@ -793,7 +788,7 @@ function PaymentsContent() {
-
+
0}>
@@ -816,7 +811,7 @@ function PaymentsContent() {
-
+
diff --git a/src/pages/pomodoro-page.tsx b/src/pages/pomodoro-page.tsx
index b022fce..a79aee0 100644
--- a/src/pages/pomodoro-page.tsx
+++ b/src/pages/pomodoro-page.tsx
@@ -116,17 +116,17 @@ function PomodoroContent() {
{
accessorKey: "started_at",
header: t("pomodoro.startedAt"),
- cell: (cell) => {formatDateTime(cell.row.original.started_at, locale())},
+ cell: (cell) => {formatDateTime(cell.row.original.started_at, locale())},
},
{
accessorKey: "finished_at",
header: t("pomodoro.finishedAt"),
- cell: (cell) => {formatDateTime(cell.row.original.finished_at, locale())},
+ cell: (cell) => {formatDateTime(cell.row.original.finished_at, locale())},
},
{
accessorKey: "duration_ms",
header: t("pomodoro.duration"),
- cell: (cell) => {formatDurationClock(cell.row.original.duration_ms)},
+ cell: (cell) => {formatDurationClock(cell.row.original.duration_ms)},
},
{
accessorKey: "counted",
@@ -236,7 +236,7 @@ function PomodoroContent() {
{running() ? (isOvertime() ? t("pomodoro.overtime") : t("pomodoro.remaining")) : t("pomodoro.total")}
-
+
{running() && isOvertime() && "+"}
{formatDurationClock(running() ? (isOvertime() ? overtimeMs() : remainingMs()) : log()?.total_focus_ms)}
@@ -311,20 +311,20 @@ function PomodoroContent() {
{t("pomodoro.today")}
- {formatDurationClock(todayFocus())}
+ {formatDurationClock(todayFocus())}
{t("pomodoro.average")}
- {formatDurationClock(averageFocus())}
+ {formatDurationClock(averageFocus())}
{t("pomodoro.sessions")}
- {log()?.total ?? 0}
+ {log()?.total ?? 0}
-
+
{t("pomodoro.history")}
diff --git a/src/pages/question-bank-page.tsx b/src/pages/question-bank-page.tsx
index 2affae3..e1de8db 100644
--- a/src/pages/question-bank-page.tsx
+++ b/src/pages/question-bank-page.tsx
@@ -128,12 +128,12 @@ function QuestionBankContent() {
{
accessorKey: "points",
header: t("questions.points"),
- meta: { headerClass: "text-center", cellClass: "mono text-center" },
+ meta: { headerClass: "text-center", cellClass: "text-center" },
},
{
accessorKey: "used_count",
header: t("bank.usedCount"),
- meta: { headerClass: "text-center", cellClass: "mono text-center" },
+ meta: { headerClass: "text-center", cellClass: "text-center" },
},
{
id: "visibility",
@@ -220,7 +220,7 @@ function QuestionBankContent() {
-
+
}>
{formatApiError(list.error)}
@@ -238,7 +238,7 @@ function QuestionBankContent() {
}
columns={columns()}
data={list()?.items ?? []}
- tableClass="min-w-[48rem]"
+ tableClass="min-w-[40rem]"
filterPlaceholder={t("bank.search")}
filterHint={t("search.hint.bank")}
searchValue={query()}
diff --git a/src/pages/settings-page.tsx b/src/pages/settings-page.tsx
index 9b7b1c0..86aad5d 100644
--- a/src/pages/settings-page.tsx
+++ b/src/pages/settings-page.tsx
@@ -231,7 +231,7 @@ function SettingsContent() {
{t("settings.examKinds")}
{t("settings.examKindsHelp")}
-
+
{examKinds().length}
@@ -324,7 +324,7 @@ function SettingsContent() {
{t("settings.attendanceStatuses")}
{t("settings.attendanceHelp")}
-
+
{attendanceStatuses().length}
@@ -413,7 +413,7 @@ function SettingsContent() {
{t("settings.gradeBands")}
{t("settings.gradeBandsHelp")}
-
+
{gradeBands().length}
@@ -510,7 +510,7 @@ function SettingsContent() {
@@ -553,7 +553,7 @@ function SettingsContent() {
diff --git a/src/pages/staff-work-page.tsx b/src/pages/staff-work-page.tsx
index 9e99999..d0c6d10 100644
--- a/src/pages/staff-work-page.tsx
+++ b/src/pages/staff-work-page.tsx
@@ -10,12 +10,11 @@ import { ApiError } from "@/api/client";
import type { Page, PersonRef, WorkEntry } from "@/api/client";
import type { Locale } from "@/i18n/messages";
import { RouteGuard } from "@/components/layout/route-guard";
-import { DataTableSearch } from "@/components/ui/data-table-search";
-import { DataSection } from "@/components/ui/data-section";
+import { DataToolbar } from "@/components/ui/data-toolbar";
import { Alert } from "@/components/ui/alert";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
-import { ComingSoonBadge, ComingSoonValue } from "@/components/ui/coming-soon";
+import { ComingSoonBadge } from "@/components/ui/coming-soon";
import { ConfirmDialog } from "@/components/ui/confirm-dialog";
import { DataTable, DataTableSkeleton } from "@/components/ui/data-table";
import { EmptyState } from "@/components/ui/empty-state";
@@ -188,7 +187,7 @@ function StaffWorkContent() {
id: "time",
accessorFn: (row) => row.check_in,
header: t("work.checkIn"),
- meta: { cellClass: "mono text-xs" },
+ meta: { cellClass: "text-xs" },
cell: (cell) => (
{formatDateTime(cell.row.original.check_in, locale())}
@@ -199,7 +198,7 @@ function StaffWorkContent() {
{
accessorKey: "duration_ms",
header: t("work.duration"),
- meta: { cellClass: "mono text-xs" },
+ meta: { cellClass: "text-xs" },
cell: (cell) => formatDurationMinutes(cell.row.original.duration_ms, locale()),
},
{
@@ -287,45 +286,51 @@ function StaffWorkContent() {
{error()}
-
-
- {t("work.addEntry")}
-
-
-
- {t("work.planShift")}
-
-
- >
- }
- >
-
+
+
+
+
+ {t("work.addEntry")}
+
+
+
+ {t("work.planShift")}
+
+
+ >
+ }
+ />
+
- }>
- 0} fallback={}>
-
-
- {(person) => (
- {
- setError("");
- setViewUser(person);
- }}
- />
- )}
-
-
-
+
+ }>
+ 0} fallback={}>
+
+
+ {(person) => (
+ {
+ setError("");
+ setViewUser(person);
+ }}
+ />
+ )}
+
+
+
+
-
-
+
+
{t("work.open")}
-
-
- {t("work.location")}
-
-
{t("work.checkIn")}
- {formatDateTime(entry().check_in, props.locale)}
+ {formatDateTime(entry().check_in, props.locale)}
{t("work.checkOut")}
- {entry().check_out == null ? "—" : formatDateTime(entry().check_out, props.locale)}
+ {entry().check_out == null ? "—" : formatDateTime(entry().check_out, props.locale)}
{t("work.duration")}
- {duration() == null ? "—" : formatDurationMinutes(duration(), props.locale)}
+ {duration() == null ? "—" : formatDurationMinutes(duration(), props.locale)}
)}
@@ -484,10 +484,6 @@ function StaffCard(props: { person: PersonRef; stats: StaffCardStats | null | un
{t("work.daysThisMonth", { count: String(props.stats?.daysThisMonth) })}
-
- {t("work.quality")}
-
-
);
}
diff --git a/src/pages/student-attendance-page.tsx b/src/pages/student-attendance-page.tsx
index b274bb1..5e59804 100644
--- a/src/pages/student-attendance-page.tsx
+++ b/src/pages/student-attendance-page.tsx
@@ -104,7 +104,7 @@ function StudentAttendanceContent() {
return (
-
+
{error()}
diff --git a/src/pages/student-marks-page.tsx b/src/pages/student-marks-page.tsx
index 6bff32c..06842e2 100644
--- a/src/pages/student-marks-page.tsx
+++ b/src/pages/student-marks-page.tsx
@@ -125,7 +125,7 @@ function StudentMarksContent() {
if (rep.overall_average == null)
return {rep.overall_grade ?? "—"};
return (
-
+
{round(rep.overall_average)}
{(g) => / {g()}}
@@ -159,7 +159,7 @@ function StudentMarksContent() {
return (
-
+
{error()}
diff --git a/src/pages/student-pomodoro-page.tsx b/src/pages/student-pomodoro-page.tsx
index a02d1d7..4ca42c5 100644
--- a/src/pages/student-pomodoro-page.tsx
+++ b/src/pages/student-pomodoro-page.tsx
@@ -101,7 +101,7 @@ function StudentPomodoroContent() {
return (
-
+
{error()}
diff --git a/src/pages/students-roster-page.tsx b/src/pages/students-roster-page.tsx
index 90a6991..c81bd29 100644
--- a/src/pages/students-roster-page.tsx
+++ b/src/pages/students-roster-page.tsx
@@ -121,7 +121,7 @@ function StudentsRosterContent() {
-
+
}>
void refetch()} />
@@ -129,6 +129,7 @@ function StudentsRosterContent() {
{(value) => (
@@ -144,7 +145,7 @@ function StudentsRosterContent() {
>}
columns={columns()}
data={rows()}
- tableClass="min-w-[940px]"
+ tableClass="min-w-[52rem]"
empty={t("form.noStudents")}
filterPlaceholder={t("roster.searchStudents")}
filterHint={t("search.hint.students")}
diff --git a/src/pages/teachers-roster-page.tsx b/src/pages/teachers-roster-page.tsx
index 47d67fb..8ecf10e 100644
--- a/src/pages/teachers-roster-page.tsx
+++ b/src/pages/teachers-roster-page.tsx
@@ -58,7 +58,7 @@ function TeachersRosterContent() {
accessorKey: "homeroomClasses",
size: 90,
header: t("roster.class"),
- meta: { cellClass: "mono tabular-nums" },
+ meta: { cellClass: "tabular-nums" },
cell: (cell) => (cell.row.original.homeroomClasses > 0 ? cell.row.original.homeroomClasses : "—"),
},
{ id: "weekly", size: 130, header: t("roster.weeklyLessons"), enableSorting: false, meta: { hideInCards: true }, cell: () => },
@@ -94,7 +94,7 @@ function TeachersRosterContent() {
-
+
}>
void refetch()} />
@@ -102,6 +102,7 @@ function TeachersRosterContent() {
{(rows) => (
@@ -117,7 +118,7 @@ function TeachersRosterContent() {
>}
columns={columns()}
data={rows()}
- tableClass="min-w-[940px]"
+ tableClass="min-w-[52rem]"
empty={t("roster.noTeachers")}
filterPlaceholder={t("roster.searchTeachers")}
filterHint={t("search.hint.teachers")}
diff --git a/src/pages/terms-page.tsx b/src/pages/terms-page.tsx
index 2266a44..a5f8174 100644
--- a/src/pages/terms-page.tsx
+++ b/src/pages/terms-page.tsx
@@ -80,27 +80,42 @@ function TermsContent() {
{
accessorKey: "name",
header: t("settings.name"),
+ size: 170,
+ minSize: 150,
+ meta: { cellClass: "min-w-0" },
cell: (cell) => {cell.row.original.name},
},
{
id: "year",
accessorFn: (row) => yearName(row.year),
header: t("academicYears.year"),
- cell: (cell) => {yearName(cell.row.original.year)},
+ size: 180,
+ minSize: 150,
+ meta: { cellClass: "min-w-0" },
+ cell: (cell) => {yearName(cell.row.original.year)},
},
{
accessorKey: "starts_at",
header: t("events.starts"),
- cell: (cell) => {formatDateTime(cell.row.original.starts_at, locale())},
+ size: 150,
+ minSize: 145,
+ meta: { cellClass: "whitespace-nowrap" },
+ cell: (cell) => {formatDateTime(cell.row.original.starts_at, locale())},
},
{
accessorKey: "ends_at",
header: t("events.ends"),
- cell: (cell) => {formatDateTime(cell.row.original.ends_at, locale())},
+ size: 150,
+ minSize: 145,
+ meta: { cellClass: "whitespace-nowrap" },
+ cell: (cell) => {formatDateTime(cell.row.original.ends_at, locale())},
},
{
accessorKey: "archived_at",
header: t("terms.archived"),
+ size: 115,
+ minSize: 105,
+ meta: { cellClass: "whitespace-nowrap" },
cell: (cell) => (
—}>
{t("terms.archived")}
@@ -226,7 +241,7 @@ function TermsContent() {
{error()}
-
+
}>
void refetch()} />
diff --git a/src/pages/whiteboards-page.tsx b/src/pages/whiteboards-page.tsx
index d95753b..717a272 100644
--- a/src/pages/whiteboards-page.tsx
+++ b/src/pages/whiteboards-page.tsx
@@ -5,7 +5,7 @@ import { getBoards, postBoard, type Board } from "@/api/boards";
import { getUserSearch } from "@/api/users";
import { formatApiError, type PersonRef } from "@/api/client";
import { RouteGuard } from "@/components/layout/route-guard";
-import { DataTableSearch } from "@/components/ui/data-table-search";
+import { DataToolbar } from "@/components/ui/data-toolbar";
import { DataSection } from "@/components/ui/data-section";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
@@ -64,12 +64,6 @@ function WhiteboardsContent() {
setCreateOpen(true)}>
-
- {t("whiteboard.create")}
-
- }
>
}>
@@ -79,8 +73,21 @@ function WhiteboardsContent() {
when={(boards()?.items ?? []).length > 0}
fallback={}
>
-
-
+
+
+ setCreateOpen(true)}>
+
+ {t("whiteboard.create")}
+
+ }
+ />
+
0} fallback={}>
diff --git a/src/pages/work-log-page.tsx b/src/pages/work-log-page.tsx
index bab8de3..b3bb49e 100644
--- a/src/pages/work-log-page.tsx
+++ b/src/pages/work-log-page.tsx
@@ -52,17 +52,17 @@ function WorkLogContent() {
{
accessorKey: "check_in",
header: t("work.checkIn"),
- cell: (cell) => {formatDateTime(cell.row.original.check_in, locale())},
+ cell: (cell) => formatDateTime(cell.row.original.check_in, locale()),
},
{
accessorKey: "check_out",
header: t("work.checkOut"),
- cell: (cell) => {formatDateTime(cell.row.original.check_out, locale())},
+ cell: (cell) => formatDateTime(cell.row.original.check_out, locale()),
},
{
accessorKey: "duration_ms",
header: t("work.duration"),
- cell: (cell) => {formatDurationMinutes(cell.row.original.duration_ms, locale())},
+ cell: (cell) => formatDurationMinutes(cell.row.original.duration_ms, locale()),
},
{
id: "status",
@@ -112,7 +112,7 @@ function WorkLogContent() {
}
/>
- | |