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

Feature/sms templates #838

Merged
merged 9 commits into from
Sep 25, 2023
Merged

Feature/sms templates #838

merged 9 commits into from
Sep 25, 2023

Conversation

ikusteu
Copy link
Collaborator

@ikusteu ikusteu commented Sep 24, 2023

Fixes #700

* reorganise the code in more self contained, modular (and simplified) chunks
* update the UI for more comprehensive UX
* update template interpolation logic to automtically add `</br>` after newlines (so that we don't have to use html `<p>` tags)
* remove `<p>` tags from default email templates
…able for SMS as well:

* Refactor `EmailType` and `EmailTypePayload` types to `ClientMessageType` and `ClientMessagePayload` respectively (and include `ClientMessageMethod`)
* Flatten `client` in the client message payload (ex email payload) for easier type composablity
* Update send SMS https endpoint to use templates when constructing an SMS message for delivery
* Remove unnecessary `SendBookingsLinkMethod` enumn (replaced by ` ClientMessageMethod`)
* Create a SMS Templates tab
* Refactor TemplateBlock for more composability
* Update translations
…component wrapping the contents in `div`)

* Apply the update to admin_preferences page
* Memoize the `Component` wrapper in `LayoutContent` (to prevent rerendering each time props update)
* Update `customers.json` in e2e package to all have a valid phone number (no idea why that wasn't caught earlier)
Copy link
Collaborator

@silviot silviot left a comment

Choose a reason for hiding this comment

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

I was unable to go through the code. I tried the functionality, and I really like how it looks now. I think it would make sense to not include OrganizationName in the template variables (admins will find hard coding the string easier IMO) but there's no need to make changes to this PR. Merging!

@silviot silviot merged commit 99b148f into master Sep 25, 2023
15 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.

Use emailTemplates (or similar templates) for SMS
2 participants