Skip to content

Add GraphQL Support and Notes Integration for Users and Contacts#264

Open
JoseSzycho wants to merge 7 commits intomainfrom
249/notes-integration
Open

Add GraphQL Support and Notes Integration for Users and Contacts#264
JoseSzycho wants to merge 7 commits intomainfrom
249/notes-integration

Conversation

@JoseSzycho
Copy link

@JoseSzycho JoseSzycho commented Dec 8, 2025

Add GraphQL Support and Notes Integration for Users and Contacts

Description

This PR introduces GraphQL support to the staff portal and implements a comprehensive notes management system for Users and Contacts. Staff members can now add, edit, and manage notes with follow-up tracking capabilities.

Closes #249

📹 Video Walkthrough: View Demo Video

Changes

🚀 GraphQL Integration

  • Added GraphQL client with code generation support (codegen.ts)
  • Implemented GraphQL proxy integration in the server routes
  • Generated TypeScript types from GraphQL schema for type-safe queries
  • Added new environment variable GRAPHQL_URL for API configuration

📝 Notes Feature

  • Note Management Components

    • NoteList - Display and manage notes with inline editing
    • NoteForm - Create and edit notes with follow-up options
    • ShowNotesDialog - Modal dialog to view notes on entities
    • FollowUpsList - List of notes marked for follow-up
    • MyFollowUpsDialog - Quick access to personal follow-ups from sidebar
  • Note Capabilities

    • Create notes on Users and Contacts
    • Edit existing notes
    • Mark notes for follow-up with next action and due date
    • View "My Follow-ups" from the sidebar navigation
    • Track note creator and creation timestamp

🔧 Additional Improvements

  • Enhanced Tooltip component with maxWidth prop for better customization
  • Migrated API requests from OpenAPI SDK to simplified request functions
  • Added comprehensive unit tests for request functions
  • Cleaned up deprecated OpenAPI generated code

Screenshots

Add screenshots of the notes feature in action here

Testing

  • Notes can be created on User detail pages
  • Notes can be created on Contact detail pages
  • Notes appear correctly in the notes list
  • Follow-up notes appear in "My Follow-ups" dialog
  • Notes can be edited and deleted
  • GraphQL queries execute correctly through the proxy

- Implemented `useNotes`, `useNoteCreate`, `useNoteUpdate`, and `useNoteDelete` hooks for managing notes.
- Created GraphQL request functions for listing, creating, updating, and deleting notes.
- Added tests for note request functions to ensure correct API interactions.
- Updated environment configuration to include optional `GRAPHQL_URL` setting.
- Integrated `AddNoteDialog` for creating notes related to users.
- Implemented `NoteList` to display notes associated with the user.
- Added state management for refreshing the note list upon creation of new notes.
- Integrated `AddNoteDialog` and `ShowNotesDialog` for managing notes related to contacts.
- Added state management to refresh notes upon creation.
- Updated UI to include note management components in the contact information section.
- Integrated `MyFollowUpsDialog` for managing notes follow-ups in the user navigation menu.
- Updated the dropdown menu to include an option for accessing notes follow-ups with a new icon.
- Introduced a new `maxWidth` prop to the `Tooltip` component to allow customization of tooltip width.
- Updated the `TooltipContent` to apply the maxWidth style dynamically based on the new prop.
@mustela
Copy link
Collaborator

mustela commented Dec 9, 2025

@JoseSzycho great work here! I think notes should live on their own tab. That's too much for the overview page. Maybe in the overview page, you could just list the follow ups for the user. My 2 cents.

@gaghan430
Copy link
Contributor

@JoseSzycho pls pull the latest changes from main, and I’ll review it afterward

@JoseSzycho
Copy link
Author

Seems that the Notes API is going to change, so I will wait to make the changes on the API and then come back to fix this.

datum-cloud/enhancements#501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notes Integration - Define the Staff Portal UI/UX for Contact Notes

3 participants