Checkout: reservation countdown, 'keep it 10 more minutes', and a message when a hold runs out

Basket changes that free or take places reload the page data, so places
removed from the basket show up in the shop again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaXE9U7AmW3dfD2w6cbLfk
This commit is contained in:
agent 2026-10-24 09:32:56 +00:00
parent 28773f2599
commit 021d06d3e4
6 changed files with 187 additions and 28 deletions

View file

@ -73,7 +73,8 @@ export function mapBasket(payload: BasketPayload): Basket | null {
itemImageUrl: media ? getFileUrl('media', media.id, media.file) : undefined,
slotStart: slot?.start,
slotEnd: slot?.end,
slotCapacity: slot?.capacity
slotCapacity: slot?.capacity,
heldUntil: line.heldUntil ? new Date(String(line.heldUntil).replace(' ', 'T')).toISOString() : undefined
};
});
return {
@ -83,7 +84,8 @@ export function mapBasket(payload: BasketPayload): Basket | null {
email: record.email || null,
customerDetails: record.customerDetails || null,
stripePaymentIntentId: record.stripePaymentIntentId || null,
lines: mappedLines
lines: mappedLines,
serverNow: Date.now()
};
}