diff --git a/fusion-plating/fusion_tasks/static/src/js/fusion_task_map_view.js b/fusion-plating/fusion_tasks/static/src/js/fusion_task_map_view.js index 38bec401..a86e711e 100644 --- a/fusion-plating/fusion_tasks/static/src/js/fusion_task_map_view.js +++ b/fusion-plating/fusion_tasks/static/src/js/fusion_task_map_view.js @@ -232,15 +232,14 @@ function groupTasks(tasksData, localInstanceId, visibleTechIds) { task._statusColor = STATUS_COLORS[task.status] || "#6b7280"; task._statusLabel = STATUS_LABELS[task.status] || task.status || ""; task._statusIcon = STATUS_ICONS[task.status] || "fa-circle"; - task._clientName = task.x_fc_sync_client_name || (task.partner_id ? task.partner_id[1] : "N/A"); + task._clientName = task.partner_id ? task.partner_id[1] : "N/A"; task._techName = task.technician_id ? task.technician_id[1] : "Unassigned"; task._typeLbl = task.task_type ? task.task_type.charAt(0).toUpperCase() + task.task_type.slice(1).replace("_", " ") : "Task"; task._timeRange = `${task.time_start_display || floatToTime12(task.time_start)} - ${task.time_end_display || ""}`; - const src = task.x_fc_sync_source || localInstanceId || ""; - task._sourceLabel = src ? src.charAt(0).toUpperCase() + src.slice(1) : ""; - task._sourceColor = SOURCE_COLORS[src] || "#6c757d"; + task._sourceLabel = ""; + task._sourceColor = "#6c757d"; task._dateLabel = task.scheduled_date ? new Date(task.scheduled_date + "T12:00:00").toLocaleDateString(undefined, { weekday: 'short', month: 'short', day: 'numeric' }) : "No date"; diff --git a/fusion-plating/fusion_tasks/views/technician_task_views.xml b/fusion-plating/fusion_tasks/views/technician_task_views.xml index 0406458a..7a67aa52 100644 --- a/fusion-plating/fusion_tasks/views/technician_task_views.xml +++ b/fusion-plating/fusion_tasks/views/technician_task_views.xml @@ -63,14 +63,9 @@ - + - - - @@ -89,44 +84,32 @@ fusion.technician.task - - + class="btn-primary" invisible="status != 'scheduled'"/> + class="btn-primary" invisible="status not in ('scheduled', 'en_route')"/> + class="btn-success" invisible="status not in ('in_progress', 'en_route')"/> + class="btn-warning" invisible="status not in ('scheduled', 'en_route')"/> + invisible="status not in ('cancelled', 'rescheduled')"/> + class="btn-secondary o_fc_calculate_travel" icon="fa-car"/> - - - This task is synced from - - — view only. - - @@ -260,9 +243,6 @@ decoration-danger="status == 'cancelled'"/> - @@ -288,8 +268,6 @@ - - @@ -308,12 +286,7 @@ - - - - - - + @@ -354,7 +327,6 @@ quick_create="0"> -