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';
|
2018-03-01 10:55:28 +00:00
|
|
|
|
2020-03-17 10:17:50 +00:00
|
|
|
class Controller extends Section {
|
2018-03-09 13:54:25 +00:00
|
|
|
setFinished(recovery) {
|
|
|
|
if (!recovery.finished) {
|
2023-01-16 14:18:24 +00:00
|
|
|
let params = {finished: Date.vnNow()};
|
2019-10-24 22:53:53 +00:00
|
|
|
this.$http.patch(`Recoveries/${recovery.id}`, params).then(
|
2020-03-17 10:17:50 +00:00
|
|
|
() => this.$.model.refresh()
|
2018-03-09 13:54:25 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnClientRecoveryIndex', {
|
2018-05-23 12:26:51 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
2018-03-01 10:55:28 +00:00
|
|
|
});
|