chore: germantax customer project

This commit is contained in:
e2e
2026-07-11 09:07:34 +02:00
commit 6f248700d7
145 changed files with 9830 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
import { z } from 'zod'
import { annualBudgetApproval } from './annual-budget-approval.js'
import { mdAppointment } from './md-appointment.js'
import { annualFinancialsApproval } from './annual-financials-approval.js'
import { profitDistribution } from './profit-distribution.js'
import { mdDismissal } from './md-dismissal.js'
import { capitalIncrease } from './capital-increase.js'
import { shareTransferApproval } from './share-transfer-approval.js'
export interface ResolutionTemplate {
key: string
titleDe: string
titleEn: string
descriptionDe: string
schema: z.ZodTypeAny
fields: TemplateField[]
render: (ctx: TemplateRenderContext) => string
}
export interface TemplateField {
key: string
labelDe: string
labelEn: string
type: 'text' | 'textarea' | 'number' | 'date' | 'currency'
required?: boolean
}
export interface TemplateRenderContext {
values: Record<string, unknown>
company: { name: string; registryNo?: string | null; address?: string | null }
members: Array<{ displayName: string; role: string; shares: number | null }>
createdBy: { displayName: string; email: string }
date: string
}
const registry: Record<string, ResolutionTemplate> = {
[annualBudgetApproval.key]: annualBudgetApproval,
[annualFinancialsApproval.key]: annualFinancialsApproval,
[profitDistribution.key]: profitDistribution,
[mdAppointment.key]: mdAppointment,
[mdDismissal.key]: mdDismissal,
[capitalIncrease.key]: capitalIncrease,
[shareTransferApproval.key]: shareTransferApproval,
}
export const listTemplates = (): ResolutionTemplate[] => Object.values(registry)
export const getTemplate = (key: string): ResolutionTemplate | undefined =>
registry[key]