feat: prikaži ime tvrtke uz ime dizalice u stupcu DIZALICA

Uz naziv dizalice (make model) u zagradi prikazuje ime klijenta/tvrtke
za svaki redak (sharedCranes i fallback slučaj).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
mariomitte
2026-08-01 08:52:30 +02:00
parent a8f441c150
commit 52f54e3a75

View File

@@ -992,18 +992,31 @@ export default function FleetDashboardShell({ initialSection = 'dashboard', page
if (sharedCranes && sharedCranes.size > 0) { if (sharedCranes && sharedCranes.size > 0) {
return ( return (
<div className="flex flex-col gap-0.5"> <div className="flex flex-col gap-0.5">
{[...sharedCranes.values()].map((c) => ( {[...sharedCranes.values()].map((c) => {
<span key={c.id}> const craneName = [c.make, c.model].filter(Boolean).join(' ') || c.registration_number || `#${c.id}`;
{[c.make, c.model].filter(Boolean).join(' ') || c.registration_number || `#${c.id}`} return (
</span> <span key={c.id}>
))} {craneName}
{c.client_name && (
<span className="text-text-muted text-xs ml-1">({c.client_name})</span>
)}
</span>
);
})}
</div> </div>
); );
} }
return [workOrder.craneInfo?.make, workOrder.craneInfo?.model].filter(Boolean).join(' ') return (
|| workOrder.craneLabel <span>
|| workOrder.craneInfo?.registration_number {[workOrder.craneInfo?.make, workOrder.craneInfo?.model].filter(Boolean).join(' ')
|| `#${workOrder.crane || workOrder.vehicle}`; || workOrder.craneLabel
|| workOrder.craneInfo?.registration_number
|| `#${workOrder.crane || workOrder.vehicle}`}
{workOrder.craneInfo?.client_name && (
<span className="text-text-muted text-xs ml-1">({workOrder.craneInfo.client_name})</span>
)}
</span>
);
})()} })()}
</td> </td>
<td className="px-4 py-3 font-mono text-xs text-text-muted"> <td className="px-4 py-3 font-mono text-xs text-text-muted">