Merge branch 'pull/722' into development
This commit is contained in:
commit
87b9399a5b
1 changed files with 10 additions and 15 deletions
|
@ -264,7 +264,7 @@ export default class CUD extends Component {
|
||||||
for (const lstUid of data.lists) {
|
for (const lstUid of data.lists) {
|
||||||
const prefix = 'lists_' + lstUid + '_';
|
const prefix = 'lists_' + lstUid + '_';
|
||||||
|
|
||||||
const useSegmentation = data[prefix + 'useSegmentation'] && (data.type === CampaignType.REGULAR || data.type === CampaignType.RSS);
|
const useSegmentation = data[prefix + 'useSegmentation'];
|
||||||
|
|
||||||
lsts.push({
|
lsts.push({
|
||||||
list: data[prefix + 'list'],
|
list: data[prefix + 'list'],
|
||||||
|
@ -427,12 +427,10 @@ export default class CUD extends Component {
|
||||||
state.setIn([prefix + 'list', 'error'], t('listMustBeSelected'));
|
state.setIn([prefix + 'list', 'error'], t('listMustBeSelected'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (campaignTypeKey === CampaignType.REGULAR || campaignTypeKey === CampaignType.RSS) {
|
|
||||||
if (state.getIn([prefix + 'useSegmentation', 'value']) && !state.getIn([prefix + 'segment', 'value'])) {
|
if (state.getIn([prefix + 'useSegmentation', 'value']) && !state.getIn([prefix + 'segment', 'value'])) {
|
||||||
state.setIn([prefix + 'segment', 'error'], t('segmentMustBeSelected'));
|
state.setIn([prefix + 'segment', 'error'], t('segmentMustBeSelected'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
validateNamespace(t, state);
|
validateNamespace(t, state);
|
||||||
}
|
}
|
||||||
|
@ -605,15 +603,12 @@ export default class CUD extends Component {
|
||||||
</div>
|
</div>
|
||||||
<div className={campaignsStyles.entryContent}>
|
<div className={campaignsStyles.entryContent}>
|
||||||
<TableSelect id={prefix + 'list'} label={t('list')} withHeader dropdown dataUrl='rest/lists-table' columns={listsColumns} selectionLabelIndex={1} />
|
<TableSelect id={prefix + 'list'} label={t('list')} withHeader dropdown dataUrl='rest/lists-table' columns={listsColumns} selectionLabelIndex={1} />
|
||||||
|
|
||||||
{(campaignTypeKey === CampaignType.REGULAR || campaignTypeKey === CampaignType.RSS) &&
|
|
||||||
<div>
|
<div>
|
||||||
<CheckBox id={prefix + 'useSegmentation'} label={t('segment')} text={t('useAParticularSegment')}/>
|
<CheckBox id={prefix + 'useSegmentation'} label={t('segment')} text={t('useAParticularSegment')}/>
|
||||||
{selectedList && this.getFormValue(prefix + 'useSegmentation') &&
|
{selectedList && this.getFormValue(prefix + 'useSegmentation') &&
|
||||||
<TableSelect id={prefix + 'segment'} withHeader dropdown dataUrl={`rest/segments-table/${selectedList}`} columns={segmentsColumns} selectionLabelIndex={1} />
|
<TableSelect id={prefix + 'segment'} withHeader dropdown dataUrl={`rest/segments-table/${selectedList}`} columns={segmentsColumns} selectionLabelIndex={1} />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue