SimplQ / simplQ-frontend

Modern and fully web based free queue management open source software.
https://simplq.me
GNU General Public License v3.0
175 stars 135 forks source link

Refactor join form #684

Closed daltonfury42 closed 2 years ago

daltonfury42 commented 2 years ago
  1. We were not sending email id that was collected from admin page. This was causing the token to be non-notifiable, as pointed out by @maaverik in #683
  2. The backend now determines if a token is notifiable or not by checking if the token has a email ID associated with it. So the frontend need not send the boolean notifiable, and this is removed.
  3. Moving the handler to dispatch the backend calls into JoinForm where it's needed. This also avoids need to duplicate it in Admin Page and Join Page parents.
  4. Some variable renaming and standardisations like email -> emailId, contact -> contactNumber, queuePage -> isAdminPage.
github-actions[bot] commented 2 years ago

Preview URL for this branch is https://refactor-join-form.dpmhbfuiok7f8.amplifyapp.com. Please wait for sometime for the build to finish.

maaverik commented 2 years ago

Even though I have enabled notifications for tokens, the admin page shows that the token are not notifiable. I joined the queue using the queue link and enabled notifications. Is there anything I'm missing?

daltonfury42 commented 2 years ago

Even though I have enabled notifications for tokens, the admin page shows that the token are not notifiable.

The toggle button for notifications that we used to have earlier doesn't work well anymore. I am fixing that in coming PRs which are in progress.

So current logic is, "Notifications are enabled if the token had a email ID associated with it, and it's not already been notified".

To start collecting emails, the admin has to go to queue settings -> enable "Notify by Email".

I am planning to leave this flag on by default. That will be a backend change.

daltonfury42 commented 2 years ago

Also, email content would be updated to this. Leave any comments if any.