Fixed Asset list not allowing update or add of assets; Modified conditionDetails to be a text area everywhere but when adding assets (should be only one line then).

This commit is contained in:
2022-08-21 18:41:39 -07:00
parent 23838990d4
commit f3d9b85083
2 changed files with 15 additions and 6 deletions

View File

@@ -114,8 +114,9 @@ Meteor.methods({
}
else throw new Meteor.Error("User Permission Error");
},
'assets.update'(_id, assetId, serial, condition, conditionDetails) {
'assets.update'(_id, assetTypeId, assetId, serial, condition, conditionDetails) {
check(_id, String);
check(assetTypeId, String);
check(assetId, String);
if(serial) check(serial, String);
check(condition, String);
@@ -129,7 +130,7 @@ Meteor.methods({
if(Roles.userIsInRole(Meteor.userId(), "admin", {anyScope:true})) {
//TODO: Need to first verify there are no checked out assets to the staff member.
Assets.update({_id}, {$set: {assetId, serial, condition, conditionDetail}});
Assets.update({_id}, {$set: {assetTypeId, assetId, serial, condition, conditionDetails}});
}
else throw new Meteor.Error("User Permission Error");
},