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:
@@ -15,6 +15,7 @@ import { useToast } from '@/components/ui/use-toast'
|
||||
import { normaliseSwish } from '@/lib/payments/swish'
|
||||
import { formatPlusgiroNumber } from '@/lib/bankgiro/luhn'
|
||||
import type { CompanySettings } from '@/types'
|
||||
import { getErrorMessage as getUserErrorMessage } from '@/lib/errors/get-error-message'
|
||||
|
||||
export function InvoicingSettingsContent() {
|
||||
const t = useTranslations('settings_invoicing')
|
||||
@@ -29,7 +30,7 @@ export function InvoicingSettingsContent() {
|
||||
if (bankErrors.length > 0) {
|
||||
toast({
|
||||
title: t('bank_validation_title'),
|
||||
description: bankErrors.map(e => e.message).join(', '),
|
||||
description: bankErrors.map(e => getUserErrorMessage(e)).join(', '),
|
||||
variant: 'destructive',
|
||||
})
|
||||
return {}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useEffect, useState } from 'react'
|
||||
import { useTranslations } from 'next-intl'
|
||||
import { useSearchParams, useRouter } from 'next/navigation'
|
||||
import { TaxSettingsForm } from '@/components/settings/TaxSettingsForm'
|
||||
import { TaxAssessmentNoticesPanel } from '@/components/settings/TaxAssessmentNoticesPanel'
|
||||
import { SettingsFormWrapper } from '@/components/settings/SettingsFormWrapper'
|
||||
import { SettingsLoadError } from '@/components/settings/SettingsLoadError'
|
||||
import { SettingsLoadingSkeleton } from '@/components/settings/SettingsLoadingSkeleton'
|
||||
@@ -165,6 +166,8 @@ export function TaxSettingsContent() {
|
||||
rotRutSignalDetected={rotRutSignalDetected}
|
||||
/>
|
||||
</SettingsFormWrapper>
|
||||
|
||||
<TaxAssessmentNoticesPanel />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,16 +1,55 @@
|
||||
import type { ComponentType } from 'react'
|
||||
import { AccountSettingsContent } from './AccountSettingsContent'
|
||||
import { CompanySettingsContent } from './CompanySettingsContent'
|
||||
import { BookkeepingSettingsContent } from './BookkeepingSettingsContent'
|
||||
import { TaxSettingsContent } from './TaxSettingsContent'
|
||||
import { SalarySettingsContent } from './SalarySettingsContent'
|
||||
import { InvoicingSettingsContent } from './InvoicingSettingsContent'
|
||||
import { TemplatesSettingsContent } from './TemplatesSettingsContent'
|
||||
import { PaymentsSettingsContent } from './PaymentsSettingsContent'
|
||||
import { BankingSettingsContent } from './BankingSettingsContent'
|
||||
import { AssistantSettingsContent } from './AssistantSettingsContent'
|
||||
import { ApiSettingsContent } from './ApiSettingsContent'
|
||||
import { BillingSettingsContent } from './BillingSettingsContent'
|
||||
import dynamic from 'next/dynamic'
|
||||
import { SettingsLoadingSkeleton } from '../SettingsLoadingSkeleton'
|
||||
|
||||
const AccountSettingsContent = dynamic(() =>
|
||||
import('./AccountSettingsContent').then((module) => ({ default: module.AccountSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const CompanySettingsContent = dynamic(() =>
|
||||
import('./CompanySettingsContent').then((module) => ({ default: module.CompanySettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const BookkeepingSettingsContent = dynamic(() =>
|
||||
import('./BookkeepingSettingsContent').then((module) => ({ default: module.BookkeepingSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const TaxSettingsContent = dynamic(() =>
|
||||
import('./TaxSettingsContent').then((module) => ({ default: module.TaxSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const SalarySettingsContent = dynamic(() =>
|
||||
import('./SalarySettingsContent').then((module) => ({ default: module.SalarySettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const InvoicingSettingsContent = dynamic(() =>
|
||||
import('./InvoicingSettingsContent').then((module) => ({ default: module.InvoicingSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const TemplatesSettingsContent = dynamic(() =>
|
||||
import('./TemplatesSettingsContent').then((module) => ({ default: module.TemplatesSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const PaymentsSettingsContent = dynamic(() =>
|
||||
import('./PaymentsSettingsContent').then((module) => ({ default: module.PaymentsSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const BankingSettingsContent = dynamic(() =>
|
||||
import('./BankingSettingsContent').then((module) => ({ default: module.BankingSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const AssistantSettingsContent = dynamic(() =>
|
||||
import('./AssistantSettingsContent').then((module) => ({ default: module.AssistantSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const ApiSettingsContent = dynamic(() =>
|
||||
import('./ApiSettingsContent').then((module) => ({ default: module.ApiSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
const BillingSettingsContent = dynamic(() =>
|
||||
import('./BillingSettingsContent').then((module) => ({ default: module.BillingSettingsContent })),
|
||||
{ loading: SettingsLoadingSkeleton },
|
||||
)
|
||||
|
||||
/**
|
||||
* Single source of truth mapping a settings section id to the component that
|
||||
|
||||
Reference in New Issue
Block a user