parent
3cd0468b19
commit
7ad6b73574
@ -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;
|
||||
@ -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) => {
|
||||
//
|
||||
|
@ -396,5 +396,7 @@
|
||||
"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).",
|
||||
"create-bulk-cards": "Blankokarten erstellen"
|
||||
"create-bulk-cards": "Blankokarten erstellen",
|
||||
"creating-blanco-cards": "Erstelle Blankokarten",
|
||||
"created-blanco-cards": "Blankokarten wurden erstellt"
|
||||
}
|
||||
|
@ -396,5 +396,7 @@
|
||||
"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).",
|
||||
"create-bulk-cards": "Add blanco cards"
|
||||
"create-bulk-cards": "Add blanco cards",
|
||||
"creating-blanco-cards": "Creating blanco cards",
|
||||
"created-blanco-cards": "Created blanco cards"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user