CMXX - Improved history visibility

This commit is contained in:
“VeLiTi”
2024-12-13 16:59:45 +01:00
parent fcac36f65f
commit b20d9f5e66
3 changed files with 14 additions and 4 deletions

View File

@@ -143,12 +143,17 @@ foreach ($responses as $response){
$description = json_decode($response->description) ?? $response->description;
$description = json_encode($description, JSON_PRETTY_PRINT);
//Replace JSON ITEMS
$search = ['{', '}', '"',':','[',']',','];
$replace = ['', '','','=','','',''];
$description = str_replace($search, $replace, $description);
$view .= '<tr>
<td class="responsive-hidden">'.$response->historyID.'</td>
<td>'.$response->type.' </td>
<td class="responsive-hidden">'.$response->created.'</td>
<td class="responsive-hidden">'.$response->createdby.'</td>
<td><pre>' . $description . '</pre></td>
<td><div style="overflow-y:scroll;height:200px !important;max-width:300px;"><pre>' . $description . '</pre><div></td>
';
if ($update_allowed === 1){
$view .= ' <td><a href="index.php?page=history_manage&equipmentID='.$_GET['equipmentID'].'&rowID='.$response->historyID.'" class="btn_link">'.$general_view .'</a></td>