2026-01-19 14:09:12 +04:00
|
|
|
import { Routes } from '@angular/router';
|
2026-01-23 00:52:04 +04:00
|
|
|
import { authGuard, loginGuard } from './guards/auth.guard';
|
|
|
|
|
import { LoginComponent } from './components/login/login.component';
|
|
|
|
|
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
|
|
|
|
import { ActiveChecksComponent } from './components/active-checks/active-checks.component';
|
|
|
|
|
import { HistoryComponent } from './components/history/history.component';
|
2026-01-19 14:09:12 +04:00
|
|
|
|
2026-01-23 00:52:04 +04:00
|
|
|
export const routes: Routes = [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
|
|
|
|
redirectTo: '/login',
|
|
|
|
|
pathMatch: 'full'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'login',
|
|
|
|
|
component: LoginComponent,
|
|
|
|
|
canActivate: [loginGuard]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'dashboard',
|
|
|
|
|
component: DashboardComponent,
|
|
|
|
|
canActivate: [authGuard]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'active-checks',
|
|
|
|
|
component: ActiveChecksComponent,
|
|
|
|
|
canActivate: [authGuard]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'history',
|
|
|
|
|
component: HistoryComponent,
|
|
|
|
|
canActivate: [authGuard]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '**',
|
|
|
|
|
redirectTo: '/login'
|
|
|
|
|
}
|
|
|
|
|
];
|