only show remove filter if there is a filter
authorJane Sandberg <sandbej@linnbenton.edu>
Tue, 26 Mar 2019 22:50:15 +0000 (15:50 -0700)
committerJane Sandberg <sandbej@linnbenton.edu>
Tue, 26 Mar 2019 22:50:15 +0000 (15:50 -0700)
Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html

index 128fb5b..a8df5aa 100644 (file)
@@ -38,7 +38,7 @@
                 </div>
                 <input type="text" id="patron-barcode-value" class="form-control" i18n-placeholder placeholder="Patron barcode" [(ngModel)]="patronBarcode" (change)="filterByCurrentPatronBarcode()">
                 <div class="input-group-button">
-                  <button class="btn btn-warning" (click)="removeFilters()" i18n><span class="material-icons">delete</span> Remove filter</button>
+                  <button *ngIf="patronBarcode" class="btn btn-warning" (click)="removeFilters()" i18n><span class="material-icons">delete</span> Remove filter</button>
                 </div>
               </div>
             </div>
@@ -56,7 +56,7 @@
                 </div>
                 <input type="text" id="resource-barcode-value" class="form-control" i18n-placeholder placeholder="Resource barcode" [(ngModel)]="resourceBarcode" (change)="filterByCurrentResourceBarcode()">
                 <div class="input-group-button">
-                  <button class="btn btn-warning" (click)="removeFilters()" i18n><span class="material-icons">delete</span> Remove filter</button>
+                  <button *ngIf="resourceBarcode" class="btn btn-warning" (click)="removeFilters()" i18n><span class="material-icons">delete</span> Remove filter</button>
                 </div>
               </div>
             </div>