chingu-voyage7 / Bears-Team-09

PairUp: an easy way to find buddies for your favorite activities
https://pair-up.net
5 stars 0 forks source link

Make events dashboard #16

Closed lkaratun closed 5 years ago

vaidotasp commented 5 years ago

So to implement events dashboard I was thinking users would be able to go to a page and search and see the events that they would be interested in "pairing up" or link to a "create new event" page.

To start with a simple dashboard, we need the basic API endpoints: Fetch events based on:

Anything else that user should be able to search by?

@lkaratun @trolleksii

lkaratun commented 5 years ago

@vaidotasp I think we can do location by city name for now, and connect smth like Google maps API later. For the activities, I think we could have categories like "sports", "arts and culture", etc. with more concrete activities in them: "Table tennis practice", "Music concert", "Museum visit", etc. It's ok if there is some overlap (an activity could belong to a couple categories), but there should be only 1 activity per dashboard entry.

As for the endpoints, just hit up @trolleksii here or on slack, and I think he'll be able to make any endpoint for you =)

vaidotasp commented 5 years ago

Okay I think I have enough to go by here in order to start thinking about layout. I can even hardcore categories on the front end in a simple list and display those. Eventually we would probably make an endpoint of all categories that come from back end. Same with activities too, google maps API can be fairly easy to implement, but I will focus on getting something on the page first.

trolleksii commented 5 years ago

Regarding categories/places. To avoid duplication of the data, I think frontend should query API for the availability of the entered name and propose to select existing place/category or create a new one.

vaidotasp commented 5 years ago

I am not sure I understand a what is a "place" in the context of our app. I understand categories to be categories of the events (sports, arts and culture, etc). What is the place? Is that a geographical location (lon, lat coordinates) that the event is taking place?

trolleksii commented 5 years ago

We will start with simple Place object, when you query API for it you'll receive something like this: { country: "Canada", city: "Toronto" } Later on we'll try to add GPS coordinates, so it will be somewhat like this: { country: "Canada", city: "Toronto", coordinates: [43.650864, -79.386529] }

vaidotasp commented 5 years ago

That makes sense. Speaking of Event Dashboard Page - Category and Place filters will work the same (at least in the beginning): Client calls API to fetch all possible Categories and Places from DB and displays them for user to choose. Upon those choices, client re-fetches event list that matches those criteria and displays them on the page. That's the general idea?

lkaratun commented 5 years ago

Yes, this sounds good to me! Probably best do display 1 page of unfiltered results by default too.

vaidotasp commented 5 years ago

Default could should show unfiltered, upcoming events for the next 30 days in any location. Unless, we have user that is signed in and set their location in profile, then we would go by that.

trolleksii commented 5 years ago

What about pagination? I guess 5 to 10 events per page will be more than enough, I can add that to the API. Already done all models, started working on endpoints.

vaidotasp commented 5 years ago

Yes, good idea. 10 events (or 5..I have no strong preference). We can implement one of those infinite scroll solutions, upon member scroll to the bottom > fetch another batch of events.