wip:ScanValid badge
This commit is contained in:
parent
4b171fd04f
commit
bd4952ee57
16
src/components/scans/ScanValid.svelte
Normal file
16
src/components/scans/ScanValid.svelte
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<script>
|
||||||
|
import { _ } from "svelte-i18n";
|
||||||
|
export let valid = false;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if valid}
|
||||||
|
<span
|
||||||
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800"
|
||||||
|
>{$_("valid")}</span
|
||||||
|
>
|
||||||
|
{:else}
|
||||||
|
<span
|
||||||
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800"
|
||||||
|
>{$_("invalid")}</span
|
||||||
|
>
|
||||||
|
{/if}
|
@ -21,6 +21,7 @@
|
|||||||
import TableActions from "../shared/TableActions.svelte";
|
import TableActions from "../shared/TableActions.svelte";
|
||||||
import { runnerFilter } from "../shared/tablefilters";
|
import { runnerFilter } from "../shared/tablefilters";
|
||||||
import CardRunner from "../cards/CardRunner.svelte";
|
import CardRunner from "../cards/CardRunner.svelte";
|
||||||
|
import ScanValid from "./ScanValid.svelte";
|
||||||
|
|
||||||
$: selectedScans =
|
$: selectedScans =
|
||||||
$table?.getSelectedRowModel().rows.map((row) => row.original) || [];
|
$table?.getSelectedRowModel().rows.map((row) => row.original) || [];
|
||||||
@ -106,6 +107,14 @@
|
|||||||
},
|
},
|
||||||
enableColumnFilter: true,
|
enableColumnFilter: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
accessorKey: "valid",
|
||||||
|
cell: (info) => {
|
||||||
|
return renderComponent(ScanValid, { valid: info.getValue() });
|
||||||
|
},
|
||||||
|
header: () => $_("status"),
|
||||||
|
filterFn: `includesString`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "actions",
|
accessorKey: "actions",
|
||||||
header: () => $_("action"),
|
header: () => $_("action"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user