This commit is contained in:
@@ -218,9 +218,13 @@ export default {
|
||||
} else {
|
||||
//New record so there has to be a object type and objectId in route
|
||||
// path: "/home-reviews/:recordid/:objectType?/:objectId?",
|
||||
vm.obj.objectId = window.$gz.util.stringToIntOrNull(
|
||||
vm.$route.params.objectId
|
||||
);
|
||||
vm.obj.objectType = window.$gz.util.stringToIntOrNull(
|
||||
vm.$route.params.objectType
|
||||
);
|
||||
|
||||
vm.obj.objectId = vm.$route.params.objectId;
|
||||
vm.obj.objectType = vm.$route.params.objectType;
|
||||
if (!vm.obj.objectId || !vm.obj.objectType) {
|
||||
throw "ObjectType and ObjectId are required to set a reminder";
|
||||
}
|
||||
@@ -346,9 +350,7 @@ export default {
|
||||
},
|
||||
|
||||
iconForType() {
|
||||
return window.$gz.util.iconForType(
|
||||
Number.parseInt(this.obj.objectType, 10)
|
||||
);
|
||||
return window.$gz.util.iconForType(this.obj.objectType);
|
||||
},
|
||||
hasSupervisorRole: function() {
|
||||
//mirrored from ReviewBiz.cs validation rule at server
|
||||
|
||||
@@ -35,8 +35,15 @@ export default {
|
||||
vm.rights = window.$gz.role.getRights(window.$gz.type.Review);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
|
||||
vm.objectId = vm.$route.params.objectId;
|
||||
vm.objectType = vm.$route.params.objectType;
|
||||
vm.objectId = window.$gz.util.stringToIntOrNull(vm.$route.params.objectId);
|
||||
vm.objectType = window.$gz.util.stringToIntOrNull(
|
||||
vm.$route.params.objectType
|
||||
);
|
||||
|
||||
console.log("route params ingested as: ", {
|
||||
id: vm.objectId,
|
||||
type: vm.objectType
|
||||
});
|
||||
|
||||
if (vm.objectId && vm.objectType) {
|
||||
//pre-filter
|
||||
@@ -44,13 +51,13 @@ export default {
|
||||
{
|
||||
fld: "metareviewobjectid",
|
||||
filter: {
|
||||
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
|
||||
items: [{ op: "=", value: vm.objectId }]
|
||||
}
|
||||
},
|
||||
{
|
||||
fld: "AyaType",
|
||||
filter: {
|
||||
items: [{ op: "=", value: Number.parseInt(vm.objectType, 10) }]
|
||||
items: [{ op: "=", value: vm.objectType }]
|
||||
}
|
||||
}
|
||||
]);
|
||||
@@ -94,7 +101,7 @@ export default {
|
||||
this.selectedItems = selected;
|
||||
},
|
||||
iconForType() {
|
||||
return window.$gz.util.iconForType(Number.parseInt(this.objectType, 10));
|
||||
return window.$gz.util.iconForType(this.objectType, 10);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user