Service + Slide component refactoring

This commit is contained in:
Mateus Meyer Jiacomelli 2021-09-02 19:44:30 -03:00
parent e7fc8ba17d
commit a85476968e
3 changed files with 3 additions and 6 deletions

View File

@ -12,9 +12,6 @@ import { ServiceItem } from '../../responses';
})
export class ServiceComponent {
ngOnInit() {
}
onItemSelected(item: ServiceItem) {
if (item.is_valid) {
this.openlpService.setServiceItem(item.id).subscribe();

View File

@ -14,7 +14,7 @@ export class SlideItemComponent {
@Output() select = new EventEmitter<Slide>();
onSlideSelected(slide: Slide) {
this.select.emit(slide)
this.select.emit(slide);
}
}

View File

@ -1,4 +1,4 @@
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
import { Subscription } from 'rxjs';
import { Slide } from '../../../responses';
@ -10,7 +10,7 @@ import { OpenLPService } from '../../../openlp.service';
styleUrls: ['./slide-list.component.scss'],
})
export class SlideListComponent implements OnInit {
export class SlideListComponent implements OnInit, OnDestroy {
slides: Slide[] = null;
@Output() slideSelected = new EventEmitter<SlideListItem>();
_subscription: Subscription;