add controller function
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pau 2023-01-12 12:56:51 +01:00
parent 2678d59191
commit d5a7691b9c
2 changed files with 7 additions and 1 deletions

View File

@ -443,7 +443,8 @@
<!-- SMS Dialog -->
<vn-sms-dialog
vn-id="sms"
sms="$ctrl.newSMS">
sms="$ctrl.newSMS"
on-send="$ctrl.onSmsSend($sms)">
</vn-sms-dialog>
<vn-confirm

View File

@ -389,6 +389,11 @@ class Controller extends Section {
this.$.sms.open();
}
onSmsSend(sms) {
return this.$http.post(`Tickets/${this.ticket.id}/sendSms`, sms)
.then(() => this.vnApp.showSuccess(this.$t('SMS sent')));
}
/**
* Inserts a new instance
*/