import { Component, Injector, ViewChild } from '@angular/core'; import { appModuleAnimation } from '@shared/animations/routerTransition'; import { AppComponentBase } from '@shared/common/app-component-base'; import { OrganizationTreeComponent } from '@app/admin/organization-units/organization-tree.component'; import { FleetUsersComponent } from './fleet-users.component'; import { FleetVehiclesComponent } from './fleet-vehicles.component'; import { IFleetUnitInfo } from './fleets-unit-info'; import { FleetsTreeComponent } from './fleets-tree.component'; @Component({ templateUrl: './fleets-unit.component.html', animations: [appModuleAnimation()] }) export class FleetsUnitComponent extends AppComponentBase { @ViewChild('fleetUsers', {static: true}) fleetUsers: FleetUsersComponent; @ViewChild('fleetVehicles', {static: true}) fleetVehicles: FleetVehiclesComponent; @ViewChild('fleetsTree', {static: true}) fleetsTree: FleetsTreeComponent; organizationUnit: IFleetUnitInfo = null; constructor( injector: Injector ) { super(injector); } ouSelected(event: any): void { this.organizationUnit = event; this.fleetUsers.organizationUnit = event; this.fleetVehicles.organizationUnit = event; } }