|
|
|
@@ -14,6 +14,7 @@ import {ContactsDetailComponent} from "@app/contacts/contacts-detail/contacts-de |
|
|
|
import {TasksComponent} from "@app/tasks/tasks.component"; |
|
|
|
import {SalesComponent} from "@app/sales/sales.component"; |
|
|
|
import {SalesDetailComponent} from "@app/sales/sales-detail/sales-detail.component"; |
|
|
|
import {ProfileComponent} from "@app/profile/profile.component"; |
|
|
|
|
|
|
|
const accountModule = () => import('./account/account.module').then(x => x.AccountModule); |
|
|
|
const usersModule = () => import('./users/users.module').then(x => x.UsersModule); |
|
|
|
@@ -63,8 +64,8 @@ const routes: Routes = [ |
|
|
|
component: TwoColumnComponent, |
|
|
|
canActivate: [AuthGuard], |
|
|
|
children: [ |
|
|
|
{path: '', component: ProductsComponent, data: {dataType: 'product'}}, |
|
|
|
{path: ':id', component: ProductsDetailComponent, data: {dataType: 'product-detail'}}, |
|
|
|
{path: '', component: ProductsComponent}, |
|
|
|
{path: ':id', component: ProductsDetailComponent}, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
@@ -72,7 +73,7 @@ const routes: Routes = [ |
|
|
|
component: TwoColumnComponent, |
|
|
|
canActivate: [AuthGuard], |
|
|
|
children: [ |
|
|
|
{path: '', component: TasksComponent, data: {dataType: 'task'}}, |
|
|
|
{path: '', component: TasksComponent}, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
@@ -80,7 +81,7 @@ const routes: Routes = [ |
|
|
|
component: TwoColumnComponent, |
|
|
|
canActivate: [AuthGuard], |
|
|
|
children: [ |
|
|
|
{path: '', component: DocumentsComponent, data: {dataType: 'document'}}, |
|
|
|
{path: '', component: DocumentsComponent}, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
@@ -88,11 +89,18 @@ const routes: Routes = [ |
|
|
|
component: TwoColumnComponent, |
|
|
|
canActivate: [AuthGuard], |
|
|
|
children: [ |
|
|
|
{path: '', component: SalesComponent, data: {dataType: 'sales'}}, |
|
|
|
{path: ':id', component: SalesDetailComponent, data: {dataType: 'sales-detail'}}, |
|
|
|
{path: '', component: SalesComponent}, |
|
|
|
{path: ':id', component: SalesDetailComponent}, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'profile', |
|
|
|
component: TwoColumnComponent, |
|
|
|
canActivate: [AuthGuard], |
|
|
|
children: [ |
|
|
|
{path: '', component: ProfileComponent}, |
|
|
|
] |
|
|
|
}, |
|
|
|
|
|
|
|
// otherwise redirect to home |
|
|
|
{path: '**', redirectTo: ''} |
|
|
|
]; |
|
|
|
|