d1ab91adfa
Add customer confirmation/cancellation flow for appointments: - DB migration (0013): add confirmation_status, confirmed_at, cancelled_at, confirmation_token to appointments table with index on token column - schema.ts + factories.ts + types: expose new columns and ConfirmationStatus type - GET /api/book/confirm/:token — tokenized confirm via email link (redirects) - GET /api/book/cancel/:token — tokenized cancel via email link, single-use token - POST /api/appointments/:id/confirm — portal/staff confirm endpoint - POST /api/appointments/:id/cancel — portal/staff cancel endpoint - Reminder emails now include Confirm/Cancel CTA buttons with tokenized links - Reminder service generates confirmation token if missing before sending - Staff calendar shows confirmation status indicator on appointment cards and in the detail modal (confirmed ✓ / customer cancelled ✗) - /booking/confirmed, /booking/cancelled, /booking/error redirect pages - 23 new unit tests covering all new endpoints and edge cases Co-Authored-By: Paperclip <noreply@paperclip.ing>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
export function BookingErrorPage() {
|
||
return (
|
||
<div
|
||
style={{
|
||
minHeight: "100vh",
|
||
display: "flex",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
fontFamily: "system-ui, sans-serif",
|
||
background: "#fef2f2",
|
||
}}
|
||
>
|
||
<div
|
||
style={{
|
||
background: "#fff",
|
||
borderRadius: 12,
|
||
padding: "2.5rem 3rem",
|
||
boxShadow: "0 4px 24px rgba(0,0,0,0.08)",
|
||
textAlign: "center",
|
||
maxWidth: 420,
|
||
}}
|
||
>
|
||
<div style={{ fontSize: 56, marginBottom: "0.5rem" }}>⚠️</div>
|
||
<h1 style={{ color: "#b91c1c", fontSize: 24, margin: "0 0 0.5rem" }}>
|
||
Link Invalid or Expired
|
||
</h1>
|
||
<p style={{ color: "#4b5563", margin: "0 0 1.5rem" }}>
|
||
This confirmation link is invalid, has already been used, or your
|
||
appointment has already passed. Please contact us if you need help.
|
||
</p>
|
||
<a
|
||
href="/"
|
||
style={{
|
||
display: "inline-block",
|
||
padding: "0.6rem 1.5rem",
|
||
background: "#dc2626",
|
||
color: "#fff",
|
||
borderRadius: 6,
|
||
textDecoration: "none",
|
||
fontWeight: 600,
|
||
fontSize: 14,
|
||
}}
|
||
>
|
||
Back to Portal
|
||
</a>
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|