This commit is contained in:
Joan Sanchez 2019-01-31 09:48:11 +01:00
commit e74b7e3118
9 changed files with 25 additions and 46 deletions

View File

@ -7,7 +7,7 @@ describe('Client activeWorkersWithRole', () => {
let isSalesPerson = await app.models.Account.hasRole(result[0].id, 'salesPerson');
expect(result.length).toEqual(10);
expect(result.length).toEqual(11);
expect(isSalesPerson).toBeTruthy();
});

View File

@ -6,7 +6,7 @@ describe('Client listWorkers', () => {
.then(result => {
let amountOfEmployees = Object.keys(result).length;
expect(amountOfEmployees).toEqual(43);
expect(amountOfEmployees).toEqual(44);
done();
})
.catch(done.fail);

View File

@ -11,7 +11,8 @@ describe('item getLastEntries()', () => {
it('should return three entries for a given item', async() => {
let date = new Date();
date.setMonth(date.getMonth() - 2);
date.setMonth(date.getMonth() - 2, 15);
let filter = {where: {itemFk: 1, date: date}};
let result = await app.models.Item.getLastEntries(filter);

View File

@ -3,7 +3,7 @@
"base": "VnModel",
"options": {
"mysql": {
"table": "personDepartment"
"table": "workerDepartment"
}
},
"properties": {

View File

@ -3,7 +3,7 @@
"base": "VnModel",
"options": {
"mysql": {
"table": "personMedia"
"table": "workerMedia"
}
},
"properties": {

View File

@ -3,7 +3,7 @@ CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `personMedia` AS
VIEW `workerMedia` AS
SELECT
`p`.`id_trabajador` AS `workerFk`,
`m`.`value` AS `mediaValue`

View File

@ -3,12 +3,10 @@ CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`personDepartment` AS
VIEW `vn`.`workerDepartment` AS
SELECT
`p`.`id_trabajador` AS `workerFk`,
`p`.`name` AS `name`,
`p`.`firstname` AS `firstname`,
`d`.`name` AS `department`
`d`.`name` AS `departmentFk`
FROM
(((`postgresql`.`person` `p`
JOIN `postgresql`.`profile` `pr` ON ((`pr`.`person_id` = `p`.`person_id`)))

View File

@ -1,20 +0,0 @@
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('Zone','*','READ','ALLOW','ROLE','employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('ZoneGeo','*','READ','ALLOW','ROLE','employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('ZoneCalendar','*','READ','ALLOW','ROLE','employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('ZoneIncluded','*','READ','ALLOW','ROLE','employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('LabourHoliday','*','READ','ALLOW','ROLE','employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('LabourHolidayLegend','*','READ','ALLOW','ROLE','employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('LabourHolidayType','*','READ','ALLOW','ROLE','employee');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('Zone','*','WRITE','ALLOW','ROLE','deliveryBoss');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('ZoneCalendar','*','WRITE','ALLOW','ROLE','deliveryBoss');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('ZoneIncluded','*','WRITE','ALLOW','ROLE','deliveryBoss');

File diff suppressed because one or more lines are too long