mirror of
https://github.com/itflow-org/itflow
synced 2026-03-03 20:34:51 +00:00
Added Send Email to invoice listings, started adding pregtty graphs to dashboard, and other ui cleanup
This commit is contained in:
@@ -76,13 +76,6 @@ if(isset($_GET['client_id'])){
|
|||||||
|
|
||||||
<?php include("header.php"); ?>
|
<?php include("header.php"); ?>
|
||||||
|
|
||||||
<ol class="breadcrumb d-print-none">
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="clients.php">Clients</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumb-item active"><?php echo $client_name; ?></li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<div class="card mb-3 border-0">
|
<div class="card mb-3 border-0">
|
||||||
<div class="card-body mb-4">
|
<div class="card-body mb-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editinvoiceModal<?php echo $invoice_id; ?>">Edit</a>
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editinvoiceModal<?php echo $invoice_id; ?>">Edit</a>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addinvoiceCopyModal<?php echo $invoice_id; ?>">Copy</a>
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addinvoiceCopyModal<?php echo $invoice_id; ?>">Copy</a>
|
||||||
|
<a class="dropdown-item" href="post.php?email_invoice=<?php echo $invoice_id; ?>">Send</a>
|
||||||
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
|
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
|
||||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -202,4 +202,5 @@ $sql_latest_expenses = mysqli_query($mysqli,"SELECT * FROM expenses, vendors, ca
|
|||||||
</div> <!-- row -->
|
</div> <!-- row -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php include("footer.php"); ?>
|
<?php include("footer.php"); ?>
|
||||||
@@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
<script src="vendor/select2/dist/js/select2.min.js"></script>
|
<script src="vendor/select2/dist/js/select2.min.js"></script>
|
||||||
|
|
||||||
|
<script src="vendor/chart.js/Chart.min.js"></script>
|
||||||
|
|
||||||
<!-- Custom scripts for all pages-->
|
<!-- Custom scripts for all pages-->
|
||||||
<script src="js/sb-admin.min.js"></script>
|
<script src="js/sb-admin.min.js"></script>
|
||||||
|
|
||||||
|
|||||||
@@ -165,8 +165,9 @@
|
|||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editinvoiceModal<?php echo $invoice_id; ?>">Edit</a>
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editinvoiceModal<?php echo $invoice_id; ?>">Edit</a>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addinvoiceCopyModal<?php echo $invoice_id; ?>">Copy</a>
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addinvoiceCopyModal<?php echo $invoice_id; ?>">Copy</a>
|
||||||
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>">PDF</a>
|
<a class="dropdown-item" href="post.php?email_invoice=<?php echo $invoice_id; ?>">Send</a>
|
||||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
<a class="dropdown-item" href="post.php?pdf_invoice=<?php echo $invoice_id; ?>"><i class="fa fa-fw fa-file-pdf"></i> PDF</a>
|
||||||
|
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>"><i class="fa fa-fw fa-trash"></i> Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
64
js/app.js
64
js/app.js
@@ -1,3 +1,61 @@
|
|||||||
|
|
||||||
|
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||||
|
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||||
|
Chart.defaults.global.defaultFontColor = '#292b2c';
|
||||||
|
|
||||||
|
// Area Chart Example
|
||||||
|
var ctx = document.getElementById("myAreaChart");
|
||||||
|
var myLineChart = new Chart(ctx, {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"],
|
||||||
|
datasets: [{
|
||||||
|
label: "Sessions",
|
||||||
|
lineTension: 0.3,
|
||||||
|
backgroundColor: "rgba(2,117,216,0.2)",
|
||||||
|
borderColor: "rgba(2,117,216,1)",
|
||||||
|
pointRadius: 5,
|
||||||
|
pointBackgroundColor: "rgba(2,117,216,1)",
|
||||||
|
pointBorderColor: "rgba(255,255,255,0.8)",
|
||||||
|
pointHoverRadius: 5,
|
||||||
|
pointHoverBackgroundColor: "rgba(2,117,216,1)",
|
||||||
|
pointHitRadius: 50,
|
||||||
|
pointBorderWidth: 2,
|
||||||
|
data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451],
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
time: {
|
||||||
|
unit: 'date'
|
||||||
|
},
|
||||||
|
gridLines: {
|
||||||
|
display: false
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
maxTicksLimit: 7
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
ticks: {
|
||||||
|
min: 0,
|
||||||
|
max: 40000,
|
||||||
|
maxTicksLimit: 5
|
||||||
|
},
|
||||||
|
gridLines: {
|
||||||
|
color: "rgba(0, 0, 0, .125)",
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
display: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Prevents resubmit on refresh or back
|
//Prevents resubmit on refresh or back
|
||||||
if ( window.history.replaceState ) {
|
if ( window.history.replaceState ) {
|
||||||
window.history.replaceState( null, null, window.location.href );
|
window.history.replaceState( null, null, window.location.href );
|
||||||
@@ -57,10 +115,4 @@ new EasyMDE({
|
|||||||
new EasyMDE({
|
new EasyMDE({
|
||||||
autoDownloadFontAwesome: false,
|
autoDownloadFontAwesome: false,
|
||||||
element: document.getElementById('editClientNote')
|
element: document.getElementById('editClientNote')
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$('#selectIt').select2({
|
|
||||||
theme: 'bootstrap4',
|
|
||||||
dropdownParent: $('#addInvoiceModal')
|
|
||||||
});
|
});
|
||||||
2
post.php
2
post.php
@@ -1328,7 +1328,7 @@ if(isset($_GET['email_invoice'])){
|
|||||||
|
|
||||||
$_SESSION['alert_message'] = "Invoice has been sent";
|
$_SESSION['alert_message'] = "Invoice has been sent";
|
||||||
|
|
||||||
header("Location: invoice.php?invoice_id=$invoice_id");
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<ul class="navbar-nav ml-auto ml-md-0">
|
<ul class="navbar-nav ml-auto ml-md-0">
|
||||||
<li class="nav-item dropdown no-arrow mx-2">
|
<li class="nav-item dropdown no-arrow mx-2">
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="fas fa-bell fa-fw"></i>
|
<i class="fas fa-bell"></i>
|
||||||
<?php if($num_alerts > 0){ ?> <span class="badge badge-danger"><?php echo $num_alerts; ?></span> <?php } ?>
|
<?php if($num_alerts > 0){ ?> <span class="badge badge-danger"><?php echo $num_alerts; ?></span> <?php } ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="alertsDropdown">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="alertsDropdown">
|
||||||
@@ -41,9 +41,9 @@
|
|||||||
<img height="128" width="128" src="<?php echo "$session_avatar"; ?>" class="img-fluid rounded-circle">
|
<img height="128" width="128" src="<?php echo "$session_avatar"; ?>" class="img-fluid rounded-circle">
|
||||||
</center>
|
</center>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="#"><i class="fa fa-cog"></i> Settings</a>
|
<a class="dropdown-item" href="#"><i class="fa fa-fw fa-cog"></i> Settings</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="logout.php"><i class="fa fa-sign-out-alt"></i> Logout</a>
|
<a class="dropdown-item" href="logout.php"><i class="fa fa-fw fa-sign-out-alt"></i> Logout</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user