RV/Boat Lots: sync lots to public rental_calendar amenities

Add a "Sync to Public Page" button that creates/updates one rental_calendar
amenity per lot (name, size · rate · availability in the description, rate in
booking_config, shown on the public page). Idempotent via amenities.source_rv_lot_id;
removes synced amenities for deleted lots.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 21:06:21 -04:00
parent f549f21c21
commit 69f643a51e
2 changed files with 58 additions and 0 deletions
@@ -0,0 +1,4 @@
-- Link a synced public amenity back to its RV/Boat lot so re-syncing updates
-- (rather than duplicates) the per-lot rental_calendar amenity.
alter table public.amenities add column if not exists source_rv_lot_id uuid;
create index if not exists idx_amenities_source_rv_lot_id on public.amenities(source_rv_lot_id);