feat(drafts): remove localStorage draft banner/hook; add Koncept status + filter (drafts are DB rows)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,7 @@ export interface StatusMeta {
|
||||
* stored value rendering consistently (warning, matching the expired row wash).
|
||||
*/
|
||||
export const OFFER_STATUS: Record<string, StatusMeta> = {
|
||||
draft: { label: "Koncept", color: "default" },
|
||||
active: { label: "Aktivní", color: "info" },
|
||||
ordered: { label: "Objednaná", color: "success" },
|
||||
invalidated: { label: "Zneplatněná", color: "error" },
|
||||
@@ -62,6 +63,7 @@ export const ISSUED_ORDER_STATUS: Record<string, StatusMeta> = {
|
||||
* = warning, NOT info) — this fixes the list↔detail color drift.
|
||||
*/
|
||||
export const INVOICE_STATUS: Record<string, StatusMeta> = {
|
||||
draft: { label: "Koncept", color: "default" },
|
||||
issued: { label: "Vystavena", color: "warning" },
|
||||
overdue: { label: "Po splatnosti", color: "error" },
|
||||
paid: { label: "Zaplacena", color: "success" },
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Single source of truth for the localStorage keys used by the document-draft
|
||||
* autosave feature. Both the form (write side) and the list/banner (read side)
|
||||
* MUST import the key from here — duplicating the string literal in two files
|
||||
* means changing one silently breaks the other (the banner stops matching).
|
||||
*/
|
||||
export const DRAFT_KEYS = {
|
||||
offer: "boha_offer_draft",
|
||||
invoice: "boha_invoice_draft",
|
||||
} as const;
|
||||
|
||||
export type DraftKey = (typeof DRAFT_KEYS)[keyof typeof DRAFT_KEYS];
|
||||
Reference in New Issue
Block a user