Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin dashboard #25

Merged
merged 18 commits into from
Apr 23, 2023
Merged

Add admin dashboard #25

merged 18 commits into from
Apr 23, 2023

Conversation

hmellor
Copy link
Owner

@hmellor hmellor commented Apr 23, 2023

  • Solves Add an admin dashboard #23
  • Adds admin.html where the auction status is presented in table format
  • Adds admin.js where the logic for generating the table is kept. This is also the new home of resetItem(i) and resetAll(), meanng that you can only call them from the admin page.
  • Refactors the cards so that all information is found in the card's data attributes instead of being hidden in their children.
  • Add buttons to go between pages, Button to admin page only appears on main page if user has admin field in their user doc*.
  • Table contains the following columns:
    • ID number
    • Title
    • Price
    • Bids
    • Winning - the username of the current winner (admins can see all usernames, non-admins can only see their own username)
    • Time left

*N.B. a nefarious user could add something to their admin field, but unless it is your admin password, they still can't see user data from other users because of the Firestore rules.

@hmellor hmellor marked this pull request as draft April 23, 2023 09:09
@hmellor hmellor marked this pull request as ready for review April 23, 2023 14:46
@hmellor hmellor merged commit be4793d into main Apr 23, 2023
@hmellor hmellor deleted the add-admin-dashboard branch April 23, 2023 14:46
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.

None yet

1 participant