Formatting

ref #94
This commit is contained in:
Nicolai Ort 2021-03-23 17:34:25 +01:00
parent 77e9c205f9
commit a516aa7775

View File

@ -1,17 +1,17 @@
<script>
import { getLocaleFromNavigator, _ } from "svelte-i18n";
import {
RunnerCardService,
} from "@odit/lfk-client-js";
import { RunnerCardService } from "@odit/lfk-client-js";
import store from "../../store";
import Toastify from "toastify-js";
import CardsEmptyState from "./CardsEmptyState.svelte";
$: searchvalue = "";
$: active_deletes = [];
export let current_cards = [];
const cards_promise = RunnerCardService.runnerCardControllerGetAll().then((val) => {
current_cards = val;
});
const cards_promise = RunnerCardService.runnerCardControllerGetAll().then(
(val) => {
current_cards = val;
}
);
function should_display_based_on_id(id) {
if (searchvalue.toString().slice(-1) === "*") {
return id.toString().startsWith(searchvalue.replace("*", ""));
@ -84,9 +84,7 @@ RunnerCardService,
) || should_display_based_on_id(card.id)}
<tr data-rowid="card_{card.id}">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
{card.code}
</div>
<div class="flex items-center">{card.code}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">