2017-08-15 16:41:27 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
2017-08-16 14:54:36 +00:00
|
|
|
|
2017-08-15 16:41:27 +00:00
|
|
|
import { AuthGuard } from '../_guards/auth.guard';
|
2017-08-31 17:44:17 +00:00
|
|
|
import { OrgGuard } from '../_guards/org.guard';
|
|
|
|
import { CustomerGuard } from '../_guards/customer.guard';
|
2017-08-15 16:41:27 +00:00
|
|
|
|
|
|
|
import { DashboardComponent } from './dashboard.component';
|
2017-08-31 17:44:17 +00:00
|
|
|
import { DashboardCustomerComponent } from './dashboard-customer.component';
|
2017-08-15 16:41:27 +00:00
|
|
|
import { FullLayoutComponent } from '../layouts/full-layout.component';
|
2017-08-16 14:48:42 +00:00
|
|
|
import { AccountEditComponent } from './account-edit.component';
|
|
|
|
import { AddDataComponent } from './add-data.component';
|
2017-09-01 14:02:05 +00:00
|
|
|
import { FeedbackComponent } from './feedback.component';
|
2017-09-06 15:05:35 +00:00
|
|
|
import { TransactionLogComponent } from './transaction-log.component';
|
2018-01-17 17:36:28 +00:00
|
|
|
import { CategoryMonthComponent } from './category-month.component';
|
2017-09-19 16:22:19 +00:00
|
|
|
import { PayrollLogComponent } from './payroll-log.component';
|
2017-11-10 18:41:35 +00:00
|
|
|
import { LeaderboardComponent } from './leaderboard.component';
|
2017-09-26 16:31:40 +00:00
|
|
|
import { MapComponent } from './map.component';
|
2017-11-14 12:47:28 +00:00
|
|
|
import { TrailMapComponent } from './trail-map.component';
|
2017-08-15 16:41:27 +00:00
|
|
|
|
|
|
|
// Using child path to allow for FullLayout theming
|
|
|
|
const routes: Routes = [
|
2017-08-16 14:54:36 +00:00
|
|
|
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
|
2017-08-15 16:41:27 +00:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
component: FullLayoutComponent,
|
|
|
|
canActivate: [AuthGuard],
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'dashboard',
|
|
|
|
component: DashboardComponent,
|
|
|
|
data: { title: 'Dashboard' },
|
2017-08-31 17:44:17 +00:00
|
|
|
canActivate: [OrgGuard],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'dashboard-customer',
|
|
|
|
component: DashboardCustomerComponent,
|
|
|
|
data: { title: 'Customer Dashboard' },
|
|
|
|
canActivate: [CustomerGuard],
|
2017-08-15 16:41:27 +00:00
|
|
|
},
|
2017-08-16 14:48:42 +00:00
|
|
|
{
|
|
|
|
path: 'account-edit',
|
|
|
|
component: AccountEditComponent,
|
2017-11-10 17:15:11 +00:00
|
|
|
data: { title: 'Edit Account' },
|
2017-08-16 14:48:42 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'add-data',
|
|
|
|
component: AddDataComponent,
|
|
|
|
data: { title: 'Add Transaction' },
|
2017-09-01 14:02:05 +00:00
|
|
|
},
|
2017-11-10 17:15:11 +00:00
|
|
|
{
|
|
|
|
path: 'leaderboard',
|
|
|
|
component: LeaderboardComponent,
|
|
|
|
data: { title: 'Leaderboards' },
|
2017-11-13 12:39:31 +00:00
|
|
|
canActivate: [CustomerGuard],
|
2017-11-10 17:15:11 +00:00
|
|
|
},
|
2017-09-06 15:05:35 +00:00
|
|
|
{
|
|
|
|
path: 'transaction-log',
|
|
|
|
component: TransactionLogComponent,
|
|
|
|
data: { title: 'Transaction Log' },
|
|
|
|
},
|
2018-01-17 17:36:28 +00:00
|
|
|
{
|
|
|
|
path: 'category-month',
|
|
|
|
component: CategoryMonthComponent,
|
2018-01-24 13:18:51 +00:00
|
|
|
data: { title: 'Budget' },
|
2018-01-17 17:36:28 +00:00
|
|
|
},
|
2017-09-26 16:31:40 +00:00
|
|
|
{
|
|
|
|
path: 'map',
|
|
|
|
component: MapComponent,
|
2017-11-13 12:39:31 +00:00
|
|
|
data: { title: 'Purchase Map' },
|
2017-09-26 16:31:40 +00:00
|
|
|
},
|
2017-11-14 12:47:28 +00:00
|
|
|
{
|
|
|
|
path: 'story-trail',
|
|
|
|
component: TrailMapComponent,
|
2017-12-08 14:01:46 +00:00
|
|
|
data: { title: 'Story Trail' },
|
2017-11-14 12:47:28 +00:00
|
|
|
},
|
2017-09-19 16:22:19 +00:00
|
|
|
{
|
|
|
|
path: 'payroll-log',
|
|
|
|
component: PayrollLogComponent,
|
|
|
|
data: { title: 'Payroll Log' },
|
|
|
|
canActivate: [OrgGuard],
|
|
|
|
},
|
2017-09-01 14:02:05 +00:00
|
|
|
{
|
|
|
|
path: 'feedback',
|
|
|
|
component: FeedbackComponent,
|
|
|
|
data: { title: 'Give Feedback' },
|
2017-08-15 16:41:27 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forChild(routes)],
|
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class DashboardRoutingModule {}
|