style: fix prefer-const and prettier formatting issues
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
openUserModal: (userId: string) => void;
|
||||
}
|
||||
|
||||
let { openBookingModal, openUserModal }: Props = $props();
|
||||
const { openBookingModal, openUserModal }: Props = $props();
|
||||
|
||||
type TodayAppointment = {
|
||||
id: string;
|
||||
@@ -155,7 +155,7 @@
|
||||
return blocker.description?.startsWith('RESERVATION:') ?? false;
|
||||
}
|
||||
|
||||
let availableStartOptions = $derived.by(() => {
|
||||
const availableStartOptions = $derived.by(() => {
|
||||
const wh = workingHours;
|
||||
if (!wh || !wh.isOpen) return [];
|
||||
const startMin = timeToMinutes(wh.startTime);
|
||||
@@ -174,7 +174,7 @@
|
||||
return options;
|
||||
});
|
||||
|
||||
let availableEndOptions = $derived.by(() => {
|
||||
const availableEndOptions = $derived.by(() => {
|
||||
const wh = workingHours;
|
||||
if (!wh || !wh.isOpen) return [];
|
||||
const endMin = timeToMinutes(wh.endTime);
|
||||
@@ -197,7 +197,7 @@
|
||||
return options;
|
||||
});
|
||||
|
||||
let suggestedLunch = $derived.by(() => {
|
||||
const suggestedLunch = $derived.by(() => {
|
||||
if (!workingHours || !availableHours || !workingHours.isOpen) return null;
|
||||
const wh = workingHours;
|
||||
const ah = availableHours;
|
||||
@@ -284,7 +284,7 @@
|
||||
| LunchTimelineItem
|
||||
| ClosingTimeTimelineItem;
|
||||
|
||||
let timeline = $derived.by(() => {
|
||||
const timeline = $derived.by(() => {
|
||||
const items: TimelineItem[] = [];
|
||||
|
||||
for (const apt of appointments) {
|
||||
@@ -512,7 +512,7 @@
|
||||
return formatLocalDateTime(dt);
|
||||
}
|
||||
|
||||
let canCreate = $derived.by(() => !hasOverlap && !checkingOverlap);
|
||||
const canCreate = $derived.by(() => !hasOverlap && !checkingOverlap);
|
||||
|
||||
async function createBlocker() {
|
||||
if (!canCreate) return;
|
||||
|
||||
Reference in New Issue
Block a user