Merge pull request #2231 from phl0/fixEmptyQo100DxClubUpload

Add error message for no outstanding QO-100 QSOs
这个提交包含在:
Andreas Kristiansen 2023-06-30 07:56:42 +02:00 提交者 GitHub
当前提交 d259ebae36
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 2 个文件被更改,包括 24 次插入9 次删除

查看文件

@ -372,14 +372,14 @@ class Stations extends CI_Model {
$sql="
SELECT station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, notc.c notcount, totc.c totcount
FROM station_profile
INNER JOIN (
LEFT OUTER JOIN (
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
FROM %s qsos
LEFT JOIN webadif ON qsos.COL_PRIMARY_KEY = webadif.qso_id
WHERE webadif.qso_id IS NULL AND qsos.COL_SAT_NAME = 'QO-100'
GROUP BY qsos.station_id
) notc ON station_profile.station_id = notc.station_id
INNER JOIN (
LEFT JOIN (
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
FROM %s qsos
WHERE qsos.COL_SAT_NAME = 'QO-100'

查看文件

@ -24,6 +24,11 @@
<?php
if ($station_profile->result()) {
$queuedqsos = 0;
foreach ($station_profile->result() as $count) { // Fills the table with the data
$queuedqsos += $count->notcount;
}
if ($queuedqsos > 0) {
?>
<p>You need to set a QO-100 Dx Club API key in your station profile. Only station profiles with an API Key are displayed.</p>
<p><span class="badge badge-warning">Warning</span> This might take a while as QSO uploads are processed sequentially.</p>
@ -41,6 +46,7 @@
</thead>
<tbody>';
foreach ($station_profile->result() as $station) { // Fills the table with the data
if ($station->notcount != null) {
echo '<tr>';
echo '<td>' . $station->station_profile_name . '</td>';
echo '<td>' . $station->station_callsign . '</td>';
@ -49,7 +55,16 @@
echo '<td><button id="webadifUpload" type="button" name="webadifUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportWebADIF('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
echo '</tr>';
}
}
echo '</tfoot></table>';
} else {
?>
<div class="alert alert-success">
There are currently no outstanding QSOs that need to be uploaded to the QO-100 Dx Club's API.<br />
Go ahead and turn on your QO-100 station!
</div>
<?php
}
}
else {