From d03714333a839bbdae4f22bbacacfb5ee796d520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Fri, 25 Sep 2026 14:44:36 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=93=8B=20one=20value=20per=20table?= =?UTF-8?q?=20cell=20across=20the=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - split stacked cells into their own sortable columns: session and event start/end, appointment date/time/proposal, staff check-in/out, insight run day/start/ok/failed/skipped/budget/pending/modules, marks band, homework report subject, course description and enrolled marker, deadlines course/section, roster enrolment path, exam weight, module package/requirements, school id, question subject, archived year, board participant role - user role update button sits beside its select instead of under it - long titles, courses and links truncate with a hover title - every actions column uses the standard 110px class - cell tooltips come from the rendered text and only when it is cut, not from the sort value (epochs, minutes, unrounded marks) --- .../attendance/attendance-report-view.tsx | 1 + src/components/classes/blueprints-tab.tsx | 2 +- .../courses/course-subjects-panel.tsx | 2 +- .../courses/course-teachers-panel.tsx | 2 +- src/components/events/attendance-table.tsx | 2 +- .../homework/course-homework-panel.tsx | 2 +- .../homework/homework-report-view.tsx | 34 +++--- .../insights/insight-module-views.tsx | 2 +- .../insights/insight-runs-table.tsx | 93 ++++++++------- src/components/marks/marks-report-view.tsx | 50 +++++--- .../sessions/course-sessions-panel.tsx | 26 +++-- src/components/ui/data-table.tsx | 13 ++- src/components/users/user-table.tsx | 50 +++++--- .../whiteboard/board-settings-panel.tsx | 20 ++-- src/i18n/insights-run-report.ts | 12 ++ src/i18n/locales/en.ts | 9 +- src/i18n/locales/tr.ts | 9 +- src/i18n/messages.ts | 15 ++- src/pages/academic-years-page.tsx | 31 ++--- src/pages/appointments-page.tsx | 109 ++++++++---------- src/pages/builder-schools-page.tsx | 15 ++- src/pages/classes-page.tsx | 2 +- src/pages/course-detail-page.tsx | 4 +- src/pages/courses-page.tsx | 52 ++++++--- src/pages/dashboard-page.tsx | 26 +++-- src/pages/event-detail-page.tsx | 2 +- src/pages/events-page.tsx | 36 +++--- src/pages/exams-page.tsx | 4 +- src/pages/homework-page.tsx | 8 +- src/pages/instance-detail-page.tsx | 45 +++++--- src/pages/license-modules-page.tsx | 43 ++++--- src/pages/live-monitor-page.tsx | 2 +- src/pages/question-bank-page.tsx | 21 ++-- src/pages/staff-work-page.tsx | 18 +-- src/pages/student-pomodoro-page.tsx | 2 +- src/pages/students-roster-page.tsx | 3 +- src/pages/teachers-roster-page.tsx | 3 +- src/pages/terms-page.tsx | 2 +- 38 files changed, 458 insertions(+), 314 deletions(-) diff --git a/src/components/attendance/attendance-report-view.tsx b/src/components/attendance/attendance-report-view.tsx index 95c078b..6b192ba 100644 --- a/src/components/attendance/attendance-report-view.tsx +++ b/src/components/attendance/attendance-report-view.tsx @@ -44,6 +44,7 @@ export function AttendanceReportView(props: { report: AttendanceReport; compact? const columns = createMemo[]>(() => [ { id: "course", + accessorFn: (row) => row.course.title, header: t("nav.courses"), meta: { stickyLeft: true }, cell: (cell) => ( diff --git a/src/components/classes/blueprints-tab.tsx b/src/components/classes/blueprints-tab.tsx index 89e6ead..5cbf82a 100644 --- a/src/components/classes/blueprints-tab.tsx +++ b/src/components/classes/blueprints-tab.tsx @@ -77,7 +77,7 @@ export function BlueprintsTab(props: { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( ( ( ( ( -
-

{cell.row.original.title}

-

{cell.row.original.subject || "—"}

-
- ), + meta: { cellClass: "font-medium" }, + }, + // One value per cell: the subject used to sit under the title as a + // caption, which made these rows taller than every other table's. + { + id: "subject", + accessorFn: (row) => row.subject || undefined, + header: t("subjects.subject"), + meta: { cellClass: "text-muted-foreground" }, }, { id: "due_at", accessorFn: (row) => row.due_at, header: t("homework.dueAt"), - meta: { cellClass: "whitespace-nowrap text-xs text-muted-foreground" }, + meta: { cellClass: "text-muted-foreground" }, cell: (cell) => formatDateTime(cell.row.original.due_at, locale()), }, { id: "status", + accessorFn: (row) => statusLabel(row), header: t("events.status"), - cell: (cell) => ( -
- {statusLabel(cell.row.original)} - -

{t("homework.late")}

-
-
- ), + // "Late" rides inside the status badge instead of a second line. + cell: (cell) => + cell.row.original.late + ? {statusLabel(cell.row.original)} · {t("homework.late")} + : {statusLabel(cell.row.original)}, }, { id: "mark", + accessorFn: (row) => row.result?.mark ?? undefined, header: t("form.mark"), meta: { align: "right", cellClass: "font-medium tabular-nums" }, cell: (cell) => cell.row.original.result?.mark ?? "—", @@ -74,7 +76,7 @@ export function HomeworkReportView(props: { userId: string }) { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( [] = [ { id: "course", + accessorFn: (row) => str(obj(row.stat).course_title) ?? courseLabel(row.id, props.courseTitle, row.index), header: detailText("marks.course"), meta: { cellClass: "font-medium text-text-strong" }, - cell: (cell) => str(obj(cell.row.original.stat).course_title) ?? courseLabel(cell.row.original.id, props.courseTitle, cell.row.original.index), }, { id: "average", header: detailText("marks.average"), meta: centered, cell: (cell) => nText(obj(cell.row.original.stat).average) ?? "—" }, { id: "n_marks", header: detailText("marks.nMarks"), meta: centered, cell: (cell) => String(num(obj(cell.row.original.stat).n_marks) ?? 0) }, diff --git a/src/components/insights/insight-runs-table.tsx b/src/components/insights/insight-runs-table.tsx index 4d6b2fa..8945ee9 100644 --- a/src/components/insights/insight-runs-table.tsx +++ b/src/components/insights/insight-runs-table.tsx @@ -26,17 +26,21 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) { const rtx = (key: RunReportKey, vars?: Record) => runReportText(prefs.locale(), key, vars); const [selectedRun, setSelectedRun] = createSignal(null); + // One value per cell: the start time, the failed/skipped counts and each + // kind of issue used to stack under a headline value, so rows grew to + // different heights. Each now has its own column. const columns = createMemo[]>(() => [ { accessorKey: "run_day", header: tx("insights.runDay"), - meta: { align: "center" }, - cell: (cell) => ( -
-

{cell.row.original.run_day}

-

{formatDateTime(cell.row.original.started_at, prefs.locale())}

-
- ), + meta: { align: "center", cellClass: "font-medium text-text-strong" }, + }, + { + id: "started_at", + accessorFn: (row) => row.started_at, + header: rtx("startedAt"), + meta: { align: "center", cellClass: "text-muted-foreground" }, + cell: (cell) => formatDateTime(cell.row.original.started_at, prefs.locale()), }, { accessorKey: "status", @@ -52,16 +56,18 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) { id: "processed", header: tx("insights.processed"), accessorFn: (row) => row.students_ok, - meta: { align: "center" }, - cell: (cell) => { - const run = cell.row.original; - return ( -
-

{run.students_ok}/{run.students_total}

-

{run.students_failed} / {run.students_skipped}

-
- ); - }, + meta: { align: "center", cellClass: "font-medium tabular-nums" }, + cell: (cell) => `${cell.row.original.students_ok}/${cell.row.original.students_total}`, + }, + { + accessorKey: "students_failed", + header: rtx("failed"), + meta: { align: "center", cellClass: "tabular-nums" }, + }, + { + accessorKey: "students_skipped", + header: rtx("skipped"), + meta: { align: "center", cellClass: "tabular-nums" }, }, { accessorKey: "rows_written", @@ -75,42 +81,43 @@ export function InsightRunsTable(props: { runs: InsightRun[] }) { cell: (cell) => {formatDurationMinutes(cell.row.original.duration_ms, prefs.locale())}, }, { - id: "issues", - header: tx("insights.issues"), - enableSorting: false, + id: "budget", + accessorFn: (row) => (row.budget_exceeded ? 1 : 0), + header: rtx("budget"), + meta: { align: "center" }, + cell: (cell) => + cell.row.original.budget_exceeded + ? {rtx("budgetOver")} + : {rtx("budgetOk")}, + }, + { + id: "pending", + accessorFn: (row) => row.pending_students.length, + header: rtx("pendingColumn"), meta: { align: "center" }, cell: (cell) => { - const run = cell.row.original; - const issueCount = run.pending_students.length + run.failed_modules.length; + const pending = cell.row.original.pending_students; return ( -
-

0 || run.budget_exceeded ? "text-warning-text" : "text-muted-foreground")}> - {issueCount > 0 ? tx("insights.issueCount", { count: issueCount }) : tx("insights.noIssues")} -

- {run.budget_exceeded &&

{tx("insights.budgetExceeded")}

} - {run.pending_students.length > 0 && ( -

- {tx("insights.pendingStudents", { count: run.pending_students.length })} -

- )} - {run.failed_modules.length > 0 && ( -

- {tx("insights.failedModules", { - modules: run.failed_modules.map((stage) => failedStageText(prefs.locale(), stage)).join(", "), - })} -

- )} -
+ 0 ? "text-warning-text" : "text-muted-foreground")} title={pending.join(", ") || undefined}> + {pending.length} + ); }, }, + { + id: "failed_modules", + accessorFn: (row) => row.failed_modules.map((stage) => failedStageText(prefs.locale(), stage)).join(", "), + header: rtx("failedModulesColumn"), + enableSorting: false, + meta: { cellClass: "text-warning-text" }, + }, { id: "actions", header: tx("common.actions"), enableSorting: false, meta: { - headerClass: "w-[150px] min-w-[150px] max-w-[150px] h-[45px] text-center whitespace-nowrap", - cellClass: "w-[150px] min-w-[150px] max-w-[150px] h-[45px] text-center whitespace-nowrap", + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", + cellClass: "text-center", }, cell: (cell) => ( []>(() => [ { id: "course", + accessorFn: (row) => row.course.title, header: t("nav.courses"), - meta: { headerClass: "w-[42%]" }, + meta: { headerClass: "w-[36%]" }, cell: (cell) => ( {cell.row.original.course.title} @@ -78,7 +79,7 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean { id: "instance", header: t("instances.title"), - meta: { headerClass: "w-[28%]", cellClass: "text-muted-foreground" }, + meta: { headerClass: "w-[24%]", cellClass: "text-muted-foreground" }, cell: (cell) => ( ), }, + // The average and its band are two values, so two columns: "68,2 · Bant 3" + // in one cell was the one row taller and wider than its neighbours. { id: "average", + accessorFn: (row) => row.average ?? undefined, header: t("marks.courseAvg"), - meta: { headerClass: "w-[30%]" }, + meta: { headerClass: "w-[22%]" }, cell: (cell) => ( -
+
- {markWithGrade(cell.row.original.average, cell.row.original.average_grade)} + {formatDecimal(cell.row.original.average!, locale())}
), }, + { + id: "band", + accessorFn: (row) => row.average_grade || undefined, + header: t("marks.band"), + meta: { headerClass: "w-[18%]" }, + }, ]); const [settings] = createResource(() => getSettings()); const compact = () => props.compact === true; @@ -121,22 +131,17 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean header: t("marks.exam"), meta: { stickyLeft: true }, cell: (cell) => ( - - - {cell.row.original.title} - - -

- {examKindLabel(cell.row.original.kind, t)} -

-
-
+ + {cell.row.original.title} + ), }, + // The kind is its own column at every width; the compact view used to hide + // it and stack it under the title as a second line instead. { - accessorKey: "kind", + id: "kind", + accessorFn: (row) => examKindLabel(row.kind, t), header: t("exams.kind"), - meta: { headerClass: compact() ? "hidden sm:table-cell" : undefined, cellClass: compact() ? "hidden sm:table-cell" : undefined }, cell: (cell) => {examKindLabel(cell.row.original.kind, t)}, }, { @@ -146,10 +151,17 @@ export function MarksReportView(props: { report: MarksReport; compact?: boolean cell: (cell) => examWeight(cell.row.original, settings()?.exam_kinds) ?? "—", }, { - accessorKey: "mark", + id: "mark", + accessorFn: (row) => row.mark ?? undefined, header: t("marks.mark"), meta: { align: "right", cellClass: "font-semibold" }, - cell: (cell) => markWithGrade(cell.row.original.mark, cell.row.original.grade), + cell: (cell) => formatDecimal(cell.row.original.mark!, locale()), + }, + { + id: "grade", + accessorFn: (row) => row.grade || undefined, + header: t("marks.band"), + meta: { align: "right" }, }, ]); diff --git a/src/components/sessions/course-sessions-panel.tsx b/src/components/sessions/course-sessions-panel.tsx index 9c8569f..9184749 100644 --- a/src/components/sessions/course-sessions-panel.tsx +++ b/src/components/sessions/course-sessions-panel.tsx @@ -213,19 +213,21 @@ export function CourseSessionsPanel(props: { meta: { cellClass: "font-medium" }, cell: (cell) => cell.row.original.topic || t("sessions.untitled"), }, + // Start and end are separate columns so each cell holds one value and + // every row keeps the same height. { - id: "time", + id: "starts", accessorFn: (row) => row.starts_at, - header: t("appointments.time"), - meta: { cellClass: "text-xs text-muted-foreground" }, - cell: (cell) => ( -
-

{formatDateTime(cell.row.original.starts_at, locale())}

- -

→ {formatDateTime(cell.row.original.ends_at, locale())}

-
-
- ), + header: t("appointments.starts"), + meta: { cellClass: "text-muted-foreground" }, + cell: (cell) => formatDateTime(cell.row.original.starts_at, locale()), + }, + { + id: "ends", + accessorFn: (row) => row.ends_at ?? undefined, + header: t("appointments.ends"), + meta: { cellClass: "text-muted-foreground" }, + cell: (cell) => formatDateTime(cell.row.original.ends_at, locale()), }, { id: "teacher", @@ -237,7 +239,7 @@ export function CourseSessionsPanel(props: { ? [{ id: "actions", header: t("common.actions"), - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( (props: DataTableProps {(cell) => { const val = cell.getValue(); - const isText = typeof val === "string" || typeof val === "number"; const isSystemColumn = ["actions", "update", "select"].includes(cell.column.id); // A display column (no accessorFn/accessorKey) has no // value to be empty — getValue() is always undefined — @@ -629,7 +628,17 @@ export function DataTable(props: DataTableProps { + if (isSystemColumn) return; + const el = event.currentTarget; + const clipped = [el, ...el.querySelectorAll("*")].some((node) => node.scrollWidth > node.clientWidth + 1); + const text = el.textContent?.trim() ?? ""; + if (clipped && text) el.title = text; + else el.removeAttribute("title"); + }} > -}> {flexRender(cell.column.columnDef.cell, cell.getContext())} diff --git a/src/components/users/user-table.tsx b/src/components/users/user-table.tsx index 57040ce..278167a 100644 --- a/src/components/users/user-table.tsx +++ b/src/components/users/user-table.tsx @@ -32,23 +32,34 @@ function UserRoleActions(props: { return ( <> - - - - + {/* The confirm button sits beside the select, not under it, so a row + with a pending role change keeps the same height as the others. */} +
+ + + + +
row.phone || undefined, header: t("profile.phone"), size: 180, minSize: 130, @@ -129,8 +141,8 @@ export function UserTable(props: { minSize: 110, enableHiding: false, meta: { - headerClass: "w-[110px] min-w-[110px] max-w-[110px] text-center whitespace-nowrap", - cellClass: "w-[110px] min-w-[110px] max-w-[110px] text-center whitespace-nowrap", + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", + cellClass: "text-center", }, cell: (cell) => ( ( -
-

{cell.row.original.name}

-

{cell.row.original.role}

-
- ), + meta: { cellClass: "font-medium" }, + }, + // The role used to sit under the name as a second line; one value per cell. + { + id: "role", + accessorFn: (row) => row.role || undefined, + header: t("admin.role"), + meta: { cellClass: "text-muted-foreground" }, }, { id: "actions", header: t("common.actions"), - meta: { align: "center", label: t("common.actions") }, + meta: { + label: t("common.actions"), + headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", + cellClass: "text-center", + }, cell: (cell) => ( = { noIssues: "Sorun yok", pendingStudents: "{count} öğrenci sıradaki çalıştırmaya kaldı", failedModules: "Veri üretmeyen modüller: {modules}", + pendingColumn: "Sırada kalan", + failedModulesColumn: "Veri üretmeyen modüller", + budgetOver: "Aşıldı", + budgetOk: "İçinde", coverage: "Sinyalleri yüklenen öğrenci: {loaded}/{total}", coverageNote: "Okul geneli sayılar yalnızca sinyalleri yüklenmiş öğrencileri kapsar.", loadAll: "Kalan {count} öğrenciyi yükle", @@ -183,6 +191,10 @@ const en: Record = { noIssues: "No issues", pendingStudents: "{count} students left for the next run", failedModules: "Modules that produced nothing: {modules}", + pendingColumn: "Left pending", + failedModulesColumn: "Modules without data", + budgetOver: "Exceeded", + budgetOk: "Within", coverage: "Students with signals loaded: {loaded}/{total}", coverageNote: "School overview numbers cover only the students whose signals are loaded.", loadAll: "Load the remaining {count} students", diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index a6ded95..ada2f39 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -517,6 +517,7 @@ export const en: Dict = { "roster.studentClass": "Class", "roster.teacher": "Teacher", "roster.class": "Class", + "roster.enrolledVia": "Enrolled via", "roster.term": "Term", "roster.termAll": "Term: All", "roster.mastery": "Topic mastery", @@ -555,6 +556,7 @@ export const en: Dict = { "builder.createSchool": "New school", "builder.createSchoolHint": "Creates the school's database and its first admin in one step.", "builder.schoolName": "School name", + "builder.schoolId": "ID", "builder.adminUsername": "Admin username", "builder.adminPassword": "Admin password", "builder.sellEverything": "Enable every module in the catalog", @@ -589,6 +591,7 @@ export const en: Dict = { "modules.conflictRequires": "{module} needs {needed}, which is not enabled.", "modules.conflictRequiredBy": "{module} cannot be turned off: {dependents} depend on it.", "modules.module": "Module", + "modules.package": "Package", "modules.active": "Active", "modules.unitPrice": "Unit price", "modules.activeSeats": "Active seats", @@ -990,6 +993,7 @@ export const en: Dict = { "dashboard.col.dueDate": "Due date", "dashboard.col.type": "Type", "dashboard.col.status": "Status", + "dashboard.col.section": "Course / Section", "dashboard.type.exam": "Exam", "dashboard.type.event": "Event", "dashboard.type.payment": "Payment", @@ -1391,6 +1395,9 @@ export const en: Dict = { "appointments.series.weekly": "Weekly", "appointments.series.once": "One-off", "appointments.time": "Time", + "appointments.proposalPending": "New time proposed", + "appointments.proposal": "Time proposal", + "appointments.date": "Date", "appointments.status": "Status", "appointments.publishSubtitle": "Offer a time window students can book. Repeat it weekly if you like.", "appointments.bookSubtitle": "Tell the teacher why you would like to meet.", @@ -1890,6 +1897,7 @@ export const en: Dict = { "homework.tab.open": "Open", "homework.tab.past": "Past due", "homework.result": "Result", + "homework.mark": "Mark", "homework.grade": "Grade", "homework.ungrade": "Ungrade", "homework.student": "Student", @@ -1917,7 +1925,6 @@ export const en: Dict = { "marks.tabByCourse": "By course", "marks.selectCourse": "Course", "exams.mustBelongCourse": "Exams are created under a course. Open a course to add one.", - "homework.mark": "Mark", "exams.missingCourse": "Course unavailable", "exams.statistics": "Statistics", "exams.audience.tab": "Shared sections", diff --git a/src/i18n/locales/tr.ts b/src/i18n/locales/tr.ts index 35f26b4..2bfa817 100644 --- a/src/i18n/locales/tr.ts +++ b/src/i18n/locales/tr.ts @@ -513,6 +513,7 @@ export const tr: Dict = { "roster.studentClass": "Sınıfı", "roster.teacher": "Öğretmen", "roster.class": "Sınıf", + "roster.enrolledVia": "Kayıt yolu", "roster.term": "Dönem", "roster.termAll": "Dönem: Tümü", "roster.mastery": "Konu yetkinliği", @@ -551,6 +552,7 @@ export const tr: Dict = { "builder.createSchool": "Yeni okul", "builder.createSchoolHint": "Okulun veritabanını ve ilk yöneticisini tek adımda oluşturur.", "builder.schoolName": "Okul adı", + "builder.schoolId": "Kimlik", "builder.adminUsername": "Yönetici kullanıcı adı", "builder.adminPassword": "Yönetici şifresi", "builder.sellEverything": "Katalogdaki tüm modülleri aç", @@ -585,6 +587,7 @@ export const tr: Dict = { "modules.conflictRequires": "{module} için {needed} açık olmalı.", "modules.conflictRequiredBy": "{module} kapatılamaz: {dependents} buna bağlı.", "modules.module": "Modül", + "modules.package": "Paket", "modules.active": "Etkin", "modules.unitPrice": "Birim fiyat", "modules.activeSeats": "Aktif lisans", @@ -986,6 +989,7 @@ export const tr: Dict = { "dashboard.col.dueDate": "Son tarih", "dashboard.col.type": "Tür", "dashboard.col.status": "Durum", + "dashboard.col.section": "Ders / Şube", "dashboard.type.exam": "Sınav", "dashboard.type.event": "Etkinlik", "dashboard.type.payment": "Ödeme", @@ -1387,6 +1391,9 @@ export const tr: Dict = { "appointments.series.weekly": "Haftalık", "appointments.series.once": "Tek seferlik", "appointments.time": "Saat", + "appointments.proposalPending": "Yeni saat önerildi", + "appointments.proposal": "Saat önerisi", + "appointments.date": "Tarih", "appointments.status": "Durum", "appointments.publishSubtitle": "Öğrencilerin alabileceği bir saat aralığı sunun. İsterseniz haftalık tekrarlayın.", "appointments.bookSubtitle": "Öğretmene neden görüşmek istediğinizi belirtin.", @@ -1886,6 +1893,7 @@ export const tr: Dict = { "homework.tab.open": "Açık", "homework.tab.past": "Süresi geçen", "homework.result": "Sonuç", + "homework.mark": "Puan", "homework.grade": "Notlandır", "homework.ungrade": "Notu kaldır", "homework.student": "Öğrenci", @@ -1913,7 +1921,6 @@ export const tr: Dict = { "marks.tabByCourse": "Derslere göre", "marks.selectCourse": "Ders", "exams.mustBelongCourse": "Sınavlar ders altında oluşturulur. Eklemek için bir ders aç.", - "homework.mark": "Puan", "exams.missingCourse": "Ders bilgisi yok", "exams.statistics": "İstatistikler", "exams.audience.tab": "Paylaşılan şubeler", diff --git a/src/i18n/messages.ts b/src/i18n/messages.ts index 1824667..082fff4 100644 --- a/src/i18n/messages.ts +++ b/src/i18n/messages.ts @@ -453,6 +453,7 @@ export type MessageKey = | "roster.studentClass" | "roster.teacher" | "roster.class" + | "roster.enrolledVia" | "roster.term" | "roster.termAll" | "roster.mastery" @@ -491,6 +492,7 @@ export type MessageKey = | "builder.createSchool" | "builder.createSchoolHint" | "builder.schoolName" + | "builder.schoolId" | "builder.adminUsername" | "builder.adminPassword" | "builder.sellEverything" @@ -524,6 +526,7 @@ export type MessageKey = | "modules.on" | "modules.off" | "modules.module" + | "modules.package" | "modules.active" | "modules.unitPrice" | "modules.activeSeats" @@ -585,9 +588,6 @@ export type MessageKey = | "notifications.unreadCount" | "errors.notFoundDescription" | "errors.accessDeniedDescription" - | "network.offlineTitle" - | "network.offlineDescription" - | "network.reconnect" | "errors.pageLoad.title" | "errors.pageLoad.retry" | "errors.pageLoad.retryIn" @@ -615,6 +615,9 @@ export type MessageKey = | "errors.recordNotFound.description" | "errors.recordNotFound.backToList" | "errors.recordNotFound.backHome" + | "network.offlineTitle" + | "network.offlineDescription" + | "network.reconnect" | "parents.title" | "parents.subtitle" | "common.loading" @@ -977,6 +980,7 @@ export type MessageKey = | "dashboard.col.dueDate" | "dashboard.col.type" | "dashboard.col.status" + | "dashboard.col.section" | "dashboard.type.exam" | "dashboard.type.event" | "dashboard.type.payment" @@ -1782,6 +1786,7 @@ export type MessageKey = | "homework.tab.open" | "homework.tab.past" | "homework.result" + | "homework.mark" | "homework.grade" | "homework.ungrade" | "homework.student" @@ -1809,7 +1814,6 @@ export type MessageKey = | "marks.tabByCourse" | "marks.selectCourse" | "exams.mustBelongCourse" - | "homework.mark" | "exams.missingCourse" | "exams.statistics" | "exams.audience.tab" @@ -2337,6 +2341,9 @@ export type MessageKey = | "appointments.series.weekly" | "appointments.series.once" | "appointments.time" + | "appointments.proposalPending" + | "appointments.proposal" + | "appointments.date" | "appointments.status" | "appointments.publishSubtitle" | "appointments.bookSubtitle" diff --git a/src/pages/academic-years-page.tsx b/src/pages/academic-years-page.tsx index 80cbd2a..010f8bb 100644 --- a/src/pages/academic-years-page.tsx +++ b/src/pages/academic-years-page.tsx @@ -150,19 +150,12 @@ function AcademicYearsContent() { { accessorKey: "name", header: t("settings.name"), - size: 190, - minSize: 170, - // One line: a long name ends in "…" beside its badge rather than - // wrapping; the full name is on hover and in the detail panel. + size: 170, + minSize: 150, + // One line: a long name ends in "…" (full name on hover and in the + // detail panel); the archived flag has its own column. meta: { cellClass: "max-w-0" }, - cell: (cell) => ( - - {cell.row.original.name} - - {t("academicYears.archived")} - - - ), + cell: (cell) => {cell.row.original.name}, }, { accessorKey: "starts_at", @@ -196,10 +189,22 @@ function AcademicYearsContent() { minSize: 80, meta: { cellClass: "text-center", align: "center" }, }, + { + accessorKey: "archived_at", + header: t("academicYears.archived"), + size: 115, + minSize: 105, + meta: { cellClass: "whitespace-nowrap" }, + cell: (cell) => ( + —}> + {t("academicYears.archived")} + + ), + }, { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => { const year = cell.row.original; const archived = year.archived_at != null; diff --git a/src/pages/appointments-page.tsx b/src/pages/appointments-page.tsx index f2ebce6..9016fe5 100644 --- a/src/pages/appointments-page.tsx +++ b/src/pages/appointments-page.tsx @@ -140,19 +140,45 @@ function AppointmentsContent() { sameDay(starts, ends) ? `${formatDateTime(starts, locale())} – ${timeOnly(ends)}` : `${formatDateTime(starts, locale())} — ${formatDateTime(ends, locale())}`; - // Stacked date/time cell: date on top, clock range below (tabular-nums so - // 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) - ? `${timeOnly(starts)} – ${timeOnly(ends)}` - : `${timeOnly(starts)} → ${formatDate(ends, locale())} ${timeOnly(ends)}`} - -
- ); + // One value per cell: the date and the clock range are separate columns so + // every row stays one line tall. A cross-day window names the end date + // inside the (single-line) range. + const dateCell = (starts: number | null) => {formatDate(starts, locale())}; + const rangeText = (starts: number | null, ends: number | null) => + sameDay(starts, ends) + ? `${timeOnly(starts)} – ${timeOnly(ends)}` + : `${timeOnly(starts)} → ${formatDate(ends, locale())} ${timeOnly(ends)}`; + const rangeCell = (starts: number | null, ends: number | null) => { + const text = rangeText(starts, ends); + return {text}; + }; + const windowColumns = (): ColumnDef[] => [ + { + id: "date", + accessorFn: (row) => row.starts_at ?? 0, + header: t("appointments.date"), + meta: { cellClass: "whitespace-nowrap" }, + cell: (cell) => dateCell(cell.row.original.starts_at), + }, + { + id: "time", + header: t("appointments.time"), + meta: { cellClass: "max-w-0" }, + cell: (cell) => rangeCell(cell.row.original.starts_at, cell.row.original.ends_at), + }, + ]; + // A standing reschedule proposal is its own flag column, not a caption + // under the time (the row's window already IS the proposed one). + const proposalColumn = (): ColumnDef => ({ + id: "proposal", + accessorFn: (row) => (hasStandingProposal(row) ? 1 : 0), + header: t("appointments.proposal"), + meta: { headerClass: "text-center", cellClass: "text-center" }, + cell: (cell) => + hasStandingProposal(cell.row.original) + ? {t("appointments.proposalPending")} + : —, + }); const statusBadge = (status: AppointmentStatus) => ( @@ -176,25 +202,20 @@ function AppointmentsContent() { const slotBooking = (slotId: string) => (appts.latest ?? []).find((a) => a.slot === slotId && isLive(a.status)); const slotColumns = createMemo[]>(() => [ - { - id: "time", - header: t("appointments.time"), - meta: { headerClass: "w-44", cellClass: "align-top pr-4" }, - cell: (cell) => timeCell(cell.row.original.starts_at, cell.row.original.ends_at), - }, + ...windowColumns(), { id: "status", header: t("appointments.status"), meta: { headerClass: "text-center", cellClass: "text-center" }, cell: (cell) => { const booking = slotBooking(cell.row.original.id); - return booking ? statusBadge(booking.status) : {t("appointments.availableSlots")}; + return booking ? statusBadge(booking.status) : {t("appointments.availableSlots")}; }, }, { id: "actions", header: t("common.actions"), - meta: { headerClass: "text-center", cellClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => { const slot = cell.row.original; const actions = [{ @@ -237,19 +258,8 @@ function AppointmentsContent() { header: t("appointments.student"), cell: (cell) => {personLabel(cell.row.original.requester)}, }, - { - id: "time", - header: t("appointments.time"), - meta: { headerClass: "w-44", cellClass: "align-top pr-4" }, - cell: (cell) => ( -
- {timeCell(cell.row.original.starts_at, cell.row.original.ends_at)} - -
{t("appointments.rescheduleProposed")}
-
-
- ), - }, + ...windowColumns(), + proposalColumn(), { id: "status", header: t("appointments.status"), @@ -259,7 +269,7 @@ function AppointmentsContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "text-center", cellClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => { const a = cell.row.original; const actions = [] as { label: string; icon: import("solid-js").JSX.Element; destructive?: boolean; onSelect: () => void }[]; @@ -291,16 +301,11 @@ function AppointmentsContent() { header: t("appointments.teacher"), cell: (cell) => {personLabel(cell.row.original.teacher)}, }, - { - id: "time", - header: t("appointments.time"), - meta: { headerClass: "w-44", cellClass: "align-top pr-4" }, - cell: (cell) => timeCell(cell.row.original.starts_at, cell.row.original.ends_at), - }, + ...windowColumns(), { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-40 text-center", cellClass: "w-40 min-w-[10rem] text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( {personLabel(cell.row.original.teacher)}, }, - { - id: "time", - header: t("appointments.time"), - meta: { headerClass: "w-44", cellClass: "align-top pr-4" }, - cell: (cell) => ( -
- {/* The effective window IS the proposal while one stands (backend - `Appointment::window`), so the row's own time already shows the - proposed one — label it instead of printing it twice. */} - -
{t("appointments.proposedTime")}:
-
- {timeCell(cell.row.original.starts_at, cell.row.original.ends_at)} -
- ), - }, + ...windowColumns(), + proposalColumn(), { id: "status", header: t("appointments.status"), @@ -352,7 +343,7 @@ function AppointmentsContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "text-center", cellClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => { const a = cell.row.original; const actions = [] as { label: string; icon: import("solid-js").JSX.Element; destructive?: boolean; onSelect: () => void }[]; diff --git a/src/pages/builder-schools-page.tsx b/src/pages/builder-schools-page.tsx index 515fac8..0c99ba0 100644 --- a/src/pages/builder-schools-page.tsx +++ b/src/pages/builder-schools-page.tsx @@ -66,12 +66,17 @@ function BuilderSchoolsContent() { { accessorKey: "name", header: t("builder.schoolName"), + meta: { cellClass: "max-w-0" }, + cell: (cell) => {cell.row.original.name}, + }, + { + // Short id in its own column (full id on hover) instead of a caption + // under the name, so every row stays one line tall. + accessorKey: "id", + header: t("builder.schoolId"), cell: (cell) => ( - - {cell.row.original.name} - - {cell.row.original.id.slice(0, 8)} - + + {cell.row.original.id.slice(0, 8)} ), }, diff --git a/src/pages/classes-page.tsx b/src/pages/classes-page.tsx index c51f140..b1aac2f 100644 --- a/src/pages/classes-page.tsx +++ b/src/pages/classes-page.tsx @@ -197,7 +197,7 @@ function ClassesContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( - + {cell.row.original.class_name} ), @@ -209,7 +209,7 @@ function CourseDetailContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( {cell.row.original.title}, + }, + { + // The description is its own column (one line, "…" + hover for the + // rest) rather than a caption under the title. + id: "description", + accessorFn: (row) => row.description ?? "", + header: t("form.description"), + size: 220, + minSize: 160, + enableSorting: false, + meta: { cellClass: "max-w-0 text-text-subtle" }, cell: (cell) => ( - // Always two lines, description or not, so every row is the same height. -
-

{cell.row.original.title}

-

- {cell.row.original.description || "—"} -

-
+ + {cell.row.original.description || "—"} + ), }, { id: "kind", accessorFn: (row) => courseKindLabel(row.kind, t), header: t("exams.kind"), - size: 120, + size: 110, minSize: 100, - meta: { cellClass: "whitespace-nowrap" }, + meta: { cellClass: "whitespace-nowrap text-center" }, cell: (cell) => ( -
- {courseKindLabel(cell.row.original.kind, t)} - - {t("courses.enrolled")} - -
+ {courseKindLabel(cell.row.original.kind, t)} ), }, + // A student sees only the courses they take: the "enrolled" marker is its + // own column for them rather than a second badge in the kind cell. + ...(auth.user()?.role === "student" + ? [{ + id: "enrolled", + header: t("roster.status"), + size: 100, + minSize: 90, + enableSorting: false, + meta: { cellClass: "whitespace-nowrap text-center" }, + cell: () => {t("courses.enrolled")}, + } satisfies ColumnDef] + : []), { id: "sections", accessorFn: (row) => row.class_course_count, @@ -148,7 +164,7 @@ function CoursesContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( -
- {info.row.original.title} - - {(section) => {section()}} - -
- ), + meta: { headerClass, cellClass: "max-w-0" }, + cell: (info) => {info.row.original.title}, + }, + { + // " — <şube>" in its own column, not a caption under the title, + // so every row stays one line tall. + id: "section", + accessorFn: (row) => deadlineSection(row) ?? "", + header: t("dashboard.col.section"), + enableSorting: false, + meta: { headerClass, cellClass: "max-w-0" }, + cell: (info) => { + const section = deadlineSection(info.row.original); + return section + ? {section} + : —; + }, }, { accessorKey: "kind", diff --git a/src/pages/event-detail-page.tsx b/src/pages/event-detail-page.tsx index a7555e7..5a99f3a 100644 --- a/src/pages/event-detail-page.tsx +++ b/src/pages/event-detail-page.tsx @@ -138,7 +138,7 @@ function EventDetailContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( -
- - {cell.row.original.title} - -
+ + {cell.row.original.title} + ), }, + // Start and end are separate columns (one date-time each) so every row + // stays one line tall. { id: "time", accessorFn: (event) => event.starts_at ?? event.ends_at ?? 0, header: t("events.starts"), - size: 190, - minSize: 160, - meta: { cellClass: "text-xs text-muted-foreground" }, - cell: (cell) => ( -
-

{formatDateTime(cell.row.original.starts_at, locale())}

- -

→ {formatDateTime(cell.row.original.ends_at, locale())}

-
-
- ), + size: 160, + minSize: 140, + meta: { cellClass: "whitespace-nowrap text-muted-foreground" }, + cell: (cell) => formatDateTime(cell.row.original.starts_at, locale()), + }, + { + id: "ends", + accessorFn: (event) => event.ends_at ?? 0, + header: t("events.ends"), + size: 160, + minSize: 140, + meta: { cellClass: "whitespace-nowrap text-muted-foreground" }, + cell: (cell) => (cell.row.original.ends_at ? formatDateTime(cell.row.original.ends_at, locale()) : "—"), }, { id: "audience", @@ -181,6 +184,7 @@ function EventsContent() { { id: "actions", header: t("common.actions"), + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( -
-

{cell.row.original.title}

-
+ {cell.row.original.title} ), }, { diff --git a/src/pages/homework-page.tsx b/src/pages/homework-page.tsx index 4663df3..1761465 100644 --- a/src/pages/homework-page.tsx +++ b/src/pages/homework-page.tsx @@ -174,9 +174,7 @@ function HomeworkContent() { minSize: 180, meta: { cellClass: "font-medium" }, cell: (cell) => ( -
-

{cell.row.original.title}

-
+ {cell.row.original.title} ), }, { @@ -186,7 +184,7 @@ function HomeworkContent() { size: 180, minSize: 140, meta: { cellClass: "max-w-0 truncate text-text-subtle" }, - cell: (cell) => {courseName(cell.row.original.class_course)}, + cell: (cell) => {courseName(cell.row.original.class_course)}, }, { id: "due_at", @@ -208,7 +206,7 @@ function HomeworkContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "text-center", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( row.user.display_name || row.user.username, header: t("roster.studentName"), - meta: { cellClass: "font-medium" }, - cell: (cell) => ( - - {cell.row.original.user.display_name || t("exams.nameless")} - - - {t("course.fromClass", { name: klass.latest?.name ?? "—" })} - - - - ), + meta: { cellClass: "max-w-0 font-medium" }, + cell: (cell) => { + const name = cell.row.original.user.display_name || t("exams.nameless"); + return {name}; + }, + }, + { + // How the student got here (through the şube vs. added directly) is its + // own column, not a badge beside the name. + id: "source", + accessorFn: (row) => (row.source ? 1 : 0), + header: t("roster.enrolledVia"), + cell: (cell) => + cell.row.original.source + ? {t("course.fromClass", { name: klass.latest?.name ?? "—" })} + : —, }, { id: "class", @@ -258,7 +263,7 @@ function InstanceDetailContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-14 text-center", cellClass: "px-1 text-center" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( - + {cell.row.original.title} ), @@ -299,12 +304,18 @@ function InstanceDetailContent() { cell: (cell) => ( {examKindLabel(String(cell.row.original.kind), t)} - - {(weight) => ({t("courses.weight")}: {weight()})} - ), }, + { + // The kind's weight in this şube's average: its own column, not a + // parenthesised suffix inside the kind badge. + id: "weight", + accessorFn: (row) => examWeight(row, sectionWeights()) ?? -1, + header: t("courses.weight"), + meta: { cellClass: "tabular-nums" }, + cell: (cell) => examWeight(cell.row.original, sectionWeights()) ?? "—", + }, { id: "mode", accessorFn: (row) => examModeLabel(row.mode), diff --git a/src/pages/license-modules-page.tsx b/src/pages/license-modules-page.tsx index fb50d9b..7252664 100644 --- a/src/pages/license-modules-page.tsx +++ b/src/pages/license-modules-page.tsx @@ -50,22 +50,35 @@ function LicenseModulesContent() { { id: "module", header: t("modules.module"), - cell: (cell) => ( -
- - + meta: { cellClass: "max-w-0" }, + cell: (cell) => { + const label = moduleLabel(cell.row.original.module, t); + return ( + + + {label} -
-

{moduleLabel(cell.row.original.module, t)}

-

- {packageLabel(cell.row.original.package, t)} - 0}> - {` · ${t("modules.requires")}: ${cell.row.original.requires.map((name) => moduleLabel(name, t)).join(", ")}`} - -

-
-
- ), + ); + }, + }, + // Package and prerequisites are their own columns rather than a caption + // line under the module name, so every row stays one line tall. + { + id: "package", + accessorFn: (row) => packageLabel(row.package, t), + header: t("modules.package"), + meta: { cellClass: "max-w-0 text-text-subtle" }, + }, + { + id: "requires", + accessorFn: (row) => row.requires.map((name) => moduleLabel(name, t)).join(", "), + header: t("modules.requires"), + enableSorting: false, + meta: { cellClass: "max-w-0 text-text-subtle" }, + cell: (cell) => { + const text = cell.row.original.requires.map((name) => moduleLabel(name, t)).join(", "); + return text ? {text} : "—"; + }, }, { id: "status", diff --git a/src/pages/live-monitor-page.tsx b/src/pages/live-monitor-page.tsx index 0f87fe3..f4f9aaf 100644 --- a/src/pages/live-monitor-page.tsx +++ b/src/pages/live-monitor-page.tsx @@ -233,7 +233,7 @@ function LiveMonitorContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( -
-

{cell.row.original.text}

- -

{cell.row.original.subject_name}

-
-
- ), + meta: { cellClass: "max-w-0" }, + cell: (cell) => {cell.row.original.text}, + }, + { + // The subject is its own column, not a caption under the question. + id: "subject", + accessorFn: (row) => row.subject_name ?? "", + header: t("subjects.subject"), + meta: { cellClass: "max-w-0 text-muted-foreground" }, + cell: (cell) => { + const subject = cell.row.original.subject_name; + return subject ? {subject} : "—"; + }, }, { accessorKey: "kind", diff --git a/src/pages/staff-work-page.tsx b/src/pages/staff-work-page.tsx index e3410b6..cf9ef64 100644 --- a/src/pages/staff-work-page.tsx +++ b/src/pages/staff-work-page.tsx @@ -189,13 +189,17 @@ function StaffWorkContent() { id: "time", accessorFn: (row) => row.check_in, header: t("work.checkIn"), - meta: { cellClass: "text-xs" }, - cell: (cell) => ( -
-

{formatDateTime(cell.row.original.check_in, locale())}

-

→ {formatDateTime(cell.row.original.check_out, locale())}

-
- ), + meta: { cellClass: "text-xs whitespace-nowrap" }, + cell: (cell) => formatDateTime(cell.row.original.check_in, locale()), + }, + // Check-out is its own column (as on the work-log page), not a second + // line under check-in. + { + id: "checkOut", + accessorFn: (row) => row.check_out ?? 0, + header: t("work.checkOut"), + meta: { cellClass: "text-xs whitespace-nowrap text-muted-foreground" }, + cell: (cell) => formatDateTime(cell.row.original.check_out, locale()), }, { accessorKey: "duration_ms", diff --git a/src/pages/student-pomodoro-page.tsx b/src/pages/student-pomodoro-page.tsx index 10cf2f6..8837f72 100644 --- a/src/pages/student-pomodoro-page.tsx +++ b/src/pages/student-pomodoro-page.tsx @@ -82,7 +82,7 @@ function StudentPomodoroContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => ( ( - {cell.row.original.classes.map((cls) => cls.name).join(", ") || "—"} + cls.name).join(", ") || undefined}>{cell.row.original.classes.map((cls) => cls.name).join(", ") || "—"} ), }, { diff --git a/src/pages/teachers-roster-page.tsx b/src/pages/teachers-roster-page.tsx index 5efbeb5..dca2ae0 100644 --- a/src/pages/teachers-roster-page.tsx +++ b/src/pages/teachers-roster-page.tsx @@ -99,7 +99,8 @@ function TeachersRosterContent() { size: 130, accessorFn: (row) => row.homeroom.join(", "), header: t("roster.homeroomOf"), - cell: (cell) => {cell.row.original.homeroom.join(", ") || "—"}, + meta: { cellClass: "max-w-0" }, + cell: (cell) => {cell.row.original.homeroom.join(", ") || "—"}, }, { id: "actions", diff --git a/src/pages/terms-page.tsx b/src/pages/terms-page.tsx index f2e8f54..5e13dc2 100644 --- a/src/pages/terms-page.tsx +++ b/src/pages/terms-page.tsx @@ -129,7 +129,7 @@ function TermsContent() { { id: "actions", header: t("common.actions"), - meta: { headerClass: "w-28 min-w-28 text-center whitespace-nowrap" }, + meta: { headerClass: "w-[110px] min-w-[110px] max-w-[110px] h-[45px] text-center whitespace-nowrap", cellClass: "text-center" }, cell: (cell) => (