Skip to content

Fix status#58

Merged
PCBZ merged 4 commits intomainfrom
fix_status
Apr 24, 2025
Merged

Fix status#58
PCBZ merged 4 commits intomainfrom
fix_status

Conversation

@PCBZ
Copy link
Copy Markdown
Owner

@PCBZ PCBZ commented Apr 24, 2025

No description provided.

@PCBZ PCBZ merged commit 2f534fb into main Apr 24, 2025
2 checks passed
github-actions Bot pushed a commit that referenced this pull request Apr 24, 2025
@PCBZ PCBZ requested a review from Copilot April 28, 2025 04:46
@PCBZ PCBZ self-assigned this Apr 28, 2025
@PCBZ PCBZ added the bug Something isn't working label Apr 28, 2025
Copy link
Copy Markdown

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 updates how status values are handled across both the client and server to standardize on using "Ready" instead of "active". Key changes include:

  • Updating the status conversion functions to remove lowercasing and explicit mapping for "active"/"Ready".
  • Changing client calls (in eventService, Donors.jsx, and Dashboard.jsx) to use "Ready" consistently.
  • Removing special-case handling for "active" in API routes and recalculating donor statistics based on detailed donor data.

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
client/src/utils/statusConversion.js Removed switch-case conversion logic and now returns raw backendStatus.
client/src/services/eventService.js Eliminated mapping of status parameters and response status conversion.
client/src/components/donors/Donors.jsx Updated condition checks from “active” to “Ready” for editing donor information.
client/src/components/Dashboard.jsx Changed status parameter in the events fetch from “active” to “Ready”.
Server/src/routes/event.js Removed special handling for 'active' status in query filtering.
Server/src/routes/donorList.js Revised donor list query to include event donors and recalculated statistics accordingly.
Files not reviewed (1)
  • client/src/components/events/EventManagement.css: Language not supported
Comments suppressed due to low confidence (6)

Server/src/routes/event.js:116

  • The mapping for 'active' status has been removed, which may affect filtering logic. Please verify that this removal is intentional and that filtering by status behaves as expected.
if (validStatuses.includes(status)) {

client/src/utils/statusConversion.js:10

  • The previous conversion logic that mapped 'Ready' to a different format (lowercasing the value) has been removed. Please confirm that returning the raw backendStatus is intended and that all parts of the application correctly handle this change.
return backendStatus;

client/src/services/eventService.js:19

  • The logic that converted the 'active' status to 'Ready' has been removed. Verify that the backend now expects status values in the new format and that client calls are updated accordingly.
Object.keys(params).forEach(key => {

client/src/components/donors/Donors.jsx:506

  • The conditional check has been updated from 'active' to 'Ready'. Ensure that this change aligns with the new status standards across both client and server.
if (selectedEvent.status !== 'Ready') {

client/src/components/Dashboard.jsx:34

  • The status filter in the dashboard fetch has been updated to 'Ready'. Confirm that all dependent components and logic are now operating under the assumption that events are identified by 'Ready' rather than 'active'.
const eventsResult = await getEvents({ status: 'Ready', limit: 10 });

Server/src/routes/donorList.js:642

  • The query now includes event donors and calculates statistics based on donor details rather than pre-aggregated fields. Confirm that this new approach produces the expected results and is consistent with client-side assumptions.
const donorLists = await prisma.eventDonorList.findMany({

@PCBZ PCBZ deleted the fix_status branch April 28, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants