34 lines
851 B
JavaScript
34 lines
851 B
JavaScript
import ngModule from '../../../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
class Controller extends Section {
|
|
constructor($element, $) {
|
|
super($element, $);
|
|
this.insurance = {
|
|
created: this.$filter('date')(new Date(), 'yyyy-MM-dd HH:mm:ss')
|
|
};
|
|
}
|
|
|
|
onSubmit() {
|
|
let params = {classificationId: this.$params.classificationId};
|
|
let state = 'client.card.creditInsurance.insurance.index';
|
|
|
|
this.$.watcher.submitGo(state, params).then(() => {
|
|
this.card.reload();
|
|
});
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$element', '$scope'];
|
|
|
|
ngModule.vnComponent('vnClientCreditInsuranceInsuranceCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
require: {
|
|
card: '^vnClientCard'
|
|
},
|
|
bindings: {
|
|
client: '<'
|
|
}
|
|
});
|