salix/modules/worker/front/pbx/index.js

26 lines
674 B
JavaScript
Raw Normal View History

2019-03-08 08:41:53 +00:00
import ngModule from '../module';
import Component from 'core/lib/component';
2019-03-08 08:41:53 +00:00
class Controller extends Component {
onSubmit() {
const sip = this.worker.sip;
const params = {
userFk: this.worker.userFk,
2019-06-17 09:14:45 +00:00
extension: sip.extension
};
this.$.watcher.check();
this.$http.patch('/api/Sips', params).then(() => {
this.$.watcher.updateOriginalData();
this.vnApp.showSuccess(this.$t('Data saved! User must access web'));
});
}
}
2019-03-08 08:41:53 +00:00
ngModule.component('vnWorkerPbx', {
template: require('./index.html'),
controller: Controller,
2019-03-08 08:41:53 +00:00
bindings: {
worker: '<'
}
});