Skip to content

Commit

Permalink
[frontend] Fix subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Hassine committed Oct 20, 2021
1 parent f072e06 commit f120e9a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Profile extends Component {
const subscriptionStatus = R.head(
R.filter(
(n) => n.id === 'SUBSCRIPTION_MANAGER',
R.pathOr([], ['settings', 'platform_modules'], props.settings),
R.pathOr([], ['settings', 'platform_modules'], props),
),
)?.enable;
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ const ProfileOverviewComponent = (props) => {
},
});
};

return (
<div>
<Grid container={true} spacing={3}>
Expand Down Expand Up @@ -270,6 +269,7 @@ const ProfileOverviewComponent = (props) => {
userId={me.id}
userSubscriptionId={userSubscription.id}
paginationOptions={null}
disabled={!subscriptionStatus}
/>
</ListItemSecondaryAction>
</ListItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,16 @@ class UserSubscriptionPopover extends Component {
}

render() {
const { classes, t, userSubscriptionId } = this.props;
const {
classes, t, userSubscriptionId, disabled,
} = this.props;
return (
<div className={classes.container}>
<IconButton
onClick={this.handleOpen.bind(this)}
aria-haspopup="true"
style={{ marginTop: 1 }}
disabled={disabled}
>
<MoreVert />
</IconButton>
Expand Down Expand Up @@ -199,6 +202,7 @@ class UserSubscriptionPopover extends Component {

UserSubscriptionPopover.propTypes = {
userId: PropTypes.string,
disabled: PropTypes.bool,
userSubscriptionId: PropTypes.string,
paginationOptions: PropTypes.object,
classes: PropTypes.object,
Expand Down

0 comments on commit f120e9a

Please sign in to comment.