Skip to content

feat: implement employee charitable giving, corporate matching, and payroll deduction campaign engine (closes #2011) - #2080

Merged
Dev1822 merged 1 commit into
Dev1822:mainfrom
Aakif-Kohari:feat/issue-2011-charitable-giving-engine
Aug 31, 2026
Merged

feat: implement employee charitable giving, corporate matching, and payroll deduction campaign engine (closes #2011)#2080
Dev1822 merged 1 commit into
Dev1822:mainfrom
Aakif-Kohari:feat/issue-2011-charitable-giving-engine

Conversation

@Aakif-Kohari

Copy link
Copy Markdown

Description

This PR implements an Employee Charitable Giving, Corporate Matching & Payroll Deduction Campaign Engine. It introduces schemas to track giving campaigns, employee pledges, and corporate match ledgers. The engine evaluates payroll deductions against pledge schedules, tracks YTD employee contributions, and calculates the corporate match up to the campaign cap. A "Campaign Cap Guardrail" automatically halts payroll deductions and corporate matching once the employee's pledge total or the corporate matching limit is reached. The frontend allows employees to submit pledges and CSR Admins to monitor participation and export disbursement files.

Fixes#2011

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Changes Made

  • backend/src/constants/charitable.constants.js (New): Campaign statuses, matching rules, and deduction frequencies.
  • backend/src/models/charitableGiving.model.js (New): Schemas for CharityOrganization, GivingCampaign, EmployeePledge, and CorporateMatchLedger.
  • backend/src/utils/givingMatchingEngine.utils.js (New): Engine for period deductions, cap evaluations, and disbursement reports.
  • backend/src/controllers/charitableGiving.controller.js (New): Endpoints for campaign management, pledge submission, and payroll processing.
  • backend/src/routes/charitableGiving.routes.js (New): Route definitions.
  • frontend/src/components/PledgeFormModal.jsx (New): Reusable modal for employees to submit new pledges.
  • frontend/src/pages/CharitableGivingDashboard.jsx (New): Main dashboard for viewing campaigns and tracking personal pledges.

How Has This Been Tested?

  • Tested locally on frontend
  • Tested locally on backend

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@vercel

vercelBot commented Aug 31, 2026

Copy link
Copy Markdown

@Aakif-Kohari is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Aakif-Kohari

Copy link
Copy Markdown
Author

Please try to add many Bonus XP tags (good-issue, good-pr, good-ui, good-backend) before merge.🙏

@Aakif-KohariAakif-Kohari changed the title feat: implement employee charitable giving, corporate matching, and p…feat: implement employee charitable giving, corporate matching, and payroll deduction campaign engine (closes #2011)Aug 31, 2026
@Dev1822Dev1822 added enhancement New feature or request ECSoC26 labels Aug 31, 2026
@Dev1822
Dev1822 merged commit c4e0d2f into Dev1822:mainAug 31, 2026
9 of 24 checks passed
@Aakif-Kohari
Aakif-Kohari deleted the feat/issue-2011-charitable-giving-engine branch August 31, 2026 12:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECSoC26-L3ECSoC26enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] implement employee charitable giving, corporate matching, and payroll deduction campaign engine

2 participants

@Aakif-Kohari@Dev1822