fix(ui): cross-module mechanical unifications (line-item labels/align, back-tab targets, status-button colors, apply_vat checkbox, currency-from-settings, read-only issued_by, Celkem header, centered offer tabs)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-09 16:49:31 +02:00
parent e868ecf769
commit 9fe5113c5b
6 changed files with 69 additions and 62 deletions

View File

@@ -16,6 +16,7 @@ import {
orderNextNumberOptions,
} from "../lib/queries/orders";
import { offerCustomersOptions } from "../lib/queries/offers";
import { companySettingsOptions } from "../lib/queries/settings";
import { useApiMutation } from "../lib/queries/mutations";
import {
Card,
@@ -186,6 +187,12 @@ export default function OrdersReceived({
...orderNextNumberOptions(),
enabled: createOpen,
});
const companySettings = useQuery(companySettingsOptions()).data;
// Configurable currency list from company settings (falls back to the
// built-in list when settings are empty) — matches Offers/Invoices.
const currencyOptions = (
companySettings?.available_currencies || ["CZK", "EUR", "USD", "GBP"]
).map((c) => ({ value: c, label: c }));
const closeCreate = () => {
setCreateOpen(false);
@@ -556,12 +563,7 @@ export default function OrdersReceived({
onChange={(value) =>
setCreateForm({ ...createForm, currency: value })
}
options={[
{ value: "CZK", label: "CZK" },
{ value: "EUR", label: "EUR" },
{ value: "USD", label: "USD" },
{ value: "GBP", label: "GBP" },
]}
options={currencyOptions}
/>
</Field>
</Box>