7167-testToMaster_2414 #2244
|
@ -14,5 +14,6 @@ INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalTyp
|
||||||
('MobileAppVersionControl', '*', 'READ', 'ALLOW', 'ROLE', 'production'),
|
('MobileAppVersionControl', '*', 'READ', 'ALLOW', 'ROLE', 'production'),
|
||||||
('Collection', 'assignCollection', 'WRITE', 'ALLOW', 'ROLE', 'production'),
|
('Collection', 'assignCollection', 'WRITE', 'ALLOW', 'ROLE', 'production'),
|
||||||
('Collection', 'addItem', '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');
|
||||||
|
|
|
@ -4,5 +4,4 @@ module.exports = Self => {
|
||||||
require('../methods/item-shelving/makeMulti')(Self);
|
require('../methods/item-shelving/makeMulti')(Self);
|
||||||
require('../methods/item-shelving/return')(Self);
|
require('../methods/item-shelving/return')(Self);
|
||||||
require('../methods/item-shelving/updateFromSale')(Self);
|
require('../methods/item-shelving/updateFromSale')(Self);
|
||||||
require('../methods/item-shelving/getSale')(Self);
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethod('getSale', {
|
Self.remoteMethod('getFromSectorCollection', {
|
||||||
description: 'Update the visible items',
|
description: 'Get sales from sector collection',
|
||||||
accessType: 'WRITE',
|
accessType: 'READ',
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
arg: 'sectorCollectionFk',
|
arg: 'sectorCollectionFk',
|
||||||
|
@ -19,12 +19,12 @@ module.exports = Self => {
|
||||||
root: true
|
root: true
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/getSale`,
|
path: `/getFromSectorCollection`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.getSale = async(sectorCollectionFk, sectorFk, options) => {
|
Self.getFromSectorCollection = async(sectorCollectionFk, sectorFk, options) => {
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
|
||||||
if (typeof options == 'object') Object.assign(myOptions, options);
|
if (typeof options == 'object') Object.assign(myOptions, options);
|
|
@ -13,6 +13,7 @@ module.exports = Self => {
|
||||||
require('../methods/sale/canEdit')(Self);
|
require('../methods/sale/canEdit')(Self);
|
||||||
require('../methods/sale/usesMana')(Self);
|
require('../methods/sale/usesMana')(Self);
|
||||||
require('../methods/sale/clone')(Self);
|
require('../methods/sale/clone')(Self);
|
||||||
|
require('../methods/sale/getFromSectorCollection')(Self);
|
||||||
|
|
||||||
Self.validatesPresenceOf('concept', {
|
Self.validatesPresenceOf('concept', {
|
||||||
message: `Concept cannot be blank`
|
message: `Concept cannot be blank`
|
||||||
|
|
Loading…
Reference in New Issue