Add nomination submission and bidding start workflow
- Added `BID_START_REQUEST` and `NOMINATION_SUBMIT_REQUEST` handling in backend consumers. - Extended draft state to include `current_movie` and `bids` cache keys. - Updated frontend to: - Allow participants to nominate movies when it's their turn. - Enable admins to start bidding for the nominated movie. - Highlight the current nominated movie and the current user. - Synced state updates across clients via WebSocket events.
This commit is contained in:
@@ -37,6 +37,10 @@ class DraftCacheKeys:
|
||||
def draft_index(self):
|
||||
return f"{self.prefix}:draft_index"
|
||||
|
||||
@property
|
||||
def current_movie(self):
|
||||
return f"{self.prefix}:current_movie"
|
||||
|
||||
# @property
|
||||
# def state(self):
|
||||
# return f"{self.prefix}:state"
|
||||
@@ -45,9 +49,9 @@ class DraftCacheKeys:
|
||||
# def current_movie(self):
|
||||
# return f"{self.prefix}:current_movie"
|
||||
|
||||
# @property
|
||||
# def bids(self):
|
||||
# return f"{self.prefix}:bids"
|
||||
@property
|
||||
def bids(self):
|
||||
return f"{self.prefix}:bids"
|
||||
|
||||
# @property
|
||||
# def participants(self):
|
||||
@@ -146,7 +150,7 @@ class DraftStateManager:
|
||||
"draft_order": self.draft_order,
|
||||
"draft_index": self.draft_index,
|
||||
"connected_participants": self.connected_participants,
|
||||
# "current_movie": self.cache.get(self.keys.current_movie),
|
||||
"current_movie": self.cache.get(self.keys.current_movie),
|
||||
# "bids": self.get_bids(),
|
||||
# "timer_end": self.get_timer_end(),
|
||||
}
|
||||
Reference in New Issue
Block a user