rconjoe/provana-mono

DashboardService, UpcomingSessions, cancel flow

rconjoe opened this issue · 1 comments

what now

turns out fetchSoldSessions and fetchPurchasedSlots were feeding the returned data through the same store mutations. that's obviously not going to work since session and slot models are not the same.

how fix

everything will be a slot. it's actually weird to be showing users sessions under the sold row, and slots under the purchased row, since it's unclear that a single sold session listing might include 3 slot sales.

getSoldSessions needs to become getSoldSlots.

once we're back in the dashboard.js module, the calls that put together the object needed for SessionDetails also probably gotta get shuffled around.
This is the goal:

{
  bookedSlots: Array<Slot>,
  buyers: Array<Supporter|Creator>,
  seller: Seller,
  session: Session
}

lesson learned - don't over-nest data inside of vuex. you will hit a wall eventually to where vuex just don't take your shit