From faa998c7e1c9a72c7db26d4e3f82169dab48a0da Mon Sep 17 00:00:00 2001 From: xiaomai Date: Mon, 13 Apr 2026 08:49:54 +0800 Subject: [PATCH] refactor(bookings): simplify capacity tracking to use seats Replace 'pax' booking mode with 'seat' Consolidate inventory summary to track only seat counts Update database schema and UI for seat-centric capacity --- app/pages/bookings/index.vue | 74 ++++++------------- app/pages/confirmation/[token].vue | 9 --- app/pages/index.vue | 12 ++- app/pages/receipt/[token].vue | 2 +- app/pages/seat/[token].vue | 5 +- server/api/bookings/capacity.patch.ts | 6 +- server/api/public/bookings.post.ts | 2 +- .../public/bookings/[token]/confirm.post.ts | 2 +- server/utils/booking-repository.ts | 37 +++++++--- server/utils/bookings.ts | 19 ++--- server/utils/db-init.ts | 46 +++++++++++- shared/booking.ts | 61 +++++---------- 12 files changed, 136 insertions(+), 139 deletions(-) diff --git a/app/pages/bookings/index.vue b/app/pages/bookings/index.vue index a7afb33..93a9968 100644 --- a/app/pages/bookings/index.vue +++ b/app/pages/bookings/index.vue @@ -45,15 +45,15 @@
- + @@ -90,10 +90,10 @@

- Pending tables + Pending bookings

- {{ summary.pendingTables }} + {{ pendingCount }}

@@ -109,7 +109,7 @@
-
+
{{ item.value }}

-

- {{ item.meta }} -

@@ -134,10 +131,10 @@

- Total Tables + Total Seats

- {{ formatInventoryNumber(summary.totalTables) }} + {{ formatInventoryNumber(summary.totalSeats) }}

@@ -213,13 +210,10 @@
-