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

Add active surveys to the warning message when deleting a channel #2374

Merged
merged 9 commits into from
Dec 10, 2024

Conversation

ismaelbej
Copy link
Contributor

@ismaelbej ismaelbej commented Nov 13, 2024

Changes

  • Add query to retrieve running surveys for a provider and baseUrl
  • Change modal to show active surveys
  • Add unit test for the endpoints

Screens

Searching for active surveys

Screenshot 2024-11-19 at 6 39 55 PM

No active surveys

Screenshot 2024-11-19 at 6 39 02 PM

List of active surveys

Screenshot 2024-11-21 at 7 48 45 PM

@ismaelbej ismaelbej marked this pull request as ready for review November 19, 2024 21:47
Copy link
Member

@matiasgarciaisaia matiasgarciaisaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add access control to the endpoint.

lib/ask/survey.ex Outdated Show resolved Hide resolved
lib/ask_web/controllers/survey_controller.ex Outdated Show resolved Hide resolved
assets/js/components/channels/ChannelIndex.jsx Outdated Show resolved Hide resolved
assets/js/components/channels/ProviderModal.jsx Outdated Show resolved Hide resolved
Copy link
Member

@matiasgarciaisaia matiasgarciaisaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's usually a good idea to avoid DB subqueries if possible.

If the subquery is actually needed, let's merge as is!

lib/ask/survey.ex Outdated Show resolved Hide resolved
Co-authored-by: Matías García Isaía <[email protected]>
@matiasgarciaisaia matiasgarciaisaia merged commit f1e500c into main Dec 10, 2024
2 checks passed
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.

2 participants