Showing
16 changed files
with
66 additions
and
49 deletions
@@ -18,7 +18,7 @@ import { Store } from '@ngrx/store'; | @@ -18,7 +18,7 @@ import { Store } from '@ngrx/store'; | ||
18 | import { AppState } from '@core/core.state'; | 18 | import { AppState } from '@core/core.state'; |
19 | import { FormBuilder, FormGroup, ValidatorFn, Validators } from '@angular/forms'; | 19 | import { FormBuilder, FormGroup, ValidatorFn, Validators } from '@angular/forms'; |
20 | import { ContactBased } from '@shared/models/contact-based.model'; | 20 | import { ContactBased } from '@shared/models/contact-based.model'; |
21 | -import { AfterViewInit, Directive } from '@angular/core'; | 21 | +import { AfterViewInit, ChangeDetectorRef, Directive } from '@angular/core'; |
22 | import { POSTAL_CODE_PATTERNS } from '@home/models/contact.models'; | 22 | import { POSTAL_CODE_PATTERNS } from '@home/models/contact.models'; |
23 | import { HasId } from '@shared/models/base-data'; | 23 | import { HasId } from '@shared/models/base-data'; |
24 | import { EntityComponent } from './entity.component'; | 24 | import { EntityComponent } from './entity.component'; |
@@ -30,8 +30,9 @@ export abstract class ContactBasedComponent<T extends ContactBased<HasId>> exten | @@ -30,8 +30,9 @@ export abstract class ContactBasedComponent<T extends ContactBased<HasId>> exten | ||
30 | protected constructor(protected store: Store<AppState>, | 30 | protected constructor(protected store: Store<AppState>, |
31 | protected fb: FormBuilder, | 31 | protected fb: FormBuilder, |
32 | protected entityValue: T, | 32 | protected entityValue: T, |
33 | - protected entitiesTableConfigValue: EntityTableConfig<T>) { | ||
34 | - super(store, fb, entityValue, entitiesTableConfigValue); | 33 | + protected entitiesTableConfigValue: EntityTableConfig<T>, |
34 | + protected cd: ChangeDetectorRef) { | ||
35 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
35 | } | 36 | } |
36 | 37 | ||
37 | buildForm(entity: T): FormGroup { | 38 | buildForm(entity: T): FormGroup { |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | import { BaseData, HasId } from '@shared/models/base-data'; | 17 | import { BaseData, HasId } from '@shared/models/base-data'; |
18 | import { FormBuilder, FormGroup } from '@angular/forms'; | 18 | import { FormBuilder, FormGroup } from '@angular/forms'; |
19 | import { PageComponent } from '@shared/components/page.component'; | 19 | import { PageComponent } from '@shared/components/page.component'; |
20 | -import { Directive, EventEmitter, Input, OnInit, Output } from '@angular/core'; | 20 | +import { ChangeDetectorRef, Directive, EventEmitter, Input, OnInit, Output } from '@angular/core'; |
21 | import { Store } from '@ngrx/store'; | 21 | import { Store } from '@ngrx/store'; |
22 | import { AppState } from '@core/core.state'; | 22 | import { AppState } from '@core/core.state'; |
23 | import { EntityAction } from '@home/models/entity/entity-component.models'; | 23 | import { EntityAction } from '@home/models/entity/entity-component.models'; |
@@ -80,7 +80,8 @@ export abstract class EntityComponent<T extends BaseData<HasId>, | @@ -80,7 +80,8 @@ export abstract class EntityComponent<T extends BaseData<HasId>, | ||
80 | protected constructor(protected store: Store<AppState>, | 80 | protected constructor(protected store: Store<AppState>, |
81 | protected fb: FormBuilder, | 81 | protected fb: FormBuilder, |
82 | protected entityValue: T, | 82 | protected entityValue: T, |
83 | - protected entitiesTableConfigValue: C) { | 83 | + protected entitiesTableConfigValue: C, |
84 | + protected cd: ChangeDetectorRef) { | ||
84 | super(store); | 85 | super(store); |
85 | this.entityForm = this.buildForm(this.entityValue); | 86 | this.entityForm = this.buildForm(this.entityValue); |
86 | } | 87 | } |
@@ -106,6 +107,7 @@ export abstract class EntityComponent<T extends BaseData<HasId>, | @@ -106,6 +107,7 @@ export abstract class EntityComponent<T extends BaseData<HasId>, | ||
106 | } else { | 107 | } else { |
107 | this.entityForm.disable({emitEvent: false}); | 108 | this.entityForm.disable({emitEvent: false}); |
108 | } | 109 | } |
110 | + this.cd.markForCheck(); | ||
109 | } | 111 | } |
110 | } | 112 | } |
111 | 113 |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject, Input, Optional } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject, Input, Optional } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | 20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
@@ -77,8 +77,9 @@ export class DeviceProfileComponent extends EntityComponent<DeviceProfile> { | @@ -77,8 +77,9 @@ export class DeviceProfileComponent extends EntityComponent<DeviceProfile> { | ||
77 | protected translate: TranslateService, | 77 | protected translate: TranslateService, |
78 | @Optional() @Inject('entity') protected entityValue: DeviceProfile, | 78 | @Optional() @Inject('entity') protected entityValue: DeviceProfile, |
79 | @Optional() @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<DeviceProfile>, | 79 | @Optional() @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<DeviceProfile>, |
80 | - protected fb: FormBuilder) { | ||
81 | - super(store, fb, entityValue, entitiesTableConfigValue); | 80 | + protected fb: FormBuilder, |
81 | + protected cd: ChangeDetectorRef) { | ||
82 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
82 | } | 83 | } |
83 | 84 | ||
84 | hideDelete() { | 85 | hideDelete() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject, Input, Optional } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject, Input, Optional } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | 20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
@@ -43,8 +43,9 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> { | @@ -43,8 +43,9 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> { | ||
43 | protected translate: TranslateService, | 43 | protected translate: TranslateService, |
44 | @Optional() @Inject('entity') protected entityValue: TenantProfile, | 44 | @Optional() @Inject('entity') protected entityValue: TenantProfile, |
45 | @Optional() @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<TenantProfile>, | 45 | @Optional() @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<TenantProfile>, |
46 | - protected fb: FormBuilder) { | ||
47 | - super(store, fb, entityValue, entitiesTableConfigValue); | 46 | + protected fb: FormBuilder, |
47 | + protected cd: ChangeDetectorRef) { | ||
48 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
48 | } | 49 | } |
49 | 50 | ||
50 | hideDelete() { | 51 | hideDelete() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject, OnDestroy, OnInit } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core'; |
18 | import { Subject } from 'rxjs'; | 18 | import { Subject } from 'rxjs'; |
19 | import { Store } from '@ngrx/store'; | 19 | import { Store } from '@ngrx/store'; |
20 | import { AppState } from '@core/core.state'; | 20 | import { AppState } from '@core/core.state'; |
@@ -30,7 +30,7 @@ import { | @@ -30,7 +30,7 @@ import { | ||
30 | ResourceTypeTranslationMap | 30 | ResourceTypeTranslationMap |
31 | } from '@shared/models/resource.models'; | 31 | } from '@shared/models/resource.models'; |
32 | import { pairwise, startWith, takeUntil } from 'rxjs/operators'; | 32 | import { pairwise, startWith, takeUntil } from 'rxjs/operators'; |
33 | -import { ActionNotificationShow } from "@core/notification/notification.actions"; | 33 | +import { ActionNotificationShow } from '@core/notification/notification.actions'; |
34 | 34 | ||
35 | @Component({ | 35 | @Component({ |
36 | selector: 'tb-resources-library', | 36 | selector: 'tb-resources-library', |
@@ -48,8 +48,9 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme | @@ -48,8 +48,9 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme | ||
48 | protected translate: TranslateService, | 48 | protected translate: TranslateService, |
49 | @Inject('entity') protected entityValue: Resource, | 49 | @Inject('entity') protected entityValue: Resource, |
50 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<Resource>, | 50 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<Resource>, |
51 | - public fb: FormBuilder) { | ||
52 | - super(store, fb, entityValue, entitiesTableConfigValue); | 51 | + public fb: FormBuilder, |
52 | + protected cd: ChangeDetectorRef) { | ||
53 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
53 | } | 54 | } |
54 | 55 | ||
55 | ngOnInit() { | 56 | ngOnInit() { |
@@ -102,7 +103,7 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme | @@ -102,7 +103,7 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme | ||
102 | if (this.isAdd) { | 103 | if (this.isAdd) { |
103 | form.addControl('data', this.fb.control(null, Validators.required)); | 104 | form.addControl('data', this.fb.control(null, Validators.required)); |
104 | } | 105 | } |
105 | - return form | 106 | + return form; |
106 | } | 107 | } |
107 | 108 | ||
108 | updateForm(entity: Resource) { | 109 | updateForm(entity: Resource) { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '../../components/entity/entity.component'; | 20 | import { EntityComponent } from '../../components/entity/entity.component'; |
@@ -41,8 +41,9 @@ export class AssetComponent extends EntityComponent<AssetInfo> { | @@ -41,8 +41,9 @@ export class AssetComponent extends EntityComponent<AssetInfo> { | ||
41 | protected translate: TranslateService, | 41 | protected translate: TranslateService, |
42 | @Inject('entity') protected entityValue: AssetInfo, | 42 | @Inject('entity') protected entityValue: AssetInfo, |
43 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<AssetInfo>, | 43 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<AssetInfo>, |
44 | - public fb: FormBuilder) { | ||
45 | - super(store, fb, entityValue, entitiesTableConfigValue); | 44 | + public fb: FormBuilder, |
45 | + protected cd: ChangeDetectorRef) { | ||
46 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
46 | } | 47 | } |
47 | 48 | ||
48 | ngOnInit() { | 49 | ngOnInit() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | 20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
@@ -42,8 +42,9 @@ export class CustomerComponent extends ContactBasedComponent<Customer> { | @@ -42,8 +42,9 @@ export class CustomerComponent extends ContactBasedComponent<Customer> { | ||
42 | protected translate: TranslateService, | 42 | protected translate: TranslateService, |
43 | @Inject('entity') protected entityValue: Customer, | 43 | @Inject('entity') protected entityValue: Customer, |
44 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<Customer>, | 44 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<Customer>, |
45 | - protected fb: FormBuilder) { | ||
46 | - super(store, fb, entityValue, entitiesTableConfigValue); | 45 | + protected fb: FormBuilder, |
46 | + protected cd: ChangeDetectorRef) { | ||
47 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | hideDelete() { | 50 | hideDelete() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '../../components/entity/entity.component'; | 20 | import { EntityComponent } from '../../components/entity/entity.component'; |
@@ -49,8 +49,9 @@ export class DashboardFormComponent extends EntityComponent<Dashboard> { | @@ -49,8 +49,9 @@ export class DashboardFormComponent extends EntityComponent<Dashboard> { | ||
49 | private dashboardService: DashboardService, | 49 | private dashboardService: DashboardService, |
50 | @Inject('entity') protected entityValue: Dashboard, | 50 | @Inject('entity') protected entityValue: Dashboard, |
51 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<Dashboard>, | 51 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<Dashboard>, |
52 | - public fb: FormBuilder) { | ||
53 | - super(store, fb, entityValue, entitiesTableConfigValue); | 52 | + public fb: FormBuilder, |
53 | + protected cd: ChangeDetectorRef) { | ||
54 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
54 | } | 55 | } |
55 | 56 | ||
56 | ngOnInit() { | 57 | ngOnInit() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '../../components/entity/entity.component'; | 20 | import { EntityComponent } from '../../components/entity/entity.component'; |
@@ -56,8 +56,9 @@ export class DeviceComponent extends EntityComponent<DeviceInfo> { | @@ -56,8 +56,9 @@ export class DeviceComponent extends EntityComponent<DeviceInfo> { | ||
56 | protected translate: TranslateService, | 56 | protected translate: TranslateService, |
57 | @Inject('entity') protected entityValue: DeviceInfo, | 57 | @Inject('entity') protected entityValue: DeviceInfo, |
58 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<DeviceInfo>, | 58 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<DeviceInfo>, |
59 | - public fb: FormBuilder) { | ||
60 | - super(store, fb, entityValue, entitiesTableConfigValue); | 59 | + public fb: FormBuilder, |
60 | + protected cd: ChangeDetectorRef) { | ||
61 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
61 | } | 62 | } |
62 | 63 | ||
63 | ngOnInit() { | 64 | ngOnInit() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '@home/components/entity/entity.component'; | 20 | import { EntityComponent } from '@home/components/entity/entity.component'; |
@@ -42,8 +42,9 @@ export class EdgeComponent extends EntityComponent<EdgeInfo> { | @@ -42,8 +42,9 @@ export class EdgeComponent extends EntityComponent<EdgeInfo> { | ||
42 | protected translate: TranslateService, | 42 | protected translate: TranslateService, |
43 | @Inject('entity') protected entityValue: EdgeInfo, | 43 | @Inject('entity') protected entityValue: EdgeInfo, |
44 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<EdgeInfo>, | 44 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<EdgeInfo>, |
45 | - public fb: FormBuilder) { | ||
46 | - super(store, fb, entityValue, entitiesTableConfigValue); | 45 | + public fb: FormBuilder, |
46 | + protected cd: ChangeDetectorRef) { | ||
47 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | ngOnInit() { | 50 | ngOnInit() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '../../components/entity/entity.component'; | 20 | import { EntityComponent } from '../../components/entity/entity.component'; |
@@ -53,8 +53,9 @@ export class EntityViewComponent extends EntityComponent<EntityViewInfo> { | @@ -53,8 +53,9 @@ export class EntityViewComponent extends EntityComponent<EntityViewInfo> { | ||
53 | protected translate: TranslateService, | 53 | protected translate: TranslateService, |
54 | @Inject('entity') protected entityValue: EntityViewInfo, | 54 | @Inject('entity') protected entityValue: EntityViewInfo, |
55 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<EntityViewInfo>, | 55 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<EntityViewInfo>, |
56 | - public fb: FormBuilder) { | ||
57 | - super(store, fb, entityValue, entitiesTableConfigValue); | 56 | + public fb: FormBuilder, |
57 | + protected cd: ChangeDetectorRef) { | ||
58 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
58 | } | 59 | } |
59 | 60 | ||
60 | ngOnInit() { | 61 | ngOnInit() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject, OnDestroy, OnInit } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core'; |
18 | import { combineLatest, Subject } from 'rxjs'; | 18 | import { combineLatest, Subject } from 'rxjs'; |
19 | import { Store } from '@ngrx/store'; | 19 | import { Store } from '@ngrx/store'; |
20 | import { AppState } from '@core/core.state'; | 20 | import { AppState } from '@core/core.state'; |
@@ -50,8 +50,9 @@ export class OtaUpdateComponent extends EntityComponent<OtaPackage> implements O | @@ -50,8 +50,9 @@ export class OtaUpdateComponent extends EntityComponent<OtaPackage> implements O | ||
50 | protected translate: TranslateService, | 50 | protected translate: TranslateService, |
51 | @Inject('entity') protected entityValue: OtaPackage, | 51 | @Inject('entity') protected entityValue: OtaPackage, |
52 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<OtaPackage>, | 52 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<OtaPackage>, |
53 | - public fb: FormBuilder) { | ||
54 | - super(store, fb, entityValue, entitiesTableConfigValue); | 53 | + public fb: FormBuilder, |
54 | + protected cd: ChangeDetectorRef) { | ||
55 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
55 | } | 56 | } |
56 | 57 | ||
57 | ngOnInit() { | 58 | ngOnInit() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '../../components/entity/entity.component'; | 20 | import { EntityComponent } from '../../components/entity/entity.component'; |
@@ -37,8 +37,9 @@ export class RuleChainComponent extends EntityComponent<RuleChain> { | @@ -37,8 +37,9 @@ export class RuleChainComponent extends EntityComponent<RuleChain> { | ||
37 | protected translate: TranslateService, | 37 | protected translate: TranslateService, |
38 | @Inject('entity') protected entityValue: RuleChain, | 38 | @Inject('entity') protected entityValue: RuleChain, |
39 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<RuleChain>, | 39 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<RuleChain>, |
40 | - public fb: FormBuilder) { | ||
41 | - super(store, fb, entityValue, entitiesTableConfigValue); | 40 | + public fb: FormBuilder, |
41 | + protected cd: ChangeDetectorRef) { | ||
42 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
42 | } | 43 | } |
43 | 44 | ||
44 | ngOnInit() { | 45 | ngOnInit() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | 20 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
@@ -36,8 +36,9 @@ export class TenantComponent extends ContactBasedComponent<TenantInfo> { | @@ -36,8 +36,9 @@ export class TenantComponent extends ContactBasedComponent<TenantInfo> { | ||
36 | protected translate: TranslateService, | 36 | protected translate: TranslateService, |
37 | @Inject('entity') protected entityValue: TenantInfo, | 37 | @Inject('entity') protected entityValue: TenantInfo, |
38 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<TenantInfo>, | 38 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<TenantInfo>, |
39 | - protected fb: FormBuilder) { | ||
40 | - super(store, fb, entityValue, entitiesTableConfigValue); | 39 | + protected fb: FormBuilder, |
40 | + protected cd: ChangeDetectorRef) { | ||
41 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
41 | } | 42 | } |
42 | 43 | ||
43 | hideDelete() { | 44 | hideDelete() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject, Optional } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject, Optional } from '@angular/core'; |
18 | import { select, Store } from '@ngrx/store'; | 18 | import { select, Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '../../components/entity/entity.component'; | 20 | import { EntityComponent } from '../../components/entity/entity.component'; |
@@ -43,8 +43,9 @@ export class UserComponent extends EntityComponent<User> { | @@ -43,8 +43,9 @@ export class UserComponent extends EntityComponent<User> { | ||
43 | constructor(protected store: Store<AppState>, | 43 | constructor(protected store: Store<AppState>, |
44 | @Optional() @Inject('entity') protected entityValue: User, | 44 | @Optional() @Inject('entity') protected entityValue: User, |
45 | @Optional() @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<User>, | 45 | @Optional() @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<User>, |
46 | - public fb: FormBuilder) { | ||
47 | - super(store, fb, entityValue, entitiesTableConfigValue); | 46 | + public fb: FormBuilder, |
47 | + protected cd: ChangeDetectorRef) { | ||
48 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
48 | } | 49 | } |
49 | 50 | ||
50 | hideDelete() { | 51 | hideDelete() { |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Component, Inject } from '@angular/core'; | 17 | +import { ChangeDetectorRef, Component, Inject } from '@angular/core'; |
18 | import { Store } from '@ngrx/store'; | 18 | import { Store } from '@ngrx/store'; |
19 | import { AppState } from '@core/core.state'; | 19 | import { AppState } from '@core/core.state'; |
20 | import { EntityComponent } from '../../components/entity/entity.component'; | 20 | import { EntityComponent } from '../../components/entity/entity.component'; |
@@ -32,8 +32,9 @@ export class WidgetsBundleComponent extends EntityComponent<WidgetsBundle> { | @@ -32,8 +32,9 @@ export class WidgetsBundleComponent extends EntityComponent<WidgetsBundle> { | ||
32 | constructor(protected store: Store<AppState>, | 32 | constructor(protected store: Store<AppState>, |
33 | @Inject('entity') protected entityValue: WidgetsBundle, | 33 | @Inject('entity') protected entityValue: WidgetsBundle, |
34 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<WidgetsBundle>, | 34 | @Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<WidgetsBundle>, |
35 | - public fb: FormBuilder) { | ||
36 | - super(store, fb, entityValue, entitiesTableConfigValue); | 35 | + public fb: FormBuilder, |
36 | + protected cd: ChangeDetectorRef) { | ||
37 | + super(store, fb, entityValue, entitiesTableConfigValue, cd); | ||
37 | } | 38 | } |
38 | 39 | ||
39 | hideDelete() { | 40 | hideDelete() { |