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 sx={{ flex: "0 1 240px" }}>
|
||||
<Field label="Zákazník">
|
||||
<Select
|
||||
value={customerFilter === "" ? "" : String(customerFilter)}
|
||||
onChange={(value) => {
|
||||
setCustomerFilter(value ? Number(value) : "");
|
||||
setPage(1);
|
||||
}}
|
||||
options={[
|
||||
{ value: "", label: "Všichni" },
|
||||
...(customers ?? []).map((c) => ({
|
||||
value: String(c.id),
|
||||
label: c.name,
|
||||
})),
|
||||
]}
|
||||
/>
|
||||
</Field>
|
||||
<Select
|
||||
value={customerFilter === "" ? "" : String(customerFilter)}
|
||||
onChange={(value) => {
|
||||
setCustomerFilter(value ? Number(value) : "");
|
||||
setPage(1);
|
||||
}}
|
||||
options={[
|
||||
{ value: "", label: "Všichni zákazníci" },
|
||||
...(customers ?? []).map((c) => ({
|
||||
value: String(c.id),
|
||||
label: c.name,
|
||||
})),
|
||||
]}
|
||||
/>
|
||||
</Box>
|
||||
</FilterBar>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user