Skip to content

Commit

Permalink
Merge pull request #1749 from bcgov/hotfix/ALCS-2025
Browse files Browse the repository at this point in the history
Fix NOI advanced search "submitted to" filter not working properly
  • Loading branch information
Abradat authored Jun 6, 2024
2 parents 484e81d + 30dd856 commit 7318a15
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,20 @@ export class NoticeOfIntentAdvancedSearchService {
query = query.andWhere(
'noi.date_submitted_to_alc >= :date_submitted_from',
{
date_submitted_from: new Date(searchDto.dateSubmittedFrom),
date_submitted_from: getStartOfDayToPacific(
searchDto.dateSubmittedFrom,
),
},
);
}

if (searchDto.dateSubmittedTo !== undefined) {
query = query.andWhere(
'noi.date_submitted_to_alc <= :date_submitted_to',
'noi.date_submitted_to_alc < :date_submitted_to',
{
date_submitted_to: new Date(searchDto.dateSubmittedTo),
date_submitted_to: getNextDayToPacific(
searchDto.dateSubmittedTo,
),
},
);
}
Expand Down

0 comments on commit 7318a15

Please sign in to comment.