import type { Routes } from '@angular/router'; import { MainLayoutComponent } from './core/layout/main-layout/main-layout.component'; import { AuthGuard } from './_helpers/auth.guard'; import { LoginAdminComponent } from './account/auth/login-admin/login-admin.component'; export const routes: Routes = [ { path: 'auth', loadChildren: () => import('./account/auth/auth.routes').then(m => m.authRoutes), }, // Redirect empty path to '/dashboards/project' { path: '', pathMatch: 'full', redirectTo: 'auth' }, { path: '', component: MainLayoutComponent, //canActivate: [AuthGuard], children: [ { path: 'admin', loadComponent: () => import('./admin-test/admin-test.component').then( c => c.AdminTestComponent ), //canActivate:[AuthGuard] }, { path: 'transactions', loadChildren: () => import('./trafics/transactions/transaction.routes').then( c => c.transactionsRoutes ), //canActivate:[AuthGuard] }, { path: 'integrations', loadChildren: () => import('./integrations/integration/integration.routes').then( c => c.integrationRoutes ), //canActivate:[AuthGuard] }, { path: 'reversements', loadChildren: () => import('./reversements/reversement/reversement.routes').then( c => c.reversementRoutes ), //canActivate:[AuthGuard] }, { path: 'dash', loadComponent: () => import( './admin/dashboards/beasy-dashboard/beasy-dashboard.component' ).then(c => c.BeasyDashboardComponent), //canActivate:[AuthGuard] }, { path: 'application-android', loadComponent: () => import('./application-android/application-android.component').then( c => c.ApplicationAndroidComponent ), //canActivate:[AuthGuard] }, { path: 'compte-associe', loadComponent: () => import('./compte-associe/compte-associe.component').then( c => c.CompteAssocieComponent ), //canActivate:[AuthGuard] }, { path: 'utilisateurs', loadComponent: () => import('./utilisateurs/utilisateurs.component').then( c => c.UtilisateursComponent ), //canActivate:[AuthGuard] }, /*{ path: 'caisse', loadComponent: () => import('./caisse/caisse.component').then(c => c.CaisseComponent),canActivate:[AuthGuard] },*/ { path: 'facturation', loadComponent: () => import('./facturation/facturation.component').then( c => c.FacturationComponent ), //canActivate:[AuthGuard] }, { path: 'buttons', loadComponent: () => import('./ui/buttons/buttons.component').then( c => c.ButtonsComponent ), }, { path: '**', component: LoginAdminComponent, }, ], canActivate: [AuthGuard], }, ];