Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Every save of an event deleted all the bookings linked to it and created new ones, so booking ids changed on each edit. The visitor mailer saw a delete and a create instead of a change, attendees were re-invited on every edit with the event path off, the QR in the invitation stopped matching, and a check-in was lost by any later edit. createBookingsForEvent now patches the existing booking for each resource still on the event, creates bookings only for new resources and removes only the bookings whose resource was taken off. A resource flagged _changed is still recreated so its approval starts again. Linked bookings outside the event's current period are fetched by id so a moved event finds them. PPT-2813
|
Tested on HIO UAT with this branch served at /workplace-2813/ (build/feat/PPT-2813-linked-bookings/workplace, served main.js matches the branch build). Create: Book Room in Ord Street with one external attendee. Requests were POST /events, then one POST /bookings for the attendee (booking 70186). The attendee received one invitation. Edit: moved the start time by 30 minutes. Requests were PATCH /events/:id, GET /bookings?type=visitor for the new period (empty, the event moved), GET /bookings/70186 by id from linked_bookings, then PATCH /bookings/70186. No DELETE and no POST, so the booking id survived the edit. The attendee received one "Your meeting details have changed" email and no second invitation. Not covered yet: catering-order and asset bookings on an edit, and the check-in survival case. |
|
Second UAT run with a catering order on the event (Sun 27 Sep, G-04). Create: POST /events, then one POST /bookings for the visitor and one for the catering order. Edit (start moved 30 minutes): PATCH /events, then GET and PATCH of the visitor booking in place, but no request at all for the catering order. The catering sync is guarded in event-form.service.ts by |
What
createBookingsForEvent(shared by visitor, catering-order and asset bookings) deleted every booking linked to an event and recreated them on each save. It now:_changed(catering orders and asset requests), so its approval starts again as beforeWhy
Booking ids changed on every edit, so the visitor mailer saw a delete and a create rather than a change: with the event path off attendees were re-invited on every edit and never told what changed, the QR code in the invitation stopped matching the booking, and a check-in was lost by any later edit. Three API calls per attendee per save became one or none. Full history and consequences are on PPT-2813.
Testing
nx test bookings: 37 files pass. Four new cases inbooking.fn.spec.tscover patch in place, no request when nothing changed, removal of a dropped attendee, and a moved event finding its bookings by id.Notes for review
approved,rejectedorchecked_in, so a normal user's edit keeps whatever state the booking had. Before, an unchanged resource carried overapprovedandrejectedon the recreated booking, so the outcome is the same; the_changedpath is untouched.PPT-2813