Sharadha K - feat: Event Reschedule Button (new PR - replacement for #4276)#5386
Sharadha K - feat: Event Reschedule Button (new PR - replacement for #4276)#5386SharadhaKasiviswanathan wants to merge 8 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds Community Portal “event reschedule” functionality by introducing new reschedule UI/screens and wiring them into routing and permissions.
Changes:
- Adds a Reschedule button to the Community Portal Activities list that navigates to a manage/reschedule page.
- Introduces RescheduleEvent (create poll + notify) and ReschedulePoll (email link voting) components with shared styling.
- Updates routing/permissions to expose the new pages and persist form state via redux-persist.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/CommunityPortal/Activities/ActivityList.jsx | Adds Reschedule button + navigation callback to reschedule/manage route. |
| src/components/CommunityPortal/Activities/RescheduleEvent.jsx | New reschedule modal flow (build options, notify participants). |
| src/components/CommunityPortal/Activities/ReschedulePoll.jsx | New poll voting page driven by query params and API fetches. |
| src/components/CommunityPortal/Activities/RescheduleEvent.module.css | Styles for reschedule modal and poll page (incl. dark mode). |
| src/routes.jsx | Adds routes for reschedule manage page and poll page. |
| src/utils/routePermissions.js | Adds rescheduleEvent permission string to the permissions list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <CPProtectedRoute | ||
| path="/communityportal/activities/:activityId/manage" | ||
| component={RescheduleEvent} | ||
| routePermissions={['rescheduleEvent']} | ||
| /> |
| import { useState, useEffect, useMemo, useCallback } from 'react'; | ||
| import { useSelector } from 'react-redux'; | ||
| import { useHistory } from 'react-router-dom'; | ||
| import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap'; |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
HemanthNidamanuru
left a comment
There was a problem hiding this comment.
Hi Sharadha,
I tested this PR locally. I am able to access the Reschedule option, but I am unable to create a poll. The calendar used to select dates also needs improvement for better usability. Please refer to the attached video for the issue.
PR.5386.mp4
- Fix RescheduleEvent.jsx:
- Fix prettier formatting (indentation inconsistencies)
- Use useParams() to get activityId from URL route params
- Remove hardcoded placeholder event (_id: '1' fallback)
- Add eslint-disable for intentional alert() calls
- Fix Authorization header: only set when token exists
- Add aria-label to close button (already present, verified)
- Fix ReschedulePoll.jsx:
- Fix prettier formatting (indentation inconsistencies)
- Change activityId default from '1' to '' so missing-param
guard works correctly
- Add optional chaining for poll.activity?.title and
poll.activity?.name with fallback
- Fix ActivityList.test.jsx:
- Wrap component in MemoryRouter to support useHistory()
used by the reschedule button
- Fix routes.jsx:
- Remove unsupported routePermissions prop from CPProtectedRoute
(CPProtectedRoute does not implement permission checking)
|



Re-creation of PR #4276 (Event Reschedule Button) which was accidentally merged and then reverted via #5378.
This PR adds the event reschedule button functionality to the Community Portal activities.
Changes: