UI: Change position is gateway and style is gatway in device component
This commit is contained in:
parent
bdb3c687a0
commit
4ae36d0908
@ -65,20 +65,20 @@
|
|||||||
formControlName="deviceProfileId"
|
formControlName="deviceProfileId"
|
||||||
(deviceProfileChanged)="deviceProfileChanged($event)">
|
(deviceProfileChanged)="deviceProfileChanged($event)">
|
||||||
</tb-device-profile-autocomplete>
|
</tb-device-profile-autocomplete>
|
||||||
<tb-entity-autocomplete
|
|
||||||
formControlName="customerId"
|
|
||||||
labelText="device.wizard.customer-to-assign-device"
|
|
||||||
[entityType]="entityType.CUSTOMER">
|
|
||||||
</tb-entity-autocomplete>
|
|
||||||
<div class="toggle-group">
|
<div class="toggle-group">
|
||||||
<mat-slide-toggle formControlName="gateway" style="min-width: 165px">
|
<mat-slide-toggle formControlName="gateway" style="min-width: 165px">
|
||||||
{{ 'device.is-gateway' | translate }}
|
{{ 'device.is-gateway' | translate }}
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<mat-slide-toggle *ngIf="deviceWizardFormGroup.get('gateway').value"
|
<mat-slide-toggle *ngIf="deviceWizardFormGroup.get('gateway').value"
|
||||||
formControlName="overwriteActivityTime">
|
formControlName="overwriteActivityTime">
|
||||||
{{ 'device.overwrite-activity-time' | translate }}
|
{{ 'device.overwrite-activity-time' | translate }}
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
|
<tb-entity-autocomplete
|
||||||
|
formControlName="customerId"
|
||||||
|
labelText="device.wizard.customer-to-assign-device"
|
||||||
|
[entityType]="entityType.CUSTOMER">
|
||||||
|
</tb-entity-autocomplete>
|
||||||
<mat-form-field class="mat-block" subscriptSizing="dynamic">
|
<mat-form-field class="mat-block" subscriptSizing="dynamic">
|
||||||
<mat-label translate>device.description</mat-label>
|
<mat-label translate>device.description</mat-label>
|
||||||
<textarea matInput formControlName="description" rows="1"></textarea>
|
<textarea matInput formControlName="description" rows="1"></textarea>
|
||||||
|
|||||||
@ -155,7 +155,7 @@ export class DeviceWizardDialogComponent extends DialogComponent<DeviceWizardDia
|
|||||||
if (this.addDeviceWizardStepper.steps.last.completed || this.addDeviceWizardStepper.selectedIndex > 0) {
|
if (this.addDeviceWizardStepper.steps.last.completed || this.addDeviceWizardStepper.selectedIndex > 0) {
|
||||||
return this.deviceService.saveDeviceWithCredentials(deepTrim(device), deepTrim(this.credentialsFormGroup.value.credential)).pipe(
|
return this.deviceService.saveDeviceWithCredentials(deepTrim(device), deepTrim(this.credentialsFormGroup.value.credential)).pipe(
|
||||||
catchError((e: HttpErrorResponse) => {
|
catchError((e: HttpErrorResponse) => {
|
||||||
if (e.error.message.include('Device credentials')) {
|
if (e.error.message.includes('Device credentials')) {
|
||||||
this.addDeviceWizardStepper.selectedIndex = 1;
|
this.addDeviceWizardStepper.selectedIndex = 1;
|
||||||
} else {
|
} else {
|
||||||
this.addDeviceWizardStepper.selectedIndex = 0;
|
this.addDeviceWizardStepper.selectedIndex = 0;
|
||||||
|
|||||||
@ -133,14 +133,14 @@
|
|||||||
required>
|
required>
|
||||||
</tb-device-data>
|
</tb-device-data>
|
||||||
<div formGroupName="additionalInfo" fxLayout="column">
|
<div formGroupName="additionalInfo" fxLayout="column">
|
||||||
<div fxLayout="row" fxLayout.xs="column" style="padding-bottom: 16px;">
|
<div class="toggle-group">
|
||||||
<mat-checkbox fxFlex.gt-sm="30" fxFlex formControlName="gateway">
|
<mat-slide-toggle formControlName="gateway" style="min-width: 165px">
|
||||||
{{ 'device.is-gateway' | translate }}
|
{{ 'device.is-gateway' | translate }}
|
||||||
</mat-checkbox>
|
</mat-slide-toggle>
|
||||||
<mat-checkbox fxFlex *ngIf="entityForm.get('additionalInfo.gateway').value"
|
<mat-slide-toggle *ngIf="entityForm.get('additionalInfo.gateway').value"
|
||||||
formControlName="overwriteActivityTime">
|
formControlName="overwriteActivityTime">
|
||||||
{{ 'device.overwrite-activity-time' | translate }}
|
{{ 'device.overwrite-activity-time' | translate }}
|
||||||
</mat-checkbox>
|
</mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
<mat-form-field class="mat-block">
|
<mat-form-field class="mat-block">
|
||||||
<mat-label translate>device.description</mat-label>
|
<mat-label translate>device.description</mat-label>
|
||||||
|
|||||||
@ -14,5 +14,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
:host {
|
:host {
|
||||||
|
.toggle-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 16px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user