From d2aa2a73962eb86db405821e4c518809bb3914b4 Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Mon, 8 Aug 2016 09:57:17 -0400
Subject: PLT-3802 Moved compliance section of system console back to the
 bottom of the sidebar (#3751)

---
 webapp/components/admin_console/admin_sidebar.jsx | 33 ++++++++++++++---------
 1 file changed, 20 insertions(+), 13 deletions(-)

(limited to 'webapp/components/admin_console/admin_sidebar.jsx')

diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx
index 3966f0219..4fcfe2731 100644
--- a/webapp/components/admin_console/admin_sidebar.jsx
+++ b/webapp/components/admin_console/admin_sidebar.jsx
@@ -323,6 +323,25 @@ export default class AdminSidebar extends React.Component {
             );
         }
 
+        let otherCategory = null;
+        if (license || audits) {
+            otherCategory = (
+                <AdminSidebarCategory
+                    parentLink='/admin_console'
+                    icon='fa-wrench'
+                    title={
+                        <FormattedMessage
+                            id='admin.sidebar.other'
+                            defaultMessage='OTHER'
+                        />
+                    }
+                >
+                    {license}
+                    {audits}
+                </AdminSidebarCategory>
+            );
+        }
+
         return (
             <div className='admin-sidebar'>
                 <AdminSidebarHeader/>
@@ -347,7 +366,6 @@ export default class AdminSidebar extends React.Component {
                                     />
                                 }
                             />
-                            {audits}
                             <AdminSidebarSection
                                 name='logs'
                                 title={
@@ -675,18 +693,7 @@ export default class AdminSidebar extends React.Component {
                             </AdminSidebarSection>
                         </AdminSidebarCategory>
                         {this.renderTeams()}
-                        <AdminSidebarCategory
-                            parentLink='/admin_console'
-                            icon='fa-wrench'
-                            title={
-                                <FormattedMessage
-                                    id='admin.sidebar.other'
-                                    defaultMessage='OTHER'
-                                />
-                            }
-                        >
-                            {license}
-                        </AdminSidebarCategory>
+                        {otherCategory}
                     </ul>
                 </div>
                 <SelectTeamModal
-- 
cgit v1.2.3-1-g7c22

