Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-03-28 11:55:31 +01:00
commit 2263da2e05
59 changed files with 632 additions and 166 deletions

View File

@ -13,6 +13,12 @@ for file in changes/*.sql; do
mysql -u root -fc < $file
done
# Import changes for local db
for file in changes/only-local/*.sql; do
echo "[INFO] -> Imported ./$file"
mysql -u root -fc < $file
done
# Import fixtures
echo "[INFO] -> Imported ./dump/dumpedFixtures.sql"
mysql -u root -f < ./dump/dumpedFixtures.sql

View File

@ -0,0 +1,21 @@
DROP TABLE IF EXISTS `vn`.`routeLog`;
CREATE TABLE `vn`.`routeLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(10) unsigned NOT NULL,
`userFk` int(10) unsigned DEFAULT NULL,
`action` set('insert','update','delete') COLLATE utf8_unicode_ci NOT NULL,
`creationDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`description` text CHARACTER SET utf8,
`changedModel` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`oldInstance` text COLLATE utf8_unicode_ci,
`newInstance` text COLLATE utf8_unicode_ci,
`changedModelId` int(11) DEFAULT NULL,
`changedModelValue` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `originFk` (`originFk`),
KEY `userFk` (`userFk`),
CONSTRAINT `routeLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `vn2008`.`Rutas` (`Id_Ruta`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `routeLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

View File

@ -0,0 +1 @@
INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `user`, `password`, `title`) VALUES ('1', 'https://websms.xtratelecom.es/api_php/server.wsdl', 'FERRERTORIBIO', 'HERMANOS', 'Verdnatura');

View File

@ -574,16 +574,16 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`)
(05080000, 'Coral y materiales similares' , 2, 2),
(06021010, 'Plantas vivas: Esqueje/injerto, Vid', 1, 1);
INSERT INTO `vn`.`item`(`id`, `name`,`typeFk`,`size`,`inkFk`,`category`,`stems`,`originFk`,`description`,`producerFk`,`intrastatFk`,`isOnOffer`,`expenceFk`,`isBargain`,`comment`,`relevancy`,`image`,`taxClassFk`,`longName`,`subName`,`tag5`,`value5`,`tag6`,`value6`,`tag7`,`value7`,`tag8`,`value8`)
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`)
VALUES
(1 , 'Object1 Gem1 5', 2, 70, 'AMA', 'EXT', 1 , 1, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, 'Object1 Gem1 5', NULL, 'Medida', '70', 'Color', 'Amarillo' , 'Categoria', 'EXT', 'Tallos', '1'),
(2 , 'Object2 Gem2 3', 2, 70, 'AZL', 'EXT', 1 , 2, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, 'Object2 Gem2 3', NULL, 'Medida', '70', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
(3 , 'Object3 Armor 3', 1, 60, 'AMR', 'EXT', 1 , 3, 'Rhodeys armor', 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, 'Object3 Armor 3', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
(4 , 'Object4 Armor2 2', 1, 60, 'AMR', 'EXT', 1 , 1, 'Iron Mans first armor', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, 'Object4 Armor2 2', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
(5 , 'Object5 Weapon 50', 3, 30, 'GRE', 'EXT', 1 , 2, 'Thors hammer!', 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, 'Object5 Weapon 50', NULL, 'Medida', '30', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
(6 , 'Broken Box', 5, 30, 'GRE', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Broken Box', NULL, 'Medida', '30', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
(7 , 'Legendary Box', 5, 90, 'AZL', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Legendary Box', NULL, 'Medida', '90', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
(71, 'ShippingCost', 4, NULL, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, NULL, 2, 'ShippingCost', NULL, NULL , NULL, NULL , NULL , NULL, NULL, NULL, NULL);
(1 , 2, 70, 'AMA', 1 , 1, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL),
(2 , 2, 70, 'AZL', 1 , 2, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL),
(3 , 1, 60, 'AMR', 1 , 3, 'Rhodeys armor', 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL),
(4 , 1, 60, 'AMR', 1 , 1, 'Iron Mans first armor', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL),
(5 , 3, 30, 'GRE', 1 , 2, 'Thors hammer!', 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL),
(6 , 5, 30, 'GRE', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
(7 , 5, 90, 'AZL', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL),
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, NULL, 2, NULL);
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
VALUES
@ -608,30 +608,30 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`,
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
VALUES
(1, 1, 1, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(2, 2, 1, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(3, 1, 1, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(4, 4, 1, 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(5, 1, 2, 'Object1 Gem1 5', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
(6, 1, 3, 'Object1 Gem1 5', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
(7, 2, 11, 'Object2 Gem2 3', 15, 1.46, 0, 0, 0, CURDATE()),
(8, 4, 11, 'Object4 Armor2 2', 10, 3.05, 0, 0, 0, CURDATE()),
(9, 1, 16, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, CURDATE()),
(10, 2, 16, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, CURDATE()),
(11, 1, 16, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, CURDATE()),
(12, 4, 16, 'Object4 Armor2 2', 20, 3.06, 0, 0, 0, CURDATE()),
(13, 2, 8, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
(14, 1, 8, 'Object1 Gem1 5', 10, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
(15, 1, 19, 'Object1 Gem1 5', 10, 1.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(16, 2, 20, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(17, 2, 22, 'Object2 Gem2 3', 30, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(18, 4, 22, 'Object4 Armor2 2', 20, 3.00, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(19, 1, 4, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY)),
(20, 1, 5, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY)),
(21, 1, 6, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 DAY)),
(22, 1, 7, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 DAY)),
(23, 1, 9, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
(24, 1, 10, 'Object1 Gem1 5', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
(1, 1, 1, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(2, 2, 1, 'Melee weapon combat first 15cm', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(3, 1, 1, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(4, 4, 1, 'Melee weapon heavy shield 1x0.5m', 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(5, 1, 2, 'Ranged weapon longbow 2m', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
(6, 1, 3, 'Ranged weapon longbow 2m', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
(7, 2, 11, 'Melee weapon combat first 15cm', 15, 1.46, 0, 0, 0, CURDATE()),
(8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 3.05, 0, 0, 0, CURDATE()),
(9, 1, 16, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, CURDATE()),
(10, 2, 16, 'Melee weapon combat first 15cm', 10, 1.07, 0, 0, 0, CURDATE()),
(11, 1, 16, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, CURDATE()),
(12, 4, 16, 'Melee weapon heavy shield 1x0.5m', 20, 3.06, 0, 0, 0, CURDATE()),
(13, 2, 8, 'Melee weapon combat first 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
(14, 1, 8, 'Ranged weapon longbow 2m', 10, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
(15, 1, 19, 'Ranged weapon longbow 2m', 10, 1.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(16, 2, 20, 'Melee weapon combat first 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(17, 2, 22, 'Melee weapon combat first 15cm', 30, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(18, 4, 22, 'Melee weapon heavy shield 1x0.5m', 20, 3.00, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(19, 1, 4, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY)),
(20, 1, 5, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY)),
(21, 1, 6, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 DAY)),
(22, 1, 7, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -1 DAY)),
(23, 1, 9, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
(24, 1, 10, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
VALUES
@ -672,7 +672,7 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
(7, 28, 5.6),
(7, 29, -4.6),
(7, 39, 0.01),
(8, 15, 0.0426),
(8, 15, 0.039),
(8, 21, -0.003),
(8, 28, 20.72),
(8, 29, -19.72),
@ -803,41 +803,56 @@ INSERT INTO `vn`.`itemBotanical`(`itemFk`, `botanical`, `genusFk`, `specieFk`)
INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
VALUES
(1 , 1, 56, 'Object1', 1),
(2 , 1, 58, 'Gem1' , 2),
(3 , 1, 27, '5' , 3),
(4 , 1, 36, 'Marvel1', 4),
(5 , 1, 1 , 'Yellow' , 5),
(6 , 1, 67 , 'A1' , 6),
(7 , 1, 23, '0' , 7),
(8 , 2, 56, 'Object2', 1),
(9 , 2, 58, 'Gem2' , 2),
(10, 2, 27 , '3' , 3),
(11, 2, 36, 'Marvel2', 4),
(12, 2, 1 , 'Red' , 5),
(13, 2, 67, 'A1' , 6),
(14, 2, 23, '0' , 7),
(15, 3, 56, 'Object3', 1),
(16, 3, 58, 'Armor' , 2),
(17, 3, 4, '3' , 3),
(18, 3, 36, 'Stark' , 4),
(19, 3, 1 , 'Green' , 5),
(20, 3, 67, 'EXT' , 6),
(21, 3, 23, '0' , 7),
(22, 4, 56, 'Object4', 1),
(23, 4, 58, 'Armor2' , 2),
(24, 4, 4, '2' , 3),
(25, 4, 36, 'Stark' , 4),
(26, 4, 1 , 'Blue' , 5),
(27, 4, 67, 'EXT' , 6),
(28, 4, 23, '1' , 7),
(29, 5, 56, 'Object5', 1),
(30, 5, 58, 'Weapon' , 2),
(31, 5, 27 , '50' , 3),
(32, 5, 36, 'Thor' , 4),
(33, 5, 1 , 'Grey' , 5),
(34, 5, 67, 'EXT' , 6),
(35, 5, 23, '1' , 7);
(1 , 1, 56, 'Ranged weapon', 1),
(2 , 1, 58, 'longbow', 2),
(3 , 1, 27, '2m', 3),
(4 , 1, 36, 'Stark Industries', 4),
(5 , 1, 1, 'Brown', 5),
(6 , 1, 67, 'precission', 6),
(7 , 1, 23, '1', 7),
(8 , 2, 56, 'Melee weapon', 1),
(9 , 2, 58, 'combat first', 2),
(10, 2, 27, '15cm', 3),
(11, 2, 36, 'Stark Industries', 4),
(12, 2, 1, 'Silver', 5),
(13, 2, 67, 'concussion', 6),
(14, 2, 23, '1', 7),
(15, 3, 56, 'Ranged weapon', 1),
(16, 3, 58, 'sniper rifle', 2),
(17, 3, 4, '300mm', 3),
(18, 3, 36, 'Stark Industries', 4),
(19, 3, 1, 'Green', 5),
(20, 3, 67, 'precission', 6),
(21, 3, 23, '1', 7),
(22, 4, 56, 'Melee weapon', 1),
(23, 4, 58, 'heavy shield', 2),
(24, 4, 4, '1x0.5m', 3),
(25, 4, 36, 'Stark Industries', 4),
(26, 4, 1, 'Black', 5),
(27, 4, 67, 'containtment', 6),
(28, 4, 23, '1', 7),
(29, 5, 56, 'Ranged weapon', 1),
(30, 5, 58, 'pistol', 2),
(31, 5, 27, '9mm', 3),
(32, 5, 36, 'Stark Industries', 4),
(33, 5, 1, 'Silver', 5),
(34, 5, 67, 'rapid fire', 6),
(35, 5, 23, '1', 7),
(36, 6, 56, 'Container', 1),
(37, 6, 58, 'ammo box', 2),
(38, 6, 27, '1m', 3),
(39, 6, 36, 'Stark Industries', 4),
(40, 6, 1, 'Green', 5),
(41, 6, 67, 'supply', 6),
(42, 6, 23, '1', 7),
(43, 7, 56, 'Container', 1),
(44, 7, 58, 'medical box', 2),
(45, 7, 27, '1m', 3),
(46, 7, 36, 'Stark Industries', 4),
(47, 7, 1, 'White', 5),
(48, 7, 67, 'supply', 6),
(49, 7, 23, '1', 7),
(50, 71, 92, 'Shipping cost', 2);
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
VALUES
@ -1182,10 +1197,10 @@ INSERT INTO `vn2008`.`workerTeam`(`id`, `team`, `user`)
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `atenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
VALUES
(1, 'Object1 Gem1 5', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(2, 'Object2 Gem2 3', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(3, 'Object4 Armor2 2', 18, 35, 20, 4, 3.06, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(4, 'Object2 Gem2 3', 18, 35, 15, 2, 1.30, NULL, NULL, 11, CURDATE());
(1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(2, 'Melee weapon combat first 15cm', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(3, 'Melee weapon heavy shield 1x0.5m', 18, 35, 20, 4, 3.06, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
(4, 'Melee weapon combat first 15cm', 18, 35, 15, 2, 1.30, NULL, NULL, 11, CURDATE());
INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxClassFk`, `ticketFk`)
VALUES

View File

@ -11,7 +11,7 @@ describe('Item summary path', () => {
it('should search for an item', async() => {
const result = await nightmare
.write(selectors.itemsIndex.searchItemInput, 'Object1 Gem1 5')
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon longbow 2m')
.waitToClick(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
@ -21,7 +21,7 @@ describe('Item summary path', () => {
it(`should click on the search result summary button to open the item summary popup`, async() => {
const isVisibleBefore = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object1 Gem1 5')
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon longbow 2m')
.isVisible(selectors.itemSummary.basicData);
const isVisibleAfter = await nightmare
@ -34,18 +34,18 @@ describe('Item summary path', () => {
it(`should check the item summary preview shows fields from basic data`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Object1 Gem1 5')
.waitForTextInElement(selectors.itemSummary.basicData, 'Ranged weapon longbow 2m')
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
expect(result).toContain('Object1 Gem1 5');
expect(result).toContain('Ranged weapon longbow 2m');
});
it(`should check the item summary preview shows fields from tags`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.tags, 'Yellow')
.waitForTextInElement(selectors.itemSummary.tags, 'Brown')
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
expect(result).toContain('Yellow');
expect(result).toContain('Brown');
});
it(`should check the item summary preview shows fields from niche`, async() => {
@ -84,7 +84,7 @@ describe('Item summary path', () => {
const result = await nightmare
.clearInput('vn-item-index vn-searchbar input')
.waitToClick(selectors.itemsIndex.searchButton)
.write(selectors.itemsIndex.searchItemInput, 'Object2 Gem2 3')
.write(selectors.itemsIndex.searchItemInput, 'Melee weapon combat first 15cm')
.waitToClick(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
@ -94,7 +94,7 @@ describe('Item summary path', () => {
it(`should now click on the search result summary button to open the item summary popup`, async() => {
const isVisibleBefore = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object2 Gem2 3')
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Melee weapon combat first 15cm')
.isVisible(selectors.itemSummary.basicData);
const isVisibleAfter = await nightmare
@ -108,18 +108,18 @@ describe('Item summary path', () => {
it(`should now check the item summary preview shows fields from basic data`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Object2 Gem2 3')
.waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat first 15cm')
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
expect(result).toContain('Object2 Gem2 3');
expect(result).toContain('Melee weapon combat first 15cm');
});
it(`should now check the item summary preview shows fields from tags`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.tags, 'Red')
.waitForTextInElement(selectors.itemSummary.tags, 'Silver')
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
expect(result).toContain('Red');
expect(result).toContain('Silver');
});
it(`should now check the item summary preview shows fields from niche`, async() => {
@ -172,17 +172,17 @@ describe('Item summary path', () => {
it(`should check the item summary shows fields from basic data section`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Object2 Gem2 3')
.waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat first 15cm')
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
expect(result).toContain('Object2 Gem2 3');
expect(result).toContain('Melee weapon combat first 15cm');
});
it(`should check the item summary shows fields from tags section`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
expect(result).toContain('Red');
expect(result).toContain('Silver');
});
it(`should check the item summary shows fields from niches section`, async() => {

View File

@ -7,7 +7,7 @@ describe('Item Edit basic data path', () => {
beforeAll(() => {
nightmare
.loginAndModule('buyer', 'item')
.accessToSearchResult('Object2 Gem2 3')
.accessToSearchResult('Melee weapon combat first 15cm')
.accessToSection('item.card.data');
});

View File

@ -7,7 +7,7 @@ describe('Item edit tax path', () => {
beforeAll(() => {
nightmare
.loginAndModule('buyer', 'item')
.accessToSearchResult('Object1 Gem1 5')
.accessToSearchResult('Ranged weapon longbow 2m')
.accessToSection('item.card.tax');
});

View File

@ -7,7 +7,7 @@ describe('Item create tags path', () => {
beforeAll(() => {
nightmare
.loginAndModule('buyer', 'item')
.accessToSearchResult('Object1 Gem1 5')
.accessToSearchResult('Ranged weapon longbow 2m')
.accessToSection('item.card.tags');
});
@ -55,7 +55,7 @@ describe('Item create tags path', () => {
.waitToGetProperty(selectors.itemTags.fifthRelevancyInput, 'value');
expect(tag).toEqual('Color');
expect(value).toEqual('Yellow');
expect(value).toEqual('Brown');
expect(relevancy).toEqual('5');
});
@ -70,7 +70,7 @@ describe('Item create tags path', () => {
.waitToGetProperty(selectors.itemTags.sixthRelevancyInput, 'value');
expect(tag).toEqual('Categoria');
expect(value).toEqual('A1');
expect(value).toEqual('precission');
expect(relevancy).toEqual('6');
});
});

View File

@ -7,7 +7,7 @@ describe('Item create niche path', () => {
beforeAll(() => {
nightmare
.loginAndModule('buyer', 'item')
.accessToSearchResult('Object1 Gem1 5')
.accessToSearchResult('Ranged weapon longbow 2m')
.accessToSection('item.card.niche');
});

View File

@ -7,7 +7,7 @@ describe('Item Create botanical path', () => {
beforeAll(() => {
nightmare
.loginAndModule('buyer', 'item')
.accessToSearchResult('Object5 Weapon 50')
.accessToSearchResult('Ranged weapon pistol 9mm')
.accessToSection('item.card.botanical');
});

View File

@ -7,7 +7,7 @@ describe('Item Create barcodes path', () => {
beforeAll(() => {
nightmare
.loginAndModule('buyer', 'item')
.accessToSearchResult('Object1 Gem1 5')
.accessToSearchResult('Ranged weapon longbow 2m')
.accessToSection('item.card.itemBarcode');
});

View File

@ -29,7 +29,7 @@ xdescribe('Item regularize path', () => {
it('should search for the item', async() => {
const resultCount = await nightmare
.write(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon pistol 9mm')
.waitToClick(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
@ -39,7 +39,7 @@ xdescribe('Item regularize path', () => {
it(`should click on the search result to access to the item tax`, async() => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object5 Weapon 50')
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon pistol 9mm')
.waitToClick(selectors.itemsIndex.searchResult)
.waitForURL('/summary')
.parsedUrl();
@ -134,7 +134,7 @@ xdescribe('Item regularize path', () => {
it('should search for the item once again', async() => {
const resultCount = await nightmare
.write(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon pistol 9mm')
.waitToClick(selectors.itemsIndex.searchButton)
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
.countElement(selectors.itemsIndex.searchResult);
@ -144,7 +144,7 @@ xdescribe('Item regularize path', () => {
it(`should click on the search result to access to the item tax`, async() => {
const url = await nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object5 Weapon 50')
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Ranged weapon pistol 9mm')
.waitToClick(selectors.itemsIndex.searchResult)
.waitForURL('/summary')
.parsedUrl();

View File

@ -15,7 +15,7 @@ describe('Ticket List sale path', () => {
const value = await nightmare
.waitToGetProperty(selectors.ticketSales.firstSaleColour, 'innerText');
expect(value).toContain('Yellow');
expect(value).toContain('Silver');
});
it('should confirm the first ticket sale contains the lenght', async() => {
@ -29,7 +29,7 @@ describe('Ticket List sale path', () => {
const value = await nightmare
.waitToGetProperty(selectors.ticketSales.firstSalePrice, 'innerText');
expect(value).toContain('2.30');
expect(value).toContain('1.30');
});
it('should confirm the first ticket sale contains the discount', async() => {
@ -43,7 +43,7 @@ describe('Ticket List sale path', () => {
const value = await nightmare
.waitToGetProperty(selectors.ticketSales.firstSaleImport, 'innerText');
expect(value).toContain('23');
expect(value).toContain('19.50');
});
it('should navigate to the catalog by pressing the new item button', async() => {

View File

@ -15,7 +15,7 @@ describe('Ticket Create packages path', () => {
const result = await nightmare
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
.waitToClick(selectors.ticketPackages.addPackageButton)
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Container medical box 1m')
.waitToClick(selectors.ticketPackages.savePackagesButton)
.waitForLastSnackbar();
@ -54,7 +54,7 @@ describe('Ticket Create packages path', () => {
it(`should create a new package with correct data`, async() => {
const result = await nightmare
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Legendary Box')
.autocompleteSearch(selectors.ticketPackages.firstPackageAutocomplete, 'Container medical box 1m')
.waitToClick(selectors.ticketPackages.savePackagesButton)
.waitForLastSnackbar();
@ -64,10 +64,10 @@ describe('Ticket Create packages path', () => {
it(`should confirm the first select is the expected one`, async() => {
const result = await nightmare
.reloadSection('ticket.card.package.index')
.waitForTextInInput(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'Legendary Box')
.waitForTextInInput(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'Container medical box 1m')
.waitToGetProperty(`${selectors.ticketPackages.firstPackageAutocomplete} input`, 'value');
expect(result).toEqual('7 : Legendary Box');
expect(result).toEqual('7 : Container medical box 1m');
});
it(`should confirm the first quantity is the expected one`, async() => {

View File

@ -73,7 +73,7 @@ describe('Ticket Edit basic data path', () => {
.wait(1900)
.waitToGetProperty(selectors.ticketBasicData.stepTwoTotalPriceDif, 'innerText');
expect(result).toContain('-€204.25');
expect(result).toContain('-€202.25');
});
it(`should then click next to move on to step three`, async() => {

View File

@ -311,7 +311,7 @@ xdescribe('Ticket Edit sale path', () => {
.wait(selectors.ticketSales.firstSaleText)
.waitToGetProperty(selectors.ticketSales.firstSaleText, 'innerText');
expect(result).toContain(`Object4 Armor2 2`);
expect(result).toContain(`Melee weapon heavy shield 1x0.5m`);
});
it('should go back to the original ticket sales section', async() => {

View File

@ -0,0 +1,80 @@
const soap = require('soap');
const xmlParser = require('xml2js').parseString;
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('send', {
description: 'Sends SMS to a destination phone',
accepts: [{
arg: 'recipientFk',
type: 'Integer'
},
{
arg: 'recipient',
type: 'String',
required: true,
},
{
arg: 'message',
type: 'String',
required: true,
}],
returns: {
type: 'boolean',
root: true
},
http: {
path: `/send`,
verb: 'POST'
}
});
Self.send = async(ctx, recipientFk, recipient, message) => {
const userId = ctx.req.accessToken.userId;
const smsConfig = await Self.app.models.SmsConfig.findOne();
const soapClient = await soap.createClientAsync(smsConfig.uri);
const params = {
user: smsConfig.user,
pass: smsConfig.password,
src: smsConfig.title,
dst: recipient,
msg: message
};
let xmlResponse;
let xmlResult;
let xmlParsed;
let status;
try {
[xmlResponse] = await soapClient.sendSMSAsync(params);
xmlResult = xmlResponse.result.$value;
xmlParsed = await new Promise((resolve, reject) => {
xmlParser(xmlResult, (err, result) => {
if (err)
reject(err);
resolve(result);
});
});
[status] = xmlParsed['xtratelecom-sms-response'].sms;
} catch (e) {
console.error(e);
}
const newSms = {
senderFk: userId,
destinationFk: recipientFk || null,
destination: recipient,
message: message,
statusCode: status.codigo,
status: status.descripcion
};
const sms = Self.create(newSms);
if (status.codigo != 200)
throw new UserError(`We weren't able to send this SMS`);
return sms;
};
};

View File

@ -74,6 +74,12 @@
"ClientSample": {
"dataSource": "vn"
},
"Sms": {
"dataSource": "vn"
},
"SmsConfig": {
"dataSource": "vn"
},
"TpvError": {
"dataSource": "vn"
},

View File

@ -0,0 +1,29 @@
{
"name": "SmsConfig",
"description": "Sms configuration",
"base": "VnModel",
"options": {
"mysql": {
"table": "smsConfig"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"uri": {
"type": "String"
},
"user": {
"type": "String"
},
"password": {
"type": "String"
},
"title": {
"type": "String"
}
}
}

View File

@ -0,0 +1,4 @@
module.exports = Self => {
// Methods
require('../methods/sms/send')(Self);
};

View File

@ -0,0 +1,51 @@
{
"name": "Sms",
"description": "Sms sent to client",
"base": "VnModel",
"options": {
"mysql": {
"table": "sms"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"sender": {
"type": "String",
"required": true
},
"destination": {
"type": "String",
"required": true
},
"message": {
"type": "String",
"required": true
},
"statusCode": {
"type": "Number",
"required": true
},
"status": {
"type": "String"
},
"created": {
"type": "Date"
}
},
"relations": {
"sender": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "senderFk"
},
"recipient": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "destinationFk"
}
}
}

View File

@ -1,9 +1,9 @@
const app = require('vn-loopback/server/server');
describe('item filterItemTags()', () => {
it('should filter ItemTags table', async () => {
it('should filter ItemTags table', async() => {
let [result] = await app.models.ItemTag.filterItemTags(1, {});
expect(result.value).toEqual('Blue');
expect(result.value).toEqual('Black');
});
});

View File

@ -6,12 +6,12 @@ describe('item filter()', () => {
order: 'isActive ASC, name',
limit: 8
};
let tags = [{value: 'Gem2', tagFk: 58}];
let tags = [{value: 'combat first', tagFk: 58}];
let result = await app.models.Item.filter({args: {filter: filter, typeFk: 2, tags: tags}});
expect(result.length).toEqual(1);
expect(result[0].id).toEqual(2);
expect(result[0].name).toEqual('Object2 Gem2 3');
expect(result[0].name).toEqual('Melee weapon combat first 15cm');
expect(result[0].type).toEqual('Anthurium');
});
});

View File

@ -14,10 +14,10 @@ describe('order catalogFilter()', () => {
let firstItemId = result[0].id;
expect(result.length).toEqual(2);
expect(firstItemId).toEqual(2);
expect(firstItemId).toEqual(1);
});
it('should return an array of items based on tag filter', async() => {
it('should now return an array of items based on tag filter', async() => {
let filter = {
where: {
categoryFk: 1,
@ -25,7 +25,7 @@ describe('order catalogFilter()', () => {
}
};
let tags = [{tagFk: 56, value: 'Object2'}];
let tags = [{tagFk: 56, value: 'Melee weapon'}];
let orderFk = 11;
let orderBy = {field: 'relevancy DESC, name', way: 'DESC'};
let result = await app.models.Order.catalogFilter(orderFk, orderBy, filter, tags);

View File

@ -4,5 +4,8 @@
},
"Vehicle": {
"dataSource": "vn"
},
"RouteLog": {
"dataSource": "vn"
}
}

View File

@ -0,0 +1,58 @@
{
"name": "RouteLog",
"base": "VnModel",
"options": {
"mysql": {
"table": "routeLog"
}
},
"properties": {
"id": {
"id": true,
"type": "Number",
"forceId": false
},
"originFk": {
"type": "Number",
"required": true
},
"userFk": {
"type": "Number"
},
"action": {
"type": "String",
"required": true
},
"changedModel": {
"type": "String"
},
"oldInstance": {
"type": "Object"
},
"newInstance": {
"type": "Object"
},
"creationDate": {
"type": "Date"
},
"changedModelId": {
"type": "Number"
},
"changedModelValue": {
"type": "String"
},
"description": {
"type": "String"
}
},
"relations": {
"user": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "userFk"
}
},
"scope": {
"order": ["creationDate DESC", "id DESC"]
}
}

View File

@ -1,6 +1,9 @@
{
"name": "Route",
"base": "VnModel",
"base": "Loggable",
"log": {
"model":"RouteLog"
},
"options": {
"mysql": {
"table": "route"

View File

@ -7,3 +7,4 @@ import './summary';
import './card';
import './create';
import './basic-data';
import './log';

View File

@ -0,0 +1,9 @@
<vn-crud-model
vn-id="model"
url="/api/RouteLogs"
link="{originFk: $ctrl.$stateParams.id}"
filter="$ctrl.filter"
limit="20"
data="$ctrl.logs" auto-load="false">
</vn-crud-model>
<vn-log model="model"></vn-log>

View File

@ -0,0 +1,53 @@
import ngModule from '../module';
class Controller {
constructor($scope, $stateParams) {
this.$scope = $scope;
this.$stateParams = $stateParams;
this.filter = {
include: [{
relation: 'user',
scope: {
fields: ['name'],
},
}],
};
}
get logs() {
return this._logs;
}
set logs(value) {
this._logs = value;
if (this.logs) {
this.logs.forEach(log => {
log.oldProperties = this.getInstance(log.oldInstance);
log.newProperties = this.getInstance(log.newInstance);
});
}
}
getInstance(instance) {
let validDate = /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/;
const properties = [];
if (typeof instance == 'object' && instance != null) {
Object.keys(instance).forEach(property => {
if (validDate.test(instance[property]))
instance[property] = new Date(instance[property]).toLocaleString('es-ES');
properties.push({key: property, value: instance[property]});
});
return properties;
}
return null;
}
}
Controller.$inject = ['$scope', '$stateParams'];
ngModule.component('vnRouteLog', {
template: require('./index.html'),
controller: Controller,
});

View File

@ -0,0 +1,37 @@
import './index';
describe('Route', () => {
describe('Component vnRouteLog', () => {
let $componentController;
let $scope;
let controller;
beforeEach(ngModule('route'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
$componentController = _$componentController_;
$scope = $rootScope.$new();
controller = $componentController('vnRouteLog', {$scope: $scope});
controller.$scope.model = {data: [{newInstance: {id: 1}, oldInstance: {id: 2}}]};
}));
describe('logs setter', () => {
it('should call the function getInstance() twice', () => {
spyOn(controller, 'getInstance');
controller.logs = [{newInstance: {id: 1}, oldInstance: {id: 2}}];
expect(controller.getInstance.calls.count()).toBe(2);
expect(controller.getInstance).toHaveBeenCalledWith({id: 1});
expect(controller.getInstance).toHaveBeenCalledWith({id: 2});
});
});
describe('getInstance(instance)', () => {
it('should transform the object given in to an array', () => {
let newInstance = controller.getInstance(controller.$scope.model.data[0].newInstance);
expect(newInstance).toEqual([{key: 'id', value: 1}]);
});
});
});
});

View File

@ -5,7 +5,9 @@
"validations" : true,
"dependencies": ["client", "worker", "ticket"],
"menu": [
{"state": "route.card.basicData", "icon": "settings"}],
{"state": "route.card.basicData", "icon": "settings"},
{"state": "route.card.log", "icon": "history"}
],
"routes": [
{
"url": "/route",
@ -51,6 +53,12 @@
"route": "$ctrl.route"
},
"acl": ["delivery"]
}
}, {
"url" : "/log",
"state": "route.card.log",
"component": "vn-route-log",
"description": "Log",
"acl": ["delivery"]
}
]
}

View File

@ -1,12 +1,12 @@
const app = require('vn-loopback/server/server');
describe('ticket listPackaging()', () => {
it('should call the listPackaging method and return the response', async () => {
it('should call the listPackaging method and return the response', async() => {
let filter = {where: {packagingFk: 1}};
let response = await app.models.Packaging.listPackaging(filter);
expect(response[0].name).toBeDefined();
expect(response[0].name).toEqual('Broken Box');
expect(response[0].name).toEqual('Container ammo box 1m');
});
});

View File

@ -5,7 +5,7 @@ describe('ticket listSaleTracking()', () => {
let filter = {where: {ticketFk: 1}};
let result = await app.models.SaleTracking.listSaleTracking(filter);
expect(result[0].concept).toEqual('Object1 Gem1 5');
expect(result[0].concept).toEqual('Ranged weapon longbow 2m');
});
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async() => {

View File

@ -4,7 +4,7 @@ describe('sale getClaimableFromTicket()', () => {
it('should return the claimable sales of a given ticket', async() => {
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
expect(claimableFromTicket[0].concept).toBe('Object1 Gem1 5');
expect(claimableFromTicket[0].concept).toBe('Ranged weapon longbow 2m');
expect(claimableFromTicket.length).toBe(3);
});
});

View File

@ -9,6 +9,6 @@ describe('ticket getSales()', () => {
expect(sales[1].tags).toBeDefined();
expect(sales[2].tags).toBeDefined();
expect(sales[3].tags).toBeDefined();
expect(sales[2].claim).toBeDefined();
expect(sales[0].claim).toBeDefined();
});
});

View File

@ -1,6 +1,9 @@
{
"name": "Ticket",
"base": "VnModel",
"base": "Loggable",
"log": {
"model":"TicketLog"
},
"options": {
"mysql": {
"table": "ticket"

View File

@ -55,13 +55,13 @@
<vn-icon
ng-show="ticket.hasTicketRequest"
class="bright"
vn-tooltip="{{ticket.hasTicketRequest}}"
vn-tooltip="Purchase request"
icon="icon-100">
</vn-icon>
<vn-icon
ng-show="ticket.isAvailable === 0"
class="bright"
vn-tooltip="{{ticket.isAvailable}}"
vn-tooltip="Not available"
icon="icon-unavailable">
</vn-icon>
<vn-icon
@ -73,7 +73,7 @@
<vn-icon
ng-show="ticket.risk"
class="bright"
vn-tooltip="Risk : {{ticket.risk}}"
vn-tooltip="{{::$ctrl.$translate.instant('Risk')}}: {{ticket.risk}}"
icon="icon-risk">
</vn-icon>
</vn-td>

View File

@ -2,8 +2,9 @@ import ngModule from '../module';
import './style.scss';
export default class Controller {
constructor($scope, $state, $stateParams) {
constructor($scope, $state, $stateParams, $translate) {
this.$ = $scope;
this.$translate = $translate;
this.$stateParams = $stateParams;
this.$state = $state;
this.selectedTicket = null;
@ -41,9 +42,9 @@ export default class Controller {
}
goToLines(event, ticketFk) {
event.preventDefault();
event.stopImmediatePropagation();
this.$state.go('ticket.card.sale', {id: ticketFk});
this.preventDefault(event);
let url = this.$state.href('ticket.card.sale', {id: ticketFk}, {absolute: true});
window.open(url, '_blank');
}
goToTurns() {
@ -85,30 +86,32 @@ export default class Controller {
}
showClientDescriptor(event, clientFk) {
event.preventDefault();
event.stopImmediatePropagation();
this.preventDefault(event);
this.$.clientDescriptor.clientFk = clientFk;
this.$.clientDescriptor.parent = event.target;
this.$.clientDescriptor.show();
}
showWorkerDescriptor(event, userId) {
event.preventDefault();
event.stopImmediatePropagation();
this.preventDefault(event);
this.selectedWorker = userId;
this.$.workerDescriptor.parent = event.target;
this.$.workerDescriptor.show();
}
preview(event, ticket) {
event.preventDefault();
event.stopImmediatePropagation();
this.preventDefault(event);
this.selectedTicket = ticket;
this.$.summary.show();
}
preventDefault(event) {
event.preventDefault();
event.stopImmediatePropagation();
}
}
Controller.$inject = ['$scope', '$state', '$stateParams'];
Controller.$inject = ['$scope', '$state', '$stateParams', '$translate'];
ngModule.component('vnTicketIndex', {
template: require('./index.html'),

View File

@ -1,2 +1,3 @@
Turns: Turnos
Go to lines: Ir a lineas
Go to lines: Ir a lineas
Not available: No disponible

View File

@ -1,5 +1,5 @@
<vn-card class="summary">
<h5 >{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} - {{$ctrl.summary.nickname}}
<h5 >Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} ({{$ctrl.summary.client.id}}) - {{$ctrl.summary.nickname}}
<vn-button
disabled="!$ctrl.isEditable"
label="poner OK"

120
package-lock.json generated
View File

@ -2187,8 +2187,7 @@
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
"dev": true
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
},
"buffer-indexof": {
"version": "1.1.1",
@ -2838,7 +2837,6 @@
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
@ -3665,17 +3663,17 @@
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI="
},
"domhandler": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz",
"integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=",
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
"integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
"requires": {
"domelementtype": "1"
}
},
"domutils": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.6.2.tgz",
"integrity": "sha1-GVjMC0yUJuntNn+xyOhUiRsPo/8=",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
"integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
"requires": {
"dom-serializer": "0",
"domelementtype": "1"
@ -4881,7 +4879,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz",
"integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=",
"dev": true,
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.1",
@ -4895,8 +4892,7 @@
"statuses": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
"integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=",
"dev": true
"integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
}
}
},
@ -4953,6 +4949,11 @@
"parse-filepath": "^1.0.1"
}
},
"first-chunk-stream": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-0.1.0.tgz",
"integrity": "sha1-dV0+wU1JqG49L8wIvurVwMornAo="
},
"flagged-respawn": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
@ -6818,16 +6819,41 @@
}
},
"htmlparser2": {
"version": "3.9.2",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz",
"integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=",
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
"integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
"requires": {
"domelementtype": "^1.3.0",
"domelementtype": "^1.3.1",
"domhandler": "^2.3.0",
"domutils": "^1.5.1",
"entities": "^1.1.1",
"inherits": "^2.0.1",
"readable-stream": "^2.0.2"
"readable-stream": "^3.1.1"
},
"dependencies": {
"domelementtype": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
"integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w=="
},
"readable-stream": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
"integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"http-deceiver": {
@ -7511,8 +7537,7 @@
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"is-valid-glob": {
"version": "1.0.0",
@ -10796,7 +10821,6 @@
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -10969,7 +10993,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -13646,6 +13669,26 @@
}
}
},
"soap": {
"version": "0.26.0",
"resolved": "https://registry.npmjs.org/soap/-/soap-0.26.0.tgz",
"integrity": "sha512-tTS3lnGl6lfjQQuJgNnWOgC0Xa6qYQSwl2G7DX3kCdGmek/FTNmHDM/7icKP1KBMFfCrKpAWEbZiGefa92SCYw==",
"requires": {
"bluebird": "^3.5.0",
"concat-stream": "^1.5.1",
"debug": "^2.6.9",
"ejs": "~2.5.5",
"finalhandler": "^1.0.3",
"httpntlm": "^1.5.2",
"lodash": "^4.17.5",
"request": ">=2.9.0",
"sax": ">=0.6",
"serve-static": "^1.11.1",
"strip-bom": "~0.3.1",
"uuid": "^3.1.0",
"xml-crypto": "~0.8.0"
}
},
"socket.io": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz",
@ -14263,6 +14306,15 @@
"ansi-regex": "^2.0.0"
}
},
"strip-bom": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-0.3.1.tgz",
"integrity": "sha1-noo57/RW/5q8LwWfXyIluw8/fKU=",
"requires": {
"first-chunk-stream": "^0.1.0",
"is-utf8": "^0.2.0"
}
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
@ -15172,8 +15224,7 @@
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"uglify-js": {
"version": "3.4.9",
@ -16668,6 +16719,22 @@
"integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=",
"dev": true
},
"xml-crypto": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-0.8.5.tgz",
"integrity": "sha1-K7z7PrM/OoKiGLgiv2craxwg5Tg=",
"requires": {
"xmldom": "=0.1.19",
"xpath.js": ">=0.0.3"
},
"dependencies": {
"xmldom": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz",
"integrity": "sha1-Yx/Ad3bv2EEYvyUXGzftTQdaCrw="
}
}
},
"xml2js": {
"version": "0.4.19",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
@ -16679,7 +16746,7 @@
},
"xmlbuilder": {
"version": "9.0.7",
"resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
},
"xmlcreate": {
@ -16699,6 +16766,11 @@
"integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=",
"dev": true
},
"xpath.js": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz",
"integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ=="
},
"xregexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",

View File

@ -25,9 +25,11 @@
"request": "^2.88.0",
"request-promise-native": "^1.0.7",
"require-yaml": "0.0.1",
"soap": "^0.26.0",
"strong-error-handler": "^2.3.2",
"uuid": "^3.3.2",
"vn-loopback": "file:./loopback"
"vn-loopback": "file:./loopback",
"xml2js": "^0.4.19"
},
"devDependencies": {
"@babel/core": "^7.3.3",