forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MM-29630] Add error states to cloud guest invites when going over li…
…mit (mattermost#6783) * Don't show panel in subscription section if at user limit * Show warning states when inviting more guests than user limit * Working, PR commit * Add snapshot
- Loading branch information
1 parent
aed2dc7
commit 9a27041
Showing
7 changed files
with
199 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
components/invitation_modal/invitation_modal_guest_step/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
import {connect} from 'react-redux'; | ||
|
||
import { | ||
getConfig, | ||
getLicense, | ||
} from 'mattermost-redux/selectors/entities/general'; | ||
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users'; | ||
import {getStandardAnalytics} from 'mattermost-redux/actions/admin'; | ||
import {bindActionCreators, Dispatch} from 'redux'; | ||
import {GenericAction} from 'mattermost-redux/types/actions'; | ||
import {getCloudSubscription} from 'mattermost-redux/actions/cloud'; | ||
|
||
import {GlobalState} from 'types/store'; | ||
|
||
import {isAdmin} from 'utils/utils.jsx'; | ||
|
||
import InvitationModalGuestsStep from './invitation_modal_guests_step'; | ||
|
||
function mapStateToProps(state: GlobalState) { | ||
return { | ||
userLimit: getConfig(state).ExperimentalCloudUserLimit, | ||
analytics: state.entities.admin.analytics, | ||
userIsAdmin: isAdmin(getCurrentUser(state).roles), | ||
isCloud: getLicense(state).Cloud === 'true', | ||
subscription: state.entities.cloud.subscription, | ||
}; | ||
} | ||
|
||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) { | ||
return { | ||
actions: bindActionCreators( | ||
{ | ||
getStandardAnalytics, | ||
getCloudSubscription, | ||
}, | ||
dispatch, | ||
), | ||
}; | ||
} | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(InvitationModalGuestsStep); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters