From 60954db6f9aa2ed182a070cb073f1c38d7e91bab Mon Sep 17 00:00:00 2001 From: Thai Phan <117443490+pvthai-axonivy@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:46:18 +0700 Subject: [PATCH] IVYPORTAL-17410: Change the message for no tasks/cases available (#1000) (cherry picked from commit 235724a85cf773e12bf2fd2c313c9213da9217c4) --- AxonIvyPortal/portal/cms/cms.yaml | 14 ++------------ AxonIvyPortal/portal/cms/cms_de.yaml | 14 ++------------ AxonIvyPortal/portal/cms/cms_en.yaml | 14 ++------------ AxonIvyPortal/portal/cms/cms_es.yaml | 14 ++------------ AxonIvyPortal/portal/cms/cms_fr.yaml | 14 ++------------ .../portal/generic/bean/DashboardBean.java | 18 ++---------------- .../portalkit/enums/CaseEmptyMessage.java | 7 +------ .../portalkit/enums/TaskEmptyMessage.java | 7 +------ 8 files changed, 14 insertions(+), 88 deletions(-) diff --git a/AxonIvyPortal/portal/cms/cms.yaml b/AxonIvyPortal/portal/cms/cms.yaml index fa61a0b7433..f036beb4fa2 100644 --- a/AxonIvyPortal/portal/cms/cms.yaml +++ b/AxonIvyPortal/portal/cms/cms.yaml @@ -704,20 +704,10 @@ ch.ivy.addon.portalkit.ui.jsf: filters: Filters iconMessage: caseWidget: - BEACH_PALM_SUNBED: You are awesome - all cases are done. Lean back and enjoy. - CHARGING_BATTERY_FULL_1: There are currently no cases. Time to recharge the batteries a little. - COFFEE_OF_HOT: Wow! Good job! All cases are completed. How about a quick coffee break? - RANKING_WINNER_MEDAL: Game, set and match! You did it, all cases are completed! - SOCCER_PLAYER: Goal! You did it, all cases completed. Short half-time break. - YOGA_MEDITATE: Well done! All cases are done. Inhale, exhale, relax. + EMPTY_MESSAGE: Currently, there are no cases available. noCasesFoundWhenFilter: There are currently no cases considering the applied filter. taskWidget: - BEACH_PALM_SUNBED: You are awesome - all tasks are done. Lean back and enjoy. - CHARGING_BATTERY_FULL_1: There are currently no tasks. Time to recharge the batteries a little. - COFFEE_OF_HOT: Wow! Good job! All tasks are completed. How about a quick coffee break? - RANKING_WINNER_MEDAL: Game, set and match! You did it, all tasks are completed! - SOCCER_PLAYER: Goal! You did it, all tasks completed. Short half-time break. - YOGA_MEDITATE: Well done! All tasks are done. Inhale, exhale, relax. + EMPTY_MESSAGE: Currently, there are no tasks available. noTasksFoundWhenFilter: There are currently no tasks after applied filter. loading: Loading... noCategory: There are no categories diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index 8062baa9ff9..40bbc209c05 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -875,20 +875,10 @@ ch.ivy.addon.portalkit.ui.jsf: fullscreenMode: Vollbildmodus iconMessage: caseWidget: - BEACH_PALM_SUNBED: Sie sind großartig - alle Vorgänge sind erledigt. Lehnen Sie sich zurück und genießen Sie. - CHARGING_BATTERY_FULL_1: Zurzeit gibt es keine Vorgänge. Zeit, die Batterien ein wenig aufzuladen. - COFFEE_OF_HOT: Wahnsinn! Gut gemacht! Alle Vorgänge sind abgeschlossen. Wie wäre es mit einer kurzen Kaffeepause? - RANKING_WINNER_MEDAL: Spiel, Satz und Sieg! Du hast es geschafft, alle Vorgänge sind abgeschlossen! - SOCCER_PLAYER: Ziel erreicht! Du hast es geschafft, alle Vorgänge sind abgeschlossen. Kurze Halbzeitpause. - YOGA_MEDITATE: Gut gemacht! Alle Vorgänge sind erledigt. Einatmen, ausatmen, entspannen. + EMPTY_MESSAGE: Aktuell sind keine weiteren Cases vorhanden. noCasesFoundWhenFilter: Derzeit gibt es keine Vorgänge nach dem angewandten Filter. taskWidget: - BEACH_PALM_SUNBED: Sie sind großartig - alle Aufgaben sind erledigt. Lehnen Sie sich zurück und genießen Sie. - CHARGING_BATTERY_FULL_1: Derzeit gibt es keine Aufgaben. Zeit, die Batterien ein wenig aufzuladen. - COFFEE_OF_HOT: Wahnsinn! Gut gemacht! Alle Aufgaben sind erledigt. Wie wäre es mit einer kurzen Kaffeepause? - RANKING_WINNER_MEDAL: Spiel, Satz und Sieg! Du hast es geschafft, alle Aufgaben sind erledigt! - SOCCER_PLAYER: Ziel erreicht! Du hast es geschafft, alle Aufgaben sind erledigt. Kurze Halbzeitpause. - YOGA_MEDITATE: Gut gemacht! Alle Aufgaben sind erledigt. Einatmen, ausatmen, entspannen. + EMPTY_MESSAGE: Aktuell sind keine weiteren Aufgaben vorhanden. noTasksFoundWhenFilter: Derzeit gibt es keine Aufgaben nach dem angewandten Filter. loading: Laden... noCategory: Es gibt keine Kategorien diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index 3b07dd13b14..1bef35227c3 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -877,20 +877,10 @@ ch.ivy.addon.portalkit.ui.jsf: fullscreenMode: Fullscreen Mode iconMessage: caseWidget: - BEACH_PALM_SUNBED: You are awesome - all cases are done. Lean back and enjoy. - CHARGING_BATTERY_FULL_1: There are currently no cases. Time to recharge the batteries a little. - COFFEE_OF_HOT: Wow! Good job! All cases are completed. How about a quick coffee break? - RANKING_WINNER_MEDAL: Game, set and match! You did it, all cases are completed! - SOCCER_PLAYER: Goal! You did it, all cases completed. Short half-time break. - YOGA_MEDITATE: Well done! All cases are done. Inhale, exhale, relax. + EMPTY_MESSAGE: Currently, there are no cases available. noCasesFoundWhenFilter: There are currently no cases after applied filter. taskWidget: - BEACH_PALM_SUNBED: You are awesome - all tasks are done. Lean back and enjoy. - CHARGING_BATTERY_FULL_1: There are currently no tasks. Time to recharge the batteries a little. - COFFEE_OF_HOT: Wow! Good job! All tasks are completed. How about a quick coffee break? - RANKING_WINNER_MEDAL: Game, set and match! You did it, all tasks are completed! - SOCCER_PLAYER: Goal! You did it, all tasks completed. Short half-time break. - YOGA_MEDITATE: Well done! All tasks are done. Inhale, exhale, relax. + EMPTY_MESSAGE: Currently, there are no tasks available. noTasksFoundWhenFilter: There are currently no tasks after applied filter. loading: Loading... noCategory: There are no categories diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index 604a24ca67e..8c8237e6fc9 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -874,20 +874,10 @@ ch.ivy.addon.portalkit.ui.jsf: fullscreenMode: Modo de pantalla completa iconMessage: caseWidget: - BEACH_PALM_SUNBED: Eres increíble - todos los casos están hechos. Recuéstate y disfruta. - CHARGING_BATTERY_FULL_1: There are currently no cases. Time to recharge the batteries a little. - COFFEE_OF_HOT: ¡Vaya! ¡Buen trabajo! Todos los casos están completados. ¿Qué tal una pausa rápida para el café? - RANKING_WINNER_MEDAL: ¡Juego, set y partido! Lo has conseguido, ¡todos los casos están completados! - SOCCER_PLAYER: ¡Gol! Lo has hecho, todos los casos completados. Breve descanso de medio tiempo. - YOGA_MEDITATE: ¡Bien hecho! Todos los casos están hechos. Inhala, exhala, relájate. + EMPTY_MESSAGE: Actualmente, no hay casos adicionales disponibles. noCasesFoundWhenFilter: Actualmente no hay casos después de aplicar el filtro. taskWidget: - BEACH_PALM_SUNBED: 'Eres increíble: todas las tareas están hechas. Recuéstate y disfruta.' - CHARGING_BATTERY_FULL_1: Actualmente no hay tareas. Es hora de recargar un poco las pilas. - COFFEE_OF_HOT: ¡Vaya! ¡Buen trabajo! Todas las tareas están completadas. ¿Qué tal una pausa rápida para el café? - RANKING_WINNER_MEDAL: ¡Juego, set y partido! Lo has conseguido, ¡todas las tareas están completadas! - SOCCER_PLAYER: ¡Gol! Lo hiciste, todas las tareas completadas. Breve descanso de medio tiempo. - YOGA_MEDITATE: Bien hecho. Todas las tareas están hechas. Inhala, exhala, relájate. + EMPTY_MESSAGE: Actualmente, no hay tareas adicionales disponibles. noTasksFoundWhenFilter: Actualmente no hay tareas después del filtro aplicado. loading: Cargando... noCategory: No hay categorías diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index 3e94ed6f3a6..186b08da480 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -871,20 +871,10 @@ ch.ivy.addon.portalkit.ui.jsf: fullscreenMode: Mode plein écran iconMessage: caseWidget: - BEACH_PALM_SUNBED: Vous êtes géniale - toutes les affaires sont réglées. Détendez-vous et profitez-en. - CHARGING_BATTERY_FULL_1: Il n'y a actuellement aucun cas. Il est temps de recharger un peu les batteries. - COFFEE_OF_HOT: Wow ! Bon travail ! Toutes les affaires sont terminées. Que diriez-vous d'une petite pause café ? - RANKING_WINNER_MEDAL: Jeu, set et match ! Vous avez réussi, toutes les affaires sont terminées ! - SOCCER_PLAYER: But ! Vous avez réussi, toutes les affaires sont terminées. Petite pause à la mi-temps. - YOGA_MEDITATE: Bien joué ! Tous les cas sont terminés. Inspirez, expirez, détendez-vous. + EMPTY_MESSAGE: Actuellement, il n'y a pas de cas supplémentaires disponibles. noCasesFoundWhenFilter: Il n'y a actuellement aucun cas après le filtre appliqué. taskWidget: - BEACH_PALM_SUNBED: Vous êtes génial - toutes les tâches sont terminées. Détendez-vous et profitez-en. - CHARGING_BATTERY_FULL_1: Il n'y a actuellement aucune tâche. Il est temps de recharger un peu les batteries. - COFFEE_OF_HOT: Ouah ! Bon travail ! Toutes les tâches sont terminées. Que diriez-vous d'une petite pause café ? - RANKING_WINNER_MEDAL: Jeu, set et match ! Vous avez réussi, toutes les tâches sont terminées ! - SOCCER_PLAYER: But ! Vous avez réussi, toutes les tâches sont terminées. Petite pause à la mi-temps. - YOGA_MEDITATE: Bien joué ! Toutes les tâches sont terminées. Inspirez, expirez, détendez-vous. + EMPTY_MESSAGE: Actuellement, il n'y a pas de tâches supplémentaires disponibles. noTasksFoundWhenFilter: Il n'y a actuellement aucune tâche après le filtre appliqué. loading: Chargement... noCategory: Il n'y a pas de catégories diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java index be55652e4c6..000e3f40783 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java @@ -77,8 +77,6 @@ public class DashboardBean implements Serializable { private List deleteFilters; private ITask selectedTask; private boolean isRunningTaskWhenClickingOnTaskInList; - private CaseEmptyMessage noCasesMessage; - private TaskEmptyMessage noTasksMessage; private List dashboardTemplates; protected String translatedText; protected String warningText; @@ -380,23 +378,11 @@ public void setDeleteFilters(List deleteFilters) { } public CaseEmptyMessage getNoCasesMessage() { - if (noCasesMessage == null) { - List messages = Stream.of(CaseEmptyMessage.values()).collect(Collectors.toList()); - Random random = new Random(); - int index = random.ints(0, messages.size()).findFirst().getAsInt(); - noCasesMessage = messages.get(index); - } - return noCasesMessage; + return CaseEmptyMessage.EMPTY_MESSAGE; } public TaskEmptyMessage getNoTasksMessage() { - if (noTasksMessage == null) { - List messages = Stream.of(TaskEmptyMessage.values()).collect(Collectors.toList()); - Random random = new Random(); - int index = random.ints(0, messages.size()).findFirst().getAsInt(); - noTasksMessage = messages.get(index); - } - return noTasksMessage; + return TaskEmptyMessage.EMPTY_MESSAGE; } public List getDashboardTemplates() { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/CaseEmptyMessage.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/CaseEmptyMessage.java index 940a8df59c3..749e0dc15a2 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/CaseEmptyMessage.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/CaseEmptyMessage.java @@ -3,12 +3,7 @@ import ch.ivyteam.ivy.environment.Ivy; public enum CaseEmptyMessage { - COFFEE_OF_HOT("si-coffee-cup-hot"), - YOGA_MEDITATE("si-yoga-meditate"), - RANKING_WINNER_MEDAL("si-ranking-winner-medal"), - SOCCER_PLAYER("si-soccer-player"), - CHARGING_BATTERY_FULL_1("si-charging-battery-full-1"), - BEACH_PALM_SUNBED("si-beach-palm-sunbed"); + EMPTY_MESSAGE("si-task-list-edit"); private String icon; diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/TaskEmptyMessage.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/TaskEmptyMessage.java index f1dea65d196..7cce50a3f54 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/TaskEmptyMessage.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/TaskEmptyMessage.java @@ -3,12 +3,7 @@ import ch.ivyteam.ivy.environment.Ivy; public enum TaskEmptyMessage { - COFFEE_OF_HOT("si-coffee-cup-hot"), - YOGA_MEDITATE("si-yoga-meditate"), - RANKING_WINNER_MEDAL("si-ranking-winner-medal"), - SOCCER_PLAYER("si-soccer-player"), - CHARGING_BATTERY_FULL_1("si-charging-battery-full-1"), - BEACH_PALM_SUNBED("si-beach-palm-sunbed"); + EMPTY_MESSAGE("si-task-list-edit"); private String icon;