diff --git a/CHANGELOG.md b/CHANGELOG.md index efa169d..522b515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- Bookings, inquiries and their detail pages now use the shared Merqo section, card and empty-state components. + ## [0.11.3] - 2026-12-02 ### Changed diff --git a/README.md b/README.md index 7feed5c..b0782e3 100644 --- a/README.md +++ b/README.md @@ -407,3 +407,5 @@ A deep link into the vendor dashboard survives the login and legal gates: every The `/admin/activity` paging links and boundaries are pinned by `src/app/admin/activity/activity-paging.dom.test.tsx` (listed in `CHANGELOG.md`). The landing phone mockups use rem font sizes, so the dashboard text-size adjuster scales them like the rest of the page. + +The bookings list, inquiries and their detail pages use the shared `@merqo/ui` `Section`, `ElevatedCard` and `EmptyState` (see `CHANGELOG.md`). diff --git a/src/app/dashboard/bookings/README.md b/src/app/dashboard/bookings/README.md index f00c728..39d7b72 100644 --- a/src/app/dashboard/bookings/README.md +++ b/src/app/dashboard/bookings/README.md @@ -111,3 +111,5 @@ Money and times here come from `@merqo/ui` (`Money`, `formatMoney`, `Timestamp`, Signed-out and stale-terms vendors come back here after sign-in or terms acceptance: the page passes its own path and query to `getVendorSession` as `returnTo`. The new-inquiry and balance-due-soon badges use the `warning` tone instead of palette amber. + +The list sections ("Inquiries" and "Your bookings") are `@merqo/ui` `Section`s, and the empty inquiry list uses its `EmptyState`. The phone-only card list and the GET filter form stay local: there is no shared equivalent. diff --git a/src/app/dashboard/bookings/[id]/README.md b/src/app/dashboard/bookings/[id]/README.md index 2a1c33f..005b1ef 100644 --- a/src/app/dashboard/bookings/[id]/README.md +++ b/src/app/dashboard/bookings/[id]/README.md @@ -66,3 +66,5 @@ Money and times here come from `@merqo/ui` (`Money`, `formatMoney`, `Timestamp`, Signed-out and stale-terms vendors come back here after sign-in or terms acceptance: the page passes its own path and query to `getVendorSession` as `returnTo`. The cancel and reschedule dialogs show their inline error through the shared `FormError`. + +The Customer, Amounts and Booking ID blocks are `@merqo/ui` `ElevatedCard`s with a `Section` each, and `transaction-status-card.tsx` is an `ElevatedCard` too. diff --git a/src/app/dashboard/bookings/[id]/page.tsx b/src/app/dashboard/bookings/[id]/page.tsx index 9497ab4..c837bba 100644 --- a/src/app/dashboard/bookings/[id]/page.tsx +++ b/src/app/dashboard/bookings/[id]/page.tsx @@ -3,13 +3,20 @@ import { BookingIdCopy } from "./booking-id-copy"; import { checkoutKind } from "@/lib/checkout-kind"; import { RecoverDepositButton } from "./recover-deposit-button"; import { notFound } from "next/navigation"; -import { Money, Timestamp, formatDate, qrSvg } from "@merqo/ui"; +import { + ElevatedCard, + Money, + PageHeader, + Section, + Timestamp, + formatDate, + qrSvg, +} from "@merqo/ui"; import { getVendorSession } from "@/lib/vendor-session"; import { getBooking } from "@/lib/bookings"; import { getTransaction } from "@/lib/transactions"; import { getInquiryForBooking } from "@/lib/inquiry-inbox"; import { readVendorPlan } from "@/lib/vendor-entitlement"; -import { PageHeader } from "@merqo/ui"; import { BookingStatusBadge, BalanceDueIndicator } from "../booking-badges"; import { TermsSnapshot } from "../inquiry-badges"; import { CustomerPhone } from "../customer-phone"; @@ -76,68 +83,65 @@ export default async function BookingDetailPage({ } /> -
-

- Customer -

-
-
Phone
-
- -
- {inquiry && ( - <> -
Booking terms
-
- -
- - )} -
-
+ +
+
+
Phone
+
+ +
+ {inquiry && ( + <> +
Booking terms
+
+ +
+ + )} +
+
+
-
-

- Amounts -

-
-
Total
-
- -
-
Deposit
-
- -
-
Balance
-
- -
-
Balance due
-
- -
-
-
+ +
+
+
Total
+
+ +
+
Deposit
+
+ +
+
Balance
+
+ +
+
Balance due
+
+ +
+
+
+
-
-

- Booking ID -

-
- - {booking.id} - - -
-

- Paste this into your qkit event’s payment settings to show this - booking’s live deposit and balance status there. -

-
+ +
+
+ + {booking.id} + + +
+

+ Paste this into your qkit event’s payment settings to show + this booking’s live deposit and balance status there. +

+
+
+

{label}

@@ -53,7 +53,7 @@ export function TransactionStatusCard({ /> )} -
+ ); } diff --git a/src/app/dashboard/bookings/inquiries/[id]/README.md b/src/app/dashboard/bookings/inquiries/[id]/README.md index 8b16ed8..60b7364 100644 --- a/src/app/dashboard/bookings/inquiries/[id]/README.md +++ b/src/app/dashboard/bookings/inquiries/[id]/README.md @@ -37,3 +37,5 @@ Buttons, inputs, dialogs, badges and the other shared primitives here are import "Received" and the terms-accepted time render through `@merqo/ui` `formatDateTime` ("7 Nov 2026, 1:30 am", Singapore time). The page passes its own path to `getVendorSession` as `returnTo`, so login and the legal gate bring the vendor back to this inquiry. + +The details panel is an `@merqo/ui` `ElevatedCard`. diff --git a/src/app/dashboard/bookings/inquiries/[id]/page.tsx b/src/app/dashboard/bookings/inquiries/[id]/page.tsx index 7a6aeeb..ba8378e 100644 --- a/src/app/dashboard/bookings/inquiries/[id]/page.tsx +++ b/src/app/dashboard/bookings/inquiries/[id]/page.tsx @@ -3,7 +3,12 @@ import Link from "next/link"; import { notFound } from "next/navigation"; import { getVendorSession } from "@/lib/vendor-session"; import { getInquiry } from "@/lib/inquiry-inbox"; -import { PageHeader, formatDate, formatDateTime } from "@merqo/ui"; +import { + ElevatedCard, + PageHeader, + formatDate, + formatDateTime, +} from "@merqo/ui"; import { CustomerPhone } from "../../customer-phone"; import { InquiryStatusBadge, TermsSnapshot } from "../../inquiry-badges"; import { NewBookingDialog } from "../../new-booking-dialog"; @@ -37,7 +42,7 @@ export default async function InquiryDetailPage({ action={} /> -
+
Phone
@@ -53,7 +58,7 @@ export default async function InquiryDetailPage({

{inquiry.message}

-
+
{inquiry.booking_id ? ( diff --git a/src/app/dashboard/bookings/inquiry-table.tsx b/src/app/dashboard/bookings/inquiry-table.tsx index 5bdab4f..e776672 100644 --- a/src/app/dashboard/bookings/inquiry-table.tsx +++ b/src/app/dashboard/bookings/inquiry-table.tsx @@ -1,7 +1,12 @@ "use client"; import Link from "next/link"; -import { DataTable, Timestamp, type DataTableColumn } from "@merqo/ui"; +import { + DataTable, + EmptyState, + Timestamp, + type DataTableColumn, +} from "@merqo/ui"; import { PhoneList, PhoneRow } from "@/components/list/phone-row"; import { InquiryStatusBadge } from "./inquiry-badges"; import type { Inquiry } from "@/lib/types"; @@ -39,7 +44,12 @@ const columns: DataTableColumn[] = [ export function InquiryTable({ inquiries }: { inquiries: Inquiry[] }) { if (inquiries.length === 0) { - return

No open inquiries.

; + return ( + + ); } return ( <> diff --git a/src/app/dashboard/bookings/page.dom.test.tsx b/src/app/dashboard/bookings/page.dom.test.tsx index 61b784d..3ee5689 100644 --- a/src/app/dashboard/bookings/page.dom.test.tsx +++ b/src/app/dashboard/bookings/page.dom.test.tsx @@ -125,6 +125,9 @@ describe("BookingsPage", () => { screen.getByRole("button", { name: "Inquiry form" }), ).toBeInTheDocument(); expect(screen.getByText("No open inquiries.")).toBeInTheDocument(); + expect( + screen.getByText("New requests from your inquiry form appear here."), + ).toBeInTheDocument(); }); it("shows the empty state with no bookings", async () => { diff --git a/src/app/dashboard/bookings/page.tsx b/src/app/dashboard/bookings/page.tsx index 2941255..3eb4c26 100644 --- a/src/app/dashboard/bookings/page.tsx +++ b/src/app/dashboard/bookings/page.tsx @@ -1,5 +1,6 @@ import type { Metadata } from "next"; import { redirect } from "next/navigation"; +import { Section } from "@merqo/ui"; import { PageShell } from "@/components/page-shell"; import { getVendorSession } from "@/lib/vendor-session"; import { pathWithSearch } from "@/lib/return-to"; @@ -51,50 +52,35 @@ export default async function BookingsPage({ description="Deposit now, balance later, for events booked ahead." action={} > -
-
-

- Inquiries{" "} - - ({inquiries.length}) - -

+
+
-
- -
-
+ +
-
-

- Your bookings{" "} - - {result.ok ? `(${total})` : ""} - -

-
- -
-
- {result.ok ? ( - - ) : ( - - )} -
+
+ + {result.ok ? ( + + ) : ( + + )} {result.ok && ( bookingListHref({ ...params, page: next })} /> )} -
+
); }