cleanups
This commit is contained in:
@@ -41,7 +41,6 @@ while ($row = mysqli_fetch_array($sql)) {
|
||||
$client_id = intval($row['event_client_id']);
|
||||
|
||||
require "calendar_event_edit_modal.php";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -52,7 +51,6 @@ while ($row = mysqli_fetch_array($sql)) {
|
||||
<script src='plugins/fullcalendar/main.min.js'></script>
|
||||
|
||||
<script>
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var calendarEl = document.getElementById('calendar');
|
||||
|
||||
@@ -121,7 +119,6 @@ while ($row = mysqli_fetch_array($sql)) {
|
||||
$event_start = json_encode($row['ticket_created_at']);
|
||||
|
||||
echo "{ id: $event_id, title: $event_title, start: $event_start, color: 'orange', url: 'ticket.php?ticket_id=$event_id' },";
|
||||
|
||||
}
|
||||
|
||||
//Tickets Scheduled
|
||||
@@ -181,7 +178,6 @@ while ($row = mysqli_fetch_array($sql)) {
|
||||
|
||||
calendar.render();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Automatically set new event end date to 1 hr after start date -->
|
||||
|
||||
+3
-1
@@ -131,6 +131,7 @@ if (mysqli_num_rows($sql_failed_queue) > 0) {
|
||||
$email_content = $row['email_content'];
|
||||
$email_queued_at = $row['email_queued_at'];
|
||||
$email_sent_at = $row['email_sent_at'];
|
||||
$email_ics_str = $row['email_cal_str'];
|
||||
// Increment the attempts
|
||||
$email_attempts = intval($row['email_attempts']) + 1;
|
||||
|
||||
@@ -155,7 +156,8 @@ if (mysqli_num_rows($sql_failed_queue) > 0) {
|
||||
$email_recipient,
|
||||
$email_recipient_name,
|
||||
$email_subject,
|
||||
$email_content
|
||||
$email_content,
|
||||
$email_ics_str
|
||||
);
|
||||
|
||||
if ($mail !== true) {
|
||||
|
||||
+23
-10
@@ -34,7 +34,8 @@ $sql_years_select = mysqli_query(
|
||||
UNION DISTINCT SELECT YEAR(client_created_at) FROM clients
|
||||
UNION DISTINCT SELECT YEAR(user_created_at) FROM users
|
||||
ORDER BY all_years DESC
|
||||
");
|
||||
"
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -51,7 +52,9 @@ $sql_years_select = mysqli_query(
|
||||
$year_select = date('Y');
|
||||
}
|
||||
?>
|
||||
<option <?php if ($year == $year_select) { echo "selected"; } ?> > <?php echo $year_select; ?></option>
|
||||
<option <?php if ($year == $year_select) {
|
||||
echo "selected";
|
||||
} ?>> <?php echo $year_select; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
@@ -60,14 +63,18 @@ $sql_years_select = mysqli_query(
|
||||
|
||||
<?php if ($session_user_role == 1 || $session_user_role == 3 && $config_module_enable_accounting == 1) { ?>
|
||||
<div class="custom-control custom-switch mr-sm-3 mb-3">
|
||||
<input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch1" name="enable_financial" value="1" <?php if($user_config_dashboard_financial_enable == 1) { echo "checked"; } ?>>
|
||||
<input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch1" name="enable_financial" value="1" <?php if ($user_config_dashboard_financial_enable == 1) {
|
||||
echo "checked";
|
||||
} ?>>
|
||||
<label class="custom-control-label" for="customSwitch1">Toggle Financial</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($session_user_role >= 2 && $config_module_enable_ticketing == 1) { ?>
|
||||
<div class="custom-control custom-switch mb-3">
|
||||
<input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch2" name="enable_technical" value="1" <?php if($user_config_dashboard_technical_enable == 1) { echo "checked"; } ?>>
|
||||
<input type="checkbox" onchange="this.form.submit()" class="custom-control-input" id="customSwitch2" name="enable_technical" value="1" <?php if ($user_config_dashboard_technical_enable == 1) {
|
||||
echo "checked";
|
||||
} ?>>
|
||||
<label class="custom-control-label" for="customSwitch2">Toggle Technical</label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -268,7 +275,9 @@ $vendors_added = intval($row['vendors_added']);
|
||||
<a class="small-box bg-secondary" href="report_tickets_unbilled.php">
|
||||
<div class="inner">
|
||||
<h3><?php echo $unbilled_tickets; ?></h3>
|
||||
<p>Unbilled Ticket<?php if ($unbilled_tickets > 1 || $unbilled_tickets = 0) { echo "s";}?></p>
|
||||
<p>Unbilled Ticket<?php if ($unbilled_tickets > 1 || $unbilled_tickets = 0) {
|
||||
echo "s";
|
||||
} ?></p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-ticket-alt"></i>
|
||||
@@ -811,7 +820,9 @@ $sql_your_tickets = mysqli_query(
|
||||
|
||||
?>
|
||||
|
||||
<tr class="<?php if(empty($ticket_updated_at)) { echo "text-bold"; }?>">
|
||||
<tr class="<?php if (empty($ticket_updated_at)) {
|
||||
echo "text-bold";
|
||||
} ?>">
|
||||
<td><a class="text-dark" href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><?php echo "$ticket_prefix$ticket_number"; ?></a></td>
|
||||
<td>
|
||||
<a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><?php echo $ticket_subject; ?></a>
|
||||
@@ -1012,7 +1023,8 @@ $sql_your_tickets = mysqli_query(
|
||||
?>
|
||||
|
||||
],
|
||||
}],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
@@ -1030,7 +1042,8 @@ $sql_your_tickets = mysqli_query(
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: <?php $max = max(1000, $largest_expense_month, $largest_income_month, $largest_invoice_month); echo roundUpToNearestMultiple($max); ?>,
|
||||
max: <?php $max = max(1000, $largest_expense_month, $largest_income_month, $largest_invoice_month);
|
||||
echo roundUpToNearestMultiple($max); ?>,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
@@ -1107,7 +1120,8 @@ $sql_your_tickets = mysqli_query(
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
min: 0,
|
||||
max: <?php $max = max(1000, $largest_trip_miles_month); echo roundUpToNearestMultiple($max); ?>,
|
||||
max: <?php $max = max(1000, $largest_trip_miles_month);
|
||||
echo roundUpToNearestMultiple($max); ?>,
|
||||
maxTicksLimit: 5
|
||||
},
|
||||
gridLines: {
|
||||
@@ -1308,5 +1322,4 @@ $sql_your_tickets = mysqli_query(
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
+95
-66
File diff suppressed because one or more lines are too long
@@ -1630,4 +1630,3 @@ if (isset($_POST['edit_ticket_schedule'])) {
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
}
|
||||
|
||||
?>
|
||||
<option value="<?php echo $contact_id; ?>" <?php if ($contact_primary == 1) { echo "selected"; } ?>><?php echo "$contact_name$contact_title_display$contact_primary_display$contact_technical_display"; ?></option>
|
||||
<option value="<?php echo $contact_id; ?>" <?php if ($contact_primary == 1) {
|
||||
echo "selected";
|
||||
} ?>><?php echo "$contact_name$contact_title_display$contact_primary_display$contact_technical_display"; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="input-group mb-3 mb-md-0">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(nullable_htmlentities($q)); } ?>" placeholder="Search Scheduled Tickets">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) {
|
||||
echo stripslashes(nullable_htmlentities($q));
|
||||
} ?>" placeholder="Search Scheduled Tickets">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
@@ -55,8 +57,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<button class="dropdown-item text-danger text-bold"
|
||||
type="submit" form="multi_actions" name="bulk_delete_scheduled_tickets">
|
||||
<button class="dropdown-item text-danger text-bold" type="submit" form="multi_actions" name="bulk_delete_scheduled_tickets">
|
||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||
</button>
|
||||
</div>
|
||||
@@ -116,8 +117,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</th>
|
||||
|
||||
<td>
|
||||
<a href="#" data-toggle="modal" data-target="#editScheduledTicketModal"
|
||||
onclick="populateScheduledTicketEditModal(<?php echo $scheduled_ticket_client_id, ",", $scheduled_ticket_id ?>)"> <?php echo $scheduled_ticket_subject ?>
|
||||
<a href="#" data-toggle="modal" data-target="#editScheduledTicketModal" onclick="populateScheduledTicketEditModal(<?php echo $scheduled_ticket_client_id, ",", $scheduled_ticket_id ?>)"> <?php echo $scheduled_ticket_subject ?>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -133,8 +133,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal"
|
||||
data-target="#editScheduledTicketModal" onclick="populateScheduledTicketEditModal(<?php echo $scheduled_ticket_client_id, ",", $scheduled_ticket_id ?>)">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editScheduledTicketModal" onclick="populateScheduledTicketEditModal(<?php echo $scheduled_ticket_client_id, ",", $scheduled_ticket_id ?>)">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<?php
|
||||
@@ -175,4 +174,3 @@ require_once "scheduled_ticket_add_modal.php";
|
||||
require_once "scheduled_ticket_edit_modal.php";
|
||||
|
||||
require_once "footer.php";
|
||||
|
||||
|
||||
+54
-18
@@ -14,14 +14,18 @@
|
||||
<ul class="nav nav-pills nav-sidebar flex-column mt-3" data-widget="treeview" data-accordion="false">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="dashboard.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "dashboard.php") { echo "active"; } ?>">
|
||||
<a href="dashboard.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "dashboard.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-tachometer-alt"></i>
|
||||
<p>Dashboard</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="clients.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "clients.php") { echo "active"; } ?>">
|
||||
<a href="clients.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "clients.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-user-friends"></i>
|
||||
<p>Clients</p>
|
||||
</a>
|
||||
@@ -31,7 +35,9 @@
|
||||
|
||||
<li class="nav-header mt-3">SUPPORT</li>
|
||||
<li class="nav-item">
|
||||
<a href="tickets.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "tickets.php" || basename($_SERVER["PHP_SELF"]) == "ticket.php" || basename($_SERVER["PHP_SELF"]) == "scheduled_tickets.php") { echo "active"; } ?>">
|
||||
<a href="tickets.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "tickets.php" || basename($_SERVER["PHP_SELF"]) == "ticket.php" || basename($_SERVER["PHP_SELF"]) == "scheduled_tickets.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-life-ring"></i>
|
||||
<p>Tickets</p>
|
||||
</a>
|
||||
@@ -40,7 +46,9 @@
|
||||
<?php } ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="calendar_events.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "calendar_events.php") { echo "active"; } ?>">
|
||||
<a href="calendar_events.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "calendar_events.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-calendar-alt"></i>
|
||||
<p>Calendar</p>
|
||||
</a>
|
||||
@@ -50,31 +58,41 @@
|
||||
|
||||
<li class="nav-header mt-3">SALES</li>
|
||||
<li class="nav-item">
|
||||
<a href="quotes.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "quotes.php" || basename($_SERVER["PHP_SELF"]) == "quote.php") { echo "active"; } ?>">
|
||||
<a href="quotes.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "quotes.php" || basename($_SERVER["PHP_SELF"]) == "quote.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-comment-dollar"></i>
|
||||
<p>Quotes</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="invoices.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "invoices.php" || basename($_SERVER["PHP_SELF"]) == "invoice.php") { echo "active"; } ?>">
|
||||
<a href="invoices.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "invoices.php" || basename($_SERVER["PHP_SELF"]) == "invoice.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-file-invoice"></i>
|
||||
<p>Invoices</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="recurring_invoices.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "recurring_invoices.php") { echo "active"; } ?>">
|
||||
<a href="recurring_invoices.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "recurring_invoices.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-redo-alt"></i>
|
||||
<p>Recurring Invoices</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="revenues.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "revenues.php") { echo "active"; } ?>">
|
||||
<a href="revenues.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "revenues.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-hand-holding-usd"></i>
|
||||
<p>Revenues</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="products.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "products.php") { echo "active"; } ?>">
|
||||
<a href="products.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "products.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-box-open"></i>
|
||||
<p>Products</p>
|
||||
</a>
|
||||
@@ -86,49 +104,65 @@
|
||||
|
||||
<li class="nav-header mt-3">FINANCE</li>
|
||||
<li class="nav-item">
|
||||
<a href="payments.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "payments.php") { echo "active"; } ?>">
|
||||
<a href="payments.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "payments.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-credit-card"></i>
|
||||
<p>Payments</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="vendors.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "vendors.php") { echo "active"; } ?>">
|
||||
<a href="vendors.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "vendors.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-building"></i>
|
||||
<p>Vendors</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="expenses.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "expenses.php") { echo "active"; } ?>">
|
||||
<a href="expenses.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "expenses.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-shopping-cart"></i>
|
||||
<p>Expenses</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="recurring_expenses.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "recurring_expenses.php") { echo "active"; } ?>">
|
||||
<a href="recurring_expenses.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "recurring_expenses.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-redo-alt"></i>
|
||||
<p>Recurring Expenses</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="accounts.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "accounts.php") { echo "active"; } ?>">
|
||||
<a href="accounts.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "accounts.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-piggy-bank"></i>
|
||||
<p>Accounts</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="transfers.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "transfers.php") { echo "active"; } ?>">
|
||||
<a href="transfers.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "transfers.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-exchange-alt"></i>
|
||||
<p>Transfers</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="budget.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "budget.php") { echo "active"; } ?>">
|
||||
<a href="budget.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "budget.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-balance-scale"></i>
|
||||
<p>Budget</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="trips.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "trips.php") { echo "active"; } ?>">
|
||||
<a href="trips.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "trips.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="nav-icon fas fa-route"></i>
|
||||
<p>Trips</p>
|
||||
</a>
|
||||
@@ -139,7 +173,9 @@
|
||||
<li class="nav-header mt-3">MORE</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="report_income_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_income_summary.php") { echo "active"; } ?>">
|
||||
<a href="report_income_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_income_summary.php") {
|
||||
echo "active";
|
||||
} ?>">
|
||||
<i class="fas fa-chart-line nav-icon"></i>
|
||||
<p>Reports</p>
|
||||
<i class="fas fa-angle-right nav-icon float-right"></i>
|
||||
|
||||
+45
-24
@@ -34,8 +34,6 @@ if (isset($_GET['ticket_id'])) {
|
||||
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1><a class='btn btn-lg btn-secondary mt-3' href='tickets.php'><i class='fa fa-fw fa-arrow-left'></i> Go Back</a></center>";
|
||||
|
||||
include_once "footer.php";
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$row = mysqli_fetch_array($sql);
|
||||
@@ -193,13 +191,15 @@ if (isset($_GET['ticket_id'])) {
|
||||
$warranty_check = date('m/d/Y', strtotime('-8 hours'));
|
||||
|
||||
if ($dt_value <= $date) {
|
||||
$dt_value = "Expired on $asset_warranty_expire"; $warranty_status_color ='red';
|
||||
$dt_value = "Expired on $asset_warranty_expire";
|
||||
$warranty_status_color = 'red';
|
||||
} else {
|
||||
$warranty_status_color = 'green';
|
||||
}
|
||||
|
||||
if ($asset_warranty_expire == "NULL") {
|
||||
$dt_value = "None"; $warranty_status_color ='red';
|
||||
$dt_value = "None";
|
||||
$warranty_status_color = 'red';
|
||||
}
|
||||
|
||||
// Get all ticket replies
|
||||
@@ -312,12 +312,22 @@ if (isset($_GET['ticket_id'])) {
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-thermometer-half"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="status" required>
|
||||
<option <?php if ($ticket_status == "In-Progress") {echo "selected";}?> >In-Progress</option>
|
||||
<option <?php if ($ticket_status == "Pending-Client") {echo "selected";}?> >Pending-Client</option>
|
||||
<option <?php if ($ticket_status == "Pending-Vendor") {echo "selected";}?> >Pending-Vendor</option>
|
||||
<option <?php if ($ticket_status == "Pending-Shipment") {echo "selected";}?> >Pending-Shipment</option>
|
||||
<option <?php if ($ticket_status == "In-Progress") {
|
||||
echo "selected";
|
||||
} ?>>In-Progress</option>
|
||||
<option <?php if ($ticket_status == "Pending-Client") {
|
||||
echo "selected";
|
||||
} ?>>Pending-Client</option>
|
||||
<option <?php if ($ticket_status == "Pending-Vendor") {
|
||||
echo "selected";
|
||||
} ?>>Pending-Vendor</option>
|
||||
<option <?php if ($ticket_status == "Pending-Shipment") {
|
||||
echo "selected";
|
||||
} ?>>Pending-Shipment</option>
|
||||
<?php if ($config_ticket_autoclose) { ?>
|
||||
<option <?php if ($ticket_status == 'Auto Close') { echo "selected"; } ?> >Auto Close</option>
|
||||
<option <?php if ($ticket_status == 'Auto Close') {
|
||||
echo "selected";
|
||||
} ?>>Auto Close</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -426,7 +436,13 @@ 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">
|
||||
@@ -442,7 +458,9 @@ if (isset($_GET['ticket_id'])) {
|
||||
<div class="media-body">
|
||||
<?php echo $ticket_reply_by_display; ?>
|
||||
<div>
|
||||
<small class="text-muted"><?php echo $ticket_reply_created_at; ?> <?php if (!empty($ticket_reply_updated_at)) { echo "modified: $ticket_reply_updated_at"; } ?></small>
|
||||
<small class="text-muted"><?php echo $ticket_reply_created_at; ?> <?php if (!empty($ticket_reply_updated_at)) {
|
||||
echo "modified: $ticket_reply_updated_at";
|
||||
} ?></small>
|
||||
</div>
|
||||
<?php if ($ticket_reply_type !== "Client") { ?>
|
||||
<div>
|
||||
@@ -493,8 +511,6 @@ if (isset($_GET['ticket_id'])) {
|
||||
<?php
|
||||
|
||||
require "ticket_reply_edit_modal.php";
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -608,8 +624,7 @@ if (isset($_GET['ticket_id'])) {
|
||||
?>
|
||||
<div class='mt-1'>
|
||||
<i class="fa fa-fw fa-eye text-secondary ml-1 mr-2"></i><?php echo $ticket_watcher_email; ?>
|
||||
<a class="confirm-link"
|
||||
href="post.php?delete_ticket_watcher=<?php echo $watcher_id; ?>">
|
||||
<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>
|
||||
</div>
|
||||
@@ -774,9 +789,11 @@ if (isset($_GET['ticket_id'])) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } // End Ticket asset Count ?>
|
||||
<?php } // End Ticket asset Count
|
||||
?>
|
||||
|
||||
<?php } // End if asset_id == 0 else ?>
|
||||
<?php } // End if asset_id == 0 else
|
||||
?>
|
||||
|
||||
</div>
|
||||
<!-- End Asset card -->
|
||||
@@ -824,7 +841,8 @@ if (isset($_GET['ticket_id'])) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } //End Else ?>
|
||||
<?php } //End Else
|
||||
?>
|
||||
</div>
|
||||
<!-- End Vendor card -->
|
||||
|
||||
@@ -837,18 +855,24 @@ if (isset($_GET['ticket_id'])) {
|
||||
<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";} ?>>
|
||||
<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>
|
||||
<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 ($ticket_status == "Closed") {echo "disabled";} ?>><i class="fas fa-check"></i></button>
|
||||
<button type="submit" class="btn btn-primary" name="assign_ticket" <?php if ($ticket_status == "Closed") {
|
||||
echo "disabled";
|
||||
} ?>><i class="fas fa-check"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -895,9 +919,7 @@ if (isset($_GET['ticket_id'])) {
|
||||
require_once "ticket_edit_billable_modal.php";
|
||||
require_once "ticket_invoice_add_modal.php";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -921,4 +943,3 @@ if ($ticket_status !== "Closed") { ?>
|
||||
<?php } ?>
|
||||
|
||||
<script src="js/pretty_content.js"></script>
|
||||
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
<div class="form-group">
|
||||
<label>Scheduled Date and Time</label>
|
||||
<?php if (!$ticket_scheduled_for) { ?>
|
||||
<input type="datetime-local" class="form-control" name="scheduled_date_time"
|
||||
placeholder="Scheduled Date & Time">
|
||||
<input type="datetime-local" class="form-control" name="scheduled_date_time" placeholder="Scheduled Date & Time">
|
||||
<?php } else { ?>
|
||||
<input type="datetime-local" class="form-control" name="scheduled_date_time"
|
||||
value="<?php echo $ticket_scheduled_for; ?>">
|
||||
<input type="datetime-local" class="form-control" name="scheduled_date_time" value="<?php echo $ticket_scheduled_for; ?>">
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
@@ -34,10 +32,8 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="edit_ticket_schedule" class="btn btn-primary text-bold"><i
|
||||
class="fa fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i
|
||||
class="fa fa-times mr-2"></i>Cancel</button>
|
||||
<button type="submit" name="edit_ticket_schedule" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
+54
-37
@@ -117,10 +117,11 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(nullable_htmlentities($q)); } ?>" placeholder="Search Tickets">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) {
|
||||
echo stripslashes(nullable_htmlentities($q));
|
||||
} ?>" placeholder="Search Tickets">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-secondary" type="button" data-toggle="collapse"
|
||||
data-target="#advancedFilter"><i class="fas fa-filter"></i></button>
|
||||
<button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#advancedFilter"><i class="fas fa-filter"></i></button>
|
||||
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -172,7 +173,9 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="collapse <?php if (!empty($_GET['dtf']) || (isset($_GET['canned_date']) && $_GET['canned_date'] !== "custom") || (isset($_GET['status']) && is_array($_GET['status']))) { echo "show"; } ?>" id="advancedFilter">
|
||||
<div class="collapse <?php if (!empty($_GET['dtf']) || (isset($_GET['canned_date']) && $_GET['canned_date'] !== "custom") || (isset($_GET['status']) && is_array($_GET['status']))) {
|
||||
echo "show";
|
||||
} ?>" id="advancedFilter">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
@@ -233,13 +236,27 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
<div class="form-group">
|
||||
<label>Ticket Status</label>
|
||||
<select class="form-control select2" name="status[]" data-placeholder="Select Status" multiple>
|
||||
<option value="In-Progress" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('In-Progress', $_GET['status'])) { echo 'selected'; } ?> >In-Progress</option>
|
||||
<option value="Client-Replied" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Client-Replied', $_GET['status'])) { echo 'selected'; } ?> >Client-Replied</option>
|
||||
<option value="Pending-Client" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Pending-Client', $_GET['status'])) { echo 'selected'; } ?> >Pending-Client</option>
|
||||
<option value="Pending-Vendor" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Pending-Vendor', $_GET['status'])) { echo 'selected'; } ?> >Pending-Vendor</option>
|
||||
<option value="Pending-Shipment" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Pending-Shipment', $_GET['status'])) { echo 'selected'; } ?> >Pending-Shipment</option>
|
||||
<option value="Scheduled" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Scheduled', $_GET['status'])) { echo 'selected'; } ?> >Scheduled</option>
|
||||
<option value="Closed" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Closed', $_GET['status'])) { echo 'selected'; } ?> >Closed</option>
|
||||
<option value="In-Progress" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('In-Progress', $_GET['status'])) {
|
||||
echo 'selected';
|
||||
} ?>>In-Progress</option>
|
||||
<option value="Client-Replied" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Client-Replied', $_GET['status'])) {
|
||||
echo 'selected';
|
||||
} ?>>Client-Replied</option>
|
||||
<option value="Pending-Client" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Pending-Client', $_GET['status'])) {
|
||||
echo 'selected';
|
||||
} ?>>Pending-Client</option>
|
||||
<option value="Pending-Vendor" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Pending-Vendor', $_GET['status'])) {
|
||||
echo 'selected';
|
||||
} ?>>Pending-Vendor</option>
|
||||
<option value="Pending-Shipment" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Pending-Shipment', $_GET['status'])) {
|
||||
echo 'selected';
|
||||
} ?>>Pending-Shipment</option>
|
||||
<option value="Scheduled" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Scheduled', $_GET['status'])) {
|
||||
echo 'selected';
|
||||
} ?>>Scheduled</option>
|
||||
<option value="Closed" <?php if (isset($_GET['status']) && is_array($_GET['status']) && in_array('Closed', $_GET['status'])) {
|
||||
echo 'selected';
|
||||
} ?>>Closed</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -247,8 +264,12 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
<div class="form-group">
|
||||
<label>Assigned to</label>
|
||||
<select class="form-control select2" name="assigned">
|
||||
<option value="" <?php if ($ticket_assigned_filter == "") {echo "selected";}?> >Any</option>
|
||||
<option value="unassigned"<?php if ($ticket_assigned_filter == "0") {echo "selected";}?> >Unassigned</option>
|
||||
<option value="" <?php if ($ticket_assigned_filter == "") {
|
||||
echo "selected";
|
||||
} ?>>Any</option>
|
||||
<option value="unassigned" <?php if ($ticket_assigned_filter == "0") {
|
||||
echo "selected";
|
||||
} ?>>Unassigned</option>
|
||||
|
||||
<?php
|
||||
$sql_assign_to = mysqli_query($mysqli, "SELECT * FROM users WHERE user_archived_at IS NULL ORDER BY user_name ASC");
|
||||
@@ -256,7 +277,9 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
$user_id = intval($row['user_id']);
|
||||
$user_name = nullable_htmlentities($row['user_name']);
|
||||
?>
|
||||
<option <?php if ($ticket_assigned_filter == $user_id) { echo "selected"; } ?> value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
||||
<option <?php if ($ticket_assigned_filter == $user_id) {
|
||||
echo "selected";
|
||||
} ?> value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -272,44 +295,37 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<div class="table-responsive-sm">
|
||||
<table class="table table-striped table-borderless table-hover">
|
||||
<thead class="text-dark <?php if (!$num_rows[0]) { echo "d-none"; } ?>">
|
||||
<thead class="text-dark <?php if (!$num_rows[0]) {
|
||||
echo "d-none";
|
||||
} ?>">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" id="selectAllCheckbox" type="checkbox" onclick="checkAll(this)">
|
||||
</div>
|
||||
</td>
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_number&order=<?php echo $disp; ?>">Number</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_number&order=<?php echo $disp; ?>">Number</a>
|
||||
</th>
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_subject&order=<?php echo $disp; ?>">Subject</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_subject&order=<?php echo $disp; ?>">Subject</a>
|
||||
</th>
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=client_name&order=<?php echo $disp; ?>">Client / Contact</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=client_name&order=<?php echo $disp; ?>">Client / Contact</a>
|
||||
</th>
|
||||
<?php if ($config_module_enable_accounting) {
|
||||
?>
|
||||
<th class="text-center"><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_billable&order=<?php echo $disp; ?>">Billable</a>
|
||||
<th class="text-center"><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_billable&order=<?php echo $disp; ?>">Billable</a>
|
||||
</th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_priority&order=<?php echo $disp; ?>">Priority</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_priority&order=<?php echo $disp; ?>">Priority</a>
|
||||
</th>
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_status&order=<?php echo $disp; ?>">Status</a>
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=user_name&order=<?php echo $disp; ?>">Assigned</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_status&order=<?php echo $disp; ?>">Status</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=user_name&order=<?php echo $disp; ?>">Assigned</a>
|
||||
</th>
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_updated_at&order=<?php echo $disp; ?>">Last Response</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_updated_at&order=<?php echo $disp; ?>">Last Response</a>
|
||||
</th>
|
||||
<th><a class="text-dark"
|
||||
href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_created_at&order=<?php echo $disp; ?>">Created</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=ticket_created_at&order=<?php echo $disp; ?>">Created</a>
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
@@ -394,7 +410,9 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
|
||||
?>
|
||||
|
||||
<tr class="<?php if(empty($ticket_updated_at)) { echo "text-bold"; }?>">
|
||||
<tr class="<?php if (empty($ticket_updated_at)) {
|
||||
echo "text-bold";
|
||||
} ?>">
|
||||
<td>
|
||||
<?php if ($ticket_status !== "Closed") { ?>
|
||||
<div class="form-check">
|
||||
@@ -425,7 +443,8 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
} else {
|
||||
echo "<span class='badge badge-pill badge-secondary'>X</span>";
|
||||
}
|
||||
?></td>
|
||||
?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -452,9 +471,7 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
|
||||
if ($config_module_enable_accounting) {
|
||||
require "ticket_edit_billable_modal.php";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user