diff --git a/client/components/cards/NotificationCard.vue b/client/components/cards/NotificationCard.vue index 05bf66de..7f74239e 100644 --- a/client/components/cards/NotificationCard.vue +++ b/client/components/cards/NotificationCard.vue @@ -76,7 +76,7 @@ export default { }, sendTestClick() { const payload = { - message: `Send a test notification to event ${this.eventName}?`, + message: `Trigger this notification with test data?`, callback: (confirmed) => { if (confirmed) { this.sendTest() diff --git a/client/components/modals/notification/NotificationEditModal.vue b/client/components/modals/notification/NotificationEditModal.vue index a9382a68..3f53db05 100644 --- a/client/components/modals/notification/NotificationEditModal.vue +++ b/client/components/modals/notification/NotificationEditModal.vue @@ -16,6 +16,8 @@ +

Available variables: {{ availableVariables.join(', ') }}

+
@@ -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: { diff --git a/client/components/ui/Dropdown.vue b/client/components/ui/Dropdown.vue index 22eeed17..0a4b9c30 100644 --- a/client/components/ui/Dropdown.vue +++ b/client/components/ui/Dropdown.vue @@ -3,7 +3,9 @@

{{ label }}