WiP updates
This commit is contained in:
parent
6706d93bc1
commit
4fce4b6f81
27 changed files with 763 additions and 85 deletions
63
client/src/send-configurations/helpers.js
Normal file
63
client/src/send-configurations/helpers.js
Normal file
|
@ -0,0 +1,63 @@
|
|||
'use strict';
|
||||
|
||||
import React from "react";
|
||||
|
||||
import {MailerType} from "../../../shared/send-configurations";
|
||||
|
||||
export const mailerTypesOrder = [
|
||||
MailerType.ZONE_MTA,
|
||||
MailerType.GENERIC_SMTP,
|
||||
MailerType.AWS_SES
|
||||
];
|
||||
|
||||
export function getMailerTypes(t) {
|
||||
const mailerTypes = {};
|
||||
|
||||
function clearBeforeSend(data) {
|
||||
}
|
||||
|
||||
mailerTypes[MailerType.GENERIC_SMTP] = {
|
||||
typeName: t('Generic SMTP'),
|
||||
getForm: owner => null,
|
||||
initData: () => ({
|
||||
}),
|
||||
afterLoad: data => {
|
||||
},
|
||||
beforeSave: data => {
|
||||
clearBeforeSend(data);
|
||||
},
|
||||
afterTypeChange: mutState => {
|
||||
// mutState.setIn(['type', 'value'], '');
|
||||
}
|
||||
};
|
||||
|
||||
mailerTypes[MailerType.ZONE_MTA] = {
|
||||
typeName: t('Zone MTA'),
|
||||
getForm: owner => null,
|
||||
initData: () => ({
|
||||
}),
|
||||
afterLoad: data => {
|
||||
},
|
||||
beforeSave: data => {
|
||||
clearBeforeSend(data);
|
||||
},
|
||||
afterTypeChange: mutState => {
|
||||
}
|
||||
};
|
||||
|
||||
mailerTypes[MailerType.AWS_SES] = {
|
||||
typeName: t('Amazon SES'),
|
||||
getForm: owner => null,
|
||||
initData: () => ({
|
||||
}),
|
||||
afterLoad: data => {
|
||||
},
|
||||
beforeSave: data => {
|
||||
clearBeforeSend(data);
|
||||
},
|
||||
afterTypeChange: mutState => {
|
||||
}
|
||||
};
|
||||
|
||||
return mailerTypes;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue