Skip to content

Commit

Permalink
Adding Left Nav Bar
Browse files Browse the repository at this point in the history
  • Loading branch information
tmesite committed Apr 22, 2019
1 parent e695674 commit 692ff9d
Show file tree
Hide file tree
Showing 26 changed files with 1,792 additions and 324 deletions.
1,791 changes: 1,473 additions & 318 deletions ampath-simple-app/package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ampath-simple-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"hammerjs": "^2.0.8",
"material-components-web": "^1.1.0",
"rxjs": "~6.3.3",
"server": "^1.0.18",
"webpack-dev": "^1.1.1",
"zone.js": "~0.8.26"
},
"devDependencies": {
Expand Down
28 changes: 28 additions & 0 deletions ampath-simple-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [
{
path:'hiv-care-lib',
loadChildren:'./hiv-care-lib/hiv-care-lib.module#HivCareLibModule'
},
{
path:'patient-search',
loadChildren:'./patient-search/patient-search.module#PatientSearchModule'
},
{
path:'patients-program-enrollment',
loadChildren:'./patients-program-enrollment/patients-program-enrollment.module#PatientsProgramEnrollmentModule'
},
{
path: '',
redirectTo: '',
pathMatch: 'full'
}
];

@NgModule({
imports: [ RouterModule.forRoot(routes)],
exports: [ RouterModule]
})
export class AppRoutingModule {}
22 changes: 22 additions & 0 deletions ampath-simple-app/src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.container {
position: absolute;
top:0;
left: 0;
right: 0;
bottom: 0;
}

.container .mat-drawer {
min-width: 200px;
}

.container .mat-drawer .mat-button {
display: block;
width: 100%;
text-align: center;
font-size: 1.5em;
}

.spacer {
flex: 1 1 auto;
}
31 changes: 27 additions & 4 deletions ampath-simple-app/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
<!--The content below is only a placeholder and can be replaced.-->
<mat-toolbar>
<span>My Application</span>
</mat-toolbar>
<mat-drawer-container class="container" autosize>
<mat-drawer #drawer class="sidenav">
<br>
<br>
<br>
<button color="accent" mat-button routerLink="/hiv-care-lib">Clinic Flow</button>
<br>
<br>
<button color="accent" mat-button routerLink="/patient-search">Patient Search</button>
<br>
<br>
<button color="accent" mat-button routerLink="/patients-program-enrollment">Patients Program Enrollment</button>
</mat-drawer>
<div class="sidenav-content">
<mat-toolbar color="accent">
<mat-toolbar-row>
<button mat-icon-button (click)="drawer.toggle()">
<mat-icon>menu</mat-icon>
</button>

<span>Ampath</span>
<span class="spacer"></span>
</mat-toolbar-row>
</mat-toolbar>

<router-outlet></router-outlet>
</div>
</mat-drawer-container>
12 changes: 11 additions & 1 deletion ampath-simple-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import {MatToolbarModule} from '@angular/material/toolbar';
import {MatButtonModule} from '@angular/material/button';
import {MatIconModule} from '@angular/material/icon';
import {MatSidenavModule} from '@angular/material/sidenav';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

import { AppRoutingModule } from './app-routing.module';

import { AppComponent } from './app.component';

@NgModule({
Expand All @@ -12,8 +17,13 @@ import { AppComponent } from './app.component';
],
imports: [
BrowserModule,
AppRoutingModule,
MatToolbarModule,
BrowserAnimationsModule
BrowserAnimationsModule,
MatButtonModule,
MatIconModule,
MatSidenavModule,
MatToolbarModule

],
providers: [],
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
clinic-flow works!
</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { ClinicFlowComponent } from './clinic-flow.component';

describe('ClinicFlowComponent', () => {
let component: ClinicFlowComponent;
let fixture: ComponentFixture<ClinicFlowComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ClinicFlowComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ClinicFlowComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-clinic-flow',
templateUrl: './clinic-flow.component.html',
styleUrls: ['./clinic-flow.component.css']
})
export class ClinicFlowComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ClinicFlowComponent } from './clinic-flow/clinic-flow.component';

const routes: Routes = [
{
path:'',
component: ClinicFlowComponent
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class HivCareLibRoutingModule { }
14 changes: 14 additions & 0 deletions ampath-simple-app/src/app/hiv-care-lib/hiv-care-lib.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { HivCareLibRoutingModule } from './hiv-care-lib-routing.module';
import { ClinicFlowComponent } from './clinic-flow/clinic-flow.component';

@NgModule({
declarations: [ClinicFlowComponent],
imports: [
CommonModule,
HivCareLibRoutingModule
]
})
export class HivCareLibModule { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PatientSearchComponent } from './patient-search.component';

const routes: Routes = [
{
path:'',
component: PatientSearchComponent
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class PatientSearchRoutingModule { }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
patient-search works!
</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { PatientSearchComponent } from './patient-search.component';

describe('PatientSearchComponent', () => {
let component: PatientSearchComponent;
let fixture: ComponentFixture<PatientSearchComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PatientSearchComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(PatientSearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-patient-search',
templateUrl: './patient-search.component.html',
styleUrls: ['./patient-search.component.css']
})
export class PatientSearchComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
14 changes: 14 additions & 0 deletions ampath-simple-app/src/app/patient-search/patient-search.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { PatientSearchRoutingModule } from './patient-search-routing.module';
import { PatientSearchComponent } from './patient-search.component';

@NgModule({
declarations: [PatientSearchComponent],
imports: [
CommonModule,
PatientSearchRoutingModule
]
})
export class PatientSearchModule { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PatientsProgramEnrollmentComponent } from './patients-program-enrollment.component';

const routes: Routes = [
{
path:'',
component: PatientsProgramEnrollmentComponent
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class PatientsProgramEnrollmentRoutingModule { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
patients-program-enrollment works!
</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { PatientsProgramEnrollmentComponent } from './patients-program-enrollment.component';

describe('PatientsProgramEnrollmentComponent', () => {
let component: PatientsProgramEnrollmentComponent;
let fixture: ComponentFixture<PatientsProgramEnrollmentComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PatientsProgramEnrollmentComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(PatientsProgramEnrollmentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-patients-program-enrollment',
templateUrl: './patients-program-enrollment.component.html',
styleUrls: ['./patients-program-enrollment.component.css']
})
export class PatientsProgramEnrollmentComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { PatientsProgramEnrollmentRoutingModule } from './patients-program-enrollment-routing.module';
import { PatientsProgramEnrollmentComponent } from './patients-program-enrollment.component';

@NgModule({
declarations: [PatientsProgramEnrollmentComponent],
imports: [
CommonModule,
PatientsProgramEnrollmentRoutingModule
]
})
export class PatientsProgramEnrollmentModule { }
Empty file.
11 changes: 10 additions & 1 deletion ampath-simple-app/src/styles.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
/* You can add global styles to this file, and also import other style files */
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
@import '~@angular/material/prebuilt-themes/pink-bluegrey.css';


body {
font-family: Roboto, Arial, sans-serif;
}

p {
text-align: center;
}

0 comments on commit 692ff9d

Please sign in to comment.