Skip to content

feat(eco-challenge): add organization-wide custom challenge creator - #1189

Closed
sushmitakoti661-prog wants to merge 1 commit into
Aditya8369:mainfrom
sushmitakoti661-prog:feat/Organization-Wide-Custom-Eco-Challenge-creator
Closed

sushmitakoti661-prog wants to merge 1 commit into
Aditya8369:mainfrom
sushmitakoti661-prog:feat/Organization-Wide-Custom-Eco-Challenge-creator

Conversation

@sushmitakoti661-prog

Copy link
Copy Markdown
Contributor

🛠️ Summary of Changes

  • Database Schema: Added tenant_id, created_by, start_date, end_date, verification_type, and is_global fields to challenge schema definitions with composite indexing for tenant lookups.
  • Backend API & Authorization:
    • Added RBAC middleware to enforce tenant admin write access (req.user.role === 'TENANT_ADMIN').
    • Created endpoints under /api/tenants/:tenantId/challenges (POST, PUT, DELETE).
    • Scoped GET /api/challenges to fetch global challenges alongside active tenant-specific challenges without cross-tenant data leaks.
  • Frontend UI & Service Layer:
    • Extended tenantService.ts with API client handlers (createTenantChallenge, updateTenantChallenge, deleteTenantChallenge).
    • Added custom challenge management controls and an "Organization Exclusive" badge to EcoChallengeDashboard.jsx.
    • Updated Achievements.jsx to reflect tenant and team-scoped progress.

✅ Test Verification

  • Ran targeted syntax and linting checks on modified server routes and components (TARGETED_CHECK_OK).
  • Ran Vitest suite for src/components/Achievements.test.jsx (5/5 tests passed).

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@sushmitakoti661-prog is attempting to deploy a commit to the Aditya Mahajan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thank You for Your Contribution! 🎉

Hi @sushmitakoti661-prog,

Thank you for opening this Pull Request and contributing to our project. We truly appreciate your efforts.

Please make sure that:

  • Your code follows the project's guidelines.
  • You have linked the appropriate issue (if applicable).
  • Screenshots are added for UI/UX changes.
  • Your PR is ready for review.

The maintainer @Aditya8369 will review your PR shortly!

Happy Contributing! 🚀

@github-actions github-actions Bot added the ECSoC26 Contributions considered under ECSoC'26 label Aug 31, 2026
@sushmitakoti661-prog

Copy link
Copy Markdown
Contributor Author

Hlo @Aditya8369 can u merge this pr?

@Aditya8369 Aditya8369 closed this Sep 1, 2026
@sushmitakoti661-prog

Copy link
Copy Markdown
Contributor Author

Hlo @Aditya8369 can u tell why didn't u merge the pr before closing? Bcz of this my rank dropped? This pr was created before the deadline.

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

Labels

ECSoC26 Contributions considered under ECSoC'26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants