This commit is contained in:
parent
66ddd56dec
commit
33b1cca215
|
@ -1,10 +1,6 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
/**
|
||||
* Pendiente de fixtures dms, dmsType, ticketDms
|
||||
* CAU: 10728
|
||||
*/
|
||||
xdescribe('dms download()', () => {
|
||||
describe('dms download()', () => {
|
||||
let dmsId = 1;
|
||||
it('should return a response for an employee with text content-type', async() => {
|
||||
let workerFk = 107;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
CREATE
|
||||
ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `vn`.`clientDms` AS
|
||||
SELECT
|
||||
`g`.`Id_Cliente` AS `clientFk`,
|
||||
`g`.`gest_doc_id` AS `dmsFk`
|
||||
FROM
|
||||
`vn2008`.`clientes_gestdoc` `g`
|
|
@ -0,0 +1,19 @@
|
|||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `vn`.`dms` AS
|
||||
SELECT
|
||||
`g`.`id` AS `id`,
|
||||
`g`.`gesttip_id` AS `dmsTypeFk`,
|
||||
`g`.`file` AS `file`,
|
||||
`g`.`trabajador_id` AS `workerFk`,
|
||||
`g`.`warehouse_id` AS `warehouseFk`,
|
||||
`g`.`emp_id` AS `companyFk`,
|
||||
`g`.`orden` AS `hardCopyNumber`,
|
||||
`g`.`original` AS `hasFile`,
|
||||
`g`.`sref` AS `reference`,
|
||||
`g`.`brief` AS `description`,
|
||||
`g`.`odbc_date` AS `created`
|
||||
FROM
|
||||
`vn2008`.`gestdoc` `g`
|
|
@ -1426,5 +1426,40 @@ INSERT INTO `vn`.`workerTimeControl`(`userFk`,`timed`,`manual`)
|
|||
VALUES
|
||||
(106, CONCAT(CURDATE(), ' 07:00'), TRUE),
|
||||
(106, CONCAT(CURDATE(), ' 10:00'), TRUE),
|
||||
(106, CONCAT(CURDATE(), ' 10:20'), TRUE),
|
||||
(106, CONCAT(CURDATE(), ' 15:00'), TRUE);
|
||||
(106, CONCAT(CURDATE(), ' 10:10'), TRUE),
|
||||
(106, CONCAT(CURDATE(), ' 15:00'), TRUE);
|
||||
|
||||
INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`)
|
||||
VALUES
|
||||
(1, 'Facturas Recibidas', '\recibidas', NULL, NULL),
|
||||
(2, 'Doc oficial', '\oficial', NULL, NULL),
|
||||
(3, 'Laboral', '\laboral', NULL, NULL),
|
||||
(4, 'Albaranes recibidos', '\entradas', NULL, NULL),
|
||||
(5, 'Otros', '\otros', NULL, NULL),
|
||||
(6, 'Pruebas', '\pruebas', NULL, NULL),
|
||||
(7, 'IAE Clientes', '\IAE_Clientes', NULL, NULL),
|
||||
(8, 'Fiscal', '\fiscal', NULL, NULL),
|
||||
(9, 'Vehiculos', '\vehiculos', NULL, NULL),
|
||||
(10, 'Plantillas', '\plantillas', NULL, NULL),
|
||||
(11, 'Contratos', '\contratos', NULL, NULL),
|
||||
(12, 'ley de pagos', '\ley pagos', NULL, NULL),
|
||||
(13, 'Basura', '\basura', NULL, NULL),
|
||||
(14, 'Ticket', '\tickets', 1, NULL),
|
||||
(15, 'Presupuestos', '\Presupuestos', NULL, NULL),
|
||||
(16, 'Logistica', '\logistica', NULL, NULL),
|
||||
(17, 'cmr', '\cmr', NULL, NULL),
|
||||
(18, 'dua', '\dua', NULL, NULL),
|
||||
(19, 'inmovilizado', '\inmovilizado', NULL, NULL);
|
||||
|
||||
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());
|
||||
|
||||
INSERT INTO `vn`.`ticketDms`(`ticketFk`, `dmsFk`)
|
||||
VALUES
|
||||
(11, 1);
|
||||
|
||||
INSERT INTO `vn`.`clientDms`(`clientFk`, `dmsFk`)
|
||||
VALUES
|
||||
(101, 2);
|
Loading…
Reference in New Issue