This commit is contained in:
2020-07-10 17:09:54 +00:00
parent 39651cdf6f
commit bddac7ce53
2 changed files with 120 additions and 16 deletions

View File

@@ -55,7 +55,7 @@ function initNavPanel() {
key++, key++,
"license" "license"
); );
addNavItem("Logout", "fa-sign-out-alt", "/login", [], key++, "logout"); //addNavItem("Logout", "fa-sign-out-alt", "/login", [], key++, "logout");
window.$gz.store.commit("setHomePage", "/adm-license"); window.$gz.store.commit("setHomePage", "/adm-license");
return; return;
} }

View File

@@ -1,24 +1,128 @@
<template> <template>
<UnderConstruction /> <div>
<!-- <gz-extensions
:ayaType="ayType"
:selectedItems="selectedItems"
ref="extensions"
>
</gz-extensions> -->
<gz-data-table
formKey="widget-list"
:dataListKey="dataListKey"
:dataListFilter="dataListFilter"
:dataListSort="dataListSort"
:showSelect="rights.change"
v-on:selection-change="handleSelected"
>
</gz-data-table>
</div>
</template> </template>
<script> <script>
import UnderConstruction from "../components/underconstruction.vue"; const FORM_KEY = "notification-subscriptions";
export default { export default {
components: { created() {
UnderConstruction this.rights = window.$gz.role.getRights(window.$gz.type.NotifySubscription);
window.$gz.eventBus.$on("menu-click", clickHandler);
generateMenu(this);
}, },
beforeCreate() { beforeDestroy() {
window.$gz.eventBus.$emit("menu-change", { window.$gz.eventBus.$off("menu-click", clickHandler);
isMain: true, },
icon: "fa-bullhorn", data() {
title: "NotifySubscriptionList", return {
helpUrl: "form-home-notify-subscriptions", currentListViewId: 1,
formData: { dataListKey: "NotifySubscriptionDataList",
ayaType: window.$gz.type.NotifySubscription dataListFilter: "",
} dataListSort: "",
}); rights: window.$gz.role.defaultRightsObject(),
ayType: window.$gz.type.NotifySubscription,
selectedItems: []
};
},
methods: {
handleSelected(selected) {
this.selectedItems = selected;
}
} }
}; };
/////////////////////////////
//
//
async function clickHandler(menuItem) {
if (!menuItem) {
return;
}
let m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) {
case "new":
m.vm.$router.push({
name: "notification-subscription-edit",
params: { recordid: 0 }
});
break;
// case "extensions":
// let res = await m.vm.$refs.extensions.open();
// break;
default:
window.$gz.eventBus.$emit(
"notify-warning",
FORM_KEY + "::context click: [" + m.key + "]"
);
}
}
}
//////////////////////
//
//
function generateMenu(vm) {
let menuOptions = {
isMain: true,
icon: "fa-bullhorn",
title: "NotifySubscriptionList",
helpUrl: "form-home-notify-subscriptions",
menuItems: [],
formData: {
ayaType: window.$gz.type.NotifySubscription
}
};
if (vm.rights.change) {
menuOptions.menuItems.push({
title: "New",
icon: "fa-plus",
surface: true,
key: FORM_KEY + ":new",
vm: vm
});
}
// //STUB REPORTS
// //Report not Print, print is a further option
// menuOptions.menuItems.push({
// title: "Report",
// icon: "fa-file-alt",
// key: FORM_KEY + ":report",
// vm: vm
// });
// menuOptions.menuItems.push({
// title: "stub: Last report used",
// icon: "fa-file-alt",
// key: FORM_KEY + ":report:STUBlastusedreportid",
// vm: vm
// });
// menuOptions.menuItems.push({
// title: "Extensions",
// icon: "fa-puzzle-piece",
// key: FORM_KEY + ":extensions",
// vm: vm
// });
window.$gz.eventBus.$emit("menu-change", menuOptions);
}
</script> </script>