34 lines
853 B
JavaScript
34 lines
853 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')(Date.vnNew(), '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: '<'
|
|
}
|
|
});
|