Mobile Phase 8g: add-investor sheet — optional stage picker + Priority toggle + reminder
The mobile "New investor" sheet now captures three optional fields beyond name/contact/note, matching the dc (GridApp.dc.html:737): - Initial pipeline stage — a .stage-pick chip picker, defaulting to "Not in pipeline" so a plain directory add never auto-creates an opportunity row (Grant's call). - A framed "Flag as Priority" toggle. - An optional reminder (title + a progressive due-date field). submitCreate orchestrates one-row calls in order: create (log-communication create_investor_if_missing, now carrying priority) -> if a stage was picked, link to the pipeline at that stage (reusing applyStage's idempotent link-then-PATCH) -> if a reminder title was given, POST /api/reminders keyed on the new row's source_row_id. The link and reminder steps are non-fatal: a failure toasts but never loses the created investor, and a create that returns no row id warns instead of a clean success. Backend: handle_log_fundraising_communication honors an optional priority flag only on its create-if-missing branch (an existing-row log never touches priority). Guarded by test_grid_add_investor.py (priority-on-create, defaults-False, the create-branch- only invariant, and the create->link / create->reminder handshakes on a freshly-synced row). 40/40 backend green; the create sheet was interaction-verified in a throwaway jsdom harness.
This commit is contained in:
+4
-1
@@ -3341,6 +3341,9 @@ class CRMHandler(BaseHTTPRequestHandler):
|
||||
contact_in = body.get('contact')
|
||||
append_note = bool(body.get('append_note', True))
|
||||
create_investor_if_missing = bool(body.get('create_investor_if_missing', False))
|
||||
# Optional initial Priority flag for the mobile add-investor sheet (8g). Honored ONLY on the
|
||||
# create branch below — an existing-row log-communication never touches its priority.
|
||||
create_priority = bool(body.get('priority', False))
|
||||
# Provenance: where this logged communication originated (grid UI vs the Matrix
|
||||
# intake bot). Default preserves prior behavior; callers may override.
|
||||
comm_source = (str(body.get('source') or 'fundraising_grid').strip() or 'fundraising_grid')[:64]
|
||||
@@ -3391,7 +3394,7 @@ class CRMHandler(BaseHTTPRequestHandler):
|
||||
"notes_last_modified": "",
|
||||
"last_communication_date": "",
|
||||
"lead": "",
|
||||
"priority": False,
|
||||
"priority": create_priority,
|
||||
"follow_up": False,
|
||||
"graveyard": False
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user