feat: Implement email templates by rajat1saxena · Pull Request #669 · codelitdev/courselit

@google-labs-jules

This commit introduces the email templates feature, allowing you to create reusable templates for broadcast and sequence emails.

Backend:
- Added `EmailTemplate` model.
- Implemented GraphQL queries (`getEmailTemplate`, `getEmailTemplates`) and mutations (`createEmailTemplate`, `updateEmailTemplate`, `deleteEmailTemplate`) for email templates.
- Added logic for the new GraphQL operations.

Frontend:
- Added a 'Templates' tab to the `/dashboard/mails` page.
- Created a `TemplatesList` component to display email templates.
- Created an email template editor page.
- Created a new page for selecting a template when creating a new broadcast or sequence.
- Updated the `createSequence` mutation to accept `title` and `content` from a template.