2381-mariaDB #374

Merged
joan merged 10 commits from 2381-mariaDB into dev 2020-09-28 06:25:32 +00:00
8 changed files with 128 additions and 149 deletions
Showing only changes of commit 0438171a47 - Show all commits

View File

@ -79,12 +79,6 @@
}, },
"WorkerTimeControlMail": { "WorkerTimeControlMail": {
"dataSource": "vn" "dataSource": "vn"
},
"Mail": {
"dataSource": "vn"
},
"MailForward": {
"dataSource": "vn"
} }
} }

View File

@ -1,26 +0,0 @@
{
"name": "MailForward",
"base": "VnModel",
"options": {
"mysql": {
"table": "account.mailForward"
}
},
"properties": {
"account": {
"id": true,
"type": "Number"
},
"forwardTo": {
"type": "String"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}

File diff suppressed because one or more lines are too long

View File

@ -774,10 +774,16 @@ INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `d
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 82, 2, NULL, 0), (12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 82, 2, NULL, 0),
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 83, 2, NULL, 0), (13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 83, 2, NULL, 0),
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 84, 2, NULL, 0), (14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 84, 2, NULL, 0),
(15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 88, 2, NULL, 0),
(16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 88, 2, NULL, 0),
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 88, 2, NULL, 0); (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 88, 2, NULL, 0);
INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`)
VALUES
(1, 1, 0, 0, 2.5, 2, CURDATE(), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 0, 1, CURDATE()),
(3, 3, 10, 10, 10, 10, CURDATE(), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 0, 1, CURDATE()),
(4, 5, 8.5, 10, 7.5, 6, CURDATE(), DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 1, 2, CURDATE());
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`) INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
VALUES VALUES
(1, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 18), (1, 1, 1, 71, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1, 1, 18),
@ -1069,105 +1075,107 @@ INSERT INTO `vn`.`itemBotanical`(`itemFk`, `botanical`, `genusFk`, `specieFk`)
INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`) INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
VALUES VALUES
(1 , 1, 56, 'Ranged weapon', 1), (1, 1, 56, 'Ranged weapon', 1),
(2 , 1, 58, 'longbow', 2), (2, 1, 58, 'longbow', 2),
(3 , 1, 27, '2m', 3), (3, 1, 27, '2m', 3),
(4 , 1, 36, 'Stark Industries', 4), (4, 1, 36, 'Stark Industries', 4),
(5 , 1, 1, 'Brown', 5), (5, 1, 1, 'Brown', 5),
(6 , 1, 67, '+1 precission', 6), (6, 1, 67, '+1 precission', 6),
(7 , 1, 23, '1', 7), (7, 1, 23, '1', 7),
(8 , 2, 56, 'Melee weapon', 1), (8, 2, 56, 'Melee weapon', 1),
(9 , 2, 58, 'combat fist', 2), (9, 2, 58, 'combat fist', 2),
(10, 2, 27, '15cm', 3), (10, 2, 27, '15cm', 3),
(11, 2, 36, 'Stark Industries', 4), (11, 2, 36, 'Stark Industries', 4),
(12, 2, 1, 'Silver', 5), (12, 2, 1, 'Silver', 5),
(13, 2, 67, 'Concussion', 6), (13, 2, 67, 'Concussion', 6),
(14, 2, 23, '2', 7), (14, 2, 23, '2', 7),
(15, 3, 56, 'Ranged weapon', 1), (15, 3, 56, 'Ranged weapon', 1),
(16, 3, 58, 'sniper rifle', 2), (16, 3, 58, 'sniper rifle', 2),
(17, 3, 4, '300mm', 3), (17, 3, 4, '300mm', 3),
(18, 3, 36, 'Stark Industries', 4), (18, 3, 36, 'Stark Industries', 4),
(19, 3, 1, 'Green', 5), (19, 3, 1, 'Green', 5),
(20, 3, 67, 'precission', 6), (20, 3, 67, 'precission', 6),
(21, 3, 23, '3', 7), (21, 3, 23, '3', 7),
(22, 4, 56, 'Melee weapon', 1), (22, 4, 56, 'Melee weapon', 1),
(23, 4, 58, 'heavy shield', 2), (23, 4, 58, 'heavy shield', 2),
(24, 4, 4, '1x0.5m', 3), (24, 4, 4, '1x0.5m', 3),
(25, 4, 36, 'Stark Industries', 4), (25, 4, 36, 'Stark Industries', 4),
(26, 4, 1, 'Black', 5), (26, 4, 1, 'Black', 5),
(27, 4, 67, 'containtment', 6), (27, 4, 67, 'containtment', 6),
(28, 4, 23, '4', 7), (28, 4, 23, '4', 7),
(29, 5, 56, 'Ranged weapon', 1), (29, 5, 56, 'Ranged weapon', 1),
(30, 5, 58, 'pistol', 2), (30, 5, 58, 'pistol', 2),
(31, 5, 27, '9mm', 3), (31, 5, 27, '9mm', 3),
(32, 5, 36, 'Stark Industries', 4), (32, 5, 36, 'Stark Industries', 4),
(33, 5, 1, 'Silver', 5), (33, 5, 1, 'Silver', 5),
(34, 5, 67, 'rapid fire', 6), (34, 5, 67, 'rapid fire', 6),
(35, 5, 23, '5', 7), (35, 5, 23, '5', 7),
(36, 6, 56, 'Container', 1), (36, 6, 56, 'Container', 1),
(37, 6, 58, 'ammo box', 2), (37, 6, 58, 'ammo box', 2),
(38, 6, 27, '1m', 3), (38, 6, 27, '1m', 3),
(39, 6, 36, 'Stark Industries', 4), (39, 6, 36, 'Stark Industries', 4),
(40, 6, 1, 'Green', 5), (40, 6, 1, 'Green', 5),
(41, 6, 67, 'supply', 6), (41, 6, 67, 'supply', 6),
(42, 6, 23, '6', 7), (42, 6, 23, '6', 7),
(43, 7, 56, 'Container', 1), (43, 7, 56, 'Container', 1),
(44, 7, 58, 'medical box', 2), (44, 7, 58, 'medical box', 2),
(45, 7, 27, '1m', 3), (45, 7, 27, '1m', 3),
(46, 7, 36, 'Stark Industries', 4), (46, 7, 36, 'Stark Industries', 4),
(47, 7, 1, 'White', 5), (47, 7, 1, 'White', 5),
(48, 7, 67, 'supply', 6), (48, 7, 67, 'supply', 6),
(49, 7, 23, '7', 7), (49, 7, 23, '7', 7),
(50, 8, 56, 'Ranged Reinforced weapon', 1), (50, 8, 56, 'Ranged Reinforced weapon', 1),
(51, 8, 58, '+1 longbow', 2), (51, 8, 58, '+1 longbow', 2),
(52, 8, 27, '2m', 3), (52, 8, 27, '2m', 3),
(53, 8, 36, 'Stark Industries', 4), (53, 8, 36, 'Stark Industries', 4),
(54, 8, 1, 'Brown', 5), (54, 8, 1, 'Brown', 5),
(55, 8, 67, 'precission', 6), (55, 8, 67, 'precission', 6),
(56, 8, 23, '8', 7), (56, 8, 23, '8', 7),
(57, 9, 56, 'Melee Reinforced weapon', 1), (57, 9, 56, 'Melee Reinforced weapon', 1),
(58, 9, 58, 'combat fist', 2), (58, 9, 58, 'combat fist', 2),
(59, 9, 27, '15cm', 3), (59, 9, 27, '15cm', 3),
(60, 9, 36, 'Stark Industries', 4), (60, 9, 36, 'Stark Industries', 4),
(61, 9, 1, 'Silver', 5), (61, 9, 1, 'Silver', 5),
(62, 9, 67, 'Concussion', 6), (62, 9, 67, 'Concussion', 6),
(63, 9, 23, '9', 7), (63, 9, 23, '9', 7),
(64, 10, 56, 'Ranged Reinforced weapon', 1), (64, 10, 56, 'Ranged Reinforced weapon', 1),
(65, 10, 58, 'sniper rifle', 2), (65, 10, 58, 'sniper rifle', 2),
(66, 10, 4, '300mm', 3), (66, 10, 4, '300mm', 3),
(67, 10, 36, 'Stark Industries', 4), (67, 10, 36, 'Stark Industries', 4),
(68, 10, 1, 'Green', 5), (68, 10, 1, 'Green', 5),
(69, 10, 67, 'precission', 6), (69, 10, 67, 'precission', 6),
(70, 10, 23, '10', 7), (70, 10, 23, '10', 7),
(71, 11, 56, 'Melee Reinforced weapon', 1), (71, 11, 56, 'Melee Reinforced weapon', 1),
(72, 11, 58, 'heavy shield', 2), (72, 11, 58, 'heavy shield', 2),
(73, 11, 4, '1x0.5m', 3), (73, 11, 4, '1x0.5m', 3),
(74, 11, 36, 'Stark Industries', 4), (74, 11, 36, 'Stark Industries', 4),
(75, 11, 1, 'Black', 5), (75, 11, 1, 'Black', 5),
(76, 11, 67, 'containtment', 6), (76, 11, 67, 'containtment', 6),
(77, 11, 23, '11', 7), (77, 11, 23, '11', 7),
(78, 12, 56, 'Ranged Reinforced weapon', 1), (78, 12, 56, 'Ranged Reinforced weapon', 1),
(79, 12, 58, 'pistol', 2), (79, 12, 58, 'pistol', 2),
(80, 12, 27, '9mm', 3), (80, 12, 27, '9mm', 3),
(81, 12, 36, 'Stark Industries', 4), (81, 12, 36, 'Stark Industries', 4),
(82, 12, 1, 'Silver', 5), (82, 12, 1, 'Silver', 5),
(83, 12, 67, 'rapid fire', 6), (83, 12, 67, 'rapid fire', 6),
(84, 12, 23, '12', 7), (84, 12, 23, '12', 7),
(85, 13, 56, 'Chest', 1), (85, 13, 56, 'Chest', 1),
(86, 13, 58, 'ammo box', 2), (86, 13, 58, 'ammo box', 2),
(87, 13, 27, '1m', 3), (87, 13, 27, '1m', 3),
(88, 13, 36, 'Stark Industries', 4), (88, 13, 36, 'Stark Industries', 4),
(89, 13, 1, 'Green', 5), (89, 13, 1, 'Green', 5),
(90, 13, 67, 'supply', 6), (90, 13, 67, 'supply', 6),
(91, 13, 23, '13', 7), (91, 13, 23, '13', 7),
(92, 14, 56, 'Chest', 1), (92, 14, 56, 'Chest', 1),
(93, 14, 58, 'medical box', 2), (93, 14, 58, 'medical box', 2),
(94, 14, 27, '1m', 3), (94, 14, 27, '1m', 3),
(95, 14, 36, 'Stark Industries', 4), (95, 14, 36, 'Stark Industries', 4),
(96, 14, 1, 'White', 5), (96, 14, 1, 'White', 5),
(97, 14, 67, 'supply', 6), (97, 14, 67, 'supply', 6),
(98, 14, 23, '1', 7), (98, 14, 23, '1', 7),
(99, 71, 92, 'Shipping cost', 2); (99, 15, 92, 'Shipping cost', 2),
(100, 16, 92, 'Shipping cost', 2),
(101, 71, 92, 'Shipping cost', 2);
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`) INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
VALUES VALUES
@ -2061,9 +2069,9 @@ INSERT INTO `vn`.`queuePriority`(`id`, `priority`)
(2, 'Normal'), (2, 'Normal'),
(3, 'Baja'); (3, 'Baja');
INSERT INTO `vn`.`workerTimeControlParams` (`id`, `dayBreak`, `weekBreak`, `weekScope`, `dayWorkMax`, `dayStayMax`, `weekMaxBreak`, `weekMaxScope`, `askInOut`, `mailSuccessFolder`, `mailErrorFolder`) INSERT INTO `vn`.`workerTimeControlParams` (`id`, `dayBreak`, `weekBreak`, `weekScope`, `dayWorkMax`, `dayStayMax`, `weekMaxBreak`, `weekMaxScope`, `askInOut`)
VALUES VALUES
(1, 43200, 129600, 734400, 43200, 50400, 259200, 1296000, 36000, 'Leidos.exito', 'Leidos.error'); (1, 43200, 129600, 734400, 43200, 50400, 259200, 1296000, 36000);
INSERT IGNORE INTO `vn`.`greugeConfig` (`id`, `freightPickUpPrice`) VALUES ('1', '11'); INSERT IGNORE INTO `vn`.`greugeConfig` (`id`, `freightPickUpPrice`) VALUES ('1', '11');

View File

@ -34,5 +34,8 @@
}, },
"UserSync": { "UserSync": {
"dataSource": "vn" "dataSource": "vn"
},
"Mail": {
"dataSource": "vn"
} }
} }

View File

@ -29,6 +29,6 @@ describe('ticket editableStates()', () => {
let result = await app.models.State.editableStates(ctx, filter); let result = await app.models.State.editableStates(ctx, filter);
let pickerDesignedState = result.some(state => state.code == 'PICKER_DESIGNED'); let pickerDesignedState = result.some(state => state.code == 'PICKER_DESIGNED');
expect(pickerDesignedState).toBeFalsy(); expect(pickerDesignedState).toBeTruthy();
}); });
}); });

View File

@ -30,7 +30,7 @@ describe('state isEditable()', () => {
it('should return false if the state is not editable for the given role', async() => { it('should return false if the state is not editable for the given role', async() => {
const employeeRole = 1; const employeeRole = 1;
const asignedState = 20; const asignedState = 13;
let ctx = {req: {accessToken: {userId: employeeRole}}}; let ctx = {req: {accessToken: {userId: employeeRole}}};
let result = await app.models.State.isEditable(ctx, asignedState); let result = await app.models.State.isEditable(ctx, asignedState);