This commit is contained in:
2019-12-30 23:46:06 +00:00
parent 86f804a2c7
commit 3fbfe0292a
3 changed files with 107 additions and 30 deletions

View File

@@ -43,14 +43,56 @@ export default {
vm.appBar.menuItems.push({ divider: true, inset: false }); vm.appBar.menuItems.push({ divider: true, inset: false });
} }
//WIKI //WIKI, ATTACHMENTS, RECORD HISTORY
if (formAyaType != 0 && formRecordId != 0) { if (formAyaType != 0 && formRecordId != 0) {
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Attachments"),
icon: "paperclip",
key: "app:attachments",
data: { ayaType: formAyaType, recordId: formRecordId }
});
vm.appBar.menuItems.push({ vm.appBar.menuItems.push({
title: window.$gz.locale.get("WikiPage"), title: window.$gz.locale.get("WikiPage"),
icon: "feather", icon: "feather",
key: "app:wiki", key: "app:wiki",
data: { ayaType: formAyaType, recordId: formRecordId } data: { ayaType: formAyaType, recordId: formRecordId }
}); });
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Review"),
icon: "calendar-check",
key: "app:review",
data: { ayaType: formAyaType, recordId: formRecordId }
});
vm.appBar.menuItems.push({
title: window.$gz.locale.get("History"),
icon: "history",
key: "app:history",
data: { ayaType: formAyaType, recordId: formRecordId }
});
}
//CUSTOMIZE
//set custom fields and link to locale text editor
if (
ctx.formData &&
ctx.formData.formCustomTemplateKey != undefined &&
window.$gz.role.hasRole(window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull)
) {
//add customize menu item
//DIVIDER
//Insert the devider between context and global items
vm.appBar.menuItems.push({ divider: true, inset: false });
//customize
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Customize"),
icon: "sliders-h",
data: ctx.formData.formCustomTemplateKey,
key: "app:customize"
});
} }
//GLOBAL BOTTOM PORTION //GLOBAL BOTTOM PORTION
@@ -61,13 +103,6 @@ export default {
//global menu items //global menu items
//LOGOUT
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Logout"),
icon: "sign-out-alt",
key: "app:logout"
});
//divider //divider
vm.appBar.menuItems.push({ divider: true, inset: false }); vm.appBar.menuItems.push({ divider: true, inset: false });
@@ -94,27 +129,12 @@ export default {
key: "app:nav:abt", key: "app:nav:abt",
data: "ay-about" data: "ay-about"
}); });
//LOGOUT
//CUSTOMIZE vm.appBar.menuItems.push({
//set custom fields and link to locale text editor title: window.$gz.locale.get("Logout"),
icon: "sign-out-alt",
if ( key: "app:logout"
ctx.formData && });
ctx.formData.formCustomTemplateKey != undefined &&
window.$gz.role.hasRole(window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull)
) {
//add customize menu item
//DIVIDER
//Insert the devider between context and global items
vm.appBar.menuItems.push({ divider: true, inset: false });
//customize
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Customize"),
icon: "sliders-h",
data: ctx.formData.formCustomTemplateKey,
key: "app:customize"
});
}
}, },
/////////////////////////////// ///////////////////////////////
// CHANGE HANDLER // CHANGE HANDLER
@@ -182,12 +202,30 @@ export default {
params: { ayatype: item.data } params: { ayatype: item.data }
}); });
break; break;
case "attachments":
vm.$router.push({
name: "ay-attachments",
params: { ayatype: item.data.ayaType, recordid: item.data.recordId }
});
break;
case "wiki": case "wiki":
vm.$router.push({ vm.$router.push({
name: "ay-wiki", name: "ay-wiki",
params: { ayatype: item.data.ayaType, recordid: item.data.recordId } params: { ayatype: item.data.ayaType, recordid: item.data.recordId }
}); });
break; break;
case "review":
vm.$router.push({
name: "ay-review",
params: { ayatype: item.data.ayaType, recordid: item.data.recordId }
});
break;
case "history":
vm.$router.push({
name: "ay-history",
params: { ayatype: item.data.ayaType, recordid: item.data.recordId }
});
break;
case "logout": case "logout":
vm.$router.push("/login"); vm.$router.push("/login");
break; break;

View File

@@ -376,13 +376,31 @@ export default new Router({
component: () => component: () =>
import(/* webpackChunkName: "ay" */ "./views/ay-customize.vue") import(/* webpackChunkName: "ay" */ "./views/ay-customize.vue")
}, },
{
path: "/ay-attachments/:ayatype/:recordid",
name: "ay-attachments",
component: () =>
import(/* webpackChunkName: "home" */ "./views/ay-attachments.vue")
},
{ {
path: "/ay-wiki/:ayatype/:recordid", path: "/ay-wiki/:ayatype/:recordid",
name: "ay-wiki", name: "ay-wiki",
component: () => component: () =>
import(/* webpackChunkName: "home" */ "./views/ay-wiki.vue") import(/* webpackChunkName: "home" */ "./views/ay-wiki.vue")
}, },
{
path: "/ay-review/:ayatype/:recordid",
name: "ay-review",
component: () =>
import(/* webpackChunkName: "home" */ "./views/ay-review.vue")
},
{
path: "/ay-history/:ayatype/:recordid",
name: "ay-history",
component: () =>
import(/* webpackChunkName: "home" */ "./views/ay-history.vue")
},
//TEST TEST TEST TEST TEST
{ {
//TEST WIDGETS //TEST WIDGETS
path: "/testinventory", path: "/testinventory",

View File

@@ -0,0 +1,21 @@
<template>
<UnderConstruction />
</template>
<script>
import UnderConstruction from "../components/underconstruction.vue";
//THIS IS THE RECORD HISTORY FEATURE SCREEN FOR AN INDIVIDUAL ITEMS RECORD HISTORY
export default {
components: {
UnderConstruction
},
beforeCreate() {
window.$gz.eventBus.$emit("menu-change", {
isMain: true,
icon: "history",
title: window.$gz.locale.get("History"),
helpUrl: "form-ay-history"
});
}
};
</script>