Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit has test failures
Details
gitea/salix/dev This commit has test failures
Details
This commit is contained in:
commit
b320d64462
|
@ -21,43 +21,3 @@ ADD CONSTRAINT `fgnUserFk`
|
|||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
|
||||
insert into vn.userPhone(userFk,typeFk,phone)
|
||||
select id,'personalPhone', phone
|
||||
from vn.client
|
||||
where phone is not null;
|
||||
|
||||
|
||||
insert into vn.userPhone(userFk,typeFk,phone)
|
||||
select id,'businessPhone', phone
|
||||
from vn.worker
|
||||
where phone is not null AND phone > '';
|
||||
|
||||
insert into vn.userPhone(userFk,typeFk,phone)
|
||||
SELECT
|
||||
`w`.`userFk`,
|
||||
'businessPhone',
|
||||
`m`.`value` AS `mediaValue`
|
||||
FROM
|
||||
(((((`postgresql`.`person` `p`
|
||||
JOIN `postgresql`.`profile` `po` ON ((`po`.`person_id` = `p`.`person_id`)))
|
||||
JOIN `postgresql`.`profile_media` `pom` ON ((`pom`.`profile_id` = `po`.`profile_id`)))
|
||||
JOIN `postgresql`.`media` `m` ON ((`m`.`media_id` = `pom`.`media_id`)))
|
||||
JOIN `postgresql`.`media_type` `mt` ON ((`mt`.`media_type_id` = `m`.`media_type_id`)))
|
||||
JOIN `vn`.`worker` `w` ON ((`w`.`id` = `p`.`id_trabajador`)))
|
||||
WHERE
|
||||
(`mt`.`name` = 'movil empresa');
|
||||
|
||||
insert into vn.userPhone(userFk,typeFk,phone)
|
||||
SELECT
|
||||
`w`.`userFk`,
|
||||
'personalPhone',
|
||||
`m`.`value` AS `mediaValue`
|
||||
FROM
|
||||
(((((`postgresql`.`person` `p`
|
||||
JOIN `postgresql`.`profile` `po` ON ((`po`.`person_id` = `p`.`person_id`)))
|
||||
JOIN `postgresql`.`profile_media` `pom` ON ((`pom`.`profile_id` = `po`.`profile_id`)))
|
||||
JOIN `postgresql`.`media` `m` ON ((`m`.`media_id` = `pom`.`media_id`)))
|
||||
JOIN `postgresql`.`media_type` `mt` ON ((`mt`.`media_type_id` = `m`.`media_type_id`)))
|
||||
JOIN `vn`.`worker` `w` ON ((`w`.`id` = `p`.`id_trabajador`)))
|
||||
WHERE
|
||||
(`mt`.`name` = 'movil personal')
|
|
@ -36,7 +36,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:03
|
||||
-- Dump completed on 2019-11-12 10:01:42
|
||||
USE `account`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -71,7 +71,7 @@ UNLOCK TABLES;
|
|||
|
||||
LOCK TABLES `roleInherit` WRITE;
|
||||
/*!40000 ALTER TABLE `roleInherit` DISABLE KEYS */;
|
||||
INSERT INTO `roleInherit` VALUES (9,0),(66,0),(5,1),(13,1),(18,1),(31,1),(32,1),(34,1),(35,1),(37,1),(40,1),(42,1),(44,1),(47,1),(51,1),(53,1),(54,1),(56,1),(58,1),(1,2),(1,3),(30,5),(39,5),(60,5),(11,6),(1,11),(2,11),(3,11),(16,13),(20,13),(21,13),(22,13),(34,13),(41,13),(43,13),(45,13),(48,13),(50,13),(52,13),(55,13),(57,13),(59,13),(61,13),(16,15),(20,16),(21,18),(52,19),(65,19),(17,20),(30,20),(5,21),(19,21),(22,21),(39,21),(30,22),(5,33),(34,33),(15,35),(41,35),(52,35),(49,36),(61,36),(17,37),(38,37),(17,39),(41,40),(43,42),(36,44),(45,44),(36,47),(48,47),(50,49),(60,50),(65,50),(52,51),(21,53),(30,53),(55,54),(57,56),(39,57),(50,57),(60,57),(49,58),(59,58),(50,59),(17,64),(30,64),(38,64),(20,65);
|
||||
INSERT INTO `roleInherit` VALUES (9,0),(66,0),(5,1),(13,1),(18,1),(31,1),(32,1),(34,1),(35,1),(37,1),(40,1),(42,1),(44,1),(47,1),(51,1),(53,1),(54,1),(56,1),(58,1),(1,2),(1,3),(30,5),(39,5),(60,5),(11,6),(1,11),(2,11),(3,11),(16,13),(20,13),(21,13),(22,13),(34,13),(41,13),(43,13),(45,13),(48,13),(50,13),(52,13),(55,13),(57,13),(59,13),(61,13),(16,15),(20,16),(21,18),(52,19),(65,19),(17,20),(30,20),(5,21),(19,21),(22,21),(39,21),(30,22),(5,33),(34,33),(15,35),(41,35),(52,35),(65,35),(49,36),(61,36),(17,37),(38,37),(17,39),(41,40),(43,42),(36,44),(45,44),(36,47),(48,47),(50,49),(60,50),(65,50),(52,51),(21,53),(30,53),(55,54),(57,56),(39,57),(50,57),(60,57),(49,58),(59,58),(50,59),(17,64),(30,64),(38,64),(20,65);
|
||||
/*!40000 ALTER TABLE `roleInherit` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
@ -81,7 +81,7 @@ UNLOCK TABLES;
|
|||
|
||||
LOCK TABLES `roleRole` WRITE;
|
||||
/*!40000 ALTER TABLE `roleRole` DISABLE KEYS */;
|
||||
INSERT INTO `roleRole` VALUES (0,0),(0,1),(0,2),(0,3),(0,5),(0,6),(0,9),(0,11),(0,13),(0,15),(0,16),(0,17),(0,18),(0,19),(0,20),(0,21),(0,22),(0,30),(0,31),(0,32),(0,33),(0,34),(0,35),(0,36),(0,37),(0,38),(0,39),(0,40),(0,41),(0,42),(0,43),(0,44),(0,45),(0,47),(0,48),(0,49),(0,50),(0,51),(0,52),(0,53),(0,54),(0,55),(0,56),(0,57),(0,58),(0,59),(0,60),(0,61),(0,62),(0,64),(0,65),(0,66),(1,1),(1,2),(1,3),(1,6),(1,11),(2,2),(2,6),(2,11),(3,3),(3,6),(3,11),(5,1),(5,2),(5,3),(5,5),(5,6),(5,11),(5,13),(5,18),(5,21),(5,33),(5,53),(6,6),(9,0),(9,1),(9,2),(9,3),(9,5),(9,6),(9,9),(9,11),(9,13),(9,15),(9,16),(9,17),(9,18),(9,19),(9,20),(9,21),(9,22),(9,30),(9,31),(9,32),(9,33),(9,34),(9,35),(9,36),(9,37),(9,38),(9,39),(9,40),(9,41),(9,42),(9,43),(9,44),(9,45),(9,47),(9,48),(9,49),(9,50),(9,51),(9,52),(9,53),(9,54),(9,55),(9,56),(9,57),(9,58),(9,59),(9,60),(9,61),(9,62),(9,64),(9,65),(9,66),(11,6),(11,11),(13,1),(13,2),(13,3),(13,6),(13,11),(13,13),(15,1),(15,2),(15,3),(15,6),(15,11),(15,15),(15,35),(16,1),(16,2),(16,3),(16,6),(16,11),(16,13),(16,15),(16,16),(16,35),(17,1),(17,2),(17,3),(17,5),(17,6),(17,11),(17,13),(17,15),(17,16),(17,17),(17,18),(17,19),(17,20),(17,21),(17,33),(17,35),(17,36),(17,37),(17,39),(17,44),(17,47),(17,49),(17,50),(17,53),(17,56),(17,57),(17,58),(17,59),(17,64),(17,65),(18,1),(18,2),(18,3),(18,6),(18,11),(18,18),(19,1),(19,2),(19,3),(19,6),(19,11),(19,13),(19,18),(19,19),(19,21),(19,53),(20,1),(20,2),(20,3),(20,6),(20,11),(20,13),(20,15),(20,16),(20,18),(20,19),(20,20),(20,21),(20,35),(20,36),(20,44),(20,47),(20,49),(20,50),(20,53),(20,56),(20,57),(20,58),(20,59),(20,65),(21,1),(21,2),(21,3),(21,6),(21,11),(21,13),(21,18),(21,21),(21,53),(22,1),(22,2),(22,3),(22,6),(22,11),(22,13),(22,18),(22,21),(22,22),(22,53),(30,1),(30,2),(30,3),(30,5),(30,6),(30,11),(30,13),(30,15),(30,16),(30,18),(30,19),(30,20),(30,21),(30,22),(30,30),(30,33),(30,35),(30,36),(30,44),(30,47),(30,49),(30,50),(30,53),(30,56),(30,57),(30,58),(30,59),(30,64),(30,65),(31,1),(31,2),(31,3),(31,6),(31,11),(31,31),(32,1),(32,2),(32,3),(32,6),(32,11),(32,32),(33,33),(34,1),(34,2),(34,3),(34,6),(34,11),(34,13),(34,33),(34,34),(35,1),(35,2),(35,3),(35,6),(35,11),(35,35),(36,1),(36,2),(36,3),(36,6),(36,11),(36,36),(36,44),(36,47),(37,1),(37,2),(37,3),(37,6),(37,11),(37,37),(38,1),(38,2),(38,3),(38,6),(38,11),(38,37),(38,38),(38,64),(39,1),(39,2),(39,3),(39,5),(39,6),(39,11),(39,13),(39,18),(39,21),(39,33),(39,39),(39,53),(39,56),(39,57),(40,1),(40,2),(40,3),(40,6),(40,11),(40,40),(41,1),(41,2),(41,3),(41,6),(41,11),(41,13),(41,35),(41,40),(41,41),(42,1),(42,2),(42,3),(42,6),(42,11),(42,42),(43,1),(43,2),(43,3),(43,6),(43,11),(43,13),(43,42),(43,43),(44,1),(44,2),(44,3),(44,6),(44,11),(44,44),(45,1),(45,2),(45,3),(45,6),(45,11),(45,13),(45,44),(45,45),(47,1),(47,2),(47,3),(47,6),(47,11),(47,47),(48,1),(48,2),(48,3),(48,6),(48,11),(48,13),(48,47),(48,48),(49,1),(49,2),(49,3),(49,6),(49,11),(49,36),(49,44),(49,47),(49,49),(49,58),(50,1),(50,2),(50,3),(50,6),(50,11),(50,13),(50,36),(50,44),(50,47),(50,49),(50,50),(50,56),(50,57),(50,58),(50,59),(51,1),(51,2),(51,3),(51,6),(51,11),(51,51),(52,1),(52,2),(52,3),(52,6),(52,11),(52,13),(52,18),(52,19),(52,21),(52,35),(52,51),(52,52),(52,53),(53,1),(53,2),(53,3),(53,6),(53,11),(53,53),(54,1),(54,2),(54,3),(54,6),(54,11),(54,54),(55,1),(55,2),(55,3),(55,6),(55,11),(55,13),(55,54),(55,55),(56,1),(56,2),(56,3),(56,6),(56,11),(56,56),(57,1),(57,2),(57,3),(57,6),(57,11),(57,13),(57,56),(57,57),(58,1),(58,2),(58,3),(58,6),(58,11),(58,58),(59,1),(59,2),(59,3),(59,6),(59,11),(59,13),(59,58),(59,59),(60,1),(60,2),(60,3),(60,5),(60,6),(60,11),(60,13),(60,18),(60,21),(60,33),(60,36),(60,44),(60,47),(60,49),(60,50),(60,53),(60,56),(60,57),(60,58),(60,59),(60,60),(61,1),(61,2),(61,3),(61,6),(61,11),(61,13),(61,36),(61,44),(61,47),(61,61),(62,62),(64,64),(65,1),(65,2),(65,3),(65,6),(65,11),(65,13),(65,18),(65,19),(65,21),(65,36),(65,44),(65,47),(65,49),(65,50),(65,53),(65,56),(65,57),(65,58),(65,59),(65,65),(66,0),(66,1),(66,2),(66,3),(66,5),(66,6),(66,9),(66,11),(66,13),(66,15),(66,16),(66,17),(66,18),(66,19),(66,20),(66,21),(66,22),(66,30),(66,31),(66,32),(66,33),(66,34),(66,35),(66,36),(66,37),(66,38),(66,39),(66,40),(66,41),(66,42),(66,43),(66,44),(66,45),(66,47),(66,48),(66,49),(66,50),(66,51),(66,52),(66,53),(66,54),(66,55),(66,56),(66,57),(66,58),(66,59),(66,60),(66,61),(66,62),(66,64),(66,65),(66,66);
|
||||
INSERT INTO `roleRole` VALUES (0,0),(0,1),(0,2),(0,3),(0,5),(0,6),(0,9),(0,11),(0,13),(0,15),(0,16),(0,17),(0,18),(0,19),(0,20),(0,21),(0,22),(0,30),(0,31),(0,32),(0,33),(0,34),(0,35),(0,36),(0,37),(0,38),(0,39),(0,40),(0,41),(0,42),(0,43),(0,44),(0,45),(0,47),(0,48),(0,49),(0,50),(0,51),(0,52),(0,53),(0,54),(0,55),(0,56),(0,57),(0,58),(0,59),(0,60),(0,61),(0,62),(0,64),(0,65),(0,66),(1,1),(1,2),(1,3),(1,6),(1,11),(2,2),(2,6),(2,11),(3,3),(3,6),(3,11),(5,1),(5,2),(5,3),(5,5),(5,6),(5,11),(5,13),(5,18),(5,21),(5,33),(5,53),(6,6),(9,0),(9,1),(9,2),(9,3),(9,5),(9,6),(9,9),(9,11),(9,13),(9,15),(9,16),(9,17),(9,18),(9,19),(9,20),(9,21),(9,22),(9,30),(9,31),(9,32),(9,33),(9,34),(9,35),(9,36),(9,37),(9,38),(9,39),(9,40),(9,41),(9,42),(9,43),(9,44),(9,45),(9,47),(9,48),(9,49),(9,50),(9,51),(9,52),(9,53),(9,54),(9,55),(9,56),(9,57),(9,58),(9,59),(9,60),(9,61),(9,62),(9,64),(9,65),(9,66),(11,6),(11,11),(13,1),(13,2),(13,3),(13,6),(13,11),(13,13),(15,1),(15,2),(15,3),(15,6),(15,11),(15,15),(15,35),(16,1),(16,2),(16,3),(16,6),(16,11),(16,13),(16,15),(16,16),(16,35),(17,1),(17,2),(17,3),(17,5),(17,6),(17,11),(17,13),(17,15),(17,16),(17,17),(17,18),(17,19),(17,20),(17,21),(17,33),(17,35),(17,36),(17,37),(17,39),(17,44),(17,47),(17,49),(17,50),(17,53),(17,56),(17,57),(17,58),(17,59),(17,64),(17,65),(18,1),(18,2),(18,3),(18,6),(18,11),(18,18),(19,1),(19,2),(19,3),(19,6),(19,11),(19,13),(19,18),(19,19),(19,21),(19,53),(20,1),(20,2),(20,3),(20,6),(20,11),(20,13),(20,15),(20,16),(20,18),(20,19),(20,20),(20,21),(20,35),(20,36),(20,44),(20,47),(20,49),(20,50),(20,53),(20,56),(20,57),(20,58),(20,59),(20,65),(21,1),(21,2),(21,3),(21,6),(21,11),(21,13),(21,18),(21,21),(21,53),(22,1),(22,2),(22,3),(22,6),(22,11),(22,13),(22,18),(22,21),(22,22),(22,53),(30,1),(30,2),(30,3),(30,5),(30,6),(30,11),(30,13),(30,15),(30,16),(30,18),(30,19),(30,20),(30,21),(30,22),(30,30),(30,33),(30,35),(30,36),(30,44),(30,47),(30,49),(30,50),(30,53),(30,56),(30,57),(30,58),(30,59),(30,64),(30,65),(31,1),(31,2),(31,3),(31,6),(31,11),(31,31),(32,1),(32,2),(32,3),(32,6),(32,11),(32,32),(33,33),(34,1),(34,2),(34,3),(34,6),(34,11),(34,13),(34,33),(34,34),(35,1),(35,2),(35,3),(35,6),(35,11),(35,35),(36,1),(36,2),(36,3),(36,6),(36,11),(36,36),(36,44),(36,47),(37,1),(37,2),(37,3),(37,6),(37,11),(37,37),(38,1),(38,2),(38,3),(38,6),(38,11),(38,37),(38,38),(38,64),(39,1),(39,2),(39,3),(39,5),(39,6),(39,11),(39,13),(39,18),(39,21),(39,33),(39,39),(39,53),(39,56),(39,57),(40,1),(40,2),(40,3),(40,6),(40,11),(40,40),(41,1),(41,2),(41,3),(41,6),(41,11),(41,13),(41,35),(41,40),(41,41),(42,1),(42,2),(42,3),(42,6),(42,11),(42,42),(43,1),(43,2),(43,3),(43,6),(43,11),(43,13),(43,42),(43,43),(44,1),(44,2),(44,3),(44,6),(44,11),(44,44),(45,1),(45,2),(45,3),(45,6),(45,11),(45,13),(45,44),(45,45),(47,1),(47,2),(47,3),(47,6),(47,11),(47,47),(48,1),(48,2),(48,3),(48,6),(48,11),(48,13),(48,47),(48,48),(49,1),(49,2),(49,3),(49,6),(49,11),(49,36),(49,44),(49,47),(49,49),(49,58),(50,1),(50,2),(50,3),(50,6),(50,11),(50,13),(50,36),(50,44),(50,47),(50,49),(50,50),(50,56),(50,57),(50,58),(50,59),(51,1),(51,2),(51,3),(51,6),(51,11),(51,51),(52,1),(52,2),(52,3),(52,6),(52,11),(52,13),(52,18),(52,19),(52,21),(52,35),(52,51),(52,52),(52,53),(53,1),(53,2),(53,3),(53,6),(53,11),(53,53),(54,1),(54,2),(54,3),(54,6),(54,11),(54,54),(55,1),(55,2),(55,3),(55,6),(55,11),(55,13),(55,54),(55,55),(56,1),(56,2),(56,3),(56,6),(56,11),(56,56),(57,1),(57,2),(57,3),(57,6),(57,11),(57,13),(57,56),(57,57),(58,1),(58,2),(58,3),(58,6),(58,11),(58,58),(59,1),(59,2),(59,3),(59,6),(59,11),(59,13),(59,58),(59,59),(60,1),(60,2),(60,3),(60,5),(60,6),(60,11),(60,13),(60,18),(60,21),(60,33),(60,36),(60,44),(60,47),(60,49),(60,50),(60,53),(60,56),(60,57),(60,58),(60,59),(60,60),(61,1),(61,2),(61,3),(61,6),(61,11),(61,13),(61,36),(61,44),(61,47),(61,61),(62,62),(64,64),(65,1),(65,2),(65,3),(65,6),(65,11),(65,13),(65,18),(65,19),(65,21),(65,35),(65,36),(65,44),(65,47),(65,49),(65,50),(65,53),(65,56),(65,57),(65,58),(65,59),(65,65),(66,0),(66,1),(66,2),(66,3),(66,5),(66,6),(66,9),(66,11),(66,13),(66,15),(66,16),(66,17),(66,18),(66,19),(66,20),(66,21),(66,22),(66,30),(66,31),(66,32),(66,33),(66,34),(66,35),(66,36),(66,37),(66,38),(66,39),(66,40),(66,41),(66,42),(66,43),(66,44),(66,45),(66,47),(66,48),(66,49),(66,50),(66,51),(66,52),(66,53),(66,54),(66,55),(66,56),(66,57),(66,58),(66,59),(66,60),(66,61),(66,62),(66,64),(66,65),(66,66);
|
||||
/*!40000 ALTER TABLE `roleRole` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
@ -94,7 +94,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:04
|
||||
-- Dump completed on 2019-11-12 10:01:42
|
||||
USE `salix`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -142,7 +142,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:04
|
||||
-- Dump completed on 2019-11-12 10:01:42
|
||||
USE `vn`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -300,7 +300,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:05
|
||||
-- Dump completed on 2019-11-12 10:01:42
|
||||
USE `vn2008`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -345,7 +345,7 @@ UNLOCK TABLES;
|
|||
|
||||
LOCK TABLES `department` WRITE;
|
||||
/*!40000 ALTER TABLE `department` DISABLE KEYS */;
|
||||
INSERT INTO `department` VALUES (1,'VERDNATURA',1,78,1,0,NULL,NULL,NULL,0,0,0,0),(22,'COMPRAS',65,66,NULL,72,596,2,5,0,0,1,0),(23,'CAMARA',41,42,NULL,72,604,2,6,1,0,0,0),(31,'INFORMATICA',11,12,NULL,72,127,3,9,0,0,0,0),(34,'CONTABILIDAD',4,5,NULL,0,NULL,NULL,NULL,0,0,0,0),(35,'FINANZAS',6,7,NULL,0,NULL,NULL,NULL,0,0,0,0),(36,'LABORAL',8,9,NULL,0,NULL,NULL,NULL,0,0,0,0),(37,'PRODUCCION',15,24,NULL,72,230,3,11,0,0,0,0),(38,'SACADO',20,21,NULL,72,230,4,14,1,0,0,0),(39,'ENCAJADO',22,23,NULL,72,230,4,12,1,0,0,0),(41,'ADMINISTRACION',3,10,NULL,72,599,3,8,0,0,0,0),(43,'VENTAS',51,64,NULL,0,NULL,NULL,NULL,0,0,0,0),(44,'GERENCIA',2,25,NULL,72,300,2,7,0,0,0,0),(45,'LOGISTICA',26,37,NULL,72,596,3,19,0,0,0,0),(46,'REPARTO',38,39,NULL,72,659,3,10,0,0,0,0),(48,'ALMACENAJE',40,47,NULL,0,NULL,NULL,NULL,0,0,0,0),(49,'PROPIEDAD',48,75,NULL,72,1008,1,1,0,0,0,0),(52,'CARGA AEREA',27,28,NULL,72,163,4,28,0,0,0,0),(53,'MARKETING Y COMUNICACIÓN',60,61,NULL,72,1238,0,0,0,0,0,0),(54,'ORNAMENTALES',76,77,NULL,72,433,3,21,0,0,0,0),(55,'TALLER NATURAL',68,69,NULL,72,695,2,23,0,0,0,0),(56,'TALLER ARTIFICIAL',70,71,NULL,72,1780,2,24,0,0,0,0),(58,'CAMPOS',73,74,NULL,72,225,2,2,0,0,0,0),(59,'MANTENIMIENTO',49,50,NULL,72,1907,4,16,0,0,0,0),(60,'RECLAMACIONES',58,59,NULL,72,563,3,20,0,0,0,0),(61,'VNH',35,36,NULL,73,1297,3,17,0,0,0,0),(63,'VENTAS FRANCIA',62,63,NULL,72,277,2,27,0,0,0,0),(66,'VERDNAMADRID',31,32,NULL,72,163,3,18,0,0,0,0),(68,'COMPLEMENTOS',43,44,NULL,72,617,3,26,1,0,0,0),(69,'VERDNABARNA',33,34,NULL,74,432,3,22,0,0,0,0),(77,'PALETIZADO',18,19,NULL,72,230,4,15,1,0,0,0),(80,'EQUIPO J VALLES',56,57,NULL,72,693,3,4,0,0,0,0),(86,'LIMPIEZA',13,14,NULL,72,599,0,0,0,0,0,0),(89,'COORDINACION',16,17,NULL,0,NULL,NULL,NULL,1,0,0,0),(90,'TRAILER',29,30,NULL,0,NULL,NULL,NULL,0,0,0,0),(91,'ARTIFICIAL',45,46,NULL,0,NULL,NULL,NULL,1,0,0,0),(92,'EQUIPO SILVERIO',54,55,NULL,0,NULL,NULL,NULL,0,0,0,0),(93,'CONFECCION',67,72,NULL,0,NULL,NULL,NULL,0,0,0,0),(94,'EQUIPO J BROCAL',52,53,NULL,0,NULL,NULL,NULL,0,0,1,0);
|
||||
INSERT INTO `department` VALUES (1,'VERDNATURA',1,78,763,0,NULL,NULL,NULL,0,0,0,0),(22,'COMPRAS',65,66,NULL,72,596,2,5,0,0,1,0),(23,'CAMARA',41,42,NULL,72,604,2,6,1,0,0,0),(31,'INFORMATICA',11,12,NULL,72,127,3,9,0,0,0,0),(34,'CONTABILIDAD',4,5,NULL,0,NULL,NULL,NULL,0,0,0,0),(35,'FINANZAS',6,7,NULL,0,NULL,NULL,NULL,0,0,0,0),(36,'LABORAL',8,9,NULL,0,NULL,NULL,NULL,0,0,0,0),(37,'PRODUCCION',15,24,NULL,72,230,3,11,0,0,0,0),(38,'SACADO',20,21,NULL,72,230,4,14,1,0,0,0),(39,'ENCAJADO',22,23,NULL,72,230,4,12,1,0,0,0),(41,'ADMINISTRACION',3,10,NULL,72,599,3,8,0,0,0,0),(43,'VENTAS',51,64,NULL,0,NULL,NULL,NULL,0,0,0,0),(44,'GERENCIA',2,25,NULL,72,300,2,7,0,0,0,0),(45,'LOGISTICA',26,37,NULL,72,596,3,19,0,0,0,0),(46,'REPARTO',38,39,NULL,72,659,3,10,0,0,0,0),(48,'ALMACENAJE',40,47,NULL,0,NULL,NULL,NULL,0,0,0,0),(49,'PROPIEDAD',48,75,NULL,72,1008,1,1,0,0,0,0),(52,'CARGA AEREA',27,28,NULL,72,163,4,28,0,0,0,0),(53,'MARKETING Y COMUNICACIÓN',60,61,NULL,72,1238,0,0,0,0,0,0),(54,'ORNAMENTALES',76,77,NULL,72,433,3,21,0,0,0,0),(55,'TALLER NATURAL',68,69,NULL,72,695,2,23,0,0,0,0),(56,'TALLER ARTIFICIAL',70,71,NULL,72,1780,2,24,0,0,0,0),(58,'CAMPOS',73,74,NULL,72,225,2,2,0,0,0,0),(59,'MANTENIMIENTO',49,50,NULL,72,1907,4,16,0,0,0,0),(60,'RECLAMACIONES',58,59,NULL,72,563,3,20,0,0,0,0),(61,'VNH',35,36,NULL,73,1297,3,17,0,0,0,0),(63,'VENTAS FRANCIA',62,63,NULL,72,277,2,27,0,0,0,0),(66,'VERDNAMADRID',31,32,NULL,72,163,3,18,0,0,0,0),(68,'COMPLEMENTOS',43,44,NULL,72,617,3,26,1,0,0,0),(69,'VERDNABARNA',33,34,NULL,74,432,3,22,0,0,0,0),(77,'PALETIZADO',18,19,NULL,72,230,4,15,1,0,0,0),(80,'EQUIPO J VALLES',56,57,NULL,72,693,3,4,0,0,0,0),(86,'LIMPIEZA',13,14,NULL,72,599,0,0,0,0,0,0),(89,'COORDINACION',16,17,NULL,0,NULL,NULL,NULL,1,0,0,0),(90,'TRAILER',29,30,NULL,0,NULL,NULL,NULL,0,0,0,0),(91,'ARTIFICIAL',45,46,NULL,0,NULL,NULL,NULL,1,0,0,0),(92,'EQUIPO SILVERIO',54,55,NULL,0,NULL,NULL,NULL,0,0,0,0),(93,'CONFECCION',67,72,NULL,0,NULL,NULL,NULL,0,0,0,0),(94,'EQUIPO J BROCAL',52,53,NULL,0,NULL,NULL,NULL,0,0,1,0);
|
||||
/*!40000 ALTER TABLE `department` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
@ -368,7 +368,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:05
|
||||
-- Dump completed on 2019-11-12 10:01:42
|
||||
USE `bi`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -403,7 +403,7 @@ UNLOCK TABLES;
|
|||
|
||||
LOCK TABLES `tarifa_componentes_series` WRITE;
|
||||
/*!40000 ALTER TABLE `tarifa_componentes_series` DISABLE KEYS */;
|
||||
INSERT INTO `tarifa_componentes_series` VALUES (1,'coste',1,0),(2,'com ventas',1,1),(3,'com compras',1,1),(4,'empresa',1,1),(5,'cliente',0,0),(6,'agencia',0,0),(7,'cartera_comercial',0,1),(8,'cartera_producto',0,1),(9,'maniobra',1,1),(10,'cartera_comprador',0,1),(11,'errores',0,0),(12,'otros',0,0);
|
||||
INSERT INTO `tarifa_componentes_series` VALUES (1,'coste',1,0),(2,'com ventas',1,1),(3,'com compras',1,1),(4,'empresa',1,1),(5,'cliente',0,0),(6,'agencia',0,0),(7,'cartera_comercial',0,1),(8,'cartera_producto',0,1),(9,'maniobra',1,1),(10,'cartera_comprador',0,1),(11,'errores',0,1),(12,'otros',0,1);
|
||||
/*!40000 ALTER TABLE `tarifa_componentes_series` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
@ -416,7 +416,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:05
|
||||
-- Dump completed on 2019-11-12 10:01:43
|
||||
USE `cache`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -454,7 +454,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:05
|
||||
-- Dump completed on 2019-11-12 10:01:43
|
||||
USE `hedera`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -483,16 +483,6 @@ INSERT INTO `imageCollection` VALUES (1,'catalog','Artículo',3840,2160,'Item','
|
|||
/*!40000 ALTER TABLE `imageCollection` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Dumping data for table `tpvConfig`
|
||||
--
|
||||
|
||||
LOCK TABLES `tpvConfig` WRITE;
|
||||
/*!40000 ALTER TABLE `tpvConfig` DISABLE KEYS */;
|
||||
INSERT INTO `tpvConfig` VALUES (1,978,1,0,2000,4,'https://sis.redsys.es/sis/realizarPago',0,'https://sis-t.redsys.es:25443/sis/realizarPago','sq7HjrUOBfKmC576ILgskD5srU870gJ7',NULL);
|
||||
/*!40000 ALTER TABLE `tpvConfig` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Dumping data for table `tpvError`
|
||||
--
|
||||
|
@ -522,7 +512,7 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:05
|
||||
-- Dump completed on 2019-11-12 10:01:43
|
||||
USE `postgresql`;
|
||||
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
|
||||
--
|
||||
|
@ -547,7 +537,7 @@ USE `postgresql`;
|
|||
|
||||
LOCK TABLES `calendar_labour_type` WRITE;
|
||||
/*!40000 ALTER TABLE `calendar_labour_type` DISABLE KEYS */;
|
||||
INSERT INTO `calendar_labour_type` VALUES (1,'Horario general','00:20:00',40),(2,'Horario 35h/semana','00:20:00',35),(3,'Horario 20h/semana','00:00:00',20),(4,'Festivo y Fin de semana','00:00:00',0),(5,'Horario 30h/semana','00:20:00',30),(6,'Horario 25h/semana','00:20:00',25),(7,'Vacaciones trabajadas','00:00:00',0),(8,'Vacaciones','00:00:00',0),(9,'Horario 26h/semana','00:20:00',26),(10,'Horario 28h/semana','00:20:00',28),(11,'Horario 8h/semana','00:00:00',8),(12,'Horario 16h/semana','00:00:00',16),(13,'Horario 32h/semana','00:20:00',32),(14,'Horario 24h/semana','00:20:00',24),(15,'Horario 10h/semana','00:00:00',10),(16,'Horario 27,5h/semana','00:20:00',28),(17,'Horario 13,5h/semana','00:20:00',14),(18,'Horario 31h/semana',NULL,31),(19,'Horario 21,5h/semana',NULL,22),(20,'Horario 34h/semana',NULL,34),(21,'Horario 17h/semana',NULL,17),(22,'Horario 18h/semana',NULL,18),(23,'Horario 37,5 h/semana',NULL,38),(24,'Horario 29 h/semana',NULL,29),(25,'Horario 12h/semana',NULL,12),(26,'Horario 10h/semana',NULL,10),(27,'Horario 15h/semana',NULL,15),(28,'Horario 9h/semana',NULL,9),(29,'Horario 23h/semana',NULL,23),(30,'Horario 21h/semana',NULL,21),(31,'Horario 39h/semana',NULL,39),(32,'Horario 22/semana',NULL,22);
|
||||
INSERT INTO `calendar_labour_type` VALUES (1,'Horario general','00:20:00',40,0),(2,'Horario 35h/semana','00:20:00',35,1),(3,'Horario 20h/semana','00:00:00',20,1),(4,'Festivo y Fin de semana','00:00:00',0,1),(5,'Horario 30h/semana','00:20:00',30,1),(6,'Horario 25h/semana','00:20:00',25,1),(7,'Vacaciones trabajadas','00:00:00',0,1),(8,'Vacaciones','00:00:00',0,1),(9,'Horario 26h/semana','00:20:00',26,1),(10,'Horario 28h/semana','00:20:00',28,1),(11,'Horario 8h/semana','00:00:00',8,1),(12,'Horario 16h/semana','00:00:00',16,1),(13,'Horario 32h/semana','00:20:00',32,1),(14,'Horario 24h/semana','00:20:00',24,1),(15,'Horario 10h/semana','00:00:00',10,1),(16,'Horario 27,5h/semana','00:20:00',28,1),(17,'Horario 13,5h/semana','00:20:00',14,1),(18,'Horario 31h/semana',NULL,31,1),(19,'Horario 21,5h/semana',NULL,22,1),(20,'Horario 34h/semana',NULL,34,1),(21,'Horario 17h/semana',NULL,17,1),(22,'Horario 18h/semana',NULL,18,1),(23,'Horario 37,5 h/semana',NULL,38,1),(24,'Horario 29 h/semana',NULL,29,1),(25,'Horario 12h/semana',NULL,12,1),(26,'Horario 10h/semana',NULL,10,1),(27,'Horario 15h/semana',NULL,15,1),(28,'Horario 9h/semana',NULL,9,1),(29,'Horario 23h/semana',NULL,23,1),(30,'Horario 21h/semana',NULL,21,1),(31,'Horario 39h/semana',NULL,39,1),(32,'Horario 22/semana',NULL,22,1);
|
||||
/*!40000 ALTER TABLE `calendar_labour_type` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
@ -597,7 +587,7 @@ UNLOCK TABLES;
|
|||
|
||||
LOCK TABLES `workcenter` WRITE;
|
||||
/*!40000 ALTER TABLE `workcenter` DISABLE KEYS */;
|
||||
INSERT INTO `workcenter` VALUES (1,'Silla',20,1024,1),(2,'Mercaflor',19,NULL,NULL),(3,'Marjales',26,20007,NULL),(4,'VNH',NULL,NULL,3),(5,'Madrid',28,2851,5),(6,'Vilassar',88,88031,2),(7,'Tenerife',NULL,NULL,10),(8,'Silla-Agrario',26,2,NULL);
|
||||
INSERT INTO `workcenter` VALUES (1,'Silla',20,1026,1),(2,'Mercaflor',19,NULL,NULL),(3,'Marjales',26,20007,NULL),(4,'VNH',NULL,NULL,3),(5,'Madrid',28,2851,5),(6,'Vilassar',88,88031,2),(7,'Tenerife',NULL,NULL,10),(8,'Silla-Agrario',26,2,NULL);
|
||||
/*!40000 ALTER TABLE `workcenter` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
@ -610,4 +600,4 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-10-29 8:19:06
|
||||
-- Dump completed on 2019-11-12 10:01:43
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1;
|
||||
ALTER TABLE `vn2008`.`Consignatarios` AUTO_INCREMENT = 1;
|
||||
ALTER TABLE `vn`.`address` AUTO_INCREMENT = 1;
|
||||
ALTER TABLE `vn`.`zoneGeo` AUTO_INCREMENT = 1;
|
||||
|
||||
INSERT INTO `vn`.`ticketConfig` (`id`, `scopeDays`)
|
||||
VALUES
|
||||
('1', '6');
|
||||
|
||||
|
||||
INSERT INTO `account`.`mailConfig` (`id`, `domain`)
|
||||
VALUES
|
||||
('1', 'verdnatura.es');
|
||||
|
@ -14,16 +14,20 @@ INSERT INTO `account`.`user`(`id`,`name`, `nickname`, `password`,`role`,`active`
|
|||
SELECT id, name, CONCAT(name, 'Nick'),MD5('nightmare'), id, 1, CONCAT(name, '@mydomain.com'), 'es'
|
||||
FROM `account`.`role`;
|
||||
|
||||
INSERT INTO `vn2008`.`Trabajadores`(`Id_Trabajador`,`CodigoTrabajador`, `Nombre`, `Apellidos`, `user_id`, `boss`)
|
||||
INSERT INTO `vn`.`worker`(`id`,`code`, `firstName`, `lastName`, `userFk`, `bossFk`)
|
||||
SELECT id,UPPER(LPAD(role, 3, '0')), name, name, id, 9
|
||||
FROM `vn`.`user`;
|
||||
|
||||
UPDATE `vn2008`.`Trabajadores` SET boss = NULL WHERE Id_Trabajador = 20;
|
||||
UPDATE `vn2008`.`Trabajadores` SET boss = 20
|
||||
WHERE Id_Trabajador = 1 OR Id_Trabajador = 9;
|
||||
UPDATE `vn`.`worker` SET bossFk = NULL WHERE id = 20;
|
||||
UPDATE `vn`.`worker` SET bossFk = 20
|
||||
WHERE id = 1 OR id = 9;
|
||||
|
||||
DELETE FROM `vn`.`worker` WHERE name ='customer';
|
||||
DELETE FROM `vn`.`worker` WHERE firstName ='customer';
|
||||
|
||||
INSERT INTO `hedera`.`tpvConfig`(`id`, `currency`, `terminal`, `transactionType`, `maxAmount`, `employeeFk`, `testUrl`)
|
||||
VALUES
|
||||
(1, 978, 1, 0, 2000, 9, 0);
|
||||
|
||||
INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lang`)
|
||||
VALUES
|
||||
(101, 'BruceWayne', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'BruceWayne@mydomain.com', 'es'),
|
||||
|
@ -39,13 +43,13 @@ INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lan
|
|||
(111, 'Missing', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'es'),
|
||||
(112, 'Trash', 'ac754a330530832ba1bf7687f577da91', 2, 0, NULL, 'es');
|
||||
|
||||
INSERT INTO `vn2008`.`Trabajadores`(`CodigoTrabajador`, `Id_Trabajador`, `Nombre`, `Apellidos`, `user_id`,`boss`)
|
||||
INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`)
|
||||
VALUES
|
||||
('LGN', 106, 'David Charles', 'Haller', 106, 19),
|
||||
('ANT', 107, 'Hank' , 'Pym' , 107, 19),
|
||||
('DCX', 110, 'Charles' , 'Xavier', 108, 19),
|
||||
('HLK', 109, 'Bruce' , 'Banner', 109, 19),
|
||||
('JJJ', 108, 'Jessica' , 'Jones' , 110, 19);
|
||||
(106, 'LGN', 'David Charles', 'Haller', 106, 19),
|
||||
(107, 'ANT', 'Hank' , 'Pym' , 107, 19),
|
||||
(108, 'DCX', 'Charles' , 'Xavier', 108, 19),
|
||||
(109, 'HLK', 'Bruce' , 'Banner', 109, 19),
|
||||
(110, 'JJJ', 'Jessica' , 'Jones' , 110, 19);
|
||||
|
||||
INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`)
|
||||
VALUES
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -80,7 +80,6 @@ dump_tables ${TABLES[@]}
|
|||
TABLES=(
|
||||
hedera
|
||||
imageCollection
|
||||
tpvConfig
|
||||
tpvError
|
||||
tpvResponse
|
||||
)
|
||||
|
|
|
@ -185,26 +185,27 @@ let actions = {
|
|||
isVisible: function(selector) {
|
||||
return this.wait(selector)
|
||||
.evaluate(elementSelector => {
|
||||
const selectorMatches = document.querySelectorAll(elementSelector);
|
||||
const element = selectorMatches[0];
|
||||
let selectorMatches = document.querySelectorAll(elementSelector);
|
||||
let element = selectorMatches[0];
|
||||
|
||||
if (selectorMatches.length > 1)
|
||||
throw new Error(`multiple matches of ${elementSelector} found`);
|
||||
|
||||
let isVisible = false;
|
||||
if (element) {
|
||||
const eventHandler = event => {
|
||||
let eventHandler = event => {
|
||||
event.preventDefault();
|
||||
isVisible = true;
|
||||
};
|
||||
element.addEventListener('mouseover', eventHandler);
|
||||
const rect = element.getBoundingClientRect();
|
||||
const x = rect.left + rect.width / 2;
|
||||
const y = rect.top + rect.height / 2;
|
||||
const elementInCenter = document.elementFromPoint(x, y);
|
||||
const elementInTopLeft = document.elementFromPoint(rect.left, rect.top);
|
||||
const elementInBottomRight = document.elementFromPoint(rect.right, rect.bottom);
|
||||
const e = new MouseEvent('mouseover', {
|
||||
let rect = element.getBoundingClientRect();
|
||||
let x = rect.left + rect.width / 2;
|
||||
let y = rect.top + rect.height / 2;
|
||||
let elementInCenter = document.elementFromPoint(x, y);
|
||||
let elementInTopLeft = document.elementFromPoint(rect.left, rect.top);
|
||||
let elementInBottomRight = document.elementFromPoint(rect.right, rect.bottom);
|
||||
|
||||
let e = new MouseEvent('mouseover', {
|
||||
view: window,
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
|
@ -420,9 +421,19 @@ let actions = {
|
|||
}, selector);
|
||||
},
|
||||
|
||||
waitForSpinnerLoad: function() {
|
||||
return this.waitForClassNotPresent('vn-spinner > div', 'is-active');
|
||||
waitForStylePresent: function(selector, property, value) {
|
||||
return this.wait((selector, property, value) => {
|
||||
const element = document.querySelector(selector);
|
||||
return element.style[property] == value;
|
||||
}, selector, property, value);
|
||||
},
|
||||
|
||||
waitForSpinnerLoad: function() {
|
||||
return this.wait(() => {
|
||||
const element = document.querySelector('vn-spinner > div');
|
||||
return element.style.display == 'none';
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
for (let name in actions) {
|
||||
|
|
|
@ -191,7 +191,8 @@ export default {
|
|||
closeItemSummaryPreview: '.vn-popup.shown',
|
||||
fieldsToShowButton: 'vn-item-index vn-table > div > div > vn-icon-button[icon="menu"]',
|
||||
fieldsToShowForm: '.vn-dialog.shown form',
|
||||
firstItemImage: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1)',
|
||||
firstItemImage: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1) > img',
|
||||
firstItemImageTd: 'vn-item-index vn-table a:nth-child(1) vn-td:nth-child(1)',
|
||||
firstItemId: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(2)',
|
||||
idCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(2) > vn-check',
|
||||
stemsCheckbox: '.vn-dialog.shown form vn-horizontal:nth-child(3) > vn-check',
|
||||
|
@ -367,7 +368,6 @@ export default {
|
|||
shipButton: 'vn-ticket-descriptor vn-icon[icon="icon-stowaway"]',
|
||||
thursdayButton: '.vn-popup.shown vn-tool-bar > vn-button:nth-child(4)',
|
||||
saturdayButton: '.vn-popup.shown vn-tool-bar > vn-button:nth-child(6)',
|
||||
closeStowawayDialog: '.vn-dialog.shown button[class="close"]',
|
||||
acceptDeleteButton: '.vn-dialog.shown button[response="accept"]',
|
||||
acceptChangeHourButton: '.vn-dialog.shown button[response="accept"]',
|
||||
descriptorDeliveryDate: 'vn-ticket-descriptor > div > div.body > div.attributes > vn-label-value:nth-child(6) > section > span',
|
||||
|
@ -441,7 +441,7 @@ export default {
|
|||
secondSaleIdInput: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(4) > vn-autocomplete input',
|
||||
secondSaleIdAutocomplete: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(4) > vn-autocomplete',
|
||||
secondSaleQuantity: 'vn-ticket-sale vn-table vn-tr:nth-child(2) vn-input-number input',
|
||||
secondSaleConceptCell: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(2) > vn-td-editable:nth-child(6)',
|
||||
secondSaleConceptCell: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(2) > vn-td-editable:nth-child(6) > div',
|
||||
secondSaleConceptInput: 'vn-ticket-sale vn-table vn-tr:nth-child(2) > vn-td-editable.ng-isolate-scope.selected vn-textfield input',
|
||||
totalImport: 'vn-ticket-sale > vn-vertical > vn-card > vn-vertical > vn-horizontal > vn-one > p:nth-child(3) > strong',
|
||||
selectAllSalesCheckbox: 'vn-ticket-sale vn-thead vn-check',
|
||||
|
|
|
@ -138,6 +138,7 @@ describe('Client Edit fiscalData path', () => {
|
|||
it(`should click on the 1st edit icon to confirm EQtax is checked`, async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.firstEditAddress)
|
||||
.waitForSpinnerLoad()
|
||||
.checkboxState(selectors.clientAddresses.equalizationTaxCheckbox);
|
||||
|
||||
expect(result).toBe('checked');
|
||||
|
@ -148,6 +149,7 @@ describe('Client Edit fiscalData path', () => {
|
|||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||
.waitToClick(selectors.clientAddresses.secondEditAddress)
|
||||
.waitForSpinnerLoad()
|
||||
.checkboxState(selectors.clientAddresses.equalizationTaxCheckbox);
|
||||
|
||||
expect(result).toBe('checked');
|
||||
|
@ -293,6 +295,7 @@ describe('Client Edit fiscalData path', () => {
|
|||
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => {
|
||||
const result = await nightmare
|
||||
.waitToClick(selectors.clientAddresses.firstEditAddress)
|
||||
.waitForTextInInput(selectors.clientAddresses.cityInput, 'Silla')
|
||||
.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox)
|
||||
.waitToClick(selectors.clientAddresses.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('Client add address notes path', () => {
|
|||
.waitToClick(selectors.clientAddresses.saveButton)
|
||||
.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Observation type cannot be blank');
|
||||
expect(result).toEqual('Some fields are invalid');
|
||||
});
|
||||
|
||||
it('should not save an observation type without description', async() => {
|
||||
|
|
|
@ -13,6 +13,7 @@ describe('Item create niche path', () => {
|
|||
|
||||
it(`should click create a new niche and delete a former one`, async() => {
|
||||
const result = await nightmare
|
||||
.waitForTextInInput(`${selectors.itemNiches.firstWarehouseAutocomplete} input`, 'Warehouse One')
|
||||
.waitToClick(selectors.itemNiches.addNicheButton)
|
||||
.waitToClick(selectors.itemNiches.secondNicheRemoveButton)
|
||||
.autocompleteSearch(selectors.itemNiches.thirdWarehouseAutocomplete, 'Warehouse Two')
|
||||
|
|
|
@ -27,7 +27,7 @@ describe('Item regularize path', () => {
|
|||
expect(userLocalWarehouse).toContain('Warehouse Four');
|
||||
});
|
||||
|
||||
it('should search for the item', async() => {
|
||||
it('should search for an item', async() => {
|
||||
const resultCount = await nightmare
|
||||
.clearInput(selectors.itemsIndex.searchItemInput)
|
||||
.write(selectors.itemsIndex.searchItemInput, 'Ranged weapon pistol 9mm')
|
||||
|
|
|
@ -42,7 +42,8 @@ describe('Item index path', () => {
|
|||
.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton)
|
||||
.waitToClick(selectors.itemsIndex.searchIcon)
|
||||
.wait(selectors.itemsIndex.searchResult)
|
||||
.isVisible(selectors.itemsIndex.firstItemImage);
|
||||
.waitImgLoad(selectors.itemsIndex.firstItemImage)
|
||||
.isVisible(selectors.itemsIndex.firstItemImageTd);
|
||||
|
||||
expect(imageVisible).toBeTruthy();
|
||||
});
|
||||
|
|
|
@ -57,8 +57,8 @@ describe('Ticket List sale path', () => {
|
|||
|
||||
expect(result).toEqual('Data saved!');
|
||||
});
|
||||
|
||||
it('should update the description of the new sale', async() => {
|
||||
// #1865
|
||||
xit('should update the description of the new sale', async() => {
|
||||
const result = await nightmare
|
||||
.focusElement(selectors.ticketSales.secondSaleConceptCell)
|
||||
.write(selectors.ticketSales.secondSaleConceptInput, 'Aegis of Valor\u000d')
|
||||
|
|
|
@ -101,7 +101,10 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it('should open the add stowaway dialog', async() => {
|
||||
const isVisible = await nightmare
|
||||
.waitForSpinnerLoad()
|
||||
.wait(() => {
|
||||
let element = document.querySelector('vn-ticket-descriptor');
|
||||
return element.$ctrl.canShowStowaway === true;
|
||||
})
|
||||
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
||||
.waitToClick(selectors.ticketDescriptor.moreMenuAddStowaway)
|
||||
.wait(selectors.ticketDescriptor.addStowawayDialogFirstTicket)
|
||||
|
@ -127,7 +130,6 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it(`should navigate back to the added ticket using the descriptors ship button`, async() => {
|
||||
const url = await nightmare
|
||||
.waitToClick(selectors.ticketDescriptor.closeStowawayDialog)
|
||||
.waitToClick(selectors.ticketDescriptor.shipButton)
|
||||
.waitForURL('#!/ticket/17/summary')
|
||||
.parsedUrl();
|
||||
|
|
|
@ -15,6 +15,7 @@ describe('Ticket services path', () => {
|
|||
|
||||
it('should find the add descripton button disabled for this user role', async() => {
|
||||
const result = await nightmare
|
||||
.waitForClassPresent(selectors.ticketService.firstAddDescriptionButton, 'disabled')
|
||||
.waitToClick(selectors.ticketService.addServiceButton)
|
||||
.wait(selectors.ticketService.firstAddDescriptionButton)
|
||||
.isDisabled(selectors.ticketService.firstAddDescriptionButton);
|
||||
|
@ -129,7 +130,7 @@ describe('Ticket services path', () => {
|
|||
expect(result).toEqual('Data saved!');
|
||||
});
|
||||
|
||||
it(`should confirm the service wasn't sucessfully removed`, async() => {
|
||||
it(`should confirm the service was removed`, async() => {
|
||||
const result = await nightmare
|
||||
.reloadSection('ticket.card.service')
|
||||
.waitForNumberOfElements(selectors.ticketService.serviceLine, 0)
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('claim Summary path', () => {
|
|||
|
||||
it(`should display details from the claim and it's client on the top of the header`, async() => {
|
||||
let result = await nightmare
|
||||
.waitForSpinnerLoad()
|
||||
.waitForTextInElement(selectors.claimSummary.header, 'Tony Stark')
|
||||
.waitToGetProperty(selectors.claimSummary.header, 'innerText');
|
||||
|
||||
expect(result).toContain('4 -');
|
||||
|
|
|
@ -140,7 +140,14 @@ describe('InvoiceOut descriptor path', () => {
|
|||
|
||||
it(`should check the invoiceOut booked in the summary data`, async() => {
|
||||
let today = new Date();
|
||||
let expectedDate = `${today.getDate()}/${(today.getMonth() + 1)}/${today.getFullYear()}`;
|
||||
|
||||
let day = today.getDate();
|
||||
if (day < 10) day = `0${day}`;
|
||||
|
||||
let month = (today.getMonth() + 1);
|
||||
if (month < 10) month = `0${month}`;
|
||||
|
||||
let expectedDate = `${day}/${month}/${today.getFullYear()}`;
|
||||
|
||||
const result = await nightmare
|
||||
.waitToGetProperty(selectors.invoiceOutSummary.bookedLabel, 'innerText');
|
||||
|
|
|
@ -40,6 +40,11 @@ export default class Popup extends Component {
|
|||
if (this.shown) return;
|
||||
this._shown = true;
|
||||
|
||||
if (this.closeTimeout) {
|
||||
this.$timeout.cancel(this.closeTimeout);
|
||||
this.onClose();
|
||||
}
|
||||
|
||||
let linkFn = this.$compile(this.template);
|
||||
this.$contentScope = this.$.$new();
|
||||
this.popup = linkFn(this.$contentScope, null,
|
||||
|
@ -51,8 +56,7 @@ export default class Popup extends Component {
|
|||
classList.add(this.displayMode);
|
||||
classList.add(...this.constructor.$classNames);
|
||||
|
||||
if (!this.transitionTimeout)
|
||||
this.document.body.appendChild(this.popup);
|
||||
this.document.body.appendChild(this.popup);
|
||||
|
||||
this.keyDownHandler = e => this.onkeyDown(e);
|
||||
this.document.addEventListener('keydown', this.keyDownHandler);
|
||||
|
@ -60,9 +64,9 @@ export default class Popup extends Component {
|
|||
this.deregisterCallback = this.$transitions.onStart({},
|
||||
() => this.hide());
|
||||
|
||||
this.$timeout.cancel(this.transitionTimeout);
|
||||
this.transitionTimeout = this.$timeout(() => {
|
||||
this.transitionTimeout = null;
|
||||
this.$timeout.cancel(this.showTimeout);
|
||||
this.showTimeout = this.$timeout(() => {
|
||||
this.showTimeout = null;
|
||||
classList.add('shown');
|
||||
}, 10);
|
||||
|
||||
|
@ -74,35 +78,29 @@ export default class Popup extends Component {
|
|||
*/
|
||||
hide() {
|
||||
if (!this.shown) return;
|
||||
this._shown = false;
|
||||
|
||||
this.document.removeEventListener('keydown', this.keyDownHandler);
|
||||
this.keyDownHandler = null;
|
||||
|
||||
if (this.deregisterCallback) {
|
||||
this.deregisterCallback();
|
||||
this.deregisterCallback = null;
|
||||
}
|
||||
this.deregisterCallback();
|
||||
this.deregisterCallback = null;
|
||||
|
||||
this.popup.classList.remove('shown');
|
||||
|
||||
this.$timeout.cancel(this.transitionTimeout);
|
||||
this.transitionTimeout = this.$timeout(
|
||||
this.closeTimeout = this.$timeout(
|
||||
() => this.onClose(), 200);
|
||||
|
||||
this.lastEvent = null;
|
||||
this._shown = false;
|
||||
this.emit('closeStart');
|
||||
}
|
||||
|
||||
onClose() {
|
||||
this.transitionTimeout = null;
|
||||
this.document.body.removeChild(this.popup);
|
||||
|
||||
this.$contentScope.$destroy();
|
||||
this.closeTimeout = null;
|
||||
this.popup.remove();
|
||||
this.$contentScope.$destroy();
|
||||
this.popup = null;
|
||||
this.windowEl = null;
|
||||
|
||||
this.emit('close');
|
||||
}
|
||||
|
||||
|
|
|
@ -181,9 +181,9 @@ function e2eOnly() {
|
|||
})
|
||||
.on('jasmineDone', function() {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
nightmare.end(() => {});
|
||||
}));
|
||||
})
|
||||
);
|
||||
}
|
||||
e2eOnly.description = `Runs the e2e tests only`;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"State cannot be blank": "State cannot be blank",
|
||||
"Cannot be blank": "Cannot be blank",
|
||||
"Observation type cannot be blank": "Observation type cannot be blank",
|
||||
"The credit must be an integer greater than or equal to zero": "The credit must be an integer greater than or equal to zero",
|
||||
"The grade must be an integer greater than or equal to zero": "The grade must be an integer greater than or equal to zero",
|
||||
"Invalid email": "Invalid email",
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"Worker cannot be blank": "El trabajador no puede estar en blanco",
|
||||
"Cannot change the payment method if no salesperson": "No se puede cambiar la forma de pago si no hay comercial asignado",
|
||||
"can't be blank": "El campo no puede estar vacío",
|
||||
"Observation type cannot be blank": "El tipo de observación no puede estar en blanco",
|
||||
"Observation type must be unique": "El tipo de observación no puede repetirse",
|
||||
"The credit must be an integer greater than or equal to zero": "The credit must be an integer greater than or equal to zero",
|
||||
"The grade must be similar to the last one": "El grade debe ser similar al último",
|
||||
|
|
|
@ -18,7 +18,12 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.landsThatDay = async filter => {
|
||||
let query = `CALL vn.zone_getAvailable(?, ?);`;
|
||||
let query = `
|
||||
CALL vn.zone_getAgency(?, ?);
|
||||
SELECT * FROM tmp.zoneGetAgency;
|
||||
DROP TEMPORARY TABLE tmp.zoneGetAgency;
|
||||
`;
|
||||
|
||||
let result = await Self.rawSql(query, [filter.addressFk, filter.landed]);
|
||||
|
||||
return result[1];
|
||||
|
|
|
@ -56,10 +56,10 @@
|
|||
"model": "ZoneExclusion",
|
||||
"foreignKey": "zoneFk"
|
||||
},
|
||||
"warehouses": {
|
||||
"type": "hasMany",
|
||||
"model": "ZoneWarehouse",
|
||||
"foreignKey": "zoneFk"
|
||||
"warehouses": {
|
||||
"type": "hasMany",
|
||||
"model": "ZoneWarehouse",
|
||||
"foreignKey": "zoneFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -37,7 +37,6 @@ class Controller {
|
|||
}
|
||||
|
||||
onDrop($event) {
|
||||
console.log($event);
|
||||
const files = $event.dataTransfer.files;
|
||||
this.setDefaultParams().then(() => {
|
||||
this.dms.files = files;
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('Client activeWorkersWithRole', () => {
|
|||
|
||||
let isBuyer = await app.models.Account.hasRole(result[0].id, 'buyer');
|
||||
|
||||
expect(result.length).toEqual(11);
|
||||
expect(result.length).toEqual(12);
|
||||
expect(isBuyer).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
module.exports = function(Self) {
|
||||
Self.validatesPresenceOf('observationTypeFk', {
|
||||
message: 'Observation type cannot be blank'
|
||||
});
|
||||
|
||||
Self.validateAsync('typeUnique', typeIsUnique, {
|
||||
message: 'Observation type must be unique'
|
||||
});
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
"description": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"observationTypeFk": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
|
|
@ -140,7 +140,8 @@
|
|||
data="types"
|
||||
ng-model="observation.observationTypeFk"
|
||||
show-field="description"
|
||||
label="Observation type">
|
||||
label="Observation type"
|
||||
rule="AddressObservation">
|
||||
</vn-autocomplete>
|
||||
<vn-textfield
|
||||
vn-two
|
||||
|
|
|
@ -29,7 +29,6 @@ export default class Controller {
|
|||
this.$.watcher.realSubmit()
|
||||
.then(() => this.$.model.save(true))
|
||||
.then(() => {
|
||||
this.$.watcher.setPristine();
|
||||
this.$.watcher.notifySaved();
|
||||
this.card.reload();
|
||||
this.goToIndex();
|
||||
|
|
|
@ -49,10 +49,7 @@ export default class Controller {
|
|||
returnDialogEt(response) {
|
||||
if (response === 'accept') {
|
||||
this.$http.patch(`Clients/${this.client.id}/addressesPropagateRe`, {isEqualizated: this.client.isEqualizated}).then(
|
||||
res => {
|
||||
if (res.data)
|
||||
this.vnApp.showMessage(this.translate.instant('Equivalent tax spreaded'));
|
||||
}
|
||||
() => this.vnApp.showMessage(this.translate.instant('Equivalent tax spreaded'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,8 +46,7 @@ class Controller {
|
|||
this.getShipped({
|
||||
landed: this.ticket.landed,
|
||||
addressFk: value,
|
||||
agencyModeFk: this.ticket.agencyModeFk,
|
||||
warehouseFk: this.ticket.warehouseFk
|
||||
agencyModeFk: this.ticket.agencyModeFk
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -78,8 +77,7 @@ class Controller {
|
|||
this.getLanded({
|
||||
shipped: value,
|
||||
addressFk: this.ticket.addressFk,
|
||||
agencyModeFk: this.ticket.agencyModeFk,
|
||||
warehouseFk: this.ticket.warehouseFk
|
||||
agencyModeFk: this.ticket.agencyModeFk
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -92,8 +90,7 @@ class Controller {
|
|||
this.getShipped({
|
||||
landed: value,
|
||||
addressFk: this.ticket.addressFk,
|
||||
agencyModeFk: this.ticket.agencyModeFk,
|
||||
warehouseFk: this.ticket.warehouseFk
|
||||
agencyModeFk: this.ticket.agencyModeFk
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -107,8 +104,7 @@ class Controller {
|
|||
this.getLanded({
|
||||
shipped: this.ticket.shipped,
|
||||
addressFk: this.ticket.addressFk,
|
||||
agencyModeFk: value,
|
||||
warehouseFk: this.ticket.warehouseFk
|
||||
agencyModeFk: value
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -160,10 +156,7 @@ class Controller {
|
|||
this.ticket.agencyModeFk = null;
|
||||
const query = `Zones/${zoneId}`;
|
||||
this.$http.get(query).then(res => {
|
||||
if (res.data) {
|
||||
this.ticket.agencyModeFk = res.data.agencyModeFk;
|
||||
this.ticket.warehouseFk = res.data.warehouseFk;
|
||||
}
|
||||
this.ticket.agencyModeFk = res.data.agencyModeFk;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -205,7 +198,6 @@ class Controller {
|
|||
if (res.data) {
|
||||
this.ticket.zoneFk = res.data.zoneFk;
|
||||
this.ticket.agencyModeFk = res.data.agencyModeFk;
|
||||
this.ticket.warehouseFk = res.data.warehouseFk;
|
||||
this.ticket.landed = res.data.landed;
|
||||
this.ticket.shipped = params.shipped;
|
||||
} else {
|
||||
|
@ -226,7 +218,6 @@ class Controller {
|
|||
if (res.data) {
|
||||
this.ticket.zoneFk = res.data.zoneFk;
|
||||
this.ticket.agencyModeFk = res.data.agencyModeFk;
|
||||
this.ticket.warehouseFk = res.data.warehouseFk;
|
||||
this.ticket.landed = params.landed;
|
||||
this.ticket.shipped = res.data.shipped;
|
||||
} else {
|
||||
|
|
|
@ -72,8 +72,7 @@ describe('Ticket', () => {
|
|||
const spectedResult = {
|
||||
landed: landed,
|
||||
addressFk: 100,
|
||||
agencyModeFk: 7,
|
||||
warehouseFk: 1
|
||||
agencyModeFk: 7
|
||||
};
|
||||
controller.landed = landed;
|
||||
|
||||
|
@ -99,8 +98,7 @@ describe('Ticket', () => {
|
|||
const spectedResult = {
|
||||
landed: landed,
|
||||
addressFk: 121,
|
||||
agencyModeFk: 7,
|
||||
warehouseFk: 2
|
||||
agencyModeFk: 7
|
||||
};
|
||||
controller.landed = landed;
|
||||
|
||||
|
@ -125,8 +123,7 @@ describe('Ticket', () => {
|
|||
const spectedResult = {
|
||||
shipped: shipped,
|
||||
addressFk: 121,
|
||||
agencyModeFk: 7,
|
||||
warehouseFk: 1
|
||||
agencyModeFk: 7
|
||||
};
|
||||
controller.shipped = shipped;
|
||||
|
||||
|
@ -150,8 +147,7 @@ describe('Ticket', () => {
|
|||
const spectedResult = {
|
||||
landed: landed,
|
||||
addressFk: 121,
|
||||
agencyModeFk: 7,
|
||||
warehouseFk: 1
|
||||
agencyModeFk: 7
|
||||
};
|
||||
controller.landed = landed;
|
||||
|
||||
|
@ -176,8 +172,7 @@ describe('Ticket', () => {
|
|||
const spectedResult = {
|
||||
shipped: shipped,
|
||||
addressFk: 121,
|
||||
agencyModeFk: agencyModeId,
|
||||
warehouseFk: 1
|
||||
agencyModeFk: agencyModeId
|
||||
};
|
||||
controller.ticket.shipped = shipped;
|
||||
controller.agencyModeId = 8;
|
||||
|
@ -192,8 +187,7 @@ describe('Ticket', () => {
|
|||
const spectedResult = {
|
||||
landed: landed,
|
||||
addressFk: 121,
|
||||
agencyModeFk: agencyModeId,
|
||||
warehouseFk: 1
|
||||
agencyModeFk: agencyModeId
|
||||
};
|
||||
controller.ticket.landed = landed;
|
||||
controller.agencyModeId = 7;
|
||||
|
@ -261,18 +255,13 @@ describe('Ticket', () => {
|
|||
describe('onChangeZone()', () => {
|
||||
it('should return an available zone', async() => {
|
||||
const zoneId = 5;
|
||||
const landed = new Date();
|
||||
controller._ticket = {
|
||||
id: 1,
|
||||
landed: landed,
|
||||
addressFk: 121,
|
||||
warehouseFk: 1
|
||||
};
|
||||
|
||||
$httpBackend.when('GET', `Zones/${zoneId}`).respond(200);
|
||||
const agencyModeFk = 8;
|
||||
$httpBackend.when('GET', `Zones/${zoneId}`).respond(200, {agencyModeFk});
|
||||
$httpBackend.expect('GET', `Zones/${zoneId}`);
|
||||
controller.onChangeZone(zoneId);
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(controller.ticket.agencyModeFk).toEqual(agencyModeFk);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
import ngModule from '../module';
|
||||
import Component from 'core/lib/component';
|
||||
|
||||
class Controller {
|
||||
constructor($state, $scope, $http, vnApp, $translate, aclService) {
|
||||
this.$scope = $scope;
|
||||
this.$state = $state;
|
||||
this.$http = $http;
|
||||
this.vnApp = vnApp;
|
||||
this.$translate = $translate;
|
||||
class Controller extends Component {
|
||||
constructor($element, $, aclService) {
|
||||
super($element, $);
|
||||
this.aclService = aclService;
|
||||
this.moreOptions = [
|
||||
{name: 'Add turn', callback: this.showAddTurnDialog},
|
||||
|
@ -46,7 +43,7 @@ class Controller {
|
|||
return;
|
||||
}
|
||||
this.newShipped = this.ticket.shipped;
|
||||
this.$scope.changeShippedDialog.show();
|
||||
this.$.changeShippedDialog.show();
|
||||
}
|
||||
|
||||
changeShipped(response) {
|
||||
|
@ -104,7 +101,7 @@ class Controller {
|
|||
return (!hasShowProperty || option.show === true ||
|
||||
typeof option.show === 'function' && option.show()) && hasAcl;
|
||||
});
|
||||
this.$scope.moreButton.data = options;
|
||||
this.$.moreButton.data = options;
|
||||
}
|
||||
|
||||
get isEditable() {
|
||||
|
@ -116,13 +113,13 @@ class Controller {
|
|||
}
|
||||
|
||||
showAddTurnDialog() {
|
||||
this.$scope.addTurn.show();
|
||||
this.$.addTurn.show();
|
||||
}
|
||||
|
||||
addTurn(day) {
|
||||
let params = {ticketFk: this.ticket.id, weekDay: day};
|
||||
this.$http.patch(`TicketWeeklies`, params).then(() => {
|
||||
this.$scope.addTurn.hide();
|
||||
this.$.addTurn.hide();
|
||||
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
||||
});
|
||||
}
|
||||
|
@ -133,7 +130,7 @@ class Controller {
|
|||
return;
|
||||
}
|
||||
|
||||
this.$scope.deleteConfirmation.show();
|
||||
this.$.deleteConfirmation.show();
|
||||
}
|
||||
|
||||
deleteTicket(response) {
|
||||
|
@ -147,11 +144,11 @@ class Controller {
|
|||
}
|
||||
|
||||
showAddStowaway() {
|
||||
this.$scope.addStowaway.show();
|
||||
this.$.addStowaway.show();
|
||||
}
|
||||
|
||||
showRemoveStowaway() {
|
||||
this.$scope.removeStowaway.show();
|
||||
this.$.removeStowaway.show();
|
||||
}
|
||||
|
||||
get ticket() {
|
||||
|
@ -160,11 +157,11 @@ class Controller {
|
|||
|
||||
set ticket(value) {
|
||||
this._ticket = value;
|
||||
if (value)
|
||||
this.canStowaway();
|
||||
|
||||
if (!value) return;
|
||||
|
||||
this.canStowaway();
|
||||
|
||||
let links = {
|
||||
btnOne: {
|
||||
icon: 'person',
|
||||
|
@ -212,14 +209,14 @@ class Controller {
|
|||
destination: address.mobile || null,
|
||||
message: this.$translate.instant('SMSPayment')
|
||||
};
|
||||
this.$scope.sms.open();
|
||||
this.$.sms.open();
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows an invoice confirmation
|
||||
*/
|
||||
showMakeInvoiceDialog() {
|
||||
this.$scope.makeInvoiceConfirmation.show();
|
||||
this.$.makeInvoiceConfirmation.show();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -242,7 +239,7 @@ class Controller {
|
|||
* Shows an invoice confirmation
|
||||
*/
|
||||
showRegenerateInvoiceDialog() {
|
||||
this.$scope.regenerateInvoiceConfirmation.show();
|
||||
this.$.regenerateInvoiceConfirmation.show();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -273,7 +270,7 @@ class Controller {
|
|||
}
|
||||
|
||||
confirmDeliveryNote() {
|
||||
this.$scope.confirmDeliveryNote.show();
|
||||
this.$.confirmDeliveryNote.show();
|
||||
}
|
||||
|
||||
sendDeliveryNote(response) {
|
||||
|
@ -285,7 +282,7 @@ class Controller {
|
|||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$state', '$scope', '$http', 'vnApp', '$translate', 'aclService'];
|
||||
Controller.$inject = ['$element', '$scope', 'aclService'];
|
||||
|
||||
ngModule.component('vnTicketDescriptor', {
|
||||
template: require('./index.html'),
|
||||
|
|
|
@ -7,7 +7,8 @@ describe('Ticket Component vnTicketDescriptor', () => {
|
|||
|
||||
beforeEach(ngModule('ticket'));
|
||||
|
||||
beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
|
||||
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope, $compile, _$state_) => {
|
||||
let $element = $compile(`<vn-autocomplete></vn-autocomplete>`)($rootScope);
|
||||
$state = _$state_;
|
||||
$state.getCurrentPath = () => {
|
||||
return [
|
||||
|
@ -16,7 +17,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
|
|||
];
|
||||
};
|
||||
$httpBackend = _$httpBackend_;
|
||||
controller = $componentController('vnTicketDescriptor', {$state});
|
||||
controller = $componentController('vnTicketDescriptor', {$element});
|
||||
controller._ticket = {id: 2, invoiceOut: {id: 1}};
|
||||
controller.cardReload = ()=> {
|
||||
return true;
|
||||
|
@ -24,25 +25,25 @@ describe('Ticket Component vnTicketDescriptor', () => {
|
|||
}));
|
||||
|
||||
describe('showAddTurnDialog()', () => {
|
||||
it('should call contrtoller.$scope.addTurn.show()', () => {
|
||||
controller.$scope.addTurn = {show: () => {}};
|
||||
spyOn(controller.$scope.addTurn, 'show');
|
||||
it('should call controller.$.addTurn.show()', () => {
|
||||
controller.$.addTurn = {show: () => {}};
|
||||
spyOn(controller.$.addTurn, 'show');
|
||||
controller.showAddTurnDialog();
|
||||
|
||||
expect(controller.$scope.addTurn.show).toHaveBeenCalledWith();
|
||||
expect(controller.$.addTurn.show).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
describe('addTurn()', () => {
|
||||
it('should make a query and call $.addTurn.hide() and vnApp.showSuccess()', () => {
|
||||
controller.$scope.addTurn = {hide: () => {}};
|
||||
spyOn(controller.$scope.addTurn, 'hide');
|
||||
controller.$.addTurn = {hide: () => {}};
|
||||
spyOn(controller.$.addTurn, 'hide');
|
||||
|
||||
$httpBackend.expectPATCH(`TicketWeeklies`).respond();
|
||||
controller.addTurn(1);
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(controller.$scope.addTurn.hide).toHaveBeenCalledWith();
|
||||
expect(controller.$.addTurn.hide).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -57,11 +58,11 @@ describe('Ticket Component vnTicketDescriptor', () => {
|
|||
|
||||
it('should call deleteConfirmation.show() if the ticket is editable', () => {
|
||||
controller.ticket.tracking = {state: {alertLevel: 0}};
|
||||
controller.$scope.deleteConfirmation = {show: () => {}};
|
||||
spyOn(controller.$scope.deleteConfirmation, 'show');
|
||||
controller.$.deleteConfirmation = {show: () => {}};
|
||||
spyOn(controller.$.deleteConfirmation, 'show');
|
||||
controller.showDeleteTicketDialog();
|
||||
|
||||
expect(controller.$scope.deleteConfirmation.show).toHaveBeenCalledWith();
|
||||
expect(controller.$.deleteConfirmation.show).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -136,21 +137,21 @@ describe('Ticket Component vnTicketDescriptor', () => {
|
|||
|
||||
describe('showAddStowaway()', () => {
|
||||
it('should show a dialog with a list of tickets available for an stowaway', () => {
|
||||
controller.$scope.addStowaway = {};
|
||||
controller.$scope.addStowaway.show = jasmine.createSpy('show');
|
||||
controller.$.addStowaway = {};
|
||||
controller.$.addStowaway.show = jasmine.createSpy('show');
|
||||
controller.showAddStowaway();
|
||||
|
||||
expect(controller.$scope.addStowaway.show).toHaveBeenCalledWith();
|
||||
expect(controller.$.addStowaway.show).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
describe('showRemoveStowaway()', () => {
|
||||
it('should show a dialog for an stowaway removal', () => {
|
||||
controller.$scope.removeStowaway = {};
|
||||
controller.$scope.removeStowaway.show = jasmine.createSpy('show');
|
||||
controller.$.removeStowaway = {};
|
||||
controller.$.removeStowaway.show = jasmine.createSpy('show');
|
||||
controller.showRemoveStowaway();
|
||||
|
||||
expect(controller.$scope.removeStowaway.show).toHaveBeenCalledWith();
|
||||
expect(controller.$.removeStowaway.show).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -152,7 +152,6 @@
|
|||
<field>
|
||||
<vn-textfield
|
||||
vn-id="concept"
|
||||
vn-focus
|
||||
ng-model="sale.concept"
|
||||
on-change="$ctrl.updateConcept(sale)">
|
||||
</vn-textfield>
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
</vn-auto>
|
||||
</vn-horizontal>
|
||||
<vn-icon-button
|
||||
ng-if=$ctrl.defaultTaxClass
|
||||
vn-tooltip="Add service"
|
||||
vn-bind="+"
|
||||
icon="add_circle"
|
||||
|
|
|
@ -33,11 +33,13 @@ class Controller {
|
|||
}
|
||||
|
||||
add() {
|
||||
this.$scope.model.insert({
|
||||
taxClassFk: this.defaultTaxClass.id,
|
||||
quantity: 1,
|
||||
ticketFk: this.$stateParams.id
|
||||
});
|
||||
if (this.defaultTaxClass) {
|
||||
this.$scope.model.insert({
|
||||
taxClassFk: this.defaultTaxClass.id,
|
||||
quantity: 1,
|
||||
ticketFk: this.$stateParams.id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onNewServiceTypeOpen() {
|
||||
|
|
Loading…
Reference in New Issue