Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
import {
Component,
AfterViewInit,
Input,
OnDestroy,
SimpleChanges,
OnChanges
} from '@angular/core';
import { EwvViewerService } from '../../ewv-viewer/ewv-viewer.service';
import { Subscription } from 'rxjs/Subscription';
import { ChangeDetectorRef } from '@angular/core';
@Component({
selector: 'app-miscellaneous-info',
templateUrl: './miscellaneous-info.component.html',
styleUrls: ['../../ewv-viewer/ewv-viewer.component.scss']
})
export class MiscellaneousInfoComponent
implements AfterViewInit, OnDestroy, OnChanges {
@Input() data;
@Input() accordionId;
isSplitView: boolean;
isSplitSubscription = new Subscription();
collapseState = true;
billingMiscellanous;
constructor(
private ewvViewerService: EwvViewerService,
private cdRef: ChangeDetectorRef
) {}
ngAfterViewInit() {
setTimeout(() => {
this.ewvViewerService.getCollapseState().subscribe(state => {
this.collapseState = state;
});
if (this.data) {
this.populateData();
}
});
}
ngOnChanges(changes: SimpleChanges): void {
setTimeout(() => {
this.data = changes.data.currentValue;
if (this.data) {
this.populateData();
}
});
}
populateData() {
this.billingMiscellanous = this.data['billingMiscellanous'];
this.isSplitSubscription = this.ewvViewerService.isSplitView.subscribe(
data => (this.isSplitView = data)
);
}
ngOnDestroy() {
this.isSplitSubscription.unsubscribe();
}
}