From 926dec3d4159f69815d01c43fe1af889b6818e92 Mon Sep 17 00:00:00 2001 From: lmluat-axonivy Date: Wed, 18 Dec 2024 15:27:12 +0700 Subject: [PATCH 1/3] bug/IVYPORTAL-18147-Adding-new-dashboard-dialogs-with-templates-store-permission-value-when-closing - setPermissionDTOs with empty list when opening new adding dashboard dialog --- .../portal/generic/bean/DashboardTemplateSelectionBean.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java index 0b7a3a48e8a..faa2c09c26d 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java @@ -2,6 +2,7 @@ import java.io.Serializable; import java.util.ArrayList; +import java.util.Collections; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; @@ -46,6 +47,7 @@ private void onAddDashboard(boolean isPublicDashboard) { private void mappingCommonDataToNewDashboard(String templateId, String dashboardId) { this.selectedDashboard.setTemplateId(templateId); + this.selectedDashboard.setPermissionDTOs(Collections.emptyList()); this.selectedDashboard.setId(dashboardId); this.selectedDashboard.setTitles(new ArrayList<>()); this.selectedDashboard.setIcon(this.isPublicDashboard ? PUBLIC_DASHBOARD_DEFAULT_ICON : PRIVATE_DASHBOARD_DEFAULT_ICON); From 642cef6a01833d0edebe975176f8955413b76c36 Mon Sep 17 00:00:00 2001 From: lmluat-axonivy Date: Thu, 19 Dec 2024 09:46:27 +0700 Subject: [PATCH 2/3] bug/IVYPORTAL-18147-Adding-new-dashboard-dialogs-with-templates-store-permission-value-when-closing - Handle feedback --- .../portal/generic/bean/DashboardTemplateSelectionBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java index faa2c09c26d..82181765057 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java @@ -47,7 +47,7 @@ private void onAddDashboard(boolean isPublicDashboard) { private void mappingCommonDataToNewDashboard(String templateId, String dashboardId) { this.selectedDashboard.setTemplateId(templateId); - this.selectedDashboard.setPermissionDTOs(Collections.emptyList()); + this.selectedDashboard.setPermissionDTOs(new ArrayList<>()); this.selectedDashboard.setId(dashboardId); this.selectedDashboard.setTitles(new ArrayList<>()); this.selectedDashboard.setIcon(this.isPublicDashboard ? PUBLIC_DASHBOARD_DEFAULT_ICON : PRIVATE_DASHBOARD_DEFAULT_ICON); From 55a87f077467f5538524492fc7841424f78ba119 Mon Sep 17 00:00:00 2001 From: lmluat-axonivy Date: Thu, 19 Dec 2024 09:53:40 +0700 Subject: [PATCH 3/3] bug/IVYPORTAL-18147-Adding-new-dashboard-dialogs-with-templates-store-permission-value-when-closing - Clean code --- .../portal/generic/bean/DashboardTemplateSelectionBean.java | 1 - 1 file changed, 1 deletion(-) diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java index 82181765057..a1fd3a1c3c4 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardTemplateSelectionBean.java @@ -2,7 +2,6 @@ import java.io.Serializable; import java.util.ArrayList; -import java.util.Collections; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped;