case 4468 - reviews keep the type of the record they're for; a review without one is refused
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div v-if="formState.ready">
|
||||
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||
<v-form ref="form">
|
||||
<div v-if="obj.aType" class="mb-6">
|
||||
<div v-if="obj.sockType" class="mb-6">
|
||||
<v-icon large @click="navToTarget()">{{ iconForType }}</v-icon
|
||||
><span class="text-h5" @click="navToTarget()"> {{ name }}</span>
|
||||
</div>
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
userId: window.$gz.store.state.userId,
|
||||
assignedByUserId: window.$gz.store.state.userId,
|
||||
objectId: null,
|
||||
aType: null,
|
||||
sockType: null, //case 4468: the server field is SockType; the form used AyaNova's AType, so reviews were saved with no type
|
||||
overDue: false
|
||||
},
|
||||
formState: {
|
||||
@@ -222,7 +222,7 @@ export default {
|
||||
},
|
||||
|
||||
iconForType() {
|
||||
return window.$gz.util.iconForType(this.obj.aType);
|
||||
return window.$gz.util.iconForType(this.obj.sockType);
|
||||
},
|
||||
hasSupervisorRole: function() {
|
||||
return window.$gz.role.hasRole([
|
||||
@@ -298,10 +298,10 @@ export default {
|
||||
vm.obj.objectId = window.$gz.util.stringToIntOrNull(
|
||||
vm.$route.params.objectId
|
||||
);
|
||||
vm.obj.aType = window.$gz.util.stringToIntOrNull(
|
||||
vm.obj.sockType = window.$gz.util.stringToIntOrNull(
|
||||
vm.$route.params.aType
|
||||
);
|
||||
if (!vm.obj.objectId || !vm.obj.aType) {
|
||||
if (!vm.obj.objectId || !vm.obj.sockType) {
|
||||
throw "SockType and ObjectId are required to create a review";
|
||||
}
|
||||
}
|
||||
@@ -337,7 +337,7 @@ export default {
|
||||
methods: {
|
||||
navToTarget: function() {
|
||||
window.$gz.eventBus.$emit("openobject", {
|
||||
type: this.obj.aType,
|
||||
type: this.obj.sockType,
|
||||
id: this.obj.objectId
|
||||
});
|
||||
},
|
||||
@@ -515,7 +515,7 @@ async function clickHandler(menuItem) {
|
||||
name: "review-edit",
|
||||
params: {
|
||||
recordid: 0,
|
||||
aType: m.vm.obj.aType,
|
||||
aType: m.vm.obj.sockType,
|
||||
objectId: m.vm.obj.objectId,
|
||||
name: m.vm.name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user