From f546bfb153fb7573d94e05f2720d2a2d5f4196d3 Mon Sep 17 00:00:00 2001 From: Eddasol Date: Thu, 22 Feb 2024 10:44:09 +0100 Subject: [PATCH] Draw map marker for tasks without inspections --- frontend/src/utils/MapMarkers.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/utils/MapMarkers.tsx b/frontend/src/utils/MapMarkers.tsx index cdbe25add..8f38f3b0a 100644 --- a/frontend/src/utils/MapMarkers.tsx +++ b/frontend/src/utils/MapMarkers.tsx @@ -18,7 +18,14 @@ export const placeTagsInMap = ( const maxTaskOrder: number = Math.max(...tasks.map((task) => task.taskOrder)) const orderedTasks = orderTasksByDrawOrder(tasks, currentTaskOrder, maxTaskOrder) + orderedTasks.forEach((task) => { + if (task.inspections.length === 0) { + const pixelPosition = calculateObjectPixelPosition(mapMetadata, task.robotPose.position) + // Workaround for current bug in echo + const order = task.taskOrder < 214748364 ? task.taskOrder + 1 : 1 + drawTagMarker(pixelPosition[0], pixelPosition[1], map, order, 30, task.status) + } task.inspections.forEach((inspection) => { const pixelPosition = calculateObjectPixelPosition(mapMetadata, inspection.inspectionTarget) // Workaround for current bug in echo