Moved modal import to overview for simplification

ref #94
This commit is contained in:
2021-03-25 18:55:16 +01:00
parent d6c315ab8e
commit 1a52aaf8d1
3 changed files with 17 additions and 14 deletions

View File

@@ -7,7 +7,8 @@
import Toastify from "toastify-js";
export let edit_modal_open;
export let current_cards;
export let edit_card_id;
export let edit_card;
export let runner;
const getRunnerLabel = (option) =>
option.firstname + " " + (option.middlename || "") + " " + option.lastname;
const filterRunners = (label, filterText, option) =>
@@ -27,7 +28,7 @@
return { label: getRunnerLabel(r), value: r };
});
});
RunnerCardService.runnerCardControllerGetOne(edit_card_id).then((val) => {
RunnerCardService.runnerCardControllerGetOne(edit_card.id).then((val) => {
runner = Object.assign(
{ runner },
{ label: getRunnerLabel(val.runner), value: val.runner }
@@ -73,7 +74,7 @@
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
current_cards[
current_cards.findIndex((c) => c.id === edit_card_id)
current_cards.findIndex((c) => c.id === edit_card.id)
] = result;
current_cards = current_cards;
})
@@ -88,7 +89,6 @@
}
}
</script>
{#if edit_modal_open}
<div
class="fixed z-10 inset-0 overflow-y-auto"