|
|
|
@ -29,37 +29,33 @@ |
|
|
|
</mat-progress-bar> |
|
|
|
<div mat-dialog-content> |
|
|
|
<fieldset [disabled]="isLoading$ | async"> |
|
|
|
<div fxFlex fxLayout="column"> |
|
|
|
<div fxFlex fxLayout="row" fxLayoutAlign="start center" |
|
|
|
formArrayName="userInputs" |
|
|
|
*ngFor="let userInputControl of userInputsFormArray().controls; let $index = index"> |
|
|
|
<div fxFlex fxLayout="column" |
|
|
|
[ngSwitch]="userInputControl.get('valueType').value"> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.STRING"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label>{{ userInputControl.get('label').value }}</mat-label> |
|
|
|
<input matInput [formControl]="userInputControl.get('value')"> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.NUMERIC"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label>{{ userInputControl.get('label').value }}</mat-label> |
|
|
|
<input required type="number" matInput [formControl]="userInputControl.get('value')"> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.DATE_TIME"> |
|
|
|
<label class="tb-title no-padding tb-required">{{ userInputControl.get('label').value }}</label> |
|
|
|
<tb-datetime fxFlex [formControl]="userInputControl.get('value')" |
|
|
|
dateText="filter.date" |
|
|
|
timeText="filter.time" |
|
|
|
required [showLabel]="false"></tb-datetime> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.BOOLEAN"> |
|
|
|
<mat-checkbox labelPosition="before" fxFlex [formControl]="userInputControl.get('value')"> |
|
|
|
{{ userInputControl.get('label').value }} |
|
|
|
</mat-checkbox> |
|
|
|
</ng-template> |
|
|
|
</div> |
|
|
|
<div formArrayName="userInputs" |
|
|
|
*ngFor="let userInputControl of userInputsFormArray().controls; let $index = index"> |
|
|
|
<div [ngSwitch]="userInputControl.get('valueType').value"> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.STRING"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label>{{ userInputControl.get('label').value }}</mat-label> |
|
|
|
<input matInput [formControl]="userInputControl.get('value')"> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.NUMERIC"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label>{{ userInputControl.get('label').value }}</mat-label> |
|
|
|
<input required type="number" matInput [formControl]="userInputControl.get('value')"> |
|
|
|
</mat-form-field> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.DATE_TIME"> |
|
|
|
<label class="tb-title no-padding tb-required">{{ userInputControl.get('label').value }}</label> |
|
|
|
<tb-datetime [formControl]="userInputControl.get('value')" |
|
|
|
dateText="filter.date" |
|
|
|
timeText="filter.time" |
|
|
|
required [showLabel]="false"></tb-datetime> |
|
|
|
</ng-template> |
|
|
|
<ng-template [ngSwitchCase]="valueTypeEnum.BOOLEAN"> |
|
|
|
<mat-checkbox labelPosition="before" [formControl]="userInputControl.get('value')"> |
|
|
|
{{ userInputControl.get('label').value }} |
|
|
|
</mat-checkbox> |
|
|
|
</ng-template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</fieldset> |
|
|
|
|