From 276f0e012909e9a6e2a16d4ba3b0905548bc8527 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com>
Date: Tue, 21 Feb 2023 13:33:13 +0100
Subject: [PATCH] style: expired consents are now less visible

---
 src/components/Consents/Consents.tsx         | 3 +++
 src/components/Consents/agGridOverrides.scss | 8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/components/Consents/Consents.tsx b/src/components/Consents/Consents.tsx
index 2bcd0070..6be71da5 100644
--- a/src/components/Consents/Consents.tsx
+++ b/src/components/Consents/Consents.tsx
@@ -299,6 +299,9 @@ const Consents: React.FC = () => {
             rowMultiSelectWithClick={true}
             pagination={false}
             suppressCellFocus={true}
+            rowClassRules={{
+              expired: (params) => params.data.endDate < DateTime.now(),
+            }}
           ></AgGridReact>
           {!isShowingSelection && (
             <TablePagination
diff --git a/src/components/Consents/agGridOverrides.scss b/src/components/Consents/agGridOverrides.scss
index 94e9eae6..b4964697 100644
--- a/src/components/Consents/agGridOverrides.scss
+++ b/src/components/Consents/agGridOverrides.scss
@@ -10,10 +10,14 @@
 .ag-header-cell-text {
   color: $gold;
 }
-.ag-row-odd,
-.ag-row-even {
+.ag-row {
   background: transparent !important;
   transition: all 300ms ease !important;
+  &.expired {
+    * {
+      color: $text-chart;
+    }
+  }
 }
 .ag-cell-focus {
   outline: none !important;
-- 
GitLab