From f8d0b9e6e8c84113dba622b1a6c02a845d0d3714 Mon Sep 17 00:00:00 2001 From: Katja Lutz Date: Wed, 14 Sep 2022 20:15:20 +0200 Subject: [PATCH] feat: implement letter print type --- src/components/Settings/Overlay.tsx | 2 ++ src/routes/index.tsx | 12 ++++++++++++ src/stores.ts | 3 +++ 3 files changed, 17 insertions(+) diff --git a/src/components/Settings/Overlay.tsx b/src/components/Settings/Overlay.tsx index dc783a1..1a7704d 100644 --- a/src/components/Settings/Overlay.tsx +++ b/src/components/Settings/Overlay.tsx @@ -44,6 +44,7 @@ import { printTypeTitles, PRINT_TYPE_CONFIRMATION, PRINT_TYPE_INVOICE, + PRINT_TYPE_LETTER, PRINT_TYPE_OFFER, StoreContext, storeSchema, @@ -987,6 +988,7 @@ const SettingsOverlay: Component = () => { + + + + + {pageTitle()} + + + + + + diff --git a/src/stores.ts b/src/stores.ts index 2800819..0677989 100644 --- a/src/stores.ts +++ b/src/stores.ts @@ -25,16 +25,19 @@ export const positionSchema = z.object({ export type Position = Infer; +export const PRINT_TYPE_LETTER = "LETTER"; export const PRINT_TYPE_OFFER = "OFFER"; export const PRINT_TYPE_CONFIRMATION = "CONFIRMATION"; export const PRINT_TYPE_INVOICE = "INVOICE"; export type PrintType = + | typeof PRINT_TYPE_LETTER | typeof PRINT_TYPE_OFFER | typeof PRINT_TYPE_CONFIRMATION | typeof PRINT_TYPE_INVOICE; export const printTypeTitles = { + [PRINT_TYPE_LETTER]: "Brief", [PRINT_TYPE_OFFER]: "Offerte", [PRINT_TYPE_CONFIRMATION]: "Auftragsbestätigung", [PRINT_TYPE_INVOICE]: "Rechnung",