Re-submit vetoed contributions

This commit is contained in:
2019-09-10 11:47:07 +02:00
parent 494b5d9bdd
commit 05e3118a0c
11 changed files with 137 additions and 29 deletions
+12 -9
View File
@@ -1,6 +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 moment from 'moment';
export default Component.extend({
@@ -25,14 +26,17 @@ export default Component.extend({
this.set('defaultDate', moment().startOf('hour').toDate());
// Default attributes used by reset
this.set('attributes', {
contributorId: null,
kind: null,
date: this.defaultDate,
amount: null,
description: null,
url: null,
});
if (isEmpty(this.attributes)) {
this.set('attributes', {
contributorId: null,
kind: null,
date: this.defaultDate,
amount: null,
description: null,
url: null,
details: null
});
}
this.reset();
},
@@ -67,7 +71,6 @@ export default Component.extend({
window.alert('Something went wrong. Check the browser console for details.');
})
.finally(() => this.set('inProgress', false));
}
}
@@ -63,6 +63,17 @@
</p>
</label>
{{#if details}}
<label>
<p class="label">Details:</p>
<p>
<pre>
{{details}}
</pre>
</p>
</label>
{{/if}}
<p class="actions">
{{input type="submit"
disabled=inProgress