Minor cleanup #424

This commit is contained in:
Kendrick Chan 2020-07-16 15:00:50 +08:00
parent 9e649c9d70
commit 4b22344e72

View file

@ -129,7 +129,6 @@ class MapEventHandler {
var lat = parseFloat(pl_split[0]); var lat = parseFloat(pl_split[0]);
var lng = parseFloat(pl_split[1]); var lng = parseFloat(pl_split[1]);
console.log(this.dashmap.rider_availability);
var display_marker = true; var display_marker = true;
if (this.dashmap.rider_availability.hasOwnProperty(chan_split[1])) { if (this.dashmap.rider_availability.hasOwnProperty(chan_split[1])) {
if (!this.dashmap.rider_availability[chan_split[1]]) { if (!this.dashmap.rider_availability[chan_split[1]]) {
@ -140,8 +139,8 @@ class MapEventHandler {
console.log('rider not in availability check'); console.log('rider not in availability check');
} }
// TODO: cache rider availability status and check before displaying icon // TODO: cache rider availability (available vs active jo) status and check before displaying icon
// NOTE: code is already above, need to make it into a function and call it here // NOTE: we really should fix our terms since available can mean many things
if (display_marker) { if (display_marker) {
this.dashmap.putRiderAvailableMarker(chan_split[1], lat, lng); this.dashmap.putRiderAvailableMarker(chan_split[1], lat, lng);
} }