Advertisement
coffeecode12

rekomen by atribbutes

Feb 17th, 2022
918
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.18 KB | None | 0 0
  1. <vex-page-layout-content>
  2.     <div class="card overflow-auto" fxFlex="100">
  3.         <form [formGroup]="rekapByAttrForm" class="normal-form" (ngSubmit)="onSubmit()">
  4.         <mat-dialog-content class="px-6 py-4" fxLayout="column">
  5.             <div fxLayout="column">
  6.                 <mat-radio-group appearance="outline" class="sm:px-0 md:px-2 lg:px-2 sm:px-2">
  7.                <mat-label>Rekap Attribute</mat-label>
  8.                 <mat-form-field appearance="outline"  class="ml-4 mr-2">
  9.                     <mat-label>Rekap Attribute By</mat-label>
  10.                     <mat-select (valueChange)="onChangeUser($event)" formControlName="name">
  11.                         <mat-option *ngFor="let attribute of listRekapAttribute" [value]="attribute.id">{{attribute.namaAttribute}}</mat-option>
  12.                     </mat-select>
  13.                     <mat-error *ngIf="rekapByAttrForm.controls.name.hasError('required')">Wajib Pilih Atrribute</mat-error>
  14.                 </mat-form-field>
  15.             </mat-radio-group>
  16.                 <mat-radio-group appearance="outline" class="sm:px-0 md:px-2 lg:px-2 xl:px-2">
  17.                     <!-- <mat-radio-button value="1">Bulk Value</mat-radio-button> -->
  18.                     <mat-label>Value</mat-label>
  19.                     <mat-form-field appearance="outline" class="ml-5">
  20.                         <mat-label>Value</mat-label>
  21.                         <mat-select formControlName="presentase">
  22.                             <mat-option *ngFor="let presentase of listPresentase" [value]="presentase">{{presentase}}</mat-option>
  23.                         </mat-select>
  24.                         <mat-error *ngIf="rekapByAttrForm.controls.presentase.hasError('required')">Wajib Pilih Presentease</mat-error>
  25.                     </mat-form-field>
  26.                 </mat-radio-group>
  27.  
  28.                 <!-- <mat-radio-group appearance="outline" class="sm:px-0 md:px-2 lg:px-2 xl:px-2">
  29.                    <mat-label>Balance Type</mat-label>
  30.                    <mat-form-field appearance="outline" class="ml-4 mr-2">
  31.                        <mat-label>Balance Type</mat-label>
  32.                        <mat-select (valueChange)="onChanges($event)" formControlName="balance">
  33.                            <mat-option *ngFor="let balance of items" [value]="balance.name" >{{balance.name}}</mat-option>                  
  34.                        </mat-select>
  35.                        <mat-error *ngIf="rekapByAttrForm.controls.balance.hasError('required')">Wajib Pilih Balance</mat-error>
  36.                    </mat-form-field>
  37.                </mat-radio-group> -->
  38.  
  39.             </div>
  40.  
  41.             <div  fxLayout="row" fxLayoutAlign="end center" fxLayoutGap="16px">
  42.                 <button color="primary" mat-button type="button">CANCEL</button>
  43.                 <button color="primary" mat-raised-button type="button" (click)="getAttributeTable()" [disabled]="rekapByAttrForm.invalid">APPLY</button>
  44.             </div>
  45.  
  46.         </mat-dialog-content>
  47.                 <!-- <div class="mt-6 card overflow-auto" *ngIf="!loadTable">
  48.                    <p-table
  49.                    styleClass="p-datatable-md md-theme"
  50.                    [columns]="columns"
  51.                    [lazy]="true"
  52.                    responsiveLayout="scroll"
  53.                    currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries">
  54.                    <ng-template pTemplate="header" let-columns >
  55.                        <tr>
  56.                            <th *ngFor="let col of columns">
  57.                                <span style="white-space: nowrap;">{{ col.name }}</span>
  58.                            </th>
  59.                        </tr>
  60.                    </ng-template>
  61.                </p-table>
  62.  
  63.               </div> -->
  64.          <div class="card overflow-auto">
  65.             <p-table
  66.            [value]="rows"
  67.            dataKey="id"
  68.            #dt
  69.            styleClass="p-datatable-md md-theme"
  70.            [columns]="columns"
  71.            [lazy]="true"
  72.            (onLazyLoad)="updatePage($event)"
  73.            [loading]="isLoading"
  74.            responsiveLayout="scroll"
  75.            [paginator]="true"
  76.            [rows]="pageSize"
  77.            [showCurrentPageReport]="true"
  78.            [totalRecords]="recordsTotal"
  79.            [(first)]="paramRequest.start"
  80.            currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries"
  81.            [rowsPerPageOptions]="[10,25,50]">
  82.             <ng-template pTemplate="header" let-columns>
  83.                 <tr>
  84.                     <th [pSortableColumn]="col.field" *ngFor="let col of columns">
  85.                         <span style="white-space: nowrap;">{{ col.name }} <span><p-sortIcon [field]="col.field"></p-sortIcon></span></span>
  86.                     </th>
  87.                 </tr>
  88.             </ng-template>
  89.             <ng-template pTemplate="body" let-data let-rowData>
  90.                 <tr>
  91.                     <td *ngFor="let col of columns">
  92.                         <span>{{rowData[col.field]}}</span>
  93.                     </td>
  94.                 </tr>
  95.             </ng-template>
  96.            </p-table>
  97.  
  98.  
  99.          </div>    
  100.       </form>
  101.     </div>
  102. </vex-page-layout-content>
  103.  
  104.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement