Add Card appends current cards

This commit is contained in:
2023-04-12 21:04:29 +02:00
parent 2f62c7ae89
commit 195d182cc9
4 changed files with 42 additions and 18 deletions

View File

@@ -4,11 +4,13 @@
import { RunnerCardService } from "@odit/lfk-client-js";
import Toastify from "toastify-js";
import { createEventDispatcher } from "svelte";
export let bulk_modal_open;
export let current_cards;
function focus(el) {
el.focus();
}
const dispatch = createEventDispatcher();
$: card_count = 0;
$: is_card_count_valid = card_count > 0;
$: processed_last_submit = true;
@@ -43,6 +45,7 @@
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
dispatch("created", {cards: result})
})
.catch((err) => {
//
@@ -71,11 +74,11 @@
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
current_cards = current_cards.concat(result);
const toast = Toastify({
text: $_("generating-pdf"),
duration: -1,
}).showToast();
dispatch("created", {cards: result})
fetch(
`${config.baseurl_documentserver}/cards?&download=true&key=${config.documentserver_key}`,
{