Skip to content

Commit

Permalink
feat: Show CATALOGUE_BCC_MSG value if set (#3505)
Browse files Browse the repository at this point in the history
feat: Show CATALOGUE_BCC_MSG value if set

Closes #3504
  • Loading branch information
connoratrug authored Mar 18, 2024
1 parent 03e3cae commit 25b5e9c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions apps/nuxt3-ssr/components/SettingsMessage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script setup lang="ts">
const CATALOGUE_LANDING_TITLE = "CATALOGUE_BCC_MSG";
const message = ref();
fetchSetting(CATALOGUE_LANDING_TITLE).then((resp) => {
const setting = resp.data["_settings"].find(
(setting: { key: string; value: string }) => {
return setting.key === CATALOGUE_LANDING_TITLE;
}
);
if (setting) {
message.value = setting.value;
}
});
</script>
<template>
<div v-if="message" class="pl-3">
<p class="text-body-base">{{ message }}</p>
</div>
</template>
5 changes: 4 additions & 1 deletion apps/nuxt3-ssr/components/content/ContentBlockIntro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const submitForm = async () => {
>
<template v-if="contactMessageFilter">
<ContactForm :fields="fields" @submit-form="submitForm" />
<div class="pl-3 pb-3">
<div class="pl-3">
<span class="text-body-base">or contact us at: </span>
<a
class="text-blue-500 hover:underline"
Expand All @@ -158,6 +158,9 @@ const submitForm = async () => {
{{ contact }}
</a>
</template>
<ClientOnly>
<SettingsMessage />
</ClientOnly>
</ContentBlockModal>

<template #footer>
Expand Down
1 change: 1 addition & 0 deletions docs/molgenis/dev_messageapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ query Resources($filter:ResourcesFilter){

***BBC option***
To receive a copy of the message create a setting with key: ```contactBccAddress``` and a valid email address as value.
To notify the user about the message being forwarded create a setting with key ```CATALOGUE_BCC_MSG``` add a message for the user as value
## Sending email

Configurable settings
Expand Down

0 comments on commit 25b5e9c

Please sign in to comment.