Unattend no-shows
If any slot is not checked in to within the grace period we need to make them bookable again. Once again a scheduled function can do the heavy lifting, combined with some glue logic on our end.
You will note that this logic is not fail-safe. If you were to book a slot at 10:11 for the 10-11 window nothing will "unattend" the slot if you did not check-in.
Good enough is sometimes just that. And as the requirements are vague and this is no more than a demonstration project, we can leave it at that.
We'll use a service called SlotLoaderService
, instead of directly perusing the Repository to load the complete set of today's Slots. Then, we are going to pass them into the checkForUnattended()
method where the domain service will actually contain the business/domain logic to determine whether or not a slot is attended.
Last updated