OSDLabs / swd

Student Welfare Division, BITS Pilani, Goa
MIT License
3 stars 9 forks source link

Source of data to be used for 'Latest Events and News' section #22

Open 0xRampey opened 7 years ago

0xRampey commented 7 years ago

The current SWD website has this section on the right. How are we going to fetch data for this section? Statically or from a database?

mukkachaitanya commented 7 years ago

Which is same as the General notices.

mukkachaitanya commented 7 years ago

A quick look at the schema; we can see that we have a notices table which allows us to stores the details that need to be shown.

So we need to fetch are from the database. Again this database is updated accordingly by the person uploading it (a SWD staff).

0xRampey commented 7 years ago

So "Latest Events" are obtained by searching for notices from a recent period right?

SebastinSanty commented 7 years ago

This is why #19 is for. We can use firebase based updations.

0xRampey commented 7 years ago

How is that related? Firebase Cloud Messaging seems to be for real-time data applications like Instant Messaging. 'General notices' are barely updated every 3-4 days.

mukkachaitanya commented 7 years ago

So "Latest Events" are obtained by searching for notices from a recent period right?

Yes @prampey, that's how it should be done. Though as of now all the notices in the database are being displayed. The database is probably being cleaned manually whenever necessary. (Not very sure)

SebastinSanty commented 7 years ago

@prampey yeah, sorry. I was thinking of something else.

0xRampey commented 7 years ago

@mukkachaitanya If possible, can you craft the required GraphQL query and send the data as props to the Home component? Till then, I can work on automatically populating the lists for the UI cards from the incoming prop data.

0xRampey commented 7 years ago

Nevermind, I'll open up a separate issue for you. Do it at your convenience.

mukkachaitanya commented 7 years ago

@mukkachaitanya If possible, can you craft the required GraphQL query and send the data as props to the Home component?

@SebastinSanty can you take this up?

Till then, I can work on automatically populating the lists for the UI cards from the incoming prop data.

Yeah sure. Take the above schema as the blue print for the props being returned by the GraphQL query.