Skip to content

Commit

Permalink
fix:[UIUX-709] removed violation created date condition
Browse files Browse the repository at this point in the history
  • Loading branch information
go-jay authored and santhosh-challa committed Jun 26, 2024
1 parent 324a84c commit 821d15e
Showing 1 changed file with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ export class IssueDetailsComponent implements OnInit, OnDestroy {
processData(data) {
try {
this.outerArr = data;
let firsOpenAuditLog = false;
let firsOpenAuditLog = true;
const { date, expirydate } = this.VIOLATION_CONSTANTS.AUDIT_LOG.COLUMNS_KEYS;
let processedData = this.outerArr.reverse().filter((obj, index) => {
if (this.outerArr[index][date] && this.outerArr[index][date].valueText !== DASH) {
Expand All @@ -801,21 +801,15 @@ export class IssueDetailsComponent implements OnInit, OnDestroy {
) {
this.outerArr[index][expirydate].isDate = true;
}
if (
this.outerArr[index].Date.valueText >= this.issueBlocks['violationCreatedDate']
) {
if (!firsOpenAuditLog) {
firsOpenAuditLog = true;
return true;
} else {
return (
index !== 0 &&
this.outerArr[index - 1].Status.valueText.toLowerCase() !=
obj.Status.valueText.toLowerCase()
);
}
if (firsOpenAuditLog) {
firsOpenAuditLog = false;
return true;
}
return false;
return (
index &&
this.outerArr[index - 1].Status.valueText.toLowerCase() !=
obj.Status.valueText.toLowerCase()
);
});

processedData = processedData.reverse();
Expand Down

0 comments on commit 821d15e

Please sign in to comment.