RED-8463 - Date filter in audit log not filtering correctly

This commit is contained in:
Valentin Mihai 2024-02-21 17:29:03 +02:00
parent 4184b39513
commit 33a724e6f6

View File

@ -104,7 +104,12 @@ export class AuditScreenComponent extends ListingComponent<Audit> implements OnI
const from = this.form.get('from').value;
let to = this.form.get('to').value;
if (to) {
to = to.clone().add(1, 'd');
const hoursLeft = new Date(to).getHours();
const minutesLeft = new Date(to).getMinutes();
to = to
.clone()
.add(24 - hoursLeft - 1, 'h')
.add(60 - minutesLeft - 1);
}
const logsRequestBody: IAuditSearchRequest = {
pageSize: PAGE_SIZE,