CMXX - First candidate

This commit is contained in:
“VeLiTi”
2025-03-05 20:45:35 +01:00
parent 3a52632d61
commit faf5a5156b
29 changed files with 588 additions and 1053 deletions

View File

@@ -43,14 +43,6 @@ $responses = ioServer($api_url,'');
if (!empty($responses)){$responses = json_decode($responses);}else{$responses = null;}
$responses = $responses[0];
//CALL TO API FOR RELATED
$api_url = '/v2/media/rowID='.$responses->product_media;
$media_responses = ioServer($api_url,'');
//Decode Payload
if (!empty($media_responses)){$media_responses = json_decode($media_responses,true);}else{$media_responses = null;}
$media_responses = $media_responses[0];
//CALL TO API FOR Product_versions
$api_url = '/v2/products_versions/productrowid='.$_GET['rowID'];
$product_versions = ioServer($api_url,'');
@@ -226,10 +218,10 @@ $view .='<div class="content-block order-details">
<div class="block-header">
<i class="fa-solid fa-user fa-sm"></i>
</div>';
if (!empty($media_responses['full_path'])){
if (!empty($responses->full_path)){
$view .='
<div class="order-detail">
<img style="border-radius: 4px;height: 200px;margin: auto;" src="'.$media_responses['full_path'].'" alt="">
<img style="border-radius: 4px;height: 200px;margin: auto;" src="'.$responses->full_path.'" alt="">
</div>
';
}
@@ -247,46 +239,6 @@ $view .= '<div class="content-block">
</div>
';
if ($responses->configurable == 1){
$view .= '<div class="content-block">
<div class="block-header">
<i class="fa-solid fa-bars fa-sm"></i>'.($product_configuration ?? 'Product configuration').'
<a href="index.php?page=products_configurations&productrowid='.$_GET['rowID'].'" class="btn2"> + </a>
</div>';
if (!empty($products_configurations)){
$view .= '
<div class="table">
<table class="sortable">
<thead>
<tr>
<th>'.($product_configuration_version ?? 'Config-version').'</th>
<th>'.($product_configuration_assignment ?? 'Code').'</th>
<th>'.($product_configuration_assignment ?? 'Name').'</th>
<th>'.$general_actions.'</th>
</tr>
</thead>
<tbody>';
foreach ($products_configurations as $product_config){
$view .= '<tr>
<td>'.$product_config['version'].'</td>
<td>'.$product_config['assignment'].'</td>
<td>'.(${$product_config['assignment_name']} ?? $product_config['assignment_name']).'</td>
<td><a href="index.php?page=products_configurations&productrowid='.$_GET['rowID'].'&rowID='.$product_config['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_version ?? '').'
@@ -327,6 +279,46 @@ $view .= '
</div>
';
if ($responses->configurable == 1){
$view .= '<div class="content-block">
<div class="block-header">
<i class="fa-solid fa-bars fa-sm"></i>'.($product_configuration ?? 'Product configuration').'
<a href="index.php?page=products_configurations&productrowid='.$_GET['rowID'].'" class="btn2"> + </a>
</div>';
if (!empty($products_configurations)){
$view .= '
<div class="table">
<table class="sortable">
<thead>
<tr>
<th>'.($product_configuration_version ?? 'Config-version').'</th>
<th>'.($product_configuration_assignment ?? 'Code').'</th>
<th>'.($product_configuration_assignment ?? 'Name').'</th>
<th>'.$general_actions.'</th>
</tr>
</thead>
<tbody>';
foreach ($products_configurations as $product_config){
$view .= '<tr>
<td>'.$product_config['version'].'</td>
<td>'.$product_config['assignment'].'</td>
<td>'.(${$product_config['assignment_name']} ?? $product_config['assignment_name']).'</td>
<td><a href="index.php?page=products_configurations&productrowid='.$_GET['rowID'].'&rowID='.$product_config['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_version_software ?? '').'