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