Files
assetmgt/servicereport.php
“VeLiTi” 364ee773e4 Enhance UI and functionality across multiple pages
- Added filter panels and search functionality to media, orders, partners, pricelists, products, products attributes, software versions, translations, and users pages.
- Implemented security checks for create, update, and delete permissions on various pages.
- Updated CSS styles for improved layout and responsiveness, including new styles for filter panels and buttons.
- Refactored existing forms to utilize the new filter panel design for a more consistent user experience.
- Adjusted API versioning in servicereport and servicereports pages for better compatibility.
- Improved button icons for filter actions and form submissions for better user interaction.
2025-12-16 11:39:14 +01:00

78 lines
2.1 KiB
PHP

<?php
defined(page_security_key) or exit;
if (debug && debug_id == $_SESSION['id']){
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
}
include_once './assets/functions.php';
include_once './settings/settings_redirector.php';
//SET PAGE ORIGIN FOR NAVIGATION AND SECURITY
$prev_page = (isset($_SESSION['origin']) && $_SESSION['origin'] == 'equipments') ? $_SESSION['prev_origin_equipment'] : $_SESSION['prev_origin_servicereport'];
$page = 'servicereport';
//create backbutton to prev_origin
$back_btn_orgin = ($prev_page != '')? '<a href="'.$prev_page.'" class="btn alt mar-right-2">←</a>':'';
//Check if allowed
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
//GET Details from URL
$GET_VALUES = urlGETdetails($_GET) ?? '';
//CALL TO API FOR History
$api_url = '/v2/history/'.$GET_VALUES;
$history = ioServer($api_url,'');
//Decode Payload
if (!empty($history)){$history = json_decode($history);}else{$history = null;}
template_header('Servicereport', 'servicereport','view');
$view = '
<div class="content-title">
<div class="title">
<i class="fa-solid fa-box-open"></i>
<div class="txt">
<h2>'.$servicereport_h2.'</h2>
<p>'.$servicereport_p.'</p>
</div>
</div>
'.$back_btn_orgin.'
<a href="index.php?page=render_service_report&historyID='.$_GET['historyID'].'" class="btn"><i class="fa-solid fa-file-pdf"></i></a>
</div>';
//Get all related service events
if (empty($history)){
$service_events = '
<tr>
<td colspan="8" style="text-align:center;">'.$servicereport_no_history.'</td>
</tr>';
} else {
$service_events = serviceReport($history[0], 'display', $_SESSION['country_code']);
}
$view .= '<div class="content-block">
<div class="block-header">
<i class="fa-solid fa-bars fa-sm"></i>'.$servicereport_details.' - '.$_GET['historyID'].'
</div>
'.$service_events.'
</div>
';
$view .= '
</div>
</div>
';
$view .= '</div>';
//OUTPUT
echo $view;
template_footer();
?>