From b4465afb64422a98f514bd25878203b4566cc696 Mon Sep 17 00:00:00 2001 From: Adeyemi Adetunji Date: Wed, 29 May 2024 00:12:31 +0100 Subject: [PATCH] feat: reset select in community page (#339) * Feat: Add Reset for comminity dropdown * - add translation * refactor --------- Co-authored-by: Rotimi Best --- apps/dashboard/src/lib/components/Org/Community/index.svelte | 5 ++++- apps/dashboard/src/lib/utils/translations/de.json | 3 ++- apps/dashboard/src/lib/utils/translations/en.json | 3 ++- apps/dashboard/src/lib/utils/translations/es.json | 3 ++- apps/dashboard/src/lib/utils/translations/fr.json | 3 ++- apps/dashboard/src/lib/utils/translations/hi.json | 3 ++- apps/dashboard/src/lib/utils/translations/pt.json | 3 ++- apps/dashboard/src/lib/utils/translations/ru.json | 3 ++- apps/dashboard/src/lib/utils/translations/vi.json | 3 ++- 9 files changed, 20 insertions(+), 9 deletions(-) diff --git a/apps/dashboard/src/lib/components/Org/Community/index.svelte b/apps/dashboard/src/lib/components/Org/Community/index.svelte index 56a60508..14e4844b 100644 --- a/apps/dashboard/src/lib/components/Org/Community/index.svelte +++ b/apps/dashboard/src/lib/components/Org/Community/index.svelte @@ -100,7 +100,10 @@ class="w-[25%] h-full" size="xl" label={$t('community.ask.select_course')} - items={allCourses.map((course) => ({ id: course.id, text: course.title }))} + items={[ + { id: '', text: $t('community.all') }, + ...allCourses.map((course) => ({ id: course.id, text: course.title })) + ]} bind:selectedId /> diff --git a/apps/dashboard/src/lib/utils/translations/de.json b/apps/dashboard/src/lib/utils/translations/de.json index 495cac0e..9b14479d 100644 --- a/apps/dashboard/src/lib/utils/translations/de.json +++ b/apps/dashboard/src/lib/utils/translations/de.json @@ -233,7 +233,8 @@ "cancel": "Stornieren", "give": "Eine Antwort geben", "comment": "Kommentar" - } + }, + "all": "Alle" }, "course": { "navItem": { diff --git a/apps/dashboard/src/lib/utils/translations/en.json b/apps/dashboard/src/lib/utils/translations/en.json index 69e900fb..89e920d6 100644 --- a/apps/dashboard/src/lib/utils/translations/en.json +++ b/apps/dashboard/src/lib/utils/translations/en.json @@ -1042,7 +1042,8 @@ "sure": "Are you sure you want to delete this", "no": "No, keep it", "yes": "Yes, delete" - } + }, + "all": "All" }, "audience": { diff --git a/apps/dashboard/src/lib/utils/translations/es.json b/apps/dashboard/src/lib/utils/translations/es.json index fe62264c..f20ca167 100644 --- a/apps/dashboard/src/lib/utils/translations/es.json +++ b/apps/dashboard/src/lib/utils/translations/es.json @@ -233,7 +233,8 @@ "cancel": "Cancelar", "give": "Da una respuesta", "comment": "Comentario" - } + }, + "all": "Todo" }, "course": { "navItem": { diff --git a/apps/dashboard/src/lib/utils/translations/fr.json b/apps/dashboard/src/lib/utils/translations/fr.json index 8c3870fd..a3aba4c2 100644 --- a/apps/dashboard/src/lib/utils/translations/fr.json +++ b/apps/dashboard/src/lib/utils/translations/fr.json @@ -233,7 +233,8 @@ "cancel": "Annuler", "give": "Donnez une réponse", "comment": "Commentaire" - } + }, + "all": "Tous" }, "course": { "navItem": { diff --git a/apps/dashboard/src/lib/utils/translations/hi.json b/apps/dashboard/src/lib/utils/translations/hi.json index 468d7d67..bf0be24c 100644 --- a/apps/dashboard/src/lib/utils/translations/hi.json +++ b/apps/dashboard/src/lib/utils/translations/hi.json @@ -233,7 +233,8 @@ "cancel": "रद्द करना", "give": "एक उत्तर दें", "comment": "टिप्पणी" - } + }, + "all": "सभी" }, "course": { "navItem": { diff --git a/apps/dashboard/src/lib/utils/translations/pt.json b/apps/dashboard/src/lib/utils/translations/pt.json index d62e78be..ca9389d8 100644 --- a/apps/dashboard/src/lib/utils/translations/pt.json +++ b/apps/dashboard/src/lib/utils/translations/pt.json @@ -233,7 +233,8 @@ "cancel": "Cancelar", "give": "Dê uma resposta", "comment": "Comente" - } + }, + "all": "Todos" }, "course": { "navItem": { diff --git a/apps/dashboard/src/lib/utils/translations/ru.json b/apps/dashboard/src/lib/utils/translations/ru.json index 1df5b8ee..8daec37e 100644 --- a/apps/dashboard/src/lib/utils/translations/ru.json +++ b/apps/dashboard/src/lib/utils/translations/ru.json @@ -233,7 +233,8 @@ "cancel": "Отмена", "give": "Дайте ответ", "comment": "Комментарий" - } + }, + "all": "Все" }, "course": { "navItem": { diff --git a/apps/dashboard/src/lib/utils/translations/vi.json b/apps/dashboard/src/lib/utils/translations/vi.json index 4be3c986..0d3d26bb 100644 --- a/apps/dashboard/src/lib/utils/translations/vi.json +++ b/apps/dashboard/src/lib/utils/translations/vi.json @@ -233,7 +233,8 @@ "cancel": "Hủy bỏ", "give": "Đưa ra một câu trả lời", "comment": "Bình luận" - } + }, + "all": "Tất cả" }, "course": { "navItem": {