diff --git a/client/package-lock.json b/client/package-lock.json index 6b9ea835..7b6681a0 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -4470,7 +4470,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4488,11 +4489,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4505,15 +4508,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4616,7 +4622,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4626,6 +4633,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4638,6 +4646,7 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4743,7 +4752,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4858,6 +4868,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4875,6 +4886,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } diff --git a/client/src/campaigns/CUD.js b/client/src/campaigns/CUD.js index f03561a9..792a17d2 100644 --- a/client/src/campaigns/CUD.js +++ b/client/src/campaigns/CUD.js @@ -229,6 +229,7 @@ export default class CUD extends Component { [lstPrefix + 'list']: null, [lstPrefix + 'segment']: null, [lstPrefix + 'useSegmentation']: false, + [lstPrefix + 'work_list_current_namespace']: false, lists: [lstUid], send_configuration: null, @@ -236,6 +237,8 @@ export default class CUD extends Component { click_tracking_disabled: false, open_tracking_disabled: false, + work_send_config_current_namespace: false, + work_template_current_namespace: false, unsubscribe_url: '', @@ -521,12 +524,18 @@ export default class CUD extends Component { const lstsEditEntries = []; const lsts = this.getFormValue('lists') || []; let lstOrderIdx = 0; + + const currentNamespace = this.getFormValue('namespace'); + const useNamespaceSendConfig = this.getFormValue('work_send_config_current_namespace'); + const useNamespaceTemplate = this.getFormValue('work_template_current_namespace'); + for (const lstUid of lsts) { const prefix = 'lists_' + lstUid + '_'; const lstOrderIdxClosure = lstOrderIdx; const selectedList = this.getFormValue(prefix + 'list'); - + const useNamespaceLists = this.getFormValue(prefix + 'work_list_current_namespace'); + lstsEditEntries.push(
@@ -562,8 +571,13 @@ export default class CUD extends Component { }
- - + + {useNamespaceLists && + + } + {!useNamespaceLists && + + } {(campaignTypeKey === CampaignType.REGULAR || campaignTypeKey === CampaignType.RSS) &&
@@ -608,13 +622,21 @@ export default class CUD extends Component { sendSettings = []; const addOverridable = (id, label) => { - sendSettings.push(); - - if (this.getFormValue(id + '_overriden')) { - sendSettings.push(); - } else { + if(this.state.sendConfiguration[id + '_overridable'] == 1){ + if (this.getFormValue(id + '_overriden')) { + sendSettings.push(); + } else { + sendSettings.push( + + {this.state.sendConfiguration[id]} + + ); + } + sendSettings.push(); + } + else{ sendSettings.push( - + {this.state.sendConfiguration[id]} ); @@ -659,7 +681,13 @@ export default class CUD extends Component { // The "key" property here and in the TableSelect below is to tell React that these tables are different and should be rendered by different instances. Otherwise, React will use // only one instance, which fails because Table does not handle updates in "columns" property - templateEdit = ; + if(useNamespaceTemplate){ + templateEdit = ; + } + else{ + templateEdit = ; + } + } else if (!isEdit && sourceTypeKey === CampaignSource.CUSTOM_FROM_CAMPAIGN) { const campaignsColumns = [ @@ -731,12 +759,20 @@ export default class CUD extends Component { {lstsEdit} -
+ {t('sendSettings')} - + + {useNamespaceSendConfig && + + } + {!useNamespaceSendConfig && + + } + + {sendSettings} - +
@@ -744,10 +780,12 @@ export default class CUD extends Component { - {sourceEdit &&
} + {t('template')} {sourceEdit} + + {templateEdit} diff --git a/client/src/campaigns/Status.js b/client/src/campaigns/Status.js index afa700ea..4af80eca 100644 --- a/client/src/campaigns/Status.js +++ b/client/src/campaigns/Status.js @@ -225,6 +225,18 @@ class SendControls extends Component { await this.refreshEntity(); } + async confirmStart() { + const t = this.props.t; + this.actionDialog( + t('confirmLaunch'), + t('doYouWantToLaunchTheCampaign?All'), + async () => { + await this.startAsync(); + await this.refreshEntity(); + } + ); + } + async resetAsync() { const t = this.props.t; this.actionDialog( @@ -306,7 +318,7 @@ class SendControls extends Component { {this.getFormValue('sendLater') ?