diff --git a/imports/ui/layouts/mainLayout/mainLayout.html b/imports/ui/layouts/mainLayout/mainLayout.html index bc7a1302..38b26db3 100644 --- a/imports/ui/layouts/mainLayout/mainLayout.html +++ b/imports/ui/layouts/mainLayout/mainLayout.html @@ -7,6 +7,33 @@ +
{{> Template.dynamic template=main}} {{> Template.dynamic template=bottom}} diff --git a/imports/ui/layouts/mainLayout/mainLayout.js b/imports/ui/layouts/mainLayout/mainLayout.js index edb3bcb1..582208b3 100644 --- a/imports/ui/layouts/mainLayout/mainLayout.js +++ b/imports/ui/layouts/mainLayout/mainLayout.js @@ -1,11 +1,23 @@ import { Template } from 'meteor/templating'; -import { UserData } from '/imports/api/indexDB.js'; +import { UserData, developmentValidationEnabledFalse } from '/imports/api/indexDB.js'; import './mainLayout.html' import './mainLayout.scss' +import swal from 'sweetalert'; +import Cookies from 'js-cookie'; + import '../../components/topNav/topNav' import '../../components/sideNav/sideNav' +// swal({ +// icon: "error", +// title: "Please fix the following fields", +// text: error.error.map(i => i.split(/(?=[A-Z])/).join(' ').toLowerCase()).join(', '), +// button: { className: 'btn btn-primary' } +// }); + +// Cookies.set('don't, false, { expires: 1 }) + //writes to DB preferences on change and window close/log out //doesn't run on unload as it should as websocket closes before method reaches server, is an issue in meteor @@ -45,15 +57,27 @@ Template.mainLayout.events({ saveSidebarPreference() } } - } -}); + }, + "click #hideDevelopmentNotification": (eve, templ)=>{ + return Cookies.set('underDevelopmentShown', true, 5) + }, +}) Template.mainLayout.helpers({ openSidebar() { return Session.get('openedSidebar') ? "active" : ""; - } + }, }); +Template.mainLayout.onRendered(function(){ + //used to toggle under development toggle + if (!developmentValidationEnabledFalse) { + return + } else if (!Cookies.get('underDevelopmentShown')){ + $('.underDev').modal('show'); + } +}) + Template.mainLayout.onCreated(function () { //is used to close sidebar on click outside sidebar var handlerForSidebar = function (event) { diff --git a/imports/ui/pages/returnedCurrencies/returnedCurrencies.html b/imports/ui/pages/returnedCurrencies/returnedCurrencies.html index d3f60bb7..1633089f 100644 --- a/imports/ui/pages/returnedCurrencies/returnedCurrencies.html +++ b/imports/ui/pages/returnedCurrencies/returnedCurrencies.html @@ -1,26 +1,4 @@