commit
81f934a441
13 changed files with 61 additions and 21 deletions
|
@ -2,6 +2,12 @@
|
|||
|
||||
# Next Release
|
||||
|
||||
# v0.0.7
|
||||
|
||||
* Added ESTA to Story Trail
|
||||
* Reverted Story Trail naming to LIS
|
||||
* Changed Trail map code to make it flexible based on association
|
||||
|
||||
# v0.0.6
|
||||
|
||||
* Fix typo in Map Titles
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "localloop-web",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "localloop-web",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"description": "LocalLoop Web - Web interface for LocalLoop app",
|
||||
"author": "",
|
||||
"url": "http://www.peartrade.org",
|
||||
|
|
|
@ -66,7 +66,7 @@ const routes: Routes = [
|
|||
{
|
||||
path: 'story-trail',
|
||||
component: TrailMapComponent,
|
||||
data: { title: 'Lancaster Independent Story' },
|
||||
data: { title: 'Story Trail' },
|
||||
},
|
||||
{
|
||||
path: 'payroll-log',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>Purchase Map</strong>
|
||||
<small>Required Data marked in <strong>bold</strong>.</small>
|
||||
<small>Click a marker to get location details.</small>
|
||||
</div>
|
||||
<div class="modal fade" bsModal #statusModal="bs-modal" [config]="{backdrop: false, animated: false}"
|
||||
tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong>Lancaster Independent Story</strong>
|
||||
<small>Required Data marked in <strong>bold</strong>.</small>
|
||||
<strong>Story Trail</strong>
|
||||
<small>Click a marker to get location details.</small>
|
||||
<select type="text" [(ngModel)]="assocMap" (ngModelChange)="viewBoundsChanged()">
|
||||
<option value="lis" selected>Lancaster Independent Story</option>
|
||||
<option value="esta">ESTA</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="modal fade" bsModal #statusModal="bs-modal" [config]="{backdrop: false, animated: false}"
|
||||
tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
|
@ -45,7 +49,7 @@
|
|||
<agm-marker-cluster maxZoom="13" imagePath="https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m">
|
||||
<agm-marker
|
||||
*ngFor="let m of markers"
|
||||
[iconUrl]="'/assets/img/map-pin-lis.png'"
|
||||
[iconUrl]="'/assets/img/association/' + assocMap + '-map-pin.png'"
|
||||
[latitude]="m.latitude"
|
||||
[longitude]="m.longitude"
|
||||
[openInfoWindow]="false"
|
||||
|
@ -55,7 +59,7 @@
|
|||
</agm-map>
|
||||
<ng-template #template>
|
||||
<div class="modal-header d-flex justify-content-between">
|
||||
<img src="assets/img/lis_logo.png" class="w-15" alt="lis logo"><h4 class="modal-title">{{clickedMarker.name}}</h4>
|
||||
<img src="{{assocLogo}}" class="w-15" alt="lis logo"><h4 class="modal-title">{{clickedMarker.name}}</h4>
|
||||
<button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
|
@ -15,6 +15,8 @@ export class TrailMapComponent implements OnInit, AfterViewInit {
|
|||
zoom: number = 12;
|
||||
public modalRef: BsModalRef;
|
||||
clickedMarker: any;
|
||||
assocMap = 'lis';
|
||||
assocLogo: string;
|
||||
|
||||
dataReceived: string = 'loading';
|
||||
|
||||
|
@ -25,7 +27,9 @@ export class TrailMapComponent implements OnInit, AfterViewInit {
|
|||
constructor(
|
||||
private api: ApiService,
|
||||
private modalService: BsModalService,
|
||||
) {}
|
||||
) {
|
||||
this.assocLogo = 'assets/img/association/' + this.assocMap + '-logo.png';
|
||||
}
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
|
@ -44,6 +48,7 @@ export class TrailMapComponent implements OnInit, AfterViewInit {
|
|||
public onMarkerClick(clickedMarker, template: TemplateRef<any>) {
|
||||
console.log(clickedMarker);
|
||||
this.clickedMarker = clickedMarker;
|
||||
this.assocLogo = 'assets/img/association/' + this.assocMap + '-logo.png';
|
||||
this.openModal(template);
|
||||
}
|
||||
|
||||
|
@ -64,8 +69,9 @@ export class TrailMapComponent implements OnInit, AfterViewInit {
|
|||
latitude: resp.getSouthWest().lat(),
|
||||
longitude: resp.getSouthWest().lng()
|
||||
},
|
||||
association: this.assocMap,
|
||||
}
|
||||
this.api.getLisData(mapData).subscribe(
|
||||
this.api.getAssocData(mapData).subscribe(
|
||||
result => {
|
||||
this.myStatusModal.hide();
|
||||
this.markers = result.locations;
|
||||
|
|
|
@ -27,42 +27,66 @@
|
|||
<ul class="nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/dashboard']">
|
||||
<i class="icon-speedometer"></i> Dashboard
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-speedometer"></i></div>
|
||||
<div class="col-10">Dashboard</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/add-data']">
|
||||
<i class="icon-basket"></i> Add Transaction
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-basket"></i></div>
|
||||
<div class="col-10">Add Transaction</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/feedback']">
|
||||
<i class="icon-envelope-letter"></i> Enter Feedback
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-envelope-letter"></i></div>
|
||||
<div class="col-10">Enter Feedback</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/map']">
|
||||
<i class="icon-map"></i> Purchase Map
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-map"></i></div>
|
||||
<div class="col-10">Purchase Map</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/story-trail']">
|
||||
<i class="icon-map"></i> Lancaster Independent Story
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-map"></i></div>
|
||||
<div class="col-10">Story Trail</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="accountType == 'customer'" class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/leaderboard']">
|
||||
<i class="icon-basket"></i> Leaderboard
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-basket"></i></div>
|
||||
<div class="col-10">Leaderboard</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/transaction-log']">
|
||||
<i class="icon-basket"></i> Transaction Log
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-basket"></i></div>
|
||||
<div class="col-10">Transaction Log</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="accountType == 'organisation'" class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/payroll-log']">
|
||||
<i class="icon-basket"></i> Payroll Log
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-basket"></i></div>
|
||||
<div class="col-10">Payroll Log</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -276,11 +276,11 @@ export class ApiService {
|
|||
);
|
||||
}
|
||||
|
||||
// Load LIS Data
|
||||
public getLisData(data) {
|
||||
// Load Association Data
|
||||
public getAssocData(data) {
|
||||
data.session_key = this.sessionKey;
|
||||
return this.http.post<any>(
|
||||
this.apiUrl + '/v1/supplier/location/lis',
|
||||
this.apiUrl + '/v1/supplier/location/trail',
|
||||
data
|
||||
);
|
||||
}
|
||||
|
|
BIN
src/assets/img/association/esta-logo.png
Normal file
BIN
src/assets/img/association/esta-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/association/esta-map-pin.png
Normal file
BIN
src/assets/img/association/esta-map-pin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Reference in a new issue