Bug/gh issues fiz (#1103)
* refactor: optimize page loading and data fetching * fix: resolve recurring production runtime errors * feat: add MCP company and customer updates * fix: handle year-end tax adjustments * feat: harden annual report compliance * fix: expand invoice logo and font support * fix: sanitize API route error responses * fix: sanitize user-facing error messages * feat: persist onboarding and tax assessment notices * fix: reduce cloud backup audit churn * feat: refine invoice editor layout * fix: show saved tax adjustments in INK2 * fix: complete annual report API mappings * docs: record operational safeguards and decisions * fix: harden annual report review findings * fix: adjust column span for description based on VAT registration * New css class name
This commit is contained in:
+47
-1
@@ -262,8 +262,52 @@ export const TaxDeadlineTypeSchema = z.enum([
|
||||
'arsredovisning',
|
||||
'arsstamma',
|
||||
'periodisk_sammanstallning',
|
||||
'kvarskatt',
|
||||
])
|
||||
|
||||
export const TaxAssessmentDecisionTypeSchema = z.enum(['final', 'reassessment'])
|
||||
|
||||
export const CreateTaxAssessmentNoticeSchema = z
|
||||
.object({
|
||||
fiscal_period_id: uuid,
|
||||
decision_type: TaxAssessmentDecisionTypeSchema,
|
||||
decision_date: saneIsoDate,
|
||||
payment_due_date: saneIsoDate,
|
||||
})
|
||||
.refine((data) => data.payment_due_date >= data.decision_date, {
|
||||
message: 'Förfallodagen får inte vara tidigare än beslutsdagen',
|
||||
path: ['payment_due_date'],
|
||||
})
|
||||
|
||||
export const UpdateTaxAssessmentNoticeSchema = z
|
||||
.object({
|
||||
fiscal_period_id: uuid.optional(),
|
||||
decision_type: TaxAssessmentDecisionTypeSchema.optional(),
|
||||
decision_date: saneIsoDate.optional(),
|
||||
payment_due_date: saneIsoDate.optional(),
|
||||
archived: z.boolean().optional(),
|
||||
})
|
||||
.refine((data) => Object.values(data).some((value) => value !== undefined), {
|
||||
message: 'Minst ett fält måste anges',
|
||||
})
|
||||
.refine(
|
||||
(data) => !data.decision_date || !data.payment_due_date || data.payment_due_date >= data.decision_date,
|
||||
{
|
||||
message: 'Förfallodagen får inte vara tidigare än beslutsdagen',
|
||||
path: ['payment_due_date'],
|
||||
},
|
||||
)
|
||||
|
||||
export const UpdateInitialSetupStateSchema = z
|
||||
.object({
|
||||
path: z.enum(['migration', 'bank', 'fresh']).nullable().optional(),
|
||||
completed: z.boolean().optional(),
|
||||
dismissed: z.boolean().optional(),
|
||||
})
|
||||
.refine((data) => Object.values(data).some((value) => value !== undefined), {
|
||||
message: 'Minst ett fält måste anges',
|
||||
})
|
||||
|
||||
export const DeadlineSourceSchema = z.enum(['system', 'user'])
|
||||
|
||||
export const MomsPeriodSchema = z.enum(['monthly', 'quarterly', 'yearly'])
|
||||
@@ -1574,7 +1618,9 @@ export const UpdateSettingsSchema = z.object({
|
||||
.string()
|
||||
.regex(/^#[0-9A-Fa-f]{6}$/, 'Ange en giltig hex-färg (#RRGGBB)')
|
||||
.optional(),
|
||||
invoice_font_family: z.enum(['Helvetica', 'Times-Roman', 'Courier']).optional(),
|
||||
invoice_font_family: z
|
||||
.enum(['Helvetica', 'Times-Roman', 'Courier', 'Source Sans 3', 'Source Serif 4', 'Custom'])
|
||||
.optional(),
|
||||
invoice_header_text: z.string().max(200).nullable().optional(),
|
||||
invoice_footer_text: z.string().max(500).nullable().optional(),
|
||||
// Automation
|
||||
|
||||
Reference in New Issue
Block a user