This commit is contained in:
2020-07-21 15:46:31 +00:00
parent fcd0b8e2cb
commit 67ac7c8fe1
2 changed files with 19 additions and 15 deletions

View File

@@ -157,6 +157,7 @@ export default {
"Open", "Open",
"Print", "Print",
"Report", "Report",
"Refresh",
"WikiPage", "WikiPage",
"Duplicate", "Duplicate",
"RecordHistory", "RecordHistory",

View File

@@ -188,6 +188,14 @@ export default {
valid: true, valid: true,
loading: false loading: false
}); });
//Check the new count and update accordingly
//this is to ensure that when a user is viewing the latest notifications they don't see the NEW count still in the bell icon in menu since they are viewing them live
let status = await window.$gz.api.get("notify/new-count");
if (status.error) {
throw status.error;
}
window.$gz.store.commit("setNewNotificationCount", status.data);
} }
} catch (error) { } catch (error) {
window.$gz.errorHandler.handleFormError(error, vm); window.$gz.errorHandler.handleFormError(error, vm);
@@ -211,12 +219,9 @@ async function clickHandler(menuItem) {
let m = window.$gz.menu.parseMenuItem(menuItem); let m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) { if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) { switch (m.key) {
// case "new": case "refresh":
// m.vm.$router.push({ await m.vm.getDataFromApi();
// name: "home-notify-subscription", break;
// params: { recordid: 0 }
// });
// break;
// case "extensions": // case "extensions":
// let res = await m.vm.$refs.extensions.open(); // let res = await m.vm.$refs.extensions.open();
// break; // break;
@@ -242,15 +247,13 @@ function generateMenu(vm) {
menuItems: [] menuItems: []
}; };
// if (vm.rights.change) { menuOptions.menuItems.push({
// menuOptions.menuItems.push({ title: "Refresh",
// title: "New", icon: "fa-sync",
// icon: "fa-plus", surface: true,
// surface: true, key: FORM_KEY + ":refresh",
// key: FORM_KEY + ":new", vm: vm
// vm: vm });
// });
// }
// //STUB REPORTS // //STUB REPORTS
// //Report not Print, print is a further option // //Report not Print, print is a further option