Skip to content

Commit

Permalink
#1470 Fix the merge into case button, in the alert similar cases panel
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Sep 28, 2020
1 parent a076dcf commit 7b56046
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,20 @@
});
};

self.merge = function(caseId) {
this.onMergeIntoCase({
caseId: caseId
});
};


},
controllerAs: '$cmp',
templateUrl: 'views/components/alert/similar-case-list.component.html',
bindings: {
alertId: '<',
onListLoad: '&'
onListLoad: '&',
onMergeIntoCase: '&'
}
});
})();
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</div>

<div class="case-similarity-merge text-center">
<button class="btn btn-sm btn-primary" ng-click="$cmp.mergeIntoCase(item.case._id)">Merge in this case</button>
<button class="btn btn-sm btn-primary" ng-click="$cmp.merge(item.case._id)">Merge in this case</button>
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion frontend/app/views/partials/alert/event.dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ <h4 class="vpad10 text-primary">
</span>
</uib-tab-heading>
<div>
<alert-similar-case-list alert-id="dialog.event._id" on-list-load="dialog.updateSimilarCasesCount(count)"></alert-similar-case-list>
<alert-similar-case-list alert-id="dialog.event._id"
on-list-load="dialog.updateSimilarCasesCount(count)"
on-merge-into-case="dialog.mergeIntoCase(caseId)"></alert-similar-case-list>
</div>
</uib-tab>
</uib-tabset>
Expand Down

0 comments on commit 7b56046

Please sign in to comment.