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.component('vnClientRecoveryIndex', { template: require('./index.html'), controller: Controller });