Closed sweep-ai[bot] closed 1 year ago
Revised Functionality in 'client_code/forms/routes/ballot/Index/init.py'
IndexTemplate
, Ballot
, and Read
from the specified module.show_ballot
function to ensure its functionality is maintained.create_ballot
function and init_tabulator
function from this section.tabulator
component by integrating new data into it.Modifications in 'client_code/forms/routes/ballot/Read/form_template.yaml'
enabled
property so that it checks whether the current time is earlier than the ends_at
timeframe associated with the item.It uses a walrus which skulpt doesn't support.
Description
This PR addresses the following issues:
To prevent users from submitting votes after the endtime, the Cast Vote Button in the
client_code/forms/routes/ballot/Read/form_template.yaml
file has been modified. It now checks if the current time is greater than the ballot's end time and disables the button if it is.To add a status to the ballot page, the
client_code/forms/routes/ballot/Index/__init__.py
file has been modified. A new field has been added to the ballot object to store the status of the ballot. The ballot display logic has been updated to include the new status field. The status is displayed in a color that depends on the status. For example, if the ballot has ended, the status is displayed in red.Summary of Changes
client_code/forms/routes/ballot/Read/form_template.yaml
to disable it when the ballot's end time has passedclient_code/forms/routes/ballot/Index/__init__.py
client_code/forms/routes/ballot/Index/__init__.py
to include the new status field and display the status in a color that depends on the statusFixes #92.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: