diff --git a/client/src/components/Admin/DefaultUserSettingsTab.tsx b/client/src/components/Admin/DefaultUserSettingsTab.tsx index 5baa85fa..d984991b 100644 --- a/client/src/components/Admin/DefaultUserSettingsTab.tsx +++ b/client/src/components/Admin/DefaultUserSettingsTab.tsx @@ -6,6 +6,7 @@ import { useToast } from '../shared/Toast' import Section from '../Settings/Section' import CustomSelect from '../shared/CustomSelect' import { MapView } from '../Map/MapView' +import { CURRENCIES, SYMBOLS } from '../Budget/BudgetPanel.constants' import type { Place } from '../../types' const MAP_PRESETS = [ @@ -20,6 +21,7 @@ type Defaults = { temperature_unit?: string dark_mode?: string | boolean time_format?: string + default_currency?: string blur_booking_codes?: boolean map_tile_url?: string map_provider?: string @@ -226,6 +228,23 @@ export default function DefaultUserSettingsTab(): React.ReactElement { ))} + {/* Default Currency */} +
+ + { if (value) save({ default_currency: value }) }} + placeholder={t('settings.currency')} + searchable + options={CURRENCIES.map(c => ({ value: c, label: SYMBOLS[c] ? `${c} ${SYMBOLS[c]}` : c }))} + size="sm" + style={{ maxWidth: 240 }} + /> +

{t('settings.currencyHint')}

+
+ {/* Blur Booking Codes */} {t('settings.blurBookingCodes')} }> {([ diff --git a/server/src/services/settingsService.ts b/server/src/services/settingsService.ts index 138d7025..905180ed 100644 --- a/server/src/services/settingsService.ts +++ b/server/src/services/settingsService.ts @@ -10,6 +10,9 @@ export const DEFAULTABLE_USER_SETTING_KEYS = [ 'temperature_unit', 'dark_mode', 'time_format', + // Instance-wide default currency for Costs (new users inherit it until they + // pick their own). Free-form ISO code, validated on the client. + 'default_currency', 'blur_booking_codes', 'map_tile_url', // Instance-wide Mapbox defaults: an admin can set a shared token + style so the