Browse Source

cambios de resonsive en analisis 2

JeanBenitez 1 năm trước cách đây
mục cha
commit
28b80af25f

+ 8 - 2
sistema-mantenimiento-front/src/app/components/failure-analysis/statistical-analysis/statistical-analysis.component.html

@@ -86,11 +86,17 @@
                             </table>
                         </div>
 
-                        <app-search-card 
+                        <!-- <app-search-card 
                             [dataSource]="dataSource"
                             [disabled]="isLoading"
                             (dataValue)="dataSource = $event"
-                        />
+                        /> -->
+
+                        <mat-form-field class="w-100">
+                            <mat-label>Buscador</mat-label>
+                            <input matInput (keyup)="applyFilter($event)" placeholder="Ingrese la palabra a buscar">
+                            <mat-icon matSuffix>search</mat-icon>
+                        </mat-form-field>
                     </div>
                     <app-loading-card 
                         [isLoading]="isLoadingEquipment" 

+ 5 - 0
sistema-mantenimiento-front/src/app/components/failure-analysis/statistical-analysis/statistical-analysis.component.ts

@@ -454,4 +454,9 @@ export class StatisticalAnalysisComponent implements OnInit {
     }
     return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row ${row.CODIGO_EQUIPAMIENTO}`;
   }
+
+  applyFilter(event: Event) {
+    const filterValue = (event.target as HTMLInputElement).value;
+    this.dataSource.filter = filterValue.trim().toLowerCase();
+  }
 }