Signal-K / client

Frontend for viewing citizen science proposals on Lens Protocol
https://starsailors.space
7 stars 5 forks source link

πŸ‡πŸš΄πŸ»β€β™‚οΈ ↝ Adding planet status to API (sytizen) & admin section #68

Closed Gizmotronn closed 1 year ago

Gizmotronn commented 1 year ago

As part of our ongoing efforts to enhance our planetary data catalog webapp, we need to introduce a new feature to manage and display the status of each planet. The goal is to categorize planets into "completed," "in progress," or "incomplete" based on their data verification status.

Backend Implementation:

Create a new table called planet_status to store the status for each planet. The table will include columns for the id, planet_id, status, and updated_by.

Implement a backend API endpoint that allows specific users, identified by their session ID, to update the status of planets in the planet_status table.

Frontend Implementation:

Fetch data for all planets and their corresponding statuses from the backend API (planetsss and planet_status tables).

Display the planet status on the frontend, using conditional rendering or color codes to represent different status types.

Enable a button for authorized users to update the status of each planet. When clicked, the updated status and planet ID will be sent to the backend API for storage in the planet_status table.

User Authorization: To ensure that only authorized users can update the planet status, implement logic to check the user's session ID or identifier on both the frontend and backend. If the user's session ID matches the authorized ID, enable the status update feature.

Jira

API commits: https://github.com/Signal-K/sytizen/commit/64a9e84335403b98692732976470f9f37f35b2da