From caa63e420ebae6301f2b0da5f3d46c38104c7023 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Fri, 3 May 2024 16:52:08 +0530 Subject: [PATCH] #1147 - show organisation category in listing and in home page title --- src/adminApp/Organisation.js | 1 + src/rootApp/ducks.js | 3 ++- src/rootApp/views/Homepage.js | 24 +++++++----------------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/adminApp/Organisation.js b/src/adminApp/Organisation.js index 90e8f7ae8..d385b7255 100644 --- a/src/adminApp/Organisation.js +++ b/src/adminApp/Organisation.js @@ -52,6 +52,7 @@ export const OrganisationList = ({ history, ...props }) => { }> + diff --git a/src/rootApp/ducks.js b/src/rootApp/ducks.js index e76d36ee1..e26712ae3 100644 --- a/src/rootApp/ducks.js +++ b/src/rootApp/ducks.js @@ -110,7 +110,8 @@ export default function(state = initialState, action) { organisation: { id: action.payload.organisationId, name: action.payload.organisationName, - usernameSuffix: action.payload.usernameSuffix + usernameSuffix: action.payload.usernameSuffix, + organisationCategory: action.payload.organisationCategory }, userInfo: action.payload }; diff --git a/src/rootApp/views/Homepage.js b/src/rootApp/views/Homepage.js index 38dc85d37..a4b01ac78 100644 --- a/src/rootApp/views/Homepage.js +++ b/src/rootApp/views/Homepage.js @@ -20,17 +20,14 @@ import { Help } from "@material-ui/icons"; -const Homepage = ({ userInfo }) => { +const Homepage = ({ userInfo, organisation }) => { httpClient.saveAuthTokenForAnalyticsApp(); const showAnalytics = UserInfo.hasPrivilege(userInfo, Privilege.PrivilegeType.Analytics); - const showDataEntryApp = UserInfo.hasPrivilege( - userInfo, - Privilege.PrivilegeType.ViewEditEntitiesOnDataEntryApp - ); + const showDataEntryApp = UserInfo.hasPrivilege(userInfo, Privilege.PrivilegeType.ViewEditEntitiesOnDataEntryApp); return ( - + { name={"Translations"} customIconComponent={} /> - } - /> + } /> {showDataEntryApp && ( { )} {showAnalytics && ( } /> @@ -96,6 +85,7 @@ const Homepage = ({ userInfo }) => { }; const mapStateToProps = state => ({ - userInfo: state.app.userInfo + userInfo: state.app.userInfo, + organisation: state.app.organisation }); export default connect(mapStateToProps)(Homepage);