From e389f53e46522b2d70be000d21cc1f848fdb26ab Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 22 Feb 2024 15:03:24 +0000 Subject: [PATCH 1/4] Fixed Date Issue --- application/controllers/Workabledxcc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/controllers/Workabledxcc.php b/application/controllers/Workabledxcc.php index 141d7c46..1525aea1 100644 --- a/application/controllers/Workabledxcc.php +++ b/application/controllers/Workabledxcc.php @@ -58,8 +58,15 @@ class Workabledxcc extends CI_Controller $EndDate = $oldEndDate->format($custom_date_format); + + $oldStartDate1 = DateTime::createFromFormat('Y-m-d', $item['0']); + + $StartDate1 = $oldStartDate1->format('Y-m-d'); + + echo $StartDate1; + $this->load->model('logbook_model'); - $dxccInfo = $this->logbook_model->dxcc_lookup($item['callsign'], $StartDate); + $dxccInfo = $this->logbook_model->dxcc_lookup($item['callsign'], $StartDate1); // Call DXCC Worked function to check if the DXCC has been worked before if (isset($dxccInfo['entity'])) { From 7ba9cbf4f34fdae36c897bf1547353dca7d5d486 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 22 Feb 2024 15:05:42 +0000 Subject: [PATCH 2/4] fixes a date issue --- application/controllers/Workabledxcc.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/application/controllers/Workabledxcc.php b/application/controllers/Workabledxcc.php index 1525aea1..98ed1927 100644 --- a/application/controllers/Workabledxcc.php +++ b/application/controllers/Workabledxcc.php @@ -58,12 +58,10 @@ class Workabledxcc extends CI_Controller $EndDate = $oldEndDate->format($custom_date_format); - $oldStartDate1 = DateTime::createFromFormat('Y-m-d', $item['0']); $StartDate1 = $oldStartDate1->format('Y-m-d'); - echo $StartDate1; $this->load->model('logbook_model'); $dxccInfo = $this->logbook_model->dxcc_lookup($item['callsign'], $StartDate1); From f03b96968e23dd75215ea9ec6ae60e7f7ffdffb3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 Mar 2024 12:41:12 +0000 Subject: [PATCH 3/4] Contesting Dupe Check Improvement --- application/controllers/Contesting.php | 2 ++ assets/js/sections/contesting.js | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index db31db91..25b7b438 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -202,6 +202,8 @@ class Contesting extends CI_Controller { $custom_date_format = $this->session->userdata('user_date_format'); $abstimeb4=date($custom_date_format, strtotime($result->row()->COL_TIME_OFF)).' '.date('H:i',strtotime($result->row()->COL_TIME_OFF)); echo json_encode(array('message' => 'Worked at '.$abstimeb4.' ('.$timeb4.' ago) before')); + } else { + echo json_encode(array('message' => 'OKAY')); } return; } diff --git a/assets/js/sections/contesting.js b/assets/js/sections/contesting.js index 31ff8fb6..693a03e9 100644 --- a/assets/js/sections/contesting.js +++ b/assets/js/sections/contesting.js @@ -103,6 +103,11 @@ $(function () { }); }); +// checked if worked before after blur +$("#callsign").blur(function () { + checkIfWorkedBefore(); +}); + // Here we capture keystrokes to execute functions document.onkeyup = function (e) { // ALT-W wipe @@ -217,8 +222,8 @@ $("#callsign").keyup(function () { highlight(call.toUpperCase()); } }); - - checkIfWorkedBefore(); + // moved to blur + // checkIfWorkedBefore(); var qTable = $('.qsotable').DataTable(); qTable.search(call).draw(); } @@ -242,10 +247,23 @@ function checkIfWorkedBefore() { }, success: function (result) { if (result.message.substr(0, 6) == 'Worked') { + $('#callsign_info').removeClass('text-bg-success'); + $('#callsign_info').removeClass('text-bg-info'); + $('#callsign_info').addClass('text-bg-danger'); $('#callsign_info').text(result.message); } + else if (result.message == "OKAY") { + $('#callsign_info').removeClass('text-bg-danger'); + $('#callsign_info').removeClass('text-bg-info'); + $('#callsign_info').addClass('text-bg-success'); + $('#callsign_info').text("Go Work Them!"); + } else { + $('#callsign_info').text(""); + } } }); + } else { + $('#callsign_info').text(""); } } From 7e315677db1cecdd0fe5547e6ddde8b6586b9c1d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 Mar 2024 12:57:07 +0000 Subject: [PATCH 4/4] Cleanup unused class --- assets/js/sections/contesting.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/assets/js/sections/contesting.js b/assets/js/sections/contesting.js index 693a03e9..1ce2b5eb 100644 --- a/assets/js/sections/contesting.js +++ b/assets/js/sections/contesting.js @@ -248,13 +248,11 @@ function checkIfWorkedBefore() { success: function (result) { if (result.message.substr(0, 6) == 'Worked') { $('#callsign_info').removeClass('text-bg-success'); - $('#callsign_info').removeClass('text-bg-info'); $('#callsign_info').addClass('text-bg-danger'); $('#callsign_info').text(result.message); } else if (result.message == "OKAY") { $('#callsign_info').removeClass('text-bg-danger'); - $('#callsign_info').removeClass('text-bg-info'); $('#callsign_info').addClass('text-bg-success'); $('#callsign_info').text("Go Work Them!"); } else {