clicking "send" would generate a 500 error because of a missing email template
the server was relying the client to tell it the deep dive content. This was an issue since it would be pretty easy to tell the server to email anything to any email address.
there was no user feedback for success or errors
This PR addresses these issues:
The client now sends a list of deepdive uuids and locale info, and the server is responsible for getting the corresponding deepdive content from the tour. (I tweaked the route, so that it includes a tour parameter.)
A new email template was added (basically the hotwords template) using default laravel email formatting. It's very basic, but we can iterate or bring in the designs from another app in a future iteration.
Notifications added for success/errors and a spinner for pending state. As part of this, the "deepdives" were extracted to its own pinia store with actions.
Form submission is disabled until the user checks at least one deepdive and includes an email.
Other things:
a mailhog container was added to Sail, so that devs can grab generated emails at http://localhost:8025
at some point, I decided needed a real PHP debugger in my environment (I don't even want to admit how long I was just dumping or logging variables). Of course, Sail has Xdebug support built in. I just needed to turn it on. 🙄 I added a (commented out) env variable in the example file in case I forget in the future.
Added a few new methods to Stop and Tour models for getting deepdives. Also, I added constants for possible locales.
Previously, emailing deep dives had a few issues:
This PR addresses these issues:
Other things:
http://localhost:8025
Stop
andTour
models for getting deepdives. Also, I added constants for possible locales.Closes #269