From 5db82eb5b14e2e1fdd84775a12cc7ebe891690cf Mon Sep 17 00:00:00 2001 From: Nam Mai <117440763+mnhnam-axonivy@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:02:35 +0700 Subject: [PATCH 1/5] IVYPORTAL-17855 Various or urgent requests in IVYPORTAL - S267 > IVYPORTAL-17917 Column width feature cache after edit widget height (#1173) - Fixed bug --- .../webContent/resources/css/dashboard.css | 5 +++ .../webContent/resources/css/utility.css | 11 ++++++- .../webContent/resources/js/dashboard.js | 33 ++++++++++++++++++- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/AxonIvyPortal/portal/webContent/resources/css/dashboard.css b/AxonIvyPortal/portal/webContent/resources/css/dashboard.css index 21885da4177..ccfff416273 100644 --- a/AxonIvyPortal/portal/webContent/resources/css/dashboard.css +++ b/AxonIvyPortal/portal/webContent/resources/css/dashboard.css @@ -716,6 +716,11 @@ body .dashboard__table--edit.ui-datatable tbody tr.ui-state-hover { cursor: move; } +body .dashboard__table--edit.ui-datatable-resizable .ui-datatable-scrollable-header, +body .dashboard__table--edit.ui-datatable-resizable .ui-datatable-scrollable-footer { + background: transparent; +} + body .dashboard__table--preview.ui-datatable tbody tr.ui-state-highlight, body .dashboard__table--preview.ui-datatable tbody tr.ui-state-hover { cursor: auto; diff --git a/AxonIvyPortal/portal/webContent/resources/css/utility.css b/AxonIvyPortal/portal/webContent/resources/css/utility.css index d4c7f8262e4..6b8a3fe3de3 100644 --- a/AxonIvyPortal/portal/webContent/resources/css/utility.css +++ b/AxonIvyPortal/portal/webContent/resources/css/utility.css @@ -396,4 +396,13 @@ .w-full { width: 100%; -} \ No newline at end of file +} + +.scroll-table{ + overflow: auto; + max-height: 50vh; +} + +.w-min { + width: min-content !important; +} diff --git a/AxonIvyPortal/portal/webContent/resources/js/dashboard.js b/AxonIvyPortal/portal/webContent/resources/js/dashboard.js index 3a79ea39ca2..ddcd396b276 100644 --- a/AxonIvyPortal/portal/webContent/resources/js/dashboard.js +++ b/AxonIvyPortal/portal/webContent/resources/js/dashboard.js @@ -75,6 +75,7 @@ function loadGrid() { if (descriptionElement.length > 0) { setupImageProcessWidgetDescription(descriptionElement); } + udateResizableTablesWhenResizeWidget(); setupGridProcessWidget(); }); @@ -290,7 +291,7 @@ function loadCaseAndTaskWidgetFirstTime(loadingClass, widgetClass) { widget.removeClass('u-display-none'); widget.removeClass('u-invisibility'); } - $('.js-resizing').find('table[role="grid"]').addClass('w-fit'); + $('.js-resizing').find('table[role="grid"]').addClass('w-min'); }, 50); } @@ -497,4 +498,34 @@ function searchNewWidgetByNameOrDescription(input) { }); noResult ? $('.js-no-widget').removeClass('u-hidden') : $('.js-no-widget').addClass('u-hidden'); +} + +function udateResizableTablesWhenResizeWidget() { + const scrollableBody = document.querySelectorAll('.ui-datatable-scrollable-body'); + scrollableBody.forEach((sb) => { + let tableBody = $(sb); + if (tableBody.parents('.js-resizing').length == 0) { + return; + } + + let parentHeight = tableBody.parents('.grid-stack-item-content.card.dashboard-card').height(); + if (!window.matchMedia("(max-width: 767px)").matches) { + tableBody.height(parentHeight - 100); + } else { + tableBody.height(parentHeight * 0.9); + } + + const widgetName = tableBody.parents('.grid-stack-item').find('.js-table-widget-var').val(); + if (widgetName === undefined) { + return; + } + + // Update scrolling of the Primefaces widget + const widget = PF(widgetName); + if (widget) { + widget.cfg.scrollHeight = tableBody.parents('.ui-datatable-scrollable').height().toString(); + widget.renderDeferred(widget.cfg); + } + }); + } \ No newline at end of file From 44d3f8f3b0ef9fed6cb50df95f1fa6f5c222cff0 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Thu, 21 Nov 2024 13:52:32 +0700 Subject: [PATCH 2/5] master --- .../addon/portalkit/util/DefaultTaskListDashboardUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultTaskListDashboardUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultTaskListDashboardUtils.java index 0273579b37f..5d872bcb023 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultTaskListDashboardUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultTaskListDashboardUtils.java @@ -5,7 +5,7 @@ public class DefaultTaskListDashboardUtils { public static final String DASHBOARD_TASK_TEMPLATE_JSON = """ { "id": "default-task-list-dashboard", - "version": "11.4.0", + "version": "12.0.0", "templateId": "create-from-scratch", "titles": [ { "locale": "en", "value": "Tasks" }, @@ -26,7 +26,6 @@ public class DefaultTaskListDashboardUtils { { "locale": "es", "value": "Sus tareas" } ], "layout": { "w": 12, "h": 8, "x": 0, "y": 0 }, - "rowsPerPage": 5, "enableQuickSearch": true, "showWidgetInfo": true, "showFullscreenMode": true, From fe05a20a6e0c30b5769ee131544c35f008394016 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 22 Nov 2024 15:25:31 +0700 Subject: [PATCH 3/5] bug/IVYPORTAL-17918-BUG-Notification-bug-some-lines-have-no-message-and-cause-error-when-clicking-Start _ adapt UI --- .../src/com/axonivy/portal/bean/NotificationBean.java | 4 ++++ .../NotificationFullPage/NotificationFullPage.xhtml | 6 +++--- .../component/NotificationWidget/NotificationWidget.xhtml | 6 +++--- .../portal/webContent/layouts/includes/notification.xhtml | 6 +++--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/AxonIvyPortal/portal/src/com/axonivy/portal/bean/NotificationBean.java b/AxonIvyPortal/portal/src/com/axonivy/portal/bean/NotificationBean.java index 13fea63e014..650b84f18b4 100644 --- a/AxonIvyPortal/portal/src/com/axonivy/portal/bean/NotificationBean.java +++ b/AxonIvyPortal/portal/src/com/axonivy/portal/bean/NotificationBean.java @@ -205,4 +205,8 @@ private void handleTask(Consumer taskHandler) { } } + public boolean isActionAvailible(NotificationDto dto) { + return dto.getRunAction() != null; + } + } diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml index a0bef9b0d40..9b845e08f5f 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml @@ -53,18 +53,18 @@
- +
-
+ -
+ diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml index cd8d55a27bb..973a3d3eb8d 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml @@ -72,19 +72,19 @@
- +
-
+ -
+ diff --git a/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml b/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml index 923caf320d0..88e7d2224b0 100644 --- a/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml @@ -87,19 +87,19 @@ - + -
+ -
+ From 674e2e84b13ae6f22312b0df0e3b253afa94e424 Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Fri, 22 Nov 2024 16:59:02 +0700 Subject: [PATCH 4/5] bug/IVYPORTAL-17918-BUG-Notification-bug-some-lines-have-no-message-and-cause-error-when-clicking-Start --- .../NotificationFullPage.xhtml | 21 ++++++++++++------- .../NotificationWidget.xhtml | 13 ++++++++---- .../layouts/includes/notification.xhtml | 16 ++++++++------ 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml index 9b845e08f5f..b8943e2ec88 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml @@ -50,14 +50,19 @@ -
- - - - - -
+
+ + + + + + + + + + +
diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml index 973a3d3eb8d..6f9adc62ba9 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml @@ -70,12 +70,17 @@ value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/notifications/markAsRead')}" />
- + + + + + + - - +
diff --git a/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml b/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml index 88e7d2224b0..8bb65992ae6 100644 --- a/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml @@ -84,13 +84,17 @@ value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/notifications/markAsRead')}" />
- - - + + + + - + + + + +
Date: Mon, 25 Nov 2024 09:40:43 +0700 Subject: [PATCH 5/5] bug/IVYPORTAL-17918-BUG-Notification-bug-some-lines-have-no-message-and-cause-error-when-clicking-Start _ update error message --- AxonIvyPortal/portal/cms/cms_de.yaml | 2 ++ AxonIvyPortal/portal/cms/cms_en.yaml | 1 + AxonIvyPortal/portal/cms/cms_es.yaml | 2 ++ AxonIvyPortal/portal/cms/cms_fr.yaml | 1 + .../component/NotificationFullPage/NotificationFullPage.xhtml | 2 +- .../component/NotificationWidget/NotificationWidget.xhtml | 2 +- .../portal/webContent/layouts/includes/notification.xhtml | 2 +- 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index 12ab6c82827..dba271808ec 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -983,6 +983,8 @@ ch.ivy.addon.portalkit.ui.jsf: newNoteHeader: Neue Notiz hinzufügen wroteAt: Erstellt am notifications: + errorNotificationMessage: | + Die Details für die neue Aufgabe konnten nicht angezeigt werden. Bitte wenden Sie sich an Ihren Administrator, um Unterstützung zu erhalten linkToFullScreen: Link zum Vollbild linkToNotificationSettings: Benachrichtigungseinstellungen markAllAsRead: Alle als gelesen markieren diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index 60c442e9f48..736d2a57696 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -985,6 +985,7 @@ ch.ivy.addon.portalkit.ui.jsf: newNoteHeader: Add new note wroteAt: wrote at notifications: + errorNotificationMessage: We couldn't display the details for the new task. Please contact your administrator for assistance linkToFullScreen: Link to full screen linkToNotificationSettings: Notification settings markAllAsRead: Mark all as read diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index 8a32f765f4b..9203699fa3f 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -982,6 +982,8 @@ ch.ivy.addon.portalkit.ui.jsf: newNoteHeader: Agregar nueva nota wroteAt: escribió en notifications: + errorNotificationMessage: | + No pudimos mostrar los detalles de la nueva tarea. Por favor, contacte con su administrador para obtener ayuda linkToFullScreen: Enlace a la pantalla completa linkToNotificationSettings: Ajustes de notificación markAllAsRead: Marcar todo como leído diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index d100701e6ec..fe6cc3f770b 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -980,6 +980,7 @@ ch.ivy.addon.portalkit.ui.jsf: newNoteHeader: Ajouter une nouvelle note wroteAt: Ajoutée le notifications: + errorNotificationMessage: Nous n'avons pas pu afficher les détails de la nouvelle tâche. Veuillez contacter votre administrateur pour obtenir de l'aide linkToFullScreen: Lien vers le plein écran linkToNotificationSettings: Paramètres de notification markAllAsRead: Marquer tous les textes comme lus diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml index b8943e2ec88..b050e4a94d6 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/NotificationFullPage/NotificationFullPage.xhtml @@ -59,7 +59,7 @@ - + diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml index 6f9adc62ba9..bf9264b4eda 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/NotificationWidget/NotificationWidget.xhtml @@ -79,7 +79,7 @@ - + diff --git a/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml b/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml index 8bb65992ae6..eed266974d9 100644 --- a/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/includes/notification.xhtml @@ -92,7 +92,7 @@ - +