CMXX - Servicereport actionlist update.

This commit is contained in:
“VeLiTi”
2024-12-20 16:11:27 +01:00
parent b96745c12e
commit 2c44556567
2 changed files with 10 additions and 8 deletions

View File

@@ -950,6 +950,7 @@ function serviceEvents ($messages,$page){
<th>'.$equipment_label9.'</th> <th>'.$equipment_label9.'</th>
<th>'.$equipment_label3.'</th> <th>'.$equipment_label3.'</th>
<th>'.$general_createdby.'</th> <th>'.$general_createdby.'</th>
<th>'.$general_created.'</th>
<th>'.$view_asset_actions.'</th> <th>'.$view_asset_actions.'</th>
</tr> </tr>
</thead> </thead>
@@ -996,6 +997,7 @@ function serviceEvents ($messages,$page){
<td>'.$service_renewal_date.'</td> <td>'.$service_renewal_date.'</td>
<td>'.$service_status.'</td> <td>'.$service_status.'</td>
<td>'.$message->createdby.'</td> <td>'.$message->createdby.'</td>
<td>'.getRelativeTime($message->created).'</td>
<td><a href="index.php?page=servicereport&equipmentID='.$message->equipmentID.'&historyID='.$message->historyID.'" class="btn_link">'.$general_view.'</a></td> <td><a href="index.php?page=servicereport&equipmentID='.$message->equipmentID.'&historyID='.$message->historyID.'" class="btn_link">'.$general_view.'</a></td>
<td><a href="index.php?page=render_service_report&historyID='.$message->historyID.'" class="btn_link">PDF</a></td> <td><a href="index.php?page=render_service_report&historyID='.$message->historyID.'" class="btn_link">PDF</a></td>
</tr>'; </tr>';
@@ -1295,11 +1297,11 @@ function serviceReport($history, $request, $country_code)
if (str_contains($history->description, "service_mandatory_question")) { if (str_contains($history->description, "service_mandatory_question")) {
// New Report // New Report
foreach ($json_array->final as $final) { foreach ($json_array->final as $final) {
if ($final->id == "service_action_clean" && $final->value == "Yes") { if ($final->id == "service_action_clean" && $final->value == 1) {
$servicereport .= '<li>' . $service_action_clean . '</li>'; $servicereport .= '<li>' . $service_action_clean . '</li>';
$actions++; $actions++;
} }
if ($final->id == "service_action_battery" && $final->value == "Yes") { if ($final->id == "service_action_battery" && $final->value == 1) {
$servicereport .= '<li>' . $service_action_battery . '</li>'; $servicereport .= '<li>' . $service_action_battery . '</li>';
$actions++; $actions++;
} }
@@ -1321,23 +1323,23 @@ function serviceReport($history, $request, $country_code)
'; ';
if (str_contains($history->description, "service_mandatory_question")) { if (str_contains($history->description, "service_mandatory_question")) {
foreach ($json_array->final as $final) { foreach ($json_array->final as $final) {
if ($final->id == "service_action_serial" && $final->value == "Yes") { if ($final->id == "service_action_serial" && $final->value == 1) {
$servicereport .= '<li>' . $service_action_serial . '</li>'; $servicereport .= '<li>' . $service_action_serial . '</li>';
$repairs++; $repairs++;
} }
if ($final->id == "service_action_cover" && $final->value == "Yes") { if ($final->id == "service_action_cover" && $final->value == 1) {
$servicereport .= '<li>' . $service_action_cover . '</li>'; $servicereport .= '<li>' . $service_action_cover . '</li>';
$repairs++; $repairs++;
} }
if ($final->id == "service_action_spudger" && $final->value == "Yes") { if ($final->id == "service_action_spudger" && $final->value == 1) {
$servicereport .= '<li>' . $service_action_spudger . '</li>'; $servicereport .= '<li>' . $service_action_spudger . '</li>';
$repairs++; $repairs++;
} }
if ($final->id == "service_action_case" && $final->value == "Yes") { if ($final->id == "service_action_case" && $final->value == 1) {
$servicereport .= '<li>' . $service_action_case . '</li>'; $servicereport .= '<li>' . $service_action_case . '</li>';
$repairs++; $repairs++;
} }
if ($final->id == "service_action_instructions" && $final->value == "Yes") { if ($final->id == "service_action_instructions" && $final->value == 1) {
$servicereport .= '<li>' . $service_action_instructions . '</li>'; $servicereport .= '<li>' . $service_action_instructions . '</li>';
$repairs++; $repairs++;
} }

View File

@@ -119,7 +119,7 @@ $view .= '
$view .= '<tr> $view .= '<tr>
<td class="responsive-hidden">'.$response->historyID.'</td> <td class="responsive-hidden">'.$response->historyID.'</td>
<td>'.$response->type.'</td> <td>'.$response->type.'</td>
<td class="responsive-hidden">'.$response->created.'</td> <td class="responsive-hidden">'.getRelativeTime($response->created).'</td>
<td class="responsive-hidden">'.$response->createdby.'</td> <td class="responsive-hidden">'.$response->createdby.'</td>
<td><div style="overflow-y:scroll;height:200px !important;max-width:300px;"><pre>' . $description . '</pre><div></td> <td><div style="overflow-y:scroll;height:200px !important;max-width:300px;"><pre>' . $description . '</pre><div></td>
<td><a href="index.php?page=equipment&equipmentID='.$response->equipmentID.'" class="btn_link">'.$general_view .'</a></td> <td><a href="index.php?page=equipment&equipmentID='.$response->equipmentID.'" class="btn_link">'.$general_view .'</a></td>