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,
OnInit,
Input,
OnDestroy,
SimpleChanges,
OnChanges
} from '@angular/core';
import { EwvViewerService } from '../../ewv-viewer/ewv-viewer.service';
import { Subscription } from 'rxjs/Subscription';
@Component({
selector: 'app-claim-lvl-ambulance',
templateUrl: './claim-lvl-ambulance-info.component.html',
styleUrls: ['../../ewv-viewer/ewv-viewer.component.scss']
})
export class ClaimLvlAmbulanceInfoComponent
implements OnInit, OnDestroy, OnChanges {
@Input() data;
@Input() accordionId;
isSplitView: boolean; // This
isSplitSubscription = new Subscription(); // This
collapseState = true;
claimLevel;
claimLvlMsg = 'No Claim-Level Ambulance Data Found';
constructor(private ewvViewerService: EwvViewerService) {}
ngOnInit() {
this.ewvViewerService.getCollapseState().subscribe(state => {
this.collapseState = state;
});
this.populateData();
}
ngOnChanges(changes: SimpleChanges): void {
this.data = changes.data.currentValue;
this.populateData();
}
populateData() {
this.claimLevel = undefined;
if (this.data) {
this.claimLevel = this.data['claimLevelAmbulanceInfo'];
}
this.isSplitSubscription = this.ewvViewerService.isSplitView.subscribe(
// This
data => (this.isSplitView = data)
);
}
ngOnDestroy() {
this.isSplitSubscription.unsubscribe(); // This
}
}