Skip to content

Commit

Permalink
Merge pull request #1494 from memphisdev/bugfix/RND-209-after-upgrade…
Browse files Browse the repository at this point in the history
…-pricing-plan-the-new-features-still-not-allowed-to-the-user-required-to-upgrade-plan-although-the-user-already-on-the-highest-plan

After upgrade pricing plan the new features still not allowed to the …
  • Loading branch information
otabek-memphis committed Dec 7, 2023
2 parents 92dcd72 + efaf488 commit 5840800
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui_src/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { handleRefreshTokenRequest, httpRequest } from './services/http';
import { ReactComponent as RedirectIcon } from './assets/images/redirectIcon.svg';
import { ReactComponent as SuccessIcon } from './assets/images/successIcon.svg';
import { ReactComponent as CloseIcon } from './assets/images/closeNotification.svg';
import { showMessages } from './services/genericServices';
import { showMessages, useGetAllowedActions } from './services/genericServices';
import StationOverview from './domain/stationOverview';
import { ReactComponent as ErrorIcon } from './assets/images/errorIcon.svg';
import MessageJourney from './domain/messageJourney';
Expand Down Expand Up @@ -85,6 +85,7 @@ const App = withRouter(() => {
const [displayedNotifications, setDisplayedNotifications] = useState([]);
const [systemMessage, setSystemMessage] = useState([]);
const { stigg } = isCloud() && useStiggContext();
const getAllowedActions = useGetAllowedActions();

const stateRef = useRef([]);
stateRef.current = [cloudLogedIn, persistedNotifications];
Expand Down Expand Up @@ -203,6 +204,7 @@ const App = withRouter(() => {
dispatch({ type: 'SET_ENTITLEMENTS', payload: data?.entitelments });
dispatch({ type: 'SET_PLAN_TYPE', payload: data.plan === planType.FREE });
setRefreshPlan(false);
await getAllowedActions();
showMessages('success', 'Your plan has been successfully updated.');
} catch (error) {
setRefreshPlan(false);
Expand Down

0 comments on commit 5840800

Please sign in to comment.