7167-testToMaster_2414 #2244

Merged
alexm merged 643 commits from 7167-testToMaster_2414 into master 2024-04-04 05:32:41 +00:00
4 changed files with 8 additions and 7 deletions
Showing only changes of commit 8a5da43503 - Show all commits

View File

@ -14,5 +14,6 @@ INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalTyp
('MobileAppVersionControl', '*', 'READ', 'ALLOW', 'ROLE', 'production'),
('Collection', 'assignCollection', 'WRITE', 'ALLOW', 'ROLE', 'production'),
('Collection', 'addItem', 'WRITE', 'ALLOW', 'ROLE', 'production'),
('MachineWorker', 'updateInTime', 'WRITE', 'ALLOW', 'ROLE', 'production');;
('Sale', 'getFromSectorCollection', 'READ', 'ALLOW', 'ROLE', 'employee'),
('Collection', 'addItem', 'WRITE', 'ALLOW', 'ROLE', 'production');

View File

@ -4,5 +4,4 @@ module.exports = Self => {
require('../methods/item-shelving/makeMulti')(Self);
require('../methods/item-shelving/return')(Self);
require('../methods/item-shelving/updateFromSale')(Self);
require('../methods/item-shelving/getSale')(Self);
};

View File

@ -1,7 +1,7 @@
module.exports = Self => {
Self.remoteMethod('getSale', {
description: 'Update the visible items',
accessType: 'WRITE',
Self.remoteMethod('getFromSectorCollection', {
description: 'Get sales from sector collection',
accessType: 'READ',
accepts: [
{
arg: 'sectorCollectionFk',
@ -19,12 +19,12 @@ module.exports = Self => {
root: true
},
http: {
path: `/getSale`,
path: `/getFromSectorCollection`,
verb: 'GET'
},
});
Self.getSale = async(sectorCollectionFk, sectorFk, options) => {
Self.getFromSectorCollection = async(sectorCollectionFk, sectorFk, options) => {
const myOptions = {};
if (typeof options == 'object') Object.assign(myOptions, options);

View File

@ -13,6 +13,7 @@ module.exports = Self => {
require('../methods/sale/canEdit')(Self);
require('../methods/sale/usesMana')(Self);
require('../methods/sale/clone')(Self);
require('../methods/sale/getFromSectorCollection')(Self);
Self.validatesPresenceOf('concept', {
message: `Concept cannot be blank`