diff --git a/resources/js/admin/i18n/locales/de/management.json b/resources/js/admin/i18n/locales/de/management.json index 58aac7c..a464cc7 100644 --- a/resources/js/admin/i18n/locales/de/management.json +++ b/resources/js/admin/i18n/locales/de/management.json @@ -584,6 +584,7 @@ "imported": "Fotoaufgabenpaket importiert", "saveTask": "Fotoaufgabe speichern", "add": "Hinzufügen", + "assignedTitle": "Aufgabenliste", "emptyHint": "Lege jetzt Fotoaufgaben an oder importiere ein Paket.", "emptyTitle": "Noch keine Fotoaufgaben", "emptyBody": "Lege Fotoaufgaben an oder importiere ein Paket für dein Event.", diff --git a/resources/js/admin/i18n/locales/en/management.json b/resources/js/admin/i18n/locales/en/management.json index 17febff..87a3cfa 100644 --- a/resources/js/admin/i18n/locales/en/management.json +++ b/resources/js/admin/i18n/locales/en/management.json @@ -580,6 +580,7 @@ "imported": "Photo task pack imported", "saveTask": "Save photo task", "add": "Add", + "assignedTitle": "Task list", "emptyHint": "Add photo tasks or import a pack.", "emptyTitle": "No photo tasks yet", "emptyBody": "Create photo tasks or import a pack for your event.", diff --git a/resources/js/admin/mobile/EventTasksPage.tsx b/resources/js/admin/mobile/EventTasksPage.tsx index 5726d13..ad984c7 100644 --- a/resources/js/admin/mobile/EventTasksPage.tsx +++ b/resources/js/admin/mobile/EventTasksPage.tsx @@ -701,10 +701,15 @@ export default function MobileEventTasksPage() { ) : ( - - - {t('events.tasks.count', '{{count}} photo tasks', { count: filteredTasks.length })} - + + + + {t('events.tasks.assignedTitle', 'Task list')} + + + {t('events.tasks.count', '{{count}} photo tasks', { count: filteredTasks.length })} + + {typeof remainingTasks === 'number' && typeof maxTasks === 'number' ? ( ) : null} - {!loading ? ( - - - - - - {t('events.tasks.toggle.title', 'Photo task mode')} - - - {tasksEnabled - ? t('events.tasks.toggle.active', 'ACTIVE') - : t('events.tasks.toggle.inactive', 'INACTIVE')} - - - - - setShowTaskDetails((prev) => !prev)} - aria-label={t( - 'events.tasks.toggle.description', - 'Control whether guests see mission cards and prompts.' - )} - > - - - - - - - {showTaskDetails ? ( - - - {t( - 'events.tasks.toggle.description', - 'Control whether guests see mission cards and prompts.' - )} - - - - {t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')} - - - - - - - {tasksEnabled - ? t('events.tasks.toggle.onLabel', 'Mission cards active') - : t('events.tasks.toggle.offLabel', 'Photo feed only')} - - - ) : null} - {isMember && !canManageTasks ? ( - - {t('events.tasks.toggle.permissionHint', 'You do not have permission to change photo tasks.')} - - ) : null} - - ) : null} - {loading ? ( {Array.from({ length: 4 }).map((_, idx) => ( @@ -1123,79 +1053,207 @@ export default function MobileEventTasksPage() { ))} ) : ( - setActiveTab(value as TaskSectionKey)}> - - {t('events.tasks.tabs.tasks', 'Tasks')} - {t('events.tasks.tabs.library', 'Task Library')} - {t('events.tasks.tabs.emotions', 'Emotions')} - {t('events.tasks.tabs.collections', 'Collections')} - - - - - - + + + + + + + + {t('events.tasks.toggle.title', 'Photo task mode')} + + - - setSearchTerm(e.target.value)} - placeholder={t('events.tasks.search', 'Search photo tasks')} - compact - /> - - setShowEmotionFilterSheet(true)}> + + {tasksEnabled + ? t('events.tasks.toggle.active', 'ACTIVE') + : t('events.tasks.toggle.inactive', 'INACTIVE')} + + setShowTaskDetails((prev) => !prev)} + aria-label={t( + 'events.tasks.toggle.description', + 'Control whether guests see mission cards and prompts.' + )} + > - - {t('events.tasks.emotionFilterShort', 'Emotion')} - - - {emotionFilter - ? emotions.find((e) => String(e.id) === emotionFilter)?.name ?? t('events.tasks.customEmotion', 'Custom emotion') - : t('events.tasks.allEmotions', 'All')} - - + - + + + + {t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')} + + + + + + + {tasksEnabled + ? t('events.tasks.toggle.onLabel', 'Mission cards active') + : t('events.tasks.toggle.offLabel', 'Photo feed only')} + + {showTaskDetails ? ( + + {t('events.tasks.toggle.description', 'Control whether guests see mission cards and prompts.')} + + ) : null} + {isMember && !canManageTasks ? ( + + {t('events.tasks.toggle.permissionHint', 'You do not have permission to change photo tasks.')} + + ) : null} - {taskPanel} - - + - - {libraryPanel} - + setActiveTab(value as TaskSectionKey)} + flexDirection="column" + alignItems="stretch" + width="100%" + > + + {[ + { value: 'assigned', label: t('events.tasks.tabs.tasks', 'Tasks') }, + { value: 'library', label: t('events.tasks.tabs.library', 'Task Library') }, + { value: 'emotions', label: t('events.tasks.tabs.emotions', 'Emotions') }, + { value: 'collections', label: t('events.tasks.tabs.collections', 'Collections') }, + ].map((tab, index, arr) => { + const isActive = activeTab === tab.value; + return ( + + + {tab.label} + + + ); + })} + - - {emotionsPanel} - + + + + + + + + setSearchTerm(e.target.value)} + placeholder={t('events.tasks.search', 'Search photo tasks')} + compact + /> + + setShowEmotionFilterSheet(true)}> + + + {t('events.tasks.emotionFilterShort', 'Emotion')} + + + {emotionFilter + ? emotions.find((e) => String(e.id) === emotionFilter)?.name ?? t('events.tasks.customEmotion', 'Custom emotion') + : t('events.tasks.allEmotions', 'All')} + + + + + + + + {taskPanel} + + + - - {collectionsPanel} - - + + + {libraryPanel} + + + + + + {emotionsPanel} + + + + + + {collectionsPanel} + + + + + )}