Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BitBuilder] Add "Close form" functionality #48

Closed
wants to merge 1 commit into from

Conversation

ellipsis-dev[bot]
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot commented Oct 10, 2023

Summary:

Issue: #47
Plan feedback: Approved by @nsbradford

Implementation:

  1. Add 'Close form' button in Form Detail Page
    • In the file /src/pages/forms/[id].tsx, add a new button next to the 'View live form' button. This button should be styled similarly to the 'View live form' button. The button should be clickable only if the form is open. When clicked, it should call a function that uses the Supabase client to update the is_open field of the form in the database to false. After the form is closed, the button should appear greyed-out and unclickable.
  2. Add form status count on Home Page
    • In the file /src/pages/home.tsx, add a count of how many open and closed forms there are, next to the New Form button. This will require fetching the form data from the database and counting the number of forms where is_open is true and false respectively.
  3. Add error message for closed forms on Form Fill Page
    • In the file /src/pages/forms/fill/[id].tsx, add an error message that will be displayed if a user tries to fill a form that is closed. This will require fetching the form data from the database and checking if is_open is false for the form. If it is, display an error message indicating that the form is closed and cannot be filled.

Report:

Step Result Details
1
Add 'Close form' button in Form Detail PageAdded 'Close form' button in Form Detail Page
2
Add form status count on Home PageAdded form status count on Home Page
3
Add error message for closed forms on Form Fill PageAdded error message for closed forms on Form Fill Page

Something look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #47. Then, add the bitbuilder:create label to try again. For more information, check the documentation.

Generated with ❤️ by www.bitbuilder.ai

@ellipsis-dev ellipsis-dev bot requested a review from nsbradford October 10, 2023 23:24
@vercel
Copy link

vercel bot commented Oct 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
talk-form-ai ❌ Failed (Inspect) Oct 10, 2023 11:24pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant