feat: persist assignment_strategy + apply to widget category bookings

This commit is contained in:
2026-04-07 21:45:12 +03:00
parent ab37430243
commit 328753fc1e
2 changed files with 61 additions and 6 deletions

View File

@@ -109,6 +109,7 @@ export function SettingsPage() {
if (s.auto_cancel_noshow_hours) setAutoCancelNoShowHours(Number(s.auto_cancel_noshow_hours))
setAutoCheckout(Boolean(s.auto_checkout_enabled))
if (s.auto_checkout_hours) setAutoCheckoutHours(Number(s.auto_checkout_hours))
if (s.assignment_strategy) setAssignmentStrategy(s.assignment_strategy as any)
setSmtp({
host: String(s.smtp_host ?? ''),
port: String(s.smtp_port ?? '587'),
@@ -269,6 +270,13 @@ export function SettingsPage() {
console.error('Failed to save hotel settings', err)
}
}
if (section === 'booking') {
try {
await api.hotelSettings.update(slug, { assignment_strategy: assignmentStrategy })
} catch (err) {
console.error('Failed to save booking settings', err)
}
}
if (section === 'notify') {
try {
await api.hotelSettings.update(slug, {