Add hover tooltips on job list rows showing description and PO number

Adds CustomerPO to JobListDto (maps by convention), then builds a
Bootstrap tooltip per row with description · PO: xxx, skipping blank
fields. Rows with neither get no tooltip. Helps identify jobs at a
glance without opening the details page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 18:53:52 -04:00
parent d9e98a55d2
commit f453a95f28
2 changed files with 13 additions and 1 deletions
@@ -113,6 +113,7 @@ public class JobListDto
public string? CustomerEmail { get; set; }
public bool CustomerNotifyByEmail { get; set; } = true;
public string? CustomerPO { get; set; }
public DateTime? ScheduledDate { get; set; }
public DateTime? DueDate { get; set; }
public decimal FinalPrice { get; set; }
+12 -1
View File
@@ -191,7 +191,14 @@
var isHot = job.DueDate.HasValue && job.DueDate.Value < DateTime.Now
&& job.StatusCode != "COMPLETED" && job.StatusCode != "READYFORPICKUP"
&& job.StatusCode != "DELIVERED" && job.StatusCode != "CANCELLED";
<tr class="job-row" data-job-id="@job.Id" style="cursor: pointer;">
var tipParts = new List<string>();
if (!string.IsNullOrWhiteSpace(job.Description)) tipParts.Add(job.Description);
if (!string.IsNullOrWhiteSpace(job.CustomerPO)) tipParts.Add("PO: " + job.CustomerPO);
var tipText = string.Join(" · ", tipParts);
<tr class="job-row" data-job-id="@job.Id" style="cursor: pointer;"
@if (!string.IsNullOrEmpty(tipText)) {
<text>data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="@Html.Encode(tipText)"</text>
}>
<td class="ps-4 @(isHot ? "job-hot-cell" : "")">
<div>
<div class="mono fw-500">
@@ -629,6 +636,10 @@
loadJobStatuses();
loadJobPriorities();
// Row tooltips (description + PO)
document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(el =>
new bootstrap.Tooltip(el, { trigger: 'hover' }));
// / key focuses search input
document.addEventListener('keydown', function(e) {
if (e.key === '/' && document.activeElement.tagName !== 'INPUT' && document.activeElement.tagName !== 'TEXTAREA') {