Skip to content

Sanjeev: Fix Create New Event Button in Upcoming Events Section#4366

Merged
one-community merged 20 commits intodevelopmentfrom
Sanjeev-fix-create-new-event-button
Feb 3, 2026
Merged

Sanjeev: Fix Create New Event Button in Upcoming Events Section#4366
one-community merged 20 commits intodevelopmentfrom
Sanjeev-fix-create-new-event-button

Conversation

@sanjeev29
Copy link
Copy Markdown
Contributor

Description

Screenshot 2025-11-09 at 9 09 33 PM

Main changes explained:

  • Create file src/actions/communityPortal/eventActions.js - Introduces createEvent action function that makes POST requests to ENDPOINTS.EVENTS API endpoint. Includes error handling and toast notifications for success/error states.

  • Create file src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx - New modal component for event creation with form fields.

  • Update file src/components/CommunityPortal/Reports/Participation/MyCases.jsx - Added:

    • Import for CreateEventModal component
    • State management for modal visibility (isCreateModalOpen)
    • onClick handler on the "+ Create New" button to open the modal
    • Rendering of CreateEventModal component

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. navigate to communityportal/reports/participation on the UI
  6. click on + Create New button which should open a modal for event creation.

Screenshots or videos of changes:

https://www.dropbox.com/scl/fi/9jpaohap7a0wq2y0bt8bs/PR-4365-video.mov?rlkey=lzmomi7ulch56nztjlkg1j3pk&st=ne0zvdmm&dl=0

Note:

The UI currently displays dummy/mock events, so the newly created event will not appear in the list immediately. Verify success by checking the Network tab response (status 201 and the created event object) to confirm the event was created in the backend.

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 10, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 87e705b
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69813db5a940a700082a683d
😎 Deploy Preview https://deploy-preview-4366--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Nov 19, 2025
@Prem203
Copy link
Copy Markdown
Contributor

Prem203 commented Nov 23, 2025

Reviewed the Pr with an admin account. The event creation modal is working as expected and on adding a new event the dialog box appears in the top right. The network ta response also confirms that event is created and the payload is generated to be pushed.

image image

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 2, 2025

Anusha-Gali
Anusha-Gali previously approved these changes Dec 6, 2025
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Sanjeev,

I have reviewed your PR locally and have verified the successful event creation payload.
Screenshot 2025-12-05 at 7 43 40 PM
Screenshot 2025-12-05 at 7 45 22 PM

@beblicarl beblicarl self-requested a review December 19, 2025 19:01
Copy link
Copy Markdown
Contributor

@beblicarl beblicarl left a comment

Choose a reason for hiding this comment

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

The functionality works perfectly however the UI is bad in darkmode

image image image

@sanjeev29 sanjeev29 requested a review from beblicarl January 7, 2026 07:26
Copy link
Copy Markdown
Contributor

@Shravan-neelamsetty Shravan-neelamsetty left a comment

Choose a reason for hiding this comment

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

Hi Sanjeev, I tested this PR locally after temporarily commenting out the missing CSS import on line 23 of CreateEventModal.jsx ("../../../Header/DarkMode.css" doesn't exist and causes a build error). After this fix, I navigated to /communityportal/reports/participation and clicked the "+ Create New" button, which successfully opens the event creation modal. The form displays all necessary fields correctly, and I verified in the Network tab that submitting an event returns status 201 with the created event object, confirming the backend integration works.
Screenshot 2026-01-09 at 5 27 30 AM
Screenshot 2026-01-09 at 5 28 16 AM
Screenshot 2026-01-09 at 5 30 02 AM

@abhinav-TB
Copy link
Copy Markdown
Member

Hi Sanjeev, I tested your PR locally and everything seems to work properly. I was able to see the modal and was able to submit it without any issues.

image image

Copy link
Copy Markdown

@Vikas-8055 Vikas-8055 left a comment

Choose a reason for hiding this comment

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

Hi Sanjeev, I performed local testing on this PR and identified a build issue caused by the missing DarkMode.css import reference on line 23 of CreateEventModal.jsx. Upon commenting out this problematic import, I proceeded to test at /communityportal/reports/participation where the "+ Create New" button successfully triggered the event creation modal. All form fields rendered as expected, and I validated the backend integration by creating a test event the Network tab confirmed a successful 201 response with the complete event object in the payload.

Screenshot 2026-01-09 at 7 42 58 PM Screenshot 2026-01-09 at 7 42 46 PM Screenshot 2026-01-09 at 7 42 39 PM

@Ganesh112001
Copy link
Copy Markdown

Hi Sanjeev, I tested this PR locally following the provided steps and encountered a blocking import error that prevents the application from loading. After checking out the Sanjeev-fix-create-new-event-button branch, running npm install, and starting the dev server with npm run dev, the browser displayed an error stating "Failed to resolve import '../../../Header/DarkMode.css' from 'src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx'. Does the file exist?" This error appears on line 23 of the CreateEventModal.jsx file, where it attempts to import a CSS file that either doesn't exist in the repository or has an incorrect relative path. As a result, the entire application fails to load, and I cannot navigate to /communityportal/reports/participation to test the "+ Create New" button functionality as intended. This import path issue needs to be resolved before the PR can be properly tested and approved for merge, as it currently blocks all reviewers from accessing the feature without manually modifying the code.
Screenshot 2026-01-10 at 1 58 15 AM

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Sanjeev,

Reviewing this PR again since Jae asked me to. Everything appears to be working as expected, i would like to point out one small UI issue which is that the calendar is in light mode in dark mode.

Image Image Image Image Image

@saitejakaasoju
Copy link
Copy Markdown
Contributor

Hi Sanjeev,
I reviewed this PR locally by logging in as an admin and navigating to the Upcoming Events section. The “+ Create New” button now works as expected, and I was able to successfully create an event.
One minor UI observation: in dark mode, some of the text inside the Upcoming Events cards appears slightly hard to read due to low contrast.
PR-4366
PR-4366-1
PR-4366-2
PR-4366-3

saitejakaasoju
saitejakaasoju previously approved these changes Jan 31, 2026
Copy link
Copy Markdown
Contributor

@shashank-madan shashank-madan left a comment

Choose a reason for hiding this comment

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

Functionality works as expected. however text in dark mode does not seem to be visible clearly. Please also create a task for rendering the created backend events instead of mock data. Thank you.

HGN.APP.-.Google.Chrome.2026-01-31.19-27-12.mp4

rohanrastogi311
rohanrastogi311 previously approved these changes Feb 1, 2026
Copy link
Copy Markdown

@rohanrastogi311 rohanrastogi311 left a comment

Choose a reason for hiding this comment

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

Hi Sanjeev,

Well done with this implementation.

Image Image Image

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 3, 2026

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit 3f566e2 into development Feb 3, 2026
10 checks passed
pavanputti pushed a commit that referenced this pull request Feb 22, 2026
…ew-event-button

Sanjeev: Fix Create New Event Button in Upcoming Events Section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.