+
+
+
+
+ {i18n('MAINTENANCE_MODE')}
+
+
+ {i18n('MAINTENANCE_MODE_DESCRIPTION')}
+
+
+ );
+ }
+}
+
+export default MainMaintenancePage;
\ No newline at end of file
diff --git a/client/src/app/main/main-maintenance-page.scss b/client/src/app/main/main-maintenance-page.scss
new file mode 100644
index 00000000..002f49da
--- /dev/null
+++ b/client/src/app/main/main-maintenance-page.scss
@@ -0,0 +1,39 @@
+@import "../../scss/vars";
+
+.main-maintenance-page {
+ margin: auto;
+ width: 70%;
+ padding: 50px 100px;
+ border: 2px solid $dark-grey;
+ text-align: center;
+ background-color: white;
+ border-radius: 4px;
+
+ &__icon {
+ color: $primary-yellow;
+ background-color: $light-grey;
+ display: inline-block;
+ padding: 10px 15px;
+ margin-bottom: 20px;
+ border-radius: 10px;
+ }
+
+ &__title {
+ font-size: $font-size--xl;
+ margin-bottom: 30px;
+ color: $primary-yellow;
+ font-weight: bold;
+ }
+
+ &__description {
+ font-size: $font-size--bg;
+ color: $primary-black;
+ }
+}
+
+@media screen and (max-width: 500px) {
+ .main-maintenance-page {
+ padding-left: 0;
+ padding-right: 0;
+ }
+}
diff --git a/client/src/data/fixtures/system-fixtures.js b/client/src/data/fixtures/system-fixtures.js
index 672e964e..ad471c8a 100644
--- a/client/src/data/fixtures/system-fixtures.js
+++ b/client/src/data/fixtures/system-fixtures.js
@@ -8,6 +8,7 @@ module.exports = [
data: {
'language': 'en',
'reCaptchaKey': '6LfM5CYTAAAAAGLz6ctpf-hchX2_l0Ge-Bn-n8wS',
+ 'maintenance-mode': false,
'departments': [
{id: 1, name: 'Sales Support', owners: 2},
{id: 2, name: 'Technical Issues', owners: 5},
diff --git a/client/src/data/languages/en.js b/client/src/data/languages/en.js
index ae1a3ebf..b1472eee 100644
--- a/client/src/data/languages/en.js
+++ b/client/src/data/languages/en.js
@@ -117,6 +117,7 @@ export default {
'TRANSFER_TICKETS_TO': 'Transfer tickets to',
'COMMENTS': 'Comments',
'DELETE_STAFF_MEMBER': 'Delete staff member',
+ 'MAINTENANCE_MODE': 'Maintenance mode',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'This is a form for creating tickets. Fill the form and send us your issues/doubts/suggestions. Our support system will answer it as soon as possible.',
@@ -145,6 +146,7 @@ export default {
'EDIT_STAFF_DESCRIPTION': 'Here you can edit information about a staff member.',
'MY_ACCOUNT_DESCRIPTION': 'Here you can edit information about you.',
'DEPARTMENTS_DESCRIPTION': 'A department is a group where the tickets can go. They are used to categorize the tickets. You can assign them to other staff members.',
+ 'MAINTENANCE_MODE_DESCRIPTION': 'The support system is in maintenance mode, thus unavailable at the moment. We will come back as soon as possible.',
//ERRORS
'EMAIL_OR_PASSWORD': 'Email or password invalid',
diff --git a/client/src/index.js b/client/src/index.js
index 00c95300..2d96694c 100644
--- a/client/src/index.js
+++ b/client/src/index.js
@@ -33,7 +33,7 @@ store.dispatch(SessionActions.initSession());
let unsubscribe = store.subscribe(() => {
console.log(store.getState());
- if (store.getState().session.initDone) {
+ if (store.getState().session.initDone && store.getState().config.initDone) {
unsubscribe();
renderApplication();
}
diff --git a/client/src/reducers/config-reducer.js b/client/src/reducers/config-reducer.js
index 3526bedf..5aee8933 100644
--- a/client/src/reducers/config-reducer.js
+++ b/client/src/reducers/config-reducer.js
@@ -7,7 +7,8 @@ class ConfigReducer extends Reducer {
getInitialState() {
return {
- language: sessionStore.getItem('language')
+ language: sessionStore.getItem('language'),
+ initDone: false
};
}
@@ -35,7 +36,8 @@ class ConfigReducer extends Reducer {
}));
return _.extend({}, state, payload.data, {
- language: currentLanguage || payload.language
+ language: currentLanguage || payload.language,
+ initDone: true
});
}
}
diff --git a/client/src/scss/_vars.scss b/client/src/scss/_vars.scss
index cea6e370..61188e1a 100644
--- a/client/src/scss/_vars.scss
+++ b/client/src/scss/_vars.scss
@@ -5,6 +5,8 @@ $secondary-red: #FB6362;
$primary-blue: #414A59;
$secondary-blue: #20B8c5;
+$primary-yellow: #E5D151;
+
$primary-green: #82CA9C;
$very-light-grey: #F7F7F7;