2024-01-12 16:34:26 -08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2024-01-12 20:50:41 -08:00
|
|
|
<link rel="stylesheet" href="/static/site.css">
|
|
|
|
<script src="/static/htmx.min.js"></script>
|
2024-01-15 13:47:16 -08:00
|
|
|
<script src="/static/feather.min.js"></script>
|
2024-01-20 15:05:06 -08:00
|
|
|
<title>{{ .ActivePage }}</title>
|
2024-01-12 16:34:26 -08:00
|
|
|
</head>
|
2024-01-14 18:00:51 -08:00
|
|
|
<body class="latte">
|
2024-01-12 21:59:19 -08:00
|
|
|
<header>
|
2024-01-13 18:33:26 -08:00
|
|
|
|
2024-01-12 21:59:19 -08:00
|
|
|
</header>
|
2024-01-14 18:00:51 -08:00
|
|
|
<div class="d-flex" id="below-header">
|
2024-01-12 20:50:41 -08:00
|
|
|
|
2024-02-10 08:51:27 -08:00
|
|
|
<div id="left-col" class="cr-all">
|
2024-01-13 18:33:26 -08:00
|
|
|
<nav>
|
|
|
|
<ul>
|
2024-01-14 18:00:51 -08:00
|
|
|
<li>
|
|
|
|
<a id="logo-a">Recount</a>
|
|
|
|
</li>
|
2024-01-13 18:33:26 -08:00
|
|
|
<li>
|
|
|
|
<a
|
|
|
|
hx-get="/"
|
|
|
|
hx-swap="innerHtml swap:0.2s settle:0.2s"
|
|
|
|
hx-push-url="true"
|
|
|
|
hx-boost="true"
|
|
|
|
hx-target="#main-body-content"
|
2024-01-20 15:05:06 -08:00
|
|
|
{{ if (eq .ActivePage "Dashboard") }}
|
2024-01-13 18:33:26 -08:00
|
|
|
class="active"
|
|
|
|
{{ end }}
|
|
|
|
>
|
2024-01-20 15:05:06 -08:00
|
|
|
Dashboard
|
2024-01-13 18:33:26 -08:00
|
|
|
</a>
|
2024-01-12 20:50:41 -08:00
|
|
|
|
2024-01-13 18:33:26 -08:00
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a
|
2024-01-20 15:05:06 -08:00
|
|
|
hx-get="/transactions"
|
2024-01-13 18:33:26 -08:00
|
|
|
hx-swap="innerHtml swap:0.2s settle:0.2s"
|
|
|
|
hx-push-url="true"
|
|
|
|
hx-boost="true"
|
|
|
|
hx-target="#main-body-content"
|
2024-01-20 15:05:06 -08:00
|
|
|
{{ if (eq .ActivePage "Transactions") }}
|
2024-01-13 18:33:26 -08:00
|
|
|
class="active"
|
|
|
|
{{ end }}
|
|
|
|
>
|
2024-01-20 15:05:06 -08:00
|
|
|
Transactions
|
2024-01-13 18:33:26 -08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<div id="main-body-content">
|
|
|
|
{{.InnerHtml}}
|
2024-01-12 20:50:41 -08:00
|
|
|
</div>
|
2024-02-10 08:51:27 -08:00
|
|
|
<div id="right-col" class="cr-all">
|
2024-01-27 12:20:25 -08:00
|
|
|
<div id="transaction-quick-access-panel">
|
|
|
|
<div class="t-header">
|
2024-02-09 19:02:08 -08:00
|
|
|
<!--
|
2024-01-27 12:20:25 -08:00
|
|
|
<button
|
|
|
|
class="borderless-btn btn-sm mx-auto c-green ch-teal"
|
|
|
|
style="color: var(--pf-base);"
|
|
|
|
>
|
|
|
|
<i class="" data-feather="plus"></i>
|
|
|
|
Add New
|
|
|
|
</button>
|
2024-02-09 19:02:08 -08:00
|
|
|
-->
|
2024-01-27 12:20:25 -08:00
|
|
|
<div class="m-auto d-flex">
|
|
|
|
<input id="show-pending-transactions" type="checkbox"></input>
|
|
|
|
<label for="show-pending-transactions">
|
|
|
|
Show Pending
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="t-list">
|
|
|
|
<div class="tab-div">
|
|
|
|
<button id="open-draft">
|
2024-02-09 19:02:08 -08:00
|
|
|
<i data-feather="file-plus"></i>
|
2024-01-27 12:20:25 -08:00
|
|
|
</button>
|
2024-02-10 08:51:27 -08:00
|
|
|
{{.NewTransactionPane}}
|
2024-01-27 12:20:25 -08:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="t-list-container"
|
|
|
|
hx-get="/components/data/transaction_quick_access"
|
|
|
|
hx-trigger="load"
|
|
|
|
>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-01-24 18:58:29 -08:00
|
|
|
</div>
|
2024-01-27 12:20:25 -08:00
|
|
|
<div style="height: 25%"></div>
|
2024-01-14 18:00:51 -08:00
|
|
|
|
2024-02-10 08:51:27 -08:00
|
|
|
{{.QuickAccessPane}}
|
2024-01-14 18:00:51 -08:00
|
|
|
</div>
|
2024-01-13 18:33:26 -08:00
|
|
|
</div>
|
2024-01-17 20:46:13 -08:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js" integrity="sha512-CQBWl4fJHWbryGE+Pc7UAxWMUMNMWzWxF4SQo9CgkJIN1kx6djDQZjh3Y8SZ1d+6I+1zze6Z7kHXO7q3UyZAWw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
2024-01-12 20:50:41 -08:00
|
|
|
<script type="module">
|
2024-01-23 19:21:19 -08:00
|
|
|
import {trigger_reset_handlers, trigger_table_animation, fill_chart} from "/static/index.js";
|
2024-01-15 19:26:51 -08:00
|
|
|
htmx.onLoad(function (element) {
|
2024-01-23 19:21:19 -08:00
|
|
|
feather.replace();
|
|
|
|
if (element.dataset.mainBody) {
|
|
|
|
trigger_reset_handlers();
|
|
|
|
}
|
2024-01-15 19:26:51 -08:00
|
|
|
if (element.localName === "tr") {
|
|
|
|
trigger_table_animation();
|
2024-01-23 19:21:19 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (element.querySelectorAll("canvas").length > 0) {
|
|
|
|
element.querySelectorAll("canvas").forEach(function (el) {
|
|
|
|
fill_chart(el);
|
|
|
|
});
|
2024-01-15 19:26:51 -08:00
|
|
|
}
|
|
|
|
});
|
2024-01-23 19:21:19 -08:00
|
|
|
document.body.addEventListener('htmx:beforeSwap', function (event) {
|
2024-02-09 19:02:08 -08:00
|
|
|
var charts = event.detail.target.querySelectorAll('.chartjs-chart');
|
2024-01-23 19:21:19 -08:00
|
|
|
charts.forEach(function (chart) {
|
|
|
|
// Destroy each Chart.js chart before swapping content
|
|
|
|
Chart.getChart(chart).destroy();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
trigger_reset_handlers();
|
2024-01-12 20:50:41 -08:00
|
|
|
</script>
|
2024-01-12 16:34:26 -08:00
|
|
|
</body>
|
|
|
|
</html>
|