modif
This commit is contained in:
parent
83c6b6e504
commit
5a8ea53597
22 changed files with 22 additions and 18 deletions
|
|
@ -5,15 +5,19 @@ import { authGuard } from '@guards/auth.guard';
|
|||
|
||||
import { LoginComponent } from './components/essentials/login/login.component';
|
||||
import { LogoutComponent } from './components/essentials/logout/logout.component';
|
||||
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
import { MatchesComponent } from './components/matches/matches.component';
|
||||
import { MatchesIdComponent } from './components/matches-id/matches-id.component';
|
||||
|
||||
import { MatchesComponent } from './components/match/matches/matches.component';
|
||||
import { MatchesIdComponent } from './components/match/matches-id/matches-id.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: 'login', component: LoginComponent },
|
||||
{ path: 'logout', component: LogoutComponent },
|
||||
|
||||
{ path: '', component: HomeComponent },
|
||||
{ path: 'home', component: HomeComponent },
|
||||
|
||||
{ path: 'matches', component: MatchesComponent },
|
||||
{ path: 'matches/:id', component: MatchesIdComponent },
|
||||
];
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import { FooterComponent } from './components/essentials/footer/footer.component
|
|||
import { HomeComponent } from './components/home/home.component';
|
||||
import { LoginComponent } from './components/essentials/login/login.component';
|
||||
import { LogoutComponent } from './components/essentials/logout/logout.component';
|
||||
import { MatchesComponent } from './components/matches/matches.component';
|
||||
import { MatchesIdComponent } from './components/matches-id/matches-id.component';
|
||||
import { MatchesComponent } from './components/match/matches/matches.component';
|
||||
import { MatchesIdComponent } from './components/match/matches-id/matches-id.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService } from '@services/auth.service';
|
||||
import { AuthService } from '@services/auth/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService } from '@services/auth.service';
|
||||
import { AuthService } from '@services/auth/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService } from '@services/auth.service';
|
||||
import { AuthService } from '@services/auth/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-logout',
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
|
||||
<div class="d-flex justify-content-between align-items-center mt-3">
|
||||
<div class="text-start">
|
||||
<strong>{{ player1?.firstName }} {{ player1?.name }}</strong
|
||||
<strong>{{ player1.firstName }} {{ player1.name }}</strong
|
||||
><br />
|
||||
<small class="text-muted">{{ player1?.club }}</small>
|
||||
<small class="text-muted">{{ player1.club }}</small>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
|
|
@ -58,9 +58,9 @@
|
|||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
<strong>{{ player2?.firstName }} {{ player2?.name }}</strong
|
||||
<strong>{{ player2.firstName }} {{ player2.name }}</strong
|
||||
><br />
|
||||
<small class="text-muted">{{ player2?.club }}</small>
|
||||
<small class="text-muted">{{ player2.club }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AuthService } from '@services/auth.service';
|
||||
import { AuthService } from '@services/auth/auth.service';
|
||||
|
||||
import { MatchesService } from '@services/matches.service';
|
||||
import { MatchesService } from '@services/matches/matches.service';
|
||||
import { MatchState, Matches } from '@interfaces/matches';
|
||||
import { PlayerService } from '@services/player.service';
|
||||
import { PlayerService } from '@services/player/player.service';
|
||||
import { Player } from '@interfaces/player';
|
||||
import { RefereeService } from '@services/referee.service';
|
||||
import { RefereeService } from '@services/referee/referee.service';
|
||||
import { Referee, RefereeLevel } from '@interfaces/referee';
|
||||
|
||||
@Component({
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { MatchesService } from '@services/matches.service';
|
||||
import { MatchesService } from '@services/matches/matches.service';
|
||||
import { Matches, MatchState } from '@interfaces/matches';
|
||||
|
||||
import { PlayerService } from '@services/player.service';
|
||||
import { PlayerService } from '@services/player/player.service';
|
||||
import { Player } from '@interfaces/player';
|
||||
|
||||
@Component({
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { inject } from '@angular/core';
|
||||
import { CanActivateFn, Router } from '@angular/router';
|
||||
import { AuthService } from '@services/auth.service';
|
||||
import { AuthService } from '@services/auth/auth.service';
|
||||
|
||||
export const authGuard: CanActivateFn = (route, state) => {
|
||||
const authService = inject(AuthService);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue