CMXX - Upgrade products_software

This commit is contained in:
“VeLiTi”
2024-11-11 11:02:54 +01:00
parent 3ed27eb5ff
commit 9afc383a09
12 changed files with 633 additions and 10 deletions

View File

@@ -48,6 +48,13 @@ $product_versions = ioServer($api_url,'');
//Decode Payload
if (!empty($product_versions)){$product_versions = decode_payload($product_versions);}else{$product_versions = null;}
//CALL TO API FOR Product_versions
$api_url = '/v1/products_software/productrowid='.$_GET['rowID'];
$product_software = ioServer($api_url,'');
//Decode Payload
if (!empty($product_software)){$product_software = decode_payload($product_software);}else{$product_software = null;}
//------------------------------
//Variables
//------------------------------
@@ -166,13 +173,51 @@ $view .= '<div class="content-block">
<th>'.$product_version_number.'</th>
<th>'.$product_status.'</th>
<th>'.$product_version_version.'</th>
<th>'.$product_version_software .'</th>
<th>'.$general_actions.'</th>
</tr>
</thead>
<tbody>';
foreach ($product_versions as $version){
$view .= '<tr>
<td>'.$version->rowID.'</td>
<td>'.(($version->status == 1)? '<span class="status enabled">'.$prod_status_1:'<span class="status">'.$prod_status_0).'</td>
<td>'.$version->version.'</td>
<td><a href="index.php?page=products_versions&productrowid='.$_GET['rowID'].'&rowID='.$version->rowID.'" class="btn_link">'.$general_view.'</a></td>
</tr>';
}
$view .= '
</tbody>
</table>
</div>
';
}
$view .= '
</div>
';
$view .= '<div class="content-block">
<div class="block-header">
<i class="fa-solid fa-bars fa-sm"></i>'.($product_software ?? '').'
<a href="index.php?page=products_software&productrowid='.$_GET['rowID'].'" class="btn2"> + </a>
</div>';
if (!empty($product_software)){
$view .= '
<div class="table">
<table class="sortable">
<thead>
<tr>
<th>#</th>
<th>'.$product_status.'</th>
<th>'.$product_version_version.'</th>
<th>'.$product_version_software .'</th>
<th>'.$general_actions.'</th>
</tr>
</thead>
<tbody>';
foreach ($product_software as $version){
$view .= '<tr>
<td>'.$version->rowID.'</td>
<td>'.(($version->status == 1)? '<span class="status enabled">'.$prod_status_1:'<span class="status">'.$prod_status_0).'</td>