mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
RV/Boat Lots: internal lot map with directory-unit links
Add a Map tab that reuses the reservation-map pin picker. Staff drop/label pins per lot and optionally link a directory unit (pin.linked_amenity_id = unit id). Config persists per association in rv_boat_lot_maps. GoogleMapPicker generalized with optional linkLabel + allowLinkAnyStatus (defaults preserve the amenity reservation-map behavior). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
-- Internal lot map for the RV/Boat Lots page: per-association pin layout
|
||||
-- (config holds { pins, zoom, locked_view }); pins may link a directory unit.
|
||||
create table if not exists public.rv_boat_lot_maps (
|
||||
association_id uuid primary key references public.associations(id) on delete cascade,
|
||||
config jsonb not null default '{}'::jsonb,
|
||||
updated_at timestamptz default now()
|
||||
);
|
||||
|
||||
alter table public.rv_boat_lot_maps enable row level security;
|
||||
|
||||
drop policy if exists "Staff manage rv boat lot maps" on public.rv_boat_lot_maps;
|
||||
create policy "Staff manage rv boat lot maps"
|
||||
on public.rv_boat_lot_maps for all
|
||||
to authenticated
|
||||
using (has_role(auth.uid(), 'admin'::app_role) or has_role(auth.uid(), 'manager'::app_role) or has_role(auth.uid(), 'association_management'::app_role))
|
||||
with check (has_role(auth.uid(), 'admin'::app_role) or has_role(auth.uid(), 'manager'::app_role) or has_role(auth.uid(), 'association_management'::app_role));
|
||||
Reference in New Issue
Block a user