19 lines
503 B
JavaScript
19 lines
503 B
JavaScript
import ngModule from '../../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
class Controller extends Section {
|
|
setFinished(recovery) {
|
|
if (!recovery.finished) {
|
|
let params = {finished: Date.vnNow()};
|
|
this.$http.patch(`Recoveries/${recovery.id}`, params).then(
|
|
() => this.$.model.refresh()
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnClientRecoveryIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|