project/src/main/webapp/event-details.js
/**
 * Adds the volunteering opportunities to the event card and the dropdown
 * in the signup form.
 * @param {string} eventHost email of the host of the event
 * @param {boolean} isHost
 */
Adds the volunteering opportunities to the event card and the dropdown
in the signup form.
@param {string} eventHost email of the host of the event
@param {boolean} isHost
Adds the volunteering opportunities to the event card and the dropdown in the signup form . @param { string } eventHost email of the host of the event @param { boolean } isHost
async function populateVolunteeringOpportunitiesUI(eventHost, isHost) {
  const eventId = getEventId();
  const response = await fetch(`/event-volunteering-data?event-id=${eventId}`);
  const opportunities = await response.json();
  showVolunteeringOpportunities(opportunities, eventHost, isHost);
  populateOpportunitiesDropdown(opportunities);
}
async function populateVolunteeringOpportunitiesUI ( eventHost , isHost ) { const eventId = getEventId ( ) ; const response = await fetch ( ` ${ eventId } ` ) ; const opportunities = await response . json ( ) ; showVolunteeringOpportunities ( opportunities , eventHost , isHost ) ; populateOpportunitiesDropdown ( opportunities ) ; }
Adds the volunteering opportunities to the event card and the dropdown
 in the signup form.
Adds the volunteering opportunities to the event card and the dropdown in the signup form .