For Issue #81 - Update Ranking Component to add User Rankings to the Event Table
This feature enhances the Rankings component, by allowing visitors/guests to enter a userID, use the click/drag feature to rank movies from highest to lowest, and then submit these rankings to the Event table, where the lambda function will "eventRankings" (consisting of the userID and their userRankings selections to the indicated eventID.
If the eventID indicated does not have any eventRankings, it will be created for the eventID. If it alread has eventRankings entries, a new set of userID-userRankings will be appended to the eventRankings attribute.
This PR also has some optimizing of the ranking.component.html, allowing the userID to be displayed to the user as they are typing it, with no need to press the Enter Key, as well as displaying the user's current top choice, but not a total top choice for all userRankings.
Tested on Win10 laptop, Chrome v92.
Sample Ranking Page Image:
To Test the feature:
From the Home page (localhost:4200/)
[x] Select one of the current red "DEMO" created event buttons.
[x] On the ranking page for this event, enter a UserID in the form field. the "User ID: No User ID entered" line should change as you type, as well as "Your current top choice:" should change to be "[UserID]'s Current Top Choice:".
[x] Adjust movie positions, if desired.
[x] Click the Submit button.
[x] In the console, you will currently see the output of the eventRanking update, showing the eventID, userID, and rankings:
[x] additionally, a successful apicall will return the information added to the database to the console:
[ ] This can also be verified by logging into the DynamoDB console, search for the Event table items for the event id, and selecting the id link to see the json-formatted entry:
For Issue #81 - Update Ranking Component to add User Rankings to the Event Table
This feature enhances the Rankings component, by allowing visitors/guests to enter a userID, use the click/drag feature to rank movies from highest to lowest, and then submit these rankings to the Event table, where the lambda function will "eventRankings" (consisting of the userID and their userRankings selections to the indicated eventID. If the eventID indicated does not have any eventRankings, it will be created for the eventID. If it alread has eventRankings entries, a new set of userID-userRankings will be appended to the eventRankings attribute.
This PR also has some optimizing of the ranking.component.html, allowing the userID to be displayed to the user as they are typing it, with no need to press the Enter Key, as well as displaying the user's current top choice, but not a total top choice for all userRankings.
Tested on Win10 laptop, Chrome v92.
Sample Ranking Page Image:
To Test the feature:
From the Home page (localhost:4200/)
[x] Select one of the current red "DEMO" created event buttons.
[x] On the ranking page for this event, enter a UserID in the form field. the "User ID: No User ID entered" line should change as you type, as well as "Your current top choice:" should change to be "[UserID]'s Current Top Choice:".
[x] Adjust movie positions, if desired.
[x] Click the Submit button.
[ ] This can also be verified by logging into the DynamoDB console, search for the Event table items for the event id, and selecting the id link to see the json-formatted entry: