Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-23 01:40:29 +01:00
Update custom-wizard-group-selector.js.es6
Dieser Commit ist enthalten in:
Ursprung
9c43f89cd3
Commit
007ab7ac37
1 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen
|
@ -5,9 +5,8 @@ import { makeArray } from "discourse-common/lib/helpers";
|
||||||
export default ComboBox.extend({
|
export default ComboBox.extend({
|
||||||
content: computed("groups.[]", "field.content.[]", function() {
|
content: computed("groups.[]", "field.content.[]", function() {
|
||||||
const whitelist = makeArray(this.field.content);
|
const whitelist = makeArray(this.field.content);
|
||||||
const excludedGroupIds = [1]; // Array mit den IDs der ausgeschlossenen Gruppen
|
|
||||||
return this.groups.filter(group => {
|
return this.groups.filter(group => {
|
||||||
return (!whitelist.length || whitelist.indexOf(group.id) > -1) && excludedGroupIds.indexOf(group.id) === -1;
|
return !whitelist.length || whitelist.indexOf(group.id) > -1;
|
||||||
}).map(g => {
|
}).map(g => {
|
||||||
return {
|
return {
|
||||||
id: g.id,
|
id: g.id,
|
||||||
|
|
Laden …
In neuem Issue referenzieren