style: run prettier format on 9 files
This commit is contained in:
@@ -145,7 +145,6 @@
|
|||||||
!customServiceErrors.duration_minutes &&
|
!customServiceErrors.duration_minutes &&
|
||||||
!customServiceErrors.minimum_age_required
|
!customServiceErrors.minimum_age_required
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
function toggleCustomForm(show: boolean) {
|
function toggleCustomForm(show: boolean) {
|
||||||
showCustomCreateForm = show;
|
showCustomCreateForm = show;
|
||||||
@@ -325,7 +324,6 @@
|
|||||||
userType === 'member'
|
userType === 'member'
|
||||||
? !!selectedUserId
|
? !!selectedUserId
|
||||||
: !!(guestName.trim() && guestPhone.trim() && isValidUKPhone(guestPhone))
|
: !!(guestName.trim() && guestPhone.trim() && isValidUKPhone(guestPhone))
|
||||||
|
|
||||||
);
|
);
|
||||||
const canProceedStep2 = $derived(selectedServices.length > 0);
|
const canProceedStep2 = $derived(selectedServices.length > 0);
|
||||||
const canProceedStep3 = $derived(true); // Overrides are optional
|
const canProceedStep3 = $derived(true); // Overrides are optional
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
let wrapperElement: HTMLDivElement | null = $state(null);
|
let wrapperElement: HTMLDivElement | null = $state(null);
|
||||||
|
|
||||||
// Create popup when map is ready
|
// Create popup when map is ready
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
const map = mapCtx.getMap();
|
const map = mapCtx.getMap();
|
||||||
const loaded = mapCtx.isLoaded();
|
const loaded = mapCtx.isLoaded();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
let movedContent: Node[] = [];
|
let movedContent: Node[] = [];
|
||||||
|
|
||||||
// Move content to marker element when ready
|
// Move content to marker element when ready
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
const element = markerCtx.getElement();
|
const element = markerCtx.getElement();
|
||||||
const ready = markerCtx.isReady();
|
const ready = markerCtx.isReady();
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
let shouldStayOpen = $state(false);
|
let shouldStayOpen = $state(false);
|
||||||
|
|
||||||
// Create popup when marker is ready
|
// Create popup when marker is ready
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
const marker = markerCtx.getMarker();
|
const marker = markerCtx.getMarker();
|
||||||
const ready = markerCtx.isReady();
|
const ready = markerCtx.isReady();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
let wrapperElement: HTMLDivElement | null = $state(null);
|
let wrapperElement: HTMLDivElement | null = $state(null);
|
||||||
|
|
||||||
// Create tooltip popup when marker is ready
|
// Create tooltip popup when marker is ready
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
const marker = markerCtx.getMarker();
|
const marker = markerCtx.getMarker();
|
||||||
const markerElement = markerCtx.getElement();
|
const markerElement = markerCtx.getElement();
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ class AuthStore {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { Authorization: `Bearer ${this.token}` }
|
headers: { Authorization: `Bearer ${this.token}` }
|
||||||
});
|
});
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Ignore network errors - still clear local state
|
// Ignore network errors - still clear local state
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
if (!authStore.isAuthenticated) {
|
if (!authStore.isAuthenticated) {
|
||||||
pageState = 'unauthorized';
|
pageState = 'unauthorized';
|
||||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||||
goto('/login', { replaceState: true });
|
goto('/login', { replaceState: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -734,7 +734,7 @@
|
|||||||
// Phone validation (UK format)
|
// Phone validation (UK format)
|
||||||
function validatePhone(phone: string): boolean {
|
function validatePhone(phone: string): boolean {
|
||||||
return isValidUKPhone(phone);
|
return isValidUKPhone(phone);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatPhoneInput(value: string): string {
|
function formatPhoneInput(value: string): string {
|
||||||
@@ -1237,7 +1237,7 @@
|
|||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
toast.success('Account deleted successfully', { id: loadingToast });
|
toast.success('Account deleted successfully', { id: loadingToast });
|
||||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||||
authStore.logout();
|
authStore.logout();
|
||||||
goto('/');
|
goto('/');
|
||||||
} else {
|
} else {
|
||||||
@@ -2599,7 +2599,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3 class="mb-2 text-sm font-semibold">Data Privacy</h3>
|
<h3 class="mb-2 text-sm font-semibold">Data Privacy</h3>
|
||||||
<p class="mb-3 text-sm text-gray-600">
|
<p class="mb-3 text-sm text-gray-600">
|
||||||
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
||||||
View and export all personal data we hold about you
|
View and export all personal data we hold about you
|
||||||
</p>
|
</p>
|
||||||
<Button onclick={() => goto('/gdpr')} variant="outline">
|
<Button onclick={() => goto('/gdpr')} variant="outline">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as Card from '$lib/components/ui/card';
|
import * as Card from '$lib/components/ui/card';
|
||||||
import { Skeleton } from '$lib/components/ui/skeleton';
|
import { Skeleton } from '$lib/components/ui/skeleton';
|
||||||
import { Separator } from '$lib/components/ui/separator';
|
import { Separator } from '$lib/components/ui/separator';
|
||||||
import { SvelteMap } from 'svelte/reactivity';
|
import { SvelteMap } from 'svelte/reactivity';
|
||||||
|
|
||||||
type GdprData = {
|
type GdprData = {
|
||||||
user_profile: {
|
user_profile: {
|
||||||
@@ -208,7 +208,7 @@ import { SvelteMap } from 'svelte/reactivity';
|
|||||||
}
|
}
|
||||||
if (!authStore.isAuthenticated) {
|
if (!authStore.isAuthenticated) {
|
||||||
pageState = 'unauthorized';
|
pageState = 'unauthorized';
|
||||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||||
goto('/login', { replaceState: true });
|
goto('/login', { replaceState: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,7 @@ import { SvelteMap } from 'svelte/reactivity';
|
|||||||
errorMessage = `Failed to fetch data (${res.status}): ${text}`;
|
errorMessage = `Failed to fetch data (${res.status}): ${text}`;
|
||||||
pageState = 'error';
|
pageState = 'error';
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
errorMessage = 'Network error — could not connect to server.';
|
errorMessage = 'Network error — could not connect to server.';
|
||||||
pageState = 'error';
|
pageState = 'error';
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
payments?: Payment[];
|
payments?: Payment[];
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
let pageState = $state<'loading' | 'authorized' | 'unauthorized' | 'admin'>('loading');
|
let pageState = $state<'loading' | 'authorized' | 'unauthorized' | 'admin'>('loading');
|
||||||
let loading = $state(true);
|
let loading = $state(true);
|
||||||
let error = $state<string | null>(null);
|
let error = $state<string | null>(null);
|
||||||
@@ -171,14 +171,14 @@
|
|||||||
|
|
||||||
if (!authStore.isAuthenticated) {
|
if (!authStore.isAuthenticated) {
|
||||||
pageState = 'unauthorized';
|
pageState = 'unauthorized';
|
||||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||||
goto('/login', { replaceState: true });
|
goto('/login', { replaceState: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (authStore.currentUser?.role === 'admin') {
|
if (authStore.currentUser?.role === 'admin') {
|
||||||
pageState = 'admin';
|
pageState = 'admin';
|
||||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||||
goto('/admin', { replaceState: true });
|
goto('/admin', { replaceState: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user