CIM77 - Service reports alleen laatste 5
This commit is contained in:
@@ -8,8 +8,15 @@ defined(page_security_key) or exit;
|
||||
include_once './assets/functions.php';
|
||||
include_once './settings/settings.php';
|
||||
|
||||
//SET PAGE ORIGIN FOR NAVIGATION AND SECURITY
|
||||
$prev_page = $_SESSION['prev_origin_equipment'] ?? '';
|
||||
$page = 'servicereports';
|
||||
|
||||
//create backbutton to prev_origin
|
||||
$back_btn_orgin = ($prev_page != '')? '<a href="'.$prev_page.'" class="btn alt mar-right-2">'.$button_back.'</a>':'';
|
||||
|
||||
//Check if allowed
|
||||
if (isAllowed('servicereports',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
@@ -24,7 +31,7 @@ $url = 'index.php?page=servicereports'.$status.$search;
|
||||
//GET Details from URL
|
||||
$GET_VALUES = urlGETdetails($_GET) ?? '';
|
||||
//CALL TO API FOR History
|
||||
$api_url = '/v1/equipments/type=ServiceReport&'.$GET_VALUES.'&history=';
|
||||
$api_url = '/v1/equipments/type=ServiceReport&'.$GET_VALUES.'&history=0';
|
||||
$history = ioServer($api_url,'');
|
||||
|
||||
//Decode Payload
|
||||
@@ -46,6 +53,7 @@ $view = '
|
||||
<p>'.$servicereports_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
</div>';
|
||||
|
||||
$view .= '
|
||||
|
||||
Reference in New Issue
Block a user