#4457 @1h notifications working, need refactor ACL
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pau 2022-11-08 13:59:00 +01:00
parent e85505ee8e
commit 2fc12dff52
3 changed files with 19 additions and 7 deletions

View File

@ -1,2 +1,2 @@
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('notificationQueue','*','*','ALLOW','ROLE','invoicing'); VALUES ('NotificationQueue','*','*','ALLOW','ROLE','employee');

View File

@ -0,0 +1,10 @@
INSERT INTO `util`.`notificationSubscription` (notificationFk,userFk)
VALUES
(2,3401),
(2,10549),
(2,15680),
(2,19663),
(2,20041),
(2,997),
(2,3377),
;

View File

@ -229,14 +229,16 @@ class Controller extends Section {
const clientData = await this.$http.get(`Clients/${this.ticket.client.id}`); const clientData = await this.$http.get(`Clients/${this.ticket.client.id}`);
console.log('invoiceE', clientData);
if (clientData.data.hasInvoiceElectronic) { if (clientData.data.hasInvoiceElectronic) {
this.$http.post(`NotificationQueuesAdd`, { this.$http.post(`NotificationQueues`, {
notificationFk: 'invoiceElectronic' notificationFk: 'invoiceElectronic',
authorFk: this.ticket.client.id,
}); });
/* This should call the notification sistem to insert a new notification /*
in te queue, yet to check how to handle user permissions */ This should call the notification sistem to insert a new notification
in te queue, yet to check how to handle user permissions,
as of 08-11-2022 every employee can insert a new notification in the queue
*/
} }
return this.$http.post(`Tickets/makeInvoice`, params) return this.$http.post(`Tickets/makeInvoice`, params)