Skip to content

Commit

Permalink
Mfancher/owner left nav fix (#982)
Browse files Browse the repository at this point in the history
* Wire Password Reset

* Remove unecessary reset temp password code that isn't used with temp password.

We use the link and token method for resetting temp passwords, no need to have temporary password code any longer

* Flag session from the requested token with current

* Allow owners to view users even before applications or clusters are visible

* Small Bug Fix

Small bug fix for when you remove the last application, have it re-disable left nav menu items.
  • Loading branch information
FancMa01 authored Jan 3, 2025
1 parent fbef9bc commit 5c93d66
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const ApplicationMenu = ({ applications, selected, handleApplicationChange }) =>
menu={{
items: getApplicationItems(applications),
onClick: (e) => {
console.log(e);
handleApplicationChange(e.key);
},
}}
Expand Down
20 changes: 10 additions & 10 deletions Tombolo/client-reactjs/src/components/layout/LeftNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const LeftNav = ({ collapsed, onCollapse, clusterLinkRef, appLinkRef }) => {

//control the disabled state of the menu items based on the application and cluster states
useEffect(() => {
if (applicationId && applicationId) {
if (application && applicationId) {
setDisabled(false);
} else {
setDisabled(true);
Expand Down Expand Up @@ -366,23 +366,23 @@ const LeftNav = ({ collapsed, onCollapse, clusterLinkRef, appLinkRef }) => {
),
getItem(
<>
{disabled || clusterDisabled ? (
{/* {disabled || clusterDisabled ? (
<>
<i className="fa fa-fw fa-users" />
<span style={{ marginLeft: '1rem' }}>Users</span>
</>
) : (
<Link style={{ color: 'rgba(255, 255, 255, 0.65)' }} to={'/admin/userManagement'}>
<i className="fa fa-fw fa-users" />
<span style={{ marginLeft: '1rem' }}>Users</span>
</Link>
)}
) : ( */}
<Link style={{ color: 'rgba(255, 255, 255, 0.65)' }} to={'/admin/userManagement'}>
<i className="fa fa-fw fa-users" />
<span style={{ marginLeft: '1rem' }}>Users</span>
</Link>
{/* )} */}
</>,
'11',
null,
null,
null,
clusterDisabled
null
// clusterDisabled
),
getItem(
<>
Expand Down
4 changes: 4 additions & 0 deletions Tombolo/client-reactjs/src/redux/actions/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ function getApplications() {
if (applicationsFinal.length === 0) {
dispatch({ type: Constants.NO_APPLICATION_FOUND, noApplication: true });
dispatch({ type: Constants.APPLICATIONS_RETRIEVED, payload: applicationsFinal });
dispatch({
type: Constants.APPLICATION_SELECTED,
application: { applicationId: null, applicationTitle: null },
});
return;
}
dispatch({ type: Constants.APPLICATIONS_RETRIEVED, payload: applicationsFinal });
Expand Down

0 comments on commit 5c93d66

Please sign in to comment.