From 78ecd582ebd1906f77e3ce3edc6790713fdc4931 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?=
<31509435+aleksasiriski@users.noreply.github.com>
Date: Sun, 9 Feb 2025 20:00:16 +0100
Subject: [PATCH] fix(actions): nicer code
---
src/routes/(dashboard)/columns.ts | 20 +++++++++----------
.../(dashboard)/data-table-actions.svelte | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/routes/(dashboard)/columns.ts b/src/routes/(dashboard)/columns.ts
index bbebe17..914e764 100644
--- a/src/routes/(dashboard)/columns.ts
+++ b/src/routes/(dashboard)/columns.ts
@@ -43,17 +43,17 @@ export function createColumns(
header: 'State'
},
{
- id: 'togglestate',
- header: 'Toggle State',
- cell: ({ row }) => {
+ id: 'actions',
+ header: 'Actions',
+ cell: ({ row: { original: person } }) => {
return renderComponent(DataTableActions, {
- personId: row.original.id,
- guarantorFname: row.original.guarantorFname,
- guarantorLname: row.original.guarantorLname,
- guarantorIdentifier: row.original.guarantorIdentifier,
- personType: row.original.type,
- personState: row.original.state,
- building: row.original.building,
+ personId: person.id,
+ guarantorFname: person.guarantorFname,
+ guarantorLname: person.guarantorLname,
+ guarantorIdentifier: person.guarantorIdentifier,
+ personType: person.type,
+ personState: person.state,
+ building: person.building,
userBuilding,
toggleStateFormSubmit,
toggleGuestStateFormSubmit,
diff --git a/src/routes/(dashboard)/data-table-actions.svelte b/src/routes/(dashboard)/data-table-actions.svelte
index 22fb3bd..b23f875 100644
--- a/src/routes/(dashboard)/data-table-actions.svelte
+++ b/src/routes/(dashboard)/data-table-actions.svelte
@@ -133,7 +133,7 @@
class="w-full"
>
- Show guests
+ Show guests
{/if}