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" button #23

Closed
wants to merge 1 commit into from

Conversation

ellipsis-dev[bot]
Copy link
Contributor

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

Summary:

Issue: #22
Plan feedback: Approved by @hbrooks

Implementation:

  1. Add 'Close form' button to the form detail page
    • In the /src/pages/forms/[id].tsx file, 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 labeled 'Close form'.
  2. Implement 'Close form' button functionality
    • In the /src/pages/forms/[id].tsx file, add an onClick event to the 'Close form' button. This event should call a function that uses the Supabase client to update the is_open value for the correct row in the database. You can use the update method from Supabase client as described in the Supabase docs.
  3. Update button state based on form status
    • In the /src/pages/forms/[id].tsx file, update the 'Close form' button to be unclickable and appear greyed out when the form is closed. This can be achieved by adding a conditional rendering to the button based on the is_open status of the form.

Report:

Step Result Details
1
Add 'Close form' button to the form detail pageAdded 'Close form' button to the form detail page
2
Implement 'Close form' button functionalityImplemented 'Close form' button functionality
3
Update button state based on form statusUpdated the 'Close form' button to be unclickable and appear greyed out when the form is closed.

Something look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #22. 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 hbrooks October 7, 2023 13:12
@vercel
Copy link

vercel bot commented Oct 7, 2023

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

Name Status Preview Updated (UTC)
talk-form-ai ❌ Failed (Inspect) Oct 7, 2023 1:12pm

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