Merge pull request '1880-refactor_loggable' (#337) from 1880-refactor_loggable into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #337 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
84c74744b4
|
@ -1,5 +0,0 @@
|
|||
UPDATE `salix`.`ACL` SET `accessType`='WRITE' WHERE `id`='213';
|
||||
UPDATE `salix`.`ACL` SET `property` = 'deleteSales' WHERE (`id` = '80');
|
||||
|
||||
INSERT IGNORE INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('CustomsAgent', '*', '*', 'ALLOW', 'ROLE', 'employee');
|
||||
|
|
@ -211,12 +211,16 @@ describe('Ticket Edit sale path', () => {
|
|||
it('should search for a ticket then access to the sales section', async() => {
|
||||
await page.accessToSearchResult('16');
|
||||
await page.accessToSection('ticket.card.sale');
|
||||
await page.wait(2000);
|
||||
});
|
||||
|
||||
it('should select the third sale and delete it', async() => {
|
||||
await page.waitToClick(selectors.ticketSales.thirdSaleCheckbox);
|
||||
await page.wait(2000);
|
||||
await page.waitToClick(selectors.ticketSales.deleteSaleButton);
|
||||
await page.wait(2000);
|
||||
await page.waitToClick(selectors.ticketSales.acceptDeleteLineButton);
|
||||
await page.wait(2000);
|
||||
await page.waitForSpinnerLoad();
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
|
|
|
@ -249,7 +249,6 @@ module.exports = function(Self) {
|
|||
let newInstance = {};
|
||||
if (ctx.hookState.newInstance)
|
||||
Object.assign(newInstance, ctx.hookState.newInstance);
|
||||
|
||||
let userFk;
|
||||
if (loopBackContext)
|
||||
userFk = loopBackContext.active.accessToken.userId;
|
||||
|
|
|
@ -27,11 +27,11 @@ module.exports = function(Self) {
|
|||
{
|
||||
relation: 'salesPerson',
|
||||
scope: {
|
||||
fields: ['userFk'],
|
||||
fields: ['userFk', 'firstName'],
|
||||
include: {
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['nickname']
|
||||
fields: ['name', 'nickname']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,12 @@ module.exports = function(Self) {
|
|||
scope: {
|
||||
fields: ['id', 'name']
|
||||
}
|
||||
}, {
|
||||
}, {
|
||||
relation: 'salesPersonUser',
|
||||
scope: {
|
||||
fields: ['id', 'name']
|
||||
}
|
||||
}, {
|
||||
relation: 'country',
|
||||
scope: {
|
||||
|
|
|
@ -136,6 +136,11 @@
|
|||
"model": "Worker",
|
||||
"foreignKey": "salesPersonFk"
|
||||
},
|
||||
"salesPersonUser": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "salesPersonFk"
|
||||
},
|
||||
"province": {
|
||||
"type": "belongsTo",
|
||||
"model": "Province",
|
||||
|
|
Loading…
Reference in New Issue