From decadd895ebab6aabf61c7709057fc5de9f4bb65 Mon Sep 17 00:00:00 2001 From: BOHA Date: Sun, 7 Jun 2026 21:44:22 +0200 Subject: [PATCH] fix(ui): stack detail-page header action buttons one-per-row on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Detail-page headers put their action buttons in a flex row with flexWrap:"wrap", so on a phone the 2-4 buttons (Potvrzení / Zahájit realizaci / Smazat, etc.) wrapped into a ragged grid. New shared `headerActionsSx` (ui/PageHeader): on xs it's a full-width column (each button its own full-width row); from sm up it's the usual right-aligned wrapping row — desktop unchanged. A StatusChip kept in the same group stays its natural size (alignSelf) instead of stretching. Applied to PageHeader's own actions slot and every detail-page header action group: Order/Offer/Invoice (both views)/Project + the Warehouse Receipt/Issue/Item/Inventory detail headers. Verified in Chrome at 430px on OrderDetail: the group is flexDirection column with all three buttons at the same x, full-width, stacked. tsc -b --noEmit, npm run build, vitest 152/152 clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/admin/pages/InvoiceDetail.tsx | 19 ++--------- src/admin/pages/OfferDetail.tsx | 10 ++---- src/admin/pages/OrderDetail.tsx | 10 ++---- src/admin/pages/ProjectDetail.tsx | 10 ++---- src/admin/pages/WarehouseInventoryDetail.tsx | 3 +- src/admin/pages/WarehouseIssueDetail.tsx | 3 +- src/admin/pages/WarehouseItemDetail.tsx | 5 +-- src/admin/pages/WarehouseReceiptDetail.tsx | 3 +- src/admin/ui/PageHeader.tsx | 35 ++++++++++++-------- src/admin/ui/index.ts | 2 +- 10 files changed, 41 insertions(+), 59 deletions(-) diff --git a/src/admin/pages/InvoiceDetail.tsx b/src/admin/pages/InvoiceDetail.tsx index ccebc2c..bd6e6f9 100644 --- a/src/admin/pages/InvoiceDetail.tsx +++ b/src/admin/pages/InvoiceDetail.tsx @@ -64,6 +64,7 @@ import { LoadingState, PageEnter, RichTextView, + headerActionsSx, } from "../ui"; const API_BASE = "/api/admin"; @@ -1114,14 +1115,7 @@ export default function InvoiceDetail() { /> - + {hasPermission("invoices.export") && ( diff --git a/src/admin/pages/WarehouseInventoryDetail.tsx b/src/admin/pages/WarehouseInventoryDetail.tsx index 0dd506b..b5b2631 100644 --- a/src/admin/pages/WarehouseInventoryDetail.tsx +++ b/src/admin/pages/WarehouseInventoryDetail.tsx @@ -24,6 +24,7 @@ import { PageHeader, PageEnter, ConfirmDialog, + headerActionsSx, type DataColumn, } from "../ui"; @@ -192,7 +193,7 @@ export default function WarehouseInventoryDetail() { +