mirror of https://github.com/itflow-org/itflow
Do not always show expiring card if no items are expiring under client overview
This commit is contained in:
parent
037e42fb20
commit
9a15f0e0b3
|
|
@ -44,148 +44,155 @@ $sql_domains_expiring = mysqli_query($mysqli, "SELECT * FROM domains
|
|||
|
||||
<?php if (mysqli_num_rows($sql_important_contacts) > 0) { ?>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4">
|
||||
|
||||
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-fw fa-users mr-2"></i>Important Contacts</h5>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<table class="table table-borderless table-sm">
|
||||
<?php
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-fw fa-users mr-2"></i>Important Contacts</h5>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<table class="table table-borderless table-sm">
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_important_contacts)) {
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = htmlentities($row['contact_name']);
|
||||
$contact_title = htmlentities($row['contact_title']);
|
||||
$contact_email = htmlentities($row['contact_email']);
|
||||
$contact_phone = formatPhoneNumber($row['contact_phone']);
|
||||
$contact_extension = htmlentities($row['contact_extension']);
|
||||
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
|
||||
while ($row = mysqli_fetch_array($sql_important_contacts)) {
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = htmlentities($row['contact_name']);
|
||||
$contact_title = htmlentities($row['contact_title']);
|
||||
$contact_email = htmlentities($row['contact_email']);
|
||||
$contact_phone = formatPhoneNumber($row['contact_phone']);
|
||||
$contact_extension = htmlentities($row['contact_extension']);
|
||||
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>" class="text-bold"><?php echo $contact_name; ?></a>
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>" class="text-bold"><?php echo $contact_name; ?></a>
|
||||
<br>
|
||||
<small class="text-secondary"><?php echo $contact_title; ?></small>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (!empty($contact_phone)) { ?>
|
||||
<?php echo "<i class='fa fa-fw fa-phone text-secondary'></i> $contact_phone $contact_extension"; ?>
|
||||
<?php } ?>
|
||||
<?php if (!empty($contact_mobile)) { ?>
|
||||
<br>
|
||||
<small class="text-secondary"><?php echo $contact_title; ?></small>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (!empty($contact_phone)) { ?>
|
||||
<?php echo "<i class='fa fa-fw fa-phone text-secondary'></i> $contact_phone $contact_extension"; ?>
|
||||
<?php } ?>
|
||||
<?php if (!empty($contact_mobile)) { ?>
|
||||
<br>
|
||||
<div class="text-secondary"><i class='fa fa-fw fa-mobile-alt text-secondary'></i> <?php echo "$contact_mobile"; ?></div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="text-secondary"><i class='fa fa-fw fa-mobile-alt text-secondary'></i> <?php echo "$contact_mobile"; ?></div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if (mysqli_num_rows($sql_contacts) > 0 || mysqli_num_rows($sql_vendors) > 0) { ?>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-history mr-2"></i>Recently Updated</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-history mr-2"></i>Recently Updated</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_contacts)) {
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = htmlentities($row['contact_name']);
|
||||
$contact_updated_at = $row['contact_updated_at'];
|
||||
while ($row = mysqli_fetch_array($sql_contacts)) {
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = htmlentities($row['contact_name']);
|
||||
$contact_updated_at = $row['contact_updated_at'];
|
||||
|
||||
?>
|
||||
<p class="mb-1">
|
||||
<i class="fa fa-fw fa-user text-secondary mr-1"></i>
|
||||
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>"><?php echo $contact_name; ?></a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<p class="mb-1">
|
||||
<i class="fa fa-fw fa-user text-secondary mr-1"></i>
|
||||
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>"><?php echo $contact_name; ?></a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_vendors)) {
|
||||
$vendor_id = $row['vendor_id'];
|
||||
$vendor_name = htmlentities($row['vendor_name']);
|
||||
$vendor_updated_at = $row['vendor_updated_at'];
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_vendors)) {
|
||||
$vendor_id = $row['vendor_id'];
|
||||
$vendor_name = htmlentities($row['vendor_name']);
|
||||
$vendor_updated_at = $row['vendor_updated_at'];
|
||||
|
||||
?>
|
||||
<p class="mb-1">
|
||||
<i class="fas fa-fw fa-building text-secondary mr-1"></i>
|
||||
<a href="client_vendors.php?client_id=<?php echo $client_id; ?>&q=<?php echo $vendor_name; ?>"><?php echo $vendor_name; ?></a></td>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<p class="mb-1">
|
||||
<i class="fas fa-fw fa-building text-secondary mr-1"></i>
|
||||
<a href="client_vendors.php?client_id=<?php echo $client_id; ?>&q=<?php echo $vendor_name; ?>"><?php echo $vendor_name; ?></a></td>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (mysqli_num_rows($sql_contacts) > 0 || mysqli_num_rows($sql_vendors) > 0) { ?>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-fw fa-eye mr-2"></i>Recently Viewed</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-fw fa-eye mr-2"></i>Recently Viewed</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_contacts)) {
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = htmlentities($row['contact_name']);
|
||||
$contact_updated_at = $row['contact_updated_at'];
|
||||
while ($row = mysqli_fetch_array($sql_contacts)) {
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = htmlentities($row['contact_name']);
|
||||
$contact_updated_at = $row['contact_updated_at'];
|
||||
|
||||
?>
|
||||
<p class="mb-1">
|
||||
<i class="fa fa-fw fa-user text-secondary mr-1"></i>
|
||||
<a href="client_contacts.php?client_id=<?php echo $client_id; ?>&q=<?php echo $contact_name; ?>"><?php echo $contact_name; ?></a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<p class="mb-1">
|
||||
<i class="fa fa-fw fa-user text-secondary mr-1"></i>
|
||||
<a href="client_contact_details.php?client_id=<?php echo $client_id; ?>&contact_id=<?php echo $contact_id; ?>"><?php echo $contact_name; ?></a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_vendors)) {
|
||||
$vendor_id = $row['vendor_id'];
|
||||
$vendor_name = htmlentities($row['vendor_name']);
|
||||
$vendor_updated_at = $row['vendor_updated_at'];
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_vendors)) {
|
||||
$vendor_id = $row['vendor_id'];
|
||||
$vendor_name = htmlentities($row['vendor_name']);
|
||||
$vendor_updated_at = $row['vendor_updated_at'];
|
||||
|
||||
?>
|
||||
<p class="mb-1">
|
||||
<i class="fas fa-fw fa-building text-secondary mr-1"></i>
|
||||
<a href="client_vendors.php?client_id=<?php echo $client_id; ?>&q=<?php echo $vendor_name; ?>"><?php echo $vendor_name; ?></a></td>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<p class="mb-1">
|
||||
<i class="fas fa-fw fa-building text-secondary mr-1"></i>
|
||||
<a href="client_vendors.php?client_id=<?php echo $client_id; ?>&q=<?php echo $vendor_name; ?>"><?php echo $vendor_name; ?></a></td>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php
|
||||
if (mysqli_num_rows($sql_domains_expiring) > 0
|
||||
|| mysqli_num_rows($sql_asset_warranties_expiring) > 0
|
||||
|| mysqli_num_rows($sql_asset_retire) > 0
|
||||
) { ?>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="card card-dark mb-3">
|
||||
|
|
@ -252,42 +259,47 @@ $sql_domains_expiring = mysqli_query($mysqli, "SELECT * FROM domains
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if (mysqli_num_rows($sql_tickets_stale) > 0) { ?>
|
||||
|
||||
<!-- Stale Tickets -->
|
||||
<!-- Stale Tickets -->
|
||||
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-5">
|
||||
|
||||
<div class="card card-danger mb-3">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-2"><i class="fa fa-life-ring"></i> Stale Tickets <small class="text-secondary">(14d)</small></h5>
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody>
|
||||
<?php
|
||||
<div class="card card-dark mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-life-ring"></i> Stale Tickets <small>(14d)</small></h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_tickets_stale)) {
|
||||
$ticket_id = $row['ticket_id'];
|
||||
$ticket_prefix = htmlentities($row['ticket_prefix']);
|
||||
$ticket_number = $row['ticket_number'];
|
||||
$ticket_subject = htmlentities($row['ticket_subject']);
|
||||
$ticket_created_at = $row['ticket_created_at'];
|
||||
while ($row = mysqli_fetch_array($sql_tickets_stale)) {
|
||||
$ticket_id = $row['ticket_id'];
|
||||
$ticket_prefix = htmlentities($row['ticket_prefix']);
|
||||
$ticket_number = $row['ticket_number'];
|
||||
$ticket_subject = htmlentities($row['ticket_subject']);
|
||||
$ticket_created_at = $row['ticket_created_at'];
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id?>"><?php echo "$ticket_prefix$ticket_number"; ?></a></td>
|
||||
<td><?php echo $ticket_subject; ?></td>
|
||||
<td class="text-danger"><?php echo $ticket_created_at; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id?>"><?php echo "$ticket_prefix$ticket_number"; ?></a></td>
|
||||
<td><?php echo $ticket_subject; ?></td>
|
||||
<td class="text-danger"><?php echo $ticket_created_at; ?></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue