Skip to content

feat: registered users refactor#969

Merged
chedieck merged 2 commits intomasterfrom
feat/create-table-users-registered
Mar 10, 2025
Merged

feat: registered users refactor#969
chedieck merged 2 commits intomasterfrom
feat/create-table-users-registered

Conversation

@lissavxo
Copy link
Copy Markdown
Collaborator

Related to #968

Description

Changed registered users table to use TableContainer component

Test plan

run server with docker compose up check admin page Registered Users section

@Klakurka Klakurka requested a review from chedieck February 28, 2025 14:33
Copy link
Copy Markdown
Collaborator

@chedieck chedieck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Is admin?" is always true

Header: 'Admin',
accessor: 'isAdmin',
Cell: ({ cell }: any) => (
cell.value === undefined ? 'No' : <span className={style.admin}>Yes</span>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, outputting 'Yes' always

@lissavxo lissavxo requested a review from chedieck March 6, 2025 14:16
Header: 'Admin',
accessor: 'isAdmin',
Cell: ({ cell }: any) => (
cell.value === null ? 'No' : <span className={style.admin}>Yes</span>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should actually check id isAdmin === true to return "Yes".

Non admin users can have this attribute both as NULL or 0 in the DB (null or false after prisma)

@lissavxo lissavxo force-pushed the feat/create-table-users-registered branch from 10fb4b6 to 7aee46c Compare March 7, 2025 20:13
@lissavxo lissavxo requested a review from chedieck March 7, 2025 20:13
@chedieck chedieck merged commit 43b18fd into master Mar 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants