This commit is contained in:
2020-12-22 15:21:11 +00:00
parent e0b70a49e3
commit 295cf4c0c4
4 changed files with 28 additions and 11 deletions

View File

@@ -5,8 +5,8 @@
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<v-form ref="form">
<div class="mb-6" v-if="obj.objectType">
<v-icon large>{{ iconForType }}</v-icon
><span class="text-h5"> {{ name }}</span>
<v-icon large @click="navToTarget()">{{ iconForType }}</v-icon
><span class="text-h5" @click="navToTarget()"> {{ name }}</span>
</div>
<v-row>
<v-col v-if="currentUserIsASupervisor" cols="12" sm="6" lg="4" xl="3">
@@ -346,7 +346,9 @@ export default {
},
iconForType() {
return window.$gz.util.iconForType(Number.parseInt(this.obj.objectType));
return window.$gz.util.iconForType(
Number.parseInt(this.obj.objectType, 10)
);
},
hasSupervisorRole: function() {
//mirrored from ReviewBiz.cs validation rule at server
@@ -367,6 +369,12 @@ export default {
}
},
methods: {
navToTarget: function() {
window.$gz.eventBus.$emit("openobject", {
type: this.obj.objectType,
id: this.obj.objectId
});
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
},

View File

@@ -1,8 +1,8 @@
<template>
<div>
<div v-if="objectType" class="mb-6">
<v-icon large>{{ iconForType() }}</v-icon
><span class="text-h5"> {{ name }}</span>
<v-icon @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
@@ -44,13 +44,13 @@ export default {
{
fld: "metareviewobjectid",
filter: {
items: [{ op: "=", value: Number.parseInt(vm.objectId) }] //oddly still need this to turn it from a string even when it wasn't a string
items: [{ op: "=", value: Number.parseInt(vm.objectId, 10) }] //oddly still need this to turn it from a string even when it wasn't a string
}
},
{
fld: "AyaType",
filter: {
items: [{ op: "=", value: Number.parseInt(vm.objectType) }]
items: [{ op: "=", value: Number.parseInt(vm.objectType, 10) }]
}
}
]);
@@ -84,11 +84,17 @@ export default {
// }
// },
methods: {
navToTarget: function() {
window.$gz.eventBus.$emit("openobject", {
type: this.objectType,
id: this.objectId
});
},
handleSelected(selected) {
this.selectedItems = selected;
},
iconForType() {
return window.$gz.util.iconForType(Number.parseInt(this.objectType));
return window.$gz.util.iconForType(Number.parseInt(this.objectType, 10));
}
}
};