pull/24/head
unknown 2015-02-17 22:53:19 -06:00
parent 86646d90d3
commit ab8dfc8bb3
3 changed files with 5 additions and 3 deletions

View File

@ -191,6 +191,6 @@ func insertTargetIntoGroup(t Target, gid int64) error {
func GetTargets(gid int64) ([]Target, error) {
ts := []Target{}
err := db.Table("targets").Select("targets.id, targets.email").Joins("left join group_targets gt ON targets.id = gt.target_id").Where("gt.group_id=?", gid).Scan(&ts).Error
err := db.Table("targets").Select("targets.id, targets.email, targets.first_name, targets.last_name").Joins("left join group_targets gt ON targets.id = gt.target_id").Where("gt.group_id=?", gid).Scan(&ts).Error
return ts, err
}

View File

@ -541,6 +541,8 @@ var GroupModalCtrl = function($scope, $modalInstance, $upload) {
}).success(function(data, status, headers, config) {
angular.forEach(data, function(record, key) {
$scope.group.targets.push({
first_name : record.first_name,
last_name : record.last_name,
email: record.email
});
});

View File

@ -57,7 +57,7 @@
<li><a href="/campaigns/{{campaign.id}}/relaunch">Relaunch</a>
</li>
<li class="divider"></li>
<li><a ng-click="deleteCampaign(campaign)" ng-href="#">Delete</a>
<li><a ng-click="deleteCampaign(campaign)">Delete</a>
</li>
</ul>
</div>