From 93417e96766605bf7bf4276531dd464b6458316b Mon Sep 17 00:00:00 2001 From: jgallego Date: Fri, 22 Jan 2021 14:45:02 +0100 Subject: [PATCH] refactor --- db/changes/10271-wisemen/00-ACL.sql | 2 +- modules/client/back/models/receipt.js | 2 +- modules/client/front/balance/create/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/changes/10271-wisemen/00-ACL.sql b/db/changes/10271-wisemen/00-ACL.sql index 9c07c4a7e..f16d77b22 100644 --- a/db/changes/10271-wisemen/00-ACL.sql +++ b/db/changes/10271-wisemen/00-ACL.sql @@ -1,3 +1,3 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('FixedPrice', '*', '*', 'ALLOW', 'ROLE', 'buyer'); INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('PayDem', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); -INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Receipt', 'createReceipt', '*', 'ALLOW', 'ROLE', 'administrative'); \ No newline at end of file +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Client', 'createReceipt', '*', 'ALLOW', 'ROLE', 'administrative'); \ No newline at end of file diff --git a/modules/client/back/models/receipt.js b/modules/client/back/models/receipt.js index 02976a973..99e5c67f3 100644 --- a/modules/client/back/models/receipt.js +++ b/modules/client/back/models/receipt.js @@ -1,6 +1,6 @@ module.exports = function(Self) { require('../methods/receipt/filter')(Self); - require('../methods/receipt/createReceipt')(Self); + require('../methods/client/createReceipt')(Self); Self.validateBinded('amountPaid', isNotZero, { message: 'Amount cannot be zero', diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index dfda85ca7..f5d6e7abf 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -99,7 +99,7 @@ class Controller extends Dialog { if (response !== 'accept') return super.responseHandler(response); - return this.$http.post(`Receipts/${this.$params.id}/createReceipt`, this.receipt) + return this.$http.post(`Clients/${this.$params.id}/createReceipt`, this.receipt) .then(() => super.responseHandler(response)) .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))); }