Use of text area input in client datatable

This commit is contained in:
Jose Alberto Hernandez
2022-11-23 13:42:45 -06:00
parent d12217a356
commit 373eb0a712
3 changed files with 8 additions and 1 deletions
@@ -19,6 +19,9 @@
<input matInput *ngIf="isString(datatableInput.columnDisplayType)" <input matInput *ngIf="isString(datatableInput.columnDisplayType)"
formControlName="{{datatableInput.controlName}}"> formControlName="{{datatableInput.controlName}}">
<textarea matInput *ngIf="isText(datatableInput.columnDisplayType)"
formControlName="{{datatableInput.controlName}}"></textarea>
<span *ngIf="isDate(datatableInput.columnDisplayType)" (click)="datePicker.open()"> <span *ngIf="isDate(datatableInput.columnDisplayType)" (click)="datePicker.open()">
<input matInput [matDatepicker]="datePicker" formControlName="{{datatableInput.controlName}}" class="date-picker"> <input matInput [matDatepicker]="datePicker" formControlName="{{datatableInput.controlName}}" class="date-picker">
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle> <mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
@@ -67,6 +67,10 @@ export class ClientDatatableStepComponent implements OnInit {
return this.isColumnType(columnType, 'STRING'); return this.isColumnType(columnType, 'STRING');
} }
isText(columnType: string) {
return this.isColumnType(columnType, 'TEXT');
}
isColumnType(columnType: string, expectedType: string) { isColumnType(columnType: string, expectedType: string) {
return (columnType === expectedType); return (columnType === expectedType);
} }
@@ -30,7 +30,7 @@ export class ConfirmationDialogComponent implements OnInit {
this.color = 'primary'; this.color = 'primary';
break; break;
case 'Mild': case 'Mild':
this.color = 'accent'; this.color = 'primary';
break; break;
case 'Strong': case 'Strong':
this.color = 'warn'; this.color = 'warn';