3570-feat(setQuantitySale): back route and test #869

Merged
joan merged 9 commits from 3558-setQuantitySale into dev 2022-02-08 12:11:24 +00:00
Member
No description provided.
alexm added 1 commit 2022-02-02 07:29:05 +00:00
gitea/salix/pipeline/head This commit looks good Details
77d0dcae0d
feat(setQuantitySale): back route and test
alexm added 2 commits 2022-02-02 13:55:34 +00:00
alexm added the
CR / Tests passed
label 2022-02-02 13:57:00 +00:00
alexm added 3 commits 2022-02-07 07:05:34 +00:00
alexm changed title from WIP: 3570-feat(setQuantitySale): back route and test to 3570-feat(setQuantitySale): back route and test 2022-02-07 07:07:08 +00:00
alexm changed title from 3570-feat(setQuantitySale): back route and test to WIP: 3570-feat(setQuantitySale): back route and test 2022-02-07 07:10:50 +00:00
alexm added 1 commit 2022-02-07 07:23:29 +00:00
gitea/salix/pipeline/head This commit looks good Details
e08a3d31bc
remove f of focus
alexm changed title from WIP: 3570-feat(setQuantitySale): back route and test to 3570-feat(setQuantitySale): back route and test 2022-02-07 07:24:37 +00:00
joan requested changes 2022-02-08 08:52:01 +00:00
@ -0,0 +1,55 @@
module.exports = Self => {
Self.remoteMethodCtx('setQuantitySale', {
Contributor

This should be called setSaleQuantity

This should be called setSaleQuantity
alexm marked this conversation as resolved
@ -0,0 +34,4 @@
if (typeof options == 'object')
Object.assign(myOptions, options);
if (!myOptions.transaction) {
Contributor

No need to create a new transaction for a single modification

No need to create a new transaction for a single modification
alexm marked this conversation as resolved
@ -0,0 +39,4 @@
myOptions.transaction = tx;
}
try {
Contributor

Try-catch block not needed

Try-catch block not needed
alexm marked this conversation as resolved
@ -0,0 +15,4 @@
}
};
const originalSale = await models.Sale.findById(30, null, options);
Contributor

Should use the saleId constant instead of "30"

Should use the saleId constant instead of "30"
alexm marked this conversation as resolved
@ -0,0 +18,4 @@
const originalSale = await models.Sale.findById(30, null, options);
await models.Collection.setQuantitySale(ctx, options);
const updateSale = await models.Sale.findById(30, null, options);
Contributor

Should use the saleId constant instead of "30"

Should use the saleId constant instead of "30"
alexm marked this conversation as resolved
joan removed the
CR / Tests passed
label 2022-02-08 08:52:24 +00:00
alexm added 2 commits 2022-02-08 11:42:15 +00:00
alexm added the
CR / Tests passed
label 2022-02-08 11:42:33 +00:00
Author
Member

"isWithoutNegatives" is generated only when passing the e2e

"isWithoutNegatives" is generated only when passing the e2e
alexm requested review from joan 2022-02-08 11:46:06 +00:00
joan approved these changes 2022-02-08 12:11:09 +00:00
joan merged commit 2809b6c7c1 into dev 2022-02-08 12:11:24 +00:00
joan deleted branch 3558-setQuantitySale 2022-02-08 12:11:25 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#869
No description provided.