diff --git a/libs/tup-components/src/projects/ProjectsListing/ProjectsListingAllocationTable.tsx b/libs/tup-components/src/projects/ProjectsListing/ProjectsListingAllocationTable.tsx index 281f81c18..3864a0f5e 100644 --- a/libs/tup-components/src/projects/ProjectsListing/ProjectsListingAllocationTable.tsx +++ b/libs/tup-components/src/projects/ProjectsListing/ProjectsListingAllocationTable.tsx @@ -11,7 +11,6 @@ export const ProjectsListingAllocationTable: React.FC<{ project: ProjectsRawSystem; }> = ({ project }) => { const allocations = project.allocations || []; - const isActive = allocations.some((a) => a.status === 'Active'); return ( @@ -20,21 +19,20 @@ export const ProjectsListingAllocationTable: React.FC<{ + - {allocations - // Show expired allocations if the project is inactive. - .filter((a) => (isActive ? a.status === 'Active' : true)) - .map((allocation) => ( - - - - - - - ))} + {allocations.map((allocation) => ( + + + + + + + + ))}
Systems Awarded UsedStatus Expires
{allocation.resource}{allocation.total} SU{allocation.used} SU{formatDate(allocation.end)}
{allocation.resource}{allocation.total} SU{allocation.used} SU{allocation.status ?? '-'}{formatDate(allocation.end)}
); diff --git a/libs/tup-components/src/projects/details/ProjectDetails.test.tsx b/libs/tup-components/src/projects/details/ProjectDetails.test.tsx index 3948b815d..812c2206d 100644 --- a/libs/tup-components/src/projects/details/ProjectDetails.test.tsx +++ b/libs/tup-components/src/projects/details/ProjectDetails.test.tsx @@ -17,7 +17,8 @@ describe('Project Details Component', () => { expect(columnHeaders[0].textContent).toEqual('Systems'); expect(columnHeaders[1].textContent).toEqual('Awarded'); expect(columnHeaders[2].textContent).toEqual('Used'); - expect(columnHeaders[3].textContent).toEqual('Expires'); + expect(columnHeaders[3].textContent).toEqual('Status'); + expect(columnHeaders[4].textContent).toEqual('Expires'); expect(getByText('Lonestar6')).toBeDefined(); expect(getByText('10 SU')).toBeDefined(); expect(getByText('0 SU')).toBeDefined();