25 lines
712 B
JavaScript
25 lines
712 B
JavaScript
import Ember from 'ember';
|
|
import BaseEditRoute from '../base-edit';
|
|
|
|
export default BaseEditRoute.extend({
|
|
afterModel(model) {
|
|
const me = this;
|
|
me._super(...arguments);
|
|
model.images = [{}];
|
|
this.set('breadcrumbs',
|
|
[{route: 'customer-application.list', params: 1, text: 'Customer Application'},
|
|
{text: 'Edit Customer Application[' + model.name + ']'}]);
|
|
},
|
|
|
|
actions: {
|
|
addImage() {
|
|
const me = this;
|
|
me.get('controller.model.images').pushObject({});
|
|
},
|
|
removeImage(image) {
|
|
const me = this;
|
|
me.get('controller.model.images').removeObject(image);
|
|
},
|
|
}
|
|
});
|