Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
KeeyanGhoreshi committed Apr 25, 2024
1 parent bef1115 commit 8610ce6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ describe('Test the EtasuStatus Component', () => {
remsAdminResponse={etasu.parameter[0].resource}
/>
);
expect(
await screen.findByText('Status: Pending')
).toBeInTheDocument();
expect(await screen.findByText('Status: Pending')).toBeInTheDocument();
expect(await screen.findAllByTestId('etasu-item')).toHaveLength(3);
}
});
Expand Down
8 changes: 4 additions & 4 deletions src/views/Questionnaire/QuestionnaireForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1660,11 +1660,11 @@ export function QuestionnaireForm(props: QuestionnaireProps) {
const proceedToRems = () => {
const caseNumber = response.data?.case_number;
if (caseNumber && patient) {
patient.identifier = patient.identifier?.filter((iden) => {
if(iden.system === remsCaseUrl && iden.period ) {
if(iden.period?.end) {
patient.identifier = patient.identifier?.filter(iden => {
if (iden.system === remsCaseUrl && iden.period) {
if (iden.period?.end) {
const endDate = new Date(iden.period.end);
if(endDate.getMilliseconds() < Date.now()) {
if (endDate.getMilliseconds() < Date.now()) {
return false; // filter out old identifiers
}
}
Expand Down

0 comments on commit 8610ce6

Please sign in to comment.