Commit Graph

125 Commits

Author SHA1 Message Date
admin f518f0b8f4 Bills: Buildium-style record/edit form + new read-only bill detail view
- Record/Edit dialog redesigned to a two-column layout: large attachment panel
  (drop/preview/replace) on the left; Bill Details + Item Details table on the
  right; prominent total bar; Save / Save & add another / Cancel footer.
  Keeps AI parse, field highlighting, vendor mapping
- New read-only bill detail view (click a bill #/vendor): header with vendor +
  status + Pay/Duplicate/Delete/Edit, Bill details card, item-details table,
  and a Bill amount sidebar (Total / Paid / Remaining)
- duplicateBill clones a bill into a fresh create form

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:41:36 -04:00
admin 512abcc1a2 Reconciliation: add deposits/withdrawals directly from the reconcile screen
- Deposit / Withdrawal buttons in the statement-transactions header open a
  dialog (date, amount, description, income/expense category, reference)
- New transaction posts to the bank account, is marked cleared, and is
  auto-checked into the current reconciliation; category picker excludes bank
  and archived accounts. gl-managed companies post the offset via the existing
  transaction GL trigger; import-mode books add register-only (consistent with
  Banking), so imported GL isn't double-counted

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:26:10 -04:00
admin 2d6f7ea17b Reconciliation: only show the open period + sortable column headers
- Transactions on/before the last completed reconciliation's statement date no
  longer reappear in a new reconciliation (date floor). Imported GL registers
  were inserted cleared-but-unreconciled, flooding the list with prior-period
  rows; reconciling now works period-by-period
- Sortable headers (Date / Description / Ref # / Deposit / Withdrawal) with
  asc/desc toggle indicators

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:08:12 -04:00
admin 8a57f53317 Accounting report batches: saved per-association packets → one combined PDF
- accounting.report_batches (name + ordered report_ids per company, member RLS)
- batchReports.ts engine: cover page + each report on a fresh page + one global
  Page X/Y footer. Financial four reuse the page's fetchReportData/buildFinancial
  (injected to avoid an import cycle); Trial Balance, General Ledger, Cash
  Disbursement, AR Aging, Pre-Paid, Reserve Fund built from the same source data
- Reports page: Report Batches dialog (name, ordered report checklist, saved
  batches load/delete, Save, Generate PDF); page now defaults to This Month
- reportPdf.appendStructuredReportPdf used for the financial sections

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 22:57:12 -04:00
admin b9235f644f Accounting: period presets (Month/YTD/Prev-Year/Custom) + logo-free reports
- Shared PeriodPicker (default This Month); wired into General Ledger report,
  Journal Entries page, and bank registers (Banking shows a Balance forward
  row carrying the running balance at period start)
- Financial reports are now logo-free: drawBrandedHeader/reportPdf skip the
  logo block; ReportSheet drops the on-screen logo
- reportPdf: appendStructuredReportPdf + skipFooter scaffolding for upcoming
  report batches (not yet wired)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 22:40:58 -04:00
admin b4014f378c Payment accounts can be equity; archived accounts excluded from all dropdowns
- Bill payment + expense paid-through pickers now offer bank OR equity
  accounts (reserve-component style payments); label updated to
  'Payment account'
- is_archived=false filter added to every accounting account dropdown:
  journal entries, bills (expense + payment), expenses, invoices/sales
  receipts/receive payments deposit-to, deposits (bank + line source),
  assessments, opening balances, budget detail, reconciliation

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 20:38:00 -04:00
admin 920def8826 Reports: archived accounts hidden everywhere except the General Ledger
- fetchAllGLLines filters accounts.is_archived=false, covering P&L, Balance
  Sheet, Cash Flow, Movement of Equity and Income Statement in one place
- Trial Balance, Reserve Fund Schedule and Budget vs Actuals account lists
  exclude archived; Banking page hides archived accounts from cards/pickers
- General Ledger report intentionally keeps archived accounts (history)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 20:27:18 -04:00
admin 03d3c5ee8d Chart of Accounts: archive accounts + safe deletes
- accounting.accounts.is_archived; COA mirror sets public is_active accordingly
  so association-side pickers hide archived accounts
- COA page: archive/restore per row + bulk, show-archived toggle, delete
  confirm dialog with 'Archive instead'; FK-blocked deletes (posted activity)
  get a friendly message + one-click archive; bulk delete skips blocked
  accounts per-id instead of failing the batch
- fetchChartOfAccounts excludes archived platform accounts from pickers;
  parent dropdowns and Opening Balances only offer active accounts

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 20:11:11 -04:00
admin df8623ff9f buildium-gl-sync: include inactive bank-account GL ids from /v1/bankaccounts
/v1/glaccounts omits some inactive accounts (e.g. prior-management bank
accounts) whose ledgers still hold one side of historical transactions,
making checks/deposits come back unbalanced on backfills (found during the
Casuarina Club GL import).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 19:52:21 -04:00
admin 28c3c7bd0a Bills import: degrade gracefully when Buildium API key lacks Vendors permission
GET /v1/vendors 403s on keys without the Vendors scope; import bills without
vendor links instead of failing the pull, and surface it in results.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:58:13 -04:00
admin cc5f70bc5b Bills import: A/P cutover guard — only post JEs dated after the GL watermark
Anything on/before buildium_gl.last_synced_date is already in the books as
buildium_gl entries; ap_cutover_date freezes that boundary so direct
buildium_bill/billpay postings never double-count history.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:46:24 -04:00
admin 25064d8418 Direct Buildium A/P import: bills, payments, one-off checks via GL Account Map
- public.bills.line_items + line-aware accounting mirror (one bill_item per
  Buildium line with its mapped platform account)
- buildium-sync bills: strict per-line resolution through
  buildium_gl_account_links (unmapped -> bill held + flagged); pulls
  /bills/{id}/payments (check#, bank, date) and /bankaccounts/{id}/checks
  (one-off checks become paid bill+payment pairs)
- import-mode companies get direct JEs (buildium_bill Dr expense/Cr AP,
  buildium_billpay Dr AP/Cr mapped bank) + cleared register rows; sets
  buildium_gl.exclude_ap so the nightly GL pull skips Bill/Bill Payment/Check
- buildium-gl-sync: exclude_ap transaction-type filter; preserve buildium_gl
  config keys when advancing the watermark
- Settings: Pull Bills & Expenses card with held/unmapped reporting

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:43:58 -04:00
admin 4e77098f88 Buildium GL account map: active accounts only, add-one-at-a-time UI
- gl_accounts fetched without includeAll (active Buildium accounts only)
- replaced per-account row grid (370+ selects) with a single add row:
  Buildium dropdown -> system account dropdown -> Add
- mappings list is plain rows with remove + push-target radio; changes save
  immediately (no bulk Save); flagged sync-blockers are click-to-select chips
- Auto-map exact matches button inserts code/name-identical pairs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 17:31:40 -04:00
admin e510a76dfc Accounting reports: AR Aging (Property), Pre-Paid Homeowners, Cash Disbursement
Buildium-style reports built on the owner ledger and GL:
- AR Aging (Property): FIFO-aged buckets (0-30/over 30/60/90) per unit with
  charge-type breakdown, collection status, summary + distribution bar
- Pre-Paid Homeowners: units with net credit balances as of a date
- Cash Disbursement: bank-credit GL entries grouped by bank account with
  check#/vendor/invoice enrichment from the banking register and GL line detail
All with branded PDF/CSV exports; shared owner-ledger helpers in lib/ownerLedger.ts

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 17:26:30 -04:00
admin 4c7fe7840b ARC decision letters: launch letter editor prefilled with ARC merge fields
- ARC detail header: Decision Letter button -> Forms & Letters (Letters tab) with
  association/owner/subject + projectTitle/decisionStatus/arcDate/decisionDate/
  propertyAddress/decisionNotes context
- LetterGenerator: resolves ARC tokens (before generic ones), new {{mailingAddress}}
  token, click-to-insert merge-field palette; templates via existing Save Template flow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 15:56:27 -04:00
admin c1fad194f7 ARC imports: record Buildium decision votes + richer decision notes; PDF spacing
- Buildium API exposes no ARC comment threads or member votes (verified live);
  surface the final decision instead: vote row dated to the actual decision,
  decision_notes 'Approved by X on date (via Buildium)'
- record_buildium_arc_vote RPC bypasses the finalized-ARC write lock that was
  silently swallowing import votes; 69 existing imports backfilled
- Application Record PDF: paragraph break between comments and decision notes

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 14:26:48 -04:00
admin ff65c8a656 Buildium GL account map: strict account links, separate pull/push charges
- buildium_gl_account_links + buildium_unmapped_gl_accounts tables (strict, hold-and-flag)
- buildium-sync: pull charges syncType, account-first push resolution, no fuzzy matching, push dryRun
- buildium-gl-sync: links-only resolution, watermark held while unmapped accounts exist
- GL Account Map settings tab + Pull Charges card + unmapped results panel

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 14:07:18 -04:00
admin abd46bcb2b Hostinger Reach integration UI + ARC Buildium matching, drop Mailchimp
- HostingerReachPage (replaces MailchimpPage): connect Reach via
  reach-connection, per-association segment sync via reach-sync
- ARC Applications: Buildium import review/matching updates
- buildium-import-stage/apply: latest staging + apply changes (already
  deployed to Supabase)
- migrations: hostinger_reach_integration + arc_finalized_lock service
  role (already applied to live DB)
- CI: note that deployment is VPS-side polling (auto-deploy.sh cron)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 23:07:30 -04:00
admin 220892203c CI: auto-deploy to VPS on push to main
After the build check passes, SSH to the VPS with a forced-command key
(can only run deploy.sh) which pulls main, builds, and rsyncs dist/ to
public_html. Replaces the manual `ssh myvps ... deploy.sh` step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 22:55:39 -04:00
admin f5f6285bbd Accounting: fix empty JE/GL pages + nightly Buildium GL pull sync
- Add missing indexes on journal_entry_lines (journal_entry_id, account_id)
  and journal_entries (company_id, date): Bridgewater's ledger query took
  7.5s, blew the 8s statement timeout, and rendered the JE/GL pages empty
- Paginate JE/GL page fetches past the 1000-row PostgREST cap (shared
  fetchJournalEntries helper) and surface query errors instead of
  swallowing them into an empty list
- New buildium-gl-sync edge function (scheduled nightly via pg_cron):
  incrementally pulls new Buildium GL activity into accounting journal
  entries via GET /v1/generalledger, reconstructing double-entry JEs by
  grouping per-account entries by transaction id; watermark + 14-day
  overlap window, dedupe on (company_id, external_source, external_id),
  account mapping by external_id/code/name with auto-create for new
  Buildium accounts

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 22:12:38 -04:00
admin 4f0ac97e83 Income Statement: Buildium-style category subgroups
Group the multi-period Income Statement by account category (Operating Income,
Administration, Utilities, Reserves Budget, …) with "Total for <category>"
subtotals, matching the Buildium layout, in the on-screen table, PDF, and CSV.

- New accounting.accounts.category column (nullable; null = ungrouped), seeded
  from the local chart_of_accounts parent hierarchy.
- Editable in Chart of Accounts: single-edit (with datalist autocomplete) and
  bulk-edit (blank = no change, __clear__ to unset).
- buildium-account-categories edge function pulls each account's parent-GL
  category from Buildium (matched by code, fallback name) and backfills
  accounting.accounts.category; idempotent and re-runnable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 22:34:58 -04:00
admin cb8a29696f Accounting reports: add multi-period Income Statement
New "Income Statement" report with a By Month/Quarter/Year selector that lays
out income/expense accounts in period columns plus a Total column, with Total
Income / Total Expense / Net Income rows. Built from the GL over the selected
range; includes branded PDF and CSV export. Accounts are listed flat under
Income/Expense for now (category subgroups to follow once accounts are
categorized).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:04:49 -04:00
admin ca092f7b8b Budget Workbook: step through all clients with prev/next
Add prev/next buttons and a "Client N of M" indicator around the association
picker so a budget can be built for every client in turn. Cycles in name order
and wraps; direct dropdown selection still works.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 11:35:36 -04:00
admin 217e511792 Budget Workbook: export a Proposed Budget PDF
Add a PDF button that generates a board-ready proposed budget: income and
expense tables (monthly/annual per account with totals), a summary, and a
headline banner for the per-unit monthly assessment. Uses the workbook's
projected figures (overrides/inflation/unit override) via jsPDF + autotable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 10:58:59 -04:00
admin 6fe1e3943c Budget Workbook: editable unit count for per-unit assessment rate
The per-unit assessment (annual expenses / 12 / units) used the live association
unit count only. Add an override so the rate can use weighted/excluded units,
persisted on accounting.budget_workbooks.unit_override (null = live count). New
"# Units" control with a reset link; summary card and CSV use the effective count.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 22:43:45 -04:00
admin d18296c3a6 Accounting Banking: allow cash deposits with no homeowner
The Banking-page deposit form required a homeowner, blocking general/cash
deposits. Drop that requirement: a deposit still needs an income account, and
post_transaction_gl already books Dr Bank / Cr income when no customer is set
(vs. Dr Bank / Cr A/R with one). The Homeowner field is now optional with an
explicit "No homeowner (general deposit)" choice.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 22:35:33 -04:00
admin 215ecb3153 Budget Workbook: replace Budget Management with a YTD-actuals workbook
/dashboard/budget-management now renders a Budget Workbook that pulls YTD
actuals (from the accounting GL, through a chosen month), derives a monthly
average (YTD/N), takes a per-line inflation %, and projects an annual budget
(avg x 12 x (1+infl)). Footer rolls up annual budget / 12 / # units = per-unit
monthly assessment. Income + expense sections; all imported fields editable.

- Standalone saved worksheet (accounting.budget_workbooks/_lines, RLS like accounts)
- "Push to Budget" writes projected/12 into accounting.budgets + budget_entries
- Uses accounting.accounts (synced with the Accounting dashboard COA) and paginates
  the GL fetch (1000-row cap). Nav relabeled Budget Management -> Budget Workbook.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 16:29:25 -04:00
admin ea2f2a089a Accounting Banking: page through all register transactions
The bank register fetched transactions in a single request, which
PostgREST caps at 1000 rows. An imported bank account with a longer
register (e.g. Bridgewater Checking, ~1,500 rows) truncated, throwing
off the displayed running balance. Page through all rows ordered by a
stable key (date, created_at, id).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 13:30:19 -04:00
admin bd4c385478 Accounting reports: page through all GL lines (fix 1000-row truncation)
PostgREST caps each response at 1000 rows. The P&L and Balance Sheet
fetch every journal_entry_line for the company and aggregate client-side,
so any association with >1000 GL lines (e.g. an imported Buildium GL) only
saw the first 1000 — accounts whose activity fell past that point read as
$0 and were hidden, making reports look empty/out-of-balance. Fetch the GL
in 1000-row pages ordered by a stable key so every line is included.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 01:23:57 -04:00
admin d2d2c83e7b Accounting: refresh reports + General Ledger after posting a journal entry
Manual journal entries post straight to the GL, but saving/deleting one
only invalidated the journal-entries list — so the Reports data (P&L /
Balance Sheet) and the General Ledger tab kept showing stale figures
until a manual refresh. Invalidate reports-data and gl-journal-entries
on save and delete too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 00:53:18 -04:00
admin 4b5c2ea2ea Accounting: add General Ledger tab
Buildium-style GL grouped by account type with date-range filter,
account filter, beginning/ending balances, per-line running balance,
and grand totals. Reads posted journal entries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 22:17:23 -04:00
admin f315d86e03 Accounting: editable deposits (Recent Deposits list + edit/delete)
Add a "Recent Deposits" list to the Deposits page with Edit (date, bank
account, memo — GL re-posts via the deposit trigger) and Delete (releases the
deposited transactions/payments back to "awaiting deposit" and reverses the GL).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:57:10 -04:00
admin 8a2ea60824 Accounting: editable journal entries + Reports refresh button
- Journal Entries: add Edit (row + detail drawer) that loads an entry into the
  form and saves changes (updates the entry and replaces its lines). Warns when
  editing an auto-generated entry (may be overwritten by its source sync).
- Reports: add a Refresh button that re-fetches the underlying data so the
  report reflects the latest GL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:33:39 -04:00
admin aa94622a78 Opening Balances: fix duplicate earnings accounts; recognize name variants
The auto-provision effect could fire twice and create duplicate "Current Year
Earnings" accounts (seen on Village Grove). Use the idempotent
coa_get_or_create RPC with a once-per-company ref guard, and match existing
name variants (Current Year Income / Net Income / Retained Earnings) so it
won't create redundant accounts. Balance sheet now also folds
"Current Year Income"/"Net Income" equity accounts into the Net Income line.
Removed the existing Village Grove duplicate (zero activity).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:04:51 -04:00
admin 7fd8ad2c52 Opening Balances: allow entering Retained Earnings + Current Year Earnings
Auto-provision "Retained Earnings" and "Current Year Earnings" equity accounts
per company so they appear as inputtable rows in the Chart of Accounts Opening
Balances grid. The Balance Sheet folds the posted "Current Year Earnings"
account into the Net Income line (already did this for Retained Earnings), so a
mid-year import can seed both equity figures without entering income/expense
detail, and Total Equity stays balanced.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 18:11:01 -04:00
admin f3b81eaeeb Revert vendor->A/P posting rule (it collapsed the P&L)
The blanket rule stripped expense from direct-expense checks that have no bill,
leaving the P&L showing only a couple of accounts. Restore original
post_transaction_gl precedence (coded account before vendor). Re-posted affected
transactions to restore expense recognition. Double-count needs a bill-linkage fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 17:38:15 -04:00
admin fdb9174c45 Accounting GL: vendor checks relieve A/P; Village Grove payments direct-to-bank
- post_transaction_gl: a vendor money-out (check) now posts Dr A/P / Cr Bank
  instead of re-debiting the coded expense account. Fixes double-counted expense
  and checks showing as P&L debits (bill already recognized the expense).
- post_payment_gl: Village Grove owner payments post straight to HOLII COGENT
  Checking instead of Undeposited Funds (scoped; others unchanged).

Both applied to the live DB; Ashley Manor's affected transactions re-posted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 14:45:04 -04:00
admin 5aa03d1cd6 Balance Sheet: fold posted Retained Earnings account into the prior-years line
A real "Retained Earnings" equity account is postable via journal entries, but
the balance sheet listed it separately from the calculated "Retained Earnings
(prior years)" line, so JE adjustments looked like they had no effect there.
Now the posted RE-account balance is added into the "Retained Earnings (prior
years)" line (and removed from the generic equity list). Total Equity is
unchanged — it already included that account.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 13:26:13 -04:00
admin 8f14877274 Balance Sheet: label the YTD earnings equity line "Net Income"
The equity section already carried a permanent current-year earnings line
(income − expenses for the fiscal year to date); rename it from "Current Year
Earnings" to "Net Income" to match the Movement of Equity report and the
requested terminology. No calc change — still YTD income minus expenses,
included in Total Equity.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 13:00:24 -04:00
admin f66165a8f5 Checks: Banking print now applies field positions + MICR gaps
Banking's generateCheckPDF opts omitted fieldPositions (and micr gaps), so the
per-field x/y position adjustments saved in Check Setup had no effect on checks
printed from Banking. Pass them through.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:50:38 -04:00
admin 3d264130b9 Checks: print the General Settings mailing address as the return address
Banking check printing hardcoded companyAddress: undefined, so the association
mailing/office address (accounting.companies.address, set in General Settings)
never printed below the name. Now loads and passes it. Bills check printing
falls back to the company name/address when no company_check_layouts payer is set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:15:48 -04:00
admin c66a11769c Checks: align Print Checks page with Check Setup generator
PrintChecksPage was still using the old generator (utils/checkPdfGenerator +
check_layouts), so it had the same bugs as Bill Approvals (wrong return address,
missing vendor address, ignored x/y offsets). Route it through
lib/checkPdf.generateCheckPDF using the accounting company (return address),
check_settings (layout/offsets/field positions/signature/MICR), the selected
bank account (routing/account), and vendor address as payee. DB side effects
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:01:07 -04:00
admin dd4a088e9d Checks: print PDF now uses Check Setup settings (matches the sample)
Bulk "Print Checks" was rendering via a separate generator (utils/checkPdfGenerator
+ check_layouts), so the printed PDF ignored the accounting Check Setup: wrong
return address (generic company vs association name + mailing address), missing
vendor address, and ignored x/y field-position offsets.

Route the print through the same generator as the working sample
(lib/checkPdf.generateCheckPDF) fed by the accounting company (return address),
check_settings (style/offsets/field_positions/signature/MICR gaps), the chosen
bank account (routing/account), and the vendor address as payee. DB side effects
(checks, transactions, bill paid status, check numbering) unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 11:45:30 -04:00
admin a81e4f51ab RV/Boat Lots: map tab edits the association Map amenity + per-pin amount
The Map tab now binds to the association's active map-type amenity (the
reservation map) instead of a separate table — pins edited here are the public
reservation map. Adds a per-pin amount ($/mo) field (GoogleMapPicker showAmount
prop, backward-compatible). Shows a notice when no Map amenity is active and an
amenity picker when more than one exists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 22:41:54 -04:00
admin 5a7f21fee6 Add AGENTIC_MAIL to environment variables 2026-06-07 22:41:22 -04:00
admin 69f643a51e 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>
2026-06-07 21:06:21 -04:00
admin f549f21c21 RV/Boat Lots: waitlist size + more vehicle types
- Waitlist now captures a free-form Size (requested_size column) in place of
  the type field in the internal form/table.
- Lot type selector (add + bulk edit) expanded to RV, Boat, Travel Trailer,
  Fifth Wheel, Camper, Car, Truck, Trailer, Other.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 21:01:18 -04:00
admin 0c0300efce 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>
2026-06-07 20:40:52 -04:00
admin 10a9d31b94 RV/Boat Lots: insurance expiring-soon / expired indicator
Color-code each rental's insurance status like vendors: red when expired,
amber when expiring within 90 days (with days remaining), green otherwise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 20:23:07 -04:00
admin 308af20aa1 RV/Boat Lots: request renter insurance (vendor-style flow)
Phase 4. Mirror the vendor insurance request flow for RV/boat renters:
- Migration: insurance fields on rv_boat_lot_rentals + rv_renter_insurance_requests
  table + token-scoped lookup/submit SECURITY DEFINER RPCs (granted to anon).
- Edge fn send-rv-renter-insurance-request emails the renter a secure link
  (reuses the vendor-insurance-request email template).
- Public page /rv-insurance/:token to submit carrier/policy/expiration + COI upload.
- "Request Insurance" button on each active rental + insurance status display.

DB RPCs verified end-to-end (rolled-back txn): submit matches token, updates the
rental, marks the request submitted. Edge function deployed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 20:16:31 -04:00