Skip to content

Commit

Permalink
fix: add strong to tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelzinh3 committed Oct 11, 2023
1 parent d3bc1d0 commit 4bb8361
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions app/contrib/frontend/maps/static/maps/js/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ if (mapWrapper) {
endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]], {icon: endIcon});
}

let ifObsProperty = !!properties?.observacoes ? `<span>Obs: ${properties.observacoes}</span><br>` : "";
let ifObsProperty = !!properties?.observacoes ? `<span><strong>Obs:</strong> ${properties.observacoes}</span><br>` : "";

[startPoint, endPoint].forEach(marker => {
marker.bindPopup(
`<span>Número: ${properties.ln_codigo}</span><br>` +
`<span>Nome: ${properties.title}</span><br>` +
`<span>Empresa responsável: ${properties.ln_empresa}</span><br>` +
`<span>Viagens em 2019: ${properties.viagens_em_2019}</span><br>` +
`<span>Viagens em 2023: ${properties.viagens_em_2023}</span><br>` +
`<span>Variação da linha: ${properties.reducao_linha}%</span><br>` +
`<span><strong>Número:</strong> ${properties.ln_codigo}</span><br>` +
`<span><strong>Nome:</strong> ${properties.title}</span><br>` +
`<span><strong>Empresa responsável:</strong> ${properties.ln_empresa}</span><br>` +
`<span><strong>Viagens em 2019:</strong> ${properties.viagens_em_2019}</span><br>` +
`<span><strong>Viagens em 2023:</strong> ${properties.viagens_em_2023}</span><br>` +
`<span><strong>Variação da linha:</strong> ${properties.reducao_linha}%</span><br>` +
ifObsProperty
).addTo(map);
});
Expand All @@ -110,12 +110,12 @@ if (mapWrapper) {
},
onEachFeature: function (feature, layer) {
layer.bindPopup(
`<span>Número: ${properties.ln_codigo}</span><br>` +
`<span>Nome: ${properties.title}</span><br>` +
`<span>Empresa responsável: ${properties.ln_empresa}</span><br>` +
`<span>Viagens em 2019: ${properties.viagens_em_2019}</span><br>` +
`<span>Viagens em 2023: ${properties.viagens_em_2023}</span><br>` +
`<span>Variação da linha: ${properties.reducao_linha}%</span><br>` +
`<span><strong>Número:</strong> ${properties.ln_codigo}</span><br>` +
`<span><strong>Nome:</strong> ${properties.title}</span><br>` +
`<span><strong>Empresa responsável:</strong> ${properties.ln_empresa}</span><br>` +
`<span><strong>Viagens em 2019:</strong> ${properties.viagens_em_2019}</span><br>` +
`<span><strong>Viagens em 2023:</strong> ${properties.viagens_em_2023}</span><br>` +
`<span><strong>Variação da linha:</strong> ${properties.reducao_linha}%</span><br>` +
ifObsProperty
);
},
Expand Down

0 comments on commit 4bb8361

Please sign in to comment.