SHARE
TWEET

Untitled

a guest Jun 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <mat-card class="fields-list" *ngIf="tableShown">
  2.       <mat-card-content>
  3.         <mat-card-actions align="end">
  4.           <button type="button" class="blabla" (click)="addClicked()">
  5.             Add New Office
  6.           </button>
  7.           <button type="button" class="blabla" (click)="downloadTableData()">
  8.             Download Table Data
  9.           </button>
  10.         </mat-card-actions>
  11.         <mat-form-field class="search">
  12.           <div class="icon-div">
  13.             <span class="fa fa-search icon"></span>
  14.           </div>
  15.           <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Search office">
  16.         </mat-form-field>
  17.  
  18.         <mat-table #table [dataSource]="tableDataSource">
  19.           <ng-container cdkColumnDef="label">
  20.             <mat-header-cell *cdkHeaderCellDef fxFlex="20%">Label</mat-header-cell>
  21.             <mat-cell *cdkCellDef="let officePin" fxFlex="20%">{{officePin.label}}</mat-cell>
  22.           </ng-container>
  23.  
  24.           <ng-container cdkColumnDef="postalAddress">
  25.             <mat-header-cell *cdkHeaderCellDef fxFlex="55%">Postal Address</mat-header-cell>
  26.             <mat-cell *cdkCellDef="let officePin" fxFlex="55%">{{officePin.postalAddress}}</mat-cell>
  27.           </ng-container>
  28.  
  29.           <ng-container cdkColumnDef="city">
  30.             <mat-header-cell *cdkHeaderCellDef fxFlex="55%">City</mat-header-cell>
  31.             <mat-cell *cdkCellDef="let officePin" fxFlex="55%">{{officePin.cityName}}</mat-cell>
  32.           </ng-container>
  33.  
  34.           <ng-container cdkColumnDef="icon-selection">
  35.             <mat-header-cell *cdkHeaderCellDef fxFlex="15%"></mat-header-cell>
  36.             <mat-cell *cdkCellDef="let officePin" fxFlex="15%">
  37.               <mat-icon (click)="deleteGroupOffices(officePin.id)" mat-list-icon matTooltip="Delete" class="icon">
  38.                 delete_forever
  39.               </mat-icon>
  40.               <mat-icon (click)="editField(officePin.id)" mat-list-icon matTooltip="Edit" class="icon">edit</mat-icon>
  41.             </mat-cell>
  42.           </ng-container>
  43.  
  44.           <mat-header-row *cdkHeaderRowDef="displayedColumns"></mat-header-row>
  45.           <mat-row class="custom-table-row" *cdkRowDef="let officePin; columns: displayedColumns;"></mat-row>
  46.  
  47.         </mat-table>
  48.       </mat-card-content>
  49.     </mat-card>
  50.      
  51. getOfficePinsByGroup(id: number): void {
  52.     this.officePinService.getOfficePinByGroup(id).subscribe((data: OfficePin[]) => {
  53.       this.officePinList = data;
  54.       this.tableDataSource.data = this.officePinList;
  55.     });
  56.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top