From 81554d2f6d628164c5b71071c57beb9e08e482da Mon Sep 17 00:00:00 2001 From: mnhnam-axonivy Date: Fri, 15 Nov 2024 11:08:09 +0700 Subject: [PATCH 01/17] IVYPORTAL-17855 Various or urgent requests in IVYPORTAL - S267 > IVYPORTAL-17899 Complex filter error when closing filter form with null filter - Fixed bug - Correct method name --- .../addon/portalkit/dto/dashboard/CaseDashboardWidget.java | 6 +++++- .../addon/portalkit/dto/dashboard/TaskDashboardWidget.java | 6 +++++- .../bean/dashboard/filter/TaskWidgetUserFilterBean.java | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java index b3f562bca65..8157abba8e8 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java @@ -240,7 +240,11 @@ public void loadUserFilter() { updateSavedFiltersSelection(); // Don't load user filters when already loaded from session - if (CollectionUtils.isNotEmpty(getUserFilters())) { + List userFilters = getUserFilters(); + if (CollectionUtils.isNotEmpty(userFilters)) { + // Clear temporary filters + setUserFilters(userFilters.stream().filter(filter -> !filter.isTemp()) + .collect(Collectors.toList())); return; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java index 4a966419394..01934307f70 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java @@ -265,7 +265,11 @@ public void loadUserFilter() { updateSavedFiltersSelection(); // Don't load user filters when already loaded from session - if (CollectionUtils.isNotEmpty(getUserFilters())) { + List userFilters = getUserFilters(); + if (CollectionUtils.isNotEmpty(userFilters)) { + // Clear temporary filters + setUserFilters(userFilters.stream().filter(filter -> !filter.isTemp()) + .collect(Collectors.toList())); return; } diff --git a/AxonIvyPortal/portal/src/com/axonivy/portal/bean/dashboard/filter/TaskWidgetUserFilterBean.java b/AxonIvyPortal/portal/src/com/axonivy/portal/bean/dashboard/filter/TaskWidgetUserFilterBean.java index d34287c2616..899a8379bc0 100644 --- a/AxonIvyPortal/portal/src/com/axonivy/portal/bean/dashboard/filter/TaskWidgetUserFilterBean.java +++ b/AxonIvyPortal/portal/src/com/axonivy/portal/bean/dashboard/filter/TaskWidgetUserFilterBean.java @@ -28,11 +28,11 @@ public class TaskWidgetUserFilterBean extends AbstractTaskWidgetFilterBean imple @Override public void preRender(TaskDashboardWidget widget) { super.preRender(widget); - initUSerFilters(); + initUserFilters(); originalUserFilters = widget.getUserFilters(); } - private void initUSerFilters() { + private void initUserFilters() { if (CollectionUtils.isEmpty(Optional.ofNullable(this.widget).map(TaskDashboardWidget::getUserFilters).get())) { return; } From aae3100dffa455328c5b0dec03e1afe39f57421b Mon Sep 17 00:00:00 2001 From: mnhnam-axonivy Date: Mon, 18 Nov 2024 15:11:42 +0700 Subject: [PATCH 02/17] IVYPORTAL-17982 Various or urgent requests in IVYPORTAL - S268 > IVYPORTAL-17987 Dashboard configuration improvements - Upgraded latest Json version to 12.0.0 - Removed rowsPerPage attribute --- .../components/ivydata/bo/JsonVersion.java | 2 +- .../config/variables/Portal/Dashboard.json | 35 ++---- .../variables/Portal/DashboardTemplates.json | 113 +++++++----------- .../dto/dashboard/CaseDashboardWidget.java | 9 -- .../dto/dashboard/TaskDashboardWidget.java | 9 -- .../bo/jsonversion/AbstractJsonVersion.java | 2 +- 6 files changed, 54 insertions(+), 116 deletions(-) diff --git a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/ivydata/bo/JsonVersion.java b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/ivydata/bo/JsonVersion.java index c5b79675b9a..41f2b12c747 100644 --- a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/ivydata/bo/JsonVersion.java +++ b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/ivydata/bo/JsonVersion.java @@ -5,7 +5,7 @@ import org.apache.commons.lang3.StringUtils; public class JsonVersion implements Comparable { - public static final JsonVersion LATEST = new JsonVersion("10.0.0"); + public static final JsonVersion LATEST = new JsonVersion("12.0.0"); private String value; diff --git a/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json b/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json index 1565091a5d6..565e23b7bc0 100644 --- a/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json +++ b/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json @@ -1,7 +1,7 @@ [ { "id": "1", - "version": "11.4.0", + "version": "12.0.0", "templateId": "default-portal-dashboard-template", "titles": [ { @@ -51,7 +51,6 @@ "y": 2 }, "enableQuickSearch": true, - "rowsPerPage": 5, "columns": [ { "field": "start" @@ -61,21 +60,17 @@ }, { "field": "id", - "visible": false, - "quickSearch": false + "visible": false }, { - "field": "name", - "quickSearch": true + "field": "name" }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { - "field": "activator", - "quickSearch": false + "field": "activator" }, { "field": "state", @@ -90,8 +85,7 @@ }, { "field": "category", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "actions" @@ -140,27 +134,23 @@ "x": 3, "y": 8 }, - "rowsPerPage": 5, + "enableQuickSearch": true, "columns": [ { - "field": "id", - "quickSearch": false + "field": "id" }, { - "field": "name", - "quickSearch": true + "field": "name" }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "state" }, { - "field": "creator", - "quickSearch": false + "field": "creator" }, { "field": "startTimestamp" @@ -171,8 +161,7 @@ }, { "field": "category", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "actions" diff --git a/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json b/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json index c1d838f125b..298ad622469 100644 --- a/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json +++ b/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json @@ -1,6 +1,6 @@ [ { - "version": "11.4.0", + "version": "12.0.0", "id": "default-portal-dashboard-template", "titles": [ { @@ -71,7 +71,6 @@ "y": 2 }, "enableQuickSearch": true, - "rowsPerPage": 5, "canWorkOn": true, "columns": [ { @@ -82,37 +81,30 @@ }, { "field": "id", - "visible": false, - "quickSearch": false + "visible": false }, { - "field": "name", - "quickSearch": true + "field": "name" }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { - "field": "activator", - "quickSearch": false + "field": "activator" }, { - "field": "state", - "visible": false + "field": "state" }, { - "field": "startTimestamp", - "visible": false + "field": "startTimestamp" }, { "field": "expiryTimestamp" }, { "field": "category", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "actions" @@ -160,27 +152,23 @@ "x": 3, "y": 8 }, - "rowsPerPage": 5, + "enableQuickSearch": true, "columns": [ { - "field": "id", - "quickSearch": false + "field": "id" }, { - "field": "name", - "quickSearch": true + "field": "name" }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "state" }, { - "field": "creator", - "quickSearch": false + "field": "creator" }, { "field": "startTimestamp" @@ -191,8 +179,7 @@ }, { "field": "category", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "actions" @@ -351,7 +338,7 @@ } }, { - "version": "11.4.0", + "version": "12.0.0", "id": "two-task-widget-dashboard-template", "titles": [ { @@ -410,7 +397,7 @@ "x": 0, "y": 0 }, - "rowsPerPage": 5, + "enableQuickSearch": true, "sortDescending": true, "columns": [ { @@ -427,8 +414,7 @@ }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "activator", @@ -473,7 +459,7 @@ "x": 0, "y": 5 }, - "rowsPerPage": 5, + "enableQuickSearch": true, "sortDescending": true, "columns": [ { @@ -490,8 +476,7 @@ }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "activator", @@ -536,7 +521,8 @@ "h": 10, "x": 9, "y": 0 - } + }, + "enableQuickSearch": true } ], "permissions": [ @@ -545,7 +531,7 @@ } }, { - "version": "11.4.0", + "version": "12.0.0", "id": "accessibility-dashboard-template", "titles": [ { @@ -591,7 +577,7 @@ "widgets": [ { "type": "task", - "id": "task_d898829cd7a745a0812f44923e3596d1", + "id": "task_1", "names": [ { "locale": "en", @@ -616,9 +602,7 @@ "x": 3, "y": 3 }, - "rowsPerPage": 5, - "enableQuickSearch": false, - "showWidgetInfo": true, + "enableQuickSearch": true, "showFullscreenMode": false, "columns": [ { @@ -628,15 +612,13 @@ "field": "actions" }, { - "field": "name", - "quickSearch": false + "field": "name" }, { "field": "priority" }, { - "field": "activator", - "quickSearch": false + "field": "activator" }, { "field": "state" @@ -649,18 +631,15 @@ }, { "field": "id", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "category", - "visible": false, - "quickSearch": false + "visible": false } ], "sortField": "id", @@ -669,7 +648,7 @@ }, { "type": "compact-process", - "id": "process_de6d9dc244334aeeafeef353d5f70488", + "id": "process_1", "names": [ { "locale": "en", @@ -695,13 +674,11 @@ "y": 3 }, "showFullscreenMode": false, - "showWidgetInfo": true, - "sorting": "BY_ALPHABETICALLY", - "enableQuickSearch": false + "enableQuickSearch": true }, { "type": "custom", - "id": "custom_e736fea7d4044b21b17a21a5b694e6a9", + "id": "custom_1", "names": [ { "locale": "en", @@ -733,7 +710,7 @@ }, { "type": "case", - "id": "case_46a4814004424383872bf5c19098d657", + "id": "case_1", "names": [ { "locale": "en", @@ -758,31 +735,25 @@ "x": 3, "y": 7 }, - "rowsPerPage": 5, - "enableQuickSearch": false, - "showWidgetInfo": true, + "enableQuickSearch": true, "showFullscreenMode": false, "columns": [ { "field": "id", - "visible": false, - "quickSearch": false + "visible": false }, { - "field": "name", - "quickSearch": false + "field": "name" }, { "field": "description", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "state" }, { - "field": "creator", - "quickSearch": false + "field": "creator" }, { "field": "startTimestamp" @@ -795,15 +766,11 @@ }, { "field": "category", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "application", - "styleClass": "dashboard-tasks__priority u-text-align-center", - "style": "width: 80px", - "visible": false, - "quickSearch": false + "visible": false }, { "field": "actions" diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java index b3f562bca65..97280c403f6 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java @@ -31,7 +31,6 @@ public class CaseDashboardWidget extends DashboardWidget { private static final long serialVersionUID = 3048837559125720787L; - private int rowsPerPage = 5; @JsonIgnore private DashboardCaseLazyDataModel dataModel; @JsonIgnore @@ -192,14 +191,6 @@ public DashboardWidgetType getType() { return DashboardWidgetType.CASE; } - public int getRowsPerPage() { - return rowsPerPage; - } - - public void setRowsPerPage(int rowsPerPage) { - this.rowsPerPage = rowsPerPage; - } - public List getFilters() { return this.dataModel.getCriteria().getFilters(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java index 4a966419394..f9259e6dfc1 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java @@ -32,7 +32,6 @@ public class TaskDashboardWidget extends DashboardWidget { private static final long serialVersionUID = 3246735956282078091L; protected static final String LIKE_FORMAT = "%%%s%%"; - private int rowsPerPage = 5; @JsonIgnore private DashboardTaskLazyDataModel dataModel; @JsonIgnore @@ -200,14 +199,6 @@ public DashboardWidgetType getType() { return DashboardWidgetType.TASK; } - public int getRowsPerPage() { - return isInConfiguration() ? 5 : rowsPerPage; - } - - public void setRowsPerPage(int rowsPerPage) { - this.rowsPerPage = rowsPerPage; - } - @Override public void setQuickSearchKeyword() { if (BooleanUtils.isTrue(this.enableQuickSearch)) { diff --git a/AxonIvyPortal/portal/src/com/axonivy/portal/bo/jsonversion/AbstractJsonVersion.java b/AxonIvyPortal/portal/src/com/axonivy/portal/bo/jsonversion/AbstractJsonVersion.java index 02cd885de64..0f5d0e370a7 100644 --- a/AxonIvyPortal/portal/src/com/axonivy/portal/bo/jsonversion/AbstractJsonVersion.java +++ b/AxonIvyPortal/portal/src/com/axonivy/portal/bo/jsonversion/AbstractJsonVersion.java @@ -7,7 +7,7 @@ public abstract class AbstractJsonVersion implements Comparable { public static final String VERSION_FIELD_NAME = "version"; - public static final String LATEST = "11.4.0"; + public static final String LATEST = "12.0.0"; public static final String OLDEST = "10.0.0"; private String value; From f72850956b56c43998ae8e183dbed409264d9287 Mon Sep 17 00:00:00 2001 From: mnhnam-axonivy Date: Tue, 19 Nov 2024 11:32:37 +0700 Subject: [PATCH 03/17] IVYPORTAL-17982 Various or urgent requests in IVYPORTAL - S268 > IVYPORTAL-17725 Column header highlight bug - Fixed bug --- AxonIvyPortal/portal/webContent/resources/js/dashboard.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AxonIvyPortal/portal/webContent/resources/js/dashboard.js b/AxonIvyPortal/portal/webContent/resources/js/dashboard.js index ddcd396b276..c47154a8e32 100644 --- a/AxonIvyPortal/portal/webContent/resources/js/dashboard.js +++ b/AxonIvyPortal/portal/webContent/resources/js/dashboard.js @@ -232,6 +232,12 @@ function resizeTableBody() { widget.init(widget.cfg); } widget.setupScrolling(); + + // Remove focus state of header after sort it + if (widget.headerTable.length == 1) { + var widgetHeader = widget.headerTable[0]; + $(widgetHeader).find('th.ui-state-focus').removeClass('ui-state-focus'); + } }); setTimeout(function() { resizeObserver.observe(sb); From 8a34a901cdd16c054edeed055c14a4adf68d1e71 Mon Sep 17 00:00:00 2001 From: mnhnam-axonivy Date: Tue, 19 Nov 2024 14:35:03 +0700 Subject: [PATCH 04/17] IVYPORTAL-17982 Various or urgent requests in IVYPORTAL - S268 > IVYPORTAL-17997 Bug appear after remove the only dashboard in Portal - Fixed bug --- .../ch/ivy/addon/portal/generic/bean/DashboardBean.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 bae9fef997f..cca7ec27ad3 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 @@ -4,6 +4,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; @@ -506,7 +507,11 @@ public boolean isHideCaseCreator() { } public String getScreenReaderNotificationContent() { - if (this.selectedDashboard != null && ACCESSIBILITY_DASHBOARD_TEMPLATE_ID.equals(this.selectedDashboard.getTemplateId())) { + String templateId = Optional.ofNullable(this.selectedDashboard) + .map(Dashboard::getTemplateId).orElse(StringUtils.EMPTY); + + if (StringUtils.isNotBlank(templateId) + && ACCESSIBILITY_DASHBOARD_TEMPLATE_ID.equals(templateId)) { return Ivy.cms().co("/Dialogs/com/axonivy/portal/dashboard/component/AccessibilityShortcuts/title"); } return StringUtils.EMPTY; From 5e0f5ff07929d332062566da11282f5366e498f2 Mon Sep 17 00:00:00 2001 From: "Nam.Chu" Date: Tue, 19 Nov 2024 16:05:08 +0700 Subject: [PATCH 05/17] IVYPORTAL-17822-LTS-Testing-Buffer-Story-filter-on-mobile - first commit --- .../restricted/decorator/TableWidget.xhtml | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml index 3170d726d9d..009c951b5f5 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml @@ -196,13 +196,13 @@ for="filter-sidebar-link-#{index}" rendered="#{renderFilter}" appendTo="@(body)" - styleClass="filter-overlay-panel js-dashboard-overlay-panel" + styleClass="filter-overlay-panel js-dashboard-overlay-panel ui-sm-12" dismissable="false" dynamic="true" onShow="loadUserFilters#{index}(); #{onFilterOverlayPanelShow};"> - +
@@ -213,9 +213,8 @@
- -
+ +
#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/Filter/FilterOptionHeader')}