new changes
This commit is contained in:
@@ -4,45 +4,37 @@
|
||||
<div class="variableCal">
|
||||
<form [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
<div formArrayName="rows">
|
||||
<div *ngFor="let row of rows.controls; let rowIndex = index" [formGroupName]="rowIndex">
|
||||
<div *ngFor="let row of rows.controls; let rowIndex = index" [formGroupName]="rowIndex" class="row-section">
|
||||
<div formArrayName="columns" class="add-col-section">
|
||||
<div class="row d-flex" *ngFor="let column of getColumns(row).controls; let colIndex = index" [formGroupName]="colIndex">
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<select formControlName="type" class="form-control" >
|
||||
<option value="" selected disabled>--Select--</option>
|
||||
<option value="text">Text</option>
|
||||
<option value="variable">Variable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" *ngIf="isText(row, colIndex)">
|
||||
<div class="form-group" >
|
||||
<input type="text" formControlName="textValue" placeholder="Enter text" class="form-control" (change)="onParamChange($event)" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" *ngIf="isVariable(row, colIndex)">
|
||||
<div class="form-group" >
|
||||
<input formControlName="variableValue" class="form-control" placeholder="Enter variable" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="" *ngFor="let column of getColumns(row).controls; let colIndex = index" [formGroupName]="colIndex" class="column-section">
|
||||
<div class="form-group">
|
||||
<select formControlName="type" class="form-control">
|
||||
<option value="" selected disabled>--Select--</option>
|
||||
<option value="text">Text</option>
|
||||
<option value="variable">Variable</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="isText(row, colIndex)">
|
||||
<input type="text" formControlName="textValue" placeholder="Enter text" class="form-control"
|
||||
(change)="onParamChange($event, rowIndex, colIndex)"> <span> {{inputValue}} </span>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="isVariable(row, colIndex)">
|
||||
<input formControlName="variableValue" class="form-control" placeholder="Enter variable">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button to add a new column in the same row -->
|
||||
<button type="button" class="mb-4" (click)="addColumn(rowIndex)">Add Column</button>
|
||||
|
||||
<button type="button" class="add-column-btn btn btn-success mt-0 " (click)="addColumn(rowIndex)">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button to add a new row -->
|
||||
<button type="button" (click)="addRow()">Add Row</button>
|
||||
<button type="button" class="add-row-btn btn btn-secondary mr-2 mt-0" (click)="addRow()">Add</button>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
<button type="submit" class="submit-btn btn btn-success mt-0">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user