@@ -9,7 +9,15 @@ export default Component.extend({
|
||||
kredits: service(),
|
||||
|
||||
attributes: null,
|
||||
contributors: alias('kredits.contributorsSorted'),
|
||||
|
||||
contributors: computed('kredits.contributorsSorted.[]', function() {
|
||||
return this.kredits.contributorsSorted.map(c => {
|
||||
return {
|
||||
id: c.id.toString(),
|
||||
name: c.name
|
||||
}
|
||||
})
|
||||
}),
|
||||
|
||||
isValidContributor: notEmpty('contributorId'),
|
||||
isValidKind: notEmpty('kind'),
|
||||
@@ -57,6 +65,8 @@ export default Component.extend({
|
||||
|
||||
const attributes = this.getProperties(Object.keys(this.attributes));
|
||||
|
||||
attributes.contributorId = parseInt(this.contributorId);
|
||||
|
||||
let dateInput = (attributes.date instanceof Array) ?
|
||||
attributes.date[0] : attributes.date;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user