Skip to content

Conversation

@ayaz9616
Copy link

Description

Adds an “Income by Category” chart to the Dashboard and a toggle to switch between Expense and Income category views. The backend now returns grouped income data, and the frontend reuses the pie chart component for both types.

Related Issue

Fixes #<148>

Motivation and Context

Provides users with a clear breakdown of income sources by category, matching the existing expense visualization for consistency and better financial planning.

Types of Changes

-New Feature

How Has This Been Tested?

  • Manually verified /api/transactions/charts returns incomeByCategory.
  • Dashboard toggle switches between Expense and Income charts.
  • Checked empty states and theme compatibility.

Screenshots (if applicable):

image image

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Copilot AI review requested due to automatic review settings October 24, 2025 17:28
@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for paisable ready!

Name Link
🔨 Latest commit ca6fee3
🔍 Latest deploy log https://app.netlify.com/projects/paisable/deploys/68fbb745a0d0a40008a44236
😎 Deploy Preview https://deploy-preview-175--paisable.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94
Accessibility: 100
Best Practices: 100
SEO: 91
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an "Income by Category" chart to the Dashboard, allowing users to toggle between viewing expense and income category breakdowns using a reusable pie chart component.

Key Changes:

  • Added backend aggregation for income grouped by category
  • Implemented frontend toggle to switch between expense and income views
  • Enhanced CategoryPieChart component to accept dynamic labels

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
backend/controllers/transactionController.js Added income by category aggregation query and included it in the chart data response
frontend/src/components/CategoryPieChart.jsx Made the chart label configurable via props to support both expense and income views
frontend/src/pages/DashboardPage.jsx Added toggle UI and state management to switch between expense and income category charts
Files not reviewed (1)
  • backend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ayaz9616
Copy link
Author

Brother have you checked it , either accept it or tell if some changes are required

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.

1 participant