diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index acb2e4c..eee04f5 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,14 +1,15 @@ -import {NgModule} from '@angular/core'; -import {RouterModule, Routes} from '@angular/router'; -import {ThisEnvironment} from '../environments/environment.injectable'; -import {CountComponent} from './count/count.component'; -import {PrintComponent} from './print/print.component'; -import {SampleComponent} from './sample/sample.component'; -import {SettingsComponent} from './settings/settings.component'; -import {MultipleLabelsComponent} from './multiple-labels/multiple-labels.component'; +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { ThisEnvironment } from '../environments/environment.injectable'; +import { CountComponent } from './count/count.component'; +import { PrintComponent } from './print/print.component'; +import { SampleComponent } from './sample/sample.component'; +import { SettingsComponent } from './settings/settings.component'; +import { MultipleLabelsComponent } from './multiple-labels/multiple-labels.component'; import { DepositsComponent } from './deposits/deposits.component'; import { GraphsComponent } from './graphs/graphs.component'; -import { ImportedFilesComponent} from './imported-files/imported-files.component' +import { ImportedFilesComponent } from './imported-files/imported-files.component' +import { SidebarComponent } from './sidebar/sidebar.component'; export const routes: Routes = [ { @@ -16,20 +17,23 @@ export const routes: Routes = [ pathMatch: 'full', component: SampleComponent }, - { - path: 'deposits', - pathMatch: 'full', - component: DepositsComponent - }, { path: 'dashboard', - pathMatch: 'full', - component: GraphsComponent - }, - { - path: 'imports', - pathMatch: 'full', - component: ImportedFilesComponent + component: SidebarComponent, + children: [ + { + path: 'graphs', // child route path + component: GraphsComponent, // child route component that the router renders + }, + { + path: 'imports', + component: ImportedFilesComponent + }, + { + path: 'deposits', + component: DepositsComponent + }, + ], }, { path: 'sample', @@ -68,7 +72,7 @@ export const routes: Routes = [ ], exports: [RouterModule], providers: [ - {provide: 'APP_ENVIRONMENT', useClass: ThisEnvironment}, + { provide: 'APP_ENVIRONMENT', useClass: ThisEnvironment }, ] }) export class AppRoutingModule { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a2af765..b1df4f4 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -5,6 +5,7 @@ import {FlexLayoutModule} from '@angular/flex-layout'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {MatButtonModule} from '@angular/material/button'; import {MatCheckboxModule} from '@angular/material/checkbox'; +import {MatSidenavModule} from '@angular/material/sidenav'; import {MatCardModule} from '@angular/material/card'; import {MatOptionModule} from '@angular/material/core'; import {MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule} from '@angular/material/form-field'; @@ -51,7 +52,8 @@ import { CustomDateAdapter } from './custom-date-adapter'; import { MatTableModule } from '@angular/material/table' import {MatGridListModule} from '@angular/material/grid-list'; import {MatDividerModule} from '@angular/material/divider'; - +import { SidebarComponent } from './sidebar/sidebar.component'; +import {MatListModule} from '@angular/material/list'; @@ -91,10 +93,13 @@ export function getBaseHref(platformLocation: PlatformLocation): string { SettingsComponent, DepositsComponent, GraphsComponent, - ImportedFilesComponent + ImportedFilesComponent, + SidebarComponent ], imports: [ MatPaginatorModule, + MatListModule, + MatSidenavModule, MatDividerModule, MatGridListModule, MatTableModule, diff --git a/src/app/graphs/graphs.component.html b/src/app/graphs/graphs.component.html index 1bed932..88015b5 100644 --- a/src/app/graphs/graphs.component.html +++ b/src/app/graphs/graphs.component.html @@ -176,9 +176,9 @@ - + diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index 2059cfb..468fcc4 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -4,6 +4,7 @@ + diff --git a/src/app/sidebar/sidebar.component.html b/src/app/sidebar/sidebar.component.html new file mode 100644 index 0000000..9137a02 --- /dev/null +++ b/src/app/sidebar/sidebar.component.html @@ -0,0 +1,22 @@ + + + + +

View Graphs

+
+ +

Imported Files

+
+ +

Manage Label Inventory

+
+
+
+ + +

+ Toggle Sidebar +

+ +
+
\ No newline at end of file diff --git a/src/app/sidebar/sidebar.component.scss b/src/app/sidebar/sidebar.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/sidebar/sidebar.component.spec.ts b/src/app/sidebar/sidebar.component.spec.ts new file mode 100644 index 0000000..1f932e2 --- /dev/null +++ b/src/app/sidebar/sidebar.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SidebarComponent } from './sidebar.component'; + +describe('SidebarComponent', () => { + let component: SidebarComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ SidebarComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(SidebarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/sidebar/sidebar.component.ts b/src/app/sidebar/sidebar.component.ts new file mode 100644 index 0000000..ce6b435 --- /dev/null +++ b/src/app/sidebar/sidebar.component.ts @@ -0,0 +1,16 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-sidebar', + templateUrl: './sidebar.component.html', + styleUrls: ['./sidebar.component.scss'] +}) +export class SidebarComponent implements OnInit { + + constructor() { } + opened: boolean; + + ngOnInit(): void { + } + +}