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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user