Fixed enabling compliance settings in the system console without reload (#3401)

Этот коммит содержится в:
Harrison Healey
2016-06-24 08:22:44 -04:00
коммит произвёл Christopher Speller
родитель 994d73be6f
Коммит ae1851e633

Просмотреть файл

@@ -25,6 +25,7 @@ export default class ComplianceReports extends React.Component {
this.getDateTime = this.getDateTime.bind(this);
this.state = {
enabled: AdminStore.getConfig().ComplianceSettings.Enable,
reports: AdminStore.getComplianceReports(),
serverError: null
};
@@ -33,7 +34,7 @@ export default class ComplianceReports extends React.Component {
componentDidMount() {
AdminStore.addComplianceReportsChangeListener(this.onComplianceReportsListenerChange);
if (global.window.mm_license.IsLicensed !== 'true' || global.window.mm_config.EnableCompliance !== 'true') {
if (global.window.mm_license.IsLicensed !== 'true' || !this.state.enabled) {
return;
}
@@ -112,7 +113,7 @@ export default class ComplianceReports extends React.Component {
render() {
var content = null;
if (global.window.mm_license.IsLicensed !== 'true' || global.window.mm_config.EnableCompliance !== 'true') {
if (global.window.mm_license.IsLicensed !== 'true' || !this.state.enabled) {
return <div/>;
}