diff --git a/matsen-tool/src/app/app-routing.module.ts b/matsen-tool/src/app/app-routing.module.ts index 41725cc..8b20657 100644 --- a/matsen-tool/src/app/app-routing.module.ts +++ b/matsen-tool/src/app/app-routing.module.ts @@ -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: ''} ]; diff --git a/matsen-tool/src/app/app.module.ts b/matsen-tool/src/app/app.module.ts index 89b1a63..1301f15 100644 --- a/matsen-tool/src/app/app.module.ts +++ b/matsen-tool/src/app/app.module.ts @@ -47,6 +47,7 @@ import { SalesComponent } from './sales/sales.component'; import { SalesDetailComponent } from './sales/sales-detail/sales-detail.component'; import { NewSaleComponent } from './sales/new-sale/new-sale.component'; import { ToggleComponent } from './_components/toggle/toggle.component'; +import { ProfileComponent } from './profile/profile.component'; export function apiConfigFactory(): Configuration { const params: ConfigurationParameters = { @@ -114,7 +115,8 @@ export function HttpLoaderFactory(http: HttpClient) { SalesComponent, SalesDetailComponent, NewSaleComponent, - ToggleComponent + ToggleComponent, + ProfileComponent ], providers: [ {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true}, diff --git a/matsen-tool/src/app/layout/two-column/two-column.component.html b/matsen-tool/src/app/layout/two-column/two-column.component.html index d4463d1..671342e 100644 --- a/matsen-tool/src/app/layout/two-column/two-column.component.html +++ b/matsen-tool/src/app/layout/two-column/two-column.component.html @@ -50,6 +50,13 @@ +