style: fix prefer-const and prettier formatting issues
This commit is contained in:
@@ -149,11 +149,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
let totalDuration = $derived(
|
||||
const totalDuration = $derived(
|
||||
services.reduce((sum, s) => sum + (s.override_duration_minutes ?? s.duration_minutes ?? 0), 0)
|
||||
);
|
||||
|
||||
let totalPrice = $derived(
|
||||
const totalPrice = $derived(
|
||||
services.reduce((sum, s) => sum + (s.override_price ?? s.price ?? 0), 0)
|
||||
);
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
return services.some((s) => s.service_id === serviceId);
|
||||
}
|
||||
|
||||
let maxAvailableDuration = $derived.by(() => {
|
||||
const maxAvailableDuration = $derived.by(() => {
|
||||
if (!booking?.start_time || !nextAppointmentStart) return null;
|
||||
|
||||
const bookingStart = new SvelteDate(booking.start_time).getTime();
|
||||
@@ -292,7 +292,7 @@
|
||||
return Math.max(0, Math.floor(availableMs / (60 * 1000)));
|
||||
});
|
||||
|
||||
let filteredServices = $derived.by(() => {
|
||||
const filteredServices = $derived.by(() => {
|
||||
return availableServices.filter((s) => {
|
||||
if (isServiceAdded(s.id)) return false;
|
||||
if (maxAvailableDuration !== null && s.duration_minutes > maxAvailableDuration) return false;
|
||||
|
||||
Reference in New Issue
Block a user