Skip to content
Snippets Groups Projects
Commit 70db2a69 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'fix/new-urls' into 'dev'

Fix/new urls

See merge request web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client!100
parents 0a3c1066 a731c823
No related branches found
No related tags found
3 merge requests!178release V1.10.0,!111Dev,!100Fix/new urls
...@@ -6,7 +6,7 @@ import { FormComponent } from './form/form.component'; ...@@ -6,7 +6,7 @@ import { FormComponent } from './form/form.component';
import { AdminGuard } from './guards/admin.guard'; import { AdminGuard } from './guards/admin.guard';
import { AuthGuard } from './guards/auth.guard'; import { AuthGuard } from './guards/auth.guard';
import { DeactivateGuard } from './guards/deactivate.guard'; import { DeactivateGuard } from './guards/deactivate.guard';
import { HomeComponent } from './home/home.component'; import { CartoComponent } from './carto/carto.component';
import { LegalNoticeComponent } from './legal-notice/legal-notice.component'; import { LegalNoticeComponent } from './legal-notice/legal-notice.component';
import { ProfileComponent } from './profile/profile.component'; import { ProfileComponent } from './profile/profile.component';
import { ResetEmailComponent } from './reset-email/reset-email.component'; import { ResetEmailComponent } from './reset-email/reset-email.component';
...@@ -20,25 +20,17 @@ import { UserVerificationComponent } from './user-verification/user-verification ...@@ -20,25 +20,17 @@ import { UserVerificationComponent } from './user-verification/user-verification
const routes: Routes = [ const routes: Routes = [
{ path: 'print', outlet: 'print', children: [{ path: 'structure', component: StructureDetailsComponent }] }, { path: 'print', outlet: 'print', children: [{ path: 'structure', component: StructureDetailsComponent }] },
{ {
path: 'home', path: 'acteurs',
component: HomeComponent, component: CartoComponent,
},
{
path: 'projects',
component: HomeComponent,
}, },
{ {
path: 'login', path: 'login',
component: HomeComponent, component: CartoComponent,
}, },
{ {
path: 'sturctures', path: 'structures',
component: StructureListComponent, component: StructureListComponent,
}, },
{
path: 'resources',
component: HomeComponent,
},
{ {
path: 'legal-notice', path: 'legal-notice',
component: LegalNoticeComponent, component: LegalNoticeComponent,
...@@ -91,9 +83,13 @@ const routes: Routes = [ ...@@ -91,9 +83,13 @@ const routes: Routes = [
path: 'news', path: 'news',
loadChildren: () => import('./post/post.module').then((m) => m.PostModule), loadChildren: () => import('./post/post.module').then((m) => m.PostModule),
}, },
{
path: 'home',
redirectTo: 'news',
},
{ {
path: '**', path: '**',
redirectTo: 'home', redirectTo: 'news',
}, },
]; ];
......
...@@ -5,7 +5,7 @@ import { BrowserModule } from '@angular/platform-browser'; ...@@ -5,7 +5,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component'; import { CartoComponent } from './carto/carto.component';
import { CustomBreakPointsProvider } from './config/custom-breakpoint'; import { CustomBreakPointsProvider } from './config/custom-breakpoint';
import { FooterComponent } from './footer/footer.component'; import { FooterComponent } from './footer/footer.component';
import { HeaderComponent } from './header/header.component'; import { HeaderComponent } from './header/header.component';
...@@ -39,7 +39,7 @@ import { RouterListenerService } from './services/routerListener.service'; ...@@ -39,7 +39,7 @@ import { RouterListenerService } from './services/routerListener.service';
AppComponent, AppComponent,
HeaderComponent, HeaderComponent,
FooterComponent, FooterComponent,
HomeComponent, CartoComponent,
StructureListComponent, StructureListComponent,
CardComponent, CardComponent,
SearchComponent, SearchComponent,
......
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component'; import { CartoComponent } from './carto.component';
describe('HomeComponent', () => { describe('HomeComponent', () => {
let component: HomeComponent; let component: CartoComponent;
let fixture: ComponentFixture<HomeComponent>; let fixture: ComponentFixture<CartoComponent>;
let originalTimeout; let originalTimeout;
beforeEach(async () => { beforeEach(async () => {
await TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [HomeComponent], declarations: [CartoComponent],
imports: [HttpClientModule], imports: [HttpClientModule],
}).compileComponents(); }).compileComponents();
}); });
...@@ -22,7 +22,7 @@ describe('HomeComponent', () => { ...@@ -22,7 +22,7 @@ describe('HomeComponent', () => {
beforeEach(() => { beforeEach(() => {
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
fixture = TestBed.createComponent(HomeComponent); fixture = TestBed.createComponent(CartoComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
......
...@@ -10,11 +10,11 @@ import { GeojsonService } from '../services/geojson.service'; ...@@ -10,11 +10,11 @@ import { GeojsonService } from '../services/geojson.service';
import { CustomRegExp } from '../utils/CustomRegExp'; import { CustomRegExp } from '../utils/CustomRegExp';
@Component({ @Component({
selector: 'app-home', selector: 'app-carto',
templateUrl: './home.component.html', templateUrl: './carto.component.html',
styleUrls: ['./home.component.scss'], styleUrls: ['./carto.component.scss'],
}) })
export class HomeComponent implements OnInit { export class CartoComponent implements OnInit {
public structures: Structure[] = []; public structures: Structure[] = [];
public displayMarkerId: string; public displayMarkerId: string;
public selectedMarkerId: string; public selectedMarkerId: string;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div fxLayout="row" class="right-header" fxLayoutAlign="center center" fxLayoutGap="3vw"> <div fxLayout="row" class="right-header" fxLayoutAlign="center center" fxLayoutGap="3vw">
<a routerLink="/news" [routerLinkActive]="'active'" i18n>Actualités</a> <a routerLink="/news" [routerLinkActive]="'active'" i18n>Actualités</a>
<a routerLink="/home" [routerLinkActive]="'active'" i18n>Cartographie de acteurs</a> <a routerLink="/acteurs" [routerLinkActive]="'active'" i18n>Cartographie de acteurs</a>
<a routerLink="/about" [routerLinkActive]="'active'" i18n>Qui sommes-nous ?</a> <a routerLink="/about" [routerLinkActive]="'active'" i18n>Qui sommes-nous ?</a>
<a *ngIf="isAdmin" routerLink="/admin" [routerLinkActive]="'active'">Administration</a> <a *ngIf="isAdmin" routerLink="/admin" [routerLinkActive]="'active'">Administration</a>
<button *ngIf="isLoggedIn" class="red" routerLink="/profile" [routerLinkActive]="'active'"> <button *ngIf="isLoggedIn" class="red" routerLink="/profile" [routerLinkActive]="'active'">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment