2024-03-28 18:14:30 +01:00
< template >
2024-04-15 19:39:03 +02:00
< IntegrationWrapper
v - model = "props.integrationData"
: integration = "props.integration"
: form = "form"
>
2024-09-24 12:16:20 +02:00
< p class = "text-gray-500 text-sm mb-3" >
You can < NuxtLink
class = "underline"
: to = "{ name: 'settings-workspace' }"
target = "_blank"
>
use our custom SMTP feature
< / NuxtLink > to send emails from your own domain .
< / p >
2024-04-15 19:39:03 +02:00
< text -area -input
: form = "integrationData"
name = "settings.notification_emails"
required
label = "Notification Emails"
help = "Add one email per line"
/ >
< text -input
: form = "integrationData"
name = "settings.notification_reply_to"
label = "Notification Reply To"
: help = "notifiesHelp"
/ >
2024-03-28 18:14:30 +01:00
< / IntegrationWrapper >
< / template >
< script setup >
2024-04-15 19:39:03 +02:00
import IntegrationWrapper from "./components/IntegrationWrapper.vue"
2024-03-28 18:14:30 +01:00
const props = defineProps ( {
integration : { type : Object , required : true } ,
form : { type : Object , required : true } ,
integrationData : { type : Object , required : true } ,
2024-04-15 19:39:03 +02:00
formIntegrationId : { type : Number , required : false , default : null } ,
2024-03-28 18:14:30 +01:00
} )
const replayToEmailField = computed ( ( ) => {
const emailFields = props . form . properties . filter ( ( field ) => {
2024-04-15 19:39:03 +02:00
return field . type === "email" && ! field . hidden
2024-03-28 18:14:30 +01:00
} )
if ( emailFields . length === 1 ) return emailFields [ 0 ]
return null
} )
const notifiesHelp = computed ( ( ) => {
if ( replayToEmailField . value ) {
2024-04-15 19:39:03 +02:00
return (
'If empty, Reply-to for this notification will be the email filled in the field "' +
replayToEmailField . value . name +
'".'
)
2024-03-28 18:14:30 +01:00
}
2024-04-15 19:39:03 +02:00
return "If empty, Reply-to for this notification will be your own email. Add a single email field to your form, and it will automatically become the reply to value."
2024-03-28 18:14:30 +01:00
} )
< / script >