Add: Exclude members
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
139c7623ab
commit
7bffa6c5ae
|
@ -20,7 +20,8 @@ class FilterScope extends Filter
|
||||||
* @param array<int, int> $activityIds
|
* @param array<int, int> $activityIds
|
||||||
* @param array<int, int> $subactivityIds
|
* @param array<int, int> $subactivityIds
|
||||||
* @param array<int, int> $groupIds
|
* @param array<int, int> $groupIds
|
||||||
* @param array<int, int> $additional
|
* @param array<int, int> $include
|
||||||
|
* @param array<int, int> $exclude
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public bool $ausstand = false,
|
public bool $ausstand = false,
|
||||||
|
@ -29,7 +30,8 @@ class FilterScope extends Filter
|
||||||
public array $subactivityIds = [],
|
public array $subactivityIds = [],
|
||||||
public ?string $search = '',
|
public ?string $search = '',
|
||||||
public array $groupIds = [],
|
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) {
|
})->orWhere(function ($query) {
|
||||||
if (count($this->additional)) {
|
if (count($this->include)) {
|
||||||
$query->whereIn('id', $this->additional);
|
$query->whereIn('id', $this->include);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,14 +34,23 @@
|
||||||
size="sm"
|
size="sm"
|
||||||
></f-multipleselect>
|
></f-multipleselect>
|
||||||
<f-multipleselect
|
<f-multipleselect
|
||||||
id="additional"
|
id="include"
|
||||||
name="additional"
|
name="include"
|
||||||
:options="members.meta.members"
|
:options="members.meta.members"
|
||||||
v-model="model.filter.additional"
|
v-model="model.filter.include"
|
||||||
@update:modelValue="reload(1)"
|
@update:modelValue="reload(1)"
|
||||||
label="Zusätzliche Mitglieder"
|
label="Zusätzliche Mitglieder"
|
||||||
size="sm"
|
size="sm"
|
||||||
></f-multipleselect>
|
></f-multipleselect>
|
||||||
|
<f-multipleselect
|
||||||
|
id="exclude"
|
||||||
|
name="exclude"
|
||||||
|
:options="members.meta.members"
|
||||||
|
v-model="model.filter.exclude"
|
||||||
|
@update:modelValue="reload(1)"
|
||||||
|
label="Mitglieder ausschließen"
|
||||||
|
size="sm"
|
||||||
|
></f-multipleselect>
|
||||||
<f-multipleselect
|
<f-multipleselect
|
||||||
id="groupIds"
|
id="groupIds"
|
||||||
name="groupIds"
|
name="groupIds"
|
||||||
|
|
Loading…
Reference in New Issue