Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve Published Schedule Events Grouped By Season #36

Closed
ThatMegamind opened this issue Jan 21, 2024 · 0 comments · Fixed by #40
Closed

Retrieve Published Schedule Events Grouped By Season #36

ThatMegamind opened this issue Jan 21, 2024 · 0 comments · Fixed by #40
Assignees
Labels

Comments

@ThatMegamind
Copy link
Collaborator

ThatMegamind commented Jan 21, 2024

Instructions

  • Based on the new published schedule page design, we need to write new routes to retrieve and format data so it can be easily displayed in the frontend
  • When the user is the published schedule page, they are only viewing one season + year at a time (ex. FALL 2023). Additionally, within each day of the season, we need to group all the events in a specific day together.
  • Write a new route GET /published-schedule/season that will have 2 fields in req.query: year and season (SPRING, SUMMER, FALL, WINTER) and returns all events occurring in that season GROUPED BY date and ORDERED BY date ASC (chronologically)
    • if the query fields are not there, issue a 400 status code

    • the data returned for a season may look something like this
      `{
      date: json_array[events schedule on that day],
      '2024/01/12': [
      {
      id: 23, // published schedule id
      title: "Navigating Life",
      eventType: "Life Skills",
      year: "both",
      startTime:
      endTime:
      // all fields in published schedule table
      ...

      }
      ],
      }`

  • Write a second route GET /published-schedule/date that requires one field in req.query: date in YYYY-MM-DD format. This will return all events occurring on a specific date.

Notes

  • You might need to create a few published events to test this functionality
  • For now, the cutoffs for each season will be defined as follows (we'll be making them more specific when we receive details from AISS)
    • Winter: December - February
    • Spring: March - May
    • Summer: June - August
    • Fall: September - November
  • To understand the usage more in the Published Schedule, talk with Kaila from the design side!

Acceptance Criteria

  • Test via Postman that you can retrieve Published Schedule events and that all events retrieved fit in the correct season

Resources

As always, feel free to message Michael and Michelle if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants