JonathanGarro / SIMS-Portal

IFRC Surge Information Management Support Portal
4 stars 4 forks source link

Display SIMS products automatically on GO emergency page #51

Open JonathanGarro opened 1 year ago

JonathanGarro commented 1 year ago

A longer-term, nice-to-have feature to further integrate the GO Platform and the SIMS Portal might be to add a connection between the publicly-approved portfolio for the event on the documents tab:

Screen Shot 2023-06-17 at 10 35 32 AM

I think we could simply accept incoming requests that serves up the S3 location of the thumbnail, and then link back to the product page on the SIMS Portal.

JonathanGarro commented 1 year ago

I've started laying the groundwork for API functionality in the Portal as a first step towards a working example to pitch to the GO team. As a proof of concept, you can now get a json of all registered users at rcrcsims.org/api/users.

JonathanGarro commented 1 year ago

The API has been updated with an additional endpoint for portfolio. You can now query the database to get all products whose status has been marked as Approved for a given emergency. There's a required argument of emergency_id, which corresponds to the GO emergency ID. For example:

https://rcrcsims.org/api/portfolio?emergency_id=6414

This returns all approved products for the Sudan Crisis.

I've logged an issue with the GO team requesting consideration to automatically bring in the products either as distinct cards or as items in a new table of products.