From ab138e442cbed2d8a3a3c3ecb86c16884e090fce Mon Sep 17 00:00:00 2001 From: carddev81 Date: Mon, 6 Jan 2025 19:56:07 -0600 Subject: [PATCH 1/3] fix: change Hours Spent to Time Spent, remove seconds, and functionality to process only hours and minutes --- frontend/src/Components/ConvertSeconds.tsx | 9 +++------ .../Components/dashboard/ResidentWeeklyActivityTable.tsx | 2 +- frontend/src/Pages/MyProgress.tsx | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/frontend/src/Components/ConvertSeconds.tsx b/frontend/src/Components/ConvertSeconds.tsx index 1b288acc..ac534451 100644 --- a/frontend/src/Components/ConvertSeconds.tsx +++ b/frontend/src/Components/ConvertSeconds.tsx @@ -1,13 +1,10 @@ const convertSeconds = (secs: number) => { const hours = Math.floor(secs / 3600); const minutes = Math.floor((secs % 3600) / 60); - const seconds = Math.floor(secs % 60); - + //removed seconds per #601 along with not using abbreviations return hours - ? { number: hours, label: `hr${hours === 1 ? '' : 's'}` } - : (minutes - ? { number: minutes, label: `min${minutes === 1 ? '' : 's'}` } - : { number: seconds, label: `sec${seconds === 1 ? '' : 's'}` }); + ? { number: hours, label: `hour${hours === 1 ? '' : 's'}` } + : { number: minutes, label: `minute${minutes === 1 ? '' : 's'}` }; }; export default convertSeconds; diff --git a/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx b/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx index 51da5012..484f84d6 100644 --- a/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx +++ b/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx @@ -14,7 +14,7 @@ export default function ResidentWeeklyActivityTable({ Course Name - Hours Spent + Time Spent diff --git a/frontend/src/Pages/MyProgress.tsx b/frontend/src/Pages/MyProgress.tsx index 78d01ab1..08d9cd66 100644 --- a/frontend/src/Pages/MyProgress.tsx +++ b/frontend/src/Pages/MyProgress.tsx @@ -94,7 +94,7 @@ export default function MyProgress() { Course Name Status - Hours Spent + Time Spent From ee828960a3b99714022acc3d8236705dfaa4e355 Mon Sep 17 00:00:00 2001 From: carddev81 Date: Mon, 6 Jan 2025 19:57:23 -0600 Subject: [PATCH 2/3] fix: add gap of 3 between content cards --- .../src/Components/OpenContentItemAccordion.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/Components/OpenContentItemAccordion.tsx b/frontend/src/Components/OpenContentItemAccordion.tsx index 3999f843..bb10f906 100644 --- a/frontend/src/Components/OpenContentItemAccordion.tsx +++ b/frontend/src/Components/OpenContentItemAccordion.tsx @@ -78,12 +78,14 @@ export default function OpenContentItemAccordion({ activeKey === title ? 'max-h-[800px]' : 'max-h-0' }`} > - {contentItems.map((item) => ( - - ))} +
+ {contentItems.map((item) => ( + + ))} +
))} From 7e86bef97a51ac7b20dc4ee7f721043b56184ae2 Mon Sep 17 00:00:00 2001 From: carddev81 Date: Mon, 6 Jan 2025 19:58:13 -0600 Subject: [PATCH 3/3] fix: modify css to fix moving page when favoriting libraries --- frontend/src/Pages/StudentLayer1.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Pages/StudentLayer1.tsx b/frontend/src/Pages/StudentLayer1.tsx index 006f3201..fa89409c 100644 --- a/frontend/src/Pages/StudentLayer1.tsx +++ b/frontend/src/Pages/StudentLayer1.tsx @@ -86,7 +86,7 @@ export default function StudentLayer1() { {/* right sidebar */} -
+

Favorites

{favorites?.data && favorites.data.length > 0 ? (