-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: add survey schedule option #2386
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI looks great! Didn't test the functionality so @gupta-piyush19 pls do so before merging :)
…feature/schedule-survey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @mattinannt, for the feature; it works really well 🚀
I just have a few suggestions related to code consistency; it would be great if you could comment on or fix them.
Also, one more question: If a survey is already completed and I try to set the runOnDate, should it move to scheduled status or not? Currently, it's not.
@gupta-piyush19 Thanks for the review; I made the required changes; please take a look 😊 |
What does this PR do?
This PR adds the option to schedule a survey for a later so it gets published on the provided date automatically.
![Screenshot 2024-04-03 at 18 05 59](https://private-user-images.githubusercontent.com/675065/319264848-8ac52292-35e2-4373-ac3f-0588e3b23149.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MTc2NDIsIm5iZiI6MTcyMTUxNzM0MiwicGF0aCI6Ii82NzUwNjUvMzE5MjY0ODQ4LThhYzUyMjkyLTM1ZTItNDM3My1hYzNmLTA1ODhlM2IyMzE0OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMFQyMzE1NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNWE4MWVhY2ZjYzM3OWM1NzlkNjIyNjcwZGRhNzU4MGRiMTRmYzdiMjIxY2QyNjdlMDZkNmQ4M2NiNTY3MjYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.to3CwgqPb_7FqLEKz6zVQrBzsu5YE_v7zDJqJyVw_g0)
Fixes # (issue)
How should this be tested?
scheduled
.runOnDate
field in the survey manually to date in the past using prisma studio/api/cron/survey-status
endpoint with a valid cron secret