import {Component, OnInit, ViewChild} from '@angular/core'; import {VehiculeService}…
- User
import {Component, OnInit, ViewChild} from '@angular/core'; import {VehiculeService} from "../services/vehicule.service"; import {ActivatedRoute} from "@angular/router"; import {EntretienService} from "../services/entretien.service"; import {SinistreService} from "../services/sinistre.service"; import {PretvehiculeService} from "../services/pretvehicule.service"; import {MatDialog} from "@angular/material/dialog"; import {OptionsService} from "../services/options.service"; import {KeycloakService} from "keycloak-angular"; import {TrajetService} from "../services/trajet.service"; import {MatPaginator} from "@angular/material/paginator"; import {DriverService} from "../services/driver.service"; import {ToastrService} from "ngx-toastr"; import {FormBuilder, FormControl, FormGroup, Validators} from "@angular/forms";
@Component({ selector: 'app-vehiculesdetails', templateUrl: './vehiculesdetails.component.html', styleUrls: ['./vehiculesdetails.component.scss'], }) export class VehiculesdetailsComponent implements OnInit { @ViewChild(MatPaginator) paginator!: MatPaginator; id = this.route.snapshot.params['id']; vehicle: any; entretiens: any; prets: any; vehicules: any; sinistres: any; pretInfosConducteur: any options: any; username: string | undefined; drivers: any; trajets: any; email: any; isAuthenticated: boolean = false; submitted: boolean = false; vehicles: any; driverdetail: any; sinistresDisplayedColumns: string[] = ['Type', 'Date', 'Description', 'montant']; optionsDisplayedColumns: string[] = ['Type']; trajetsDisplayedColumns: string[] = ['Adresse_Depart', 'Adresse_Arrivee', 'Km_depart', 'Km_arrivee', 'Prix_carburant', "type_carburant", "Date_depart", "Date_arrivee", "Statut"]; entretiensDisplayedColumns: string[] = ['Type', 'Date', 'Description', 'Montant', 'Statut']; pretsDisplayedColumns: string[] = ['NameDriver', 'DateDebut', 'DateFin', 'Statut']; vehicleForm: FormGroup = this.fb.group({ Id: new FormControl('', [Validators.required]), IdConducteur: new FormControl('', [Validators.required]), });
constructor( private toastr: ToastrService, private keycloackService: KeycloakService, public vehiculeService: VehiculeService, public driverService: DriverService, public trajetService: TrajetService, private route: ActivatedRoute, public entretienService: EntretienService, public sinistreService: SinistreService, public pretVehiculeService: PretvehiculeService, public optionsService: OptionsService, public dialog: MatDialog, public fb: FormBuilder) {
}
ngOnInit() { this.GetDetailVehicule(); this.GetDetailEntretien(); this.GetDetailSinistre(); this.GetInfosConducteurPret(); this.GetInfosGeneralPret(); this.GetdetailsOption(); this.GetDetailTrajet(); this.GetDetailDriver(); this.GetAllVehicles(); this.GetAllDrivers(); //this.nameuserkeycloak(); }
/nameuserkeycloak() { this.keycloackService.isLoggedIn().then(isAuthenticated => { this.isAuthenticated = isAuthenticated; this.keycloackService.loadUserProfile().then(async (userProfile) => { this.username = userProfile.username; }); }); }/
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.