Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve loan status: reservation | active | overdue | completed #41

Open
6 tasks
torbengb opened this issue Sep 22, 2021 · 0 comments
Open
6 tasks

improve loan status: reservation | active | overdue | completed #41

torbengb opened this issue Sep 22, 2021 · 0 comments
Assignees
Labels
2prio Medium Do when there are no prio1 issues. functionality New feature or request object loans Issues related to loans.

Comments

@torbengb
Copy link
Owner

torbengb commented Sep 22, 2021

Currently, 'status' is just a BOOL in LOANS that tells that a given loan is active (not returned yet).
Need to change this:

  • Tool itself needs a (redundant?) status [AVAILABLE | LOANED] to indicate whether it's free to loan.

  • If the tool status is AVAILABLE then show the LOAN button.

  • If the tool status is LOANED then show the RESERVE button (waiting list). Perhaps give an indication like MAX(agreedend)?

  • Action LOAN sets the tool status to LOANED, then creates an entry in table LOANS.

  • Action RESERVE creates an entry in table LOANS (#TODO later: the owner should be notified).

  • Action RETURN ends the current loan, then checks for any reservations and picks the one with MIN(agreedstart), then sets that loan to status ACTIVE (#TODO later: the new lender should be notified). If no next loan then set tool status to AVAILABLE.

@torbengb torbengb added functionality New feature or request object loans Issues related to loans. 2prio Medium Do when there are no prio1 issues. labels Sep 22, 2021
@torbengb torbengb self-assigned this Sep 22, 2021
@torbengb torbengb changed the title implement better status: reservation | active | overdue | completed implement better loan status: reservation | active | overdue | completed Sep 22, 2021
@torbengb torbengb changed the title implement better loan status: reservation | active | overdue | completed improve loan status: reservation | active | overdue | completed Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2prio Medium Do when there are no prio1 issues. functionality New feature or request object loans Issues related to loans.
Projects
None yet
Development

No branches or pull requests

1 participant