forked from idurar/idurar-erp-crm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature:idurar#548 craeted new email editor page :backend init
- Loading branch information
ritik kumar
committed
Sep 19, 2023
1 parent
ab735db
commit 8b0479e
Showing
4 changed files
with
88 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const createCRUDController = require('@/controllers/middlewaresControllers/createCRUDController'); | ||
const crudController = createCRUDController('Email'); | ||
|
||
const emailMethods = { | ||
create:crudController.create, | ||
read: crudController.read, | ||
update: crudController.update, | ||
list: crudController.list, | ||
listAll: crudController.listAll, | ||
filter: crudController.filter, | ||
search: crudController.search, | ||
}; | ||
|
||
module.exports = emailMethods; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const mongoose = require('mongoose'); | ||
mongoose.Promise = global.Promise; | ||
|
||
const emailSchema = new mongoose.Schema({ | ||
emailKey: { | ||
type: String, | ||
unique: true, | ||
lowercase: true, | ||
required: true, | ||
}, | ||
emailName: { | ||
type: String, | ||
unique:true, | ||
required:true, | ||
}, | ||
emailVariables:{ | ||
type:Array | ||
}, | ||
emailBody: { | ||
type: String, | ||
required: true, | ||
}, | ||
emailSubject: { | ||
type: mongoose.Schema.Types.Mixed, | ||
required: true, | ||
}, | ||
}); | ||
|
||
module.exports = mongoose.model('Email', emailSchema); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,51 @@ | ||
[ | ||
{ | ||
"settingKey": "email_invoice_default", | ||
"settingValue": "<p>email_invoice_default</p>", | ||
"valueType": "string", | ||
"isCoreSetting": true | ||
"emailKey": "email_invoice_default", | ||
"emailName":"Invoice Email", | ||
"emailSubject":"Invoice From Idurar", | ||
"emailBody": "<p>email_invoice_default</p>", | ||
"emailVariables": ["name","time"] | ||
}, | ||
{ | ||
"settingKey": "email_quote_default", | ||
"settingValue": "<p>email_quote_default</p>", | ||
"valueType": "string", | ||
"isCoreSetting": true | ||
"emailKey": "email_quote_default", | ||
"emailName":"Quote Email", | ||
"emailSubject":"Quote From Idurar", | ||
"emailBody": "<p>email_quote_default</p>", | ||
"emailVariables": ["name","time"] | ||
}, | ||
{ | ||
"settingKey": "email_offer_default", | ||
"settingValue": "<p>email_offer_default</p>", | ||
"valueType": "string", | ||
"isCoreSetting": true | ||
"emailKey": "email_offer_default", | ||
"emailName":"Offer Email", | ||
"emailSubject":"Invoice From Idurar", | ||
"emailBody": "<p>email_offer_default</p>", | ||
"emailVariables": [] | ||
}, | ||
{ | ||
"settingKey": "email_payment_receipt_default", | ||
"settingValue": "<p>email_offer_default</p>", | ||
"valueType": "string", | ||
"isCoreSetting": true | ||
"emailKey": "email_payment_receipt_default", | ||
"emailName":"Payment Email", | ||
"emailSubject":"Payment From Idurar", | ||
"emailBody": "<p>email_payment_receipt_default</p>", | ||
"emailVariables": ["name","time"] | ||
}, | ||
{ | ||
"settingKey": "email_signup_email_confirm_default", | ||
"settingValue": "<p>email_signup_email_confirm</p>", | ||
"valueType": "string", | ||
"isCoreSetting": true | ||
"emailKey": "email_signup_email_confirm_default", | ||
"emailName":"Signup Confirmation Email", | ||
"emailSubject":"Signup Confirmation From Idurar", | ||
"emailBody": "<p>email_signup_email_confirm_default</p>", | ||
"emailVariables": ["name"] | ||
}, | ||
{ | ||
"settingKey": "email_reset_password_default", | ||
"settingValue": "<p>email_reset_password</p>", | ||
"valueType": "string", | ||
"isCoreSetting": true | ||
"emailKey": "email_reset_password_default", | ||
"emailName":"Password Reset Email", | ||
"emailSubject":"Password Reset From Idurar", | ||
"emailBody": "<p>email_reset_password_default</p>", | ||
"emailVariables": ["name"] | ||
}, | ||
{ | ||
"settingKey": "welcome_email_default", | ||
"settingValue": "<p>welcome_email</p>", | ||
"valueType": "string", | ||
"isCoreSetting": true | ||
"emailKey": "welcome_email_default", | ||
"emailName":"Welcome Email", | ||
"emailSubject":"Welcom From Idurar", | ||
"emailBody": "<p>welcome_email</p>", | ||
"emailVariables":["name"] | ||
} | ||
] |