Compare commits

...

4 Commits

6 changed files with 969 additions and 963 deletions

View File

@ -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) => {
//

View File

@ -54,6 +54,7 @@
bind:runner
bind:editable
bind:original_data
on:dataUpdated={(handler.setRows(current_cards))}
/>
{/if}

View File

@ -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>

View File

@ -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}

View File

@ -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"
}

View File

@ -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"
}