Skip to content

Commit

Permalink
[MDS-5933] used is_expired field (#3065)
Browse files Browse the repository at this point in the history
used is_expired field
  • Loading branch information
matbusby-fw authored Apr 23, 2024
1 parent d691872 commit a8b7b30
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
} from "@mds/common/redux/slices/complianceCodesSlice";
import AuthorizationGuard from "@/HOC/AuthorizationGuard";
import * as Permission from "@/constants/permissions";
import { isAfter } from "date-fns";

const ComplianceCodeManagement: FC = () => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -247,7 +246,7 @@ const ComplianceCodeManagement: FC = () => {
].filter(Boolean);

const setExpiredRowBackground = (record: IComplianceArticle) => {
if (isAfter(new Date(), new Date(record.expiry_date))) {
if (record.is_expired) {
return "expired-row";
}
return "";
Expand Down

0 comments on commit a8b7b30

Please sign in to comment.