Skip to content

Commit 5bbbb26

Browse files
File changes
1 parent 90f1983 commit 5bbbb26

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/pages/AdvancedGamificationAnalytics.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,20 @@ export default function AdvancedGamificationAnalytics() {
7171
enabled: !!user
7272
});
7373

74+
const { data: gamificationRules = [], isLoading: rulesLoading } = useQuery({
75+
queryKey: ['gamification-rules-analytics'],
76+
queryFn: () => base44.entities.GamificationRule.list('-created_date', 500),
77+
enabled: !!user
78+
});
79+
80+
const { data: ruleExecutions = [], isLoading: execLoading } = useQuery({
81+
queryKey: ['rule-executions-analytics'],
82+
queryFn: () => base44.entities.RuleExecution.list('-created_date', 1000),
83+
enabled: !!user
84+
});
85+
7486
const isLoading = userLoading || pointsLoading || badgesLoading || awardsLoading ||
75-
personalLoading || teamLoading || partLoading;
87+
personalLoading || teamLoading || partLoading || rulesLoading || execLoading;
7688

7789
const handleRefresh = () => {
7890
refetchPoints();

0 commit comments

Comments
 (0)