mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Add DXCC flags to LBA view
This commit is contained in:
@@ -151,12 +151,22 @@ class Logbookadvanced extends CI_Controller {
|
||||
|
||||
public function search() {
|
||||
$this->load->model('logbookadvanced_model');
|
||||
if(!$this->load->is_loaded('DxccFlag')) {
|
||||
$this->load->library('DxccFlag');
|
||||
}
|
||||
|
||||
$searchCriteria = $this->mapParameters();
|
||||
$qsos = [];
|
||||
|
||||
foreach ($this->logbookadvanced_model->searchQsos($searchCriteria) as $qso) {
|
||||
$qsos[] = $qso->toArray();
|
||||
$qsoArray = $qso->toArray();
|
||||
$flag = $this->dxccflag->get($qso->getDXCCId());
|
||||
if ($flag != null) {
|
||||
$qsoArray['flag'] = ' '.$flag;
|
||||
} else {
|
||||
$qsoArray['flag'] = '';
|
||||
}
|
||||
$qsos[] = $qsoArray;
|
||||
}
|
||||
|
||||
header("Content-Type: application/json");
|
||||
|
||||
@@ -293,7 +293,7 @@ function loadQSOTable(rows) {
|
||||
data.push(qso.qslMessageR);
|
||||
}
|
||||
if ((user_options.dxcc.show ?? 'true') == "true"){
|
||||
data.push(qso.dxcc+(qso.end == null ? '' : ' <span class="badge bg-danger">Deleted DXCC</span>'));
|
||||
data.push(qso.dxcc+qso.flag+(qso.end == null ? '' : ' <span class="badge bg-danger">Deleted DXCC</span>'));
|
||||
}
|
||||
if ((user_options.state.show ?? 'true') == "true"){
|
||||
data.push(qso.state);
|
||||
|
||||
@@ -43,6 +43,7 @@ class QSO
|
||||
private string $ituzone;
|
||||
private string $state;
|
||||
private string $dxcc;
|
||||
private string $dxccid;
|
||||
private string $iota;
|
||||
private string $continent;
|
||||
private string $region;
|
||||
@@ -258,6 +259,7 @@ class QSO
|
||||
} else {
|
||||
$this->dxcc = (($data['dxccname'] ?? null) === null) ? '- NONE -' : '<a href="javascript:spawnLookupModal('.$data['COL_DXCC'].',\'dxcc\');">'.ucwords(strtolower($data['dxccname']), "- (/").'</a>';
|
||||
}
|
||||
$this->dxccid = $data['adif'];
|
||||
$this->iota = ($data['COL_IOTA'] === null) ? '' : $this->getIotaLink($data['COL_IOTA']);
|
||||
if (array_key_exists('end', $data)) {
|
||||
$this->end = ($data['end'] === null) ? null : DateTime::createFromFormat("Y-m-d", $data['end'], new DateTimeZone('UTC'));
|
||||
@@ -1175,6 +1177,11 @@ class QSO
|
||||
return '<span id="dxcc">' . $this->dxcc . '</span>';
|
||||
}
|
||||
|
||||
public function getDXCCId(): string
|
||||
{
|
||||
return $this->dxccid;
|
||||
}
|
||||
|
||||
public function getCqzone(): string
|
||||
{
|
||||
return '<span id="cqzone">' . $this->cqzone . '</span>';
|
||||
@@ -1223,6 +1230,7 @@ class QSO
|
||||
'qslMessageR' => $this->getQSLMsgRcvd(),
|
||||
'name' => $this->getName(),
|
||||
'dxcc' => $this->getDXCC(),
|
||||
'dxccid' => $this->getDXCCId(),
|
||||
'state' => $this->getState(),
|
||||
'pota' => $this->getFormattedPota(),
|
||||
'operator' => $this->getOperator(),
|
||||
|
||||
Reference in New Issue
Block a user