feat: implement letter print type

master
Katja Lutz 2 years ago
parent decfdf838d
commit f8d0b9e6e8

@ -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 = () => {
<For
each={
[
PRINT_TYPE_LETTER,
PRINT_TYPE_OFFER,
PRINT_TYPE_CONFIRMATION,
PRINT_TYPE_INVOICE,

@ -32,6 +32,7 @@ import {
printTypeTitles,
PRINT_TYPE_CONFIRMATION,
PRINT_TYPE_INVOICE,
PRINT_TYPE_LETTER,
PRINT_TYPE_OFFER,
StoreContext,
UiStoreContext,
@ -328,6 +329,17 @@ export default function Home() {
}
}
`}</Style>
<Show when={uiState.printType === PRINT_TYPE_LETTER}>
<Page>
<InnerPadding>
<PageHeader />
<Title>{pageTitle()}</Title>
<Preface />
<Conclusion />
<LufraiWatermark />
</InnerPadding>
</Page>
</Show>
<Show when={uiState.printType === PRINT_TYPE_OFFER}>
<Page>
<InnerPadding>

@ -25,16 +25,19 @@ export const positionSchema = z.object({
export type Position = Infer<typeof positionSchema>;
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",

Loading…
Cancel
Save