...
|
...
|
@@ -28,6 +28,7 @@ import { AssetService } from '@core/http/asset.service'; |
28
|
28
|
import { EntityViewService } from '@core/http/entity-view.service';
|
29
|
29
|
import { DialogComponent } from '@shared/components/dialog.component';
|
30
|
30
|
import { Router } from '@angular/router';
|
|
31
|
+import { EdgeService } from "@core/http/edge.service";
|
31
|
32
|
|
32
|
33
|
export interface AssignToCustomerDialogData {
|
33
|
34
|
entityIds: Array<EntityId>;
|
...
|
...
|
@@ -57,6 +58,7 @@ export class AssignToCustomerDialogComponent extends |
57
|
58
|
@Inject(MAT_DIALOG_DATA) public data: AssignToCustomerDialogData,
|
58
|
59
|
private deviceService: DeviceService,
|
59
|
60
|
private assetService: AssetService,
|
|
61
|
+ private edgeService: EdgeService,
|
60
|
62
|
private entityViewService: EntityViewService,
|
61
|
63
|
@SkipSelf() private errorStateMatcher: ErrorStateMatcher,
|
62
|
64
|
public dialogRef: MatDialogRef<AssignToCustomerDialogComponent, boolean>,
|
...
|
...
|
@@ -77,6 +79,10 @@ export class AssignToCustomerDialogComponent extends |
77
|
79
|
this.assignToCustomerTitle = 'asset.assign-asset-to-customer';
|
78
|
80
|
this.assignToCustomerText = 'asset.assign-to-customer-text';
|
79
|
81
|
break;
|
|
82
|
+ case EntityType.EDGE:
|
|
83
|
+ this.assignToCustomerTitle = 'edge.assign-edge-to-customer';
|
|
84
|
+ this.assignToCustomerText = 'edge.assign-to-customer-text';
|
|
85
|
+ break;
|
80
|
86
|
case EntityType.ENTITY_VIEW:
|
81
|
87
|
this.assignToCustomerTitle = 'entity-view.assign-entity-view-to-customer';
|
82
|
88
|
this.assignToCustomerText = 'entity-view.assign-to-customer-text';
|
...
|
...
|
@@ -116,6 +122,8 @@ export class AssignToCustomerDialogComponent extends |
116
|
122
|
return this.deviceService.assignDeviceToCustomer(customerId, entityId);
|
117
|
123
|
case EntityType.ASSET:
|
118
|
124
|
return this.assetService.assignAssetToCustomer(customerId, entityId);
|
|
125
|
+ case EntityType.EDGE:
|
|
126
|
+ return this.edgeService.assignEdgeToCustomer(customerId, entityId);
|
119
|
127
|
case EntityType.ENTITY_VIEW:
|
120
|
128
|
return this.entityViewService.assignEntityViewToCustomer(customerId, entityId);
|
121
|
129
|
}
|
...
|
...
|
|