diff --git a/app/Member/FilterScope.php b/app/Member/FilterScope.php index aeb0484d..c5a2d219 100644 --- a/app/Member/FilterScope.php +++ b/app/Member/FilterScope.php @@ -20,7 +20,8 @@ class FilterScope extends Filter * @param array $activityIds * @param array $subactivityIds * @param array $groupIds - * @param array $additional + * @param array $include + * @param array $exclude */ public function __construct( public bool $ausstand = false, @@ -29,7 +30,8 @@ class FilterScope extends Filter public array $subactivityIds = [], public ?string $search = '', public array $groupIds = [], - public array $additional = [], + public array $include = [], + public array $exclude = [], ) { } @@ -73,9 +75,13 @@ class FilterScope extends Filter } }); } + + if (count($this->exclude)) { + $query->whereNotIn('id', $this->exclude); + } })->orWhere(function ($query) { - if (count($this->additional)) { - $query->whereIn('id', $this->additional); + if (count($this->include)) { + $query->whereIn('id', $this->include); } }); }); diff --git a/resources/js/views/maildispatcher/MaildispatcherForm.vue b/resources/js/views/maildispatcher/MaildispatcherForm.vue index 90164bbf..2ea4ef76 100644 --- a/resources/js/views/maildispatcher/MaildispatcherForm.vue +++ b/resources/js/views/maildispatcher/MaildispatcherForm.vue @@ -34,14 +34,23 @@ size="sm" > +