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

26 lines
671 B
JavaScript
Raw Normal View History

2019-03-08 08:41:53 +00:00
import ngModule from '../module';
2020-03-18 11:55:22 +00:00
import Section from 'salix/components/section';
2019-03-08 08:41:53 +00:00
2020-03-18 11:55:22 +00:00
class Controller extends Section {
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('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: '<'
}
});