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/#548 new email editor page #555

Merged

Conversation

Sinharitik589
Copy link
Collaborator

Description

Provide feature of editing the email templates providing user to set subject as well as body for the template
Major changes/addition:-

  • Seperate mongodb model for email as setting model usecase doesnt apply to it , it has additional field like subject and moreover we dont want to fetch email configurations along with all settings as it is an important aspect
  • An additional key emailVariables assigned to the model , for the usecase when we need to place the variables for e.g. name as per user which can now be achieved as user will use the format {{variable}} for those cases.

Related Issues

#548

Screenshots (if applicable)

ezgif com-video-to-gif (16)

Checklist

  • I have tested these changes
  • I have updated the relevant documentation
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the codebase
  • My changes generate no new warnings or errors
  • The title of my pull request is clear and descriptive

@salahlalami
Copy link
Member

salahlalami commented Sep 19, 2023

@Sinharitik589 Cool , it's look good , i like your approach to create new Model for Email

models/coreModels/Email.js Outdated Show resolved Hide resolved
required:true,
},
emailVariables:{
type:Array
Copy link
Member

Choose a reason for hiding this comment

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

what's reason to use this emailVariables ?

for custom email variable , we can use pattern {{client.name}} , then when we send email , we can replace those variable before sending mail

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for two purpose , first is to let user know that these are the varables that you might use in that particular email and second is to parse only those variables when sending the mail
image

Copy link
Member

Choose a reason for hiding this comment

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

perfect

models/coreModels/Email.js Show resolved Hide resolved
models/coreModels/Email.js Show resolved Hide resolved
required:true,
},
emailVariables:{
type:Array
Copy link
Member

Choose a reason for hiding this comment

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

perfect

@salahlalami
Copy link
Member

Thank you @Sinharitik589

@salahlalami salahlalami merged commit 6f846ed into idurar:dev Sep 19, 2023
1 check passed
awesomedev82 pushed a commit to awesomedev82/idurar-erp-crm that referenced this pull request May 20, 2024
…ew-email-editor-page

Feature/idurar#548 new email editor page
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.

Frontend : create a new email editor template settings page
2 participants