Lots of refactor with auth guards and functional customer routing
This commit is contained in:
parent
52fbda7157
commit
24037e0454
13 changed files with 143 additions and 1017 deletions
|
@ -2,8 +2,11 @@ import { NgModule } from '@angular/core';
|
|||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AuthGuard } from '../_guards/auth.guard';
|
||||
import { OrgGuard } from '../_guards/org.guard';
|
||||
import { CustomerGuard } from '../_guards/customer.guard';
|
||||
|
||||
import { DashboardComponent } from './dashboard.component';
|
||||
import { DashboardCustomerComponent } from './dashboard-customer.component';
|
||||
import { FullLayoutComponent } from '../layouts/full-layout.component';
|
||||
import { AccountEditComponent } from './account-edit.component';
|
||||
import { AddDataComponent } from './add-data.component';
|
||||
|
@ -20,6 +23,13 @@ const routes: Routes = [
|
|||
path: 'dashboard',
|
||||
component: DashboardComponent,
|
||||
data: { title: 'Dashboard' },
|
||||
canActivate: [OrgGuard],
|
||||
},
|
||||
{
|
||||
path: 'dashboard-customer',
|
||||
component: DashboardCustomerComponent,
|
||||
data: { title: 'Customer Dashboard' },
|
||||
canActivate: [CustomerGuard],
|
||||
},
|
||||
{
|
||||
path: 'account-edit',
|
||||
|
|
Reference in a new issue