Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React from "react";
import { Table, Badge, Row, Col } from "react-bootstrap";
import dateFormat from "dateformat";
import { ClassTypes } from "../../../utils/XAEnums";
import { ClassTypes } from "Utils/XAEnums";
import {
isEmpty,
isEqual,
Expand All @@ -34,7 +34,7 @@ import {
includes,
split
} from "lodash";
import { currentTimeZone } from "../../../utils/XAUtils";
import { currentTimeZone } from "Utils/XAUtils";

export const PolicyLogs = ({ data, reportdata }) => {
const {
Expand All @@ -47,6 +47,10 @@ export const PolicyLogs = ({ data, reportdata }) => {
objectId
} = data;

const policyZoneName = reportdata?.find(
(obj) => obj.attributeName === "Zone Name"
);

/* CREATE LOGS VARIABLES */
const createPolicyDetails = reportdata.filter((policy) => {
return (
Expand All @@ -59,7 +63,8 @@ export const PolicyLogs = ({ data, reportdata }) => {
policy.attributeName != "Deny Exceptions" &&
policy.attributeName != "Masked Policy Items" &&
policy.attributeName != "Row level filter Policy Items" &&
policy.attributeName != "Validity Schedules"
policy.attributeName != "Validity Schedules" &&
policy.attributeName != "Zone Name"
);
});

Expand Down Expand Up @@ -1866,6 +1871,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
</div>
<div className="fw-bolder">Policy Name: {objectName}</div>
<div className="fw-bolder">Service Name: {parentObjectName}</div>
{policyZoneName?.newValue ? (
<div className="fw-bolder">
Zone Name: {policyZoneName.newValue}
</div>
) : null}
<div className="fw-bolder">
Created Date: {currentTimeZone(createDate)}
</div>
Expand Down Expand Up @@ -2902,6 +2912,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
</div>
<div className="fw-bolder">Policy Name: {objectName}</div>
<div className="fw-bolder">Service Name: {parentObjectName}</div>
{policyZoneName?.previousValue ? (
<div className="fw-bolder">
Zone Name: {policyZoneName.previousValue}
</div>
) : null}
<div className="fw-bolder">
Deleted Date:{currentTimeZone(createDate)}
</div>
Expand Down Expand Up @@ -3661,6 +3676,11 @@ export const PolicyLogs = ({ data, reportdata }) => {
</div>
<div className="fw-bolder">Policy Name: {objectName}</div>
<div className="fw-bolder">Service Name: {parentObjectName}</div>
{policyZoneName?.previousValue ? (
<div className="fw-bolder">
Zone Name: {policyZoneName.previousValue}
</div>
) : null}
<div className="fw-bolder">
Deleted Date: {currentTimeZone(createDate)}
</div>
Expand Down