diff --git a/matsen-tool/src/app/app-routing.module.ts b/matsen-tool/src/app/app-routing.module.ts index b5910c0..ce89450 100644 --- a/matsen-tool/src/app/app-routing.module.ts +++ b/matsen-tool/src/app/app-routing.module.ts @@ -6,6 +6,8 @@ import {AuthGuard} from './_helpers'; import {PartnersComponent} from "@app/partners/partners.component"; import {TwoColumnComponent} from "@app/layout/two-column/two-column.component"; import {PartnersDetailComponent} from "@app/partners/partners-detail/partners-detail.component"; +import {ProductsComponent} from "@app/products/products.component"; +import {ProductsDetailComponent} from "@app/products/products-detail/products-detail.component"; const accountModule = () => import('./account/account.module').then(x => x.AccountModule); const usersModule = () => import('./users/users.module').then(x => x.UsersModule); @@ -29,6 +31,7 @@ const routes: Routes = [ canActivate: [AuthGuard], children: [ {path: '', component: PartnersComponent, data: {dataType: 'supplier'}}, + {path: 'detail', component: PartnersDetailComponent, data: {dataType: 'supplier-detail'}}, ] }, { @@ -37,12 +40,18 @@ const routes: Routes = [ canActivate: [AuthGuard], children: [ {path: '', component: PartnersComponent, data: {dataType: 'service'}}, + {path: 'detail', component: PartnersDetailComponent, data: {dataType: 'service-detail'}}, + ] + }, + { + path: 'products', + component: TwoColumnComponent, + canActivate: [AuthGuard], + children: [ + {path: '', component: ProductsComponent, data: {dataType: 'product'}}, + {path: 'detail', component: ProductsDetailComponent, data: {dataType: 'product-detail'}}, ] }, - - // { path: 'customers', component: PartnersComponent, data: { dataType: 'customer' } }, - // { path: 'suppliers', component: PartnersComponent, data: { dataType: 'supplier' } }, - // { path: 'service', component: PartnersComponent, data: { dataType: 'service' } }, // 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 fcc7a8b..e621316 100644 --- a/matsen-tool/src/app/app.module.ts +++ b/matsen-tool/src/app/app.module.ts @@ -22,6 +22,8 @@ import {PartnersComponent} from './partners/partners.component'; import {BrowserAnimationsModule} from "@angular/platform-browser/animations"; import {TwoColumnComponent} from './layout/two-column/two-column.component'; import {PartnersDetailComponent} from './partners/partners-detail/partners-detail.component'; +import { ProductsComponent } from './products/products.component'; +import { ProductsDetailComponent } from './products/products-detail/products-detail.component'; export function apiConfigFactory(): Configuration { const params: ConfigurationParameters = { @@ -62,7 +64,9 @@ export function HttpLoaderFactory(http: HttpClient) { AlertComponent, HomeComponent, TwoColumnComponent, - PartnersDetailComponent + PartnersDetailComponent, + ProductsComponent, + ProductsDetailComponent ], providers: [ {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true}, diff --git a/matsen-tool/src/app/home/home.component.html b/matsen-tool/src/app/home/home.component.html index 24b3c80..bc70170 100644 --- a/matsen-tool/src/app/home/home.component.html +++ b/matsen-tool/src/app/home/home.component.html @@ -35,21 +35,21 @@
products-detail works!
diff --git a/matsen-tool/src/app/products/products-detail/products-detail.component.scss b/matsen-tool/src/app/products/products-detail/products-detail.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/matsen-tool/src/app/products/products-detail/products-detail.component.spec.ts b/matsen-tool/src/app/products/products-detail/products-detail.component.spec.ts new file mode 100644 index 0000000..75f094f --- /dev/null +++ b/matsen-tool/src/app/products/products-detail/products-detail.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProductsDetailComponent } from './products-detail.component'; + +describe('ProductsDetailComponent', () => { + let component: ProductsDetailComponent; + let fixture: ComponentFixtureproducts works!
diff --git a/matsen-tool/src/app/products/products.component.scss b/matsen-tool/src/app/products/products.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/matsen-tool/src/app/products/products.component.spec.ts b/matsen-tool/src/app/products/products.component.spec.ts new file mode 100644 index 0000000..29188cc --- /dev/null +++ b/matsen-tool/src/app/products/products.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProductsComponent } from './products.component'; + +describe('ProductsComponent', () => { + let component: ProductsComponent; + let fixture: ComponentFixture