diff --git a/src/components/UserMenu.tsx b/src/components/UserMenu.tsx index 04d0765..98aaba4 100755 --- a/src/components/UserMenu.tsx +++ b/src/components/UserMenu.tsx @@ -33,14 +33,14 @@ export const UserMenu = memo(({ isAdmin, ...other }) => { {...other} placement={'bottomRight'} overlay={( - + {isAdmin ? ( - + ) : ( - + )} - - + + )} > diff --git a/src/pages/Telemetry/TelemetryView/index.jsx b/src/pages/Telemetry/TelemetryView/index.jsx index 076e3f9..7071e2b 100755 --- a/src/pages/Telemetry/TelemetryView/index.jsx +++ b/src/pages/Telemetry/TelemetryView/index.jsx @@ -333,7 +333,7 @@ const TelemetryView = memo(() => { ) invokeWebApiWrapperAsync( async () => { - const flowChart = await DrillFlowChartService.get(idWell) + const flowChart = await DrillFlowChartService.getByIdWell(idWell) const dataSaub = await TelemetryDataSaubService.getData(idWell, null, chartInterval) const dataSpin = await TelemetryDataSpinService.getData(idWell, null, chartInterval) setFlowChartData(flowChart ?? []) diff --git a/src/pages/WellOperations/DrillProcessFlow.jsx b/src/pages/WellOperations/DrillProcessFlow.jsx index be53286..4643057 100755 --- a/src/pages/WellOperations/DrillProcessFlow.jsx +++ b/src/pages/WellOperations/DrillProcessFlow.jsx @@ -25,7 +25,7 @@ export const DrillProcessFlow = memo(() => { const updateFlows = () => invokeWebApiWrapperAsync( async () => { - const flows = await DrillFlowChartService.get(idWell) + const flows = await DrillFlowChartService.getByIdWell(idWell) setFlows(arrayOrDefault(flows)) }, setShowLoader, diff --git a/src/utils/functions/permissions.tsx b/src/utils/functions/permissions.tsx index 5b9f869..a8067b0 100644 --- a/src/utils/functions/permissions.tsx +++ b/src/utils/functions/permissions.tsx @@ -1,5 +1,5 @@ import { memo, NamedExoticComponent, ReactElement, ReactNode, useMemo } from 'react' -import { useParams } from 'react-router-dom' +import { Navigate, useParams } from 'react-router-dom' import { getUserLogin, getUserPermissions, getUserRoles } from '@utils' import { isDev } from '@utils' @@ -109,9 +109,10 @@ export type PrivateComponent

= NamedExoticComponent

& Priva getKey: () => string } -export const NoAccessComponent = memo(() => ( - - // +export const NoAccessComponent = memo(() => getUserLogin() ? ( + // +) : ( + )) export const wrapPrivateComponent =

(