[TASK] Refactor AdminPanel JavaScript