fix: admin booking modals and schedule components polish
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -225,13 +225,12 @@
|
||||
});
|
||||
|
||||
function handleOpenBooking(bookingId: string) {
|
||||
open = false;
|
||||
openBookingModal(bookingId);
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal.Root bind:open>
|
||||
<Modal.Content class="max-h-[90vh] max-w-sm overflow-y-auto md:max-w-3xl">
|
||||
<Modal.Content class="max-h-[90vh] max-w-[calc(100%-2rem)] overflow-y-auto sm:max-w-md md:max-w-3xl">
|
||||
<Modal.Header>
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
@@ -271,7 +270,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-gray-500">Email</div>
|
||||
<div class="font-medium break-all">{selectedUser.email || '—'}</div>
|
||||
<div class="font-medium break-words" title={selectedUser.email}>{selectedUser.email || '—'}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-gray-500">Phone</div>
|
||||
@@ -280,13 +279,23 @@
|
||||
<div>
|
||||
<div class="text-xs text-gray-500">Date of Birth</div>
|
||||
<div class="font-medium">
|
||||
{selectedUser.dateOfBirth
|
||||
? new SvelteDate(selectedUser.dateOfBirth).toLocaleDateString('en-US', {
|
||||
{#if selectedUser.dateOfBirth}
|
||||
{(() => {
|
||||
const dob = new SvelteDate(selectedUser.dateOfBirth);
|
||||
const dateStr = dob.toLocaleDateString('en-US', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
})
|
||||
: '—'}
|
||||
});
|
||||
const today = new Date();
|
||||
let age = today.getFullYear() - dob.getFullYear();
|
||||
const m = today.getMonth() - dob.getMonth();
|
||||
if (m < 0 || (m === 0 && today.getDate() < dob.getDate())) age--;
|
||||
return `${dateStr} (${age})`;
|
||||
})()}
|
||||
{:else}
|
||||
—
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -308,9 +317,10 @@
|
||||
<div class="font-medium">
|
||||
{#if customerRelationship?.lastVisitDate}
|
||||
{new SvelteDate(customerRelationship.lastVisitDate).toLocaleDateString('en-US', {
|
||||
year: 'numeric',
|
||||
weekday: 'short',
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric'
|
||||
year: 'numeric'
|
||||
})}
|
||||
{:else}
|
||||
—
|
||||
@@ -324,7 +334,7 @@
|
||||
<img
|
||||
src={selectedUser.profilePicUrl}
|
||||
alt="Profile"
|
||||
class="mt-2 h-24 w-24 rounded-lg object-cover"
|
||||
class="mt-2 h-20 w-20 md:h-24 md:w-24 rounded-lg object-cover"
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user