Add "give kredits" button to contributor profiles #180

Merged
raucao merged 6 commits from feature/add_contribution_with_params into master 2019-12-13 16:33:20 +00:00
Showing only changes of commit 3f4cc39067 - Show all commits
+2 -11
View File
@@ -1,7 +1,7 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
import { and, notEmpty } from '@ember/object/computed';
import { isEmpty } from '@ember/utils';
import { assign } from '@ember/polyfills';
import moment from 'moment';
export default Component.extend({
1
@@ -34,16 +34,7 @@ export default Component.extend({
details: null
});
// Default attributes used by reset
if (isEmpty(this.attributes)) {
this.set('attributes', this.defaultAttr);
} else {
Object.keys(this.defaultAttr).forEach(a => {
if (typeof this.attributes[a] === 'undefined') {
this.attributes[a] = this.defaultAttr[a];
}
})
}
this.set('attributes', assign({}, this.defaultAttr, this.attributes));
this.reset();
},