Secret removed from worker/pbx
gitea/salix/master This commit looks good
Details
gitea/salix/master This commit looks good
Details
This commit is contained in:
parent
9a18d0bd8c
commit
da01d52756
|
@ -4,8 +4,4 @@ module.exports = Self => {
|
||||||
Self.validatesUniquenessOf('extension', {
|
Self.validatesUniquenessOf('extension', {
|
||||||
message: `The extension must be unique`
|
message: `The extension must be unique`
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.validatesPresenceOf('secret', {
|
|
||||||
message: `The secret can't be blank`
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
},
|
},
|
||||||
"extension": {
|
"extension": {
|
||||||
"type": "Number"
|
"type": "Number"
|
||||||
},
|
|
||||||
"secret": {
|
|
||||||
"type": "String"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
|
@ -552,8 +552,7 @@ export default {
|
||||||
confirmButton: 'vn-order-line > vn-confirm button[response="ACCEPT"]',
|
confirmButton: 'vn-order-line > vn-confirm button[response="ACCEPT"]',
|
||||||
},
|
},
|
||||||
workerPbx: {
|
workerPbx: {
|
||||||
extensionInput: 'vn-worker-pbx vn-input-number[model="$ctrl.worker.sip.extension"] input',
|
extensionInput: 'vn-worker-pbx vn-textfield[model="$ctrl.worker.sip.extension"] input',
|
||||||
passwordInput: 'vn-worker-pbx vn-textfield[model="$ctrl.worker.sip.secret"] input',
|
|
||||||
saveButton: 'vn-worker-pbx vn-submit[label="Save"] input'
|
saveButton: 'vn-worker-pbx vn-submit[label="Save"] input'
|
||||||
},
|
},
|
||||||
routeIndex: {
|
routeIndex: {
|
||||||
|
|
|
@ -25,11 +25,9 @@ describe('Worker pbx path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.clearInput(selectors.workerPbx.extensionInput)
|
.clearInput(selectors.workerPbx.extensionInput)
|
||||||
.write(selectors.workerPbx.extensionInput, 4444)
|
.write(selectors.workerPbx.extensionInput, 4444)
|
||||||
.clearInput(selectors.workerPbx.passwordInput)
|
|
||||||
.write(selectors.workerPbx.passwordInput, 666666)
|
|
||||||
.waitToClick(selectors.workerPbx.saveButton)
|
.waitToClick(selectors.workerPbx.saveButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved! User must access web');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"PHONE_INVALID_FORMAT": "El formato del teléfono no es correcto",
|
"Phone format is invalid": "El formato del teléfono no es correcto",
|
||||||
"You are not allowed to change the credit": "No tienes privilegios para modificar el crédito",
|
"You are not allowed to change the credit": "No tienes privilegios para modificar el crédito",
|
||||||
"Unable to mark the equivalence surcharge": "No se puede marcar el recargo de equivalencia",
|
"Unable to mark the equivalence surcharge": "No se puede marcar el recargo de equivalencia",
|
||||||
"The default consignee can not be unchecked": "No se puede desmarcar el consignatario predeterminado",
|
"The default consignee can not be unchecked": "No se puede desmarcar el consignatario predeterminado",
|
||||||
|
@ -75,13 +75,13 @@
|
||||||
"You cannot remove this department": "No puedes eliminar este departamento",
|
"You cannot remove this department": "No puedes eliminar este departamento",
|
||||||
"The extension must be unique": "La extensión debe ser unica",
|
"The extension must be unique": "La extensión debe ser unica",
|
||||||
"The secret can't be blank": "La contraseña no puede estar en blanco",
|
"The secret can't be blank": "La contraseña no puede estar en blanco",
|
||||||
"EXTENSION_INVALID_FORMAT": "La extensión es invalida",
|
|
||||||
"We weren't able to send this SMS": "No hemos podido enviar el SMS",
|
"We weren't able to send this SMS": "No hemos podido enviar el SMS",
|
||||||
"This client can't be invoiced": "Este cliente no puede ser facturado",
|
"This client can't be invoiced": "Este cliente no puede ser facturado",
|
||||||
"This ticket can't be invoiced": "Este ticket no puede ser facturado",
|
"This ticket can't be invoiced": "Este ticket no puede ser facturado",
|
||||||
"That item is not available on that day": "El item no esta disponible para esa fecha",
|
"That item is not available on that day": "El item no esta disponible para esa fecha",
|
||||||
"That item doesn't exists": "That item doesn't exists",
|
"That item doesn't exists": "El artículo no existe",
|
||||||
"You cannot add or modify services to an invoiced ticket": "No puedes añadir o modificar servicios a un ticket facturado",
|
"You cannot add or modify services to an invoiced ticket": "No puedes añadir o modificar servicios a un ticket facturado",
|
||||||
"This ticket can not be modified": "Este ticket no puede ser modificado",
|
"This ticket can not be modified": "Este ticket no puede ser modificado",
|
||||||
"NOT_ZONE_WITH_THIS_PARAMETERS": "Para este día no hay ninguna zona configurada"
|
"NOT_ZONE_WITH_THIS_PARAMETERS": "Para este día no hay ninguna zona configurada",
|
||||||
|
"Extension format is invalid": "El formato de la extensión es inválido"
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@ module.exports = Self => {
|
||||||
Self.download = async function(id) {
|
Self.download = async function(id) {
|
||||||
let file;
|
let file;
|
||||||
let env = process.env.NODE_ENV;
|
let env = process.env.NODE_ENV;
|
||||||
let [invoice] = await Self.rawSql(`SELECT hedera.invoiceGetPath(?) path`, [id]);
|
let [invoice] = await Self.rawSql(`SELECT invoiceOut_getPath(?) path`, [id]);
|
||||||
|
|
||||||
if (env && env != 'development') {
|
if (env && env != 'development') {
|
||||||
file = {
|
file = {
|
||||||
|
|
|
@ -15,4 +15,5 @@ Fiscal Identifier: NIF
|
||||||
User name: Usuario
|
User name: Usuario
|
||||||
Departments: Departamentos
|
Departments: Departamentos
|
||||||
Calendar: Calendario
|
Calendar: Calendario
|
||||||
Search workers by id, firstName, lastName or user name: Buscar trabajadores por el identificador, nombre, apellidos o nombre de usuario
|
Search workers by id, firstName, lastName or user name: Buscar trabajadores por el identificador, nombre, apellidos o nombre de usuario
|
||||||
|
Data saved! User must access web: ¡Datos guardados! El usuario deberá acceder con su contraseña a la web para que los cambios surtan efecto.
|
|
@ -6,14 +6,9 @@
|
||||||
<vn-card pad-large>
|
<vn-card pad-large>
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-input-number vn-one min="1" step="1"
|
<vn-textfield vn-one
|
||||||
label="Extension"
|
label="Extension"
|
||||||
model="$ctrl.worker.sip.extension">
|
model="$ctrl.worker.sip.extension">
|
||||||
</vn-input-number>
|
|
||||||
<vn-textfield
|
|
||||||
vn-one
|
|
||||||
label="Password"
|
|
||||||
model="$ctrl.worker.sip.secret">
|
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
|
|
|
@ -1,27 +1,28 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
constructor($scope, $http) {
|
constructor($scope, $http, vnApp, $translate) {
|
||||||
this.$scope = $scope;
|
this.$scope = $scope;
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
|
this.vnApp = vnApp;
|
||||||
|
this._ = $translate;
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
const sip = this.worker.sip;
|
const sip = this.worker.sip;
|
||||||
const params = {
|
const params = {
|
||||||
userFk: this.worker.userFk,
|
userFk: this.worker.userFk,
|
||||||
extension: sip.extension,
|
extension: sip.extension
|
||||||
secret: sip.secret
|
|
||||||
};
|
};
|
||||||
this.$scope.watcher.check();
|
this.$scope.watcher.check();
|
||||||
this.$http.patch('/api/Sips', params).then(() => {
|
this.$http.patch('/api/Sips', params).then(() => {
|
||||||
this.$scope.watcher.updateOriginalData();
|
this.$scope.watcher.updateOriginalData();
|
||||||
this.$scope.watcher.notifySaved();
|
this.vnApp.showSuccess(this._.instant('Data saved! User must access web'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$scope', '$http'];
|
Controller.$inject = ['$scope', '$http', 'vnApp', '$translate'];
|
||||||
|
|
||||||
ngModule.component('vnWorkerPbx', {
|
ngModule.component('vnWorkerPbx', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
|
|
Loading…
Reference in New Issue