feat(manager): notification bell, sign-in/venue/print settings, log download (platform-v2 2.6f)
- Bell in the header: /api/platform/notifications with unread count, live via
the new LiveProvider (one createLiveClient connection) on platform_notification
and reconnect; mark read / all; warning+critical pop a toast.
- Settings: Sign-in card (manager/waiter/device modes, require username, one
session per manager/waiter, username autofill) replaces the dead v1
security.login_method card; new "Venue & language" tab (language, time zone);
print alert threshold in Printing. Tab labels are i18n keys.
- Technical > Log files: list + download of the daily logs (owner-level).
Backend: GET /api/system/logs, /api/system/logs/{date} (core.settings.manage),
error system.log_not_found.
- Setup wizard asks staff language and time zone (setup/init stores them).
- @xenia/ui theme helpers (applyTheme, getStoredTheme); the manager stays light
until phase 6 converts the older pages (owner decision 2026-11-14).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from '@xenia/i18n'
|
||||
import VenueSettings from './sections/VenueSettings'
|
||||
import AppInfoTab from './tabs/AppInfoTab'
|
||||
import ColoursTab from './tabs/ColoursTab'
|
||||
import OperationTab from './tabs/OperationTab'
|
||||
@@ -8,24 +10,19 @@ import DevelopmentTab from './tabs/DevelopmentTab'
|
||||
import FiscalTab from './tabs/FiscalTab'
|
||||
import { TabGroup } from '../../ui/Tabs'
|
||||
|
||||
const TABS = [
|
||||
{ id: 'app-info', label: 'Γενικά' },
|
||||
{ id: 'security', label: 'Ασφάλεια' },
|
||||
{ id: 'operation', label: 'Λειτουργία' },
|
||||
{ id: 'colours', label: 'Εμφάνιση' },
|
||||
{ id: 'print-fonts', label: 'Εκτύπωση' },
|
||||
{ id: 'fiscal', label: 'Ταμειακή' },
|
||||
{ id: 'development', label: 'Developer' },
|
||||
]
|
||||
const TABS = ['app-info', 'venue', 'security', 'operation', 'colours', 'print-fonts', 'fiscal', 'development']
|
||||
|
||||
export default function SettingsPage() {
|
||||
const { t } = useTranslation('manager')
|
||||
const [activeTab, setActiveTab] = useState('app-info')
|
||||
const tabs = TABS.map(id => ({ id, label: t(`settings.tabs.${id}`) }))
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-full min-h-0">
|
||||
<TabGroup tabs={TABS} active={activeTab} onChange={setActiveTab} />
|
||||
<TabGroup tabs={tabs} active={activeTab} onChange={setActiveTab} />
|
||||
<div className="flex-1 overflow-y-auto p-6">
|
||||
{activeTab === 'app-info' && <AppInfoTab />}
|
||||
{activeTab === 'venue' && <div className="max-w-3xl"><VenueSettings /></div>}
|
||||
{activeTab === 'security' && <SecurityTab />}
|
||||
{activeTab === 'operation' && <OperationTab />}
|
||||
{activeTab === 'colours' && <ColoursTab />}
|
||||
|
||||
Reference in New Issue
Block a user