diff options
author | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-19 03:33:30 -0400 |
---|---|---|
committer | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-19 03:33:30 -0400 |
commit | 2bfc10b63edfd578c6204f5e4b439d8f843e1361 (patch) | |
tree | 6f98b5798be24134204d75d5e060a6f2213d874d /src/components/mao-admin.js | |
parent | 98b0aa1092d8b46b621a7d9d2772aa972d6957b6 (diff) |
Making small improvements to increase security and make the admin console smoother.
Diffstat (limited to 'src/components/mao-admin.js')
-rw-r--r-- | src/components/mao-admin.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/mao-admin.js b/src/components/mao-admin.js index 7047cab..1ce85e7 100644 --- a/src/components/mao-admin.js +++ b/src/components/mao-admin.js @@ -111,6 +111,10 @@ class MaoAdmin extends connect(store)(PageViewElement) { registryHidden: Boolean }} + _firstRendered() { + this.updateInformation(); + } + _stateChanged(state) { this.signedIn = state.firebaseAuth .signedIn; this.isAdmin = state.firebaseAdmin .isAdmin; @@ -129,10 +133,11 @@ class MaoAdmin extends connect(store)(PageViewElement) { var btn = this.shadowRoot.getElementById('toggleRequestsBtn'); if(this.requestsHidden) { btn.innerHTML = "Show Hours Requests"; - this.updateInformation(); } else { btn.innerHTML = "Hide Hours Requests"; } + } else { + console.log("Null shadow root"); } } @@ -143,10 +148,12 @@ class MaoAdmin extends connect(store)(PageViewElement) { var btn = this.shadowRoot.getElementById('toggleRegistryBtn'); if(this.registryHidden) { btn.innerHTML = "Show Comps & Registry"; - this.updateInformation(); + } else { btn.innerHTML = "Hide Comps & Registry"; } + } else { + console.log("Null shadow root"); } } |