alexboden / swim-ranking-analysis

A website that allows users to upload a PDF for a swim ranking sheet and change rankings to analyze the effect on final scores.
1 stars 0 forks source link

Sweep: Add Entry Functionality #10

Open alexboden opened 1 year ago

alexboden commented 1 year ago

Details

For each event table in templates/entries.html and each table in template/teams.html add the option to enter a new entry. This entry would then be saved to the database via a new api.

sweep-ai[bot] commented 1 year ago

Here's the PR! https://github.com/alexboden/swim-ranking-analysis/pull/12.

⚡ Sweep Free Trial: I used GPT-4 to create this ticket. You have 1 GPT-4 tickets left. For more GPT-4 tickets, visit our payment portal.


Step 1: 🔍 Code Search

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/alexboden/swim-ranking-analysis/blob/543067f6383104d618c00c97969ccdea7a2dc706/templates/entries.html#L1-L76 https://github.com/alexboden/swim-ranking-analysis/blob/543067f6383104d618c00c97969ccdea7a2dc706/templates/teams.html#L1-L117 https://github.com/alexboden/swim-ranking-analysis/blob/543067f6383104d618c00c97969ccdea7a2dc706/main.py#L1-L282 https://github.com/alexboden/swim-ranking-analysis/blob/543067f6383104d618c00c97969ccdea7a2dc706/Meet/entry.py#L1-L87 https://github.com/alexboden/swim-ranking-analysis/blob/543067f6383104d618c00c97969ccdea7a2dc706/static/table.js#L1-L202

I also found the following external resources that might be helpful:

Summaries of links found in the content:


Step 2: 🧐 Snippet Analysis

From looking through the relevant snippets, I decided to make the following modifications:

File Path Proposed Changes
templates/entries.html Add a form to each event table to allow users to enter a new entry. Auto-fill the event name based on the table it is inserting into.
templates/teams.html Add a form to each table to allow users to enter a new entry. Auto-fill the name field.
main.py Create a new API endpoint to handle the submission of new entries and save them to the database.

Step 3: 📝 Planning

I have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request:

Add Entry Functionality sweep/add-entry-functionality

Description

This PR adds entry functionality to the swim-ranking-analysis website. It addresses Issue #10 by allowing users to enter new entries in the event tables and team tables. The entered data is saved to the database via a new API endpoint.

Summary of Changes

  • Added a form to each event table in templates/entries.html to allow users to enter a new entry. The event name is auto-filled based on the table it is inserting into.
  • Added a form to each table in templates/teams.html to allow users to enter a new entry. The name field is auto-filled.
  • Created a new API endpoint in main.py to handle the submission of new entries and save them to the database.

Please review and merge this PR to enable the entry functionality on the website.


Step 4: ⌨️ Coding

I have finished coding the issue. I am now reviewing it for completeness.


Step 5: 🔁 Code Review

Success! 🚀


I'm a bot that handles simple bugs and feature requests but I might make mistakes. Please be kind! Join Our Discord

alexboden commented 1 year ago

Sweep: When adding to the templates/entries page the event name should be auto filled based on the table it is inserting into. Similarly the name should be autofilled when entering into the templates/teams.html page.