// Venue language and time zone (plan step 2.6f, D-11, D-12): venue.language is the // language of staff without their own choice and of printed tickets/reports; venue.timezone // is the zone every time is shown in (applies at once); venue.theme is the staff apps' accent // colour (plan step 4.6: the waiter's phones; 6R.20: "The venue's identity" = its first colour, for // the phones and every screen of the terminal). All reload bootstrap after saving. import { useId, useMemo } from 'react' import { useAccess } from '@xenia/access' import { LANGUAGE_NAMES, useTranslation, useFormat } from '@xenia/i18n' import { Select, Spinner } from '@xenia/ui' import { SettingRow, SettingsCard } from './SettingsCard' import { useSettings } from './useSettings' import { useIdentity } from '../../../shell/useIdentity' import { timeZones } from './timeZones' const VENUE_THEMES = ['amber', 'teal', 'blue', 'violet', 'rose', 'identity'] // packages/ui tokens.css data-venue-theme; identity: venueAccent.js export default function VenueSettings() { const { t } = useTranslation('manager') const f = useFormat() const { languages } = useAccess() const s = useSettings() const { data: identity } = useIdentity() const langId = useId() const tzId = useId() const themeId = useId() const tz = s.get('venue.timezone', 'Europe/Athens') const zones = useMemo(() => timeZones(tz), [tz]) if (s.loading) return