diff --git a/src/app/dashboard/dashboard.module.ts b/src/app/dashboard/dashboard.module.ts index 134d8bd..f584ef4 100644 --- a/src/app/dashboard/dashboard.module.ts +++ b/src/app/dashboard/dashboard.module.ts @@ -4,6 +4,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { ChartsModule } from 'ng2-charts/ng2-charts'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { NgxPaginationModule } from 'ngx-pagination'; +import { AgmCoreModule } from '@agm/core'; import { CurrencyPipe } from '@angular/common'; @@ -14,6 +15,7 @@ import { AddDataComponent } from './add-data.component'; import { FeedbackComponent } from './feedback.component'; import { TransactionLogComponent } from './transaction-log.component'; import { PayrollLogComponent } from './payroll-log.component'; +import { MapComponent } from './map.component'; import { GraphWidget } from '../widgets/graph-widget.component'; import { OrgBarSnippetComponent } from '../snippets/org-snippet-bar.component'; @@ -25,6 +27,9 @@ import { OrgTableComponent } from '../shared/org-table.component'; import { TransactionResultComponent } from '../shared/transaction-result.component'; import { PayrollResultComponent } from '../shared/payroll-result.component'; +// API key env variable import +import { environment } from '../../environments/environment'; + @NgModule({ imports: [ // Angular imports @@ -32,6 +37,9 @@ import { PayrollResultComponent } from '../shared/payroll-result.component'; FormsModule, ReactiveFormsModule, ChartsModule, + AgmCoreModule.forRoot({ + apiKey: environment.mapApiKey + }), BsDropdownModule, NgxPaginationModule, DashboardRoutingModule, @@ -47,6 +55,7 @@ import { PayrollResultComponent } from '../shared/payroll-result.component'; TransactionResultComponent, PayrollLogComponent, PayrollResultComponent, + MapComponent, FeedbackComponent, GraphWidget, OrgBarSnippetComponent, diff --git a/src/app/dashboard/dashboard.routing.ts b/src/app/dashboard/dashboard.routing.ts index c36cfb2..f28c65e 100644 --- a/src/app/dashboard/dashboard.routing.ts +++ b/src/app/dashboard/dashboard.routing.ts @@ -13,6 +13,7 @@ import { AddDataComponent } from './add-data.component'; import { FeedbackComponent } from './feedback.component'; import { TransactionLogComponent } from './transaction-log.component'; import { PayrollLogComponent } from './payroll-log.component'; +import { MapComponent } from './map.component'; // Using child path to allow for FullLayout theming const routes: Routes = [ @@ -49,6 +50,12 @@ const routes: Routes = [ component: TransactionLogComponent, data: { title: 'Transaction Log' }, }, + { + path: 'map', + component: MapComponent, + data: { title: 'Supplier Map' }, + canActivate: [OrgGuard], + }, { path: 'payroll-log', component: PayrollLogComponent, diff --git a/src/app/dashboard/map.component.html b/src/app/dashboard/map.component.html new file mode 100644 index 0000000..27ce4c7 --- /dev/null +++ b/src/app/dashboard/map.component.html @@ -0,0 +1,19 @@ +
+
+
+
+
+ Supplier Map + Required Data marked in bold. +
+
+ + + + + +
+
+
+
+
diff --git a/src/app/dashboard/map.component.ts b/src/app/dashboard/map.component.ts new file mode 100644 index 0000000..233ad94 --- /dev/null +++ b/src/app/dashboard/map.component.ts @@ -0,0 +1,24 @@ +import { Component, OnInit } from '@angular/core'; +import { Http, Response } from '@angular/http'; +import { ApiService } from '../providers/api-service'; +import { AgmCoreModule } from '@agm/core'; +import 'rxjs/add/operator/map'; + +@Component({ + templateUrl: 'map.component.html', +}) +export class MapComponent implements OnInit { + + lat: number = 54.0466; + lng: number = 2.8007; + + constructor( + private http: Http, + private api: ApiService, + ) { } + + ngOnInit(): void { + + } + +} diff --git a/src/app/layouts/full-layout.component.html b/src/app/layouts/full-layout.component.html index 17f0b57..f92357c 100644 --- a/src/app/layouts/full-layout.component.html +++ b/src/app/layouts/full-layout.component.html @@ -40,6 +40,11 @@ Enter Feedback +