This commit is contained in:
2021-03-18 22:13:46 +00:00
parent 3609deeca2
commit 54dfeef488
2 changed files with 31 additions and 20 deletions

View File

@@ -130,7 +130,11 @@ export default {
title: "Review",
icon: "$ayiCalendarCheck",
key: "app:review",
data: { ayaType: formAyaType, recordId: formRecordId }
data: {
ayaType: formAyaType,
recordId: formRecordId,
recordName: recordName
}
});
//AFAIK right now any item with an id and a type can have a history
@@ -311,16 +315,13 @@ export default {
case "review":
//go to list
// path: "/home-reviews/:objectType?/:objectId?",
let objName = null;
if (vm && vm.obj && vm.obj.name) {
objName = vm.obj.name;
}
vm.$router.push({
name: "home-reviews",
params: {
objectType: window.$gz.util.stringToIntOrNull(item.data.ayaType),
objectId: window.$gz.util.stringToIntOrNull(item.data.recordId),
name: objName
name: item.data.recordName
}
});
break;

View File

@@ -1,11 +1,5 @@
<template>
<div>
<div v-if="objectType && objectId" class="mb-6">
<v-icon data-cy="clickThru" @click="navToTarget()" large>{{
iconForType()
}}</v-icon
><span @click="navToTarget()" class="text-h5"> {{ name }}</span>
</div>
<gz-report-selector ref="reportSelector"></gz-report-selector>
<gz-extensions
:aya-type="ayType"
@@ -22,6 +16,8 @@
:reload="reload"
@selection-change="handleSelected"
data-cy="reviewsTable"
:pre-filter-mode="preFilterMode"
@clear-pre-filter="clearPreFilter"
>
</gz-data-table>
</div>
@@ -44,6 +40,14 @@ export default {
if (vm.objectId && vm.objectId != 0 && vm.objectType) {
//OBJECTID,AYATYPE
vm.clientCriteria = `${vm.objectId},${vm.objectType}`;
vm.preFilterMode = {
icon: window.$gz.util.iconForType(vm.objectType),
id: vm.objectId,
ayatype: vm.objectType,
viz: vm.$route.params.name,
clearable: true
};
}
generateMenu(vm);
@@ -58,6 +62,7 @@ export default {
selectedItems: [],
reload: false,
clientCriteria: undefined,
preFilterMode: null,
objectId: null,
objectType: null,
name: null
@@ -69,18 +74,23 @@ export default {
// }
// },
methods: {
navToTarget: function() {
window.$gz.eventBus.$emit("openobject", {
type: this.objectType,
id: this.objectId
});
},
// navToTarget: function() {
// window.$gz.eventBus.$emit("openobject", {
// type: this.objectType,
// id: this.objectId
// });
// },
handleSelected(selected) {
this.selectedItems = selected;
},
iconForType() {
return window.$gz.util.iconForType(this.objectType, 10);
clearPreFilter() {
this.clientCriteria = null;
this.preFilterMode = null;
this.reload = !this.reload;
}
// iconForType() {
// return window.$gz.util.iconForType(this.objectType, 10);
// }
}
};