Compare commits
No commits in common. "19793cdcd4769c724a4f7ba4c10f119b370afa51" and "c7990882cfa4ac6c3a2ffa696dcbf3b62790c1fe" have entirely different histories.
19793cdcd4
...
c7990882cf
@ -9,7 +9,6 @@
|
||||
getFilteredRowModel,
|
||||
getPaginationRowModel,
|
||||
getSortedRowModel,
|
||||
renderComponent,
|
||||
} from "@tanstack/svelte-table";
|
||||
import {
|
||||
RunnerService,
|
||||
@ -23,7 +22,6 @@
|
||||
import { onMount } from "svelte";
|
||||
import InputElement from "../shared/InputElement.svelte";
|
||||
import { groupFilter } from "../shared/tablefilters";
|
||||
import TableActions from "../shared/TableActions.svelte";
|
||||
|
||||
$: selectedRunners =
|
||||
$table?.getSelectedRowModel().rows.map((row) => row.original) || [];
|
||||
@ -69,20 +67,6 @@
|
||||
},
|
||||
enableColumnFilter: false,
|
||||
},
|
||||
{
|
||||
accessorKey: "id",
|
||||
header: () => $_("action"),
|
||||
cell: (info) => {
|
||||
return renderComponent(TableActions, {
|
||||
detailsLink: `./${info.getValue()}`,
|
||||
deleteAction: () => {
|
||||
console.log(info.getValue());
|
||||
},
|
||||
deleteEnabled: true,
|
||||
});
|
||||
},
|
||||
enableColumnFilter: false,
|
||||
},
|
||||
];
|
||||
|
||||
//
|
||||
|
@ -1,26 +0,0 @@
|
||||
<script>
|
||||
import { _ } from "svelte-i18n";
|
||||
|
||||
export let detailsLink;
|
||||
export let detailsAction;
|
||||
export let deleteEnabled;
|
||||
export let deleteAction;
|
||||
</script>
|
||||
|
||||
{#if detailsLink}
|
||||
<a href={detailsLink} class="text-indigo-600 hover:text-indigo-900"
|
||||
>{$_("details")}</a
|
||||
>
|
||||
{:else if detailsAction}
|
||||
<button href={detailsLink} class="text-indigo-600 hover:text-indigo-900"
|
||||
>{$_("details")}</button
|
||||
>
|
||||
{/if}
|
||||
{#if deleteEnabled}
|
||||
<button
|
||||
tabindex="0"
|
||||
on:click={deleteAction}
|
||||
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer"
|
||||
>{$_("delete")}</button
|
||||
>
|
||||
{/if}
|
Loading…
x
Reference in New Issue
Block a user