Fix multi callsign alerts from NG3K #38

This commit is contained in:
Ian Renton
2025-10-11 20:21:52 +01:00
parent cc816d8662
commit 3ed9b95b9b
2 changed files with 12 additions and 8 deletions

View File

@@ -144,6 +144,12 @@ function addAlertRowsToTable(tbody, alerts) {
dx_country = "Unknown or not a country"
}
// Format dx calls
var dx_calls_html = "";
if (a["dx_calls"] != null) {
dx_calls_html = a["dx_calls"].map(call => `<a class='dx-link' href='https://qrz.com/db/${call}' target='_new'>${call}</a>`).join(", ");
}
// Format freqs & modes
var freqsModesText = "";
if (a["freqs_modes"] != null) {
@@ -171,8 +177,7 @@ function addAlertRowsToTable(tbody, alerts) {
// Populate the row
$tr.append(`<td class='nowrap'>${start_time_formatted}</td>`);
$tr.append(`<td class='nowrap'>${end_time_formatted}</td>`);
// TODO take a["dx_calls"] and add a callsign to the following td for every one in the list.
$tr.append(`<td class='nowrap'><span class='flag-wrapper hideonmobile' title='${dx_country}'>${dx_flag}</span><a class='dx-link' href='https://qrz.com/db/${call}' target='_new'>${call}</a></td>`);
$tr.append(`<td class='nowrap'><span class='flag-wrapper hideonmobile' title='${dx_country}'>${dx_flag}</span>${dx_calls_html}</td>`);
$tr.append(`<td class='hideonmobile'>${freqsModesText}</td>`);
$tr.append(`<td class='hideonmobile'>${commentText}</td>`);
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid fa-${a["icon"]}'></i></span> ${sigSourceText}</td>`);