Skip to content

Commit

Permalink
fix: if for buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed Jul 27, 2024
1 parent 1cf1636 commit 305d40c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/Requests.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@
<td>{request.site}</td>
<td>{request.state}</td>
<td>
{request.state == "requested" || request.state == "declined" ? <button class="btn btn-success btn-sm" on:click={() => acceptRequest(request)}>Accept</button> : null}
{request.state == "requested" || request.state == "authorized" ? <button class="btn btn-danger btn-sm" on:click={() => denyRequest(request)}>Deny</button> : null}
{#if request.state === "requested" || request.state === "declined"}
<button class="btn btn-success btn-sm" on:click={() => acceptRequest(request)}>Accept</button>
{/if}
{#if request.state === "requested" || request.state === "authorized"}
<button class="btn btn-danger btn-sm" on:click={() => denyRequest(request)}>Deny</button>
{/if}
</td>
</tr>
{/each}
Expand Down

0 comments on commit 305d40c

Please sign in to comment.