+ {/* Weekly Challenge Component */}
+
+
+
+ {weeklyTitle}
+
+
+
+
+
+ {/* Daily Quests */}
+
+
+
+ {headerTitle}
+
+
+
+ {role === 'ADMIN' ? (
+ <>
+
+
+
+ >
+ ) : role === 'OWNER' ? (
+ <>
+
+
+
+ >
+ ) : (
+ <>
+
+
+
+ >
+ )}
+
-
@@ -137,12 +230,16 @@ const LiveMissionTracker = ({ stage, className = "" }) => {
);
};
-const CheckpointsSystem = ({ stages, className = "" }) => {
+const CheckpointsSystem = ({ stages, role, className = "" }) => {
+ let headerTitle = "Rewards & Checkpoints";
+ if (role === 'ADMIN') headerTitle = "Squad Milestone Tracking";
+ if (role === 'OWNER') headerTitle = "Program Milestones";
+
return (
-
Rewards & Checkpoints
+ {headerTitle}
@@ -226,12 +323,7 @@ const DetailedBadges = ({ badges, className = "" }) => {
};
const Leaderboard = ({ title = "Live Intel Feed", icon: Icon = Target, className = "" }) => {
- const leaders = [
- { rank: 1, name: "Felicity Fast", xp: 15600, delta: "+450", role: "Agent" },
- { rank: 2, name: "Frank Agent", xp: 12450, delta: "+310", role: "Agent" },
- { rank: 3, name: "Fiona Field", xp: 8200, delta: "+120", role: "Agent" },
- { rank: 4, name: "Felix Fixer", xp: 5400, delta: "+50", role: "Agent" },
- ];
+ const { leaderboard } = useGamification();
return (
@@ -241,28 +333,53 @@ const Leaderboard = ({ title = "Live Intel Feed", icon: Icon = Target, className
-
- {leaders.map((agent, i) => (
-
-
-
- 0{agent.rank}
-
-
- {agent.name}
- {agent.role}
-
-
-
-
XP
-
{agent.delta} Today
-
-
- ))}
+
+
+
+ {leaderboard.map((agent, i) => {
+ const isUser = agent.isUser;
+ const isTop3 = i < 3;
+ const rank = i + 1;
+
+ return (
+
+ {isUser && (
+
+ )}
+
+
+ 0{rank}
+
+
+ {agent.name}
+ {agent.role}
+
+
+
+
+ );
+ })}
+
+
);
@@ -371,6 +488,8 @@ const OwnerROIDashboard = ({ className = "" }) => {
// -----------------------------------------------------------------
const QuickLogAction = ({ className = "", gridClassName = "grid grid-cols-2 gap-3 flex-1" }) => {
+ const { logKnock, logLead, logInspection } = useGamification();
+
return (
@@ -378,15 +497,25 @@ const QuickLogAction = ({ className = "", gridClassName = "grid grid-cols-2 gap-
Quick Operations Log
-