salix/modules/client/front/recovery/index/index.js

19 lines
501 B
JavaScript
Raw Normal View History

2018-05-23 12:26:51 +00:00
import ngModule from '../../module';
2020-03-17 10:17:50 +00:00
import Section from 'salix/components/section';
2020-03-17 10:17:50 +00:00
class Controller extends Section {
setFinished(recovery) {
if (!recovery.finished) {
let params = {finished: Date.now()};
this.$http.patch(`Recoveries/${recovery.id}`, params).then(
2020-03-17 10:17:50 +00:00
() => this.$.model.refresh()
);
}
}
}
ngModule.vnComponent('vnClientRecoveryIndex', {
2018-05-23 12:26:51 +00:00
template: require('./index.html'),
controller: Controller
});