Merge branch 'dev' into 3791-travel_extra-community
This commit is contained in:
commit
9ad782cb59
|
@ -2480,9 +2480,11 @@ INSERT INTO `bs`.`defaulter` (`clientFk`, `amount`, `created`, `defaulterSinced`
|
|||
UPDATE `vn`.`agency`
|
||||
SET `supplierFk`=1
|
||||
WHERE `id`=1;
|
||||
|
||||
UPDATE `vn`.`agency`
|
||||
SET `supplierFk`=1
|
||||
WHERE `id`=2;
|
||||
|
||||
UPDATE `vn`.`agency`
|
||||
SET `supplierFk`=2
|
||||
WHERE `id`=3;
|
||||
|
@ -2490,6 +2492,7 @@ WHERE `id`=3;
|
|||
UPDATE `vn`.`route`
|
||||
SET `invoiceInFk`=1
|
||||
WHERE `id`=1;
|
||||
|
||||
UPDATE `vn`.`route`
|
||||
SET `invoiceInFk`=2
|
||||
WHERE `id`=2;
|
||||
|
@ -2505,6 +2508,7 @@ INSERT INTO `bs`.`sale` (`saleFk`, `amount`, `dated`, `typeFk`, `clientFk`)
|
|||
(3, 200.78, CURDATE(), 2, 1101),
|
||||
(4, 33.8, CURDATE(), 1, 1101),
|
||||
(30, 34.4, CURDATE(), 1, 1108);
|
||||
|
||||
INSERT INTO `vn`.`docuware` (`code`, `fileCabinetName`, `dialogName` , `find`)
|
||||
VALUES
|
||||
('deliveryClientTest', 'deliveryClientTest', 'findTest', 'word');
|
||||
|
@ -2513,6 +2517,18 @@ INSERT INTO `vn`.`docuwareConfig` (`url`)
|
|||
VALUES
|
||||
('https://verdnatura.docuware.cloud/docuware/platform');
|
||||
|
||||
INSERT INTO `vn`.`calendarHolidaysName` (`id`, `name`)
|
||||
VALUES
|
||||
(1, 'dayOfIT');
|
||||
|
||||
INSERT INTO `vn`.`calendarHolidaysType` (`id`, `name`, `hexColour`)
|
||||
VALUES
|
||||
(1, 'National', '#4169E1');
|
||||
|
||||
INSERT INTO `vn`.`calendarHolidays` (`id`, `calendarHolidaysTypeFk`, `dated`, `calendarHolidaysNameFk`, `workCenterFk`)
|
||||
VALUES
|
||||
(1, 1, CONCAT(YEAR(CURDATE()), '-12-09'), 1, 1);
|
||||
|
||||
INSERT INTO `vn`.`supplierAgencyTerm` (`agencyFk`, `supplierFk`, `minimumPackages`, `kmPrice`, `packagePrice`, `routePrice`, `minimumKm`, `minimumM3`, `m3Price`)
|
||||
VALUES
|
||||
(1, 1, 0, 0.00, 0.00, NULL, 0, 0.00, 23),
|
||||
|
|
|
@ -52,10 +52,12 @@ class Controller extends Section {
|
|||
}
|
||||
|
||||
scrollToLine(lineFk) {
|
||||
this.$.$applyAsync(() => {
|
||||
const hashFk = this.lineFk || lineFk;
|
||||
const hash = `vnItemDiary-${hashFk}`;
|
||||
this.$location.hash(hash);
|
||||
this.$anchorScroll();
|
||||
});
|
||||
}
|
||||
|
||||
showDescriptor(event, sale) {
|
||||
|
|
|
@ -47,6 +47,8 @@ describe('Item', () => {
|
|||
controller.lineFk = 1;
|
||||
controller.scrollToLine('invalidValue');
|
||||
|
||||
$scope.$apply();
|
||||
|
||||
expect(controller.$location.hash()).toEqual(`vnItemDiary-${1}`);
|
||||
expect(controller.$anchorScroll).toHaveBeenCalledWith();
|
||||
});
|
||||
|
@ -56,6 +58,8 @@ describe('Item', () => {
|
|||
controller.lineFk = undefined;
|
||||
controller.scrollToLine(1);
|
||||
|
||||
$scope.$apply();
|
||||
|
||||
expect(controller.$location.hash()).toEqual(`vnItemDiary-${1}`);
|
||||
expect(controller.$anchorScroll).toHaveBeenCalledWith();
|
||||
});
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
},
|
||||
"notificationEmail": {
|
||||
"type": "string"
|
||||
},
|
||||
"hasToMistake": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ class Controller extends Section {
|
|||
const event = this.events[stamp];
|
||||
const calendar = $event.target.closest('vn-calendar').$ctrl;
|
||||
|
||||
if (event) {
|
||||
if (event && event.absenceId) {
|
||||
if (event.type == this.absenceType.code)
|
||||
this.delete(calendar, day, event);
|
||||
else
|
||||
|
@ -230,6 +230,7 @@ class Controller extends Section {
|
|||
.then(calendar.repaint())
|
||||
.then(() => this.getContractHolidays())
|
||||
.then(() => this.getYearHolidays())
|
||||
.then(() => this.repaint())
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@ -266,6 +267,7 @@ class Controller extends Section {
|
|||
.then(calendar.repaint())
|
||||
.then(() => this.getContractHolidays())
|
||||
.then(() => this.getYearHolidays())
|
||||
.then(() => this.repaint())
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -191,7 +191,8 @@ describe('Worker', () => {
|
|||
const selectedDay = new Date();
|
||||
const expectedEvent = {
|
||||
dated: selectedDay,
|
||||
type: 'holiday'
|
||||
type: 'holiday',
|
||||
absenceId: 1
|
||||
};
|
||||
const $event = {
|
||||
target: {
|
||||
|
@ -214,7 +215,8 @@ describe('Worker', () => {
|
|||
const selectedDay = new Date();
|
||||
const expectedEvent = {
|
||||
dated: selectedDay,
|
||||
type: 'leaveOfAbsence'
|
||||
type: 'leaveOfAbsence',
|
||||
absenceId: 1
|
||||
};
|
||||
const $event = {
|
||||
target: {
|
||||
|
|
Loading…
Reference in New Issue