fix: revert agent damage — fix svelte-ignore comments, catch var refs, prop mismatches
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 23s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 30s

- Convert HTML comments in script sections to eslint-disable-next-line
- Fix err->_err references in catch blocks across 8 files
- Fix required→_required and onclose→_onclose prop mismatches
- Revert BookingCreateModal.svelte from no-unused-vars agent damage
- Fix broken regex in account page
- Fix .writable (not in Svelte 5 stable) back to +
- Fix NavBar dynamic href links with proper eslint-disable
This commit is contained in:
2026-06-25 16:50:23 +01:00
parent 82e6f75354
commit e0f22e5c5c
25 changed files with 67 additions and 59 deletions
@@ -146,6 +146,8 @@
!customServiceErrors.minimum_age_required
);
function toggleCustomForm(show: boolean) {
showCustomCreateForm = show;
if (show) {
newCustomService = {
name: '',
@@ -324,6 +326,7 @@
: !!(guestName.trim() && guestPhone.trim() && isValidUKPhone(guestPhone))
);
const canProceedStep2 = $derived(selectedServices.length > 0);
const canProceedStep3 = $derived(true); // Overrides are optional
const canProceedStep4 = $derived(!!(selectedDate && selectedTime));
/** Whether the currently selected time slot is out-of-hours */
@@ -484,7 +487,7 @@
(user: { account_role: string }) => !excludedRoles.includes(user.account_role)
);
}
} catch (_err) {
} catch (err) {
toast.error('Failed to load users');
} finally {
loadingUsers = false;
@@ -505,7 +508,7 @@
if (response.ok) {
services = await response.json();
}
} catch (_err) {
} catch (err) {
toast.error('Failed to load services');
} finally {
loadingServices = false;
@@ -579,7 +582,7 @@
workingHours = { ...workingHours, ...whMap };
availableHours = { ...availableHours, ...ahMap };
}
} catch (_err) {
} catch (err) {
toast.error('Failed to load availability');
} finally {
_loadingWorkingHours = false;
@@ -649,7 +652,7 @@
workingHours = { ...workingHours, ...whMap };
availableHours = { ...availableHours, ...ahMap };
}
} catch (_err) {
} catch (err) {
toast.error('Failed to load availability');
} finally {
_loadingWorkingHours = false;
@@ -739,7 +742,7 @@
toast.error(`Failed to reserve slot: ${errorText}`);
return false;
}
} catch (_err) {
} catch (err) {
toast.error('Failed to reserve slot');
return false;
} finally {
@@ -1039,7 +1042,7 @@
const errorText = await res.text();
toast.error(`Failed to create booking: ${errorText}`);
}
} catch (_err) {
} catch (err) {
toast.error('An error occurred while creating booking');
} finally {
submitting = false;