From 13e85cfcd0a90fca13982163b90ef8f322422dee Mon Sep 17 00:00:00 2001 From: xiaomai Date: Tue, 5 May 2026 07:04:42 +0800 Subject: [PATCH] feat(bookings): allow cancelling booking confirmations Add API endpoint to revert confirmed bookings to pending status Add unconfirm buttons to the bookings list and confirmation page Update inventory summary when a confirmation is cancelled --- app/pages/bookings/index.vue | 62 ++++++++++++++++++- app/pages/confirmation/[token].vue | 57 ++++++++++++++++- .../public/bookings/[token]/cancel.post.ts | 31 ++++++++++ server/utils/booking-repository.ts | 27 ++++++++ shared/booking.ts | 5 ++ 5 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 server/api/public/bookings/[token]/cancel.post.ts diff --git a/app/pages/bookings/index.vue b/app/pages/bookings/index.vue index 16096c1..3078ad6 100644 --- a/app/pages/bookings/index.vue +++ b/app/pages/bookings/index.vue @@ -302,6 +302,17 @@ icon="i-lucide-receipt" size="sm" /> + @@ -365,7 +376,7 @@ diff --git a/app/pages/confirmation/[token].vue b/app/pages/confirmation/[token].vue index 46aa4a6..e326dd0 100644 --- a/app/pages/confirmation/[token].vue +++ b/app/pages/confirmation/[token].vue @@ -1,5 +1,5 @@