From 443feef673077c49d6d918d1a6108167c9802c87 Mon Sep 17 00:00:00 2001 From: Bernat Date: Thu, 23 May 2019 09:30:29 +0200 Subject: [PATCH] #1456 fixtores for dms and model --- db/dump/fixtures.sql | 10 ++++-- gulpfile.js | 2 ++ modules/client/back/model-config.json | 3 ++ modules/client/back/models/client-dms.json | 38 ++++++++++++++++++++++ 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 modules/client/back/models/client-dms.json diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 5792ce84e3..d80266eb81 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1,6 +1,10 @@ ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1; ALTER TABLE `vn2008`.`Consignatarios` AUTO_INCREMENT = 1; +INSERT INTO `vn`.`ticketConfig` (`id`, `scopeDays`) + VALUES + ('1', '6'); + INSERT INTO `account`.`mailConfig` (`id`, `domain`) VALUES ('1', 'verdnatura.es'); @@ -1435,7 +1439,7 @@ INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`) (2, 'Doc oficial', '\oficial', NULL, NULL), (3, 'Laboral', '\laboral', NULL, NULL), (4, 'Albaranes recibidos', '\entradas', NULL, NULL), - (5, 'Otros', '\otros', NULL, NULL), + (5, 'Otros', '\otros', 1, NULL), (6, 'Pruebas', '\pruebas', NULL, NULL), (7, 'IAE Clientes', '\IAE_Clientes', NULL, NULL), (8, 'Fiscal', '\fiscal', NULL, NULL), @@ -1453,8 +1457,8 @@ INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`) INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `workerFk`, `warehouseFk`, `companyFk`, `hardCopyNumber`, `hasFile`, `reference`, `description`, `created`) VALUES - (1, 14, 'filename.pdf', 5, 1, 442, NULL, 1, 'Ticket:11', 'Ticket:11 dms for the ticket', CURDATE()), - (2, 5, 'filename2.pdf', 5, 1, 442, NULL, 1, 'Client:101', 'Client:101 dms for the client', CURDATE()); + (1, 14, '1.pdf', 5, 1, 442, NULL, FALSE, 'Ticket:11', 'Ticket:11 dms for the ticket', CURDATE()), + (2, 5, '2.pdf', 5, 1, 442, 1, TRUE, 'Client:101', 'Client:101 dms for the client', CURDATE()); INSERT INTO `vn`.`ticketDms`(`ticketFk`, `dmsFk`) VALUES diff --git a/gulpfile.js b/gulpfile.js index 8b13a8a8be..6f1dd55216 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -149,6 +149,8 @@ function e2eOnly() { if (argv.show || argv.s) process.env.E2E_SHOW = true; + process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true; + const specFiles = [ `${__dirname}/e2e/paths/**/*[sS]pec.js`, diff --git a/modules/client/back/model-config.json b/modules/client/back/model-config.json index 3a587107a4..3aa709eb74 100644 --- a/modules/client/back/model-config.json +++ b/modules/client/back/model-config.json @@ -91,5 +91,8 @@ }, "TpvTransaction": { "dataSource": "vn" + }, + "ClientDms": { + "dataSource": "vn" } } diff --git a/modules/client/back/models/client-dms.json b/modules/client/back/models/client-dms.json new file mode 100644 index 0000000000..31fc830060 --- /dev/null +++ b/modules/client/back/models/client-dms.json @@ -0,0 +1,38 @@ +{ + "name": "ClientDms", + "base": "Loggable", + "log": { + "model": "ClientLog", + "relation": "ticket", + "showField": "dmsFk" + }, + "options": { + "mysql": { + "table": "clientDms" + } + }, + "properties": { + "clientFk": { + "type": "Number", + "id": true, + "required": true + }, + "dmsFk": { + "type": "Number", + "id": true, + "required": true + } + }, + "relations": { + "client": { + "type": "belongsTo", + "model": "Client", + "foreignKey": "clientFk" + }, + "dms": { + "type": "belongsTo", + "model": "Dms", + "foreignKey": "dmsFk" + } + } +} \ No newline at end of file