Skip to content

Conversation

@pettinarip
Copy link
Member

Refactors API handlers (rfp, wishlist, direct-grant, office-hours) to use the centralized mapFormDataToSalesforce() function.

Description

  • Centralized field mapping: All handlers now use mapFormDataToSalesforce() from sf-field-mappings.ts as the single source of truth
  • Removed TypeScript interfaces: Handlers now derive types directly from Zod schemas (z.infer)
  • Decoupled Office Hours logic: Moved Office Hours-specific logic (Name field, conditional fields, company fallback) from the mapping function to the office-hours.ts handler
  • Reduced duplication: Eliminated manual field mapping code across all four handlers

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.

3 participants