mirror of https://github.com/itflow-org/itflow
updated tickets ui, added close buttons on dashboard, other minor ui modifications
This commit is contained in:
parent
08c4aa1bce
commit
e6e44969aa
|
|
@ -1,6 +1,12 @@
|
|||
<?php $sql_files_images = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id AND (file_ext LIKE 'JPG' OR file_ext LIKE 'jpg' OR file_ext LIKE 'JPEG' OR file_ext LIKE 'jpeg' OR file_ext LIKE 'png' OR file_ext LIKE 'PNG') ORDER BY file_id DESC"); ?>
|
||||
<?php
|
||||
|
||||
<?php $sql_files_other = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id AND file_ext NOT LIKE 'JPG' AND file_ext NOT LIKE 'jpg' AND file_ext NOT LIKE 'png' AND file_ext NOT LIKE 'PNG' ORDER BY file_id DESC"); ?>
|
||||
$sql_files_images = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id AND (file_ext LIKE 'JPG' OR file_ext LIKE 'jpg' OR file_ext LIKE 'JPEG' OR file_ext LIKE 'jpeg' OR file_ext LIKE 'png' OR file_ext LIKE 'PNG') ORDER BY file_id DESC");
|
||||
|
||||
$sql_files_other = mysqli_query($mysqli,"SELECT * FROM files WHERE client_id = $client_id AND file_ext NOT LIKE 'JPG' AND file_ext NOT LIKE 'jpg' AND file_ext NOT LIKE 'png' AND file_ext NOT LIKE 'PNG' ORDER BY file_id DESC");
|
||||
|
||||
$num_of_files = mysqli_num_rows($sql_files_images) + mysqli_num_rows($sql_files_other);
|
||||
|
||||
?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-dark text-white">
|
||||
|
|
@ -9,7 +15,15 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row mb-5">
|
||||
<?php
|
||||
if($num_of_files == 0){
|
||||
|
||||
echo "<center><h3 class='text-secondary'>No Records Here</h3></center>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php
|
||||
|
||||
|
|
@ -69,7 +83,7 @@
|
|||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="<?php echo $file_name; ?>" class="text-secondary"><i class="fa fa-fw fa-2x fa-<?php echo $file_icon; ?> mr-3"></i> <?php echo basename($file_name); ?></a></td>
|
||||
<td><a href="<?php echo $file_name; ?>" target="_blank" class="text-secondary"><i class="fa fa-fw fa-2x fa-<?php echo $file_icon; ?> mr-3"></i> <?php echo basename($file_name); ?></a></td>
|
||||
<td>
|
||||
<a href="<?php echo $file_name; ?>" download="<?php echo $file_name; ?>" class="text-secondary float-left ml-1"><i class="fa fa-cloud-download-alt"></i></a>
|
||||
<a href="post.php?delete_file=<?php echo $file_id; ?>" class="text-secondary float-right mr-1"><i class="fa fa-times"></i></a>
|
||||
|
|
|
|||
|
|
@ -190,7 +190,14 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
|
|||
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header"><i class="fas fa-fw fa-chart-area"></i> Cash Flow</div>
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><i class="fas fa-fw fa-chart-area"></i> Cash Flow</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="cashFlow" width="100%" height="20"></canvas>
|
||||
</div>
|
||||
|
|
@ -200,8 +207,12 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
|
|||
<div class="col-lg-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-chart-pie"></i>
|
||||
Income By Category
|
||||
<h3 class="card-title"><i class="fas fa-chart-pie"></i> Income By Category</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="incomeByCategoryPieChart" width="100%" height="60"></canvas>
|
||||
|
|
@ -212,8 +223,12 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
|
|||
<div class="col-lg-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-chart-pie"></i>
|
||||
Expense By Category
|
||||
<h3 class="card-title"><i class="fas fa-chart-pie"></i> Expense By Category</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="expenseByCategoryPieChart" width="100%" height="60"></canvas>
|
||||
|
|
@ -224,8 +239,12 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
|
|||
<div class="col-lg-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-chart-pie"></i>
|
||||
Expense By Vendor
|
||||
<h3 class="card-title"><i class="fas fa-chart-pie"></i> Expense By Vendor</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<canvas id="expenseByVendorPieChart" width="100%" height="60"></canvas>
|
||||
|
|
@ -236,7 +255,12 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
|
|||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Account Balance
|
||||
<h3 class="card-title">Account Balance</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
|
|
@ -283,7 +307,12 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
|
|||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Latest Invoice Payments
|
||||
<h3 class="card-title"><i class="fas fa-credit-card"></i> Latest Invoice Payments</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
|
|
@ -320,7 +349,12 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount'];
|
|||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Latest Expenses
|
||||
<h3 class="card-title"><i class="fas fa-shopping-cart"></i> Latest Expenses</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-borderless">
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
<!-- Bootstrap 4 -->
|
||||
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Custom js-->
|
||||
<script src="plugins/moment/moment.min.js"></script>
|
||||
<script src="plugins/chart.js/Chart.min.js"></script>
|
||||
<script src="plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||
<script src="plugins/moment/moment.min.js"></script>
|
||||
<script src='plugins/fullcalendar/main.min.js'></script>
|
||||
<script src='plugins/fullcalendar-bootstrap/main.min.js'></script>
|
||||
<script src='plugins/fullcalendar-daygrid/main.min.js'></script>
|
||||
|
|
|
|||
53
ticket.php
53
ticket.php
|
|
@ -71,7 +71,10 @@ if(isset($_GET['ticket_id'])){
|
|||
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="card mb-3">
|
||||
<button class="btn btn-primary">Responses (0)</button>
|
||||
<button class="btn btn-primary">Internal (2)</button>
|
||||
|
||||
<div class="card mb-3 mt-3">
|
||||
<div class="card-header">
|
||||
<h6 class="float-left mt-1"><?php echo $ticket_subject; ?></h6>
|
||||
<div class="dropdown dropleft text-center">
|
||||
|
|
@ -165,6 +168,54 @@ if(isset($_GET['ticket_id'])){
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2>
|
||||
Ticket <?php echo $ticket_number; ?>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<span class="p-2 badge badge-<?php echo $ticket_badge_color; ?>">
|
||||
<?php echo $ticket_status; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="mb-4">
|
||||
<h4 class="text-secondary">Client</h4>
|
||||
<i class="fa fa-fw fa-user text-secondary ml-1 mr-2 mb-2"></i> <?php echo $client_name; ?>
|
||||
<br>
|
||||
<?php
|
||||
if(!empty($client_email)){
|
||||
?>
|
||||
<i class="fa fa-fw fa-envelope text-secondary ml-1 mr-2 mb-2"></i> <a href="mailto:<?php echo $client_email; ?>"><?php echo $client_email; ?></a>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if(!empty($client_phone)){
|
||||
?>
|
||||
<i class="fa fa-fw fa-phone text-secondary ml-1 mr-2 mb-2"></i> <?php echo $client_phone; ?>
|
||||
<br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<h4 class="text-secondary">Details</h4>
|
||||
<div class="ml-1"><i class="fa fa-fw fa-user text-secondary mr-2 mb-2"></i> <?php echo $name; ?></div>
|
||||
<div class="ml-1"><i class="fa fa-fw fa-clock text-secondary mr-2 mb-2"></i> <?php echo $ticket_created_at; ?></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
41
tickets.php
41
tickets.php
|
|
@ -57,24 +57,38 @@
|
|||
<button type="button" class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addTicketModal"><i class="fas fa-fw fa-plus"></i></button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form autocomplete="off">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control col-md-4" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Tickets">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<form autocomplete="off">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control col-md-6" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Tickets">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="float-right">
|
||||
<a href="?status=New" class="btn btn-secondary">New</a>
|
||||
<a href="?status=In-Progress" class="btn btn-secondary">In-Progress</a>
|
||||
<a href="?status=On-Hold" class="btn btn-secondary">On-Hold</a>
|
||||
<a href="?status=Resolved" class="btn btn-secondary">Resolved</a>
|
||||
<a href="?status=Closed" class="btn btn-secondary">Closed</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover">
|
||||
<thead class="text-dark <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
||||
<tr>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_id&o=<?php echo $disp; ?>">Number</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_status&o=<?php echo $disp; ?>">Status</a>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_created_at&o=<?php echo $disp; ?>">Created</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Client</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_subject&o=<?php echo $disp; ?>">Subject</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_created_at&o=<?php echo $disp; ?>">Date Opened</a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=ticket_status&o=<?php echo $disp; ?>">Status</a></th>
|
||||
<th>Last Response</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -105,15 +119,18 @@
|
|||
?>
|
||||
|
||||
<tr>
|
||||
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><span class="badge badge-pill badge-secondary p-3"><?php echo $ticket_id; ?></span></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=tickets"><?php echo $client_name; ?></a></td>
|
||||
<td><?php echo $ticket_subject; ?></td>
|
||||
<td><?php echo $ticket_created_at; ?></td>
|
||||
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><?php echo $ticket_id; ?></a></td>
|
||||
<td>
|
||||
<span class="p-2 badge badge-<?php echo $ticket_badge_color; ?>">
|
||||
<?php echo $ticket_status; ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><?php echo $ticket_created_at; ?></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=tickets"><?php echo $client_name; ?></a></td>
|
||||
<td><?php echo $ticket_subject; ?></td>
|
||||
<td>Never</td>
|
||||
|
||||
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
|
|
|||
Loading…
Reference in New Issue