- Progress Commit

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-01 16:34:31 -04:00
parent ae07f71e76
commit 1343b68cc6
3 changed files with 28 additions and 17 deletions

View File

@@ -109,6 +109,18 @@ export function JobsDetailPage({
form.resetFields();
}, [form, job]);
useEffect(() => {
const handleTaskUpdated = async (event) => {
await refetch().catch(e => `Something went wrong fetching tasks: ${e.message || ''}`);
};
window.addEventListener('taskUpdated', handleTaskUpdated);
// Clean up the event listener when the component is unmounted.
return () => {
window.removeEventListener('taskUpdated', handleTaskUpdated);
};
}, [refetch]);
//useKeyboardSaveShortcut(form.submit);
const handleFinish = async (values) => {