Compare commits
14 Commits
developmen
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ccc52b80c | ||
|
|
9db5678e14 | ||
|
|
7a60b02525 | ||
|
|
e883bce124 | ||
|
|
0bec809940 | ||
|
|
9d33b37b8b | ||
|
|
0274647483 | ||
|
|
05aa5500e7 | ||
|
|
0a4e145d57 | ||
|
|
a0df3a54b2 | ||
|
|
7a6e2dda19 | ||
|
|
79f7666702 | ||
|
|
45f1fa44b8 | ||
|
|
990f270855 |
@@ -27,15 +27,23 @@ $clause = '';
|
||||
$clause_insert ='';
|
||||
$input_insert = '';
|
||||
|
||||
//GET PARTNERDETAILS FROM USER
|
||||
$sales_user = array(
|
||||
"salesid"=>$partner->salesid,
|
||||
"soldto"=>$partner->soldto
|
||||
);
|
||||
$accounthierarchy = json_encode($sales_user, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
//ADD STANDARD PARAMETERS TO ARRAY BASED ON INSERT OR UPDATE
|
||||
if ($command == 'update'){
|
||||
$post_content['updated'] = $date;
|
||||
$post_content['updatedby'] = $username;
|
||||
$post_content['accounthierarchy'] = $accounthierarchy;
|
||||
}
|
||||
elseif ($command == 'insert'){
|
||||
$post_content['created'] = $date;
|
||||
$post_content['createdby'] = $username;
|
||||
// No accounthierarchy for assignments
|
||||
$post_content['accounthierarchy'] = $accounthierarchy;
|
||||
}
|
||||
else {
|
||||
//do nothing
|
||||
|
||||
@@ -2128,7 +2128,7 @@ function serviceEvents ($messages,$page){
|
||||
$service_status = '<span class="status warranty">'.$service_report_outcome_good.'</span>';
|
||||
}
|
||||
|
||||
$view_data .= '<tr onclick="window.location.href=\'index.php?page=servicereport&equipmentID='.$message->equipmentID.'&historyID='.$message->historyID.'\'" style="cursor: pointer;">
|
||||
$view_data .= '<tr onclick="window.location.href=\'index.php?page=servicereport&historyID='.$message->historyID.'\'" style="cursor: pointer;">
|
||||
<td>'.$TETS->serialnumber.'</td>
|
||||
<td>'.$service_date.'</td>
|
||||
<td>'.$service_renewal_date.'</td>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var port, textEncoder, writableStreamClosed, writer, historyIndex = -1;
|
||||
const lineHistory = [];
|
||||
maintenanceRun = 0;
|
||||
handshakeComplete = false;
|
||||
let maintenanceRun = 0;
|
||||
let handshakeComplete = false;
|
||||
|
||||
// Function to log communication to API
|
||||
async function logCommunication(data, direction) {
|
||||
@@ -108,6 +108,7 @@ async function connectSerial() {
|
||||
// Log connection failure details
|
||||
await logCommunication(`Serial connection failed: ${error.message || 'Unknown error'}`, 'disconnected');
|
||||
alert("Serial Connection Failed");
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,7 +587,7 @@ async function closePort(){
|
||||
|
||||
maintenanceRun = 0; // reset maintenanceRun
|
||||
// Refresh the page
|
||||
window.location.reload();
|
||||
setTimeout(() => {window.location.reload();}, 500);
|
||||
}
|
||||
|
||||
async function closePortCarTest(){
|
||||
@@ -742,7 +743,7 @@ async function updateHistory(){
|
||||
body: testdetails
|
||||
});
|
||||
|
||||
const historyresult = await response.json;
|
||||
const historyresult = await response.json();
|
||||
|
||||
setTimeout(maintenanceTest,5000);
|
||||
|
||||
@@ -811,5 +812,6 @@ async function updateHistory(){
|
||||
catch(e)
|
||||
{
|
||||
alert(e.message || e);
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
const serialResultsDiv = document.getElementById("serialResults");
|
||||
|
||||
<<<<<<< HEAD
|
||||
let port, textEncoder, writableStreamClosed, writer;
|
||||
let readableStreamClosed, reader, openPort = 0;
|
||||
let x, serial, fw, hw, sw, commitCode;
|
||||
let firmwarelocation, upgraded_version, hex_fw;
|
||||
|
||||
// Buffer for accumulating received data before logging
|
||||
=======
|
||||
// Buffer for accumulating received data before logging
|
||||
>>>>>>> development
|
||||
let receivedDataBuffer = '';
|
||||
|
||||
// Function to log communication to API
|
||||
@@ -122,13 +131,15 @@ async function connectDevice() {
|
||||
// Check for specific "No port selected" error and show user-friendly message
|
||||
if (error.message && error.message.includes('No port selected by the user')) {
|
||||
progressBar("100", "No device selected, please try again", "#ff6666");
|
||||
} else if (openPort = 1){
|
||||
} else if (openPort === 1){
|
||||
closePort();
|
||||
console.log("Closing port");
|
||||
alert("System is still trying to close the serial port. If this message continues to come up please refresh this page.");
|
||||
window.location.reload();
|
||||
}
|
||||
else{
|
||||
alert("Your browser does not support this functionality. Please use latest Chrome or Edge browser.");
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,6 +181,7 @@ async function listenToPort() {
|
||||
|
||||
async function appendToTerminal(newStuff) {
|
||||
serialResultsDiv.innerHTML += newStuff;
|
||||
receivedDataBuffer += newStuff;
|
||||
|
||||
// Log received data
|
||||
await logCommunication(newStuff.trim(), 'received');
|
||||
|
||||
@@ -193,7 +193,7 @@ if (isset($success_msg)){
|
||||
}
|
||||
|
||||
$view .= '<form action="" method="post" id="mass_update_form">
|
||||
<div class="content-block-wrapper">
|
||||
<div class="content-block-wrapper" style="max-height: 450px;">
|
||||
';
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ $soldto_dropdown = listPartner('soldto','','yes',$_SESSION['authorization']['per
|
||||
$shipto_dropdown = listPartner('shipto','','',$_SESSION['authorization']['permission']);
|
||||
$location_dropdown = listPartner('location','','',$_SESSION['authorization']['permission']);
|
||||
|
||||
$view .='<div class="content-block">
|
||||
$view .='<div class="content-block" style="max-height: 450px;">
|
||||
<div class="block-header">
|
||||
<i class="fa-solid fa-user fa-sm"></i>
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,6 @@ if (!empty($invoice_data['customer']['language'])) {
|
||||
|
||||
list($message,$pdf, $customer_email, $order_id) = generateSoftwareInvoice($invoice_data, $order_number, $invoice_language);
|
||||
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// Check for HTML output request
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Reference in New Issue
Block a user