Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. header = [
  2. { label: 'ORD_NO', column: 'ORD_NO' },
  3. { label: 'FITEM_ID', column: 'FITEM_ID' },
  4. ]
  5.  
  6. ngAfterViewInit(){
  7. this.dailyService.getJobStyle()
  8. .subscribe(JS=>{
  9. this.jobStyle = JS;
  10. this.dataSource = new MatTableDataSource<JobStyle>(this.jobStyle);
  11. this.dataSource.paginator = this.paginator;
  12. this.dataSource.sort = this.sort;
  13. })
  14. }
  15.  
  16. <!-- FILTER COMPONENT -->
  17. <div class="Parent">
  18. <mat-form-field>
  19. <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
  20. </mat-form-field>
  21. </div>
  22. <!-- FILTER COMPONENT -->
  23.  
  24. <!-- <div class="mat-elevation-z8 content-center inner-border"> -->
  25. <table mat-table [dataSource]="dataSource" matSort>
  26.  
  27. <ng-container [matColumnDef]="col.column" *ngFor="let col of header">
  28. <th mat-header-cell *matHeaderCellDef mat-sort-header> {{col.label}} </th>
  29. <td mat-cell *matCellDef="let row"> {{row[col.column]}} </td>
  30. </ng-container>
  31.  
  32. <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
  33. <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
  34. </table>
  35.  
  36. <mat-paginator [pageSizeOptions]="[5, 10, 25, 100]" showFirstLastButtons></mat-paginator>
  37. <!-- </div> -->
  38.  
  39. <mat-dialog-actions>
  40.  
  41. <button class="mat-raised-button" (click)="close()">
  42. Close
  43. </button>
  44.  
  45. <button class="mat-raised-button mat-primary" (click)="save()">
  46. Save
  47. </button>
  48.  
  49. </mat-dialog-actions>
  50.  
  51. /* Structure */
  52. .full-width-table {
  53. width: 100%;
  54. }
  55.  
  56. .mat-form-field {
  57. font-size: 14px;
  58. width: 20%;
  59. padding: 20px;
  60. }
  61.  
  62. .Parent {
  63. display: flex;
  64. }
  65.  
  66. .padding-top {
  67. padding-top: 20px;
  68. }
  69.  
  70. .padding-left {
  71. padding-left: 20px;
  72. }
  73.  
  74. .example-margin {
  75. margin: 10px;
  76. }
  77.  
  78. .margin-left{
  79. margin-left: 20px;
  80. }
  81.  
  82. .content-right {
  83. text-align: right;
  84. }
  85.  
  86. .content-center {
  87. text-align: center;
  88. }
  89.  
  90. .example-container {
  91. height: 400px;
  92. overflow: auto;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement