Implement leveling rewards feature with UI and backend support

- Added functionality to manage role rewards based on user levels in the leveling system.
- Updated the LevelingForm component to include fields for defining rewards, including validation for unique levels.
- Enhanced backend logic to handle reward data storage and retrieval, ensuring proper integration with the existing leveling configuration.
- Introduced localization keys for rewards in both English and German, improving user experience.
- Updated dashboard search index to include rewards settings for easier access.
This commit is contained in:
smueller
2026-07-23 12:41:13 +02:00
parent 3af989a83b
commit fba597a6f2
9 changed files with 480 additions and 183 deletions

View File

@@ -273,7 +273,7 @@ export async function applyLevelRewards(
}
}
} else {
const reward = rewards.find((entry) => entry.level === newLevel);
const reward = [...rewards].reverse().find((entry) => entry.level <= newLevel);
const removable = rewards
.map((entry) => entry.roleId)
.filter((roleId) => member.roles.cache.has(roleId) && rewardRoleIds.has(roleId));