Skip to content

feat(sponsor): add new Sponsor CRM system (phase 1)#262

Merged
Starefossen merged 6 commits intomainfrom
sponsor-crm-phase-1
Nov 5, 2025
Merged

feat(sponsor): add new Sponsor CRM system (phase 1)#262
Starefossen merged 6 commits intomainfrom
sponsor-crm-phase-1

Conversation

@Starefossen
Copy link
Member

@Starefossen Starefossen commented Nov 4, 2025

This pull request introduces a new Sponsor CRM system for conference sponsors, including new document types, migration scripts, and schema updates. The changes migrate existing sponsor data to the new system in a backward-compatible way, add contract tracking fields, and provide tools for future sponsor management and activity logging.

Sponsor CRM System Implementation

  • Added new schema types: sponsorForConference for sponsor-conference relationships and sponsorActivity for logging sponsor-related actions. These are now included in the main schema (sanity/schema.ts, sanity/schemaTypes/sponsorForConference.ts, sanity/schemaTypes/sponsorActivity.ts). [1] [2] [3]
  • Created a migration (014-create-sponsor-for-conference) that scans all conferences with sponsors, creates sponsorForConference documents for each sponsor entry, copies relevant contract/tier info, and ensures no duplicates. The migration is idempotent and non-destructive, preserving legacy data for public display. [1] [2]

Contract Status and Legacy Sync

  • Added a second migration (015-add-contract-status) that sets a new contract_status field and a legacy_synced_at timestamp on all sponsorForConference documents, initializing values based on existing status and contract info. [1] [2]

Tooling and Configuration

  • Updated CLI config to include deployment info for Sanity Studio (sanity.cli.ts).
  • Changed prettier formatting script to show changed files as well as formatting them (package.json).

These updates lay the foundation for a robust sponsor CRM pipeline, enable future sponsor management features, and ensure smooth migration from legacy sponsor data.

@Starefossen Starefossen requested a review from a team as a code owner November 4, 2025 07:16
@vercel
Copy link

vercel bot commented Nov 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cloudnativebergen Ready Ready Preview Comment Nov 5, 2025 10:54am

- Add Sanity document schemas: sponsorForConference and sponsorActivity
- Add server-side Zod schemas for sponsor CRM input/updates/validation
- Add migration (and README) to create sponsorForConference docs from existing conference.sponsors[]
- Implement sponsor-crm lib (types, sanity helpers, activity logging, list/create/update/delete, copy from previous year)
- Add admin UI: pipeline page, SponsorCRMClient, SponsorCRMForm, UI utils and components
- Wire up TRPC client calls and formatting helpers for invoice/status display

Provides end-to-end support for managing sponsor relationships, stages, invoices and activity history in the admin.
- Introduce a full-featured sponsor CRM and admin UX
  - New client components for CRM board: SponsorCRMClient, BoardViewSwitcher, SponsorBoardColumn, SponsorCard
  - Modular CRM form with smaller controls: SponsorCombobox, OrganizerCombobox, StatusListbox, TierRadioGroup, ContractValueInput, and related constants
  - Filtering (tiers, assigned_to, tags), URL-syncing of filters, view modes (pipeline / contract / invoice), keyboard shortcuts (Cmd/Ctrl+O to open, Cmd/Ctrl+S to save)
  - Add sponsor page client for tier management: SponsorPageClient and admin pages for CRM, tiers, contacts, and activity
  - New admin widgets: SponsorDashboardMetrics, SponsorActionItems, SponsorActivityTimeline
  - Utilities for CRM: calculateSponsorValue, activity/action item helpers, board utils and exchange rate usage

- Sanity & data model updates
  - Add contract_status field and legacy_synced_at to sponsorForConference schema (with dropdown options and readOnly legacy timestamp)
  - Expand sponsor CRM types to include ContractStatus, support GBP currency, and rename avatar -> image for organizers/assigned_to
  - Update Sanity fetching/filters to include contract_status/tiers and assigned image field

- Server & router updates
  - Add support for logging contract status changes and list conference activities
  - Add crm.listOrganizers endpoint to expose organizers for assignment UI
  - Expose activities listing for conference and wire up activity creation logging on updates
  - Extend sponsor list query to accept tier filters

- New lib utilities
  - lib/sponsor/utils: grouping, deterministic shuffle, seed, tier sorting/utilities
  - lib/sponsor-crm/action-items: generate prioritized action items
  - lib sponsor-crm activity/list improvements (listActivitiesForConference)

- UI & component refactors
  - Sponsors component now uses sponsor utils for grouping, shuffling and tier price lookup
  - AdminPageHeader improved with backLink support and small class adjustments
  - ImageUploadZone minor class formatting fix
  - Added many new admin component exports and removed old SponsorActions (replaced by SponsorPageClient workflows)

- Forms, UX & polish
  - SponsorCRMForm refactor to use new subcomponents, show notifications on success/failure, reset mutation state on open, richer create/update handlers and keyboard behaviors
  - Enhanced SponsorTierEditor currency options (add GBP)

- Misc
  - package.json: change "format" script to use prettier --write --list-different
  - sanity.cli: add deployment.appId configuration

Notes:
- This is a large feature addition; backend schema and API changes were added to support contract workflows, filters and activity logging.
- Some exports and components were renamed/moved (SponsorActions removed, SponsorPageClient added) — update any external imports if necessary.
@Starefossen Starefossen linked an issue Nov 5, 2025 that may be closed by this pull request
12 tasks
@Starefossen Starefossen changed the title feat(sponsor-crm): add initial Sponsor CRM (pipeline) implementation feat(sponsor): add new Sponsor CRM system (phase 1) Nov 5, 2025
… wrapping, alignment, and configurable logo/text settings

- expose LOGO_SIZE_MIN/ MAX / DEFAULT, LOGO_PADDING_DEFAULT and TEXT_PADDING_* in config and use them as component defaults
- implement multiline text wrapping, per-line text alignment, horizontal positioning, and text padding; add font size, padding and color controls
- add per-line "Advanced Options" toggles and a global background "Advanced Options" to reveal extra controls (logo size/position, upload, color)
- render logo with correct aspect ratio and pointer-events-none; fix export/preview canvas styles and spacing
- various UI tweaks: reduced panel padding, adjusted grid gaps, default text/logo values and initial expanded states
… options

- add qr-code-styling dependency (and related lockfile entries)
- introduce QR constants & presets in meme-generator-config (size, defaults, color & style options)
- integrate QRCodeStyling to generate QR PNG data URLs and draw onto the canvas
- add QR Code panel in MemeGenerator with URL input, advanced options (size, position, dots/corner styles, colors)
- render generated QR into preview/export canvas and wire controls to state
- small accessibility tweak: make text input label sr-only
…el first

Reorder MarketingTabs to show the Meme Generator first and set defaultTab
to "meme-generator". Also tidy up a minor formatting/indentation in the
proposal speakers filter predicate.
- add scripts/check-speaker-slugs.ts and scripts/fix-missing-slugs.ts to detect
  and remediate speakers missing slug.current in Sanity
- update components (SpeakerPromotionCard, SpeakerShare, SpeakerShareSidebar,
  SpeakerGridExample, WorkshopCard) to build profile URLs from speaker.slug
  (remove fallback to speaker._id)
- improve getSpeakerSlug implementation: warn when slug is missing, generate a
  slug from the speaker name as a fallback, and return 'unknown-speaker' as the
  ultimate fallback; remove unused constant
- small formatting/JSX cleanup in WorkshopCard
@Starefossen Starefossen merged commit a9e1f90 into main Nov 5, 2025
1 of 2 checks passed
@Starefossen Starefossen deleted the sponsor-crm-phase-1 branch November 5, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sponsor CRM (Phase 1)

1 participant