RV/Boat Lots: link rentals to owner/unit + Notice to Vacate toggle

Phase 2: rental form now has optional Owner and Unit selectors (auto-fills
renter info/unit from the chosen owner), persisting owner_id/unit_id.

Phase 3: add RvRentalVacateButton on Owner and Unit profiles — shows only
when that owner/unit has an active/vacating RV-boat rental, and toggles the
rental status between active (renting) and vacating. Active Rentals tab now
includes vacating rentals with a badge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 18:20:58 -04:00
parent 7c18576390
commit d8465f2297
4 changed files with 98 additions and 4 deletions
+2
View File
@@ -8,6 +8,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { Input } from "@/components/ui/input";
import { Separator } from "@/components/ui/separator";
import RvRentalVacateButton from "@/components/RvRentalVacateButton";
import {
ArrowLeft, Mail, Phone, MapPin, Send, AlertTriangle, StickyNote,
Download, Filter, FileText, Shield, ClipboardCheck, MessageCircle,
@@ -263,6 +264,7 @@ export default function OwnerProfilePage() {
<Button size="sm" variant="outline" className="h-8 text-[12px] gap-1.5" onClick={() => navigate(`/dashboard/owner-updates?${ownerActionParams.toString()}`)}>
<StickyNote className="w-3.5 h-3.5" /> Note
</Button>
<RvRentalVacateButton ownerId={owner.id} />
</div>
</div>
</div>