Merged the AssetAssignment collection with the Asset collection; Updated views for assigning assets; Added view to find asset assignments by assetId.
This commit is contained in:
@@ -57,9 +57,16 @@
|
||||
|
||||
const createAssignment = () => {
|
||||
if(assetId && assetId.length && selectedAssignee) {
|
||||
Meteor.call("AssetAssignments.add", assetId, selectedCategory === 'Student' ? "Student" : "Staff", selectedAssignee._id)
|
||||
// TODO: Set focus to the asset ID field.
|
||||
assetId = "";
|
||||
Meteor.call("assets.assign", assetId, selectedCategory === 'Student' ? "Student" : "Staff", selectedAssignee._id, (err, result) => {
|
||||
if(err) {
|
||||
console.error(err);
|
||||
//TODO: Display an error!
|
||||
}
|
||||
else {
|
||||
// TODO: Set focus to the asset ID field.
|
||||
assetId = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user