Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Fix: Support Cancel Method (#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Jan 30, 2024
1 parent 4a57e70 commit 9e9132e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/components/ADempiere/Form/VPOS2/DialogInfo/pin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export default defineComponent({
store.commit('setShowedDialogPin', {
isShowed: false
})
storedModalDialog.value.cancelMethod()
pin.value = ''
}

Expand All @@ -137,6 +138,9 @@ export default defineComponent({
closeDialog()
}
})
.finally(() => {
closeDialog()
})
}

return {
Expand Down
16 changes: 14 additions & 2 deletions src/components/ADempiere/Form/VPOS2/MainOrder/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,18 @@ export default defineComponent({
})
.then(updateLineResponse => {
refreshLine(updateLineResponse)
isLoadingQty.value = false
isLoadingPrice.value = false
currentLine.value.isEditCurrentPrice = false
})
.catch(() => {
isLoadingQty.value = false
isLoadingPrice.value = false
currentLine.value.isEditCurrentPrice = true
})
},
cancelMethod: () => {
currentLine.value.isEditCurrentPrice = false
isLoadingPrice.value = false
},
requestedAccess: 'IsModifyPrice',
requestedAmount: price,
isShowed: true
Expand Down Expand Up @@ -328,6 +332,10 @@ export default defineComponent({
currentLine.value.isEditQtyEntered = true
})
},
cancelMethod: () => {
currentLine.value.isEditQtyEntered = false
isLoadingQty.value = false
},
requestedAccess: 'IsAllowsModifyQuantity',
requestedAmount: quantity,
isShowed: true
Expand Down Expand Up @@ -374,6 +382,10 @@ export default defineComponent({
isLoadingDiscount.value = false
})
},
cancelMethod: () => {
currentLine.value.isEditDiscount = false
isLoadingDiscount.value = false
},
requestedAccess: 'IsAllowsModifyDiscount',
requestedAmount: discount_rate,
isShowed: true
Expand Down

0 comments on commit 9e9132e

Please sign in to comment.