diff --git a/AxonIvyPortal/PortalKitTestHelper/pom.xml b/AxonIvyPortal/PortalKitTestHelper/pom.xml index 9b1856defa9..79b9a3a82a9 100644 --- a/AxonIvyPortal/PortalKitTestHelper/pom.xml +++ b/AxonIvyPortal/PortalKitTestHelper/pom.xml @@ -7,8 +7,8 @@ 9.1.0.0-SNAPSHOT iar - 12.0.1 - 12.0.0-SNAPSHOT + 12.0.2 + 12.0.0 UTF-8 diff --git a/AxonIvyPortal/portal-components/pom.xml b/AxonIvyPortal/portal-components/pom.xml index 7f1813bde05..ab5abfd88c3 100644 --- a/AxonIvyPortal/portal-components/pom.xml +++ b/AxonIvyPortal/portal-components/pom.xml @@ -16,8 +16,8 @@ - 12.0.1 - 12.0.0-SNAPSHOT + 12.0.2 + 12.0.0 UTF-8 diff --git a/AxonIvyPortal/portal-migration/pom.xml b/AxonIvyPortal/portal-migration/pom.xml index fab872d578f..ae3e7224111 100644 --- a/AxonIvyPortal/portal-migration/pom.xml +++ b/AxonIvyPortal/portal-migration/pom.xml @@ -6,8 +6,8 @@ 9.4.0 iar - 12.0.1 - 12.0.0-SNAPSHOT + 12.0.2 + 12.0.0 diff --git a/AxonIvyPortal/portal-selenium-test/customized_pom.xml b/AxonIvyPortal/portal-selenium-test/customized_pom.xml index 09309492b2a..254cb3b2a27 100644 --- a/AxonIvyPortal/portal-selenium-test/customized_pom.xml +++ b/AxonIvyPortal/portal-selenium-test/customized_pom.xml @@ -6,8 +6,8 @@ 9.1.0.0-SNAPSHOT iar - 12.0.0-SNAPSHOT - 12.0.1 + 12.0.0 + 12.0.2 UTF-8 diff --git a/AxonIvyPortal/portal-selenium-test/document_screenshot_pom.xml b/AxonIvyPortal/portal-selenium-test/document_screenshot_pom.xml index 09bffcb6333..ce671e75e8b 100644 --- a/AxonIvyPortal/portal-selenium-test/document_screenshot_pom.xml +++ b/AxonIvyPortal/portal-selenium-test/document_screenshot_pom.xml @@ -6,8 +6,8 @@ 9.1.0.0-SNAPSHOT pom - 12.0.0-SNAPSHOT - 12.0.1 + 12.0.0 + 12.0.2 UTF-8 diff --git a/AxonIvyPortal/portal-selenium-test/jmeter/portal_walkthrough_testplan.jmx b/AxonIvyPortal/portal-selenium-test/jmeter/portal_walkthrough_testplan.jmx index b8279fee7d0..68a9ea29895 100644 --- a/AxonIvyPortal/portal-selenium-test/jmeter/portal_walkthrough_testplan.jmx +++ b/AxonIvyPortal/portal-selenium-test/jmeter/portal_walkthrough_testplan.jmx @@ -1650,7 +1650,7 @@ true - Create test data with category attach to one business case + Business case has lots of tasks cases = true case-default_case_list_dashboard_case_1:quick-search-form:quick-search-input-0 diff --git a/AxonIvyPortal/portal-selenium-test/pom.xml b/AxonIvyPortal/portal-selenium-test/pom.xml index 9b533775639..59acebbe3a2 100644 --- a/AxonIvyPortal/portal-selenium-test/pom.xml +++ b/AxonIvyPortal/portal-selenium-test/pom.xml @@ -7,8 +7,8 @@ 9.1.0.0-SNAPSHOT iar - 12.0.1 - 12.0.0-SNAPSHOT + 12.0.2 + 12.0.0 UTF-8 diff --git a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js index 72d33cbad1f..d6de1e6f34c 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js +++ b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js @@ -124,7 +124,7 @@ function highlightProcessItems() { } function highlightEditProcessIcon() { - appendStepAnnotation($("[id$='process-widget:edit-process-form:edit-process-icon:awesome-icon-selection']"), "4", -10, 100); + appendStepAnnotation($("[id$='process-widget:edit-process-form:edit-process-icon:awesome-icon-selection']"), "4", -40, 110); } function highlightEditProcessDialog() { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalCasesScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalCasesScreenshotTest.java index ffd8a3412be..8a6f125fe7f 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalCasesScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalCasesScreenshotTest.java @@ -84,7 +84,7 @@ public void screenshotCaseDetails() throws IOException { ScreenshotUtils.captureElementWithMarginOptionScreenshot(detailsPage.openAddAttachmentDialog(), ScreenshotUtils.CASE_DETAIL_FOLDER + "how-to-attach-document-to-case", new ScreenshotMargin(10)); detailsPage.closeAddAttachmentDialog(); - detailsPage.uploadDocumentWithoutError(FileHelper.getAbsolutePathToTestFile("test-no-files-no-js.pdf")); + detailsPage.uploadDocument(FileHelper.getAbsolutePathToTestFile("test-no-files-no-js.pdf")); refreshPage(); detailsPage.waitForCaseDetailsDisplay(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalProcessesScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalProcessesScreenshotTest.java index d7421a40e6a..84856693bec 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalProcessesScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/PortalProcessesScreenshotTest.java @@ -79,10 +79,11 @@ public void screenshotPortalFullProcessesList() throws IOException { ScreenshotUtils.captureElementWithMarginOptionScreenshot(processWidget.getProcessEditMenu(0), ScreenshotUtils.PROCESSES_WIDGET_FOLDER + "edit-process-menu-item", new ScreenshotMargin(150, 200)); processWidget.clickOnProcessEditMenu(0); + ScreenshotUtils.maximizeBrowser(); ScreenshotUtils.executeDecorateJs("highlightEditProcessDialog()"); ScreenshotUtils.executeDecorateJs("highlightEditProcessIcon()"); ScreenshotUtils.captureElementWithMarginOptionScreenshot(processWidget.getEditProcessDialog(), - ScreenshotUtils.PROCESSES_WIDGET_FOLDER + "edit-process-dialog", new ScreenshotMargin(10)); + ScreenshotUtils.PROCESSES_WIDGET_FOLDER + "edit-process-dialog", new ScreenshotMargin(5)); ScreenshotUtils.resizeBrowser(new Dimension(1366, 800)); refreshPage(); processWidget.waitUtilProcessWidgetDisplayed(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java index cec20f12a4e..e069a25ee19 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseDetailsPage.java @@ -850,6 +850,11 @@ public void uploadDocumentWithoutError(String pathToFile) { $("button[id$='document:document-upload-close-command']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) .click(); } + + public void uploadDocument(String pathToFile) { + $("input[id$='document-upload-panel_input']").shouldBe(exist, DEFAULT_TIMEOUT) + .shouldBe(Condition.hidden, DEFAULT_TIMEOUT).sendKeys(pathToFile); + } public void openAddDocumentDialogAndUploadDocument(String pathToFile) { getAddAttachmentDialog(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java index 4b2914eac2b..59a7e13f672 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java @@ -162,7 +162,7 @@ public void nextPageTable() { } public void resetFilter() { - $("div.filter-overlay-panel__footer").shouldBe(appear, DEFAULT_TIMEOUT).$$("button[id$='reset-button']") + $("div.filter-overlay-panel__footer").shouldBe(appear, DEFAULT_TIMEOUT).$$("a[id$='reset-button']") .filter(text("Reset")).first().shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); $("div.filter-overlay-panel__footer").shouldBe(disappear, DEFAULT_TIMEOUT); waitForElementClickable($$("div.table-widget-panel") @@ -269,7 +269,7 @@ public void removeAllFilterItems() { } public void openManageFiltersDialog() { - $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button").shouldBe(getClickableCondition()).click(); + $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("a").shouldBe(getClickableCondition()).click(); } public void closeManageFilterDialog() { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java index aa73b4029ce..d06faa3f5f6 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java @@ -545,7 +545,7 @@ public SelenideElement getCompactModeProcessFilterPanelSaveButton() { } public SelenideElement getCompactModeProcessFilterPanelResetButton() { - return getCompactModeProcessFilterPanel().$("button[id$=':reset-button']"); + return getCompactModeProcessFilterPanel().$("a[id$=':reset-button']"); } public void resetCompactModeProcessFilterPanel() { @@ -1033,7 +1033,7 @@ public NotificationCompactPage openNotificationPanel() { } public void clickOnManageFilterLink() { - $("div[class*='filter-overlay-panel__footer']").shouldBe(appear, DEFAULT_TIMEOUT).$("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button[class*='saved-filter__manage-filter']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); + $("div[class*='filter-overlay-panel__footer']").shouldBe(appear, DEFAULT_TIMEOUT).$("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("a[class*='saved-filter__manage-filter']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); $("[id$='manage-filter-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java index b2c269d7f42..c94ce3ae09f 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java @@ -132,7 +132,7 @@ public void applyFilter() { } public void resetFilter() { - $("div.filter-overlay-panel__footer").shouldBe(appear, DEFAULT_TIMEOUT).$$("button[id$='reset-button']") + $("div.filter-overlay-panel__footer").shouldBe(appear, DEFAULT_TIMEOUT).$$("a[id$='reset-button']") .filter(text("Reset")).first().shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); } @@ -183,7 +183,7 @@ public boolean hasSavedFilterItem(String filterName) { } public void clickOnManageFilterLink() { - $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button").shouldBe(getClickableCondition()).click(); + $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("a").shouldBe(getClickableCondition()).click(); $("[id$='manage-filter-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); } @@ -530,7 +530,7 @@ public void saveFilter(String widgetFilterName) { } public void openManageFiltersDialog() { - $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button").shouldBe(getClickableCondition()).click(); + $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("a").shouldBe(getClickableCondition()).click(); } public void removeAllFilterItems() { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java index 4038d8afe67..952b993f09e 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java @@ -481,6 +481,10 @@ public NewDashboardPage openTaskList() { return openMainMenu().selectTaskMenu(); } + public void waitForTaskTitleAppear() { + waitForElementDisplayed(By.id("title"), true); + } + public void waitForIFrameContentVisible() { waitForIFrameScreenshotSizeGreaterThan(IFRAME_SCREENSHOT_FILE_SIZE_AT_MINIMUM); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java index f0b988a2334..8699cc2c955 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java @@ -8,6 +8,7 @@ import com.axonivy.portal.selenium.common.NavigationHelper; import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; +import com.axonivy.portal.selenium.page.TaskIFrameTemplatePage; import com.axonivy.portal.selenium.page.TopMenuTaskWidgetPage; import com.axonivy.portal.selenium.page.UserProfilePage; import com.axonivy.portal.selenium.page.WorkingTaskDialogFromUserProfilePage; @@ -26,9 +27,10 @@ public void setup() { public void testChangeLanguageWhenWorkingOnTask() { NavigationHelper.navigateToTaskList(); TopMenuTaskWidgetPage taskWidget = new TopMenuTaskWidgetPage(); - taskWidget.startTaskIFrameByIndex(0); + TaskIFrameTemplatePage taskPage = taskWidget.startTaskIFrameByIndex(0); taskWidget.switchBackToParent(); - taskWidget.clickOnMyProfile(); + taskPage.waitForTaskTitleAppear(); + taskPage.clickOnMyProfile(); WorkingTaskDialogFromUserProfilePage workingTaskDialogPage = new WorkingTaskDialogFromUserProfilePage(); workingTaskDialogPage.leaveTask(); UserProfilePage userProfilePage = new UserProfilePage(); diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index dd66e122eea..f7223acbf51 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -410,6 +410,7 @@ ch.ivy.addon.portalkit.ui.jsf: active: Aktiviert add: Hinzufügen addDocument: Dokument hinzufügen + addLink: Link hinzufügen addNote: Notiz hinzufügen allCategories: Alle Kategorien allTypes: Alle Typen diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index aee201428bf..73c02a2e09d 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -409,6 +409,7 @@ ch.ivy.addon.portalkit.ui.jsf: active: Active add: Add addDocument: Add document + addLink: Add Link addNote: Add note allCategories: All Categories allTypes: All types diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index f74b3738de8..cc0eeedb7d0 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -411,6 +411,7 @@ ch.ivy.addon.portalkit.ui.jsf: active: Activado add: Añadir addDocument: Agregar documento + addLink: Añadir enlace addNote: Agregar nota allCategories: Todas las categorias allTypes: Todos los tipos diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index 53419436396..c343a2a9a7b 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -408,6 +408,7 @@ ch.ivy.addon.portalkit.ui.jsf: active: Activé add: Ajouter addDocument: Ajouter un document + addLink: Ajouter un lien addNote: Ajouter une note allCategories: Toutes les catégories allTypes: Tous les types diff --git a/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json b/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json index c222e3a9993..c3116189da4 100644 --- a/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json +++ b/AxonIvyPortal/portal/config/variables/Portal/Dashboard.json @@ -377,7 +377,7 @@ ], "layout": { "w": 12, - "h": 8, + "h": 12, "x": 0, "y": 0 }, @@ -489,7 +489,7 @@ ], "layout": { "w": 12, - "h": 8, + "h": 12, "x": 0, "y": 0 }, diff --git a/AxonIvyPortal/portal/pom.xml b/AxonIvyPortal/portal/pom.xml index 5c7f9309e22..706213bcb9e 100644 --- a/AxonIvyPortal/portal/pom.xml +++ b/AxonIvyPortal/portal/pom.xml @@ -17,8 +17,8 @@ - 12.0.1 - 12.0.0-SNAPSHOT + 12.0.2 + 12.0.0 UTF-8 diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java index 668df5c4364..25dc3cf939d 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java @@ -91,8 +91,6 @@ public void buildPortalLeftMenu(ITask workingTask, boolean isWorkingOnATask) { mainMenuModel = new DefaultMenuModel(); mainMenuModel.getElements().add(buildDashboardItem()); // menuIndex = 0 - - List subMenuItems = PortalMenuNavigator.callSubMenuItemsProcess(); int menuIndex = 1; for (SubMenuItem subMenu : subMenuItems) { @@ -152,13 +150,17 @@ private MenuElement buildDashboardItem() { String mainMenuDisplayName = mainMenuEntryService.getNameInCurrentLocale(); String mainMenuIcon = mainMenuEntryService.getMenuIcon(); - var subItemDashboards = getSubItemDashboards(); + List subItemDashboards = getSubItemDashboards(); if (subItemDashboards.size() > 1) { return buildDashboardGroupMenu(subItemDashboards, dashboardTitle, mainMenuDisplayName, mainMenuIcon, currentLanguage, dashboardLink); + } else if (subItemDashboards.size() == 1) { + Dashboard dashboard = subItemDashboards.getFirst(); + String localizedTitle = getLocalizedTitle(dashboard, currentLanguage, dashboardTitle); + return buildSingleDashboardMenu(localizedTitle, dashboardId, dashboardLink, dashboard.getIcon()); } - - return buildSingleDashboardMenu(dashboardTitle, dashboardId, dashboardLink); + + return buildSingleDashboardMenu(dashboardTitle, "", dashboardLink, ""); } private String determineDashboardLink() { @@ -240,9 +242,11 @@ private void setMenuExpansion(DefaultSubMenu dashboardGroupMenu) { } } - private MenuElement buildSingleDashboardMenu(String dashboardTitle, String dashboardId, String dashboardLink) { + private MenuElement buildSingleDashboardMenu(String dashboardTitle, String dashboardId, String dashboardLink, + String dashboardIcon) { var dashboardMenu = new PortalMenuBuilder(dashboardTitle, MenuKind.DASHBOARD, this.isWorkingOnATask) - .icon(PortalMenuItem.DEFAULT_DASHBOARD_ICON).url(dashboardLink).workingTaskId(this.workingTaskId).build(); + .icon(StringUtils.isNoneEmpty(dashboardIcon) ? dashboardIcon : PortalMenuItem.DEFAULT_DASHBOARD_ICON) + .url(dashboardLink).workingTaskId(this.workingTaskId).build(); if (StringUtils.isBlank(dashboardId)) { dashboardId = dashboardMenu.getId(); 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 b573ec9dde1..1a1ea137112 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 @@ -91,38 +91,28 @@ public void init() { currentDashboardIndex = 0; dashboards = collectDashboards(); - if (isReadOnlyMode) { MenuView menuView = (MenuView) ManagedBeans.get("menuView"); menuView.updateDashboardCache(dashboards); } - if (CollectionUtils.isNotEmpty(DashboardUtils.getDashboardsWithoutMenuItem())) { + if (CollectionUtils.isNotEmpty(DashboardUtils.getDashboardsWithoutMenuItem()) + || isRequestPathForMainOrDetailModification()) { updateSelectedDashboardIdFromSessionAttribute(); - currentDashboardIndex = findIndexOfDashboardById(selectedDashboardId); - selectedDashboard = dashboards.get(currentDashboardIndex); - - String selectedDashboardName = selectedDashboard.getTitles().stream() - .filter(displayName -> displayName.getLocale().equals(Ivy.session().getContentLocale())) - .findFirst() - .orElseGet(() -> selectedDashboard.getTitles().get(0)).getValue(); - setSelectedDashboardName(selectedDashboardName); - initShareDashboardLink(selectedDashboard); - // can not find dashboard by dashboard id session in view mode - if (StringUtils.isBlank(selectedDashboardId) - || (!selectedDashboardId.equalsIgnoreCase(selectedDashboard.getId()) - && DashboardUtils.getDashboardsWithoutMenuItem().size() > 1)) { - DashboardUtils.storeDashboardInSession(selectedDashboard.getId()); - } - if (isReadOnlyMode) { - DashboardUtils.highlightDashboardMenuItem(selectedDashboard.getId()); - } - } + updateSelectedDashboard(); + storeAndHighlightDashboardIfRequired(); + } buildWidgetModels(selectedDashboard); isRunningTaskWhenClickingOnTaskInList = GlobalSettingService.getInstance() .findGlobalSettingValue(GlobalVariable.DEFAULT_BEHAVIOUR_WHEN_CLICKING_ON_LINE_IN_TASK_LIST) .equals(BehaviourWhenClickingOnLineInTaskList.RUN_TASK.name()); + // Set responsive option for default task list and case list + if (DashboardUtils.isDefaultCaseListDashboard(selectedDashboard) + || DashboardUtils.isDefaultTaskListDashboard(selectedDashboard)) { + selectedDashboard.setIsResponsive(true); + } + buildClientStatisticApiUri(); } @@ -131,6 +121,33 @@ private void buildClientStatisticApiUri() { .getExternalContext().getRequestContextPath() + "/api/statistics/data"; } + private boolean isRequestPathForMainOrDetailModification() { + String requestPath = Ivy.request().getRequestPath(); + return requestPath.endsWith("/PortalMainDashboard.xhtml") + || requestPath.endsWith("/PortalDashboardDetailModification.xhtml"); + } + + private void updateSelectedDashboard() { + currentDashboardIndex = findIndexOfDashboardById(selectedDashboardId); + selectedDashboard = dashboards.get(currentDashboardIndex); + + String selectedDashboardName = selectedDashboard.getTitles().stream() + .filter(displayName -> displayName.getLocale().equals(Ivy.session().getContentLocale())).findFirst() + .orElseGet(() -> selectedDashboard.getTitles().get(0)).getValue(); + setSelectedDashboardName(selectedDashboardName); + initShareDashboardLink(selectedDashboard); + } + + private void storeAndHighlightDashboardIfRequired() { + if (StringUtils.isBlank(selectedDashboardId) || (!selectedDashboardId.equalsIgnoreCase(selectedDashboard.getId()) + && DashboardUtils.getDashboardsWithoutMenuItem().size() > 1)) { + DashboardUtils.storeDashboardInSession(selectedDashboard.getId()); + } + if (isReadOnlyMode) { + DashboardUtils.highlightDashboardMenuItem(selectedDashboard.getId()); + } + } + protected List collectDashboards() { return DashboardUtils.collectDashboards(); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/IFrameTaskTemplateBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/IFrameTaskTemplateBean.java index c7b6b99bcd2..af864d25651 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/IFrameTaskTemplateBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/IFrameTaskTemplateBean.java @@ -54,6 +54,7 @@ public class IFrameTaskTemplateBean extends AbstractTaskTemplateBean implements public static final String PORTAL_GROWL_MESSGE_PARAM = "portalGrowlMessage"; private static final String DEFAULT_TASK_ICON = "si si-task-list-edit"; private static final String TASK_ICON = "taskIcon"; + private static final String TASK_URL = "taskUrl"; private int currentProcessStep; private List processSteps; @@ -74,6 +75,12 @@ public class IFrameTaskTemplateBean extends AbstractTaskTemplateBean implements private Long caseId = null; + public String getTaskUrl() { + return Optional.ofNullable(FacesContext.getCurrentInstance() + .getExternalContext().getRequestParameterMap().get(TASK_URL)) + .orElse(StringUtils.EMPTY); + } + public void useTaskInIFrame() { keepOverridePortalGrowl(); Map requestParamMap = getRequestParameterMap(); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java index 0896ec2dc67..234df2d8057 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java @@ -35,9 +35,13 @@ public class Dashboard extends AbstractConfiguration implements Serializable { private String displayedPermission; private Boolean isTopMenu; + @JsonIgnore + private Boolean isResponsive; + public Dashboard() { // Set default values isTopMenu = false; + isResponsive = false; } public Dashboard(Dashboard dashboard) { @@ -54,6 +58,7 @@ public Dashboard(Dashboard dashboard) { permissionDTOs = dashboard.permissionDTOs; displayedPermission = dashboard.displayedPermission; isTopMenu = dashboard.isTopMenu; + isResponsive = dashboard.isResponsive; } public String getTitle() { @@ -146,6 +151,16 @@ public void setIsTopMenu(Boolean isTopMenu) { this.isTopMenu = isTopMenu; } + @JsonIgnore + public Boolean getIsResponsive() { + return isResponsive; + } + + @JsonIgnore + public void setIsResponsive(Boolean isResponsive) { + this.isResponsive = isResponsive; + } + @Override public int hashCode() { final int prime = 31; diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardUtils.java index f42e63ec3d2..5a66ea4269e 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardUtils.java @@ -327,4 +327,13 @@ public static void updatePropertiesToNullIfCurrentValueIsDefaultValue(List "").contentEquals(DEFAULT_TASK_LIST_DASHBOARD); + } + + public static boolean isDefaultCaseListDashboard(Dashboard dashboard) { + return Optional.ofNullable(dashboard).map(Dashboard::getId) + .orElseGet(() -> "").contentEquals(DEFAULT_CASE_LIST_DASHBOARD); + } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultDashboardUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultDashboardUtils.java index f092c03fb23..7c996cbaee0 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultDashboardUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DefaultDashboardUtils.java @@ -53,7 +53,7 @@ public class DefaultDashboardUtils { ], "layout": { "w": 12, - "h": 8, + "h": 12, "x": 0, "y": 0 }, @@ -168,7 +168,7 @@ public class DefaultDashboardUtils { ], "layout": { "w": 12, - "h": 8, + "h": 12, "x": 0, "y": 0 }, diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/CaseDocuments/CaseDocuments.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/CaseDocuments/CaseDocuments.xhtml index 5b3ad1a5c31..74e7f501aee 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/CaseDocuments/CaseDocuments.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/CaseDocuments/CaseDocuments.xhtml @@ -99,13 +99,13 @@ - + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskDocuments/TaskDocuments.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskDocuments/TaskDocuments.xhtml index 2e40333a337..b4c4e1da392 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskDocuments/TaskDocuments.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskDocuments/TaskDocuments.xhtml @@ -99,13 +99,13 @@ - + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardDetailModification.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardDetailModification.xhtml index 4d83a6a8f0a..e00fe4deb0b 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardDetailModification.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardDetailModification.xhtml @@ -24,11 +24,12 @@ - + update="grid-stack @this" process="@this"> + + #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/back')} + @@ -102,13 +103,14 @@ - - + + + + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardModification/DashboardModification.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardModification/DashboardModification.xhtml index a90abd57fac..d3e6db1fefd 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardModification/DashboardModification.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardModification/DashboardModification.xhtml @@ -130,7 +130,7 @@ value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/dashboardManagement/deleteDashboardMessage',[dashboardModificationBean.selectedDashboard.title])}" />
- - @@ -253,17 +253,17 @@ - - - + + + + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettings.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettings.xhtml index 1accd261b13..f390f58154e 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettings.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettings.xhtml @@ -81,7 +81,7 @@ process="@this" />
- +
@@ -363,12 +363,14 @@ - + + + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml index f91f3032968..7e008bc2554 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml @@ -74,7 +74,7 @@ - + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml index a035bbc8d98..b18ad939d28 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml @@ -181,12 +181,14 @@ - - + + + + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml index 4c966982edf..3d073e96869 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml @@ -167,13 +167,13 @@ - + + window.taskName = "Approve Investment"; + window.taskIcon = "si si-bulb"; + window.isHideTaskName = false; + window.caseId = "123456"; + window.isHideCaseInfo = false; + window.currentProcessStep = 0; + window.processSteps = ["Create Investment Request", "Approve Investment Request"]; + // Convert Java List of steps to JSON format if needed: + window.processSteps = #{portalComponentUtilsBean.convertToJSON(data.steps)}; + window.isShowAllSteps = true; + window.processChainDirection = "VERTICAL"; + window.processChainShape = "LINE"; + window.isHideTaskAction = false; + window.isWorkingOnATask = false; + window.announcementInvisible = false; + window.isCardFrame = true; + window.viewName = "TASK_DETAIL"; + --> @@ -113,6 +113,19 @@ + diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml index b8b8eefe3bc..6b54297ccbd 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml @@ -232,9 +232,12 @@