fix(offers): align customer filter with the search field

The customer Select was wrapped in <Field label> while the search was bare, so in the flex-end FilterBar the Field's label + mb:2 pushed the select ~16px above the search input. Drop the Field wrapper (matching the bare list-page filter pattern used on AuditLog/Warehouse/Orders) and make the default option self-describing ("Všichni zákazníci"). Both controls now sit on the same line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-07 11:34:19 +02:00
parent f9bb655f6a
commit f1c533488a

View File

@@ -740,7 +740,6 @@ export default function Offers() {
/> />
</Box> </Box>
<Box sx={{ flex: "0 1 240px" }}> <Box sx={{ flex: "0 1 240px" }}>
<Field label="Zákazník">
<Select <Select
value={customerFilter === "" ? "" : String(customerFilter)} value={customerFilter === "" ? "" : String(customerFilter)}
onChange={(value) => { onChange={(value) => {
@@ -748,14 +747,13 @@ export default function Offers() {
setPage(1); setPage(1);
}} }}
options={[ options={[
{ value: "", label: "Všichni" }, { value: "", label: "Všichni zákazníci" },
...(customers ?? []).map((c) => ({ ...(customers ?? []).map((c) => ({
value: String(c.id), value: String(c.id),
label: c.name, label: c.name,
})), })),
]} ]}
/> />
</Field>
</Box> </Box>
</FilterBar> </FilterBar>