Moved Has Base Vendor Template Icon to the the end of the Vendors Table listing

This commit is contained in:
johnnyq 2025-06-18 16:56:40 -04:00
parent 9a449c35ac
commit ac2dd04959
1 changed files with 10 additions and 2 deletions

View File

@ -19,6 +19,7 @@ $sql = mysqli_query(
$mysqli,
"SELECT SQL_CALC_FOUND_ROWS * FROM vendors
LEFT JOIN clients ON client_id = vendor_client_id
LEFT JOIN vendor_templates ON vendors.vendor_template_id = vendor_templates.vendor_template_id
WHERE vendor_$archive_query
AND (vendor_name LIKE '%$q%' OR vendor_description LIKE '%$q%' OR vendor_account_number LIKE '%$q%' OR vendor_website LIKE '%$q%' OR vendor_contact_name LIKE '%$q%' OR vendor_email LIKE '%$q%' OR vendor_phone LIKE '%$phone_query%')
$client_query
@ -139,6 +140,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Website <?php if ($sort == 'vendor_website') { echo $order_icon; } ?>
</a>
</th>
<th></th>
<th class="text-center">Action</th>
</tr>
</thead>
@ -183,7 +185,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$vendor_created_at = nullable_htmlentities($row['vendor_created_at']);
$vendor_archived_at = nullable_htmlentities($row['vendor_archived_at']);
$vendor_template_id = intval($row['vendor_template_id']);
$vendor_template_name = nullable_htmlentities($row['vendor_template_name']);
if ($vendor_template_id) {
$vendor_template_display = "<div class='text-secondary' title='Base Vendor Template'><i class='fas fa-puzzle-piece mr-1'></i>$vendor_template_name</div>";
} else {
$vendor_template_display = "";
}
?>
<tr>
@ -201,7 +208,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<div class="media">
<i class="fa fa-fw fa-2x fa-building mr-3"></i>
<div class="media-body">
<div><?php echo $vendor_name; ?><?php if ($vendor_template_id) { echo "<i class='fas fa-puzzle-piece text-secondary ml-2' title='Base Template'></i>"; } ?></div>
<div><?php echo $vendor_name; ?></div>
<?php echo $vendor_account_number_display; ?>
</div>
</div>
@ -229,6 +236,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<?php } ?>
</td>
<td><?php echo $vendor_website_display; ?></td>
<td><?php echo $vendor_template_display; ?></td>
<td>
<div class="dropdown dropleft text-center">
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">