Compare commits
2 Commits
382eddf8ea
...
5d24b80e26
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d24b80e26 | |||
| 32263ad6c6 |
@@ -5,8 +5,8 @@
|
|||||||
import favicon from "$lib/assets/favicon.svg"
|
import favicon from "$lib/assets/favicon.svg"
|
||||||
|
|
||||||
let { data } = $props();
|
let { data } = $props();
|
||||||
|
const all_prefixes = [...data.prefixes];
|
||||||
let prefix_name = $state("");
|
let prefix_name = $state("");
|
||||||
let all_prefixes = $state([]);
|
|
||||||
let current_prefix = $state({name: "", color: "", weight: 0});
|
let current_prefix = $state({name: "", color: "", weight: 0});
|
||||||
let admin_mode = $state(false);
|
let admin_mode = $state(false);
|
||||||
const venue = env.PUBLIC_TAM3_VENUE || "TAM3";
|
const venue = env.PUBLIC_TAM3_VENUE || "TAM3";
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (browser) {
|
if (browser) {
|
||||||
all_prefixes = [...data.prefixes];
|
|
||||||
document.title = `${venue} - Main Menu`;
|
document.title = `${venue} - Main Menu`;
|
||||||
hotkeys.filter = function(event) {return true};
|
hotkeys.filter = function(event) {return true};
|
||||||
hotkeys('alt+a', function(event) {event.preventDefault(); admin_mode = !admin_mode; return false;});
|
hotkeys('alt+a', function(event) {event.preventDefault(); admin_mode = !admin_mode; return false;});
|
||||||
@@ -36,7 +35,7 @@
|
|||||||
<img src="{favicon}" alt="TAM3 Icon - Red ticket with TAM3 on it" class="icon">
|
<img src="{favicon}" alt="TAM3 Icon - Red ticket with TAM3 on it" class="icon">
|
||||||
<h1>{venue} - Main Menu</h1>
|
<h1>{venue} - Main Menu</h1>
|
||||||
</div>
|
</div>
|
||||||
{#if prefix_name !== ""}
|
{#if all_prefixes.length > 0}
|
||||||
<div class="universal-reports flex-row tb-margin">
|
<div class="universal-reports flex-row tb-margin">
|
||||||
<a href="/counts" target="_blank" class="styled">Counts</a>
|
<a href="/counts" target="_blank" class="styled">Counts</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -66,6 +65,8 @@
|
|||||||
<a href="/reports/byname/{current_prefix.name}/" target="_blank" class="styled">By Name</a>
|
<a href="/reports/byname/{current_prefix.name}/" target="_blank" class="styled">By Name</a>
|
||||||
<a href="/reports/bybasket/{current_prefix.name}/" target="_blank" class="styled">By Basket ID</a>
|
<a href="/reports/bybasket/{current_prefix.name}/" target="_blank" class="styled">By Basket ID</a>
|
||||||
</div>
|
</div>
|
||||||
|
{:else}
|
||||||
|
<p>There aren't any prefixes available, please create them.</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if admin_mode}
|
{#if admin_mode}
|
||||||
|
|||||||
Reference in New Issue
Block a user