Add movie detail API and enhance draft admin/participant UI

- Introduced `/api/movie/<id>/detail` endpoint returning TMDB data for a movie.
- Moved draft detail fetching logic into `common/utils.js` for reuse.
- Updated Draft Admin panel:
  - Added phase navigation buttons with bootstrap icons.
  - Improved layout with refresh and status controls.
- Updated Draft Participant panel:
  - Added movie pool display with links to movie details.
- Added bootstrap-icons stylesheet and corresponding SCSS styles for new UI.
This commit is contained in:
2025-08-08 15:12:40 -05:00
parent 9b6b3391e6
commit 24700071ed
8 changed files with 186 additions and 101 deletions

View File

@@ -0,0 +1,29 @@
export async function fetchDraftDetails(draftSessionId) {
return fetch(`/api/draft/${draftSessionId}/`)
.then((response) => {
if (response.ok) {
return response.json()
}
else {
throw new Error()
}
})
.catch((err) => {
console.error("Error fetching draft details", err)
})
}
export async function fetchMovieDetails(draftSessionId) {
return fetch(`/api/draft/${draftSessionId}/movie/`)
.then((response) => {
if (response.ok) {
return response.json()
}
else {
throw new Error()
}
})
.catch((err) => {
console.error("Error fetching draft details", err)
})
}