Expand admin table todo columns

This commit is contained in:
Daniel Flanagan 2024-01-17 21:14:33 -06:00
parent c2aefc7072
commit 93302dc1b4
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 8 additions and 4 deletions

View file

@ -6,7 +6,7 @@ export function Table(
return ( return (
<table <table
{...props} {...props}
class={`border-separate [border-spacing:1.25rem] text-left ${className}`} class={`border-separate [border-spacing:0.50rem] text-left ${className}`}
> >
{children} {children}
</table> </table>

View file

@ -103,7 +103,7 @@ export function Admin({ users, todos }: Props) {
userData={editUser.value} userData={editUser.value}
/> />
</Dialog> </Dialog>
<SectionHead text={`Users (${users.length})`}> <SectionHead text={`Users (${Object.keys(users).length})`}>
<Button onClick={() => showAddUserDialog.value = true}> <Button onClick={() => showAddUserDialog.value = true}>
<PlusOutline class='w-6 h-6' /> <PlusOutline class='w-6 h-6' />
</Button> </Button>
@ -126,7 +126,7 @@ export function Admin({ users, todos }: Props) {
<td> <td>
{avatarUrl == null {avatarUrl == null
? 'None' ? 'None'
: <Avatar className='h-16 w-16' src={avatarUrl} />} : <Avatar className='h-[64px] w-[64px]' src={avatarUrl} />}
</td> </td>
<td style={`color: #${color}`}> <td style={`color: #${color}`}>
#{color} #{color}
@ -158,12 +158,14 @@ export function Admin({ users, todos }: Props) {
<tr> <tr>
<th>Description</th> <th>Description</th>
<th>Assignee</th> <th>Assignee</th>
<th>Done At</th>
<th>Emoji</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{Object.entries(todos).map(( {Object.entries(todos).map((
[_index, { id, description, assigneeUserId }], [_index, { id, emoji, doneAt, description, assigneeUserId }],
) => ( ) => (
<tr> <tr>
<td>{description}</td> <td>{description}</td>
@ -178,6 +180,8 @@ export function Admin({ users, todos }: Props) {
? 'Unassigned' ? 'Unassigned'
: users[assigneeUserId]?.name} : users[assigneeUserId]?.name}
</td> </td>
<td>{doneAt == null ? 'Not Done' : doneAt.toLocaleString()}</td>
<td>{emoji || 'No Emoji'}</td>
<td> <td>
<Button <Button
title='Delete' title='Delete'