1
0
Fork 0
Dieser Commit ist enthalten in:
Angus McLeod 2020-03-24 21:14:42 +11:00
Ursprung fe7283ab3c
Commit b81685e1d1
4 geänderte Dateien mit 5 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -51,8 +51,6 @@ export default Ember.Component.extend({
const types = [this.selectorType, this.inputType];
console.log('running', types, option)
return option.split(',').filter(o => types.indexOf(o) !== -1).length
},

Datei anzeigen

@ -7,7 +7,7 @@ import {
default as discourseComputed,
on
} from 'discourse-common/utils/decorators';
import { computed } from "@ember/object";
import { computed, set } from "@ember/object";
import { alias } from "@ember/object/computed";
export default Ember.Component.extend({
@ -48,7 +48,7 @@ export default Ember.Component.extend({
const pairs = this.get('input.pairs');
const pairCount = pairs.length + 1;
pairs.forEach(p => (p.set('pairCount', pairCount)));
pairs.forEach(p => (set(p, 'pairCount', pairCount)));
pairs.pushObject(
newPair(Object.assign(
@ -65,7 +65,7 @@ export default Ember.Component.extend({
removePair(pair) {
const pairs = this.get('input.pairs');
const pairCount = pairs.length - 1;
pairs.forEach(p => (p.set('pairCount', pairCount)));
pairs.forEach(p => (set(p, 'pairCount', pairCount)));
pairs.removeObject(pair);
}
}

Datei anzeigen

@ -279,7 +279,7 @@
{{/if}}
{{#if addToGroup}}
<div class="setting">
<div class="setting full">
<div class="setting-label">
<h3>{{i18n "admin.wizard.action.add_to_group.group"}}</h3>
</div>

Datei anzeigen

@ -339,7 +339,6 @@ class CustomWizard::Builder
end
def get_user_field(value, opts = {})
puts "GETTING USER FIELD: #{value.inspect}"
if value.include?('user_field_')
UserCustomField.where(user_id: @wizard.user.id, name: value).pluck(:value).first
elsif UserProfile.column_names.include? value
@ -617,9 +616,7 @@ class CustomWizard::Builder
def add_to_group(user, action, data)
groups = get_output(action['inputs'], multiple: true, data: data)
groups = groups.reduce([]) do |result, g|
g = g.first if g.is_a?(Array)
groups = groups.flatten.reduce([]) do |result, g|
begin
result.push(Integer(g))
rescue ArgumentError