From ae1851e63383f62f4fab7e1a62e7e903bbd5a30c Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 24 Jun 2016 08:22:44 -0400 Subject: Fixed enabling compliance settings in the system console without reload (#3401) --- webapp/components/admin_console/compliance_reports.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'webapp/components/admin_console') diff --git a/webapp/components/admin_console/compliance_reports.jsx b/webapp/components/admin_console/compliance_reports.jsx index a93f7a17c..9bde450ff 100644 --- a/webapp/components/admin_console/compliance_reports.jsx +++ b/webapp/components/admin_console/compliance_reports.jsx @@ -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
; } -- cgit v1.2.3-1-g7c22