Compare commits
4 Commits
2a6a39916a
...
63a50f92e7
Author | SHA1 | Date | |
---|---|---|---|
63a50f92e7 | |||
ca6da15ef7 | |||
8dfa19fa0f | |||
0feee0ae2f |
@ -5,6 +5,7 @@
|
||||
import { RunnerCardService, RunnerService } from "@odit/lfk-client-js";
|
||||
import Select from "svelte-select";
|
||||
import Toastify from "toastify-js";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
export let edit_modal_open;
|
||||
export let current_cards;
|
||||
export let runner = {};
|
||||
@ -21,6 +22,10 @@
|
||||
$: runners = [];
|
||||
$: enabled = true;
|
||||
$: processed_last_submit = true;
|
||||
const dispatch = createEventDispatcher();
|
||||
function dataUpdated() {
|
||||
dispatch('dataUpdated',);
|
||||
}
|
||||
RunnerService.runnerControllerGetAll().then((val) => {
|
||||
runners = val.map((r) => {
|
||||
return { label: getRunnerLabel(r), value: r };
|
||||
@ -65,6 +70,7 @@
|
||||
}).showToast();
|
||||
current_cards[current_cards.findIndex((c) => c.id === id)] = result;
|
||||
current_cards = current_cards;
|
||||
dataUpdated();
|
||||
})
|
||||
.catch((err) => {
|
||||
//
|
||||
|
@ -54,6 +54,7 @@
|
||||
bind:runner
|
||||
bind:editable
|
||||
bind:original_data
|
||||
on:dataUpdated={(handler.setRows(current_cards))}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
|
@ -9,15 +9,12 @@
|
||||
on:input={() => {
|
||||
setTimeout(() => {
|
||||
if (`${selected}`.trim()) {
|
||||
const value = selected;
|
||||
handler.filter(value, (card) => {
|
||||
if (
|
||||
card.enabled === value ||
|
||||
value === "all"
|
||||
)
|
||||
return card;
|
||||
return "";
|
||||
});
|
||||
if(selected==="all"){
|
||||
handler.filter('', 'enabled')
|
||||
}
|
||||
else{
|
||||
handler.filter(selected, 'enabled')
|
||||
}
|
||||
}
|
||||
}, 50);
|
||||
}}
|
||||
@ -25,8 +22,8 @@
|
||||
name="statusfilter"
|
||||
id="statusfilter"
|
||||
>
|
||||
<option value="all">Alle</option>
|
||||
<option value={true}>{$_("enabled")}</option>
|
||||
<option value={false}>{$_("disabled")}</option>
|
||||
<option value="all">{$_('all')}</option>
|
||||
<option value="true">{$_("enabled")}</option>
|
||||
<option value="false">{$_("disabled")}</option>
|
||||
</select>
|
||||
</th>
|
||||
|
@ -26,7 +26,7 @@
|
||||
name="groupfilter"
|
||||
id="groupfilter"
|
||||
>
|
||||
<option value="all">Alle</option>
|
||||
<option value="all">{$_('all')}</option>
|
||||
{#each groups as g}
|
||||
<option value={g.value}>{g.label}</option>
|
||||
{/each}
|
||||
|
@ -472,5 +472,6 @@
|
||||
"you-have-to-provide-an-organization": "Du musst eine Organisation angeben",
|
||||
"you-have-to-save-your-changes-to-generate-a-link": "Du musst deine Änderungen speichern, um einen Link zu generieren.",
|
||||
"you-must-create-at-least-one-card-or-cancel": "Du musst mindestens eine Blankokarte erstellen (oder abbrechen).",
|
||||
"zip-postal-code": "Postleitzahl"
|
||||
"zip-postal-code": "Postleitzahl",
|
||||
"all": "Alle"
|
||||
}
|
@ -472,5 +472,6 @@
|
||||
"you-have-to-provide-an-organization": "You have to provide an organization",
|
||||
"you-have-to-save-your-changes-to-generate-a-link": "You have to save your changes to generate a link.",
|
||||
"you-must-create-at-least-one-card-or-cancel": "You must create at least one card (or cancel).",
|
||||
"zip-postal-code": "ZIP/ postal code"
|
||||
"zip-postal-code": "ZIP/ postal code",
|
||||
"all": "all"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user