Merge pull request 'modif' (#9) from front/ExostFlash into feature/front
Reviewed-on: #9
This commit is contained in:
commit
549d419bbf
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 { LoginComponent } from './components/essentials/login/login.component';
|
||||||
import { LogoutComponent } from './components/essentials/logout/logout.component';
|
import { LogoutComponent } from './components/essentials/logout/logout.component';
|
||||||
|
|
||||||
import { HomeComponent } from './components/home/home.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 = [
|
const routes: Routes = [
|
||||||
{ path: 'login', component: LoginComponent },
|
{ path: 'login', component: LoginComponent },
|
||||||
{ path: 'logout', component: LogoutComponent },
|
{ path: 'logout', component: LogoutComponent },
|
||||||
|
|
||||||
{ path: '', component: HomeComponent },
|
{ path: '', component: HomeComponent },
|
||||||
{ path: 'home', component: HomeComponent },
|
{ path: 'home', component: HomeComponent },
|
||||||
|
|
||||||
{ path: 'matches', component: MatchesComponent },
|
{ path: 'matches', component: MatchesComponent },
|
||||||
{ path: 'matches/:id', component: MatchesIdComponent },
|
{ 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 { HomeComponent } from './components/home/home.component';
|
||||||
import { LoginComponent } from './components/essentials/login/login.component';
|
import { LoginComponent } from './components/essentials/login/login.component';
|
||||||
import { LogoutComponent } from './components/essentials/logout/logout.component';
|
import { LogoutComponent } from './components/essentials/logout/logout.component';
|
||||||
import { MatchesComponent } from './components/matches/matches.component';
|
import { MatchesComponent } from './components/match/matches/matches.component';
|
||||||
import { MatchesIdComponent } from './components/matches-id/matches-id.component';
|
import { MatchesIdComponent } from './components/match/matches-id/matches-id.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AuthService } from '@services/auth.service';
|
import { AuthService } from '@services/auth/auth.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-header',
|
selector: 'app-header',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AuthService } from '@services/auth.service';
|
import { AuthService } from '@services/auth/auth.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AuthService } from '@services/auth.service';
|
import { AuthService } from '@services/auth/auth.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-logout',
|
selector: 'app-logout',
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
<div class="d-flex justify-content-between align-items-center mt-3">
|
<div class="d-flex justify-content-between align-items-center mt-3">
|
||||||
<div class="text-start">
|
<div class="text-start">
|
||||||
<strong>{{ player1?.firstName }} {{ player1?.name }}</strong
|
<strong>{{ player1.firstName }} {{ player1.name }}</strong
|
||||||
><br />
|
><br />
|
||||||
<small class="text-muted">{{ player1?.club }}</small>
|
<small class="text-muted">{{ player1.club }}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
|
@ -58,9 +58,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-end">
|
<div class="text-end">
|
||||||
<strong>{{ player2?.firstName }} {{ player2?.name }}</strong
|
<strong>{{ player2.firstName }} {{ player2.name }}</strong
|
||||||
><br />
|
><br />
|
||||||
<small class="text-muted">{{ player2?.club }}</small>
|
<small class="text-muted">{{ player2.club }}</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
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 { MatchState, Matches } from '@interfaces/matches';
|
||||||
import { PlayerService } from '@services/player.service';
|
import { PlayerService } from '@services/player/player.service';
|
||||||
import { Player } from '@interfaces/player';
|
import { Player } from '@interfaces/player';
|
||||||
import { RefereeService } from '@services/referee.service';
|
import { RefereeService } from '@services/referee/referee.service';
|
||||||
import { Referee, RefereeLevel } from '@interfaces/referee';
|
import { Referee, RefereeLevel } from '@interfaces/referee';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
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 { Matches, MatchState } from '@interfaces/matches';
|
||||||
|
|
||||||
import { PlayerService } from '@services/player.service';
|
import { PlayerService } from '@services/player/player.service';
|
||||||
import { Player } from '@interfaces/player';
|
import { Player } from '@interfaces/player';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { inject } from '@angular/core';
|
import { inject } from '@angular/core';
|
||||||
import { CanActivateFn, Router } from '@angular/router';
|
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) => {
|
export const authGuard: CanActivateFn = (route, state) => {
|
||||||
const authService = inject(AuthService);
|
const authService = inject(AuthService);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue