refactor
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Javi Gallego 2021-01-22 14:45:02 +01:00
parent 161514582d
commit 93417e9676
3 changed files with 3 additions and 3 deletions

View File

@ -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');
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Client', 'createReceipt', '*', 'ALLOW', 'ROLE', 'administrative');

View File

@ -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',

View File

@ -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!')));
}