feat(hunt): add public flag to hunts and implement hunt creation page

- Add 'public' boolean column to Hunt model with default true
- Update hunt admin UI to toggle 'public' flag
- Implement new hunt creation page with form supporting all hunt properties
- Add sidebar navigation item for hunt creation for authorized users
- Adjust home API to filter hunts by public flag only
This commit is contained in:
2026-07-30 23:33:34 +02:00
parent aa4632cab8
commit 77becc453e
11 changed files with 320 additions and 16 deletions
+29 -7
View File
@@ -36,11 +36,11 @@
},
"enums": {
"text_type": {
"CHAR": "One character",
"INTEGER": "Whole number",
"NUMBER": "Number",
"TEXT": "Free text",
"WORD": "One word",
"CHAR": "One character"
"WORD": "One word"
},
"user_role": {
"ADMIN": "Admin",
@@ -80,6 +80,28 @@
"refresh": "Refresh",
"update_btn": "Update"
},
"create_hunt": {
"allow_join": "Allow joining",
"create_btn": "Create Hunt",
"de": "German",
"description_de": "Description (German)",
"description_en": "Description (English)",
"en": "English",
"end": "End",
"has_end": "Has end date?",
"has_start": "Has start date?",
"name_de": "Name (German)",
"name_en": "Name (English)",
"not_allowed": "You need the Creator or Admin role to create hunts.",
"public": "Public (visible on home page)",
"reveal_answers": "Reveal answers",
"reveal_quests": "Reveal quests",
"sidebar": "Create Hunt",
"start": "Start",
"success": "Hunt created successfully!",
"title": "Create a new Hunt",
"virtual": "Virtual hunt"
},
"diashow": {
"head": "Diashow"
},
@@ -129,11 +151,11 @@
"title": "Imprint"
},
"pictures": {
"head": "Picture wall",
"select_team": "Select a team",
"filter_quest": "Filter pictures by quests",
"filter_team": "Filter pictures by teams",
"head": "Picture wall",
"select_quest": "Select a quest",
"filter_quest": "Filter pictures by quests"
"select_team": "Select a team"
},
"profile": {
"admins_and_creators": "Admins & Creators",
@@ -144,8 +166,8 @@
"promote": "Promote",
"promote_user": "Promote a user",
"role": "Role",
"role_changed": "Role updated!",
"role_change_error": "Could not change role!",
"role_changed": "Role updated!",
"role_confirm": "Do you want to change the role of {name} to {role}?",
"search_user": "Search user by email...",
"uploaded_pictures": "Uploaded pictures",
@@ -273,4 +295,4 @@
"uploadFile": "Upload file",
"voteRating": "vote rating {value} of {max}"
}
}
}