-
Notifications
You must be signed in to change notification settings - Fork 0
Implement CheckOutItem #8
Description
This is a database entry created for each item being checked out (for those approved in the CheckOutRequest). As mentioned in the design doc, this gives us the ability to show it in the item information page individually with all the pending requests, as well as logs of the checked out item history. Refer to the design doc for the schema.
This is tied to the Item Requests feature #6. When an admin approves a CheckOutRequest, all approved items should have corresponding CheckOutItems created. For now, let's just display these CheckOutItems in the AdminPage where we show the expanded item details. You can just list this as a list of logs as long as it contains the important info (a link to the CheckOutRequest admin view with that particular request expanded, quantity, active: if the item is being checked out or not, and returned: if the item has been returned).
Just some clarification about the active and return states:
- Initially, upon the admin's first approval of the request, the active and returned fields are both false.
- When the requester checks out the items, active becomes true and returned remains false.
- When the requester returns the items, active becomes false and returned becomes true.