feat(drafts): two-button create (Vytvořit / Uložit koncept) + draft finalize UX across offers/invoices/issued-orders
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,15 @@ export const RECEIVED_INVOICE_STATUS: Record<string, StatusMeta> = {
|
||||
paid: { label: "Uhrazena", color: "success" },
|
||||
};
|
||||
|
||||
/**
|
||||
* Display label for a document's official number. Drafts (deferred numbering)
|
||||
* have a NULL/empty number until they are finalized — show "Koncept" instead
|
||||
* of an empty/`null` heading.
|
||||
*/
|
||||
export function documentNumberLabel(num: string | null | undefined): string {
|
||||
return num && String(num).trim() ? String(num) : "Koncept";
|
||||
}
|
||||
|
||||
/** Label with a safe fallback for an unknown/empty key. */
|
||||
export const statusLabel = (
|
||||
m: Record<string, StatusMeta>,
|
||||
|
||||
Reference in New Issue
Block a user