-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Summary
Allow organizers to add freeform notes/comments directly to a sponsor's activity timeline, replacing the current static notes text field on the sponsorForConference document.
Problem
The current notes field on sponsorForConference is a single freeform textarea that gets overwritten with each edit. There's no history of what was noted, when, or by whom. Meanwhile, the activity timeline already supports a note activity type (sponsorActivity document with activity_type: 'note'), but there's no UI to create one manually.
Proposed Changes
1. Add "Add Note" UI to the activity timeline
- Add an input/textarea at the top of the Activity History tab (or an inline compose area) that lets organizers type a note and submit it.
- The note should be saved as a
sponsorActivitydocument withactivity_type: 'note', linked to the currentsponsorForConferencerecord. - The
created_byshould be set to the current authenticated organizer. - Notes should appear in the timeline alongside other activity events (status changes, emails, etc.).
2. Remove the static notes field
- Remove the
notesfield from thesponsorForConferenceSanity schema. - Remove the corresponding
<textarea>fromSponsorCRMForm.tsx. - Create a migration to convert any existing
notescontent into asponsorActivitydocument of typenote(to preserve historical data). - Update the
SponsorForConferenceandSponsorForConferenceExpandedTypeScript types.
3. Consider supporting call and meeting activity types
The Sanity schema already defines call and meeting as activity types. The "Add Note" UI could optionally allow selecting the activity type (note, call, meeting) to log different kinds of interactions.
Files to modify
sanity/schemaTypes/sponsorForConference.ts— removenotesfieldsrc/lib/sponsor-crm/types.ts— removenotesfrom typessrc/lib/sponsor-crm/activity.ts— addlogNote()helpersrc/components/admin/sponsor-crm/SponsorCRMForm.tsx— remove notes textareasrc/components/admin/sponsor/SponsorActivityTimeline.tsx— add note compose UIsrc/server/routers/sponsor.ts— add tRPC mutation for creating notes- Migration script for existing notes data
Additional context
- The
sponsorActivityschema already supports thenoteactivity type,descriptionfield, andcreated_byreference — the data model is ready. contract_status_changeexists in the TypeScriptActivityTypeunion but is missing from the Sanity schema's options list — this should be fixed as part of this work.
Reactions are currently unavailable