19 lines
501 B
JavaScript
19 lines
501 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.now()};
|
|
this.$http.patch(`Recoveries/${recovery.id}`, params).then(
|
|
() => this.$.model.refresh()
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnClientRecoveryIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|