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:
@@ -740,22 +740,20 @@ 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) => {
|
setCustomerFilter(value ? Number(value) : "");
|
||||||
setCustomerFilter(value ? Number(value) : "");
|
setPage(1);
|
||||||
setPage(1);
|
}}
|
||||||
}}
|
options={[
|
||||||
options={[
|
{ value: "", label: "Všichni zákazníci" },
|
||||||
{ value: "", label: "Všichni" },
|
...(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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user