Don't hide invoices

This commit is contained in:
2022-10-18 15:42:40 +02:00
parent 922b8b6001
commit 942900eb49
2 changed files with 30 additions and 43 deletions

View File

@@ -601,8 +601,9 @@ input[type="date"] {
border: none; border: none;
border-radius: 6px; border-radius: 6px;
background: var(--input_background); background: var(--input_background);
/* box-shadow: inset 1px 1px 2px -1px var(--shadow_color); */
padding: 3px 5px; padding: 3px 5px;
/* override user-agent style */
min-width: 100px;
color: var(--input_text); color: var(--input_text);
font-size: 1em; font-size: 1em;
outline: 0; outline: 0;

View File

@@ -31,7 +31,6 @@ const checkout = async (network) => {
} }
} }
let show_expired = false
let invoices = [] let invoices = []
const load_invoices = async () => { const load_invoices = async () => {
loading = true loading = true
@@ -94,7 +93,10 @@ onMount(() => {
</button> </button>
</div> </div>
<h3>Open invoices</h3> <h2>Past invoices</h2>
<p>
Invoices are deleted after one year of inactivity.
</p>
<div class="table_scroll"> <div class="table_scroll">
<table style="text-align: left;"> <table style="text-align: left;">
<thead> <thead>
@@ -107,11 +109,6 @@ onMount(() => {
</thead> </thead>
<tbody> <tbody>
{#each invoices as row (row.id)} {#each invoices as row (row.id)}
{#if row.status === "New" ||
row.status === "InvoiceCreated" ||
row.status === "InvoiceProcessing" ||
show_expired
}
<tr> <tr>
<td>{formatDate(row.time, true, true, false)}</td> <td>{formatDate(row.time, true, true, false)}</td>
<td><Euro amount={row.amount}></Euro></td> <td><Euro amount={row.amount}></Euro></td>
@@ -136,19 +133,8 @@ onMount(() => {
{/if} {/if}
</td> </td>
</tr> </tr>
{/if}
{/each} {/each}
</tbody> </tbody>
</table> </table>
<div style="text-align: center;">
<button on:click={() => {show_expired = !show_expired}}>
{#if show_expired}
Hide
{:else}
Show
{/if}
expired and settled invoices
</button>
</div>
</div> </div>
</section> </section>