Added old formatting for runner and status

ref #147
This commit is contained in:
Nicolai Ort 2023-02-18 19:22:42 +01:00
parent 757655ea63
commit df63c2388d
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -90,9 +90,9 @@
}} }}
/> />
</th> </th>
<Th {handler} orderBy="code">{$_('code')}</Th> <Th {handler} orderBy="code">{$_("code")}</Th>
<Th {handler} orderBy="runner">{$_('runner')}</Th> <Th {handler} orderBy="runner">{$_("runner")}</Th>
<Th {handler} orderBy="status">{$_('status')}</Th> <Th {handler} orderBy="status">{$_("status")}</Th>
<th>{$_("action")}</th> <th>{$_("action")}</th>
</tr> </tr>
<tr> <tr>
@ -128,8 +128,30 @@
/> />
</td> </td>
<td>{row.code}</td> <td>{row.code}</td>
<td>{row.runner}</td> <td>
<td>{row.enabled}</td> {#if row.runner}
<a
href="../runners/{row.runner.id}"
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800"
>{row.runner.firstname}
{row.runner.middlename || ""}
{row.runner.lastname}</a
>
{:else}{$_("non-blanko")}{/if}
</td>
<td>
{#if row.enabled}
<span
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800"
>{$_("enabled")}</span
>
{:else}
<span
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800"
>{$_("disabled")}</span
>
{/if}
</td>
<td> <td>
{#if active_deletes[row.id] === true} {#if active_deletes[row.id] === true}
<button <button
@ -142,7 +164,10 @@
> >
<button <button
on:click={() => { on:click={() => {
RunnerCardService.runnerCardControllerRemove(row.id, true) RunnerCardService.runnerCardControllerRemove(
row.id,
true
)
.then((resp) => { .then((resp) => {
current_cards = current_cards.filter( current_cards = current_cards.filter(
(obj) => obj.id !== row.id (obj) => obj.id !== row.id