Removed old asset assignment collection (delete from the db if you have it). Added proper history associated with assigning and unassigning. Need to still add events attached to a CB which then transition to the history when the CB is checked in.
This commit is contained in:
@@ -4,11 +4,17 @@ export const AssetAssignmentHistory = new Mongo.Collection('assetAssignmentHisto
|
||||
|
||||
/*
|
||||
Maintains a historical record of asset assignments.
|
||||
assetKey: The MongoID of the asset. AssetID's could be reused, so this prevents that eventuality from messing up historical records.
|
||||
assetId: The asset's assigned ID (not a MongoID).
|
||||
serial: The asset's serial number (part of the device, or defined by the manufacturer). In some cases this may be a partial serial. It is not a unique identifier, but should be mostly unique. This might be undefined if a serial was never provided for the original asset.
|
||||
assetTypeName: The name of the asset type, or "UNK" if one could not be found (shouldn't happen). This is stored because these records could be kept longer than the assets in the system.
|
||||
assigneeType: One of 'Student' or 'Staff'.
|
||||
assigneeId: The MongoID of the student or staff the asset was assigned to.
|
||||
startDate: The date/time of the assignment.
|
||||
endDate: The date/time of the unassignment.
|
||||
startCondition: TODO
|
||||
endCondition: TODO
|
||||
comment: A text block detailing the reason for the unassignment of the device. Eg: 'Broke Screen' or 'End of year' or 'Not charging' or 'Needs replacement'.
|
||||
startCondition: One of the condition options: [New, Like New, Good, Okay, Damaged] (see assets.unassign for details).
|
||||
endCondition: One of the condition options: [New, Like New, Good, Okay, Damaged] (see assets.unassign for details).
|
||||
startConditionDetails: An optional text block for details on the condition.
|
||||
endConditionDetails: An optional text block for details on the condition.
|
||||
*/
|
||||
Reference in New Issue
Block a user