Skip to content

Commit

Permalink
update toast icon, title, message for enrich started notification
Browse files Browse the repository at this point in the history
  • Loading branch information
maleksal committed Feb 3, 2025
1 parent 43844f6 commit 5e5bd7b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions frontend/src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
</svg>
</template>
</Toast>

<Toast group="enrich-info">
<template #messageicon>
<span class="text-xl">☕️</span>
</template>
</Toast>
</template>

<script setup lang="ts">
Expand Down
13 changes: 8 additions & 5 deletions frontend/src/components/Mining/Buttons/EnrichButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function showNotification(
severity: 'info' | 'warn' | 'error' | 'success' | 'secondary' | 'contrast',
summary: string,
detail: string,
group?: 'achievement',
group?: 'achievement' | 'enrich-info',
) {
$toast.add({
severity,
Expand Down Expand Up @@ -291,8 +291,9 @@ async function enrichPersonBulk(
) {
showNotification(
'info',
t('notification.summary'),
t('notification.enrichment_started', { toEnrich: contacts.length }),
t('notification.enrichment_started_title', { toEnrich: contacts.length }),
t('notification.enrichment_started_message'),
'enrich-info',
);
await $api<EnrichContactResponse>('/enrich/person/bulk', {
method: 'POST',
Expand Down Expand Up @@ -391,7 +392,8 @@ const isEnrichDisabled = computed(
"confirm_enrichment": "Confirm contact enrichment | Confirm {n} contacts enrichment",
"notification": {
"summary": "",
"enrichment_started": "Enrichment on {toEnrich} contacts has started. Please wait a few minutes ☕",
"enrichment_started_title": "Enrichment on {toEnrich} contacts has started",
"enrichment_started_message": "Please wait a few minutes",
"enrichment_completed": "No data have been found. | {enriched} contact has been successfully enriched. | {enriched} contacts have been successfully enriched.",
"enrichment_canceled": "Your contact enrichment has been canceled.",
"already_enriched": "Contacts you selected are already enriched.",
Expand All @@ -411,7 +413,8 @@ const isEnrichDisabled = computed(
"confirm_enrichment": "Confirmer l'enrichissement du contact | Confirmer l'enrichissement des {n} contacts",
"notification": {
"summary": "",
"enrichment_started": "L'enrichissement de {toEnrich} contacts a commencé. Veuillez patienter quelques minutes ☕",
"enrichment_started_title": "L'enrichissement de {toEnrich} contacts a commencé. Veuillez patienter quelques minutes ☕",
"enrichment_started_message": "Veuillez patienter quelques minutes ☕",
"enrichment_completed": "Aucune nouvelle information n'a été trouvée. | {enriched} contact a été enrichi avec succès | {enriched} contacts ont été enrichis avec succès.",
"enrichment_canceled": "L'enrichissement de votre contact a été annulé.",
"already_enriched": "Ce contact est déjà enrichi.",
Expand Down

0 comments on commit 5e5bd7b

Please sign in to comment.