We want the user to be able to touch a row of the match list table and go to the match data for editing. (Later we will restrict this functionality to users with admin role or perhaps let user view content but restrict the save/update button)
Details
We have the matchId from the database rows returned to fill the table so we simply use that in a restful /matches/:matchId/edit React Router.
Testing
Clicking a row of the match table takes us to the content with a console log verifying that match id has been successfully parsed from the URL params.
Next steps
We can fetch the match data from the database and populate the fields for the user. Need to fix to use new/better express restful api and display-only competition (a non-editable fields) and maybe ditto for team name and match number (let's check with scouting team).
And we need to add a "New" button on top of the match list table so the user can add new match reports.
Summary
We want the user to be able to touch a row of the match list table and go to the match data for editing. (Later we will restrict this functionality to users with admin role or perhaps let user view content but restrict the save/update button)
Details
We have the matchId from the database rows returned to fill the table so we simply use that in a restful /matches/:matchId/edit React Router.
Testing
Clicking a row of the match table takes us to the content with a console log verifying that match id has been successfully parsed from the URL params.
Next steps
We can fetch the match data from the database and populate the fields for the user. Need to fix to use new/better express restful api and display-only competition (a non-editable fields) and maybe ditto for team name and match number (let's check with scouting team).
And we need to add a "New" button on top of the match list table so the user can add new match reports.