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:
Mattsson
2026-07-21 23:00:15 +02:00
committed by GitHub
parent 702512437a
commit e11f70b347
467 changed files with 17569 additions and 2221 deletions
+44 -2
View File
@@ -197,6 +197,14 @@ export interface InvoiceEmailTexts {
en?: InvoiceEmailTextOverrides
}
export type InvoiceFontFamily =
| 'Helvetica'
| 'Times-Roman'
| 'Courier'
| 'Source Sans 3'
| 'Source Serif 4'
| 'Custom'
// Company Settings
export interface CompanySettings {
id: string
@@ -336,7 +344,9 @@ export interface CompanySettings {
// render identically to the pre-branding template.
invoice_primary_color: string // hex #RRGGBB, default '#1a1a1a'
invoice_accent_color: string // hex #RRGGBB, default '#666666'
invoice_font_family: 'Helvetica' | 'Times-Roman' | 'Courier'
invoice_font_family: InvoiceFontFamily
invoice_custom_font_path: string | null
invoice_custom_font_name: string | null
invoice_header_text: string | null
invoice_footer_text: string | null
@@ -360,6 +370,9 @@ export interface CompanySettings {
// Onboarding
onboarding_step: number
onboarding_complete: boolean
initial_setup_path?: InitialSetupPath | null
initial_setup_completed_at?: string | null
initial_setup_dismissed_at?: string | null
// Sector
sector_slug: string | null
@@ -1981,6 +1994,8 @@ export interface CreateFiscalPeriodInput {
export type PendingOperationType =
| 'categorize_transaction'
| 'create_customer'
| 'update_customer'
| 'update_company_settings'
| 'create_article'
| 'update_article'
// Kontoplan reference data (gnubok_create_account / gnubok_update_account)
@@ -2136,6 +2151,14 @@ export interface OnboardingProgress {
hasSkatteverketConnected: boolean
}
export type InitialSetupPath = 'migration' | 'bank' | 'fresh'
export interface InitialSetupState {
path: InitialSetupPath | null
completedAt: string | null
dismissedAt: string | null
}
// Onboarding step data
export interface OnboardingStepData {
step1?: {
@@ -2209,6 +2232,23 @@ export type TaxDeadlineType =
| 'intrastat_monthly'
| 'punktskatt_monthly'
| 'fyllnadsinbetalning'
| 'kvarskatt'
export type TaxAssessmentDecisionType = 'final' | 'reassessment'
export interface TaxAssessmentNotice {
id: string
company_id: string
user_id: string | null
fiscal_period_id: string
decision_type: TaxAssessmentDecisionType
decision_date: string
payment_due_date: string
archived_at: string | null
created_at: string
updated_at: string
fiscal_period?: Pick<FiscalPeriod, 'id' | 'name' | 'period_start' | 'period_end'>
}
// Deadline status workflow
export type DeadlineStatus =
@@ -2256,6 +2296,7 @@ export interface Deadline {
dismissed_at: string | null
linked_report_type: string | null
linked_report_period: Record<string, unknown> | null
tax_assessment_notice_id: string | null
// Relations
customer?: Customer
@@ -2394,7 +2435,8 @@ export const TAX_DEADLINE_TYPE_LABELS: Record<TaxDeadlineType, string> = {
ioss_monthly: 'IOSS-deklaration',
intrastat_monthly: 'Intrastat',
punktskatt_monthly: 'Punktskattedeklaration',
fyllnadsinbetalning: 'Fyllnadsinbetalning'
fyllnadsinbetalning: 'Fyllnadsinbetalning',
kvarskatt: 'Kvarskatt'
}
// ============================================================