From 8ce641ea863df8fcf886c21537b7f0ce7ddf91bc Mon Sep 17 00:00:00 2001 From: ngqile Date: Fri, 27 Nov 2026 14:21:20 +0800 Subject: [PATCH] docs: correct interest storage comment and record event scoping gap Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM --- openspec/changes/add-event-lead-capture/design.md | 4 ++-- solvway-admin-portal/app/lib/types.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openspec/changes/add-event-lead-capture/design.md b/openspec/changes/add-event-lead-capture/design.md index 020c89d..8513264 100644 --- a/openspec/changes/add-event-lead-capture/design.md +++ b/openspec/changes/add-event-lead-capture/design.md @@ -37,7 +37,7 @@ - Columns: `event_lead_id`, `interest_id`, `company_id` NOT NULL. - PK `(event_lead_id, interest_id)`. -`user_id` and `event_uuid` cross into other tables without foreign keys, like `event_salesperson`. Every query filters on `company_id`, which comes from the logged-in admin and never from the request. +`user_id` and `event_uuid` cross into other tables without foreign keys, like `event_salesperson`. Every query on the new tables filters on `company_id`, which comes from the logged-in admin and never from the request. `ponytail:` the change-3 `event` table has no `company_id`, so event lookups are not company-scoped; add it with the multi-company move. **Calls I made:** - Name is required: a lead with no name cannot be followed up. @@ -122,7 +122,7 @@ The event picker and capture accept enabled events only. `GET /api/admin/event-l **Capture form options:** `GET /api/admin/event-leads/interest-options` (`BO_EVENT_LEADS`) returns active interests. An inactive interest already on an event lead still shows on that lead and can be removed, but cannot be newly added (`INACTIVE_INTEREST`). -**Backend:** `services-counter` provides `/counter/interest/findByCompany/{companyId}`, `/counter/interest/save`, and a `findByIds` used by the listing. +**Backend:** `services-counter` provides `/counter/interest/findByCompany/{companyId}`, `/counter/interest/save`, and `findByIds` (unused in phase 1: `mobile-api` reads the whole company list once per request). ### 9. Modules and access diff --git a/solvway-admin-portal/app/lib/types.ts b/solvway-admin-portal/app/lib/types.ts index 93921fa..6b59c54 100644 --- a/solvway-admin-portal/app/lib/types.ts +++ b/solvway-admin-portal/app/lib/types.ts @@ -152,7 +152,7 @@ export interface SalespersonOption { } /** An interest (product/service) row used to tag leads. - * Stored in the mobile-api admin interests table, sorted by sortOrder. */ + * Stored in services-counter (`interest`), served by mobile-api `/api/admin/interests`, sorted by sortOrder. */ export interface AdminInterestEntity { id?: number; name?: string;