From df7d5b95ba33291ec9b91543e6f4c2eeafb9c594 Mon Sep 17 00:00:00 2001 From: horatio Date: Tue, 31 May 2022 13:03:32 -0400 Subject: [PATCH] 8699 enabled maintenance banners --- client/app/components/auth/login-dialog.js | 5 +++-- client/app/styles/modules/_m-modal-controls.scss | 9 +++++++++ .../templates/components/auth/login-dialog.hbs | 15 ++++++++++++++- netlify.toml | 12 ++++++++++-- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/client/app/components/auth/login-dialog.js b/client/app/components/auth/login-dialog.js index 40f0f49e0..c36cbaa54 100644 --- a/client/app/components/auth/login-dialog.js +++ b/client/app/components/auth/login-dialog.js @@ -2,6 +2,7 @@ import Component from '@ember/component'; import { computed } from '@ember/object'; import ENV from 'labs-zap-search/config/environment'; +/* eslint-disable no-unused-vars */ const MAINTENANCE_RANGE = ENV.maintenanceTimes; export default Component.extend({ @@ -14,9 +15,9 @@ export default Component.extend({ }), hasUpcomingMaintenance: computed(function() { - const [, end] = MAINTENANCE_RANGE.map(string => new Date(string)); + const [start, end] = MAINTENANCE_RANGE.map(string => new Date(string)); const now = new Date(); - return now < end; + return now < start; }), }); diff --git a/client/app/styles/modules/_m-modal-controls.scss b/client/app/styles/modules/_m-modal-controls.scss index 47d768ddb..0477483e9 100644 --- a/client/app/styles/modules/_m-modal-controls.scss +++ b/client/app/styles/modules/_m-modal-controls.scss @@ -96,3 +96,12 @@ padding-left: 8px; } } + +// maintenance notice +.maintenance-wrapper { + background-color: #E5E5E5; + + p { + padding: 3px 5px 0 5px; + } +} diff --git a/client/app/templates/components/auth/login-dialog.hbs b/client/app/templates/components/auth/login-dialog.hbs index bf855439b..ab4d1a743 100644 --- a/client/app/templates/components/auth/login-dialog.hbs +++ b/client/app/templates/components/auth/login-dialog.hbs @@ -15,7 +15,20 @@

Once you're signed in, you'll be redirected back here, where you'll see your list of assigned projects.

{{#if this.hasUpcomingMaintenance}} -

Please note: This portal will be down for 24 hours of system maintenance starting Monday, June 28 at 7PM.

+
+

+ Please be advised that there will be scheduled maintenance on ZAP Search and the Applicant Portal from June 1, 2022, 3:00 pm to June 1, 2022, 4:00 pm. During that time, you will not be able to sign in to your account. Thank you for your understanding. For help, please email ZAP_feedback_DL@planning.nyc.gov +

+
+ +{{/if}} + +{{#if this.isMaintenancePeriod}} +
+

+ Please be advised that we are currently performing scheduled maintenance from June 1, 2022, 3:00 pm to June 1, 2022, 4:00 pm. During this time, you will not be able to sign in to your account. Thank you for your understanding. For help, please email ZAP_feedback_DL@planning.nyc.gov +

+
{{/if}}