Update contributor profiles
* Adds a new page for updating profiles * Refactors the add-contributor component to allow for updating existing contributors * Adds input labels to the contributor form and improves placeholders * Adds event handlers for all contract contributor changes and uses them for updating the UI refs #122
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { alias } from '@ember/object/computed';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default Controller.extend({
|
||||
|
||||
kredits: service(),
|
||||
|
||||
contributors: alias('kredits.contributors'),
|
||||
|
||||
actions: {
|
||||
|
||||
save (contributor) {
|
||||
return this.kredits.addContributor(contributor)
|
||||
.then(contributor => {
|
||||
this.transitionToRoute('index');
|
||||
return contributor;
|
||||
});
|
||||
return this.kredits
|
||||
.addContributor(contributor)
|
||||
.then(() => this.transitionToRoute('index'))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user