From 30cabf5e90dafb84a8d7c8972f00f8efa601e113 Mon Sep 17 00:00:00 2001
From: Muthukrishnanmatriot
 <76949556+muthukrishnanmatriot@users.noreply.github.com>
Date: Tue, 12 Oct 2021 21:02:35 +0530
Subject: [PATCH] TMSS-960 - Updated the filter for boolean to hold external
 filter value

---
 .../src/routes/Reservation/reservation.list.js      | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js
index 3afdda44df1..f6a519d8fdf 100644
--- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js
+++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js
@@ -138,7 +138,7 @@ export class ReservationList extends Component{
         this.cycleList= [];
         this.selectedRows = [];
         this.totalPage = 0;
-        this.pageUpdated = false;
+        this.pageUpdated = true;
         this.onRowSelection = this.onRowSelection.bind(this);
         this.confirmDeleteReservations = this.confirmDeleteReservations.bind(this);
         this.deleteReservations = this.deleteReservations.bind(this);
@@ -191,10 +191,13 @@ export class ReservationList extends Component{
                 this.setState({fEndTime: '', cycle: ''});
             }
         }
-        let filter = _.find(filters, function(filter){
-            return (filter.id === 'Start Time' && filter.value.length>0) && (filter.id === 'End Time' && filter.value.length>0)
+        let filterStartTime = _.find(filters, function(filter){
+            return (filter.id === 'Start Time' && filter.value.length>0);
+        });
+        let filterEndTime = _.find(filters, function(filter){
+            return (filter.id === 'End Time' && filter.value.length>0)
         });
-        if (!filter) {
+        if (!filterStartTime && !filterEndTime) {
             this.setState({cycle: ''});
         }
     }
@@ -704,7 +707,7 @@ export class ReservationList extends Component{
                                          filter={true}
                                          showClear={true}
                                          showFilterClear={true}
-                                         tooltip="Select Cycle to search appropriate reservation, based on Cycle's Start & Stop time it will find reservation"
+                                         tooltip="Select cycle to view reservations that start and end in the cycle (will not include those are reserved for unknown duration)"
                                     />
                                     <label htmlFor="cycle" >Filter by Cycle</label>
                                 </span>
-- 
GitLab