From 98e0623cb7ac4587b0f18a8bcd4ccc0cbda8b9ee Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Thu, 2 Jul 2026 20:56:12 -0400 Subject: [PATCH] Make sure the Activity view match with History Icons --- src/views/User/UserActivities.jsx | 78 +++++++++++++------------------ 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/src/views/User/UserActivities.jsx b/src/views/User/UserActivities.jsx index 66f5fa6..4a4d5f6 100644 --- a/src/views/User/UserActivities.jsx +++ b/src/views/User/UserActivities.jsx @@ -59,47 +59,37 @@ const groupByDate = history => { return aggregated } +const statusConfig = { + 0: { color: 'primary', icon: }, + 1: { color: 'success', icon: }, + 2: { color: 'warning', icon: }, + 3: { color: 'neutral', icon: }, + 4: { color: 'danger', icon: }, + 5: { color: 'danger', icon: }, + 6: { color: 'warning', icon: }, +} + const ChoreHistoryItem = ({ time, name, points, status, performer, notes, onViewNote }) => { - const getStatusIcon = status => { - switch (status) { - case 0: - return - case 1: - return - case 2: - return - case 3: - return - case 4: - return - case 5: - return - case 6: - return - default: - return - } - } + const cfg = statusConfig[status] ?? statusConfig[1] return ( {time} - - {getStatusIcon(status)} - + {cfg.icon} + { return ( - - + + Activities Timeline @@ -962,18 +955,13 @@ const UserActivites = () => { }} > - {/* */} - - - User Activities - - - Overview of user activities and task statistics - - + + + User Activities +