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