2026-07-17 12:01:56 -03:00
|
|
|
import type { WorkOrderTableRow } from "@/domain/work-orders/types/work-order-table-row";
|
|
|
|
|
|
|
|
|
|
const SERVICE_PHRASE: Record<string, string> = {
|
|
|
|
|
"Scrubber Pit": "Scrubber Pit Augering",
|
|
|
|
|
"Backflow Preventers": "Backflow Preventer Testing",
|
|
|
|
|
"Domestic Backflow": "Domestic Backflow Testing",
|
|
|
|
|
"Tank / Water Heater": "Tank / Water Heater Inspection",
|
|
|
|
|
"Pressure Reducing Valve": "Pressure Reducing Valve Service",
|
|
|
|
|
"Pumping Systems": "Pumping System Maintenance",
|
|
|
|
|
"HVAC Inspection": "HVAC Inspection",
|
|
|
|
|
Electrical: "Electrical Inspection",
|
|
|
|
|
Plumbing: "Plumbing Service",
|
|
|
|
|
"Door / Hardware": "Door / Hardware Service",
|
|
|
|
|
"Floor Drain Backing Up": "Floor Drain Augering",
|
|
|
|
|
"Parking Lot Lighting": "Parking Lot Lighting Service",
|
|
|
|
|
"Mens Restroom Camera Line": "Restroom Camera Line Service",
|
|
|
|
|
"Assess Window Leaks": "Window Leak Assessment",
|
|
|
|
|
};
|
|
|
|
|
|
2026-07-30 09:04:03 -03:00
|
|
|
/**
|
|
|
|
|
* Title derived only from the selected service (`pm`).
|
|
|
|
|
* Never fabricates maintenance-cycle metadata from the work-order number.
|
|
|
|
|
*/
|
|
|
|
|
export function serviceTitle(row: Pick<WorkOrderTableRow, "pm">): string {
|
|
|
|
|
const service = row.pm.trim();
|
|
|
|
|
const phrase = SERVICE_PHRASE[service] ?? service;
|
|
|
|
|
return `Amer-Building ${phrase}`;
|
2026-07-17 12:01:56 -03:00
|
|
|
}
|