From 821d15efd7ba752f06cf74bffe44f7dfd6c347b6 Mon Sep 17 00:00:00 2001 From: JaysinhGo Date: Wed, 26 Jun 2024 12:25:07 +0530 Subject: [PATCH] fix:[UIUX-709] removed violation created date condition --- .../issue-details/issue-details.component.ts | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/webapp/src/app/pacman-features/modules/compliance/issue-details/issue-details.component.ts b/webapp/src/app/pacman-features/modules/compliance/issue-details/issue-details.component.ts index 7bcf3b85b..f66d3e8ed 100644 --- a/webapp/src/app/pacman-features/modules/compliance/issue-details/issue-details.component.ts +++ b/webapp/src/app/pacman-features/modules/compliance/issue-details/issue-details.component.ts @@ -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) { @@ -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();