#66: Project detail "Open Demands" summary incorrectly counted COMPLETED demands as open. Fix: add `status !== "COMPLETED"` to the activeDemands filter in /projects/[id]/page.tsx. #59/#67: Project creation and edit had two bugs: 1. Both invalidated `project.list` but the page queries `project.listWithCosts` — the list never refreshed after a save. 2. Success toasts were either absent (ProjectModal) or mounted inside the wizard component that unmounts before the toast finishes. Fix: correct invalidation key to listWithCosts; add optional onSuccess prop to both ProjectWizard and ProjectModal; ProjectsClient wires onSuccess to a persistent SuccessToast rendered outside the modals. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -32,7 +32,7 @@ export default async function ProjectDetailPage({ params }: ProjectDetailPagePro
|
||||
}
|
||||
|
||||
const activeAssignments = project.assignments.filter((assignment) => assignment.status !== "CANCELLED");
|
||||
const activeDemands = project.demands.filter((demand) => demand.status !== "CANCELLED");
|
||||
const activeDemands = project.demands.filter((demand) => demand.status !== "CANCELLED" && demand.status !== "COMPLETED");
|
||||
const requestedSeats = activeDemands.reduce((sum, demand) => sum + demand.requestedHeadcount, 0);
|
||||
const unfilledSeats = activeDemands.reduce((sum, demand) => sum + demand.unfilledHeadcount, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user