Vat onboarding fixes (#39)
* fix: enhance validation for moms_period and conditionally set vat_number and moms_period based on vat_registered * Enhance preprocessing for first year fields, fiscal year end month, and accounting method in schema validation * fix: simplify schema validation by removing unnecessary preprocessors * fix: prevent setting invalid values in select components across multiple forms * fix: improve layout responsiveness and conditional rendering in onboarding steps
This commit is contained in:
@@ -176,7 +176,7 @@ export function DeadlineForm({
|
||||
<Label>Typ *</Label>
|
||||
<Select
|
||||
value={formData.deadline_type}
|
||||
onValueChange={(v) => updateField('deadline_type', v as DeadlineType)}
|
||||
onValueChange={(v) => { if (v) updateField('deadline_type', v as DeadlineType) }}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
@@ -194,7 +194,7 @@ export function DeadlineForm({
|
||||
<Label>Prioritet</Label>
|
||||
<Select
|
||||
value={formData.priority}
|
||||
onValueChange={(v) => updateField('priority', v as DeadlinePriority)}
|
||||
onValueChange={(v) => { if (v) updateField('priority', v as DeadlinePriority) }}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
@@ -216,7 +216,7 @@ export function DeadlineForm({
|
||||
<Label>Kund (valfritt)</Label>
|
||||
<Select
|
||||
value={formData.customer_id || 'none'}
|
||||
onValueChange={(v) => updateField('customer_id', v === 'none' ? '' : v)}
|
||||
onValueChange={(v) => { if (v) updateField('customer_id', v === 'none' ? '' : v) }}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Välj kund..." />
|
||||
|
||||
Reference in New Issue
Block a user