Merge pull request #2087 from phl0/advancedLogbookDeletedDxcc
Show deleted DXCC marker in advanced logbook
这个提交包含在:
		
						当前提交
						5c872cf54e
					
				
					共有  4 个文件被更改,包括 13 次插入 和 5 次删除
				
			
		| 
						 | 
					@ -89,6 +89,7 @@ class Logbookadvanced_model extends CI_Model {
 | 
				
			||||||
			SELECT *
 | 
								SELECT *
 | 
				
			||||||
			FROM " . $this->config->item('table_name') . " qsos
 | 
								FROM " . $this->config->item('table_name') . " qsos
 | 
				
			||||||
			INNER JOIN station_profile ON qsos.station_id=station_profile.station_id
 | 
								INNER JOIN station_profile ON qsos.station_id=station_profile.station_id
 | 
				
			||||||
 | 
								LEFT OUTER JOIN dxcc_entities ON qsos.col_dxcc=dxcc_entities.adif
 | 
				
			||||||
			WHERE station_profile.user_id =  ?
 | 
								WHERE station_profile.user_id =  ?
 | 
				
			||||||
			$where
 | 
								$where
 | 
				
			||||||
			ORDER BY qsos.COL_TIME_ON desc, qsos.COL_PRIMARY_KEY desc
 | 
								ORDER BY qsos.COL_TIME_ON desc, qsos.COL_PRIMARY_KEY desc
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -167,13 +167,13 @@
 | 
				
			||||||
		<button type="button" class="btn btn-sm btn-primary" id="btnUpdateFromCallbook">Update from Callbook</button>
 | 
							<button type="button" class="btn btn-sm btn-primary" id="btnUpdateFromCallbook">Update from Callbook</button>
 | 
				
			||||||
		<button type="button" class="btn btn-sm btn-primary" id="queueBureau">Queue Bureau</button>
 | 
							<button type="button" class="btn btn-sm btn-primary" id="queueBureau">Queue Bureau</button>
 | 
				
			||||||
		<button type="button" class="btn btn-sm btn-primary" id="queueDirect">Queue Direct</button>
 | 
							<button type="button" class="btn btn-sm btn-primary" id="queueDirect">Queue Direct</button>
 | 
				
			||||||
        <button type="button" class="btn btn-sm btn-primary" id="queueElectronic">Queue Electronic</button>
 | 
							<button type="button" class="btn btn-sm btn-primary" id="queueElectronic">Queue Electronic</button>
 | 
				
			||||||
		<button type="button" class="btn btn-sm btn-success" id="sentBureau">Sent Bureau</button>
 | 
							<button type="button" class="btn btn-sm btn-success" id="sentBureau">Sent Bureau</button>
 | 
				
			||||||
		<button type="button" class="btn btn-sm btn-success" id="sentDirect">Sent Direct</button>
 | 
							<button type="button" class="btn btn-sm btn-success" id="sentDirect">Sent Direct</button>
 | 
				
			||||||
        <button type="button" class="btn btn-sm btn-success" id="sentElectronic">Sent Electronic</button>
 | 
							<button type="button" class="btn btn-sm btn-success" id="sentElectronic">Sent Electronic</button>
 | 
				
			||||||
		<button type="button" class="btn btn-sm btn-warning" id="dontSend">Don't Send</button>
 | 
							<button type="button" class="btn btn-sm btn-warning" id="dontSend">Don't Send</button>
 | 
				
			||||||
		<button type="button" class="btn btn-sm btn-info" id="exportAdif">Create ADIF</button>
 | 
							<button type="button" class="btn btn-sm btn-info" id="exportAdif">Create ADIF</button>
 | 
				
			||||||
        <button type="button" class="btn btn-sm btn-danger" id="deleteQsos">Delete</button>
 | 
							<button type="button" class="btn btn-sm btn-danger" id="deleteQsos">Delete</button>
 | 
				
			||||||
		<span id="infoBox"></span>
 | 
							<span id="infoBox"></span>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,7 +68,7 @@ function loadQSOTable(rows) {
 | 
				
			||||||
			qso.qslSent,
 | 
								qso.qslSent,
 | 
				
			||||||
			qso.qslReceived,
 | 
								qso.qslReceived,
 | 
				
			||||||
			qso.qslMessage,
 | 
								qso.qslMessage,
 | 
				
			||||||
			qso.dxcc,
 | 
								qso.dxcc+(qso.end == null ? '' : ' <span class="badge badge-danger">Deleted DXCC</span>'),
 | 
				
			||||||
			qso.state,
 | 
								qso.state,
 | 
				
			||||||
			qso.cqzone,
 | 
								qso.cqzone,
 | 
				
			||||||
			qso.iota,
 | 
								qso.iota,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,6 +54,7 @@ class QSO
 | 
				
			||||||
	private string $QSLSent;
 | 
						private string $QSLSent;
 | 
				
			||||||
	private string $QSLSentVia;
 | 
						private string $QSLSentVia;
 | 
				
			||||||
	private string $QSLVia;
 | 
						private string $QSLVia;
 | 
				
			||||||
 | 
						private ?DateTime $end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * @param array $data Does no validation, it's assumed to be a row from the database in array format
 | 
						 * @param array $data Does no validation, it's assumed to be a row from the database in array format
 | 
				
			||||||
| 
						 | 
					@ -166,6 +167,11 @@ class QSO
 | 
				
			||||||
		$this->state = ($data['COL_STATE'] === null) ? '' :$data['COL_STATE'];
 | 
							$this->state = ($data['COL_STATE'] === null) ? '' :$data['COL_STATE'];
 | 
				
			||||||
		$this->dxcc = ($data['COL_COUNTRY'] === null) ? '' :$data['COL_COUNTRY'];
 | 
							$this->dxcc = ($data['COL_COUNTRY'] === null) ? '' :$data['COL_COUNTRY'];
 | 
				
			||||||
		$this->iota = ($data['COL_IOTA'] === null) ? '' :$data['COL_IOTA'];
 | 
							$this->iota = ($data['COL_IOTA'] === null) ? '' :$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'));
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								$this->end = null;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
| 
						 | 
					@ -514,6 +520,7 @@ class QSO
 | 
				
			||||||
			'state' => $this->getState(),
 | 
								'state' => $this->getState(),
 | 
				
			||||||
			'cqzone' => $this->getCqzone(),
 | 
								'cqzone' => $this->getCqzone(),
 | 
				
			||||||
			'iota' => $this->getIOTA(),
 | 
								'iota' => $this->getIOTA(),
 | 
				
			||||||
 | 
								'end' => $this->end === null ? null : $this->end->format("Y-m-d"),
 | 
				
			||||||
		];
 | 
							];
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		正在加载…
	
		在新工单中引用