diff --git a/src/components/cards/AddCardBulkModal.svelte b/src/components/cards/AddCardBulkModal.svelte index 9b7dfa6d..bc4bdf0f 100644 --- a/src/components/cards/AddCardBulkModal.svelte +++ b/src/components/cards/AddCardBulkModal.svelte @@ -5,9 +5,8 @@ import { RunnerCardService } from "@odit/lfk-client-js"; - import Select from "svelte-select"; import Toastify from "toastify-js"; - export let modal_open; + export let bulk_modal_open; export let current_cards; function focus(el) { el.focus(); @@ -15,17 +14,12 @@ $: card_count = 0; $: is_card_count_valid= card_count>0; $: processed_last_submit = true; - RunnerService.runnerControllerGetAll().then((val) => { - runners = val.map((r) => { - return { label: getRunnerLabel(r), value: r }; - }); - }); $: createbtnenabled = is_card_count_valid; (() => { document.onkeydown = (e) => { e = e || window.event; if (e.key === "Escape") { - modal_open = false; + bulk_modal_open = false; } if (e.keyCode === 13) { if (createbtnenabled === true) { @@ -50,7 +44,7 @@ RunnerCardService.runnerCardControllerPost(postdata) .then((result) => { runner = 0; - modal_open = false; + bulk_modal_open = false; // Toastify({ text: $_("card-added"), @@ -72,13 +66,13 @@ } -{#if modal_open} +{#if bulk_modal_open}
{ - modal_open = false; + bulk_modal_open = false; }}>
@@ -161,7 +155,7 @@ + {/if} @@ -26,4 +36,5 @@ {#if store.state.jwtinfo.userdetails.permissions.includes('CARD:CREATE')} + {/if} diff --git a/src/locales/de.json b/src/locales/de.json index 0132b26d..ff1ebe21 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -395,5 +395,6 @@ "create-bulk-blanco-cards": "Blankokarten erstellen", "just-enter-how-many-you-want-and-the-system-will-create-them": "Geb einfach ein, wie viele Blankokarten das System erstellen soll.", "amount": "Anzahl", - "you-must-create-at-least-one-card-or-cancel": "Du musst mindestens eine Blankokarte erstellen (oder abbrechen)." + "you-must-create-at-least-one-card-or-cancel": "Du musst mindestens eine Blankokarte erstellen (oder abbrechen).", + "create-bulk-cards": "Blankokarten erstellen" } diff --git a/src/locales/en.json b/src/locales/en.json index a2b9496b..82c6e3b7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -391,9 +391,10 @@ "card-added": "Card added", "create-a-new-card": "Create a new card", "you-can-provide-a-runner-but-you-dont-have-to": "You can provide a runner, but you don't have to.", - "if-you-want-to-create-multiple-blanco-cards-try-the-add-bulk-button": "If you want to create multiple blanco cards: Try the 'Add bulk' button.", + "if-you-want-to-create-multiple-blanco-cards-try-the-add-bulk-button": "If you want to create multiple blanco cards: Try the 'Add blanco cards' button.", "create-bulk-blanco-cards": "Create bulk blanco cards", "just-enter-how-many-you-want-and-the-system-will-create-them": "Just enter how many you want and the system will create them", "amount": "Amount", - "you-must-create-at-least-one-card-or-cancel": "You must create at least one card (or cancel)." + "you-must-create-at-least-one-card-or-cancel": "You must create at least one card (or cancel).", + "create-bulk-cards": "Add blanco cards" }