From 10e6ebcb1234232c5964669ab2a602f5fe9f3f56 Mon Sep 17 00:00:00 2001 From: Jake Kasper Date: Thu, 4 Sep 2025 09:11:12 -0500 Subject: [PATCH] asdfasf --- .../src/pages/Applications/ApplicationLog.js | 13 ++++-------- .../src/pages/Applications/Applications.js | 20 +++++++++++++++++++ frontend/src/pages/Dashboard/Dashboard.js | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/Applications/ApplicationLog.js b/frontend/src/pages/Applications/ApplicationLog.js index 36783ce..7b3fe7a 100644 --- a/frontend/src/pages/Applications/ApplicationLog.js +++ b/frontend/src/pages/Applications/ApplicationLog.js @@ -1,14 +1,9 @@ import React from 'react'; +import { Navigate } from 'react-router-dom'; const ApplicationLog = () => { - return ( -
-

Log Application

-
-

Application logging coming soon...

-
-
- ); + // Redirect legacy route to Applications with log workflow enabled + return ; }; -export default ApplicationLog; \ No newline at end of file +export default ApplicationLog; diff --git a/frontend/src/pages/Applications/Applications.js b/frontend/src/pages/Applications/Applications.js index 549153a..79adfec 100644 --- a/frontend/src/pages/Applications/Applications.js +++ b/frontend/src/pages/Applications/Applications.js @@ -54,6 +54,7 @@ const Applications = () => { }); const [sortBy, setSortBy] = useState('date'); const [sortOrder, setSortOrder] = useState('desc'); + const [logHint, setLogHint] = useState(false); useEffect(() => { fetchApplications(); @@ -72,6 +73,20 @@ const Applications = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [location.search]); + // Handle log flow from dashboard (?action=log) + useEffect(() => { + const params = new URLSearchParams(location.search); + if (params.get('action') === 'log') { + // Focus on planned items for execution + setShowFilters(true); + setFilters(prev => ({ ...prev, status: 'planned' })); + setLogHint(true); + // Remove query param to avoid re-triggering on refresh + navigate('/applications', { replace: true }); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [location.search]); + const fetchApplications = async () => { try { const response = await applicationsAPI.getPlans(); @@ -453,6 +468,11 @@ const Applications = () => { return (
+ {logHint && ( +
+ Select a planned application below and click the Play icon to log it. +
+ )}

Applications

diff --git a/frontend/src/pages/Dashboard/Dashboard.js b/frontend/src/pages/Dashboard/Dashboard.js index 2901869..046e4fe 100644 --- a/frontend/src/pages/Dashboard/Dashboard.js +++ b/frontend/src/pages/Dashboard/Dashboard.js @@ -49,7 +49,7 @@ const Dashboard = () => { }, { name: 'Log Application', - href: '/applications/log', + href: '/applications?action=log', icon: ClockIcon, description: 'Record completed work', color: 'bg-orange-500',