refator: updated fixtures
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
b5fa360960
commit
f7be419bbe
|
@ -1,12 +1,13 @@
|
|||
CREATE TABLE `vn`.`zoneExclusionGeo` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`zoneExclusionFk` int(11) NOT NULL,
|
||||
`geoFk` int(11) NOT NULL,
|
||||
PRIMARY KEY (`zoneExclusionFk`,`geoFk`),
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `zoneExclusionGeo_UN` (`zoneExclusionFk`,`geoFk`),
|
||||
KEY `zoneExclusionGeo2_FK_1` (`geoFk`),
|
||||
CONSTRAINT `zoneExclusionGeo2_FK_1` FOREIGN KEY (`geoFk`) REFERENCES `zoneGeo` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `zoneExclusionGeo_FK` FOREIGN KEY (`zoneExclusionFk`) REFERENCES `zoneExclusion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CONSTRAINT `zoneExclusionGeo_FK` FOREIGN KEY (`geoFk`) REFERENCES `zoneGeo` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `zoneExclusionGeo_FK_1` FOREIGN KEY (`zoneExclusionFk`) REFERENCES `zoneExclusion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `vn`.`zone_excludeFromGeo`;
|
||||
DELIMITER $$
|
||||
|
|
|
@ -2029,6 +2029,8 @@ INSERT INTO `vn`.`zoneEvent`(`zoneFk`, `type`, `dated`)
|
|||
(1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=7, 7, 14) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(1, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=8, 8, 15) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(2, 'day', DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
|
@ -2579,8 +2581,8 @@ INSERT INTO `vn`.`machineWorker` (`workerFk`, `machineFk`, `inTimed`, `outTimed`
|
|||
|
||||
INSERT INTO `vn`.`zoneExclusion` (`id`, `zoneFk`, `dated`, `created`, `userFk`)
|
||||
VALUES
|
||||
(1, 1, DATE_ADD(CURDATE(), INTERVAL + 10 DAY), CURDATE(), 100),
|
||||
(2, 1, DATE_ADD(CURDATE(), INTERVAL + 12 DAY), CURDATE(), 100);
|
||||
(1, 1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=7, 7, 14) - DAYOFWEEK(CURDATE())) DAY), CURDATE(), 100),
|
||||
(2, 1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=8, 8, 15) - DAYOFWEEK(CURDATE())) DAY), CURDATE(), 100);
|
||||
|
||||
INSERT INTO `vn`.`zoneExclusionGeo` (`zoneExclusionFk`, `geoFk`)
|
||||
VALUES
|
||||
|
|
|
@ -240,7 +240,7 @@ class Controller extends Section {
|
|||
const params = {
|
||||
zoneFk: parseInt(this.$params.id),
|
||||
date: excludeSelected.dated,
|
||||
geoFk: geoIds
|
||||
geoIds: geoIds
|
||||
};
|
||||
|
||||
if (this.isNew)
|
||||
|
@ -252,9 +252,9 @@ class Controller extends Section {
|
|||
if (geoIds[actualPosition]) geoId = geoIds[actualPosition].id;
|
||||
else geoId = null;
|
||||
|
||||
if (geoId) {
|
||||
if (geoId && geoId == exclusionGeo.geoFk) {
|
||||
const params = {
|
||||
zoneExclusionFk: excludeSelected.zoneExclusionFk,
|
||||
zoneExclusionFk: exclusionGeo.zoneExclusionFk,
|
||||
geoFk: geoId
|
||||
};
|
||||
req = this.$http.put(`ZoneExclusionGeos/${exclusionGeo.id}`, params);
|
||||
|
|
Loading…
Reference in New Issue