diff --git a/src/fragments/html-marker/HtmlMarker.vue b/src/fragments/html-marker/HtmlMarker.vue index 9bbf80eb8..eca37888b 100644 --- a/src/fragments/html-marker/HtmlMarker.vue +++ b/src/fragments/html-marker/HtmlMarker.vue @@ -2,7 +2,7 @@
Map marker icon -
{{markerNumber}}
+
{{markerNumber}}
diff --git a/src/fragments/html-marker/html-marker.css b/src/fragments/html-marker/html-marker.css index 52eb1a34a..f17db0172 100644 --- a/src/fragments/html-marker/html-marker.css +++ b/src/fragments/html-marker/html-marker.css @@ -23,8 +23,7 @@ margin-left: 7px; margin-top: 7px; height: 21px; - font-weight: 600; - color:white + font-weight: 600 } .custom-html-icon-txt.double-digit-text { diff --git a/src/fragments/html-marker/html-marker.js b/src/fragments/html-marker/html-marker.js index 65861c5a4..df1f9817b 100644 --- a/src/fragments/html-marker/html-marker.js +++ b/src/fragments/html-marker/html-marker.js @@ -4,6 +4,10 @@ export default { Type: String, default: 'white' }, + textColor: { + Type: String, + default: 'white' + }, markerImg: { type: String, required: false diff --git a/src/fragments/map-view/map-view.js b/src/fragments/map-view/map-view.js index 05865470c..94948108b 100644 --- a/src/fragments/map-view/map-view.js +++ b/src/fragments/map-view/map-view.js @@ -399,7 +399,7 @@ export default { markers = this.$root.appHooks.run('markersCreated', markers) return markers } else if (markersMapViewData.jobs.length || markersMapViewData.vehicles.length) { - return GeoUtils.buildOptimizationMarkers(markersMapViewData.jobs, markersMapViewData.vehicles) + return GeoUtils.buildOptimizationMarkers(markersMapViewData.jobs, markersMapViewData.vehicles, this.localMapViewData.rawData.unassigned) } }, /** diff --git a/src/support/geo-utils.js b/src/support/geo-utils.js index 0656d93bf..006504653 100644 --- a/src/support/geo-utils.js +++ b/src/support/geo-utils.js @@ -606,13 +606,18 @@ const geoUtils = { } return lng }, - buildOptimizationMarkers(jobs, vehicles) { - const markers = [] + buildOptimizationMarkers(jobs, vehicles, unassignedJobs) { + let markers = [] + let unassignedJobIds = [] + for (const uaj of unassignedJobs) { + unassignedJobIds.push(uaj.id) + } for (const job of jobs) { if (job.lng && job.lat) { // Build the marker let propsData = { - color: theme.dark, + color: unassignedJobIds.includes(job.id) ? theme.neutral : theme.dark, + textColor: unassignedJobIds.includes(job.id) ? 'black' : 'white', markerNumber: job.id.toString() } const htmlMarkerClass = Vue.extend(HtmlMarker)