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.
admin.html
where the auction status is presented in table formatadmin.js
where the logic for generating the table is kept. This is also the new home ofresetItem(i)
andresetAll()
, meanng that you can only call them from the admin page.card
s so that all information is found in thecard
's data attributes instead of being hidden in their children.