diff --git a/src/components/cards/AddCardBulkModal.svelte b/src/components/cards/AddCardBulkModal.svelte index bc4bdf0f..e43f79d9 100644 --- a/src/components/cards/AddCardBulkModal.svelte +++ b/src/components/cards/AddCardBulkModal.svelte @@ -2,9 +2,7 @@ import { _ } from "svelte-i18n"; import { clickOutside } from "../base/outsideclick"; import { focusTrap } from "svelte-focus-trap"; - import { - RunnerCardService - } from "@odit/lfk-client-js"; + import { RunnerCardService } from "@odit/lfk-client-js"; import Toastify from "toastify-js"; export let bulk_modal_open; export let current_cards; @@ -12,7 +10,7 @@ el.focus(); } $: card_count = 0; - $: is_card_count_valid= card_count>0; + $: is_card_count_valid = card_count > 0; $: processed_last_submit = true; $: createbtnenabled = is_card_count_valid; (() => { @@ -29,30 +27,22 @@ } }; })(); - //TODO: Creation logic function submit() { if (processed_last_submit === true) { processed_last_submit = false; const toast = Toastify({ - text: $_("adding-card"), + text: $_("creating-blanco-cards"), duration: -1, }).showToast(); - let postdata = { - runner, - enabled, - }; - RunnerCardService.runnerCardControllerPost(postdata) + RunnerCardService.runnerCardControllerPostBlancoBulk(card_count) .then((result) => { - runner = 0; bulk_modal_open = false; // Toastify({ - text: $_("card-added"), + text: $_("created-blanco-cards"), duration: 500, backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)", }).showToast(); - current_cards.push(result); - current_cards = current_cards; }) .catch((err) => { // @@ -118,27 +108,27 @@ -