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

26 lines
673 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'));
});
}
}
ngModule.vnComponent('vnWorkerPbx', {
2019-03-08 08:41:53 +00:00
template: require('./index.html'),
controller: Controller,
2019-03-08 08:41:53 +00:00
bindings: {
worker: '<'
}
});