26 lines
671 B
JavaScript
26 lines
671 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
class Controller extends Section {
|
|
onSubmit() {
|
|
const sip = this.worker.sip;
|
|
const params = {
|
|
userFk: this.worker.userFk,
|
|
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.component('vnWorkerPbx', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
worker: '<'
|
|
}
|
|
});
|