|
@@ -79,6 +79,11 @@ function initialiseLocations() {
|
|
|
|
|
|
|
|
locationLatLngBounds = new google.maps.LatLngBounds;
|
|
locationLatLngBounds = new google.maps.LatLngBounds;
|
|
|
|
|
|
|
|
|
|
+ var unassignedCount = "";
|
|
|
|
|
+ var assignedCount = "";
|
|
|
|
|
+ var pendingVerificationCount = "";
|
|
|
|
|
+ var completedCount = "";
|
|
|
|
|
+
|
|
|
for(let i in response.locations) {
|
|
for(let i in response.locations) {
|
|
|
let location = response.locations[i];
|
|
let location = response.locations[i];
|
|
|
|
|
|
|
@@ -92,10 +97,22 @@ function initialiseLocations() {
|
|
|
let cssClass = location.class;
|
|
let cssClass = location.class;
|
|
|
|
|
|
|
|
let icon = "/img/markers/building-grey.png";
|
|
let icon = "/img/markers/building-grey.png";
|
|
|
- if(cssClass == "danger") icon = "/img/markers/building-red.png";
|
|
|
|
|
- else if(cssClass == "primary") icon = "/img/markers/building-blue.png";
|
|
|
|
|
- else if(cssClass == "success") icon = "/img/markers/building-green.png";
|
|
|
|
|
- else icon = "/img/markers/building-orange.png";
|
|
|
|
|
|
|
+ if(cssClass == "danger") {
|
|
|
|
|
+ icon = "/img/markers/building-red.png";
|
|
|
|
|
+ unassignedCount++;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(cssClass == "primary") {
|
|
|
|
|
+ icon = "/img/markers/building-blue.png";
|
|
|
|
|
+ assignedCount++;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(cssClass == "success") {
|
|
|
|
|
+ icon = "/img/markers/building-green.png";
|
|
|
|
|
+ completedCount++;
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ icon = "/img/markers/building-orange.png";
|
|
|
|
|
+ assignedCount++;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
let options = {};
|
|
let options = {};
|
|
|
options.position = position;
|
|
options.position = position;
|
|
@@ -157,6 +174,12 @@ function initialiseLocations() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
map.fitBounds(locationLatLngBounds);
|
|
map.fitBounds(locationLatLngBounds);
|
|
|
|
|
+
|
|
|
|
|
+ $("#unassigned-count").text(unassignedCount);
|
|
|
|
|
+ $("#assigned-count").text(assignedCount);
|
|
|
|
|
+ $("#pending-verification-count").text(pendingVerificationCount);
|
|
|
|
|
+ $("#completed-count").text(completedCount);
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|