Files
formbricks-formbricks/apps
Cursor Agent 21ff1eb385 feat: Add NPS and Rating summary view improvements
This commit introduces several enhancements to the NPS and Rating survey summary views.

**NPS Summary:**
- Implemented a tabbed interface to switch between "grouped" and "individual" views.
- The "grouped" view displays the breakdown of promoters, passives, and detractors.
- The "individual" view shows a bar chart of responses for each NPS score (0-10).
- Added tooltips for better user guidance.

**Rating Summary:**
- Integrated CSAT (Customer Satisfaction) score calculation and display.
- Added tooltips for CSAT information.

**Backend/Logic Changes:**
- Updated `getQuestionSummary` to calculate and include CSAT data for Rating questions.
- Modified `getQuestionSummary` to include an array of `choices` for NPS questions, detailing individual score counts and percentages.
- Added new tests to cover CSAT calculations for various rating scales and NPS individual score breakdowns.
- Updated type definitions for `TSurveyQuestionSummaryRating` and `TSurveyQuestionSummaryNps` to accommodate the new data structures.

Co-authored-by: johannes <johannes@formbricks.com>
2025-11-17 08:43:56 +00:00
..