Merge pull request 'TEST refs #6083 feat: add lilium ticketSms' (!1702) from 6083-ticketSms_test into test
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1702
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
This commit is contained in:
Alex Moreno 2023-08-08 06:52:45 +00:00
commit 76404066ef
5 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,3 @@
INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
VALUES
('TicketSms', 'find', 'READ', 'ALLOW', 'ROLE', 'salesPerson');

View File

@ -36,3 +36,4 @@ import './future';
import './future-search-panel';
import './advance';
import './advance-search-panel';
import './sms';

View File

@ -26,7 +26,8 @@
{"state": "ticket.card.components", "icon": "icon-components"},
{"state": "ticket.card.saleTracking", "icon": "assignment"},
{"state": "ticket.card.dms.index", "icon": "cloud_download"},
{"state": "ticket.card.boxing", "icon": "science"}
{"state": "ticket.card.boxing", "icon": "science"},
{"state": "ticket.card.sms", "icon": "sms"}
]
},
"keybindings": [
@ -287,6 +288,15 @@
"state": "ticket.advance",
"component": "vn-ticket-advance",
"description": "Advance tickets"
},
{
"url": "/sms",
"state": "ticket.card.sms",
"component": "vn-ticket-sms",
"description": "Sms",
"params": {
"ticket": "$ctrl.ticket"
}
}
]
}

View File

@ -0,0 +1,2 @@
<vn-card>
</vn-card>

View File

@ -0,0 +1,21 @@
import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
constructor($element, $) {
super($element, $);
}
async $onInit() {
this.$state.go('ticket.card.summary', {id: this.$params.id});
window.location.href = await this.vnApp.getUrl(`ticket/${this.$params.id}/sms`);
}
}
ngModule.vnComponent('vnTicketSms', {
template: require('./index.html'),
controller: Controller,
bindings: {
ticket: '<'
}
});