Pizza-and-Bier / lunafest-dyb-frontend

Client-facing code for the LUNAFEST silent auction webapp.
1 stars 1 forks source link

Feature/winners view #60

Closed cbierman closed 6 years ago

cbierman commented 6 years ago

The way this works is:

  1. "winners" table is updated when an item is bid on. It's keyed by item id so that we know who's winning what
  2. when the auction is closed (the big red stop button), a function fires off to create a new collection, "payments", from the winners list. Payments is keyed by the user id of the winner and a "paid" boolean value that's initially false. Since we're grouping the items by winner on the frontend, I don't think we'll run into any issues with people winning multiple items.
  3. The winners list grabs all the winners and does some grouping by user ID to play nice with the markup
  4. Winners list also grabs the payments information
  5. When "Mark paid" is clicked, it toggles the user's paid value.

Let me know if that logic makes sense or if there are any holes in it that you can see.