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.
This commit is contained in:
@@ -35,16 +35,16 @@ $url = 'index.php?page=servicereports'.$status.$search.$equipmentid;
|
||||
//GET Details from URL
|
||||
$GET_VALUES = urlGETdetails($_GET) ?? '';
|
||||
//CALL TO API FOR History
|
||||
$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'';
|
||||
$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.'';
|
||||
$history = ioServer($api_url,'');
|
||||
|
||||
//Decode Payload
|
||||
if (!empty($history)){$history = decode_payload($history);}else{$history = null;}
|
||||
if (!empty($history)){$history = json_decode($history);}else{$history = null;}
|
||||
//Return QueryTotal from API
|
||||
$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'&totals=';
|
||||
$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.'&totals=';
|
||||
$query_total = ioServer($api_url,'');
|
||||
//Decode Payload
|
||||
if (!empty($query_total)){$query_total = decode_payload($query_total);}else{$query_total = null;}
|
||||
if (!empty($query_total)){$query_total = json_decode($query_total);}else{$query_total = null;}
|
||||
|
||||
template_header('Servicereports', 'servicereports','view');
|
||||
$view = '
|
||||
@@ -56,22 +56,33 @@ $view = '
|
||||
<p>'.$servicereports_p.'</p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
<div class="title-actions">
|
||||
'.$back_btn_orgin.'
|
||||
<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="servicereports">
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$servicereports_Search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
';
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="servicereports">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$servicereports_Search.'" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=servicereports">X</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
//Get all related service events
|
||||
if (empty($history)){
|
||||
$service_events = '
|
||||
@@ -83,9 +94,6 @@ if (empty($history)){
|
||||
}
|
||||
|
||||
$view .= '<div class="content-block">
|
||||
<div class="block-header">
|
||||
<i class="fa-solid fa-bars fa-sm"></i>'.$servicereports_details.'
|
||||
</div>
|
||||
<div class="table order-table">'.$service_events.'</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
Reference in New Issue
Block a user