From 22f8f681cb08aba5530428b791ebb99604bc3b01 Mon Sep 17 00:00:00 2001
From: alexd-bes <129009580+alexd-bes@users.noreply.github.com>
Date: Tue, 18 Jun 2024 16:35:24 +1200
Subject: [PATCH 1/6] fix(adminPanel): clear redux state on logout
---
packages/admin-panel/src/api/TupaiaApi.js | 1 +
.../admin-panel/src/api/mutations/useLogin.js | 1 -
.../admin-panel/src/api/mutations/useLogout.js | 3 ++-
.../admin-panel/src/authentication/actions.js | 6 +++---
.../src/layout/navigation/TopNavbar.jsx | 17 +++++++++++++----
.../src/layout/navigation/UserProfileInfo.jsx | 17 +++++++++++++----
6 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/packages/admin-panel/src/api/TupaiaApi.js b/packages/admin-panel/src/api/TupaiaApi.js
index 7a7c78a5b0..1ba1bdd725 100644
--- a/packages/admin-panel/src/api/TupaiaApi.js
+++ b/packages/admin-panel/src/api/TupaiaApi.js
@@ -5,6 +5,7 @@
import { saveAs } from 'file-saver';
import { parse } from 'content-disposition-header';
+import { logout } from '../authentication';
import { verifyResponseStatus, stringifyQuery } from '@tupaia/utils';
diff --git a/packages/admin-panel/src/api/mutations/useLogin.js b/packages/admin-panel/src/api/mutations/useLogin.js
index 8ff347666e..1644725b17 100644
--- a/packages/admin-panel/src/api/mutations/useLogin.js
+++ b/packages/admin-panel/src/api/mutations/useLogin.js
@@ -25,7 +25,6 @@ export const useLogin = homeLink => {
{
onSuccess: async () => {
await queryClient.invalidateQueries();
- console.log(from, homeLink);
if (from) {
navigate(from, {
state: null,
diff --git a/packages/admin-panel/src/api/mutations/useLogout.js b/packages/admin-panel/src/api/mutations/useLogout.js
index f3d0da4cea..0479bcb937 100644
--- a/packages/admin-panel/src/api/mutations/useLogout.js
+++ b/packages/admin-panel/src/api/mutations/useLogout.js
@@ -6,12 +6,13 @@
import { useMutation, useQueryClient } from 'react-query';
import { post } from '../../VizBuilderApp/api';
-export const useLogout = () => {
+export const useLogout = onSuccess => {
const queryClient = useQueryClient();
return useMutation('logout', () => post('logout'), {
onSuccess: () => {
queryClient.invalidateQueries();
+ if (onSuccess) onSuccess();
},
});
};
diff --git a/packages/admin-panel/src/authentication/actions.js b/packages/admin-panel/src/authentication/actions.js
index 53715ab046..19e5e2ca3e 100644
--- a/packages/admin-panel/src/authentication/actions.js
+++ b/packages/admin-panel/src/authentication/actions.js
@@ -6,6 +6,6 @@
import { LOGOUT } from './constants';
// workaround for resetting redux state on logout, until we move everything to react-query and hooks
-export const logout = dispatch => {
- dispatch({ type: LOGOUT });
-};
+export const logout = () => ({
+ type: LOGOUT,
+});
diff --git a/packages/admin-panel/src/layout/navigation/TopNavbar.jsx b/packages/admin-panel/src/layout/navigation/TopNavbar.jsx
index 506b7f9200..20e9785e92 100644
--- a/packages/admin-panel/src/layout/navigation/TopNavbar.jsx
+++ b/packages/admin-panel/src/layout/navigation/TopNavbar.jsx
@@ -3,12 +3,14 @@
* Copyright (c) 2017 - 2024 Beyond Essential Systems Pty Ltd
*/
import React from 'react';
+import { connect } from 'react-redux';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { UserButton } from './UserButton';
import { HomeLink } from './HomeLink';
import { useUser } from '../../api/queries';
import { useLogout } from '../../api/mutations';
+import { logout as logoutAction } from '../../authentication';
const Wrapper = styled.div`
background-color: ${props => props.theme.palette.secondary.main};
@@ -28,9 +30,9 @@ const Wrapper = styled.div`
}
`;
-export const TopNavbar = ({ logo, homeLink, displayLogoutButton, disableHomeLink }) => {
+const TopNavbarComponent = ({ logo, homeLink, displayLogoutButton, disableHomeLink, onLogout }) => {
const { isLoggedIn } = useUser();
- const { mutate: logout } = useLogout();
+ const { mutate: logout } = useLogout(onLogout);
return (
@@ -39,7 +41,7 @@ export const TopNavbar = ({ logo, homeLink, displayLogoutButton, disableHomeLink
);
};
-TopNavbar.propTypes = {
+TopNavbarComponent.propTypes = {
logo: PropTypes.shape({
url: PropTypes.string.isRequired,
alt: PropTypes.string.isRequired,
@@ -47,9 +49,10 @@ TopNavbar.propTypes = {
homeLink: PropTypes.string,
displayLogoutButton: PropTypes.bool,
disableHomeLink: PropTypes.bool,
+ onLogout: PropTypes.func.isRequired,
};
-TopNavbar.defaultProps = {
+TopNavbarComponent.defaultProps = {
logo: {
url: '/admin-panel-logo-white.svg',
alt: 'Tupaia Admin Panel Logo',
@@ -58,3 +61,9 @@ TopNavbar.defaultProps = {
displayLogoutButton: true,
disableHomeLink: false,
};
+
+const mapDispatchToProps = dispatch => ({
+ onLogout: () => dispatch(logoutAction()),
+});
+
+export const TopNavbar = connect(null, mapDispatchToProps)(TopNavbarComponent);
diff --git a/packages/admin-panel/src/layout/navigation/UserProfileInfo.jsx b/packages/admin-panel/src/layout/navigation/UserProfileInfo.jsx
index 172dd39979..4bb2f8c681 100644
--- a/packages/admin-panel/src/layout/navigation/UserProfileInfo.jsx
+++ b/packages/admin-panel/src/layout/navigation/UserProfileInfo.jsx
@@ -4,6 +4,7 @@
*/
import React from 'react';
import styled from 'styled-components';
+import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import { Avatar, Divider, Typography } from '@material-ui/core';
@@ -11,6 +12,7 @@ import { Tooltip } from '@tupaia/ui-components';
import { UserButton } from './UserButton';
import { useUser } from '../../api/queries';
import { useLogout } from '../../api/mutations';
+import { logout as logoutAction } from '../../authentication';
const Wrapper = styled.div`
padding-inline: 1.25rem;
@@ -29,9 +31,9 @@ const UserEmail = styled(Typography)`
margin-block-end: 0.9rem;
`;
-export const UserProfileInfo = ({ profileLink, isFullWidth }) => {
+const UserProfileInfoComponent = ({ profileLink, isFullWidth, onLogout }) => {
const { isLoggedIn, data: user, isLoading } = useUser();
- const { mutate: logout } = useLogout();
+ const { mutate: logout } = useLogout(onLogout);
if (isLoading) return null;
@@ -70,14 +72,21 @@ export const UserProfileInfo = ({ profileLink, isFullWidth }) => {
);
};
-UserProfileInfo.propTypes = {
+UserProfileInfoComponent.propTypes = {
profileLink: PropTypes.shape({
label: PropTypes.string.isRequired,
to: PropTypes.string.isRequired,
}),
isFullWidth: PropTypes.bool.isRequired,
+ onLogout: PropTypes.func.isRequired,
};
-UserProfileInfo.defaultProps = {
+UserProfileInfoComponent.defaultProps = {
profileLink: null,
};
+
+const mapDispatchToProps = dispatch => ({
+ onLogout: () => dispatch(logoutAction()),
+});
+
+export const UserProfileInfo = connect(null, mapDispatchToProps)(UserProfileInfoComponent);
From bc47fcaad62848fe2eecd4466d6ac0efd15f0db8 Mon Sep 17 00:00:00 2001
From: alexd-bes <129009580+alexd-bes@users.noreply.github.com>
Date: Tue, 18 Jun 2024 16:46:08 +1200
Subject: [PATCH 2/6] fix(tupaiaWeb): Fix no data display
---
.../features/EnlargedDashboardItem/EnlargedDashboardVisual.tsx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packages/tupaia-web/src/features/EnlargedDashboardItem/EnlargedDashboardVisual.tsx b/packages/tupaia-web/src/features/EnlargedDashboardItem/EnlargedDashboardVisual.tsx
index d36ead5f7e..15eea67c30 100644
--- a/packages/tupaia-web/src/features/EnlargedDashboardItem/EnlargedDashboardVisual.tsx
+++ b/packages/tupaia-web/src/features/EnlargedDashboardItem/EnlargedDashboardVisual.tsx
@@ -69,6 +69,7 @@ const ExportDate = styled(Typography)`
font-size: 0.75rem;
padding-block: 1rem 0.3rem;
`;
+
interface EnlargedDashboardVisualProps {
entityName?: Entity['name'];
isPreview?: boolean;
@@ -178,6 +179,7 @@ export const EnlargedDashboardVisual = ({
isExport: isPreview,
reportCode: currentDashboardItem?.reportCode,
config: mergedConfig,
+ isEnabled: true,
}}
>
From 5d3db3d6d285b71be2162465ffe990425bb9b9ff Mon Sep 17 00:00:00 2001
From: alexd-bes <129009580+alexd-bes@users.noreply.github.com>
Date: Tue, 18 Jun 2024 16:50:52 +1200
Subject: [PATCH 3/6] fix(tupaiaWeb): Fix flippa table styling
---
packages/tupaia-web/src/features/Visuals/Chart.tsx | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/packages/tupaia-web/src/features/Visuals/Chart.tsx b/packages/tupaia-web/src/features/Visuals/Chart.tsx
index d93e103fc4..ad6d9119af 100644
--- a/packages/tupaia-web/src/features/Visuals/Chart.tsx
+++ b/packages/tupaia-web/src/features/Visuals/Chart.tsx
@@ -26,6 +26,15 @@ const ScreenChartTable = styled(ChartTable).attrs({
table {
table-layout: unset;
}
+ .MuiTableRow-root:nth-child(even) {
+ background-color: ${props => props.theme.palette.background.paper};
+ }
+ .MuiTableCell-head {
+ border-bottom: 1px solid ${GREY_DE};
+ }
+ .MuiTableCell-root {
+ padding-inline: 1.5rem;
+ }
`;
const ExportingStyledTable = styled(ChartTable)`
From 43d0e227e8051f7ef648ebf35b9d222cf4e22ec3 Mon Sep 17 00:00:00 2001
From: alexd-bes <129009580+alexd-bes@users.noreply.github.com>
Date: Tue, 18 Jun 2024 16:56:10 +1200
Subject: [PATCH 4/6] fix(tupaiaWeb): Fix map overlay tables
---
.../features/Map/MapOverlaySelector/MapTableModal.tsx | 7 ++++++-
packages/tupaia-web/src/features/Visuals/Chart.tsx | 10 +---------
packages/tupaia-web/src/theme/theme.ts | 11 +++++++++++
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapTableModal.tsx b/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapTableModal.tsx
index a7e336a51d..5d2f0100ca 100644
--- a/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapTableModal.tsx
+++ b/packages/tupaia-web/src/features/Map/MapOverlaySelector/MapTableModal.tsx
@@ -92,7 +92,12 @@ export const MapTableModal = ({ onClose }: any) => {
/>
)}
{!isLoading && !hasNoData && (
-
+
)}
diff --git a/packages/tupaia-web/src/features/Visuals/Chart.tsx b/packages/tupaia-web/src/features/Visuals/Chart.tsx
index ad6d9119af..68c318f85f 100644
--- a/packages/tupaia-web/src/features/Visuals/Chart.tsx
+++ b/packages/tupaia-web/src/features/Visuals/Chart.tsx
@@ -19,6 +19,7 @@ const TEXT_DARKGREY = '#414D55';
const ScreenChartTable = styled(ChartTable).attrs({
stickyHeader: true,
+ className: 'flippa-table',
})`
&:has(.MuiTable-stickyHeader) {
max-height: clamp(20rem, 60rem, 55vh);
@@ -26,15 +27,6 @@ const ScreenChartTable = styled(ChartTable).attrs({
table {
table-layout: unset;
}
- .MuiTableRow-root:nth-child(even) {
- background-color: ${props => props.theme.palette.background.paper};
- }
- .MuiTableCell-head {
- border-bottom: 1px solid ${GREY_DE};
- }
- .MuiTableCell-root {
- padding-inline: 1.5rem;
- }
`;
const ExportingStyledTable = styled(ChartTable)`
diff --git a/packages/tupaia-web/src/theme/theme.ts b/packages/tupaia-web/src/theme/theme.ts
index 8c1b428265..935ed94058 100644
--- a/packages/tupaia-web/src/theme/theme.ts
+++ b/packages/tupaia-web/src/theme/theme.ts
@@ -110,6 +110,9 @@ theme.overrides = {
['&:not(.MuiTableRow-head)&nth-child(even)']: {
backgroundColor: theme.palette.table?.even,
},
+ ['.flippa-table &:nth-child(even)']: {
+ backgroundColor: theme.palette.background.paper,
+ },
},
head: {
backgroundColor: theme.palette.table?.header,
@@ -125,11 +128,19 @@ theme.overrides = {
['&.MuiTableCell-row-head']: {
fontWeight: theme.typography.fontWeightMedium,
},
+ ['.flippa-table &']: {
+ paddingInline: '1.5rem',
+ },
},
stickyHeader: {
backgroundColor: 'inherit', // make the sticky header cells have the row's background color
},
+ head: {
+ ['.flippa-table &']: {
+ borderBottom: `1px solid #DEDEE0`,
+ },
+ },
},
MuiButton: {
// set these and not the text buttons to avoid having issues wih text sizes in chart legends
From dcc320315872b2ef85d194e5f7055b50ddca75c3 Mon Sep 17 00:00:00 2001
From: alexd-bes <129009580+alexd-bes@users.noreply.github.com>
Date: Wed, 19 Jun 2024 12:12:33 +1200
Subject: [PATCH 5/6] fix(lesmis): Fix redirect issue
---
.../lesmis/src/routes/LesmisAdminRedirect.jsx | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/packages/lesmis/src/routes/LesmisAdminRedirect.jsx b/packages/lesmis/src/routes/LesmisAdminRedirect.jsx
index 8a031d53f4..987415f38c 100644
--- a/packages/lesmis/src/routes/LesmisAdminRedirect.jsx
+++ b/packages/lesmis/src/routes/LesmisAdminRedirect.jsx
@@ -4,15 +4,26 @@
*
*/
import React from 'react';
-import { Navigate, Outlet } from 'react-router-dom';
+import { Navigate, Outlet, useLocation } from 'react-router-dom';
import { useUser } from '@tupaia/admin-panel';
-import { hasAdminPanelAccess } from '../utils';
+import { hasAdminPanelAccess, useAdminPanelUrl, useUrlParams } from '../utils';
export const LesmisAdminRedirect = () => {
- const { data: user } = useUser();
+ const adminUrl = useAdminPanelUrl();
+ const { data: user, isLoading } = useUser();
const userHasAdminPanelAccess = hasAdminPanelAccess(user);
+ const location = useLocation();
+ const { locale } = useUrlParams();
+
+ if (isLoading) {
+ return null;
+ }
if (!userHasAdminPanelAccess) {
- return ;
+ return ;
+ }
+
+ if (location.pathname === adminUrl) {
+ return ;
}
return ;
From b4498f3b13ed4320d9134799db20f58dd8a50f24 Mon Sep 17 00:00:00 2001
From: alexd-bes <129009580+alexd-bes@users.noreply.github.com>
Date: Wed, 19 Jun 2024 13:30:50 +1200
Subject: [PATCH 6/6] fix(LESMIS): Fix LESMIS page titles
---
.../AdminPanel/routes/entities/getEntitiesPageConfig.js | 2 +-
.../AdminPanel/routes/entities/getEntitiesTabRoutes.js | 2 +-
.../routes/surveyResponses/getSurveyResponsesTabRoutes.js | 8 ++++----
.../routes/surveys/getDataElementsPageConfig.js | 2 +-
.../AdminPanel/routes/surveys/getQuestionPageConfig.js | 4 ++--
.../AdminPanel/routes/surveys/getSurveysPageConfig.js | 4 ++--
.../AdminPanel/routes/surveys/getSyncGroupsPageConfig.js | 2 +-
.../AdminPanel/routes/users/getPermissionsPageConfig.jsx | 2 +-
.../views/AdminPanel/routes/users/getUsersPageConfig.jsx | 2 +-
.../routes/visualisations/getDashboardItemsPageConfig.jsx | 2 +-
.../visualisations/getDashboardRelationsPageConfig.js | 2 +-
.../routes/visualisations/getDashboardsPageConfig.js | 4 ++--
.../routes/visualisations/getDataTablesPageConfig.js | 0
.../getMapOverlayGroupRelationsPageConfig.js | 2 +-
.../visualisations/getMapOverlayGroupsPageConfig.js | 4 ++--
.../routes/visualisations/getMapOverlaysPageConfig.jsx | 2 +-
16 files changed, 22 insertions(+), 22 deletions(-)
delete mode 100644 packages/lesmis/src/views/AdminPanel/routes/visualisations/getDataTablesPageConfig.js
diff --git a/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesPageConfig.js
index 946d09579c..7aa237480a 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesPageConfig.js
@@ -59,7 +59,7 @@ export const getEntitiesPageConfig = translate => {
const IMPORT_CONFIG = getImportConfigs(translate, entities.importConfig);
return {
...entities,
- title: translate('admin.entities'),
+ label: translate('admin.entities'),
columns: FIELDS,
importConfig: IMPORT_CONFIG,
nestedViews: [
diff --git a/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesTabRoutes.js b/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesTabRoutes.js
index 09e4c4e5cf..0e64c9f105 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesTabRoutes.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/entities/getEntitiesTabRoutes.js
@@ -7,6 +7,6 @@ import { getEntitiesPageConfig } from './getEntitiesPageConfig';
export const getEntitiesTabRoutes = translate => ({
...entitiesTabRoutes,
- title: translate('admin.entities'),
+ label: translate('admin.entities'),
childViews: [getEntitiesPageConfig(translate)],
});
diff --git a/packages/lesmis/src/views/AdminPanel/routes/surveyResponses/getSurveyResponsesTabRoutes.js b/packages/lesmis/src/views/AdminPanel/routes/surveyResponses/getSurveyResponsesTabRoutes.js
index 3b180c61ae..b689be5a6d 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/surveyResponses/getSurveyResponsesTabRoutes.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/surveyResponses/getSurveyResponsesTabRoutes.js
@@ -13,7 +13,7 @@ const approvedSurveyResponses = (translate, adminUrl) => {
return {
...configs,
reduxId: 'approvedSurveyResponses', // This is used to store the data in the redux store
- title: translate('admin.approved'),
+ label: translate('admin.approved'),
path,
baseFilter: { approval_status: { comparisonValue: 'approved' } },
columns: COLUMNS.filter(column => column.type !== 'delete'),
@@ -27,7 +27,7 @@ const rejectedSurveyResponses = (translate, adminUrl) => {
return {
...configs,
reduxId: 'rejectedSurveyResponses', // This is used to store the data in the redux store
- title: translate('admin.rejected'),
+ label: translate('admin.rejected'),
path,
baseFilter: { approval_status: { comparisonValue: 'rejected' } },
columns: COLUMNS.filter(column => column.type !== 'delete'),
@@ -61,7 +61,7 @@ const draftSurveyResponses = (translate, adminUrl) => {
return {
...configs,
reduxId: 'pendingSurveyResponses', // This is used to store the data in the redux store
- title: translate('admin.review'),
+ label: translate('admin.review'),
path,
default: true,
baseFilter: { approval_status: { comparisonValue: 'pending' } },
@@ -85,7 +85,7 @@ const nonApprovalSurveyResponses = (translate, adminUrl) => {
return {
...configs,
path,
- title: translate('admin.approvalNotRequired'),
+ label: translate('admin.approvalNotRequired'),
baseFilter: { approval_status: { comparisonValue: 'not_required' } },
columns: NON_APPROVAL_COLUMNS,
};
diff --git a/packages/lesmis/src/views/AdminPanel/routes/surveys/getDataElementsPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/surveys/getDataElementsPageConfig.js
index 1ddfc25a2f..87abd365e4 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/surveys/getDataElementsPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/surveys/getDataElementsPageConfig.js
@@ -87,7 +87,7 @@ export const getDataElementsPageConfig = translate => {
return {
...dataElements,
- title: translate('admin.dataElements'),
+ label: translate('admin.dataElements'),
columns: [
...DATA_ELEMENT_FIELDS,
...getButtonsConfig(DATA_ELEMENT_FIELDS, 'dataElement', translate),
diff --git a/packages/lesmis/src/views/AdminPanel/routes/surveys/getQuestionPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/surveys/getQuestionPageConfig.js
index 90ae281a05..be42ca49f2 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/surveys/getQuestionPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/surveys/getQuestionPageConfig.js
@@ -98,13 +98,13 @@ export const getQuestionPageConfig = translate => {
return {
...questions,
- title: translate('admin.questions'),
+ label: translate('admin.questions'),
columns: QUESTION_COLUMNS,
editorConfig: EDITOR_CONFIG,
nestedViews: [
{
...questions.nestedViews[0],
- title: translate('admin.options'),
+ label: translate('admin.options'),
columns: OPTION_COLUMNS,
},
],
diff --git a/packages/lesmis/src/views/AdminPanel/routes/surveys/getSurveysPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/surveys/getSurveysPageConfig.js
index 95f9c7442a..a382bad26f 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/surveys/getSurveysPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/surveys/getSurveysPageConfig.js
@@ -414,7 +414,7 @@ export const getSurveysPageConfig = translate => {
return {
...surveys,
- title: translate('admin.surveys'),
+ label: translate('admin.surveys'),
columns: SURVEY_COLUMNS,
importConfig: IMPORT_CONFIG,
deleteConfig: getDeleteConfigs(translate),
@@ -422,7 +422,7 @@ export const getSurveysPageConfig = translate => {
nestedViews: [
{
...surveys.nestedViews[0],
- title: translate('admin.questions'),
+ label: translate('admin.questions'),
columns: QUESTION_COLUMNS,
},
],
diff --git a/packages/lesmis/src/views/AdminPanel/routes/surveys/getSyncGroupsPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/surveys/getSyncGroupsPageConfig.js
index 76b473c47e..3cac6bb179 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/surveys/getSyncGroupsPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/surveys/getSyncGroupsPageConfig.js
@@ -88,7 +88,7 @@ export const getSyncGroupsPageConfig = translate => {
return {
...syncGroups,
- title: translate('admin.syncGroups'),
+ label: translate('admin.syncGroups'),
columns: COLUMNS,
editorConfig,
createConfig,
diff --git a/packages/lesmis/src/views/AdminPanel/routes/users/getPermissionsPageConfig.jsx b/packages/lesmis/src/views/AdminPanel/routes/users/getPermissionsPageConfig.jsx
index ddfe712b53..efc444d98d 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/users/getPermissionsPageConfig.jsx
+++ b/packages/lesmis/src/views/AdminPanel/routes/users/getPermissionsPageConfig.jsx
@@ -103,7 +103,7 @@ export const getPermissionsPageConfig = translate => {
const deleteConfig = getDeleteConfigs(translate);
return {
...permissions,
- title: translate('admin.permissions'),
+ label: translate('admin.permissions'),
columns: FIELDS,
editorConfig,
createConfig,
diff --git a/packages/lesmis/src/views/AdminPanel/routes/users/getUsersPageConfig.jsx b/packages/lesmis/src/views/AdminPanel/routes/users/getUsersPageConfig.jsx
index 37cbfde06c..75f6bca508 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/users/getUsersPageConfig.jsx
+++ b/packages/lesmis/src/views/AdminPanel/routes/users/getUsersPageConfig.jsx
@@ -159,7 +159,7 @@ export const getUsersPageConfig = translate => {
return {
...users,
- title: translate('admin.users'),
+ label: translate('admin.users'),
columns: COLUMNS,
editorConfig,
importConfig,
diff --git a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardItemsPageConfig.jsx b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardItemsPageConfig.jsx
index 79fe75142f..7ab70d17bc 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardItemsPageConfig.jsx
+++ b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardItemsPageConfig.jsx
@@ -123,7 +123,7 @@ export const getDashboardItemsPageConfig = (translate, adminUrl, isBESAdmin) =>
return {
...dashboardItems,
- title: translate('admin.dashboardItems'),
+ label: translate('admin.dashboardItems'),
columns,
importConfig,
editorConfig,
diff --git a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardRelationsPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardRelationsPageConfig.js
index 61e456af09..57d2f9c619 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardRelationsPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardRelationsPageConfig.js
@@ -112,7 +112,7 @@ export const getDashboardRelationsPageConfig = translate => {
return {
...dashboardRelations,
- title: translate('admin.dashboardRelations'),
+ label: translate('admin.dashboardRelations'),
endpoint: dashboardRelations.endpoint,
columns: FIELDS,
createConfig,
diff --git a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardsPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardsPageConfig.js
index 2902fcca3b..ba65db50fa 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardsPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDashboardsPageConfig.js
@@ -129,7 +129,7 @@ export const getDashboardsPageConfig = translate => {
return {
...dashboards,
- title: translate('admin.dashboards'),
+ label: translate('admin.dashboards'),
columns: COLUMNS,
createConfig,
editorConfig,
@@ -138,7 +138,7 @@ export const getDashboardsPageConfig = translate => {
nestedViews: [
{
...dashboards.nestedViews[0],
- title: translate('admin.dashboardRelations'),
+ label: translate('admin.dashboardRelations'),
columns: RELATION_COLUMNS,
},
],
diff --git a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDataTablesPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getDataTablesPageConfig.js
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupRelationsPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupRelationsPageConfig.js
index be9cbc4151..424a340dfc 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupRelationsPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupRelationsPageConfig.js
@@ -91,7 +91,7 @@ export const getMapOverlayGroupRelationsPageConfig = translate => {
return {
...mapOverlayGroupRelations,
- title: translate('admin.mapOverlayGroupRelations'),
+ label: translate('admin.mapOverlayGroupRelations'),
columns: COLUMNS,
editorConfig,
createConfig,
diff --git a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupsPageConfig.js b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupsPageConfig.js
index c8601558e2..5a5d9f221c 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupsPageConfig.js
+++ b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlayGroupsPageConfig.js
@@ -109,14 +109,14 @@ export const getMapOverlayGroupsPageConfig = translate => {
return {
...mapOverlayGroups,
- title: translate('admin.mapOverlayGroups'),
+ label: translate('admin.mapOverlayGroups'),
columns: COLUMNS,
editorConfig,
createConfig,
nestedViews: [
{
...mapOverlayGroups.nestedViews[0],
- title: translate('admin.mapOverlayGroupRelations'),
+ label: translate('admin.mapOverlayGroupRelations'),
columns: RELATION_COLUMNS,
},
],
diff --git a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlaysPageConfig.jsx b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlaysPageConfig.jsx
index b263cd36d4..4ed52264a0 100644
--- a/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlaysPageConfig.jsx
+++ b/packages/lesmis/src/views/AdminPanel/routes/visualisations/getMapOverlaysPageConfig.jsx
@@ -189,7 +189,7 @@ export const getMapOverlaysPageConfig = (translate, adminUrl, isBESAdmin) => {
const deleteConfig = getDeleteConfigs(translate);
return {
...mapOverlays,
- title: translate('admin.mapOverlays'),
+ label: translate('admin.mapOverlays'),
columns: COLUMNS,
importConfig,
LinksComponent: renderNewMapOverlayVizButton,