From 47c01ae7d59b3fe56164ba87e821f98e06832a36 Mon Sep 17 00:00:00 2001 From: Andrii Podriez Date: Wed, 18 Sep 2024 12:00:03 +0200 Subject: [PATCH 01/12] added missing modifier for active status in users table Signed-off-by: Andrii Podriez --- src/pages/users/users.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/users/users.js b/src/pages/users/users.js index b5890dea..d640f8a0 100644 --- a/src/pages/users/users.js +++ b/src/pages/users/users.js @@ -62,6 +62,10 @@ const Users = ({}) => { setIsNewModalOpened(false); } + const getIconForActiveColumn = (active) => { + return + } + const handleEditUser = async (data) => { if(data){ try { @@ -188,7 +192,7 @@ const Users = ({}) => { - {}}/> + getIconForActiveColumn(active)}/> Date: Wed, 18 Sep 2024 13:58:41 +0200 Subject: [PATCH 02/12] added pages for usergroups and add usergroup dialog Signed-off-by: Andrii Podriez --- src/app.js | 8 ++ src/branding/branding.js | 1 + src/branding/villasweb/villasweb-values.js | 1 + src/common/menu.js | 14 +++ .../usergroups/dialogs/addUsergroupDialog.js | 117 ++++++++++++++++++ src/pages/usergroups/styles.js | 21 ++++ .../tables/usergroup-scenarios-table.js | 22 ++++ .../tables/usergroup-users-table.js | 22 ++++ src/pages/usergroups/usergroup.js | 46 +++++++ src/pages/usergroups/usergroups.js | 82 ++++++++++++ src/store/apiSlice.js | 23 +++- src/store/endpoints/usergroup-endpoints.js | 31 +++++ 12 files changed, 387 insertions(+), 1 deletion(-) create mode 100644 src/pages/usergroups/dialogs/addUsergroupDialog.js create mode 100644 src/pages/usergroups/styles.js create mode 100644 src/pages/usergroups/tables/usergroup-scenarios-table.js create mode 100644 src/pages/usergroups/tables/usergroup-users-table.js create mode 100644 src/pages/usergroups/usergroup.js create mode 100644 src/pages/usergroups/usergroups.js create mode 100644 src/store/endpoints/usergroup-endpoints.js diff --git a/src/app.js b/src/app.js index 79405053..9456c324 100644 --- a/src/app.js +++ b/src/app.js @@ -37,6 +37,8 @@ import './styles/login.css'; import branding from './branding/branding'; import Logout from './pages/login/logout'; import Infrastructure from './pages/infrastructure/infrastructure'; +import Usergroups from './pages/usergroups/usergroups'; +import Usergroup from './pages/usergroups/usergroup'; import { useSelector } from 'react-redux'; const App = () => { @@ -72,6 +74,12 @@ const App = () => { + + + + + + diff --git a/src/branding/branding.js b/src/branding/branding.js index 2d3bf535..257e7ee9 100644 --- a/src/branding/branding.js +++ b/src/branding/branding.js @@ -157,6 +157,7 @@ class Branding { pages.scenarios = true; pages.infrastructure = true; pages.users = true; + pages.usergroups = true; pages.account = true; pages.api = true; diff --git a/src/branding/villasweb/villasweb-values.js b/src/branding/villasweb/villasweb-values.js index 3d235303..f1f368b2 100644 --- a/src/branding/villasweb/villasweb-values.js +++ b/src/branding/villasweb/villasweb-values.js @@ -23,6 +23,7 @@ const villasweb_values = { home: true, scenarios: true, infrastructure: true, + usergroups: true, account: true, api: true, }, diff --git a/src/common/menu.js b/src/common/menu.js index b30eb1c5..82f82ece 100644 --- a/src/common/menu.js +++ b/src/common/menu.js @@ -99,6 +99,13 @@ const SideBarMenu = (props) => { : '' } +
  • + + Usergroups + +
  • : '' } +
  • + + Usergroups + +
  • : '' } -
  • - - Usergroups - -
  • + {currentUser.role === 'Admin' ? +
  • + + Usergroups + +
  • : '' + } : '' } -
  • - - Usergroups - -
  • : '' } - {currentUser.role === 'Admin' ? -
  • - - Usergroups - -
  • : '' - }