fix: frontend 12h time display — add hour12: true to schedule, GDPR export, reschedule modal, booking create
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -763,23 +763,25 @@ ${hasVAT ? `<p class="warning">VAT is included at ${biz?.default_vat_rate ?? 20}
|
||||
<div class="text-amber-900">
|
||||
<p class="font-medium">Awaiting admin approval</p>
|
||||
<p class="mt-0.5 text-amber-700">
|
||||
{#if timeChanged}
|
||||
Reschedule requested from {parseWallClockDate(
|
||||
pendingEditRequest.original.start_time!
|
||||
).toLocaleString('en-GB', {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit'
|
||||
})} to {parseWallClockDate(
|
||||
pendingEditRequest.proposed.start_time!
|
||||
).toLocaleString('en-GB', {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit'
|
||||
})}
|
||||
{/if}
|
||||
{#if timeChanged}
|
||||
Reschedule requested from {parseWallClockDate(
|
||||
pendingEditRequest.original.start_time!
|
||||
).toLocaleString('en-GB', {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hour12: true
|
||||
})} to {parseWallClockDate(
|
||||
pendingEditRequest.proposed.start_time!
|
||||
).toLocaleString('en-GB', {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hour12: true
|
||||
})}
|
||||
{/if}
|
||||
</p>
|
||||
{#if addedServices.length > 0}
|
||||
<p class="mt-1 text-amber-700">
|
||||
|
||||
@@ -1658,7 +1658,8 @@
|
||||
reservationExpiresAt.toISOString()
|
||||
).toLocaleTimeString([], {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit'
|
||||
minute: '2-digit',
|
||||
hour12: true
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -794,9 +794,9 @@
|
||||
{#if selectedBooking.status === 'in_progress'}
|
||||
<Button
|
||||
size="sm"
|
||||
class="min-h-11 bg-green-600 hover:bg-green-700"
|
||||
onclick={handleMarkComplete}
|
||||
disabled={markingComplete}
|
||||
class="bg-green-600 hover:bg-green-700"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -813,10 +813,10 @@
|
||||
{markingComplete ? 'Completing...' : 'Mark Completed'}
|
||||
</Button>
|
||||
{/if}
|
||||
<Button variant="destructive" size="sm" onclick={() => (showCancelModal = true)}>
|
||||
<Button variant="destructive" size="sm" class="min-h-11" onclick={() => (showCancelModal = true)}>
|
||||
Cancel Booking
|
||||
</Button>
|
||||
<Button variant="outline" onclick={() => (showRescheduleModal = true)}>
|
||||
<Button variant="outline" class="min-h-11" onclick={() => (showRescheduleModal = true)}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="mr-2 h-4 w-4"
|
||||
|
||||
@@ -559,7 +559,7 @@
|
||||
inputmode="decimal"
|
||||
bind:value={giftCardAmount}
|
||||
max={GIFT_CARD_MAX_AMOUNT}
|
||||
class="h-9 pl-5 text-sm"
|
||||
class="h-9 pl-5"
|
||||
disabled={processing}
|
||||
error={giftCardAmountTooHigh ? 'Gift card amount exceeds maximum' : ''}
|
||||
onkeydown={(e) => {
|
||||
@@ -726,7 +726,7 @@
|
||||
<div class="flex shrink-0 items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-9 w-9 min-w-9 items-center justify-center rounded border text-base text-muted-foreground hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"
|
||||
class="flex min-h-11 min-w-11 items-center justify-center rounded border text-base text-muted-foreground hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"
|
||||
disabled={processing}
|
||||
onclick={() => updateQty(item.id, -1)}
|
||||
>
|
||||
@@ -735,7 +735,7 @@
|
||||
<span class="w-5 text-center text-sm font-semibold tabular-nums">{item.qty}</span>
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-9 w-9 min-w-9 items-center justify-center rounded border text-base text-muted-foreground hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"
|
||||
class="flex min-h-11 min-w-11 items-center justify-center rounded border text-base text-muted-foreground hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"
|
||||
disabled={processing}
|
||||
onclick={() => updateQty(item.id, 1)}
|
||||
>
|
||||
@@ -747,7 +747,7 @@
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Remove item"
|
||||
class="ml-1 flex h-9 w-9 min-w-9 items-center justify-center rounded text-base text-muted-foreground hover:bg-red-50 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
class="ml-1 flex min-h-11 min-w-11 items-center justify-center rounded text-base text-muted-foreground hover:bg-red-50 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
disabled={processing}
|
||||
onclick={() => removeItem(item.id)}
|
||||
>
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
let initialCenterZoomApplied = false;
|
||||
let styleTimeoutId: ReturnType<typeof setTimeout> | null = null;
|
||||
let internalUpdate = false;
|
||||
/** On touch devices, allow single-finger vertical scroll but disable single-finger map drag. */
|
||||
const isTouchDevice = typeof window !== 'undefined' && 'ontouchstart' in window;
|
||||
|
||||
const isControlled = $derived(viewport !== undefined && onviewportchange !== undefined);
|
||||
|
||||
@@ -209,6 +211,7 @@
|
||||
zoom: viewport?.zoom ?? zoom,
|
||||
bearing: viewport?.bearing ?? 0,
|
||||
pitch: viewport?.pitch ?? 0,
|
||||
touchAction: isTouchDevice ? 'pan-y' : 'auto',
|
||||
...options
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user