Lines colors ok, tooltip ok, update ok

This commit is contained in:
ISA
2024-06-26 15:26:45 +02:00
parent ff6620f98c
commit c78ee22f16

View File

@@ -2179,23 +2179,34 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
if (matchingLine) {
colorsByModule[matchingLine.idModul] = stat.PrioColor;
newTooltipContents[matchingLine.idModul] = `
<div class="bg-white rounded-lg m-0 p-2">
<span class="text-lg font-semibold text-gray-900">${stat.ModulName || "Unknown"}</span><br>
<span class="text-md font-bold text-gray-800">
<span class="font-bold">ModulName :</span> ${stat.ModulTyp || "N/A"}
</span><br>
<span class="text-gray-800">
<span class="font-bold">
<span class="inline-block w-2 h-2 rounded-full mr-2" style="background-color: ${stat.PrioColor || "#000000"};"></span>
${stat.Message || "N/A"}
</span>
</span>
<span class="text-gray-800">
<span style="color: ${stat.PrioColor || "#000000"};">(${stat.PrioName || "N/A"})</span>
</span><br>
</div>
<div class="bg-white rounded-lg m-0 p-2 w-[210px]">
<span class="text-lg font-semibold text-gray-900">${stat.ModulName || "Unknown"}</span>
<br>
<span class="text-md font-bold text-gray-800">${stat.ModulTyp || "N/A"}</span>
<br>
<div style="max-width: 100%; overflow-wrap: break-word; word-break: break-word; white-space: normal;">
<span class="inline-block w-2 h-2 rounded-full mr-2" style="background-color: ${stat.PrioColor || "#000000"};"></span>
<span class="inline-block text-gray-800">${stat.Message || "N/A"}</span>
</div>
<span class="text-gray-800" style="color: ${stat.PrioColor || "#000000"};">(${stat.PrioName || "N/A"})</span>
<br>
</div>
`;
/* newTooltipContents[matchingLine.idModul] = `
<div class="bg-white rounded-lg m-0 p-2 w-[210px] flex flex-col items-center text-center">
<span class="text-lg font-semibold text-gray-900">${stat.ModulName || "Unknown"}</span>
<br>
<span class="text-md font-bold text-gray-800">${stat.ModulTyp || "N/A"}</span>
<br>
<div class="w-full" style="overflow-wrap: break-word; word-break: break-word; white-space: normal;">
<span class="inline-block w-2 h-2 rounded-full mr-2" style="background-color: ${stat.PrioColor || "#000000"};"></span>
<span class="inline-block text-gray-800">${stat.Message || "N/A"}</span>
</div>
<span class="text-gray-800" style="color: ${stat.PrioColor || "#000000"};">(${stat.PrioName || "N/A"})</span>
<br>
</div>
`; */
}
});