refactor: sectorCollection_getSale refs #6276
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
7a64b57a2a
commit
8a5da43503
|
@ -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');
|
||||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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);
|
|
@ -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`
|
||||
|
|
Loading…
Reference in New Issue