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

19 lines
503 B
JavaScript
Raw Permalink 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) {
2023-01-16 14:18:24 +00:00
let params = {finished: Date.vnNow()};
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
});