Skip to content

Commit

Permalink
fix(handler): remove section and end date when application is not acc…
Browse files Browse the repository at this point in the history
…epted (#3232)
  • Loading branch information
sirtawast authored Sep 4, 2024
1 parent cc7ff47 commit 38c2b66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ const HandlingStep1: React.FC<HandlingStepProps> = ({
HANDLED_STATUSES.includes(application.status) && (
<HandledView data={application} />
)}
{application.archived && <ArchivedView data={application} />}
{application.archived &&
application.status === APPLICATION_STATUSES.ACCEPTED && (
<ArchivedView data={application} />
)}
</Container>
</ReviewStateContext.Provider>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import useSearchApplicationQuery from 'benefit/handler/hooks/useSearchApplicationQuery';
import { SearchResponse } from 'benefit/handler/types/search';
import { APPLICATION_STATUSES } from 'benefit-shared/constants';
import {
ApplicationData,
ApplicationListItemData,
Expand Down Expand Up @@ -64,8 +65,12 @@ export const prepareSearchData = (
handledAt: convertToUIDateFormat(handled_at) || '-',
applicationNum,
alterations,
calculationEndDate:
convertToUIDateFormat(calculation?.end_date) || '-',
calculationEndDate: [
APPLICATION_STATUSES.ACCEPTED,
APPLICATION_STATUSES.ARCHIVAL,
].includes(status)
? convertToUIDateFormat(calculation?.end_date) || '-'
: '-',
};
})
: [];
Expand Down

0 comments on commit 38c2b66

Please sign in to comment.