diff --git a/src/frontend/src/api/Project.js b/src/frontend/src/api/Project.js index dea540343b..78f5d41b31 100755 --- a/src/frontend/src/api/Project.js +++ b/src/frontend/src/api/Project.js @@ -144,9 +144,11 @@ export const GenerateProjectTiles = (url, payload) => { const generateProjectTiles = async (url, payload) => { try { const response = await CoreModules.axios.get(url); + console.log(response, 'response-mbtiles'); dispatch(GetTilesList(`${import.meta.env.VITE_API_URL}/projects/tiles_list/${payload}/`)); dispatch(ProjectActions.SetGenerateProjectTilesLoading(false)); } catch (error) { + console.log(error, 'error-mbtiles'); dispatch(ProjectActions.SetGenerateProjectTilesLoading(false)); } finally { dispatch(ProjectActions.SetGenerateProjectTilesLoading(false)); diff --git a/src/frontend/src/api/ProjectTaskStatus.js b/src/frontend/src/api/ProjectTaskStatus.js index 22ed5e0e64..2feb3b0207 100755 --- a/src/frontend/src/api/ProjectTaskStatus.js +++ b/src/frontend/src/api/ProjectTaskStatus.js @@ -14,12 +14,14 @@ const UpdateTaskStatus = (url, style, existingData, currentProjectId, feature, m const response = await CoreModules.axios.post(url, body, { params }); const findIndexForUpdation = existingData[index].taskBoundries.findIndex((obj) => obj.id == response.data.id); + console.log(response, 'response'); let project_tasks = [...existingData[index].taskBoundries]; project_tasks[findIndexForUpdation] = { ...response.data, task_status: task_priority_str[response.data.task_status], }; + console.log(project_tasks, 'project_tasks'); let updatedProject = [...existingData]; const finalProjectOBJ = { @@ -29,6 +31,7 @@ const UpdateTaskStatus = (url, style, existingData, currentProjectId, feature, m updatedProject[index] = finalProjectOBJ; dispatch(ProjectActions.SetProjectTaskBoundries(updatedProject)); + console.log(updatedProject, 'updatedProject'); await feature.setStyle(style); dispatch(CommonActions.SetLoading(false)); @@ -41,6 +44,7 @@ const UpdateTaskStatus = (url, style, existingData, currentProjectId, feature, m }), ); } catch (error) { + console.log(error, 'error'); dispatch(CommonActions.SetLoading(false)); dispatch( HomeActions.SetSnackBar({ diff --git a/src/frontend/src/utilities/CustomDrawer.jsx b/src/frontend/src/utilities/CustomDrawer.jsx index 5780fcccce..f37573ba8b 100644 --- a/src/frontend/src/utilities/CustomDrawer.jsx +++ b/src/frontend/src/utilities/CustomDrawer.jsx @@ -9,34 +9,12 @@ import { createLoginWindow, revokeCookie } from '@/utilfunctions/login'; import { CommonActions } from '@/store/slices/CommonSlice'; import { LoginActions } from '@/store/slices/LoginSlice'; import { ProjectActions } from '@/store/slices/ProjectSlice'; +import DebugConsole from '@/utilities/DebugConsole'; export default function CustomDrawer({ open, placement, size, type, onClose, onSignOut, setOpen }) { - const [showDebugConsole, setShowDebugConsole] = useState(false); - const [logs, setLogs] = useState([]); - useEffect(() => { - if (import.meta.env.MODE === 'development') { - // Override console.log to capture logs - const originalConsoleLog = console.log; - console.log = (...args) => { - originalConsoleLog.apply(console, args); - setLogs((prevLogs) => [ - ...prevLogs, - args.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : arg)).join(' '), - ]); - }; - - // Restore original console.log when component unmounts - return () => { - console.log = originalConsoleLog; - }; - } - }, []); - const toggleDebugConsole = () => { - setShowDebugConsole((prev) => !prev); - }; - const defaultTheme = CoreModules.useAppSelector((state) => state.theme.hotTheme); const dispatch = CoreModules.useAppDispatch(); + const [showDebugConsole, setShowDebugConsole] = useState(false); const onMouseEnter = (event) => { const element = document.getElementById(`text${event.target.id}`); @@ -138,33 +116,7 @@ export default function CustomDrawer({ open, placement, size, type, onClose, onS return (
{log}
- ))} -{log}
+ ))} +