fix(settings): use CountrySelect for business-profile country (no more FL)

The business-profile country field — the seed source for the customer-create
country default — was still a free-text input placeholdered "FL", which could
reintroduce the non-ISO "FL" code that migration 110 normalized to "LI" and
re-open the create/edit CH-vs-FL default mismatch. Swap it for the shared
CountrySelect so every surface stores ISO alpha-2. The free-text countryName
verbatim-PDF override (migration 107) is unchanged.
This commit is contained in:
Luca
2026-06-02 09:37:33 +02:00
parent 06b4522dec
commit c2d3f663bc
@@ -15,7 +15,7 @@ import {
type BankAccount, type BankAccount,
type QrFormat, type QrFormat,
} from '../../../services/businessProfile.service'; } from '../../../services/businessProfile.service';
import { Button, Card, Loading, Input } from '../../../components/common'; import { Button, Card, Loading, Input, CountrySelect } from '../../../components/common';
import { toast } from 'react-toastify'; import { toast } from 'react-toastify';
export const SettingsBusinessProfilePage: React.FC = () => { export const SettingsBusinessProfilePage: React.FC = () => {
@@ -82,11 +82,9 @@ export const SettingsBusinessProfilePage: React.FC = () => {
onChange={(e) => setProfile({ ...profile, city: e.target.value })} /> onChange={(e) => setProfile({ ...profile, city: e.target.value })} />
<Input label={t('businessProfile.field.state', 'State / Region') as string} value={profile.state} <Input label={t('businessProfile.field.state', 'State / Region') as string} value={profile.state}
onChange={(e) => setProfile({ ...profile, state: e.target.value })} /> onChange={(e) => setProfile({ ...profile, state: e.target.value })} />
<Input label={t('businessProfile.field.countryCode', 'Country abbreviation (FL, CH, DE …)') as string} <CountrySelect label={t('businessProfile.field.countryCode', 'Country') as string}
value={profile.countryCode} value={profile.countryCode || ''}
maxLength={2} onChange={(code) => setProfile({ ...profile, countryCode: code })} />
placeholder="FL"
onChange={(e) => setProfile({ ...profile, countryCode: e.target.value.toUpperCase() })} />
{/* Free-text country name override (migration 107). When {/* Free-text country name override (migration 107). When
left empty the renderer falls back to the COUNTRY_NAMES left empty the renderer falls back to the COUNTRY_NAMES
lookup on the abbreviation. */} lookup on the abbreviation. */}