|
@@ -9,28 +9,28 @@ import { DetailsService } from 'src/services/details/details.service';
|
|
export class DetailsPanelComponent {
|
|
export class DetailsPanelComponent {
|
|
public constructor(private details: DetailsService) {}
|
|
public constructor(private details: DetailsService) {}
|
|
@ViewChild('backdrop') backdrop: any;
|
|
@ViewChild('backdrop') backdrop: any;
|
|
- @ViewChild('offcanvas') offcanvas: any;
|
|
|
|
|
|
+ @ViewChild('detailsPanel') offcanvas: any;
|
|
|
|
|
|
- public offcanvasComponent: any;
|
|
|
|
|
|
+ public detailsPanelComponent: any;
|
|
public inputData: any;
|
|
public inputData: any;
|
|
|
|
|
|
ngOnInit() {
|
|
ngOnInit() {
|
|
- this.details.offcanvas$.subscribe((data) => {
|
|
|
|
|
|
+ this.details.detailsPanel$.subscribe((data) => {
|
|
// console.log('offcanvasComponent', data);
|
|
// console.log('offcanvasComponent', data);
|
|
- this.offcanvasComponent = data.component;
|
|
|
|
|
|
+ this.detailsPanelComponent = data.component;
|
|
this.inputData = data.data;
|
|
this.inputData = data.data;
|
|
this.backdrop.nativeElement.classList.add('backdrop--open');
|
|
this.backdrop.nativeElement.classList.add('backdrop--open');
|
|
this.offcanvas.nativeElement.classList.add('panel--open');
|
|
this.offcanvas.nativeElement.classList.add('panel--open');
|
|
});
|
|
});
|
|
- this.details.closeOffcanvas$.subscribe(() => {
|
|
|
|
- this.closeOffcanvas();
|
|
|
|
|
|
+ this.details.closePanel$.subscribe(() => {
|
|
|
|
+ this.closePanel();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- public closeOffcanvas(): void {
|
|
|
|
|
|
+ public closePanel(): void {
|
|
this.backdrop.nativeElement.classList.remove('backdrop--open');
|
|
this.backdrop.nativeElement.classList.remove('backdrop--open');
|
|
this.offcanvas.nativeElement.classList.remove('panel--open');
|
|
this.offcanvas.nativeElement.classList.remove('panel--open');
|
|
- this.offcanvasComponent = undefined;
|
|
|
|
|
|
+ this.detailsPanelComponent = undefined;
|
|
this.inputData = undefined;
|
|
this.inputData = undefined;
|
|
|
|
|
|
// event mit dem ergebnis emitten
|
|
// event mit dem ergebnis emitten
|