From 0089a1420405b49147d5836acd7950ea5019607b Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Fri, 23 Jan 2026 10:55:24 +0100 Subject: [PATCH] Replace KPI/tenant wording in admin UI and help --- docs/help/de/admin/event-branding-assets.md | 2 +- docs/help/de/admin/event-prep-checklist.md | 2 +- docs/help/de/admin/event-settings.md | 2 +- docs/help/de/admin/event-tasks-setup.md | 2 +- docs/help/de/admin/event-team-invites.md | 2 +- docs/help/de/admin/guest-access-qr.md | 2 +- docs/help/de/admin/index.md | 24 +-- .../de/admin/tenant-dashboard-overview.md | 6 +- .../help/en/admin/billing-packages-exports.md | 2 +- docs/help/en/admin/event-branding-assets.md | 2 +- docs/help/en/admin/event-prep-checklist.md | 2 +- docs/help/en/admin/event-settings.md | 2 +- docs/help/en/admin/event-tasks-setup.md | 2 +- docs/help/en/admin/event-team-invites.md | 2 +- docs/help/en/admin/guest-access-qr.md | 2 +- docs/help/en/admin/index.md | 24 +-- .../en/admin/tenant-dashboard-overview.md | 6 +- .../js/admin/i18n/locales/de/management.json | 24 +-- .../js/admin/i18n/locales/en/management.json | 28 ++-- resources/js/admin/mobile/BrandingPage.tsx | 2 +- resources/js/admin/mobile/DataExportsPage.tsx | 8 +- resources/js/admin/mobile/SettingsPage.tsx | 2 +- .../mobile/__tests__/DataExportsPage.test.tsx | 119 ++++++++++++++ .../mobile/__tests__/SettingsPage.test.tsx | 152 ++++++++++++++++++ 24 files changed, 346 insertions(+), 75 deletions(-) create mode 100644 resources/js/admin/mobile/__tests__/DataExportsPage.test.tsx create mode 100644 resources/js/admin/mobile/__tests__/SettingsPage.test.tsx diff --git a/docs/help/de/admin/event-branding-assets.md b/docs/help/de/admin/event-branding-assets.md index 4094aae..ce69b3d 100644 --- a/docs/help/de/admin/event-branding-assets.md +++ b/docs/help/de/admin/event-branding-assets.md @@ -32,4 +32,4 @@ related: - Begrüßungstext kurz halten (1–2 Sätze). ### Weitere Hilfe -`event-prep-checklist` für die Vorbereitung oder `tenant-dashboard-overview` für den Status. +Event-Vorbereitung: Checkliste für die Vorbereitung oder Event-Dashboard im Überblick für den Status. diff --git a/docs/help/de/admin/event-prep-checklist.md b/docs/help/de/admin/event-prep-checklist.md index d38cd7a..af8827d 100644 --- a/docs/help/de/admin/event-prep-checklist.md +++ b/docs/help/de/admin/event-prep-checklist.md @@ -42,4 +42,4 @@ related: - Mit einem Testgast den Ablauf einmal komplett durchspielen. ### Weitere Hilfe -`control-room-moderation` für die Queue oder `tenant-dashboard-overview` für Status-Checks. +Control Room für die Queue oder Event-Dashboard im Überblick für Status-Checks. diff --git a/docs/help/de/admin/event-settings.md b/docs/help/de/admin/event-settings.md index 1531b33..7b55987 100644 --- a/docs/help/de/admin/event-settings.md +++ b/docs/help/de/admin/event-settings.md @@ -32,4 +32,4 @@ related: - Bei Moderationsbedarf Auto‑Freigabe deaktivieren. ### Weitere Hilfe -`event-prep-checklist` für den Ablauf oder `guest-access-qr` für die Freigabe. +Event-Vorbereitung: Checkliste für den Ablauf oder Gästezugang & QR für die Freigabe. diff --git a/docs/help/de/admin/event-tasks-setup.md b/docs/help/de/admin/event-tasks-setup.md index e64032a..fff87b1 100644 --- a/docs/help/de/admin/event-tasks-setup.md +++ b/docs/help/de/admin/event-tasks-setup.md @@ -35,4 +35,4 @@ Hier stellst du die Aufgaben zusammen, die Gäste im Event sehen und erfüllen s - 12–20 Aufgaben reichen meist aus. ### Weitere Hilfe -`event-prep-checklist` für die Vorbereitung oder `tenant-dashboard-overview` für den Status. +Event-Vorbereitung: Checkliste für die Vorbereitung oder Event-Dashboard im Überblick für den Status. diff --git a/docs/help/de/admin/event-team-invites.md b/docs/help/de/admin/event-team-invites.md index e43ad28..313b4de 100644 --- a/docs/help/de/admin/event-team-invites.md +++ b/docs/help/de/admin/event-team-invites.md @@ -33,4 +33,4 @@ related: - Mitgliederrollen für temporäre Helfer nutzen. ### Weitere Hilfe -`event-settings` für Berechtigungen oder `tenant-dashboard-overview` für den Überblick. +Event-Einstellungen für Berechtigungen oder Event-Dashboard im Überblick für den Gesamtüberblick. diff --git a/docs/help/de/admin/guest-access-qr.md b/docs/help/de/admin/guest-access-qr.md index 019f374..81d848b 100644 --- a/docs/help/de/admin/guest-access-qr.md +++ b/docs/help/de/admin/guest-access-qr.md @@ -28,4 +28,4 @@ related: - Link in gedruckte Einladungen integrieren. ### Weitere Hilfe -`event-prep-checklist` für den kompletten Ablauf. +Event-Vorbereitung: Checkliste für den kompletten Ablauf. diff --git a/docs/help/de/admin/index.md b/docs/help/de/admin/index.md index 878ac00..d3c7929 100644 --- a/docs/help/de/admin/index.md +++ b/docs/help/de/admin/index.md @@ -14,18 +14,18 @@ related: [] Dieses Portal sammelt alles, was Event-Admins für Vorbereitung, Kern-Workflows und Abschluss brauchen. -| Bereich | Kernfrage | Artikel-Slug | +| Bereich | Kernfrage | Artikel | | --- | --- | --- | -| Dashboard | Wo sehe ich Status, KPIs und Schnellaktionen? | `tenant-dashboard-overview` | -| Event-Einstellungen | Wo bearbeite ich Event-Basics und Status? | `event-settings` | -| Branding | Wie lade ich Logos hoch und setze Farben? | `event-branding-assets` | -| Aufgaben & Sammlungen | Wie verwalte ich Aufgaben und Prompts? | `event-tasks-setup` | -| Gästezugang | Wie teile ich Join-Link oder QR? | `guest-access-qr` | -| Team & Einladungen | Wie lade ich Helfer ein und vergebe Rollen? | `event-team-invites` | -| Control Room | Wie moderiere ich Uploads und steuere die Queue? | `control-room-moderation` | -| Live Show | Wie richte ich den Live-Show-Player ein? | `live-show-setup` | -| Abrechnung & Exporte | Wo verwalte ich Pakete und Exporte? | `billing-packages-exports` | -| Abschluss & Compliance | Was erledige ich nach dem Event? | `post-event-wrapup` | -| FAQ | Was sind die häufigsten Fragen? | `faq-admin` | +| Dashboard | Wo sehe ich Status, Kennzahlen und Schnellaktionen? | Event-Dashboard im Überblick | +| Event-Einstellungen | Wo bearbeite ich Event-Basics und Status? | Event-Einstellungen | +| Branding | Wie lade ich Logos hoch und setze Farben? | Branding & Assets | +| Aufgaben & Sammlungen | Wie verwalte ich Aufgaben und Prompts? | Event-Aufgaben & Sammlungen | +| Gästezugang | Wie teile ich Join-Link oder QR? | Gästezugang & QR | +| Team & Einladungen | Wie lade ich Helfer ein und vergebe Rollen? | Event-Team & Einladungen | +| Control Room | Wie moderiere ich Uploads und steuere die Queue? | Control Room: Moderation & Queue | +| Live Show | Wie richte ich den Live-Show-Player ein? | Live Show einrichten | +| Abrechnung & Exporte | Wo verwalte ich Pakete und Exporte? | Pakete, Abrechnung & Exporte | +| Abschluss & Compliance | Was erledige ich nach dem Event? | Nachbereitung & Abschluss | +| FAQ | Was sind die häufigsten Fragen? | FAQ: Event-Admin | Nutze das Help Center in der App für mobilfreundliches Lesen oder öffne `/help/admin` am Desktop. diff --git a/docs/help/de/admin/tenant-dashboard-overview.md b/docs/help/de/admin/tenant-dashboard-overview.md index 63651b7..afbaa6a 100644 --- a/docs/help/de/admin/tenant-dashboard-overview.md +++ b/docs/help/de/admin/tenant-dashboard-overview.md @@ -3,7 +3,7 @@ title: "Event-Dashboard im Überblick" locale: de slug: tenant-dashboard-overview audience: admin -summary: "Status, KPIs und Setup-Checkliste deines Events auf einen Blick." +summary: "Status, Kennzahlen und Setup-Checkliste deines Events auf einen Blick." version_introduced: 2025.4 requires_app_version: "^3.2.0" status: draft @@ -21,14 +21,14 @@ Direkt nach dem Anlegen eines Events oder als schneller Gesundheitscheck vor dem ## Was das Dashboard zeigt - **Event-Status** (Entwurf / Veröffentlicht), damit klar ist, was Gäste sehen. -- **KPIs** zu Gästen, Uploads und Engagement für einen schnellen Puls-Check. +- **Kennzahlen** zu Gästen, Uploads und Engagement für einen schnellen Puls-Check. - **Setup-Checkliste** mit den wichtigsten Restschritten bis zum Start. - **Schnellaktionen** zu Aufgaben, Live Show, Branding und QR-Tools. ## So nutzt du es 1. **Status prüfen** und das Event bis zur Freigabe im Entwurf lassen. 2. **Checkliste abarbeiten** – sie bildet den typischen Vorbereitungsweg ab. -3. **KPIs beobachten**, um Einladungen und Uploads zu verifizieren. +3. **Kennzahlen beobachten**, um Einladungen und Uploads zu verifizieren. 4. **Details öffnen** (Aufgaben, QR, Live Show) über die Schnellaktionen. ### Tipps diff --git a/docs/help/en/admin/billing-packages-exports.md b/docs/help/en/admin/billing-packages-exports.md index d627b36..c91c2c9 100644 --- a/docs/help/en/admin/billing-packages-exports.md +++ b/docs/help/en/admin/billing-packages-exports.md @@ -24,7 +24,7 @@ related: - Use the package shop for upgrades when needed. ## Data exports -- Request a tenant‑wide or event‑specific export. +- Request an account‑wide or event‑specific export. - Large exports can take a few minutes; refresh the list to see progress. ## Retention reminders diff --git a/docs/help/en/admin/event-branding-assets.md b/docs/help/en/admin/event-branding-assets.md index 54f70e7..1a61197 100644 --- a/docs/help/en/admin/event-branding-assets.md +++ b/docs/help/en/admin/event-branding-assets.md @@ -32,4 +32,4 @@ related: - Keep welcome text short (1–2 sentences). ### Need more help? -See `event-prep-checklist` for the full prep flow or `tenant-dashboard-overview` for the status view. +See the Event Preparation Checklist for the full prep flow or the Event Dashboard overview for the status view. diff --git a/docs/help/en/admin/event-prep-checklist.md b/docs/help/en/admin/event-prep-checklist.md index 9e7824c..56c0cda 100644 --- a/docs/help/en/admin/event-prep-checklist.md +++ b/docs/help/en/admin/event-prep-checklist.md @@ -42,4 +42,4 @@ related: - Use a test guest to verify the full flow end-to-end. ### Need more help? -Open `control-room-moderation` for queue handling or revisit `tenant-dashboard-overview` for status checks. +Open the Control Room article for queue handling or revisit the Event Dashboard overview for status checks. diff --git a/docs/help/en/admin/event-settings.md b/docs/help/en/admin/event-settings.md index c35c05f..877b873 100644 --- a/docs/help/en/admin/event-settings.md +++ b/docs/help/en/admin/event-settings.md @@ -32,4 +32,4 @@ related: - If moderation is needed, disable auto‑approval. ### Need more help? -See `event-prep-checklist` for the full flow or `guest-access-qr` for sharing. +See the Event Preparation Checklist for the full flow or Guest Access & QR for sharing. diff --git a/docs/help/en/admin/event-tasks-setup.md b/docs/help/en/admin/event-tasks-setup.md index aa93eef..8887b73 100644 --- a/docs/help/en/admin/event-tasks-setup.md +++ b/docs/help/en/admin/event-tasks-setup.md @@ -35,4 +35,4 @@ Use this page to shape the guest experience: tasks guide what guests should capt - Aim for 12–20 tasks per event to avoid overwhelming guests. ### Need more help? -Open `event-prep-checklist` for the full prep flow or `tenant-dashboard-overview` for the status view. +Open the Event Preparation Checklist for the full prep flow or the Event Dashboard overview for status. diff --git a/docs/help/en/admin/event-team-invites.md b/docs/help/en/admin/event-team-invites.md index 2749f27..03096f1 100644 --- a/docs/help/en/admin/event-team-invites.md +++ b/docs/help/en/admin/event-team-invites.md @@ -33,4 +33,4 @@ related: - Use member roles for temporary helpers. ### Need more help? -See `event-settings` for permissions or `tenant-dashboard-overview` for the full event overview. +See Event Settings for permissions or the Event Dashboard overview for the full event view. diff --git a/docs/help/en/admin/guest-access-qr.md b/docs/help/en/admin/guest-access-qr.md index d036a60..8b98597 100644 --- a/docs/help/en/admin/guest-access-qr.md +++ b/docs/help/en/admin/guest-access-qr.md @@ -28,4 +28,4 @@ Open the QR page from the event dashboard. You can copy the join link or downloa - Add the link to printed invitations if the event is pre‑announced. ### Need more help? -See `event-prep-checklist` for the full prep flow. +See the Event Preparation Checklist for the full prep flow. diff --git a/docs/help/en/admin/index.md b/docs/help/en/admin/index.md index c46bdf3..fb4507d 100644 --- a/docs/help/en/admin/index.md +++ b/docs/help/en/admin/index.md @@ -14,18 +14,18 @@ related: [] This portal collects everything event admins need to configure events, run key workflows, and close out events smoothly. -| Section | Key Questions | Article Slug | +| Section | Key Questions | Article | | --- | --- | --- | -| Dashboard | Where do I see status, KPIs, and quick actions? | `tenant-dashboard-overview` | -| Event Settings | Where do I edit the event basics and publish status? | `event-settings` | -| Branding | How do I upload logos and set colors? | `event-branding-assets` | -| Tasks & Collections | How do I manage guest tasks and prompts? | `event-tasks-setup` | -| Guest Access | How do I share the join link or QR? | `guest-access-qr` | -| Team & Invites | How do I invite staff and assign roles? | `event-team-invites` | -| Control Room | How do I moderate uploads and manage the queue? | `control-room-moderation` | -| Live Show | How do I configure the Live Show player? | `live-show-setup` | -| Billing & Exports | Where do I manage packages and data exports? | `billing-packages-exports` | -| Wrap-up & Compliance | What should I do after the event ends? | `post-event-wrapup` | -| FAQ | What are the most common questions? | `faq-admin` | +| Dashboard | Where do I see status, key numbers, and quick actions? | Event Dashboard Overview | +| Event Settings | Where do I edit the event basics and publish status? | Event Settings | +| Branding | How do I upload logos and set colors? | Branding & Assets | +| Tasks & Collections | How do I manage guest tasks and prompts? | Event Tasks & Collections | +| Guest Access | How do I share the join link or QR? | Guest Access & QR | +| Team & Invites | How do I invite staff and assign roles? | Event Team & Invites | +| Control Room | How do I moderate uploads and manage the queue? | Control Room: Moderation & Queue | +| Live Show | How do I configure the Live Show player? | Set up & run Live Show | +| Billing & Exports | Where do I manage packages and data exports? | Packages, Billing & Exports | +| Wrap-up & Compliance | What should I do after the event ends? | Post-Event Wrap-up | +| FAQ | What are the most common questions? | FAQ: Event Admin | Use the in-app help center for mobile-friendly reading, or open `/help/admin` on desktop for the full layout. diff --git a/docs/help/en/admin/tenant-dashboard-overview.md b/docs/help/en/admin/tenant-dashboard-overview.md index 7156c29..9e9a4f1 100644 --- a/docs/help/en/admin/tenant-dashboard-overview.md +++ b/docs/help/en/admin/tenant-dashboard-overview.md @@ -3,7 +3,7 @@ title: "Event Dashboard Overview" locale: en slug: tenant-dashboard-overview audience: admin -summary: "Understand event status, KPIs, and the setup checklist at a glance." +summary: "Understand event status, key numbers, and the setup checklist at a glance." version_introduced: 2025.4 requires_app_version: "^3.2.0" status: draft @@ -21,14 +21,14 @@ Use this guide right after creating an event or whenever you need a quick health ## What the dashboard shows - **Event status** (Draft / Published) so you always know what guests can see. -- **KPIs** for guests, uploads, and engagement so you can spot momentum early. +- **Key numbers** for guests, uploads, and engagement so you can spot momentum early. - **Setup checklist** with the remaining steps before launch. - **Quick actions** that jump to tasks, Live Show, branding, and QR tools. ## How to use it 1. **Confirm the status** and keep the event in Draft until everything is ready. 2. **Work the checklist** from top to bottom; it mirrors the most common prep path. -3. **Check KPIs** to validate that invites and uploads are coming in. +3. **Check the numbers** to validate that invites and uploads are coming in. 4. **Jump into details** (tasks, QR, Live Show) using the quick actions. ### Tips diff --git a/resources/js/admin/i18n/locales/de/management.json b/resources/js/admin/i18n/locales/de/management.json index ce2a7aa..a01ebf8 100644 --- a/resources/js/admin/i18n/locales/de/management.json +++ b/resources/js/admin/i18n/locales/de/management.json @@ -155,7 +155,7 @@ }, "addOns": { "title": "Add-on-Verlauf", - "description": "Einmalige Add-ons, die für diesen Tenant gebucht wurden.", + "description": "Einmalige Add-ons, die für diesen Account gebucht wurden.", "empty": "Noch keine Add-ons gebucht.", "badge": "Add-ons", "table": { @@ -2031,7 +2031,7 @@ "sections": { "mode": "Standard vs. Event-spezifisch", "toggleTitle": "Branding-Quelle wählen", - "toggleDescription": "Nutze das Standard-Branding des Tenants oder überschreibe es nur für dieses Event.", + "toggleDescription": "Nutze das Standard-Branding des Accounts oder überschreibe es nur für dieses Event.", "palette": "Palette & Modus", "colorsTitle": "Farben & Light/Dark", "colorsDescription": "Primär-, Sekundär-, Hintergrund- und Surface-Farbe festlegen.", @@ -2047,7 +2047,7 @@ }, "useDefault": "Standard nutzen", "useCustom": "Event-spezifisch", - "toggleHint": "Standard übernimmt die Tenant-Farben, Event-spezifisch überschreibt sie.", + "toggleHint": "Standard übernimmt die Account-Farben, Event-spezifisch überschreibt sie.", "standard": "Standard", "custom": "Event", "toggleAria": "Event-spezifisches Branding aktivieren", @@ -2095,10 +2095,10 @@ "saved": "Branding gespeichert.", "saveError": "Branding konnte nicht gespeichert werden.", "footer": { - "default": "Standard-Farben des Tenants aktiv.", + "default": "Standard-Farben des Accounts aktiv.", "custom": "Event-spezifisches Branding aktiv." }, - "usingDefault": "Tenant-Branding aktiv", + "usingDefault": "Account-Branding aktiv", "usingCustom": "Event-Branding aktiv", "preview": { "demoTitle": "Demo-Event", @@ -2659,10 +2659,10 @@ "logoutTitle": "Ausloggen", "logoutHint": "Aus der App ausloggen" }, - "mobileSettings": { - "title": "Einstellungen", - "accountTitle": "Account", - "tenantBadge": "Tenant #{{id}}", + "mobileSettings": { + "title": "Einstellungen", + "accountTitle": "Account", + "tenantBadge": "Konto #{{id}}", "notificationsTitle": "Benachrichtigungen", "notificationsLoading": "Lade Einstellungen ...", "pushTitle": "App Push", @@ -2833,7 +2833,7 @@ "validation": "Füge Titel, Nachricht und ggf. einen Ziel-Gast hinzu." } }, - "dataExports": { + "dataExports": { "title": "Datenexporte", "request": { "title": "Exportanfrage", @@ -2848,12 +2848,12 @@ "includeMediaHint": "Größeres ZIP; nur bei Bedarf." }, "scopes": { - "tenant": "Mandantenexport", + "tenant": "Kontoexport", "event": "Event-Export" }, "history": { "title": "Letzte Exporte", - "hint": "Die letzten 10 Exporte für Mandant und Events.", + "hint": "Die letzten 10 Exporte für dein Konto und Events.", "empty": "Noch keine Exporte." }, "status": { diff --git a/resources/js/admin/i18n/locales/en/management.json b/resources/js/admin/i18n/locales/en/management.json index 2225a5e..0a0d370 100644 --- a/resources/js/admin/i18n/locales/en/management.json +++ b/resources/js/admin/i18n/locales/en/management.json @@ -155,7 +155,7 @@ }, "addOns": { "title": "Add-on history", - "description": "One-time add-ons purchased for this tenant.", + "description": "One-time add-ons purchased for this account.", "empty": "No add-ons purchased yet.", "badge": "Add-ons", "table": { @@ -2027,7 +2027,7 @@ "sections": { "mode": "Default vs. event-specific", "toggleTitle": "Choose branding source", - "toggleDescription": "Use tenant defaults or override only for this event.", + "toggleDescription": "Use account defaults or override only for this event.", "palette": "Palette & mode", "colorsTitle": "Colors & light/dark", "colorsDescription": "Set primary, secondary, background, and surface colors.", @@ -2043,7 +2043,7 @@ }, "useDefault": "Use default", "useCustom": "Event-specific", - "toggleHint": "Default uses tenant colors; event-specific overrides them.", + "toggleHint": "Default uses account colors; event-specific overrides them.", "standard": "Default", "custom": "Event", "toggleAria": "Toggle event-specific branding", @@ -2091,10 +2091,10 @@ "saved": "Branding saved.", "saveError": "Branding could not be saved.", "footer": { - "default": "Tenant default colors active.", + "default": "Account default colors active.", "custom": "Event-specific branding active." }, - "usingDefault": "Tenant branding active", + "usingDefault": "Account branding active", "usingCustom": "Event branding active", "preview": { "demoTitle": "Demo event", @@ -2664,7 +2664,7 @@ "mobileSettings": { "title": "Settings", "accountTitle": "Account", - "tenantBadge": "Tenant #{{id}}", + "tenantBadge": "Account #{{id}}", "notificationsTitle": "Notifications", "notificationsLoading": "Loading settings ...", "pushTitle": "App Push", @@ -2835,13 +2835,13 @@ "validation": "Add a title, message, and target guest when needed." } }, - "dataExports": { + "dataExports": { "title": "Data exports", - "request": { - "title": "Export request", - "hint": "Export tenant data or a specific event archive.", - "progress": "Export is running. This list refreshes automatically." - }, + "request": { + "title": "Export request", + "hint": "Export account data or a specific event archive.", + "progress": "Export is running. This list refreshes automatically." + }, "fields": { "scope": "Scope", "event": "Event", @@ -2850,12 +2850,12 @@ "includeMediaHint": "Bigger ZIP; choose when needed." }, "scopes": { - "tenant": "Tenant export", + "tenant": "Account export", "event": "Event export" }, "history": { "title": "Recent exports", - "hint": "Latest 10 exports for your tenant and events.", + "hint": "Latest 10 exports for your account and events.", "empty": "No exports yet." }, "status": { diff --git a/resources/js/admin/mobile/BrandingPage.tsx b/resources/js/admin/mobile/BrandingPage.tsx index 86eb188..a7791d3 100644 --- a/resources/js/admin/mobile/BrandingPage.tsx +++ b/resources/js/admin/mobile/BrandingPage.tsx @@ -685,7 +685,7 @@ export default function MobileBrandingPage() { {form.useDefaultBranding - ? t('events.branding.usingDefault', 'Tenant-Branding aktiv') + ? t('events.branding.usingDefault', 'Account-Branding aktiv') : t('events.branding.usingCustom', 'Event-Branding aktiv')} diff --git a/resources/js/admin/mobile/DataExportsPage.tsx b/resources/js/admin/mobile/DataExportsPage.tsx index ab01c1d..5cd45f0 100644 --- a/resources/js/admin/mobile/DataExportsPage.tsx +++ b/resources/js/admin/mobile/DataExportsPage.tsx @@ -197,7 +197,7 @@ export function DataExportsPanel({ {t('dataExports.request.title', 'Export request')} - {t('dataExports.request.hint', 'Export tenant data or a specific event archive.')} + {t('dataExports.request.hint', 'Export account data or a specific event archive.')} {!isRecap ? ( @@ -211,7 +211,7 @@ export function DataExportsPanel({ compact style={{ minWidth: 140, maxWidth: 180 }} > - + @@ -281,7 +281,7 @@ export function DataExportsPanel({ {t('dataExports.history.title', 'Recent exports')} - {t('dataExports.history.hint', 'Latest 10 exports for your tenant and events.')} + {t('dataExports.history.hint', 'Latest 10 exports for your account and events.')} {loading ? ( @@ -301,7 +301,7 @@ export function DataExportsPanel({ {entry.scope === 'event' ? t('dataExports.scopes.event', 'Event export') - : t('dataExports.scopes.tenant', 'Tenant export')} + : t('dataExports.scopes.tenant', 'Account export')} {entry.event ? ( diff --git a/resources/js/admin/mobile/SettingsPage.tsx b/resources/js/admin/mobile/SettingsPage.tsx index 91054bc..030f592 100644 --- a/resources/js/admin/mobile/SettingsPage.tsx +++ b/resources/js/admin/mobile/SettingsPage.tsx @@ -221,7 +221,7 @@ export default function MobileSettingsPage() { {user?.name ?? user?.email ?? t('settings.session.unknown', 'Benutzer')} {user?.tenant_id ? ( - {t('mobileSettings.tenantBadge', 'Tenant #{{id}}', { id: user.tenant_id })} + {t('mobileSettings.tenantBadge', 'Account #{{id}}', { id: user.tenant_id })} ) : null} navigate(ADMIN_PROFILE_ACCOUNT_PATH)} /> diff --git a/resources/js/admin/mobile/__tests__/DataExportsPage.test.tsx b/resources/js/admin/mobile/__tests__/DataExportsPage.test.tsx new file mode 100644 index 0000000..e5d2e31 --- /dev/null +++ b/resources/js/admin/mobile/__tests__/DataExportsPage.test.tsx @@ -0,0 +1,119 @@ +import React from 'react'; +import { describe, expect, it, vi } from 'vitest'; +import { render, screen } from '@testing-library/react'; + +const navigateMock = vi.fn(); + +const tMock = ( + _key: string, + fallback?: string | Record, + options?: Record, +) => { + let value = typeof fallback === 'string' ? fallback : _key; + if (options) { + Object.entries(options).forEach(([key, val]) => { + value = value.replaceAll(`{{${key}}}`, String(val)); + }); + } + return value; +}; + +vi.mock('react-router-dom', () => ({ + useNavigate: () => navigateMock, +})); + +vi.mock('react-i18next', () => ({ + useTranslation: () => ({ t: tMock }), + initReactI18next: { + type: '3rdParty', + init: () => undefined, + }, +})); + +vi.mock('../hooks/useBackNavigation', () => ({ + useBackNavigation: () => vi.fn(), +})); + +vi.mock('../theme', () => ({ + useAdminTheme: () => ({ + textStrong: '#111827', + text: '#111827', + muted: '#6b7280', + border: '#e5e7eb', + danger: '#b91c1c', + }), +})); + +vi.mock('../components/MobileShell', () => ({ + MobileShell: ({ children }: { children: React.ReactNode }) =>
{children}
, + HeaderActionButton: ({ children }: { children: React.ReactNode }) =>
{children}
, +})); + +vi.mock('../components/Primitives', () => ({ + MobileCard: ({ children }: { children: React.ReactNode }) =>
{children}
, + CTAButton: ({ label, onPress }: { label: string; onPress?: () => void }) => ( + + ), + PillBadge: ({ children }: { children: React.ReactNode }) => {children}, + SkeletonCard: () =>
Loading...
, +})); + +vi.mock('../components/FormControls', () => ({ + MobileSelect: ({ children, ...props }: { children: React.ReactNode }) => ( + + ), +})); + +vi.mock('@tamagui/stacks', () => ({ + YStack: ({ children }: { children: React.ReactNode }) =>
{children}
, + XStack: ({ children }: { children: React.ReactNode }) =>
{children}
, +})); + +vi.mock('@tamagui/text', () => ({ + SizableText: ({ children }: { children: React.ReactNode }) => {children}, +})); + +vi.mock('@tamagui/switch', () => ({ + Switch: Object.assign( + ({ children }: { children: React.ReactNode }) =>
{children}
, + { Thumb: () =>
}, + ), +})); + +vi.mock('@tamagui/react-native-web-lite', () => ({ + Pressable: ({ + children, + onPress, + ...rest + }: { + children: React.ReactNode; + onPress?: () => void; + [key: string]: unknown; + }) => ( + + ), + FlatList: ({ data = [], renderItem }: { data?: unknown[]; renderItem?: (info: any) => React.ReactNode }) => ( +
{renderItem ? data.map((item, index) => renderItem({ item, index })) : null}
+ ), +})); + +vi.mock('../../api', () => ({ + listTenantDataExports: vi.fn().mockResolvedValue([]), + getEvents: vi.fn().mockResolvedValue([]), + requestTenantDataExport: vi.fn(), + downloadTenantDataExport: vi.fn(), +})); + +import MobileDataExportsPage from '../DataExportsPage'; + +describe('MobileDataExportsPage', () => { + it('renders account scope label', async () => { + render(); + + expect(await screen.findByText('Account')).toBeInTheDocument(); + }); +}); diff --git a/resources/js/admin/mobile/__tests__/SettingsPage.test.tsx b/resources/js/admin/mobile/__tests__/SettingsPage.test.tsx new file mode 100644 index 0000000..709e426 --- /dev/null +++ b/resources/js/admin/mobile/__tests__/SettingsPage.test.tsx @@ -0,0 +1,152 @@ +import React from 'react'; +import { describe, expect, it, vi } from 'vitest'; +import { render, screen } from '@testing-library/react'; + +const navigateMock = vi.fn(); +const logoutMock = vi.fn(); + +const tMock = ( + _key: string, + fallback?: string | Record, + options?: Record, +) => { + let value = typeof fallback === 'string' ? fallback : _key; + if (options) { + Object.entries(options).forEach(([key, val]) => { + value = value.replaceAll(`{{${key}}}`, String(val)); + }); + } + return value; +}; + +vi.mock('react-router-dom', () => ({ + useNavigate: () => navigateMock, +})); + +vi.mock('react-i18next', () => ({ + useTranslation: () => ({ t: tMock }), + initReactI18next: { + type: '3rdParty', + init: () => undefined, + }, +})); + +vi.mock('../../auth/context', () => ({ + useAuth: () => ({ user: { name: 'Test User', tenant_id: 123 }, logout: logoutMock }), +})); + +vi.mock('../../api', () => ({ + getNotificationPreferences: vi.fn().mockResolvedValue({ defaults: {}, preferences: {} }), + updateNotificationPreferences: vi.fn(), +})); + +vi.mock('../components/MobileShell', () => ({ + MobileShell: ({ children }: { children: React.ReactNode }) =>
{children}
, +})); + +vi.mock('../components/Primitives', () => ({ + MobileCard: ({ children }: { children: React.ReactNode }) =>
{children}
, + CTAButton: ({ label, onPress }: { label: string; onPress?: () => void }) => ( + + ), + PillBadge: ({ children }: { children: React.ReactNode }) => {children}, +})); + +vi.mock('../components/MobileInstallBanner', () => ({ + MobileInstallBanner: () => null, +})); + +vi.mock('../hooks/useAdminPushSubscription', () => ({ + useAdminPushSubscription: () => ({ supported: false, permission: 'default', subscribed: false }), +})); + +vi.mock('../hooks/useDevicePermissions', () => ({ + useDevicePermissions: () => ({ + loading: false, + notifications: 'granted', + camera: 'granted', + storage: 'available', + requestPersistentStorage: vi.fn().mockResolvedValue(false), + refresh: vi.fn(), + }), +})); + +vi.mock('../hooks/useInstallPrompt', () => ({ + useInstallPrompt: () => ({ + isInstalled: false, + isStandalone: false, + canInstall: false, + isIos: false, + promptInstall: vi.fn(), + }), +})); + +vi.mock('../hooks/useBackNavigation', () => ({ + useBackNavigation: () => vi.fn(), +})); + +vi.mock('../hooks/useOnlineStatus', () => ({ + useOnlineStatus: () => true, +})); + +vi.mock('../lib/installBanner', () => ({ + getInstallBannerDismissed: () => false, + setInstallBannerDismissed: () => undefined, + shouldShowInstallBanner: () => false, +})); + +vi.mock('../lib/mobileTour', () => ({ + setTourSeen: () => undefined, +})); + +vi.mock('../theme', () => ({ + useAdminTheme: () => ({ + text: '#111827', + muted: '#6b7280', + border: '#e5e7eb', + danger: '#b91c1c', + }), +})); + +vi.mock('@tamagui/stacks', () => ({ + YStack: ({ children }: { children: React.ReactNode }) =>
{children}
, + XStack: ({ children }: { children: React.ReactNode }) =>
{children}
, +})); + +vi.mock('@tamagui/text', () => ({ + SizableText: ({ children }: { children: React.ReactNode }) => {children}, +})); + +vi.mock('@tamagui/group', () => ({ + YGroup: Object.assign(({ children }: { children: React.ReactNode }) =>
{children}
, { + Item: ({ children }: { children: React.ReactNode }) =>
{children}
, + }), +})); + +vi.mock('@tamagui/list-item', () => ({ + ListItem: ({ title, subTitle }: { title?: React.ReactNode; subTitle?: React.ReactNode }) => ( +
+ {title} + {subTitle} +
+ ), +})); + +vi.mock('@tamagui/switch', () => ({ + Switch: Object.assign( + ({ children }: { children: React.ReactNode }) =>
{children}
, + { Thumb: () =>
}, + ), +})); + +import MobileSettingsPage from '../SettingsPage'; + +describe('MobileSettingsPage', () => { + it('renders account badge for the current user', async () => { + render(); + + expect(await screen.findByText('Account #123')).toBeInTheDocument(); + }); +});