mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Merge branch 'master' into ticket-statuses
This commit is contained in:
445
ticket.php
445
ticket.php
@@ -92,6 +92,8 @@ if (isset($_GET['ticket_id'])) {
|
||||
$ticket_assigned_to_display = nullable_htmlentities($row['user_name']);
|
||||
}
|
||||
|
||||
$project_id = intval($row['ticket_project_id']);
|
||||
|
||||
$contact_id = intval($row['contact_id']);
|
||||
$contact_name = nullable_htmlentities($row['contact_name']);
|
||||
$contact_title = nullable_htmlentities($row['contact_title']);
|
||||
@@ -229,6 +231,10 @@ if (isset($_GET['ticket_id'])) {
|
||||
);
|
||||
|
||||
|
||||
// Get Watchers
|
||||
$sql_ticket_watchers = mysqli_query($mysqli, "SELECT * FROM ticket_watchers WHERE watcher_ticket_id = $ticket_id ORDER BY watcher_email DESC");
|
||||
|
||||
|
||||
// Get Ticket Attachments
|
||||
$sql_ticket_attachments = mysqli_query(
|
||||
$mysqli,
|
||||
@@ -237,6 +243,10 @@ if (isset($_GET['ticket_id'])) {
|
||||
AND ticket_attachment_ticket_id = $ticket_id"
|
||||
);
|
||||
|
||||
|
||||
// Get Tasks
|
||||
$sql_tasks = mysqli_query( $mysqli, "SELECT * FROM tasks WHERE task_ticket_id = $ticket_id ORDER BY task_created_at ASC");
|
||||
|
||||
?>
|
||||
|
||||
<!-- Breadcrumbs-->
|
||||
@@ -251,13 +261,54 @@ if (isset($_GET['ticket_id'])) {
|
||||
</ol>
|
||||
<div class="card card-body">
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
|
||||
<div class="col-7">
|
||||
<h3><i class="fas fa-fw fa-life-ring text-secondary mr-2"></i>Ticket <?php echo "$ticket_prefix$ticket_number"; ?> <span class='p-2 badge badge-<?php echo $ticket_status_color; ?>'><?php echo getTicketStatusName($ticket_status) ?></span></h3>
|
||||
</div>
|
||||
<?php if (empty($ticket_closed_at)) { ?>
|
||||
<div class="col-3">
|
||||
<div class="dropdown dropleft text-center d-print-none">
|
||||
<button class="btn btn-secondary btn-sm float-right" type="button" id="dropdownMenuButton" data-toggle="dropdown">
|
||||
|
||||
<div class="col-5">
|
||||
|
||||
<div class="btn-group float-right d-print-none">
|
||||
|
||||
<?php if (empty($ticket_closed_at)) { ?>
|
||||
<div class="dropdown dropleft text-center mr-3">
|
||||
<button class="btn btn-default btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown">
|
||||
<i class="fas fa-fw fa-plus mr-2"></i>Add
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addTaskModal">
|
||||
<i class="fas fa-fw fa-tasks mr-2"></i>Create Task
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editTicketContactModal<?php echo $ticket_id; ?>">
|
||||
<i class="fa fa-fw fa-user mr-2"></i>Add Contact
|
||||
</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editTicketAssetModal<?php echo $ticket_id; ?>">
|
||||
<i class="fas fa-fw fa-desktop mr-2"></i>Add Asset
|
||||
</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editTicketVendorModal<?php echo $ticket_id; ?>">
|
||||
<i class="fas fa-fw fa-building mr-2"></i>Add Vendor
|
||||
</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addTicketWatcherModal">
|
||||
<i class="fas fa-fw fa-users mr-2"></i>Add Watcher
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config_module_enable_accounting && $ticket_billable == 1) { ?>
|
||||
<a href="#" class="btn btn-info btn-sm" href="#" data-toggle="modal" data-target="#addInvoiceFromTicketModal">
|
||||
<i class="fas fa-fw fa-file-invoice mr-2"></i>Invoice
|
||||
</a>
|
||||
<?php }
|
||||
|
||||
if (empty($ticket_closed_at)) { ?>
|
||||
<a href="post.php?close_ticket=<?php echo $ticket_id; ?>" class="btn btn-secondary btn-sm confirm-link" id="ticket_close">
|
||||
<i class="fas fa-fw fa-gavel mr-2"></i>Close
|
||||
</a>
|
||||
|
||||
<div class="dropdown dropleft text-center ml-3">
|
||||
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown">
|
||||
<i class="fas fa-fw fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
@@ -278,8 +329,9 @@ if (isset($_GET['ticket_id'])) {
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-info ml-5" id="ticket_collision_viewing"></span>
|
||||
</div>
|
||||
@@ -459,13 +511,12 @@ if (isset($_GET['ticket_id'])) {
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-outline <?php if ($ticket_reply_type == 'Internal') {
|
||||
echo "card-dark";
|
||||
} elseif ($ticket_reply_type == 'Client') {
|
||||
echo "card-warning";
|
||||
} else {
|
||||
echo "card-info";
|
||||
} ?> mb-3">
|
||||
<div class="card card-outline <?php if ($ticket_reply_type == 'Internal') { echo "card-dark";
|
||||
} elseif ($ticket_reply_type == 'Client') {
|
||||
echo "card-warning";
|
||||
} else {
|
||||
echo "card-info";
|
||||
} ?> mb-3">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
<div class="media">
|
||||
@@ -542,22 +593,91 @@ if (isset($_GET['ticket_id'])) {
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<!-- Client card -->
|
||||
<!-- Ticket Details card -->
|
||||
<div class="card card-body card-outline card-primary mb-3">
|
||||
<h5><strong><?php echo $client_name; ?></strong></h5>
|
||||
<h5><strong><?php echo $client_name; ?></h5></strong>
|
||||
<div>
|
||||
<i class="fa fa-fw fa-thermometer-half text-secondary mr-2"></i><a href="#" data-toggle="modal" data-target="#editTicketPriorityModal<?php echo $ticket_id; ?>"><?php echo $ticket_priority_display; ?></a>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-calendar text-secondary mr-2"></i><?php echo $ticket_created_at; ?>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-history text-secondary mr-2"></i>Updated: <strong><?php echo $ticket_updated_at; ?></strong>
|
||||
</div>
|
||||
|
||||
<!-- Ticket closure info -->
|
||||
<?php
|
||||
if (!empty($location_phone)) { ?>
|
||||
if ($ticket_status == "Closed") {
|
||||
$sql_closed_by = mysqli_query($mysqli, "SELECT * FROM tickets, users WHERE ticket_closed_by = user_id");
|
||||
$row = mysqli_fetch_array($sql_closed_by);
|
||||
$ticket_closed_by_display = nullable_htmlentities($row['user_name']);
|
||||
?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i><?php echo $location_phone; ?>
|
||||
<i class="fa fa-fw fa-user text-secondary mr-2"></i>Closed by: <?php echo ucwords($ticket_closed_by_display); ?>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-comment-dots text-secondary mr-2"></i>Feedback: <?php echo $ticket_feedback; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- END Ticket closure info -->
|
||||
|
||||
<?php
|
||||
if (!empty($client_tags_display)) { ?>
|
||||
<div class="mt-1"><?php echo $client_tags_display; ?></div>
|
||||
// Ticket scheduling
|
||||
if (empty ($ticket_closed_at)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-calendar-check text-secondary mr-2"></i>Scheduled: <a href="#" data-toggle="modal" data-target="#editTicketScheduleModal"> <?php echo $ticket_scheduled_wording ?> </a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
// Time tracking
|
||||
if (!empty($ticket_total_reply_time)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="far fa-fw fa-clock text-secondary mr-2"></i>Total time worked: <?php echo $ticket_total_reply_time; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
// Billable
|
||||
if ($config_module_enable_accounting) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-dollar-sign text-secondary mr-2"></i>Billable:
|
||||
<a href="#" data-toggle="modal" data-target="#editTicketBillableModal<?php echo $ticket_id; ?>">
|
||||
<?php
|
||||
if ($ticket_billable == 1) {
|
||||
echo "<span class='badge badge-pill badge-success p-2'>$</span>";
|
||||
} else {
|
||||
echo "<span class='badge badge-pill badge-secondary p-2'>X</span>";
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<hr>
|
||||
|
||||
<!-- Assigned to -->
|
||||
<form action="post.php" method="post">
|
||||
<input type="hidden" name="ticket_id" value="<?php echo $ticket_id; ?>">
|
||||
<input type="hidden" name="ticket_status" value="<?php echo $ticket_status; ?>">
|
||||
<input type="hidden" name="assign_ticket" value="Assign">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select onchange="this.form.submit()" class="form-control select2" name="assigned_to" <?php if ($ticket_status == "Closed") { echo "disabled"; } ?>>
|
||||
<option value="0">Not Assigned</option>
|
||||
<?php
|
||||
while ($row = mysqli_fetch_array($sql_assign_to_select)) {
|
||||
$user_id = intval($row['user_id']);
|
||||
$user_name = nullable_htmlentities($row['user_name']); ?>
|
||||
<option <?php if ($ticket_assigned_to == $user_id) { echo "selected"; } ?> value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
<!-- End Assigned to -->
|
||||
</div>
|
||||
<!-- End Client card -->
|
||||
<!-- End Ticket details card -->
|
||||
|
||||
|
||||
<!-- Contact card -->
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
@@ -566,7 +686,7 @@ if (isset($_GET['ticket_id'])) {
|
||||
<?php if (!empty($contact_id)) { ?>
|
||||
|
||||
<div>
|
||||
<i class="fa fa-fw fa-user text-secondary ml-1 mr-2"></i><a href="#" data-toggle="modal" data-target="#editTicketContactModal<?php echo $ticket_id; ?>"><strong><?php echo $contact_name; ?></strong>
|
||||
<i class="fa fa-fw fa-user text-secondary mr-2"></i><a href="#" data-toggle="modal" data-target="#editTicketContactModal<?php echo $ticket_id; ?>"><strong><?php echo $contact_name; ?></strong>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -574,25 +694,25 @@ if (isset($_GET['ticket_id'])) {
|
||||
|
||||
if (!empty($location_name)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-map-marker-alt text-secondary ml-1 mr-2"></i><?php echo $location_name; ?>
|
||||
<i class="fa fa-fw fa-map-marker-alt text-secondary mr-2"></i><?php echo $location_name; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($contact_email)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-envelope text-secondary ml-1 mr-2"></i><a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a>
|
||||
<i class="fa fa-fw fa-envelope text-secondary mr-2"></i><a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($contact_phone)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2"></i><a href="tel:<?php echo $contact_phone; ?>"><?php echo $contact_phone; ?></a>
|
||||
<i class="fa fa-fw fa-phone text-secondary mr-2"></i><a href="tel:<?php echo $contact_phone; ?>"><?php echo $contact_phone; ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($contact_mobile)) { ?>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-mobile-alt text-secondary ml-1 mr-2"></i><a href="tel:<?php echo $contact_mobile; ?>"><?php echo $contact_mobile; ?></a>
|
||||
<i class="fa fa-fw fa-mobile-alt text-secondary mr-2"></i><a href="tel:<?php echo $contact_mobile; ?>"><?php echo $contact_mobile; ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
@@ -612,11 +732,11 @@ if (isset($_GET['ticket_id'])) {
|
||||
|
||||
<hr>
|
||||
<div>
|
||||
<i class="fa fa-fw fa-history text-secondary ml-1 mr-2"></i><b>Previous ticket:</b>
|
||||
<i class="fa fa-fw fa-history text-secondary mr-2"></i><b>Previous ticket:</b>
|
||||
<a href="ticket.php?ticket_id=<?php echo $prev_ticket_id; ?>"><?php echo $prev_ticket_subject; ?></a>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-hourglass-start text-secondary ml-1 mr-2"></i><strong>Status:</strong>
|
||||
<i class="fa fa-fw fa-hourglass-start text-secondary mr-2"></i><strong>Status:</strong>
|
||||
<span class="text-success"><?php echo $prev_ticket_status; ?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -630,32 +750,86 @@ if (isset($_GET['ticket_id'])) {
|
||||
<!-- End contact card -->
|
||||
|
||||
|
||||
<!-- Ticket watchers card -->
|
||||
<?php
|
||||
$sql_ticket_watchers = mysqli_query($mysqli, "SELECT * FROM ticket_watchers WHERE watcher_ticket_id = $ticket_id ORDER BY watcher_email DESC");
|
||||
<!-- Tasks Card -->
|
||||
<div class="card card-body card-outline card-dark">
|
||||
<h5 class="text-secondary">Tasks</h5>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="ticket_id" value="<?php echo $ticket_id; ?>">
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tasks"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Create Task">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" name="add_task" class="btn btn-dark">
|
||||
<i class="fas fa-fw fa-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table table-sm">
|
||||
<?php
|
||||
while($row = mysqli_fetch_array($sql_tasks)){
|
||||
$task_id = intval($row['task_id']);
|
||||
$task_name = nullable_htmlentities($row['task_name']);
|
||||
$task_description = nullable_htmlentities($row['task_description']);
|
||||
$task_completed_at = nullable_htmlentities($row['task_completed_at']);
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if($task_completed_at) { ?>
|
||||
<i class="far fa-fw fa-check-square text-primary"></i>
|
||||
<?php } else { ?>
|
||||
<a href="post.php?complete_task=<?php echo $task_id; ?>">
|
||||
<i class="far fa-fw fa-square text-secondary"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td><?php echo $task_name; ?></td>
|
||||
<td>
|
||||
<div class="float-right">
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-link text-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||
<i class="fas fa-fw fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editTaskModal<?php echo $task_id; ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger confirm-link" href="post.php?delete_task=<?php echo $task_id; ?>">
|
||||
<i class="fas fa-fw fa-trash-alt mr-2"></i>Delete
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</div>
|
||||
<!-- End Tasks Card -->
|
||||
|
||||
if ($ticket_status !== "Closed" || mysqli_num_rows($sql_ticket_watchers) > 0) { ?>
|
||||
|
||||
<!-- Ticket watchers card -->
|
||||
<?php if ($ticket_status !== "Closed" && mysqli_num_rows($sql_ticket_watchers) > 0) { ?>
|
||||
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
<h5 class="text-secondary">Watchers</h5>
|
||||
|
||||
<?php if ($ticket_status !== "Closed") { ?>
|
||||
<div class="d-print-none">
|
||||
<a href="#" data-toggle="modal" data-target="#addTicketWatcherModal"><i class="fa fa-fw fa-plus mr-2"></i>Add a Watcher</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
// Get Watchers
|
||||
while ($ticket_watcher_row = mysqli_fetch_array($sql_ticket_watchers)) {
|
||||
$watcher_id = intval($ticket_watcher_row['watcher_id']);
|
||||
$ticket_watcher_email = nullable_htmlentities($ticket_watcher_row['watcher_email']);
|
||||
while ($row = mysqli_fetch_array($sql_ticket_watchers)) {
|
||||
$watcher_id = intval($row['watcher_id']);
|
||||
$ticket_watcher_email = nullable_htmlentities($row['watcher_email']);
|
||||
?>
|
||||
<div class='mt-1'>
|
||||
<i class="fa fa-fw fa-eye text-secondary ml-1 mr-2"></i><?php echo $ticket_watcher_email; ?>
|
||||
<i class="fa fa-fw fa-eye text-secondary mr-2"></i><?php echo $ticket_watcher_email; ?>
|
||||
<?php if ($ticket_status !== "Closed") { ?>
|
||||
<a class="confirm-link" href="post.php?delete_ticket_watcher=<?php echo $watcher_id; ?>">
|
||||
<i class="fas fa-fw fa-times text-secondary ml-1"></i>
|
||||
<a class="confirm-link float-right" href="post.php?delete_ticket_watcher=<?php echo $watcher_id; ?>">
|
||||
<i class="fas fa-fw fa-trash-alt text-secondary"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -665,119 +839,47 @@ if (isset($_GET['ticket_id'])) {
|
||||
<?php } ?>
|
||||
<!-- End Ticket watchers card -->
|
||||
|
||||
|
||||
<!-- Ticket Details card -->
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
<h5 class="text-secondary">Details</h5>
|
||||
<div>
|
||||
<i class="fa fa-fw fa-thermometer-half text-secondary ml-1 mr-2"></i><a href="#" data-toggle="modal" data-target="#editTicketPriorityModal<?php echo $ticket_id; ?>"><?php echo $ticket_priority_display; ?></a>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-calendar text-secondary ml-1 mr-2"></i>Created: <?php echo $ticket_created_at; ?>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<i class="fa fa-fw fa-history text-secondary ml-1 mr-2"></i>Updated: <strong><?php echo $ticket_updated_at; ?></strong>
|
||||
</div>
|
||||
|
||||
<!-- Ticket closure info -->
|
||||
<?php
|
||||
if (!empty($ticket_closed_at)) {
|
||||
$sql_closed_by = mysqli_query($mysqli, "SELECT * FROM tickets, users WHERE ticket_closed_by = user_id");
|
||||
$row = mysqli_fetch_array($sql_closed_by);
|
||||
$ticket_closed_by_display = nullable_htmlentities($row['user_name']);
|
||||
?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-user text-secondary ml-1 mr-2"></i>Closed by: <?php echo ucwords($ticket_closed_by_display); ?>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-comment-dots text-secondary ml-1 mr-2"></i>Feedback: <?php echo $ticket_feedback; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- END Ticket closure info -->
|
||||
|
||||
<?php
|
||||
// Ticket scheduling
|
||||
if (empty ($ticket_closed_at)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-calendar-check text-secondary ml-1 mr-2"></i>Scheduled: <a href="#" data-toggle="modal" data-target="#editTicketScheduleModal"> <?php echo $ticket_scheduled_wording ?> </a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
// Time tracking
|
||||
if (!empty($ticket_total_reply_time)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="far fa-fw fa-clock text-secondary ml-1 mr-2"></i>Total time worked: <?php echo $ticket_total_reply_time; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
// Billable
|
||||
if ($config_module_enable_accounting) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-dollar-sign text-secondary ml-1 mr-2"></i>Billable:
|
||||
<a href="#" data-toggle="modal" data-target="#editTicketBillableModal<?php echo $ticket_id; ?>">
|
||||
<?php
|
||||
if ($ticket_billable == 1) {
|
||||
echo "<span class='badge badge-pill badge-success p-2'>$</span>";
|
||||
} else {
|
||||
echo "<span class='badge badge-pill badge-secondary p-2'>X</span>";
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- End Ticket details card -->
|
||||
|
||||
|
||||
<!-- Asset card -->
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
<h5 class="text-secondary">Asset</h5>
|
||||
|
||||
<?php if ($asset_id == 0) { ?>
|
||||
|
||||
<div class="d-print-none">
|
||||
<a href="#" data-toggle="modal" data-target="#editTicketAssetModal<?php echo $ticket_id; ?>"><i class="fa fa-fw fa-plus mr-2"></i>Add an Asset</a>
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if ($asset_id) { ?>
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
<h5 class="text-secondary">Asset</h5>
|
||||
<div>
|
||||
<a href='client_asset_details.php?client_id=<?php echo $client_id ?>&asset_id=<?php echo $asset_id ?>'><i class="fa fa-fw fa-desktop text-secondary ml-1 mr-2"></i><strong><?php echo $asset_name; ?></strong></a>
|
||||
<a href='client_asset_details.php?client_id=<?php echo $client_id ?>&asset_id=<?php echo $asset_id ?>'><i class="fa fa-fw fa-desktop text-secondary mr-2"></i><strong><?php echo $asset_name; ?></strong></a>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($asset_os)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fab fa-fw fa-microsoft text-secondary ml-1 mr-2"></i><?php echo $asset_os; ?>
|
||||
<i class="fab fa-fw fa-microsoft text-secondary mr-2"></i><?php echo $asset_os; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($asset_ip)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-network-wired text-secondary ml-1 mr-2"></i><?php echo $asset_ip; ?>
|
||||
<i class="fa fa-fw fa-network-wired text-secondary mr-2"></i><?php echo $asset_ip; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($asset_make)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2"></i>Model: <?php echo "$asset_make $asset_model"; ?>
|
||||
<i class="fa fa-fw fa-tag text-secondary mr-2"></i>Model: <?php echo "$asset_make $asset_model"; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($asset_serial)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-barcode text-secondary ml-1 mr-2"></i>Service Tag: <?php echo $asset_serial; ?>
|
||||
<i class="fa fa-fw fa-barcode text-secondary mr-2"></i>Service Tag: <?php echo $asset_serial; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($asset_warranty_expire)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="far fa-fw fa-calendar-alt text-secondary ml-1 mr-2"></i>Warranty expires: <strong><?php echo $asset_warranty_expire ?></strong>
|
||||
<i class="far fa-fw fa-calendar-alt text-secondary mr-2"></i>Warranty expires: <strong><?php echo $asset_warranty_expire ?></strong>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($asset_uri)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-globe text-secondary ml-1 mr-2"></i><a href="<?php echo $asset_uri; ?>" target="_blank"><?php echo $asset_uri; ?></a>
|
||||
<i class="fa fa-fw fa-globe text-secondary mr-2"></i><a href="<?php echo $asset_uri; ?>" target="_blank">Access <i class="fas fa-fw fa-external-link-alt"></i></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
@@ -823,114 +925,55 @@ if (isset($_GET['ticket_id'])) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } // End Ticket asset Count
|
||||
?>
|
||||
|
||||
<?php } // End if asset_id == 0 else
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php } // End Ticket asset Count ?>
|
||||
</div>
|
||||
<?php } // End if asset_id ?>
|
||||
<!-- End Asset card -->
|
||||
|
||||
|
||||
<!-- Vendor card -->
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
<h5 class="text-secondary">Vendor</h5>
|
||||
<?php if (empty($vendor_id)) { ?>
|
||||
<div class="d-print-none">
|
||||
<a href="#" data-toggle="modal" data-target="#editTicketVendorModal<?php echo $ticket_id; ?>"><i class="fa fa-fw fa-plus mr-2"></i>Add a Vendor</a>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<?php if ($vendor_id) { ?>
|
||||
<div class="card card-body card-outline card-dark mb-3">
|
||||
<h5 class="text-secondary">Vendor</h5>
|
||||
|
||||
<div>
|
||||
<i class="fa fa-fw fa-building text-secondary ml-1 mr-2"></i><strong><?php echo $vendor_name; ?></strong>
|
||||
<i class="fa fa-fw fa-building text-secondary mr-2"></i><strong><?php echo $vendor_name; ?></strong>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if (!empty($vendor_contact_name)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-user text-secondary ml-1 mr-2"></i><?php echo $vendor_contact_name; ?>
|
||||
<i class="fa fa-fw fa-user text-secondary mr-2"></i><?php echo $vendor_contact_name; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($ticket_vendor_ticket_number)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-tag text-secondary ml-1 mr-2"></i><?php echo $ticket_vendor_ticket_number; ?>
|
||||
<i class="fa fa-fw fa-tag text-secondary mr-2"></i><?php echo $ticket_vendor_ticket_number; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($vendor_email)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-envelope text-secondary ml-1 mr-2"></i><a href="mailto:<?php echo $vendor_email; ?>"><?php echo $vendor_email; ?></a>
|
||||
<i class="fa fa-fw fa-envelope text-secondary mr-2"></i><a href="mailto:<?php echo $vendor_email; ?>"><?php echo $vendor_email; ?></a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($vendor_phone)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2"></i><?php echo $vendor_phone; ?>
|
||||
<i class="fa fa-fw fa-phone text-secondary mr-2"></i><?php echo $vendor_phone; ?>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
if (!empty($vendor_website)) { ?>
|
||||
<div class="mt-1">
|
||||
<i class="fa fa-fw fa-globe text-secondary ml-1 mr-2"></i><?php echo $vendor_website; ?>
|
||||
<i class="fa fa-fw fa-globe text-secondary mr-2"></i><?php echo $vendor_website; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } //End Else
|
||||
?>
|
||||
</div>
|
||||
<!-- End Vendor card -->
|
||||
|
||||
|
||||
<!-- Assigned to -->
|
||||
<form action="post.php" method="post">
|
||||
<input type="hidden" name="ticket_id" value="<?php echo $ticket_id; ?>">
|
||||
<input type="hidden" name="ticket_status" value="<?php echo $ticket_status; ?>">
|
||||
<div class="form-group">
|
||||
<label>Assigned to</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="assigned_to" <?php if ($ticket_status == "Closed") {
|
||||
echo "disabled";
|
||||
} ?>>
|
||||
<option value="0">Not Assigned</option>
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_assign_to_select)) {
|
||||
$user_id = intval($row['user_id']);
|
||||
$user_name = nullable_htmlentities($row['user_name']); ?>
|
||||
<option <?php if ($ticket_assigned_to == $user_id) {
|
||||
echo "selected";
|
||||
} ?> value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="input-group-append d-print-none">
|
||||
<button type="submit" class="btn btn-primary" name="assign_ticket" <?php if (!empty($ticket_closed_at)) {
|
||||
echo "disabled";
|
||||
} ?>><i class="fas fa-check"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<!-- End Assigned to -->
|
||||
|
||||
|
||||
<!-- Invoice / Close Ticket -->
|
||||
<div class="card card-body card-outline card-dark mb-2 d-print-none">
|
||||
<?php if ($config_module_enable_accounting && $ticket_billable == 1) { ?>
|
||||
<a href="#" class="btn btn-info btn-block" href="#" data-toggle="modal" data-target="#addInvoiceFromTicketModal">
|
||||
<i class="fas fa-fw fa-file-invoice mr-2"></i>Invoice Ticket
|
||||
</a>
|
||||
<?php }
|
||||
|
||||
if (empty($ticket_closed_at)) { ?>
|
||||
<a href="post.php?close_ticket=<?php echo $ticket_id; ?>" class="btn btn-secondary btn-block confirm-link" id="ticket_close">
|
||||
<i class="fas fa-fw fa-gavel mr-2"></i>Close Ticket
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } //End Else ?>
|
||||
<!-- End Vendor card -->
|
||||
|
||||
</div> <!-- End col-3 -->
|
||||
|
||||
@@ -955,6 +998,8 @@ if (isset($_GET['ticket_id'])) {
|
||||
|
||||
require_once "ticket_merge_modal.php";
|
||||
|
||||
require_once "task_add_modal.php";
|
||||
|
||||
if ($config_module_enable_accounting) {
|
||||
require_once "ticket_edit_billable_modal.php";
|
||||
require_once "ticket_invoice_add_modal.php";
|
||||
|
||||
Reference in New Issue
Block a user