diff --git a/resources/js/admin/mobile/DashboardPage.tsx b/resources/js/admin/mobile/DashboardPage.tsx
index 2f2d86dc..a5e83675 100644
--- a/resources/js/admin/mobile/DashboardPage.tsx
+++ b/resources/js/admin/mobile/DashboardPage.tsx
@@ -20,6 +20,12 @@ import { buildLimitWarnings } from '../lib/limitWarnings';
import { withAlpha } from './components/colors';
import { useEventReadiness } from './hooks/useEventReadiness';
+// --- HELPERS ---
+
+function translateLimits(t: any) {
+ return (key: string, options?: any) => t(`management:limits.${key}`, key, options);
+}
+
// --- MODERN PRIMITIVES ---
function ModernCard({ children, style, ...rest }: any) {
@@ -194,7 +200,7 @@ export default function MobileDashboardPage() {
{/* 3. ALERTS */}
-
+
{/* 4. UNIFIED COMMAND GRID */}
k);
+ const limitWarnings = buildLimitWarnings(event?.limits ?? null, translateLimits(t));
if (!limitWarnings.length) return null;
return (
- {limitWarnings.map((w: any, idx: number) => (
+ {limitWarnings.map((w: any, idx: number) => {
+ const isDanger = w.tone === 'danger';
+ const bg = isDanger ? theme.dangerBg : theme.warningBg;
+ const border = isDanger ? theme.dangerText : theme.warningBorder;
+ const text = isDanger ? theme.dangerText : theme.warningText;
+ const Icon = isDanger ? AlertCircle : Bell;
+
+ return (
-
+
+
{w.message}
- ))}
+ );
+ })}
);
}
diff --git a/resources/js/admin/mobile/hooks/useEventReadiness.ts b/resources/js/admin/mobile/hooks/useEventReadiness.ts
index a245d9e6..86f340f1 100644
--- a/resources/js/admin/mobile/hooks/useEventReadiness.ts
+++ b/resources/js/admin/mobile/hooks/useEventReadiness.ts
@@ -45,16 +45,16 @@ export function useEventReadiness(event: TenantEvent | null, t: (key: string, fa
const steps: ReadinessStep[] = [
{
id: 'basics',
- label: t('management:events.form.date', 'Date & Location'),
+ label: t('management:events.form.date', 'Datum & Ort'),
isComplete: hasDate && hasLocation,
- ctaLabel: t('management:events.actions.edit', 'Set Date & Location'),
+ ctaLabel: t('management:events.actions.edit', 'Bearbeiten'),
targetPath: `/mobile/events/${event.slug}/edit`,
priority: 1
},
{
id: 'access',
- label: t('management:invites.badge', 'QR Codes'),
- ctaLabel: t('management:invites.actions.create', 'Get QR Code'),
+ label: t('management:invites.badge', 'QR-Codes'),
+ ctaLabel: t('management:invites.actions.create', 'QR-Code erstellen'),
isComplete: hasInvite,
targetPath: `/mobile/events/${event.slug}/qr`,
priority: 3
@@ -64,9 +64,9 @@ export function useEventReadiness(event: TenantEvent | null, t: (key: string, fa
if (tasksEnabled) {
steps.push({
id: 'tasks',
- label: t('management:tasks.badge', 'Photo Tasks'),
+ label: t('management:tasks.badge', 'Aufgaben'),
isComplete: hasTasks,
- ctaLabel: t('management:tasks.actions.assign', 'Add Photo Tasks'),
+ ctaLabel: t('management:tasks.actions.assign', 'Aufgaben hinzufügen'),
targetPath: `/mobile/events/${event.slug}/tasks`,
priority: 2
});
@@ -87,4 +87,4 @@ export function useEventReadiness(event: TenantEvent | null, t: (key: string, fa
nextStep,
isReady: !nextStep
};
-}
+}
\ No newline at end of file