Commit 1219a1cd authored by Diogo Santos's avatar Diogo Santos
Browse files

ValueFrom and valueTo showing for INTEGER, SMALLINT and LONGINT characteristic...

ValueFrom and valueTo showing for INTEGER, SMALLINT and LONGINT characteristic values in Edit Service Characteristic Screen
parent 7cb9bcb1
Loading
Loading
Loading
Loading
Loading
+31 −4
Changes for src/app/p_services/admin/catalogManagement/edit-service-specs/edit-service-spec-characteristics/edit-service-spec-characteristics.component.html: 31 added lines, 4 removed lines.
Original line number Original line Diff line number Diff line
@@ -131,6 +131,20 @@
                                </div>
                                </div>
                            </div>
                            </div>


                            <ng-container *ngIf="editFormCharacteristic.controls.valueType.value === 'INTEGER'  ||
                                                 editFormCharacteristic.controls.valueType.value === 'SMALLINT' ||
                                                 editFormCharacteristic.controls.valueType.value === 'LONGINT'">
                                <mat-form-field class="col-lg-2 mt-2">
                                    <mat-label>Value From</mat-label>
                                    <input matInput formControlName="valueFrom">
                                </mat-form-field>

                                <mat-form-field class="col-lg-2 mt-2">
                                    <mat-label>Value To</mat-label>
                                    <input matInput formControlName="valueTo">
                                </mat-form-field>
                            </ng-container>
                    
                            <mat-form-field class="col-lg-2 mt-2">
                            <mat-form-field class="col-lg-2 mt-2">
                                <mat-label>Unit Of Measure</mat-label>
                                <mat-label>Unit Of Measure</mat-label>
                                <input matInput formControlName="unitOfMeasure">
                                <input matInput formControlName="unitOfMeasure">
@@ -159,7 +173,6 @@
                                    </div>
                                    </div>
                                </div>
                                </div>
                            </div>
                            </div>

                        </ng-template>
                        </ng-template>
                    
                    
                        <ng-template #blockExpanded>
                        <ng-template #blockExpanded>
@@ -172,19 +185,33 @@
                                </mat-form-field>
                                </mat-form-field>
                            </div>
                            </div>


                            <mat-form-field class="col-lg-2 mt-2 order-3 order-md-2">
                            <ng-container *ngIf="editFormCharacteristic.controls.valueType.value === 'INTEGER'  ||
                                                 editFormCharacteristic.controls.valueType.value === 'SMALLINT' ||
                                                 editFormCharacteristic.controls.valueType.value === 'LONGINT'">
                                <mat-form-field class="col-lg-2 mt-2 order-2 order-md-3">
                                    <mat-label>Value From</mat-label>
                                    <input matInput formControlName="valueFrom">
                                </mat-form-field>

                                <mat-form-field class="col-lg-2 mt-2 order-2 order-md-3">
                                    <mat-label>Value To</mat-label>
                                    <input matInput formControlName="valueTo">
                                </mat-form-field>
                            </ng-container>

                            <mat-form-field class="col-lg-2 mt-2 order-4 order-md-2">
                                <mat-label>Unit Of Measure</mat-label>
                                <mat-label>Unit Of Measure</mat-label>
                                <input matInput formControlName="unitOfMeasure">
                                <input matInput formControlName="unitOfMeasure">
                            </mat-form-field>
                            </mat-form-field>
                    
                    
                            <div class="col-lg-2 text-center mt-2 order-4">
                            <div class="col-lg-2 text-center mt-2 order-5">
                                <mat-checkbox color="primary" formControlName="isDefault" (change)="isDefaultCheckboxChanged(i, $event)">Is
                                <mat-checkbox color="primary" formControlName="isDefault" (change)="isDefaultCheckboxChanged(i, $event)">Is
                                    Default
                                    Default
                                </mat-checkbox>
                                </mat-checkbox>
                            </div>
                            </div>




                            <div class="col-lg-2  order-5">
                            <div class="col-lg-2  order-6">
                                <div class="row">
                                <div class="row">
                                    <div class="col-6">
                                    <div class="col-6">
                                        <div class="text-left text-lg-center mt-1">
                                        <div class="text-left text-lg-center mt-1">
+1 −1
Changes for src/app/p_services/admin/catalogManagement/edit-service-specs/edit-service-spec-characteristics/edit-service-spec-characteristics.component.ts: 1 added line, 1 removed line.
Original line number Original line Diff line number Diff line
@@ -193,7 +193,7 @@ export class EditServiceSpecCharacteristicsComponent implements OnInit {
    
    
    if (this.newSpec) {
    if (this.newSpec) {
      const specChar = this.editFormCharacteristic.getRawValue();
      const specChar = this.editFormCharacteristic.getRawValue();
      // rangeInterval defaults to closed for INTEGER characteristics in order to be validated by the API. 
      // rangeInterval should not be null for integer characteristics in order to be validated by the API.
      // Without this code rangeInterval would be null and therefore no validation would be done.
      // Without this code rangeInterval would be null and therefore no validation would be done.
      specChar.serviceSpecCharacteristicValue.forEach(value => {
      specChar.serviceSpecCharacteristicValue.forEach(value => {
        if (value.valueFrom != null || value.valueTo != null) {
        if (value.valueFrom != null || value.valueTo != null) {