From 343da739060e5925e0721cf3241314fe9ddbd5ad Mon Sep 17 00:00:00 2001 From: Krzysiek_QM Date: Sat, 22 Oct 2022 17:02:12 +0200 Subject: [PATCH] v.3.3.3 - finished extended Router paths --- frontend/src/components/data/BucketDataTable.jsx | 8 +++++++- frontend/src/components/login/LoginPage.jsx | 3 --- frontend/src/route/AppRouter.js | 11 ++--------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/data/BucketDataTable.jsx b/frontend/src/components/data/BucketDataTable.jsx index d3fe74a..faec272 100644 --- a/frontend/src/components/data/BucketDataTable.jsx +++ b/frontend/src/components/data/BucketDataTable.jsx @@ -113,13 +113,16 @@ export default function BucketDataTable(props) { // active bucket has been changed useEffect(() => { + // console.log(">> active bucket has been changed"); setChangedBucket(true); setFiltering(false); const bucketViews = getBucketViews(activeBucket, views); if (bucketViews.length > 0 && tags != null && enums != null && views != null && columns != null) { + // console.log(">> 1"); const orderBy = getLastBucketOrder(activeBucket.id); - + // console.log("lastBucketOrder: " + orderBy); if (tableRef !== null && tableRef.current !== null) { + // console.log("lastBucketSearchText: " + searchText); tableRef.current.dataManager.changeSearchText(searchText); tableRef.current.dataManager.orderBy = -1; tableRef.current.dataManager.orderDirection = ""; @@ -662,6 +665,9 @@ export default function BucketDataTable(props) { } }} onOrderChange={(colId, ord) => { + // console.log("onOrderChange: (colId, ord)"); + // console.log(colId); + // console.log(ord); let order = (colId >= 0) ? {colId, ord} : null; setLastBucketOrder(activeBucket.id, order); }} diff --git a/frontend/src/components/login/LoginPage.jsx b/frontend/src/components/login/LoginPage.jsx index 45f1097..f183795 100644 --- a/frontend/src/components/login/LoginPage.jsx +++ b/frontend/src/components/login/LoginPage.jsx @@ -236,14 +236,11 @@ export default function LoginPage() { return getProjectsPaper(); case 2: const pathname = getPathname(); - console.log("pathname: " + pathname); if (pathname != null && pathname !== "null") { setPathname(null); - console.log("> 1: redirectTo: " + pathname); return redirectTo(pathname) } else { const pathname = getProjectDataPath(); - console.log("> 2: redirectTo: " + pathname); return redirectTo(pathname); } case 1: diff --git a/frontend/src/route/AppRouter.js b/frontend/src/route/AppRouter.js index 01e32de..c978c71 100644 --- a/frontend/src/route/AppRouter.js +++ b/frontend/src/route/AppRouter.js @@ -14,16 +14,9 @@ import {getContextPath} from "../utils/UrlBuilder"; export default function AppRouter() { - const fullPathname = window.location.pathname; - const pathname = fullPathname.replace(getContextPath(), ""); + // initial browser url without context path + setPathname(window.location.pathname.replace(getContextPath(), "")); - console.log("----save pathname -------------------------------------------"); - console.log("contextPath: " + getContextPath()); - console.log("fullPathname: " + fullPathname); - console.log("pathname: " + pathname); - console.log("-------------------------------------------------------------"); - - setPathname(pathname); return (