Hide non default segments on some pages

- added getPublic() method on Segment model
- filter out dynamic lists from add/move/remove segment in subscribers
This commit is contained in:
Jonathan Labreuille
2015-11-26 11:32:10 +01:00
parent a5d96f1534
commit 20e2e03982
3 changed files with 18 additions and 5 deletions

View File

@@ -103,7 +103,9 @@ const bulk_actions = [
id: 'move_to_segment',
endpoint: 'segments',
filter: function(segment) {
return !!(!segment.deleted_at);
return !!(
!segment.deleted_at && segment.type === 'default'
);
}
};
@@ -132,7 +134,9 @@ const bulk_actions = [
id: 'add_to_segment',
endpoint: 'segments',
filter: function(segment) {
return !!(!segment.deleted_at);
return !!(
!segment.deleted_at && segment.type === 'default'
);
}
};
@@ -159,7 +163,12 @@ const bulk_actions = [
onSelect: function() {
let field = {
id: 'remove_from_segment',
endpoint: 'segments'
endpoint: 'segments',
filter: function(segment) {
return !!(
segment.type === 'default'
);
}
};
return (