Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/firebird-ng/src/app/components/event-selector/event-selector.component.ts is written in an unsupported language. File is not indexed.

0001 import { Component, type OnInit } from '@angular/core';
0002 import {EventDisplayService} from "phoenix-ui-components";
0003 import {MatTooltip} from "@angular/material/tooltip";
0004 import {NgForOf, NgIf} from "@angular/common";
0005 
0006 
0007 @Component({
0008   selector: 'app-custom-event-selector',
0009   templateUrl: './event-selector.component.html',
0010   styleUrls: ['./event-selector.component.scss'],
0011   imports: [
0012     MatTooltip,
0013     NgForOf,
0014     NgIf
0015   ],
0016   standalone: true
0017 })
0018 export class EventSelectorComponent implements OnInit {
0019   // Array containing the keys of the multiple loaded events
0020   events: string[] = [];
0021 
0022   constructor(private eventDisplay: EventDisplayService) {}
0023 
0024   ngOnInit() {
0025     this.eventDisplay.listenToLoadedEventsChange(
0026       (events) => (this.events = events),
0027     );
0028   }
0029 
0030   changeEvent(selected: any) {
0031     const value = selected.target.value;
0032     this.eventDisplay.loadEvent(value);
0033   }
0034 }