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",
"Print",
"Report",
"Refresh",
"WikiPage",
"Duplicate",
"RecordHistory",

View File

@@ -188,6 +188,14 @@ export default {
valid: true,
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) {
window.$gz.errorHandler.handleFormError(error, vm);
@@ -211,12 +219,9 @@ async function clickHandler(menuItem) {
let m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) {
// case "new":
// m.vm.$router.push({
// name: "home-notify-subscription",
// params: { recordid: 0 }
// });
// break;
case "refresh":
await m.vm.getDataFromApi();
break;
// case "extensions":
// let res = await m.vm.$refs.extensions.open();
// break;
@@ -242,15 +247,13 @@ function generateMenu(vm) {
menuItems: []
};
// if (vm.rights.change) {
// menuOptions.menuItems.push({
// title: "New",
// icon: "fa-plus",
// surface: true,
// key: FORM_KEY + ":new",
// vm: vm
// });
// }
menuOptions.menuItems.push({
title: "Refresh",
icon: "fa-sync",
surface: true,
key: FORM_KEY + ":refresh",
vm: vm
});
// //STUB REPORTS
// //Report not Print, print is a further option