diff --git a/frontend/src/app/app.routes.ts b/frontend/src/app/app.routes.ts index 94b8491..351292e 100644 --- a/frontend/src/app/app.routes.ts +++ b/frontend/src/app/app.routes.ts @@ -5,6 +5,8 @@ import {map} from "rxjs"; import {AppComponent} from "./app.component"; import AuthenticationComponent from "./authentication/authentication.component"; import {HomeComponent} from "./home/home.component"; +import {ListPropertiesComponent} from "./properties/list-properties/list-properties.component"; +import {NewPropertyComponent} from "./properties/new-property/new-property.component"; export const routes: Routes = [ { @@ -25,4 +27,16 @@ export const routes: Routes = [ () => inject(AuthenticationService).isAuthenticated.pipe(map((isAuth) => !isAuth)), ], }, + { + path: "properties", + component: ListPropertiesComponent, + canActivate: [() => inject(AuthenticationService).isAuthenticated], + children: [ + { + path: "new", + component: NewPropertyComponent, + canActivate: [() => inject(AuthenticationService).isAuthenticated], + }, + ], + }, ] diff --git a/frontend/src/app/home/home.component.html b/frontend/src/app/home/home.component.html index 1296653..f1350e9 100644 --- a/frontend/src/app/home/home.component.html +++ b/frontend/src/app/home/home.component.html @@ -1,10 +1,13 @@
diff --git a/frontend/src/app/home/home.component.ts b/frontend/src/app/home/home.component.ts index 7769bd6..e02fb92 100644 --- a/frontend/src/app/home/home.component.ts +++ b/frontend/src/app/home/home.component.ts @@ -1,15 +1,15 @@ import { Component } from '@angular/core'; import {NgOptimizedImage} from "@angular/common"; +import {Router, RouterLink, RouterModule} from "@angular/router"; @Component({ selector: 'app-home', standalone: true, imports: [ - NgOptimizedImage + NgOptimizedImage, + RouterModule ], templateUrl: './home.component.html', styleUrl: './home.component.css' }) -export class HomeComponent { - -} +export class HomeComponent {} diff --git a/frontend/src/app/properties/list-properties/list-properties.component.css b/frontend/src/app/properties/list-properties/list-properties.component.css new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/app/properties/list-properties/list-properties.component.html b/frontend/src/app/properties/list-properties/list-properties.component.html new file mode 100644 index 0000000..aebbd43 --- /dev/null +++ b/frontend/src/app/properties/list-properties/list-properties.component.html @@ -0,0 +1 @@ +list-properties works!
diff --git a/frontend/src/app/properties/list-properties/list-properties.component.spec.ts b/frontend/src/app/properties/list-properties/list-properties.component.spec.ts new file mode 100644 index 0000000..d18933c --- /dev/null +++ b/frontend/src/app/properties/list-properties/list-properties.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListPropertiesComponent } from './list-properties.component'; + +describe('ListPropertiesComponent', () => { + let component: ListPropertiesComponent; + let fixture: ComponentFixturenew-property works!
diff --git a/frontend/src/app/properties/new-property/new-property.component.spec.ts b/frontend/src/app/properties/new-property/new-property.component.spec.ts new file mode 100644 index 0000000..7c2a471 --- /dev/null +++ b/frontend/src/app/properties/new-property/new-property.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewPropertyComponent } from './new-property.component'; + +describe('NewPropertyComponent', () => { + let component: NewPropertyComponent; + let fixture: ComponentFixture