diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pageComponents/SelectSWEmploymentDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pageComponents/SelectSWEmploymentDetails.js index 73fe3ac8399..c3259d36039 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pageComponents/SelectSWEmploymentDetails.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pageComponents/SelectSWEmploymentDetails.js @@ -27,7 +27,6 @@ const SelectSWEmploymentDetails = ({ t, config, onSelect, userType, formData, se setSelectedEmployer(temp); } }, [mdmsOptions]); - console.log("selectedEmployer", selectedEmployer) const requestCriteria = { url: "/vendor/v1/_search", params: { tenantId, sortBy: "name", status: "ACTIVE" }, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pages/employee/FSMRegistry/Worker/WorkerDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pages/employee/FSMRegistry/Worker/WorkerDetails.js index e5c59b77b2c..f1994716a21 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pages/employee/FSMRegistry/Worker/WorkerDetails.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pages/employee/FSMRegistry/Worker/WorkerDetails.js @@ -72,7 +72,6 @@ const WorkerDetails = (props) => { }, }, }); - console.log("workedDARA", workerData, isWorkerLoading); const { data: driverData, isLoading: isLoading, isSuccess: isDsoSuccess, error: dsoError, refetch } = Digit.Hooks.fsm.useDriverDetails(tenantId, { ids: id }); const { data: vendorData, isLoading: isVendorLoading, isSuccess: isVendorSuccess, error: vendorError } = Digit.Hooks.fsm.useDsoSearch( diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/index.js index dc55a1f5f07..3fc1e62b89d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/tqm/src/pages/employee/index.js @@ -1,4 +1,4 @@ -import React, { useEffect,useReducer,Fragment } from "react"; +import React, { useEffect, useReducer, Fragment } from "react"; import { Switch, useLocation } from "react-router-dom"; import { useTranslation } from "react-i18next"; import { PrivateRoute, AppContainer, BreadCrumb, BackButton } from "@egovernments/digit-ui-react-components"; @@ -15,13 +15,16 @@ import TqmAdminNotification from "./TqmAdminNotification"; // import TQMSummary from "../../components/TQMSummary"; - const TqmBreadCrumb = ({ location, defaultPath }) => { - const pathVar=location.pathname.replace(defaultPath+'/',"").split("?")?.[0]; + const pathVar = location.pathname.replace(defaultPath + "/", "").split("?")?.[0]; const { t } = useTranslation(); const search = useLocation().search; const fromScreen = new URLSearchParams(search).get("from") || null; - + const isInbox = location?.pathname?.includes("inbox"); + const isViewTestResults = location?.pathname?.includes("view-test-results"); + const isSearchTest = location?.pathname?.includes("search-test-results"); + const isaddTest = location?.pathname?.includes("add-test-result"); + const crumbs = [ { path: `/${window?.contextPath}/employee`, @@ -29,39 +32,31 @@ const TqmBreadCrumb = ({ location, defaultPath }) => { show: true, }, { - path: `/${window.contextPath}/employee/tqm/inbox`, - content: t(`TQM_BREAD_INBOX`) , - show: pathVar.includes("inbox")?true: false, - + path: pathVar.includes("inbox") ? "" : `/${window.contextPath}/employee/tqm/inbox`, + content: t(`TQM_BREAD_INBOX`), + show: isInbox || fromScreen === "TQM_BREAD_INBOX" ? true : false, }, { - path: `/${window.contextPath}/employee/tqm/search-test-results`, - // content: t(`TQM_BREAD_PAST_TESTS`) , - show: pathVar.includes("search-test-results")?true: false, - content: fromScreen ? `${t(fromScreen)} / ${t("TQM_BREAD_PAST_TESTS")}` : t("TQM_BREAD_PAST_TESTS"), - isBack:fromScreen ? true : false + path: pathVar.includes("search-test-results") ? "" : `/${window.contextPath}/employee/tqm/search-test-results`, + show: isSearchTest || fromScreen === "TQM_BREAD_PAST_TESTS" ? true : false, + content: t("TQM_BREAD_PAST_TESTS"), }, { - path: `/${window.contextPath}/employee/tqm/add-test-result`, - content: t(`TQM_BREAD_CREATE_TEST`) , - show: pathVar.includes("add-test-result")?true: false, + path: pathVar.includes("add-test-result") ? "" : `/${window.contextPath}/employee/tqm/add-test-result`, + content: t(`TQM_BREAD_CREATE_TEST`), + show: isaddTest ? true : false, }, { - path: `/${window.contextPath}/employee/tqm/add-test-result`, + path: pathVar.includes("search-devices") ? "" : `/${window.contextPath}/employee/tqm/add-test-result`, // content: t(`TQM_BREAD_SENSOR`) , - show: pathVar.includes("search-devices")?true: false, + show: pathVar.includes("search-devices") ? true : false, content: fromScreen ? `${t(fromScreen)} / ${t("TQM_BREAD_SENSOR")}` : t("TQM_BREAD_SENSOR"), - isBack:fromScreen ? true: false }, { - path: `/${window.contextPath}/employee/tqm/search-test-results`, - // content: t(`TQM_BREAD_VIEW_TEST_RESULTS`) , - show: pathVar.includes("view-test-results")?true: false, - content:fromScreen ? `${t(fromScreen)} / ${t("TQM_BREAD_VIEW_TEST_RESULTS")}` : t("TQM_BREAD_VIEW_TEST_RESULTS"), - isBack:fromScreen ? true: false + path: pathVar.includes("view-test-results") ? "" : `/${window.contextPath}/employee/tqm/view-test-results`, + show: isViewTestResults ? true : false, + content: isViewTestResults ? t("TQM_BREAD_VIEW_TEST_RESULTS") : t("TQM_BREAD_VIEW_TEST_RESULTS"), }, - - ]; return ; }; @@ -77,14 +72,13 @@ const App = ({ path }) => { const TQMSummary = Digit?.ComponentRegistryService?.getComponent("TQMSummary"); const SensorScreen = Digit?.ComponentRegistryService?.getComponent("SensorScreen"); let isMobile = window.Digit.Utils.browser.isMobile(); - + return ( <> - - {isUlbAdminLoggedIn && isMobile ? {t('CS_COMMON_BACK')} : !isPlantOperatorLoggedIn ?:null} + {isUlbAdminLoggedIn && isMobile ? {t("CS_COMMON_BACK")} : !isPlantOperatorLoggedIn ? : null} {/* {isPlantOperatorLoggedIn && (location.pathname.includes("/response") ? null : {t("CS_COMMON_BACK")})} */} - {isPlantOperatorLoggedIn && } - + {isPlantOperatorLoggedIn && } + } /> @@ -98,12 +92,12 @@ const App = ({ path }) => { } /> } /> {/* for testing purpose */} - } /> + } /> } /> } /> - + ); };