With the integration of the new status column for bookings, it would be preferable to keep the booking in database and simply change its status to 'cancel' when you cancel it via the action button or the timeline.
So I've added partial updating via the API with a new PATCH method to partially edit a booking. It is currently active for status changes.
Graphically, this translates into the disappearance of the action buttons if the booking has already been canceled, although it remains visible in the table and timeline (the style is a proposal for the moment, intended simply to graphically differentiate a canceled booking from others).
I've also added a filter to the filter_by_active method to exclude cancelled bookings.
Test plan:
1) Create a booking on a bookable item
2) Cancel it and see that it's simply deleted
3) Apply the patch and run “restart_all”.
4) Repeat the same cancel operation and see that it's still there, albeit with a different appearance.
5) Try the filters in the table
Sponsored by: BibLibre Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>