From cbd1244cf05d4827ddcf67854ff7c8ec0eeeeee6 Mon Sep 17 00:00:00 2001 From: vivekchandrabs Date: Thu, 5 Feb 2026 13:32:13 -0600 Subject: [PATCH] Chore: Implement resolved task feature for the frontend. --- src/components/Header/Header.jsx | 294 +- .../ResolvedTasks/ResolvedTasks.jsx | 117 + src/languages/en/ui.js | 1 + src/routes.jsx | 2 + src/utils/URL.js | 1 + yarn.lock | 2725 ++++++++--------- 6 files changed, 1632 insertions(+), 1508 deletions(-) create mode 100644 src/components/ResolvedTasks/ResolvedTasks.jsx diff --git a/src/components/Header/Header.jsx b/src/components/Header/Header.jsx index 60d878bba8..bc8345ca0b 100644 --- a/src/components/Header/Header.jsx +++ b/src/components/Header/Header.jsx @@ -36,6 +36,7 @@ import { WEEKLY_SUMMARIES_REPORT, TEAM_LOCATIONS, OTHER_LINKS, + TASKS, USER_MANAGEMENT, BADGE_MANAGEMENT, PROJECTS, @@ -82,7 +83,7 @@ export function Header(props) { const collapseRef = useRef(null); const toggleRef = useRef(null); const [isAckLoading, setIsAckLoading] = useState(false); - const [ showPromotionsPopup, setShowPromotionsPopup ] = useState(false); + const [showPromotionsPopup, setShowPromotionsPopup] = useState(false); const ALLOWED_ROLES_TO_INTERACT = useMemo(() => ['Owner', 'Administrator'], []); const canInteractWithViewingUser = useMemo( @@ -94,7 +95,7 @@ export function Header(props) { // Reports const canGetReports = props.hasPermission( 'getReports', - !isAuthUser , + !isAuthUser, ); const canGetWeeklySummaries = props.hasPermission( 'getWeeklySummaries', @@ -105,29 +106,29 @@ export function Header(props) { // Users const canAccessUserManagement = - props.hasPermission('postUserProfile', !isAuthUser ) || - props.hasPermission('deleteUserProfile', !isAuthUser ) || - props.hasPermission('changeUserStatus', !isAuthUser ) || - props.hasPermission('getUserProfiles', !isAuthUser ) || + props.hasPermission('postUserProfile', !isAuthUser) || + props.hasPermission('deleteUserProfile', !isAuthUser) || + props.hasPermission('changeUserStatus', !isAuthUser) || + props.hasPermission('getUserProfiles', !isAuthUser) || props.hasPermission('setFinalDay', !isAuthUser); // Badges const canAccessBadgeManagement = - props.hasPermission('seeBadges', !isAuthUser ) || - props.hasPermission('createBadges', !isAuthUser ) || + props.hasPermission('seeBadges', !isAuthUser) || + props.hasPermission('createBadges', !isAuthUser) || props.hasPermission('updateBadges', !isAuthUser) || - props.hasPermission('deleteBadges', !isAuthUser ); + props.hasPermission('deleteBadges', !isAuthUser); // Projects const canAccessProjects = - props.hasPermission('postProject', !isAuthUser ) || - props.hasPermission('deleteProject', !isAuthUser ) || - props.hasPermission('putProject', !isAuthUser ) || - props.hasPermission('getProjectMembers', !isAuthUser ) || - props.hasPermission('assignProjectToUsers', !isAuthUser ) || - props.hasPermission('postWbs', !isAuthUser ) || - props.hasPermission('deleteWbs', !isAuthUser ) || - props.hasPermission('postTask', !isAuthUser ) || - props.hasPermission('updateTask', !isAuthUser ) || + props.hasPermission('postProject', !isAuthUser) || + props.hasPermission('deleteProject', !isAuthUser) || + props.hasPermission('putProject', !isAuthUser) || + props.hasPermission('getProjectMembers', !isAuthUser) || + props.hasPermission('assignProjectToUsers', !isAuthUser) || + props.hasPermission('postWbs', !isAuthUser) || + props.hasPermission('deleteWbs', !isAuthUser) || + props.hasPermission('postTask', !isAuthUser) || + props.hasPermission('updateTask', !isAuthUser) || props.hasPermission('deleteTask', !isAuthUser); // Tasks const canUpdateTask = props.hasPermission( @@ -136,23 +137,23 @@ export function Header(props) { ); // Teams const canAccessTeams = - props.hasPermission('postTeam', !isAuthUser ) || + props.hasPermission('postTeam', !isAuthUser) || props.hasPermission('putTeam', !isAuthUser) || - props.hasPermission('deleteTeam', !isAuthUser ) || + props.hasPermission('deleteTeam', !isAuthUser) || props.hasPermission('assignTeamToUsers', !isAuthUser); // Popups const canAccessPopups = props.hasPermission('createPopup', !isAuthUser) || - props.hasPermission('updatePopup', !isAuthUser ); + props.hasPermission('updatePopup', !isAuthUser); // SendEmails const canAccessSendEmails = props.hasPermission('sendEmails', !isAuthUser); // Permissions const canAccessPermissionsManagement = - props.hasPermission('postRole', !isAuthUser ) || - props.hasPermission('putRole', !isAuthUser ) || - props.hasPermission('deleteRole', !isAuthUser ) || + props.hasPermission('postRole', !isAuthUser) || + props.hasPermission('putRole', !isAuthUser) || + props.hasPermission('deleteRole', !isAuthUser) || props.hasPermission('putUserProfilePermissions', !isAuthUser); - + // Blue Square Email Management const canAccessBlueSquareEmailManagement = props.hasPermission('resendBlueSquareAndSummaryEmails', !isAuthUser); @@ -203,7 +204,7 @@ export function Header(props) { const currentWidth = window.innerWidth; // eslint-disable-next-line no-console console.log(`[Header Debug] Window resized to: ${currentWidth}px`); - + // Log breakpoint information for debugging if (currentWidth >= 1728) { // eslint-disable-next-line no-console @@ -380,7 +381,7 @@ export function Header(props) { useEffect(() => { const handleClickOutside = (event) => { if ( - collapseRef.current && + collapseRef.current && !collapseRef.current.contains(event.target) && !toggleRef.current?.contains(event.target) ) { @@ -407,18 +408,18 @@ export function Header(props) { {logoutPopup && } {showPromotionsPopup && setShowPromotionsPopup(false)} />} - +
-
- {isAuthenticated && } -
+
+ {isAuthenticated && } +
-
- {isAuthenticated && } -
-
+
+ {isAuthenticated && } +
+
-