From 0f5ebf42ec23e4e3da0e640498fc603b421152ec Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 4 Jun 2019 12:54:41 +0200 Subject: [PATCH] Tarea #1506 worker.pbx quitar campo password --- back/models/sip.json | 6 ++---- db/dump/fixtures.sql | 10 +++++----- e2e/helpers/selectors.js | 1 - e2e/paths/03-worker-module/01_pbx.spec.js | 2 -- modules/worker/front/pbx/index.html | 8 ++------ modules/worker/front/pbx/index.js | 3 +-- 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/back/models/sip.json b/back/models/sip.json index 0864408e3..7a7cb8605 100644 --- a/back/models/sip.json +++ b/back/models/sip.json @@ -16,10 +16,8 @@ } }, "extension": { - "type": "Number" - }, - "secret": { - "type": "String" + "type": "String", + "required": true } }, "relations": { diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 0a9309c1b..87b355af5 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1341,12 +1341,12 @@ INSERT INTO `vn`.`zoneIncluded` (`zoneFk`, `geoFk`, `isIncluded`) (5, 4, 1), (5, 5, 1); -INSERT INTO `pbx`.`sip`(`user_id`, `extension`, `secret`, `caller_id`) +INSERT INTO `pbx`.`sip`(`user_id`, `extension`) VALUES - (1, 1010, '123456', 'employee'), - (3, 1101, '123456', 'agency'), - (5, 1102, '123456', 'administrative'), - (9, 1201, '123456', 'developer'); + (1, 1010), + (3, 1101), + (5, 1102), + (9, 1201); INSERT INTO `postgresql`.`person`(`person_id`, `name`, `nickname`, `nif`, `firstname`, `id_trabajador`) SELECT w.id, w.lastName, u.nickname,CONCAT(RPAD(CONCAT(w.id,9),8,w.id),'A'),w.firstName,w.id diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index ed10cbb92..c76a3d519 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -591,7 +591,6 @@ export default { }, workerPbx: { extensionInput: 'vn-worker-pbx vn-input-number[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' }, workerTimeControl: { diff --git a/e2e/paths/03-worker-module/01_pbx.spec.js b/e2e/paths/03-worker-module/01_pbx.spec.js index 4a3bc2c7e..2032281e7 100644 --- a/e2e/paths/03-worker-module/01_pbx.spec.js +++ b/e2e/paths/03-worker-module/01_pbx.spec.js @@ -25,8 +25,6 @@ describe('Worker pbx path', () => { const result = await nightmare .clearInput(selectors.workerPbx.extensionInput) .write(selectors.workerPbx.extensionInput, 4444) - .clearInput(selectors.workerPbx.passwordInput) - .write(selectors.workerPbx.passwordInput, 666666) .waitToClick(selectors.workerPbx.saveButton) .waitForLastSnackbar(); diff --git a/modules/worker/front/pbx/index.html b/modules/worker/front/pbx/index.html index 931cf70fc..e8889704d 100644 --- a/modules/worker/front/pbx/index.html +++ b/modules/worker/front/pbx/index.html @@ -6,15 +6,11 @@ - - - + diff --git a/modules/worker/front/pbx/index.js b/modules/worker/front/pbx/index.js index 9e0cef8ec..46afe5d68 100644 --- a/modules/worker/front/pbx/index.js +++ b/modules/worker/front/pbx/index.js @@ -10,8 +10,7 @@ class Controller { const sip = this.worker.sip; const params = { userFk: this.worker.userFk, - extension: sip.extension, - secret: sip.secret + extension: sip.extension }; this.$scope.watcher.check(); this.$http.patch('/api/Sips', params).then(() => {