diff --git a/db/changes/10502-november/00-ACL_notification_InvoiceE.sql b/db/changes/10502-november/00-ACL_notification_InvoiceE.sql index bc13dd8da9..4aa9d2518f 100644 --- a/db/changes/10502-november/00-ACL_notification_InvoiceE.sql +++ b/db/changes/10502-november/00-ACL_notification_InvoiceE.sql @@ -1,2 +1,2 @@ INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('notificationQueue','*','*','ALLOW','ROLE','invoicing'); + VALUES ('NotificationQueue','*','*','ALLOW','ROLE','employee'); diff --git a/db/changes/10502-november/00-subscribeAdministrative.sql b/db/changes/10502-november/00-subscribeAdministrative.sql new file mode 100644 index 0000000000..2cc7fb3bb9 --- /dev/null +++ b/db/changes/10502-november/00-subscribeAdministrative.sql @@ -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), +; \ No newline at end of file diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js index d323043221..2da27cb829 100644 --- a/modules/ticket/front/descriptor-menu/index.js +++ b/modules/ticket/front/descriptor-menu/index.js @@ -229,14 +229,16 @@ class Controller extends Section { const clientData = await this.$http.get(`Clients/${this.ticket.client.id}`); - console.log('invoiceE', clientData); - if (clientData.data.hasInvoiceElectronic) { - this.$http.post(`NotificationQueuesAdd`, { - notificationFk: 'invoiceElectronic' + this.$http.post(`NotificationQueues`, { + 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)