@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user