Backend: - Generalize MailService with send() method - Add Notification entity, repository, service, controller - Add NotificationListener for 6 domain events - Add password reset flow (forgot-password, reset-password) - Add configurable frontend URL in application.yml Frontend: - Add notification service and bell-icon component - Add forgot-password and reset-password pages - Add routes for new pages Tests: - Add NotificationServiceTest with 5 unit tests - All 27 tests passing
74 lines
2.8 KiB
TypeScript
74 lines
2.8 KiB
TypeScript
import {Routes} from '@angular/router';
|
|
import {LandingPage} from './pages/landing-page/landing-page';
|
|
import {Register} from './pages/register/register';
|
|
import {LoginComponent} from './pages/login/login';
|
|
import {AdminUserApprovalComponent} from './pages/admin-user-approval/admin-user-approval';
|
|
import {authGuard} from './guards/auth-guard';
|
|
import {roleGuard} from './guards/role-guard';
|
|
import {DashboardLayout} from './layout/dashboard-layout/dashboard-layout';
|
|
import {DashboardOverview} from './pages/dashboard-overview/dashboard-overview';
|
|
import {AdminEnergyCommunity} from './pages/admin-energy-community/admin-energy-community';
|
|
import {VerifyEmailComponent} from './pages/verify-email/verify-email';
|
|
import {MeteringPointsComponent} from './pages/metering-points/metering-points';
|
|
import {ProfileComponent} from './pages/profile/profile';
|
|
import {JoinCommunityComponent} from './pages/join-community/join-community';
|
|
import {MyMembershipsComponent} from './pages/my-memberships/my-memberships';
|
|
import {AdminMembershipsComponent} from './pages/admin-memberships/admin-memberships';
|
|
import {ForgotPasswordComponent} from './pages/forgot-password/forgot-password';
|
|
import {ResetPasswordComponent} from './pages/reset-password/reset-password';
|
|
|
|
export const routes: Routes = [
|
|
{ path: '', component: LandingPage },
|
|
{ path: 'register', component: Register },
|
|
{ path: 'login', component: LoginComponent },
|
|
{ path: 'verify-email', component: VerifyEmailComponent },
|
|
{ path: 'forgot-password', component: ForgotPasswordComponent },
|
|
{ path: 'reset-password', component: ResetPasswordComponent },
|
|
{
|
|
path: 'dashboard',
|
|
component: DashboardLayout,
|
|
canActivate: [authGuard],
|
|
children: [
|
|
{ path: '', component: DashboardOverview },
|
|
{
|
|
path: 'metering-points',
|
|
component: MeteringPointsComponent,
|
|
canActivate: [roleGuard(['ADMIN', 'MEMBER'])]
|
|
},
|
|
{
|
|
path: 'join-community',
|
|
component: JoinCommunityComponent,
|
|
canActivate: [roleGuard(['MEMBER'])]
|
|
},
|
|
{
|
|
path: 'my-memberships',
|
|
component: MyMembershipsComponent,
|
|
canActivate: [roleGuard(['MEMBER'])]
|
|
},
|
|
{
|
|
path: 'admin-memberships',
|
|
component: AdminMembershipsComponent,
|
|
canActivate: [roleGuard(['ADMIN'])]
|
|
},
|
|
{
|
|
path: 'approvals',
|
|
component: AdminUserApprovalComponent,
|
|
canActivate: [roleGuard(['ADMIN'])]
|
|
},
|
|
{
|
|
path: 'energy-communities',
|
|
component: AdminEnergyCommunity,
|
|
canActivate: [roleGuard(['ADMIN'])]
|
|
},
|
|
{
|
|
path: 'profile',
|
|
component: ProfileComponent,
|
|
canActivate: [roleGuard(['ADMIN', 'MEMBER'])]
|
|
}
|
|
]
|
|
},
|
|
|
|
// Wildcard-Fallback für unbekannte URLs
|
|
{ path: '**', redirectTo: '' }
|
|
];
|