Recount-Server/web/templates/transactions.templ

111 lines
4.8 KiB
Text
Raw Permalink Normal View History

2024-02-10 08:51:27 -08:00
package templates
2024-01-20 15:05:06 -08:00
2024-02-10 08:51:27 -08:00
templ TransactionsPage(userID int, accounts *[]string) {
2024-01-20 15:05:06 -08:00
<title>Transactions</title>
2024-01-23 19:20:33 -08:00
<div class="d-flex-col mx-4 h-100" data-main-body="true">
2024-01-20 15:05:06 -08:00
<div class="c-crust row cr-all p-5" style="height: fit-content">
<button
class="borderless-btn dropdown-button"
aria-describedby="filter-popup"
data-dropdown-target="filter-popup"
data-dropdown-direction="bottom-start"
data-dropdown-motion="expand-down"
>
<i class="" data-feather="filter"></i>
<span class="ms-3 my-auto">Add Filter</span>
</button>
2024-01-20 21:51:10 -08:00
<div class="popup-menu" id="filter-popup" role="tooltip" style="display:none;">
<div class="d-flex p-3">
2024-02-17 14:50:58 -08:00
<select class="select-swapout select">
2024-01-21 20:46:11 -08:00
<option data-select-div="filter-accounts">Account</option>
<option data-select-div="filter-two-inputs">Amount</option>
2024-02-17 20:01:29 -08:00
<option data-select-div="filter-between-dates">Date</option>
2024-02-17 14:50:58 -08:00
<option data-select-div="filter-contains">Description</option>
2024-01-21 20:46:11 -08:00
<option data-select-div="filter-two-inputs">ID</option>
2024-01-20 21:51:10 -08:00
</select>
2024-01-21 20:46:11 -08:00
<div id="filter-two-inputs" class="d-flex" style="display: none;">
2024-02-17 20:01:29 -08:00
<input class="input" type="text"></input>
2024-02-17 14:50:58 -08:00
<select class="ms-2 select">
2024-01-20 21:51:10 -08:00
<option>></option>
<option>=</option>
<option>{"<"}</option>
</select>
2024-02-17 20:01:29 -08:00
<input class="ms-2 input" type="text"></input>
2024-01-21 20:46:11 -08:00
</div>
<div id="filter-contains" class="d-flex" style="display: none;">
2024-02-17 14:50:58 -08:00
<select class="ms-2 select">
2024-01-21 20:46:11 -08:00
<option>Contains</option>
2024-02-17 14:50:58 -08:00
<option>Does Not Contain</option>
2024-01-21 20:46:11 -08:00
</select>
2024-02-17 20:01:29 -08:00
<input class="ms-2 input" type="text"></input>
2024-01-20 21:51:10 -08:00
</div>
2024-01-21 20:46:11 -08:00
<div id="filter-accounts" class="d-flex">
2024-02-17 14:50:58 -08:00
<select class="ms-2 select">
2024-01-20 21:51:10 -08:00
<option>=</option>
</select>
2024-02-17 14:50:58 -08:00
<select class="ms-2 select">
2024-01-20 21:51:10 -08:00
for _, value := range *accounts {
<option>{value}</option>
}
</select>
</div>
2024-02-17 20:01:29 -08:00
<div id="filter-between-dates" class="d-flex" style="display: none;">
<input class="input" type="date"></input>
<select class="ms-2 select">
<option>></option>
<option>=</option>
<option>{"<"}</option>
</select>
<input class="ms-2 input" type="date"></input>
</div>
2024-01-21 20:46:11 -08:00
<button
2024-02-17 20:01:29 -08:00
class="cr-all ms-3 btn btn-sm invert c-green"
2024-01-21 20:46:11 -08:00
>Add
</button>
2024-01-20 21:51:10 -08:00
</div>
2024-01-20 15:05:06 -08:00
</div>
<button class="ms-5 borderless-btn">
<span class="my-auto mx-3">No Filters</span>
</button>
</div>
<div class="row mt-5">
<table class="card-table table table-striped cr-all">
<colgroup>
<col style="width: 2%"></col>
<col style="width: 15%"></col>
<col style="width: 30%"></col>
<col style="width: 15%"></col>
<col style="width: 3%"></col>
<col style="width: 1%"></col>
</colgroup>
<thead>
<tr>
<td>
</td>
<td>
<div class="d-flex">
<span class="my-auto me-0">
ID
</span>
<i class="my-auto ms-0 me-auto" data-feather="chevron-up"></i>
</div>
</td>
<td>Account</td>
<td>Date</td>
<td></td>
<td class="t-e" style="width:auto">Amount</td>
</tr>
</thead>
<tbody
hx-trigger="load delay:0.25s"
2024-01-24 18:58:29 -08:00
hx-get="/components/data/transaction_table_rows"
2024-01-20 15:05:06 -08:00
hx-params=""
>
</tbody>
</table>
</div>
</div>
}