Campaign status show send settings Bug

This commit is contained in:
Carlos 2019-03-13 09:52:02 +01:00
parent 4b1b1a380d
commit 1a61067ff9
9 changed files with 119 additions and 26 deletions

View file

@ -443,11 +443,17 @@ export default class Status extends Component {
let sendSettings;
if (this.state.sendConfiguration) {
sendSettings = [];
const addOverridable = (id, label) => {
sendSettings.push(<AlignedRow key={id} label={label}>{entity[id + '_override'] === null ? this.state.sendConfiguration[id] : entity[id + '_override']}</AlignedRow>);
if(this.state.sendConfiguration[id + '_overridable'] == 1){
sendSettings.push(<AlignedRow key={id} label={label}>{entity[id + '_override']}</AlignedRow>);
}
else{
sendSettings.push(<AlignedRow key={id} label={label}>{this.state.sendConfiguration[id]}</AlignedRow>);
}
};
addOverridable('from_name', t('fromName'));
addOverridable('from_email', t('fromEmailAddress'));
addOverridable('reply_to', t('replytoEmailAddress'));