Update:Notification system descriptions #996

This commit is contained in:
advplyr 2022-09-25 09:46:45 -05:00
parent a35b35c062
commit 88726bed86
7 changed files with 25 additions and 10 deletions

View file

@ -16,6 +16,8 @@
<ui-textarea-with-label v-model="newNotification.bodyTemplate" label="Body Template" class="mb-2" />
<p v-if="availableVariables" class="text-sm text-gray-300"><strong>Available variables:</strong> {{ availableVariables.join(', ') }}</p>
<div class="flex items-center pt-4">
<div class="flex items-center">
<ui-toggle-switch v-model="newNotification.enabled" />
@ -73,7 +75,7 @@ export default {
return this.notificationData.events || []
},
eventOptions() {
return this.notificationEvents.map((e) => ({ value: e.name, text: e.name }))
return this.notificationEvents.map((e) => ({ value: e.name, text: e.name, subtext: e.description }))
},
selectedEventData() {
return this.notificationEvents.find((e) => e.name === this.newNotification.eventName)
@ -83,6 +85,9 @@ export default {
},
title() {
return this.isNew ? 'Create Notification' : 'Update Notification'
},
availableVariables() {
return this.selectedEventData ? this.selectedEventData.variables || null : null
}
},
methods: {