feat: improved dashboard titles ui + a11y
This commit is contained in:
parent
10182433f8
commit
21453ef272
@ -11,29 +11,29 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("cards")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("CARD:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-card")}
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
bulk_modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-bulk-cards")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("CARD:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-card")}
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
bulk_modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-bulk-cards")}
|
||||
</button>
|
||||
{/if}
|
||||
<CardsOverview bind:current_cards bind:addCards />
|
||||
</section>
|
||||
|
||||
|
@ -8,20 +8,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("contacts")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("CONTACT:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-a-new-contact")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("CONTACT:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-a-new-contact")}
|
||||
</button>
|
||||
{/if}
|
||||
<ContactsOverview bind:current_contacts />
|
||||
</section>
|
||||
|
||||
|
@ -9,20 +9,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("donations")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("DONATION:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-donation")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("DONATION:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-donation")}
|
||||
</button>
|
||||
{/if}
|
||||
<DonationsOverview bind:current_donations bind:addDonations />
|
||||
</section>
|
||||
|
||||
|
@ -9,61 +9,61 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("donors")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-donor")}
|
||||
</button>
|
||||
{/if}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:GET")}
|
||||
<button
|
||||
on:click={() => {
|
||||
const data = current_donors
|
||||
.filter((d) => d.receiptNeeded === true)
|
||||
.map(function (d) {
|
||||
d.address.address2 =
|
||||
d.address.address2 === "" ? "" : " " + d.address.address2;
|
||||
const address = `${d.address.address1}${d.address.address2}, ${d.address.postalcode} ${d.address.city}, ${d.address.country}`;
|
||||
return [
|
||||
d.firstname,
|
||||
d.middlename,
|
||||
d.lastname,
|
||||
(d.paidDonationAmount/100).toFixed(2),
|
||||
address,
|
||||
];
|
||||
});
|
||||
let csv = `${$_("csv_import__firstname")};${$_(
|
||||
"csv_import__middlename"
|
||||
)};${$_("csv_import__lastname")};${$_(
|
||||
"total_donation_amount_in_eur"
|
||||
)};${$_("address")}\n`;
|
||||
data.forEach(function (row) {
|
||||
csv += row.join(";");
|
||||
csv += "\n";
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-donor")}
|
||||
</button>
|
||||
{/if}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:GET")}
|
||||
<button
|
||||
on:click={() => {
|
||||
const data = current_donors
|
||||
.filter((d) => d.receiptNeeded === true)
|
||||
.map(function (d) {
|
||||
d.address.address2 =
|
||||
d.address.address2 === "" ? "" : " " + d.address.address2;
|
||||
const address = `${d.address.address1}${d.address.address2}, ${d.address.postalcode} ${d.address.city}, ${d.address.country}`;
|
||||
return [
|
||||
d.firstname,
|
||||
d.middlename,
|
||||
d.lastname,
|
||||
(d.paidDonationAmount/100).toFixed(2),
|
||||
address,
|
||||
];
|
||||
});
|
||||
let hiddenElement = document.createElement("a");
|
||||
hiddenElement.href = "data:text/csv;charset=utf-8," + encodeURI(csv);
|
||||
hiddenElement.target = "_blank";
|
||||
hiddenElement.download = `${$_(
|
||||
"filename_sponsoringquittungsliste"
|
||||
)}.csv`;
|
||||
hiddenElement.click();
|
||||
hiddenElement.remove();
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("sponsoring-quittungs-liste_herunterladen")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
let csv = `${$_("csv_import__firstname")};${$_(
|
||||
"csv_import__middlename"
|
||||
)};${$_("csv_import__lastname")};${$_(
|
||||
"total_donation_amount_in_eur"
|
||||
)};${$_("address")}\n`;
|
||||
data.forEach(function (row) {
|
||||
csv += row.join(";");
|
||||
csv += "\n";
|
||||
});
|
||||
let hiddenElement = document.createElement("a");
|
||||
hiddenElement.href = "data:text/csv;charset=utf-8," + encodeURI(csv);
|
||||
hiddenElement.target = "_blank";
|
||||
hiddenElement.download = `${$_(
|
||||
"filename_sponsoringquittungsliste"
|
||||
)}.csv`;
|
||||
hiddenElement.click();
|
||||
hiddenElement.remove();
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("sponsoring-quittungs-liste_herunterladen")}
|
||||
</button>
|
||||
{/if}
|
||||
<DonorsOverview bind:current_donors bind:addDonors />
|
||||
</section>
|
||||
|
||||
|
@ -8,20 +8,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("user-groups")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("USERGROUP:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-user-group")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("USERGROUP:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-user-group")}
|
||||
</button>
|
||||
{/if}
|
||||
<UserGroupsOverview bind:current_groups />
|
||||
</section>
|
||||
|
||||
|
@ -10,31 +10,31 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("organizations")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("ORGANIZATION:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-organization")}
|
||||
</button>
|
||||
{/if}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:IMPORT")}
|
||||
<button
|
||||
on:click={() => {
|
||||
import_modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("import-runners")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("ORGANIZATION:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-organization")}
|
||||
</button>
|
||||
{/if}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:IMPORT")}
|
||||
<button
|
||||
on:click={() => {
|
||||
import_modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("import-runners")}
|
||||
</button>
|
||||
{/if}
|
||||
<OrgOverview bind:current_organizations />
|
||||
</section>
|
||||
|
||||
|
@ -11,29 +11,29 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("runners")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("laeufer-hinzufuegen")}
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
import_modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("import-runners")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("laeufer-hinzufuegen")}
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
import_modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("import-runners")}
|
||||
</button>
|
||||
{/if}
|
||||
<RunnersOverview bind:current_runners bind:addRunners />
|
||||
</section>
|
||||
|
||||
|
@ -9,20 +9,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("scans")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("SCAN:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-scan")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("SCAN:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("add-scan")}
|
||||
</button>
|
||||
{/if}
|
||||
<ScansOverview bind:current_scans bind:addScans />
|
||||
</section>
|
||||
|
||||
|
@ -24,20 +24,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("scanstations")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("STATION:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-a-new-scanstation")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("STATION:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-a-new-scanstation")}
|
||||
</button>
|
||||
{/if}
|
||||
<ConfirmScanStationDeletion
|
||||
on:cancelDelete={(event) => {
|
||||
modal_open = false;
|
||||
|
@ -11,20 +11,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("statsclients")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("STATSCLIENT:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-a-new-statsclient")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("STATSCLIENT:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-a-new-statsclient")}
|
||||
</button>
|
||||
{/if}
|
||||
<StatsClientsOverview
|
||||
bind:current_clients
|
||||
bind:modal_open
|
||||
|
@ -8,20 +8,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("teams")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-team")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-team")}
|
||||
</button>
|
||||
{/if}
|
||||
<TeamsOverview bind:current_teams />
|
||||
</section>
|
||||
|
||||
|
@ -19,18 +19,18 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
Tracks
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-track")}
|
||||
</button>
|
||||
</span>
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("tracks")}
|
||||
</h4>
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-track")}
|
||||
</button>
|
||||
{#await tracks_promise}
|
||||
<div
|
||||
class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2"
|
||||
|
@ -8,20 +8,20 @@
|
||||
</script>
|
||||
|
||||
<section class="container p-5">
|
||||
<span class="mb-1 text-3xl font-extrabold leading-tight">
|
||||
<h4 class="mb-1 text-3xl font-extrabold leading-tight font-mono">
|
||||
{$_("users")}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("USER:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-user")}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
</h4>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("USER:CREATE")}
|
||||
<button
|
||||
on:click={() => {
|
||||
modal_open = true;
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
{$_("create-user")}
|
||||
</button>
|
||||
{/if}
|
||||
<UsersOverview bind:current_users />
|
||||
</section>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user