|
|
|
@ -53,7 +53,8 @@ import { Authority } from '@shared/models/authority.enum'; |
|
|
|
import { ChangeDetectorRef, Injector, StaticProvider, ViewContainerRef } from '@angular/core'; |
|
|
|
import { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; |
|
|
|
import { |
|
|
|
ALARM_ASSIGNEE_PANEL_DATA, AlarmAssigneePanelComponent, |
|
|
|
ALARM_ASSIGNEE_PANEL_DATA, |
|
|
|
AlarmAssigneePanelComponent, |
|
|
|
AlarmAssigneePanelData |
|
|
|
} from '@home/components/alarm/alarm-assignee-panel.component'; |
|
|
|
import { ComponentPortal } from '@angular/cdk/portal'; |
|
|
|
@ -282,8 +283,13 @@ export class AlarmTableConfig extends EntityTableConfig<AlarmInfo, TimePageLink> |
|
|
|
} |
|
|
|
]; |
|
|
|
const injector = Injector.create({parent: this.viewContainerRef.injector, providers}); |
|
|
|
overlayRef.attach(new ComponentPortal(AlarmAssigneePanelComponent, |
|
|
|
this.viewContainerRef, injector)).onDestroy(() => this.updateData()); |
|
|
|
const componentRef = overlayRef.attach(new ComponentPortal(AlarmAssigneePanelComponent, |
|
|
|
this.viewContainerRef, injector)); |
|
|
|
componentRef.onDestroy(() => { |
|
|
|
if (componentRef.instance.reassigned) { |
|
|
|
this.updateData() |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|