Tarea #1197 worker.centralita

This commit is contained in:
Carlos Jimenez Ruiz 2019-03-08 09:41:53 +01:00
parent 7f0d3279d1
commit aceecd9c7a
6 changed files with 53 additions and 3 deletions

View File

@ -22,7 +22,9 @@ class Controller {
},
{
relation: 'sip',
scope: {fields: ['extension']}
scope: {
fields: ['extension', 'secret']
}
}, {
relation: 'department',
scope: {

View File

@ -7,3 +7,4 @@ import './descriptor';
import './descriptor-popover';
import './search-panel';
import './basic-data';
import './pbx';

View File

@ -7,4 +7,5 @@ Department: Departamento
User id: Id de usuario
Role: Rol
Extension: Extensión
Go to client: Ir al cliente
Go to client: Ir al cliente
Private Branch Exchange: Centralita

View File

@ -0,0 +1,28 @@
<mg-ajax path="/api/Sips/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.worker.sip"
form="form"
save="patch">
</vn-watcher>
<form name="form" ng-submit="watcher.submit()" compact>
<vn-card pad-large>
<vn-vertical>
<vn-horizontal>
<vn-textfield
vn-one
label="Extension"
model="$ctrl.worker.sip.extension">
</vn-textfield>
<vn-textfield
vn-one
label="Password"
model="$ctrl.worker.sip.secret">
</vn-textfield>
</vn-horizontal>
</vn-vertical>
</vn-card>
<vn-button-bar>
<vn-submit label="Save"></vn-submit>
</vn-button-bar>
</form>

View File

@ -0,0 +1,8 @@
import ngModule from '../module';
ngModule.component('vnWorkerPbx', {
template: require('./index.html'),
bindings: {
worker: '<'
}
});

View File

@ -4,7 +4,8 @@
"icon" : "icon-worker",
"validations" : true,
"menu": [
{"state": "worker.card.basicData", "icon": "settings"}
{"state": "worker.card.basicData", "icon": "settings"},
{"state": "worker.card.pbx", "icon": ""}
],
"routes": [
{
@ -41,6 +42,15 @@
"worker": "$ctrl.worker"
},
"acl": ["developer"]
}, {
"url": "/pbx",
"state": "worker.card.pbx",
"component": "vn-worker-pbx",
"description": "Private Branch Exchange",
"params": {
"worker": "$ctrl.worker"
},
"acl": ["hr"]
}
]
}