|
|
|
@ -15,50 +15,52 @@ |
|
|
|
limitations under the License. |
|
|
|
|
|
|
|
--> |
|
|
|
<form fxLayout="column" class="mat-content mat-padding" [formGroup]="eventFilterFormGroup" (ngSubmit)="update()"> |
|
|
|
<ng-container *ngFor="let column of showColumns"> |
|
|
|
<ng-container [ngSwitch]="column.key"> |
|
|
|
<ng-template [ngSwitchCase]="isSelector(column.key)"> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<mat-select [formControlName]="column.key"> |
|
|
|
<mat-option [value]="">{{ 'event.all-events' | translate}}</mat-option> |
|
|
|
<mat-option *ngFor="let value of selectorValues(column.key)" [value]="value"> |
|
|
|
{{ value }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="isNumberFields(column.key)"> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<input matInput type="number" min="0" [name]="column.key" [formControlName]="column.key"> |
|
|
|
<mat-error *ngIf="eventFilterFormGroup.get(column.key).hasError('min')"> |
|
|
|
{{ 'event.min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="'isError'"> |
|
|
|
<tb-checkbox formControlName="isError" [falseValue]="''" |
|
|
|
(ngModelChange)="changeIsError($event)"> |
|
|
|
{{ 'event.has-error' | translate }} |
|
|
|
</tb-checkbox> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="'errorStr'"> |
|
|
|
<mat-form-field fxHide [fxShow]="showErrorMsgFields()"> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<input matInput type="text" name="errorSearchText" formControlName="errorStr"> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-container *ngSwitchDefault> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<input matInput type="text" [name]="column.key" [formControlName]="column.key"> |
|
|
|
</mat-form-field> |
|
|
|
<form fxLayout="column" class="tb-filter" [formGroup]="eventFilterFormGroup" (ngSubmit)="update()"> |
|
|
|
<div fxLayout="column" class="tb-filter-container mat-padding"> |
|
|
|
<ng-container *ngFor="let column of showColumns"> |
|
|
|
<ng-container [ngSwitch]="column.key"> |
|
|
|
<ng-template [ngSwitchCase]="isSelector(column.key)"> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<mat-select [formControlName]="column.key"> |
|
|
|
<mat-option [value]="">{{ 'event.all-events' | translate}}</mat-option> |
|
|
|
<mat-option *ngFor="let value of selectorValues(column.key)" [value]="value"> |
|
|
|
{{ value }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="isNumberFields(column.key)"> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<input matInput type="number" min="0" [name]="column.key" [formControlName]="column.key"> |
|
|
|
<mat-error *ngIf="eventFilterFormGroup.get(column.key).hasError('min')"> |
|
|
|
{{ 'event.min-value' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="'isError'"> |
|
|
|
<tb-checkbox formControlName="isError" [falseValue]="''" |
|
|
|
(ngModelChange)="changeIsError($event)"> |
|
|
|
{{ 'event.has-error' | translate }} |
|
|
|
</tb-checkbox> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="'errorStr'"> |
|
|
|
<mat-form-field fxHide [fxShow]="showErrorMsgFields()"> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<input matInput type="text" name="errorSearchText" formControlName="errorStr"> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-container *ngSwitchDefault> |
|
|
|
<mat-form-field> |
|
|
|
<mat-label>{{ column.title | translate}}</mat-label> |
|
|
|
<input matInput type="text" [name]="column.key" [formControlName]="column.key"> |
|
|
|
</mat-form-field> |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
<div fxLayout="row" class="tb-panel-actions" fxLayoutAlign="end center"> |
|
|
|
</div> |
|
|
|
<div fxLayout="row" class="tb-panel-actions mat-padding" fxLayoutAlign="end center"> |
|
|
|
<button type="button" |
|
|
|
mat-button |
|
|
|
(click)="cancel()"> |
|
|
|
|