💄 expand actions column width across reports & data tables to prevent truncation of İŞLEMLER header
Browse files at this commitd99bbb5bfe60d2798f208a5dcbceab0ec3df41d2Parent: 048fc0c- fix
- 💄 expand actions column width across reports & data tables to prevent truncation of İŞLEMLER header
7 changed files +10 -15
- src/components/ui/data-table.tsx +1 -1
- src/components/users/user-table.tsx +3 -8
- src/pages/staff-work-page.tsx +2 -2
- src/pages/student-attendance-page.tsx +1 -1
- src/pages/student-marks-page.tsx +1 -1
- src/pages/student-pomodoro-page.tsx +1 -1
- src/pages/terms-page.tsx +1 -1
src/components/ui/data-table.tsxmodified+1 -1
| @@ -110,7 +110,7 @@ export function DataTable<TData, TValue = unknown>(props: DataTableProps<TData, | ||
| 110 | 110 | }, |
| 111 | 111 | }); |
| 112 | 112 | const hiddenLocked = (columnId: string) => columnId === "actions" || columnId === "update"; |
| 113 | - const actionColumnClass = (columnId: string) => hiddenLocked(columnId) ? "w-20 min-w-20 max-w-20 px-1 text-center" : undefined; | |
| 113 | + const actionColumnClass = (columnId: string) => hiddenLocked(columnId) ? "w-28 min-w-[7rem] px-2 text-center whitespace-nowrap" : undefined; | |
| 114 | 114 | const hideableColumns = () => table.getAllColumns().filter((column) => column.getCanHide() && !hiddenLocked(column.id)); |
| 115 | 115 | const columnLabel = (column: Column<TData, unknown>) => { |
| 116 | 116 | const header = column.columnDef.header; |
src/components/users/user-table.tsxmodified+3 -8
| @@ -8,7 +8,7 @@ import { Badge } from "@/components/ui/badge"; | ||
| 8 | 8 | import { ConfirmDialog } from "@/components/ui/confirm-dialog"; |
| 9 | 9 | import { DataTable } from "@/components/ui/data-table"; |
| 10 | 10 | import { TableRowActions } from "@/components/ui/table-row-actions"; |
| 11 | -import { IconCheck, IconEye, IconUsers } from "@/components/ui/icons"; | |
| 11 | +import { IconCheck, IconUsers } from "@/components/ui/icons"; | |
| 12 | 12 | import { ROLES } from "@/lib/roles"; |
| 13 | 13 | import { cn } from "@/lib/cn"; |
| 14 | 14 | import { useT } from "@/stores/preferences-context"; |
| @@ -128,13 +128,8 @@ export function UserTable(props: { | ||
| 128 | 128 | }, |
| 129 | 129 | { |
| 130 | 130 | id: "actions", |
| 131 | - header: () => ( | |
| 132 | - <span class="flex items-center justify-center" title={t("common.actions")}> | |
| 133 | - <IconEye class="h-4 w-4 text-muted-foreground" /> | |
| 134 | - <span class="sr-only">{t("common.actions")}</span> | |
| 135 | - </span> | |
| 136 | - ), | |
| 137 | - meta: { headerClass: "w-14 text-center", cellClass: "w-14" }, | |
| 131 | + header: t("common.actions"), | |
| 132 | + meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap", cellClass: "w-28 text-center" }, | |
| 138 | 133 | cell: (cell) => ( |
| 139 | 134 | <Show when={cell.row.original.role === "parent"} fallback={<span class="text-center text-muted-foreground/40">—</span>}> |
| 140 | 135 | <TableRowActions |
src/pages/staff-work-page.tsxmodified+2 -2
| @@ -134,7 +134,7 @@ function StaffWorkContent() { | ||
| 134 | 134 | { |
| 135 | 135 | id: "actions", |
| 136 | 136 | header: t("common.actions"), |
| 137 | - meta: { headerClass: "w-14 text-center" }, | |
| 137 | + meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, | |
| 138 | 138 | cell: (cell) => ( |
| 139 | 139 | <TableRowActions |
| 140 | 140 | label={t("common.actions")} |
| @@ -179,7 +179,7 @@ function StaffWorkContent() { | ||
| 179 | 179 | { |
| 180 | 180 | id: "actions", |
| 181 | 181 | header: t("common.actions"), |
| 182 | - meta: { headerClass: "w-14 text-center" }, | |
| 182 | + meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, | |
| 183 | 183 | cell: (cell) => ( |
| 184 | 184 | <TableRowActions |
| 185 | 185 | label={t("common.actions")} |
src/pages/student-attendance-page.tsxmodified+1 -1
| @@ -85,7 +85,7 @@ function StudentAttendanceContent() { | ||
| 85 | 85 | { |
| 86 | 86 | id: "actions", |
| 87 | 87 | header: t("common.actions"), |
| 88 | - meta: { headerClass: "w-14 text-center" }, | |
| 88 | + meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, | |
| 89 | 89 | cell: (cell) => ( |
| 90 | 90 | <TableRowActions |
| 91 | 91 | label={t("common.actions")} |
src/pages/student-marks-page.tsxmodified+1 -1
| @@ -85,7 +85,7 @@ function StudentMarksContent() { | ||
| 85 | 85 | { |
| 86 | 86 | id: "actions", |
| 87 | 87 | header: t("common.actions"), |
| 88 | - meta: { headerClass: "w-14 text-center" }, | |
| 88 | + meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, | |
| 89 | 89 | cell: (cell) => ( |
| 90 | 90 | <TableRowActions |
| 91 | 91 | label={t("common.actions")} |
src/pages/student-pomodoro-page.tsxmodified+1 -1
| @@ -86,7 +86,7 @@ function StudentPomodoroContent() { | ||
| 86 | 86 | { |
| 87 | 87 | id: "actions", |
| 88 | 88 | header: t("common.actions"), |
| 89 | - meta: { headerClass: "w-14 text-center" }, | |
| 89 | + meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, | |
| 90 | 90 | cell: (cell) => ( |
| 91 | 91 | <TableRowActions |
| 92 | 92 | label={t("common.actions")} |
src/pages/terms-page.tsxmodified+1 -1
| @@ -85,7 +85,7 @@ function TermsContent() { | ||
| 85 | 85 | { |
| 86 | 86 | id: "actions", |
| 87 | 87 | header: t("common.actions"), |
| 88 | - meta: { headerClass: "w-14 text-center" }, | |
| 88 | + meta: { headerClass: "w-28 min-w-[7rem] text-center whitespace-nowrap" }, | |
| 89 | 89 | cell: (cell) => ( |
| 90 | 90 | <TableRowActions |
| 91 | 91 | label={t("common.actions")} |