This commit is contained in:
@@ -305,8 +305,8 @@ export default {
|
|||||||
vm.$router.push({
|
vm.$router.push({
|
||||||
name: "home-reviews",
|
name: "home-reviews",
|
||||||
params: {
|
params: {
|
||||||
objectType: Number.parseInt(item.data.ayaType),
|
objectType: Number.parseInt(item.data.ayaType, 10),
|
||||||
objectId: Number.parseInt(item.data.recordId),
|
objectId: Number.parseInt(item.data.recordId, 10),
|
||||||
name: objName
|
name: objName
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,10 +10,13 @@ export default {
|
|||||||
// called from App.vue
|
// called from App.vue
|
||||||
handleOpenObjectClick(vm, tid) {
|
handleOpenObjectClick(vm, tid) {
|
||||||
//expects extra data (tid) to be one of { type: [AYATYPE], id: [RECORDID] }
|
//expects extra data (tid) to be one of { type: [AYATYPE], id: [RECORDID] }
|
||||||
|
//console.log("open-object-handler::handleOpenObjectClick, tid:", tid);
|
||||||
//NOTE: for new objects all edit pages assume record ID 0 means create rather than open
|
//NOTE: for new objects all edit pages assume record ID 0 means create rather than open
|
||||||
|
|
||||||
if (tid.type && tid.id != null) {
|
if (tid.type && tid.id != null) {
|
||||||
|
//if these come from route parameters they may well be strings
|
||||||
|
tid.type = Number.parseInt(tid.type, 10);
|
||||||
|
tid.id = Number.parseInt(tid.id, 10);
|
||||||
switch (tid.type) {
|
switch (tid.type) {
|
||||||
case ayatype.Memo:
|
case ayatype.Memo:
|
||||||
vm.$router.push({
|
vm.$router.push({
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
<div class="mb-6" v-if="obj.objectType">
|
<div class="mb-6" v-if="obj.objectType">
|
||||||
<v-icon large>{{ iconForType }}</v-icon
|
<v-icon large @click="navToTarget()">{{ iconForType }}</v-icon
|
||||||
><span class="text-h5"> {{ name }}</span>
|
><span class="text-h5" @click="navToTarget()"> {{ name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col v-if="currentUserIsASupervisor" cols="12" sm="6" lg="4" xl="3">
|
<v-col v-if="currentUserIsASupervisor" cols="12" sm="6" lg="4" xl="3">
|
||||||
@@ -346,7 +346,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
iconForType() {
|
iconForType() {
|
||||||
return window.$gz.util.iconForType(Number.parseInt(this.obj.objectType));
|
return window.$gz.util.iconForType(
|
||||||
|
Number.parseInt(this.obj.objectType, 10)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
hasSupervisorRole: function() {
|
hasSupervisorRole: function() {
|
||||||
//mirrored from ReviewBiz.cs validation rule at server
|
//mirrored from ReviewBiz.cs validation rule at server
|
||||||
@@ -367,6 +369,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
navToTarget: function() {
|
||||||
|
window.$gz.eventBus.$emit("openobject", {
|
||||||
|
type: this.obj.objectType,
|
||||||
|
id: this.obj.objectId
|
||||||
|
});
|
||||||
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="objectType" class="mb-6">
|
<div v-if="objectType" class="mb-6">
|
||||||
<v-icon large>{{ iconForType() }}</v-icon
|
<v-icon @click="navToTarget()" large>{{ iconForType() }}</v-icon
|
||||||
><span class="text-h5"> {{ name }}</span>
|
><span @click="navToTarget()" class="text-h5"> {{ name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||||
<gz-extensions
|
<gz-extensions
|
||||||
@@ -44,13 +44,13 @@ export default {
|
|||||||
{
|
{
|
||||||
fld: "metareviewobjectid",
|
fld: "metareviewobjectid",
|
||||||
filter: {
|
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",
|
fld: "AyaType",
|
||||||
filter: {
|
filter: {
|
||||||
items: [{ op: "=", value: Number.parseInt(vm.objectType) }]
|
items: [{ op: "=", value: Number.parseInt(vm.objectType, 10) }]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
@@ -84,11 +84,17 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
navToTarget: function() {
|
||||||
|
window.$gz.eventBus.$emit("openobject", {
|
||||||
|
type: this.objectType,
|
||||||
|
id: this.objectId
|
||||||
|
});
|
||||||
|
},
|
||||||
handleSelected(selected) {
|
handleSelected(selected) {
|
||||||
this.selectedItems = selected;
|
this.selectedItems = selected;
|
||||||
},
|
},
|
||||||
iconForType() {
|
iconForType() {
|
||||||
return window.$gz.util.iconForType(Number.parseInt(this.objectType));
|
return window.$gz.util.iconForType(Number.parseInt(this.objectType, 10));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user