diff --git a/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json b/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json index 5264911af32..7371ed7db65 100644 --- a/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json +++ b/AxonIvyPortal/PortalKitTestHelper/processes/Start Processes/GrantPermissions.p.json @@ -446,16 +446,7 @@ "import ch.ivyteam.ivy.security.restricted.permission.IPermissionRepository;", "import ch.ivyteam.ivy.security.IPermission;", "", - "IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.STATISTIC_ADD_DASHBOARD_CHART.getValue());", - " if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().grantPermission(iPermission, ivy.session.getSessionUser());", - " }", - " ", - "iPermission = IPermissionRepository.instance().findByName(PortalPermission.EXPRESS_CREATE_WORKFLOW.getValue());", - " if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().grantPermission(iPermission, ivy.session.getSessionUser());", - " }", - "iPermission = IPermissionRepository.instance().findByName(PortalPermission.STATISTIC_ANALYZE_TASK.getValue());", + "IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.EXPRESS_CREATE_WORKFLOW.getValue());", " if (Objects.nonNull(iPermission)){", " ISecurityContext.current().securityDescriptor().grantPermission(iPermission, ivy.session.getSessionUser());", " }", @@ -603,15 +594,7 @@ "import ch.ivyteam.ivy.security.restricted.permission.IPermissionRepository;", "import ch.ivyteam.ivy.security.IPermission;", "", - "IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.STATISTIC_ADD_DASHBOARD_CHART.getValue());", - " if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().denyPermission(iPermission, ivy.session.getSessionUser());", - " }", - " iPermission = IPermissionRepository.instance().findByName(PortalPermission.EXPRESS_CREATE_WORKFLOW.getValue());", - " if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().denyPermission(iPermission, ivy.session.getSessionUser());", - " }", - " iPermission = IPermissionRepository.instance().findByName(PortalPermission.STATISTIC_ANALYZE_TASK.getValue());", + " IPermission iPermission = IPermissionRepository.instance().findByName(PortalPermission.EXPRESS_CREATE_WORKFLOW.getValue());", " if (Objects.nonNull(iPermission)){", " ISecurityContext.current().securityDescriptor().denyPermission(iPermission, ivy.session.getSessionUser());", " }", @@ -744,11 +727,6 @@ "iPermission = IPermissionRepository.instance().findByName(PortalPermission.ACCESS_FULL_CASE_LIST.getValue());", "if (Objects.nonNull(iPermission)){", " ISecurityContext.current().securityDescriptor().denyPermission(iPermission, ivy.session.getSessionUser());", - "}", - "", - "iPermission = IPermissionRepository.instance().findByName(PortalPermission.ACCESS_FULL_STATISTICS_LIST.getValue());", - "if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().denyPermission(iPermission, ivy.session.getSessionUser());", "}" ] }, @@ -787,11 +765,6 @@ "iPermission = IPermissionRepository.instance().findByName(PortalPermission.ACCESS_FULL_CASE_LIST.getValue());", "if (Objects.nonNull(iPermission)){", " ISecurityContext.current().securityDescriptor().grantPermission(iPermission, ivy.session.getSessionUser());", - "}", - " ", - "iPermission = IPermissionRepository.instance().findByName(PortalPermission.ACCESS_FULL_STATISTICS_LIST.getValue());", - "if (Objects.nonNull(iPermission)){", - " ISecurityContext.current().securityDescriptor().grantPermission(iPermission, ivy.session.getSessionUser());", "}" ] }, diff --git a/AxonIvyPortal/PortalTest/jmeter/portal_walkthrough_testplan.jmx b/AxonIvyPortal/PortalTest/jmeter/portal_walkthrough_testplan.jmx index 60fe6265f0b..3a4150f5bf5 100644 --- a/AxonIvyPortal/PortalTest/jmeter/portal_walkthrough_testplan.jmx +++ b/AxonIvyPortal/PortalTest/jmeter/portal_walkthrough_testplan.jmx @@ -2105,4349 +2105,6 @@ - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - user-menu-required-login:main-navigator:main-menu - = - true - javax.faces.source - - - true - user-menu-required-login:main-navigator:main-menu - = - true - javax.faces.partial.execute - - - true - user-menu-required-login:main-navigator:main-menu - = - true - javax.faces.partial.render - - - true - user-menu-required-login:main-navigator:main-menu - = - true - user-menu-required-login:main-navigator:main-menu - - - true - - = - true - taskId - - - true - false - = - true - isWorkingOnATask - - - true - statistics - = - true - menuKind - - - true - - = - true - menuUrl - - - true - statistics_4 - = - true - user-menu-required-login:main-navigator:main-menu_menuid - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - false - redirectURL - <redirect url="([^"]+)"> - $1$ - emptyRedirectURL - 1 - - - - ${__P(portal.duration.ajax)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - - - - - ${redirectURL} - GET - false - true - true - false - - - - - - - false - viewState - id="j_id__v_0:javax.faces.ViewState:1" value=("[\S]+") - $1$ - - 1 - - - - URL - url - (http[\S]+) - $1$ - - 1 - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:statistic-dashboard-widget:statistic-form:init-chart-command - = - true - javax.faces.source - - - true - statistics-widget:statistic-dashboard-widget:statistic-form:init-chart-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:statistic-dashboard-widget:statistic-chart-repeater-container - = - true - javax.faces.partial.render - - - true - statistics-widget:statistic-dashboard-widget:statistic-form:init-chart-command - = - true - statistics-widget:statistic-dashboard-widget:statistic-form:init-chart-command - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - false - viewState - id="j_id__v_0:javax.faces.ViewState:1" value=("[\S]+") - $1$ - - 1 - - - - URL - url - (http[\S]+) - $1$ - - 1 - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:create-chart-link - = - true - javax.faces.source - - - true - @all - = - true - javax.faces.partial.execute - - - true - statistics-widget:widget-container statistics-widget:create-chart-header - = - true - javax.faces.partial.render - - - true - statistics-widget:create-chart-link - = - true - statistics-widget:create-chart-link - - - true - - = - true - user-menu-required-login:global-search-component-mobile:global-search-data - - - true - 1 - = - true - user-menu-required-login:global-search-component-mobile-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - false - viewState - id="j_id__v_0:javax.faces.ViewState:1" value=("[\S]+") - $1$ - - 1 - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - true - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:init-filter-command - = - true - javax.faces.source - - - true - @all - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:init-filter-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:init-filter-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:task-by-priority-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:case-by-state-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:task-by-expiry-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:elapsed-time-by-case-category - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:case-by-finished-task-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:case-by-finished-time-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - true - false - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - true - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:apply-filter-button - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:apply-filter-button - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:apply-filter-button - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:clear-chart-models-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:clear-chart-models-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:chart-list - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:clear-chart-models-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:clear-chart-models-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-chart-models-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:task-by-priority-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-priority-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:task-by-expiry-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-task-by-expiry-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:case-by-state-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-state-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:elapsed-time-by-case-category - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-elapsed-time-by-case-category-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:case-by-finished-task-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-task-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - - - true - true - = - true - javax.faces.partial.ajax - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - = - true - javax.faces.source - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - = - true - javax.faces.partial.execute - - - true - statistics-widget:chart-creation-widget:chart-management-form:case-by-finished-time-chart - = - true - javax.faces.partial.render - - - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - = - true - statistics-widget:chart-creation-widget:chart-management-form:update-case-by-finished-time-model-command - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_focus - - - true - CUSTOM - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:period-time-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-from_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:filter-to_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_filter - - - true - 0,0_0,0_1 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_selection - - - true - 0,0 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-category-filter-tree_scrollState - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:roles-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:case-states-select-all_input - - - true - on - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:task-priorities-select-all_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField1:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField2:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField3:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField4:custom-string-selection_hinput - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_input - - - true - - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel:CustomVarCharField5:custom-string-selection_hinput - - - true - 0,1,2,3 - = - true - statistics-widget:chart-creation-widget:chart-management-form:statistic-filter:statistic-filter-accordion-panel_active - - - true - 1 - = - true - statistics-widget:chart-creation-widget:chart-management-form_SUBMIT - - - true - ${viewState} - = - true - javax.faces.ViewState - - - - - - - - ${url} - POST - false - true - true - false - - - - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - - - ${__groovy("${username}" == "admin" || "${username}" == "portaladmin")} - false - true - - - - - - - - - - - /${__P(security.system.name)}/${__P(portal.application.name)}/pro/${__P(portal.portal)}/1549F58C18A6C562/showTaskAnalysis.ivp - GET - false - true - true - false - - - - - - - false - viewState - id="j_id__v_0:javax.faces.ViewState:1" value=("[\S]+") - $1$ - - 1 - - - - URL - url - (http[\S]+) - $1$ - - 1 - - - - ${__P(portal.duration.normal)} - - - - - 200 - - - Assertion.response_code - false - 8 - - - - diff --git a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java index d3fcb1cbc05..83acd79c589 100644 --- a/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java +++ b/AxonIvyPortal/portal-components/src/com/axonivy/portal/components/enums/PortalVariable.java @@ -4,7 +4,6 @@ public enum PortalVariable { PASSWORD_VALIDATION("Portal.PasswordValidation"), ANNOUNCEMENT("Portal.Announcement"), THIRD_PARTY_APP("Portal.ThirdPartyApplications"), - STATISTIC_CHART("Portal.StatisticCharts"), WIDGET_FILTER("Portal.Dashboard.WidgetFilters"), EXTERNAL_LINK("Portal.Processes.ExternalLinks"), EXPRESS_PROCESS("Portal.Processes.ExpressProcesses"), diff --git a/AxonIvyPortal/portal-components/webContent/resources/js/process-history-component.js b/AxonIvyPortal/portal-components/webContent/resources/js/process-history-component.js index 54a42de600a..665d499a373 100644 --- a/AxonIvyPortal/portal-components/webContent/resources/js/process-history-component.js +++ b/AxonIvyPortal/portal-components/webContent/resources/js/process-history-component.js @@ -205,8 +205,7 @@ var MainMenu = { ["CaseWidget.xhtml", "CASE"], ["PortalCaseDetails.xhtml", "CASE"], ["CaseItemDetails.xhtml", "CASE"], - ["PortalDashBoard.xhtml", "DASHBOARD"], - ["TaskAnalysis.xhtml", "DASHBOARD"]], + ["PortalDashBoard.xhtml", "DASHBOARD"]], init : function(responsiveToolkit) { this.highlightMenuItem(); @@ -219,11 +218,6 @@ var MainMenu = { var $this = this; this.$mainMenuToggle.on('click', function(e) { $this.responsiveToolkit.updateLayoutWithAnimation(); - - var statisticContainer = $('.js-statistic-widget-container.compact-mode'); - if (statisticContainer.length > 0) { - updateStatisticCarousel(); - } }); }, diff --git a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js index 1f3d7eb1efb..92d2ad81b8d 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js +++ b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js @@ -36,7 +36,6 @@ function createRedThickOutlineWithOffset($element) { /***IMPLEMENTATION TO DECORATE PAGES - WHICH ARE CALLED IN SELENIUM****/ function highlightDashboardWidget() { createRedMediumOutline($("#task-widget")); - createRedMediumOutline($("#statistic-widget-container")); createRedMediumOutline($("#process-widget")); } @@ -47,9 +46,6 @@ function highlightAndNumberingDashboardSections() { var taskWidget = $("#task-widget"); createRedMediumOutline(taskWidget); appendStepAnnotation(taskWidget, "2", 0, taskWidget.width()/2); - var statisticWidget = $("#statistic-widget-container"); - createRedMediumOutline(statisticWidget); - appendStepAnnotation(statisticWidget, "3", 0, statisticWidget.width()/2); } function numberingTaskFilter() { @@ -190,14 +186,6 @@ function highlightProcessMoreMenuButton() { appendStepAnnotation(processMoreMenuButton, "1", -10, -40); } -function numberingStatisticWidget() { - var chartInfo = $('.chart-info:eq(0)'); - appendStepAnnotation(chartInfo, "1", -10, 25); - var chartCanvas = $('.ui-carousel-items-content'); - appendStepAnnotation(chartCanvas, "2", chartCanvas.width()/4, chartCanvas.height()/2 + 10); - appendStepAnnotation(chartCanvas, "3", 15, chartCanvas.width()*0.75); -} - function highlightAdminSettings() { createRedMediumOutline($("#adminui-menu-item")); } @@ -215,26 +203,6 @@ function highlightShowMoreNoteLink() { createRedMediumOutline($('a.js-note-show-more-link')); } -function highlightStatisticNavigation() { - createRedThickOutlineWithOffset($('.layout-menu .STATISTICS')); -} - -function highlightTaskAnalysisNavigationLink() { - createRedMediumOutline($("a[id$=':task-analysis-page-navigation-link']")); -} - -function numberingChartPanel() { - var chartName = $('.chart-name:eq(1)'); - appendStepAnnotation(chartName, "1", -30, -25); - var chartInfo = $('.chart-info:eq(1)'); - appendStepAnnotation(chartInfo, "2", -20, 25); - var chartActions = $('.chart-actions-container:eq(0)'); - appendStepAnnotation(chartActions, "3", -20, 0); - var chartCanvas = $('.statistic-chart:eq(1)'); - appendStepAnnotation(chartCanvas, "4", chartCanvas.width()/4, chartCanvas.height()/2 + 10); - appendStepAnnotation(chartCanvas, "5", 15, chartCanvas.width()*0.8); -} - function highlightCustomCaseList() { var caseHeader = $("[id$='case-widget:widget-column-header']"); createRedMediumOutline(caseHeader); diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/Dashboard_Dashboard_Export.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/Dashboard_Dashboard_Export.json index c69ee7024d2..fafb183dda2 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/Dashboard_Dashboard_Export.json +++ b/AxonIvyPortal/portal-selenium-test/resources/testFile/Dashboard_Dashboard_Export.json @@ -532,65 +532,6 @@ "url": "https://www.google.com/search?q=danang&sca_esv=566561006&sxsrf=AM9HkKlUBz__VtVTES7NouybfOXwwRRccA%3A1695119592162&source=hp&ei=6HgJZZXzBpfj2roPnry2wAo&iflsig=AO6bgOgAAAAAZQmG-HMK6OQuwxM5-TaUgojXdqYC8KL4&oq=da&gs_lp=Egdnd3Mtd2l6IgJkYSoCCAAyBxAjGIoFGCcyBxAjGIoFGCcyBBAjGCcyBxAuGIoFGEMyCxAAGIAEGLEDGIMBMgsQABiABBixAxiDATILEAAYgAQYsQMYgwEyBBAAGAMyBBAAGAMyCxAAGIAEGLEDGIMBSNEKUABYZHAAeACQAQCYAZQBoAGlAqoBAzAuMrgBA8gBAPgBAcICDBAjGIoFGBMYgAQYJw&sclient=gws-wiz" } }, - { - "type": "statistic", - "id": "statistic_ff821a63a24d49c6a310fb83ce818a46", - "names": [ - { - "locale": "en", - "value": "Tasks by Priority" - }, - { - "locale": "fr", - "value": "Tasks by Priority" - }, - { - "locale": "de", - "value": "Tasks by Priority" - }, - { - "locale": "es", - "value": "Tasks by Priority" - } - ], - "layout": { - "w": 4, - "h": 8, - "x": 5, - "y": 15 - }, - "chart": { - "id": "0", - "names": [ - { - "locale": "de", - "value": "Aufgaben nach Priorität" - }, - { - "locale": "en", - "value": "Tasks by Priority" - }, - { - "locale": "fr", - "value": "Tãches par priorité" - }, - { - "locale": "es", - "value": "Tareas por prioridad" - } - ], - "type": "TASK_BY_PRIORITY", - "filter": { - "timePeriodSelection": "CUSTOM", - "isAllCategoriesSelected": false, - "isAllRolesSelected": true, - "isAllCaseStatesSelected": true, - "isAllTaskPrioritiesSelected": true - }, - "position": 0 - }, - "chartEmpty": true - }, { "type": "news", "id": "news_bc977a31c02a446fb2f2cb68a6118344", diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-has-chart-cases-by-category.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-has-chart-cases-by-category.json deleted file mode 100644 index 808ab31f2d4..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-has-chart-cases-by-category.json +++ /dev/null @@ -1,67 +0,0 @@ -[ - { - "id": "1", - "title": "Dashboard", - "widgets": [ - { - "type": "statistic", - "id": "statistic_1", - "names": [ - { - "locale": "en", - "value": "Cases by Category" - } - ], - "layout": { - "id": null, - "styleClass": "new-widget", - "style": null, - "w": 5, - "h": 5, - "x": 0, - "y": 0 - }, - "chart": { - "id": "0", - "names": [ - { - "locale": "de", - "value": "Vorgänge nach Kategorie" - }, - { - "locale": "en", - "value": "Cases by category" - }, - { - "locale": "fr", - "value": "Affaires par catégorie" - }, - { - "locale": "es", - "value": "Casos por categoría" - } - ], - "type": "CASES_BY_CATEGORY", - "filter": { - "timePeriodSelection": "CUSTOM", - "createdDateFrom": null, - "createdDateTo": null, - "selectedCaseCategories": [], - "isAllCategoriesSelected": false, - "selectedRoles": [], - "isAllRolesSelected": true, - "selectedCaseStates": [], - "isAllCaseStatesSelected": true, - "selectedTaskPriorities": [], - "isAllTaskPrioritiesSelected": true, - "customFieldFilters": null - }, - "position": 0 - } - } - ], - "permissions": [ - "Everybody" - ] - } -] \ No newline at end of file diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-has-one-chart-example.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-has-one-chart-example.json deleted file mode 100644 index 8ba27392dc2..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-has-one-chart-example.json +++ /dev/null @@ -1,71 +0,0 @@ -[ - { - "id": "1", - "title": "Dashboard", - "widgets": [ - { - "type": "statistic", - "id": "statistic_1", - "names": [ - { - "locale": "en", - "value": "Tasks by Priority" - } - ], - "layout": { - "id": null, - "styleClass": "new-widget", - "style": null, - "w": 5, - "h": 5, - "x": 0, - "y": 0 - }, - "chart": { - "id": "0", - "names": [ - { - "locale": "de", - "value": "Aufgaben nach Priorit�t" - }, - { - "locale": "en", - "value": "Tasks by Priority" - }, - { - "locale": "fr", - "value": "T�ches par priorit�" - }, - { - "locale": "es", - "value": "Tareas por prioridad" - } - ], - "type": "TASK_BY_PRIORITY", - "filter": { - "timePeriodSelection": "CUSTOM", - "createdDateFrom": null, - "createdDateTo": null, - "selectedCaseCategories": [ - ], - "isAllCategoriesSelected": false, - "selectedRoles": [ - ], - "isAllRolesSelected": true, - "selectedCaseStates": [ - ], - "isAllCaseStatesSelected": true, - "selectedTaskPriorities": [ - ], - "isAllTaskPrioritiesSelected": true, - "customFieldFilters": null - }, - "position": 0 - } - } - ], - "permissions": [ - "Everybody" - ] - } -] diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/NavigationHelper.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/NavigationHelper.java index e057fbf9f42..37851aa5ec0 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/NavigationHelper.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/NavigationHelper.java @@ -4,14 +4,12 @@ import com.axonivy.portal.selenium.page.CaseWidgetPage; import com.axonivy.portal.selenium.page.ProcessWidgetPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; import com.axonivy.portal.selenium.page.TaskWidgetPage; public class NavigationHelper { private static final String TASK_LIST_PAGE_URL = "portal/1549F58C18A6C562/DefaultTaskListPage.ivp"; private static final String CASE_LIST_PAGE_URL = "portal/1549F58C18A6C562/CaseListPage.ivp"; private static final String PROCESS_LIST_PAGE_URL = "portal/1549F58C18A6C562/DefaultProcessStartListPage.ivp"; - private static final String STATISTIC_PAGE_URL = "portal/1549F58C18A6C562/StatisticPage.ivp"; public static void navigateToRelativeLink(String relativeProcessStartUrl) { try { @@ -36,8 +34,4 @@ public static ProcessWidgetPage navigateToProcessList() { return new ProcessWidgetPage(); } - public static StatisticWidgetPage navigateToStatisticPage() { - navigateToRelativeLink(STATISTIC_PAGE_URL); - return new StatisticWidgetPage(); - } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java index 91fd5c32fd3..9f52b6ed515 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java @@ -38,7 +38,6 @@ public class ScreenshotUtils { public static final String CASE_DETAIL_FOLDER = "/case-detail/"; public static final String CASE_DETAIL_CUSTOMIZATION_FOLDER = "/case-detail/customization/"; public static final String STATISTIC_WIDGET_FOLDER = "/statistic/"; - public static final String TASK_ANALYSIS_FOLDER = "/statistic/task-analysis/"; public static final String SEARCH_FOLDER = "/search/"; public static final String SETTINGS_FOLDER = "/settings/"; public static final String MY_PROFILE_FOLDER = "/my-profile/"; diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java index 14b8f91053e..32f5d61df88 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java @@ -12,7 +12,7 @@ public enum Variable { HIDE_SYSTEM_TASKS_FROM_HISTORY_ADMINISTRATOR("Portal.Histories.HideSystemTasksForAdministrator"), HIDE_SYSTEM_NOTES_FROM_HISTORY("Portal.Histories.HideSystemNotes"), HIDE_SYSTEM_NOTES_FROM_HISTORY_ADMINISTRATOR("Portal.Histories.HideSystemNotesForAdministrator"), - HIDE_STATISTIC_WIDGET("Portal.Dashboard.HideStatisticWidget"), ENABLE_GROUP_CHAT("Portal.Chat.EnableGroup"), + ENABLE_GROUP_CHAT("Portal.Chat.EnableGroup"), ENABLE_PRIVATE_CHAT("Portal.Chat.EnablePrivate"), CHAT_RESPONSE_TIMEOUT("Portal.Chat.ResponseTimeout"), CHAT_MAX_CONNECTION("Portal.Chat.MaxConnection"), ENABLE_CASE_OWNER("Portal.Cases.EnableOwner"), DISABLE_CASE_COUNT("Portal.Cases.DisableCount"), DEFAULT_SORT_FIELD_OF_CASE_LIST("Portal.Cases.SortField"), @@ -30,8 +30,8 @@ public enum Variable { SHOW_BUTTON_ICON("Portal.ShowButtonIcon"), DEFAULT_HOMEPAGE("Portal.Homepage"), HIDE_RELATED_CASE_INFO_FROM_HISTORY("Portal.Histories.HideRelatedCaseInfo"), DISPLAY_USERS_OF_TASK_ACTIVATOR("Portal.DisplayUsersOfRole"), ANNOUNCEMENT("Portal.Announcement"), - TASK_ANALYSIS_FILTER("Portal.TaskAnalysisFilters"), THIRD_PARTY_APP("Portal.ThirdPartyApplications"), - STATISTIC_CHART("Portal.StatisticCharts"), EXTERNAL_LINK("Portal.Processes.ExternalLinks"), + THIRD_PARTY_APP("Portal.ThirdPartyApplications"), + EXTERNAL_LINK("Portal.Processes.ExternalLinks"), EXPRESS_PROCESS("Portal.Processes.ExpressProcesses"), TASK_COLUMN("Portal.Tasks.TaskColumn"), TASK_FILTER("Portal.Tasks.TaskFilters"), TASK_BEHAVIOUR_WHEN_CLICKING_ON_LINE_IN_TASK_LIST("Portal.Tasks.BehaviourWhenClickingOnLineInTaskList"), diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/AdditionalComponentsScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/AdditionalComponentsScreenshotTest.java index 3d770f38673..02b81c32cbd 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/AdditionalComponentsScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/AdditionalComponentsScreenshotTest.java @@ -17,7 +17,6 @@ import com.axonivy.portal.selenium.page.NewDashboardPage; import com.axonivy.portal.selenium.page.ProcessHistoryPage; import com.axonivy.portal.selenium.page.ProcessViewerPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; import com.axonivy.portal.selenium.page.TaskTemplatePage; import com.axonivy.portal.selenium.page.component.DocumentTableComponentPage; import com.axonivy.portal.selenium.page.component.ProcessViewerComponentPage; @@ -94,21 +93,6 @@ public void captureScreenshotDocumentTableComponent() throws IOException { ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.COMPONENTS_FOLDER + "document-table"); } - @Test - public void captureScreenshotTaskAnalysisComponent() throws IOException { - redirectToRelativeLink(create12CasesWithCategoryUrl); - redirectToRelativeLink(createTestingTasksUrl); - login(TestAccount.ADMIN_USER); - showNewDashboard(); - NewDashboardPage homepage = new NewDashboardPage(); - homepage.waitForCaseWidgetLoaded(); - MainMenuPage mainMenuPage = new MainMenuPage(); - StatisticWidgetPage statisticWidgetDashboardPage = mainMenuPage.openStatisticPage(); - statisticWidgetDashboardPage.navigateToTaskAnalysisPage(); - ScreenshotUtils.resizeBrowser(new Dimension(1500, 1000)); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.COMPONENTS_FOLDER + "task-analysis"); - } - @Test public void captureScreenshotUserSelectionComponent() throws IOException { redirectToRelativeLink(userSelectionComponentShowcaseUrl); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/StatisticScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/StatisticScreenshotTest.java index 766009f13bd..65896b7c228 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/StatisticScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/StatisticScreenshotTest.java @@ -13,12 +13,8 @@ import com.axonivy.portal.selenium.common.ScreenshotUtils; import com.axonivy.portal.selenium.common.TestAccount; import com.axonivy.portal.selenium.common.Variable; -import com.axonivy.portal.selenium.common.WaitHelper; import com.axonivy.portal.selenium.page.ClientStatisticWidgetNewDashboardPage; -import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; -import com.axonivy.portal.selenium.page.TaskWidgetPage; import ch.ivy.addon.portalkit.enums.PortalVariable; @@ -34,53 +30,6 @@ public void setup() { login(TestAccount.ADMIN_USER); } - @Test - public void screenshotForStatistic() throws IOException { - showNewDashboard(); - NewDashboardPage homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - MainMenuPage mainMenu = new MainMenuPage(); - - TaskWidgetPage taskWidgetPage = mainMenu.openTaskList(); - taskWidgetPage.openTask("SupportTicket"); - - ScreenshotUtils.resizeBrowser(new Dimension(1460, 800)); - WaitHelper.waitForNavigation(() -> redirectToRelativeLink(createTestingTasksUrl)); - homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - homePage.waitForGrowlMessageDisappear(); - mainMenu.expandMainMenu(); - - ScreenshotUtils.executeDecorateJs("highlightStatisticNavigation()"); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.STATISTIC_WIDGET_FOLDER + "navigate-to-full-statistics-page"); - ScreenshotUtils.resizeBrowser(new Dimension(1386, 2210)); - - StatisticWidgetPage statisticWidgetPage = mainMenu.openStatisticPage(); - statisticWidgetPage.switchCreateMode(); - mainMenu.closeMainMenu(); - - statisticWidgetPage.createTaskByPriorityChart(); - statisticWidgetPage.createTaskByExpiryChart(); - ScreenshotUtils.captureElementScreenshot(statisticWidgetPage.waitAndGetChartCreationContainer(), - ScreenshotUtils.STATISTIC_WIDGET_FOLDER + "available-charts"); - - WebElement chartCreationDialog = statisticWidgetPage.getCaseByFinishedTaskCreationDialog(); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(chartCreationDialog, - ScreenshotUtils.STATISTIC_WIDGET_FOLDER + "chart-creation-dialog", new ScreenshotMargin(10, 10)); - - refreshPage(); - statisticWidgetPage.waitForChartCreationPageRendered(); - statisticWidgetPage.backToDashboard(); - statisticWidgetPage.waitForAllChartLoaded(); - ScreenshotUtils.executeDecorateJs("numberingChartPanel()"); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(statisticWidgetPage.waitAndGetChartPanelByIndex(1), - ScreenshotUtils.STATISTIC_WIDGET_FOLDER + "chart-detail-with-annotation", new ScreenshotMargin(20, 10)); - refreshPage(); - statisticWidgetPage.waitForAllChartLoaded(); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(statisticWidgetPage.getChartInfoDialogOfChart(1), - ScreenshotUtils.STATISTIC_WIDGET_FOLDER + "chart-info-dialog", new ScreenshotMargin(20, 10)); - } - @Test public void screenshotStatisticWidgetList() throws IOException { showNewDashboard(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/TaskAnalysisScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/TaskAnalysisScreenshotTest.java deleted file mode 100644 index 90cf6f7274e..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/TaskAnalysisScreenshotTest.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.axonivy.portal.selenium.document.screenshot; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.Dimension; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.ScreenshotBaseTest; -import com.axonivy.portal.selenium.common.ScreenshotMargin; -import com.axonivy.portal.selenium.common.ScreenshotUtils; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.common.Variable; -import com.axonivy.portal.selenium.page.MainMenuPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; -import com.axonivy.portal.selenium.page.TaskAnalysisWidgetPage; - -@IvyWebTest -public class TaskAnalysisScreenshotTest extends ScreenshotBaseTest { - - @Override - @BeforeEach - public void setup() { - super.setup(); - updatePortalSetting(Variable.ENABLE_GROUP_CHAT.getKey(), "true"); - login(TestAccount.ADMIN_USER); - redirectToRelativeLink(createTestingTasksUrl); - } - - @Test - public void screenshotTaskAnalysisPage() throws IOException { - showNewDashboard(); - NewDashboardPage homePage = new NewDashboardPage(); - homePage.waitForCaseWidgetLoaded(); - MainMenuPage mainMenu = new MainMenuPage(); - StatisticWidgetPage statisticWidgetPage = mainMenu.openStatisticPage(); - - ScreenshotUtils.executeDecorateJs("highlightTaskAnalysisNavigationLink()"); - ScreenshotUtils.resizeBrowser(new Dimension(1200, 800)); - ScreenshotUtils - .captureHalfTopRightPageScreenShot(ScreenshotUtils.TASK_ANALYSIS_FOLDER + "navigate-to-task-analysis"); - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - - ScreenshotUtils.resizeBrowser(new Dimension(1400, 900)); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.TASK_ANALYSIS_FOLDER + "task-analysis"); - - taskAnalysisWidgetPage.openAdvancedTaskFilter("Priority", "priority"); - List selectedPriorities = new ArrayList<>(); - selectedPriorities.add("NORMAL"); - taskAnalysisWidgetPage.filterByTaskPriority(selectedPriorities); - taskAnalysisWidgetPage.clickApplyFilter(); - ScreenshotUtils.resizeBrowser(new Dimension(1400, 800)); - ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.TASK_ANALYSIS_FOLDER + "filtered-tasks"); - taskAnalysisWidgetPage.enterDataToSaveFilterSet("Normal Priority Task", true); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(taskAnalysisWidgetPage.waitAndGetSavingFilterDialog(), - ScreenshotUtils.TASK_ANALYSIS_FOLDER + "saved-filter", new ScreenshotMargin(20)); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/MainMenuPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/MainMenuPage.java index 1ff015374d7..faf3fce9ea9 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/MainMenuPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/MainMenuPage.java @@ -1,7 +1,6 @@ package com.axonivy.portal.selenium.page; import static com.codeborne.selenide.Condition.appear; - import static com.codeborne.selenide.Condition.disappear; import static com.codeborne.selenide.Selenide.$; import static com.codeborne.selenide.Selenide.$$; @@ -41,10 +40,6 @@ public ProcessWidgetPage openProcessList() { return NavigationHelper.navigateToProcessList(); } - public StatisticWidgetPage openStatisticPage() { - return NavigationHelper.navigateToStatisticPage(); - } - public void openUserSettingMenu() { $("#top-menu").shouldBe(appear, DEFAULT_TIMEOUT); $("a[id='user-settings-menu']").shouldBe(clickable(), DEFAULT_TIMEOUT).click(); @@ -92,12 +87,6 @@ public CaseWidgetPage selectCaseMenu() { return new CaseWidgetPage(); } - public StatisticWidgetPage selectStatisticDashboard() { - WaitHelper - .waitForNavigation(() -> waitForElementClickableThenClick($(".layout-menu li[role='menuitem'] a.STATISTICS"))); - return new StatisticWidgetPage(); - } - private void waitForProcessesPageAfterSelectProcessesCategory() { waitForElementDisplayed(By.id("process-widget:process-search:non-ajax-keyword-filter"), true); } @@ -146,10 +135,6 @@ public boolean isCasesDisplayed() { return isMenuItemDisplayed("Cases"); } - public boolean isStatisticsDisplayed() { - return isMenuItemDisplayed("Statistics"); - } - public WorkingTaskDialogPageOfApplicationMenu selectDashboardMenu() { waitForElementClickableThenClick(".layout-menu li[role='menuitem'] a.DASHBOARD"); return new WorkingTaskDialogPageOfApplicationMenu(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java index c81eaa66fb7..a7ed76f4dc6 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java @@ -17,7 +17,6 @@ public class NewDashboardDetailsEditPage extends TemplatePage { public static final String PROCESS_WIDGET = "Process List"; public static final String PROCESS_VIEWER_WIDGET = "Process Viewer"; public static final String CUSTOM_WIDGET = "Custom Widget"; - public static final String STATISTIC_WIDGET = "Statistic chart"; public static final String WELCOME_WIDGET = "Welcome widget"; public static final String NEWS_WIDGET = "News feed widget"; public static final String TASK_BY_PRIORITY = "Tasks by Priority"; @@ -161,10 +160,6 @@ public StatisticEditWidgetNewDashboardPage addNewStatisticWidget() { return new StatisticEditWidgetNewDashboardPage(); } - public StatisticWidgetDashboardPage selectStatisticWidget() { - return new StatisticWidgetDashboardPage(); - } - public SelenideElement getTitleByIndex(int index) { return $("a[id='dashboard-title-" + index + "']"); } 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 f9b9702d7f8..054fbd48fd2 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 @@ -15,7 +15,6 @@ import org.openqa.selenium.WebElement; import com.axonivy.portal.selenium.common.LinkNavigator; -import com.axonivy.portal.selenium.common.Sleeper; import com.axonivy.portal.selenium.common.WaitHelper; import com.codeborne.selenide.CollectionCondition; import com.codeborne.selenide.Condition; @@ -132,17 +131,6 @@ public MainMenuPage openMainMenu() { return new MainMenuPage(); } - public WebElement waitAndGetStatisticChart(int index) { - var widget = $$(".statistic-chart-widget").shouldBe(CollectionCondition.sizeGreaterThan(index), DEFAULT_TIMEOUT) - .get(index).shouldBe(appear, DEFAULT_TIMEOUT); - widget.$("[id$='loading']").shouldBe(disappear, DEFAULT_TIMEOUT); - waitForWidgetLoadedByExpandThenCollapse(widget); - // We use Sleeper here to wait for chart render completely, because the - // statistic dialog was render with an animation by canvas. - Sleeper.sleep(1000); - return widget.ancestor(".grid-stack-item"); - } - public SelenideElement waitAndGetClientStatisticChart(int index) { var widget = $$("[id^='client-statistic-client_statistic']").shouldBe(CollectionCondition.sizeGreaterThan(index), DEFAULT_TIMEOUT) .get(index) @@ -779,10 +767,6 @@ public void selectDashboard(int index) { selectDashboard.parent().shouldBe(Condition.cssClass("active-menuitem"), DEFAULT_TIMEOUT); } - public StatisticWidgetDashboardPage selectStatisticWidget() { - return new StatisticWidgetDashboardPage(); - } - public void checkDisplayedCaseWidgetContainer() { getCaseWidgetContainer().shouldBe(Condition.appear, DEFAULT_TIMEOUT); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/StatisticWidgetDashboardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/StatisticWidgetDashboardPage.java deleted file mode 100644 index c806b5f284f..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/StatisticWidgetDashboardPage.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Condition.disappear; -import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; - -import com.codeborne.selenide.ElementsCollection; -import com.codeborne.selenide.SelenideElement; - -public class StatisticWidgetDashboardPage extends TemplatePage { - - @Override - protected String getLoadedLocator() { - return ".statistic-chart-widget__content"; - } - - public ElementsCollection countStatisticCharts() { - return $$(".statistic-chart-widget .widget__header-title"); - } - - public SelenideElement getStatisticInfoIconOfChart(String chartId) { - return $(String.format("[id$='chart-%s:info-sidebar-link-0']", chartId)).shouldBe(appear, DEFAULT_TIMEOUT) - .should(getClickableCondition()); - } - - public void openStatisticInfoPanel(String chartId) { - getStatisticInfoIconOfChart(chartId).click(); - $(String.format("[id$='chart-%s:info-overlay-panel-0']", chartId)).shouldBe(appear, DEFAULT_TIMEOUT); - } - - public ElementsCollection countFilterOfStatistic(String chartId) { - return $(String.format("[id$='chart-%s:info-overlay-panel-0']", chartId)).shouldBe(appear, DEFAULT_TIMEOUT) - .$("table[id$=':chart-filter-container']").shouldBe(appear, DEFAULT_TIMEOUT).$$("tr"); - } - - public String getChartName(String chartId) { - return $(String.format("span[id$='chart-%s:widget__header']", chartId)).shouldBe(appear, DEFAULT_TIMEOUT).getText(); - } - - public SelenideElement getEditIconOfChart(String chartId) { - return $(String.format("[id$='chart-%s:widget-header-actions']", chartId)).shouldBe(appear, DEFAULT_TIMEOUT) - .$(String.format("[id$='chart-%s:edit-widget-0']", chartId)).shouldBe(appear, DEFAULT_TIMEOUT); - } - - public String openEditStatisticWidgetDialog(String chartId) { - getEditIconOfChart(chartId).should(getClickableCondition()).click(); - return $("[id$='new-widget-configuration-dialog']").shouldBe(appear, DEFAULT_TIMEOUT) - .$("span[id$='new-widget-configuration-dialog_title']").shouldBe(appear, DEFAULT_TIMEOUT).getText(); - } - - public void clickOnCancelConfiguration() { - $("[id$='new-widget-configuration-dialog']").shouldBe(appear, DEFAULT_TIMEOUT) - .$("a[id$='task-configuration-cancel-link']").shouldBe(appear, DEFAULT_TIMEOUT) - .shouldBe(getClickableCondition()).click(); - $("[id$='new-widget-configuration-dialog']").shouldBe(disappear, DEFAULT_TIMEOUT); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/StatisticWidgetPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/StatisticWidgetPage.java deleted file mode 100644 index e84f360483d..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/StatisticWidgetPage.java +++ /dev/null @@ -1,270 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.CollectionCondition.size; -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; - -import java.util.Set; -import java.util.stream.Collectors; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.ui.WebDriverWait; - -import com.axonivy.portal.selenium.common.WaitHelper; -import com.codeborne.selenide.Condition; -import com.codeborne.selenide.SelenideElement; -import com.codeborne.selenide.WebDriverRunner; - -public class StatisticWidgetPage extends TemplatePage { - public static final String TASK_BY_PRIORITY_CHART_NAME = "Task by priority chart"; - public static final String CASE_BY_STATE_CHART_NAME = "Case by state chart"; - public static final String TASK_BY_EXPIRY_CHART_NAME = "Task by expiry chart"; - public static final String ELAPSED_TIME_CHART_NAME = "Elapsed time chart"; - public static final String CASE_BY_FINISHED_TASK_CHART_NAME = "Case by finished task chart"; - public static final String CASE_BY_FINISHED_TIME_CHART_NAME = "Case by finished time chart"; - public static final String CASES_BY_CATEGORY_CHART_NAME = "Cases by category chart"; - - @Override - protected String getLoadedLocator() { - return "[id='statistics-widget']"; - } - - public TaskAnalysisWidgetPage navigateToTaskAnalysisPage() { - waitForPageLoad(); - var taskAnalysLink = $("a[id='statistics-widget:task-analysis-page-navigation-link']") - .shouldBe(Condition.appear, DEFAULT_TIMEOUT).shouldBe(getClickableCondition(), DEFAULT_TIMEOUT); - WaitHelper.waitForNavigation(() -> waitForElementClickableThenClick(taskAnalysLink)); - $("[id='task-widget']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); - return new TaskAnalysisWidgetPage(); - } - - public Set getAllChartNames() { - $(By.id("chart-name-0")).shouldBe(Condition.appear, DEFAULT_TIMEOUT); - return $$("div[id$=':chart-name-container'] .chart-name").shouldHave(size(1), DEFAULT_TIMEOUT).asFixedIterable() - .stream().map(e -> e.getText()).collect(Collectors.toSet()); - } - - public String getRestoreDefaultButtonName() { - return findElementByCssSelector("span[id$='restore-default-chart-link-label']").getText(); - } - - public boolean hasCreateChartsLink() { - return isElementPresent(By.id("statistics-widget:create-chart-link-label")); - } - - private boolean isCompactMode() { - waitPageLoaded(); - waitForElementDisplayed(By.id("statistics-widget:widget-container"), true); - WebElement statisticContainer = findElementById("statistics-widget:widget-container"); - return statisticContainer.getAttribute(CLASS_PROPERTY).contains("compact-mode"); - } - - public boolean isFullMode() { - return !isCompactMode(); - } - - public void createCaseByStateChart() { - waitForElementDisplayed( - By.id("statistics-widget:chart-creation-widget:chart-management-form:create-case-by-state-link"), true, 30); - SelenideElement createCaseByStateLink = - findElementById("statistics-widget:chart-creation-widget:chart-management-form:create-case-by-state-link"); - waitForElementClickableThenClick(createCaseByStateLink); - - waitForElementDisplayed(By.cssSelector("div[id$='add-chart-dialog']"), true); - - inputNameForSupportedLanguages(CASE_BY_STATE_CHART_NAME); - waitForElementClickableThenClick("button[id$='chart-save-command']"); - - waitForElementExisted(By.cssSelector("span[class='ui-growl-title']"), true); - } - - public void createCaseByFinishTime() { - waitForElementDisplayed( - By.id("statistics-widget:chart-creation-widget:chart-management-form:create-case-by-finished-time-link"), true, - 30); - SelenideElement createCaseByFinishedTaskLink = findElementById( - "statistics-widget:chart-creation-widget:chart-management-form:create-case-by-finished-time-link"); - waitForElementClickableThenClick(createCaseByFinishedTaskLink); - - waitForElementDisplayed(By.cssSelector("div[id$='add-chart-dialog']"), true); - inputNameForSupportedLanguages(CASE_BY_FINISHED_TIME_CHART_NAME); - waitForElementClickableThenClick("button[id$='chart-save-command']"); - - waitForElementExisted(By.cssSelector("span[class='ui-growl-title']"), true); - } - - public void createTaskByPriorityChartMultiLanguage() { - waitForElementDisplayed( - By.id("statistics-widget:chart-creation-widget:chart-management-form:create-task-by-priority-link"), true, 30); - waitForElementClickableThenClick( - $(By.id("statistics-widget:chart-creation-widget:chart-management-form:create-task-by-priority-link"))); - - waitForElementDisplayed(By.cssSelector("div[id$='add-chart-dialog']"), true); - - findElementByCssSelector("input[id$='0:chart-name-input']") - .sendKeys(TASK_BY_PRIORITY_CHART_NAME.concat(" English")); - findElementByCssSelector("input[id$='1:chart-name-input']").sendKeys(TASK_BY_PRIORITY_CHART_NAME.concat(" French")); - findElementByCssSelector("input[id$='2:chart-name-input']").sendKeys(TASK_BY_PRIORITY_CHART_NAME.concat(" German")); - findElementByCssSelector("input[id$='3:chart-name-input']") - .sendKeys(TASK_BY_PRIORITY_CHART_NAME.concat(" Spanish")); - - waitForElementClickableThenClick("button[id$='chart-save-command']"); - waitForElementExisted(By.cssSelector("span[class='ui-growl-title']"), true); - } - - public void createCasesByCategory() { - waitForElementDisplayed( - By.id("statistics-widget:chart-creation-widget:chart-management-form:create-cases-by-category-link"), true, 30); - SelenideElement createCaseByFinishedTaskLink = - findElementById("statistics-widget:chart-creation-widget:chart-management-form:create-cases-by-category-link"); - waitForElementClickableThenClick(createCaseByFinishedTaskLink); - - waitForElementDisplayed(By.cssSelector("div[id$='add-chart-dialog']"), true); - inputNameForSupportedLanguages(CASES_BY_CATEGORY_CHART_NAME); - waitForElementClickableThenClick("button[id$='chart-save-command']"); - - waitForElementExisted(By.cssSelector("span[class='ui-growl-title']"), true); - } - - public void createElapsedTimeChart() { - waitForElementDisplayed( - By.id("statistics-widget:chart-creation-widget:chart-management-form:create-elapsed-time-link"), true, 30); - SelenideElement createElapsedTimeLink = - findElementById("statistics-widget:chart-creation-widget:chart-management-form:create-elapsed-time-link"); - waitForElementClickableThenClick(createElapsedTimeLink); - - waitForElementDisplayed(By.cssSelector("div[id$='add-chart-dialog']"), true); - inputNameForSupportedLanguages(ELAPSED_TIME_CHART_NAME); - waitForElementClickableThenClick("button[id$='chart-save-command']"); - - waitForElementExisted(By.cssSelector("span[class='ui-growl-title']"), true); - } - - public void createCaseByFinishedTask() { - var caseByFinishedTaskSelector = "button[id$=':chart-management-form:create-case-by-finished-task-link']"; - waitForElementClickableThenClick($(caseByFinishedTaskSelector)); - waitForElementDisplayed(By.cssSelector("div[id$='add-chart-dialog']"), true); - - inputNameForSupportedLanguages(CASE_BY_FINISHED_TASK_CHART_NAME); - waitForElementClickableThenClick($(By.cssSelector("button[id$='chart-save-command']"))); - waitForElementDisplayed(By.cssSelector("div[id$='add-chart-dialog']"), false); - waitForElementExisted(By.cssSelector("span[class='ui-growl-title']"), true); - } - - public void restoreDefaultCharts() { - new WebDriverWait(WebDriverRunner.getWebDriver(), DEFAULT_TIMEOUT).until((webDriver) -> { - WebElement restoreDefault = findElementByCssSelector("span[id$='restore-default-chart-link-label']"); - try { - return restoreDefault.getText().contains("Restore default"); - } catch (WebDriverException e) { - System.out.println("Exception when waiting for element existed, try again."); - } - return false; - }); - waitForElementClickableThenClick($("span[id$='restore-default-chart-link-label']")); - waitForElementDisplayed(By.id("statistics-widget:restore-confirmation-dialog"), true, 30); - waitForElementClickableThenClick($(By.id("statistics-widget:confirm-restore"))); - } - - public String getChartName(int chartIndex) { - new WebDriverWait(WebDriverRunner.getWebDriver(), DEFAULT_TIMEOUT).until((webDriver) -> { - try { - return findElementByCssSelector(String.format("div[id$='%d:chart-name-container'] .chart-name", chartIndex)) - .getText().length() > 1; - } catch (WebDriverException e) { - System.out.println("Exception when waiting for element existed, try again."); - } - return false; - }); - WebElement chartName = - findElementByCssSelector(String.format("div[id$='%d:chart-name-container'] .chart-name", chartIndex)); - return chartName.getText(); - } - - public void switchCreateMode() { - $("a[id$='create-chart-link']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("a[id$='statistics-widget:back-from-chart-creation']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void waitForAllChartLoaded() { - SelenideElement element = - $("[id$='statistics-widget:statistic-dashboard-widget:statistic-chart-repeater:0:chart-name-container'] a"); - element.shouldBe(clickable(), DEFAULT_TIMEOUT).click(); - $("[id$='statistics-widget:statistic-dashboard-widget:chart-details-dialog']").shouldBe(appear, DEFAULT_TIMEOUT) - .$("button.ui-button-text-icon-left").shouldBe(appear, DEFAULT_TIMEOUT).click(); - } - - public void createTaskByPriorityChart() { - $("[id='statistics-widget:chart-creation-widget:chart-management-form:create-task-by-priority-link']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='add-chart-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - - inputNameForSupportedLanguages(TASK_BY_PRIORITY_CHART_NAME); - $("button[id$='chart-save-command']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("span[class='ui-growl-title']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - private void inputNameForSupportedLanguages(String value) { - for (int i = 0; i < 4; i++) { - $("input[id$='" + i + ":chart-name-input']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).sendKeys(value); - } - } - - public void createTaskByExpiryChart() { - $("[id='statistics-widget:chart-creation-widget:chart-management-form:create-task-by-expiry-link']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - - $("div[id$='add-chart-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - inputNameForSupportedLanguages(TASK_BY_EXPIRY_CHART_NAME); - $("button[id$='chart-save-command']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - - $("span[class='ui-growl-title']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public SelenideElement getChartCreationContainer() { - return $("[id='statistics-widget:chart-creation-widget:chart-management-form:chart-list']"); - } - - public WebElement waitAndGetChartCreationContainer() { - return getChartCreationContainer().shouldBe(appear, DEFAULT_TIMEOUT); - } - - public WebElement getCaseByFinishedTaskCreationDialog() { - $("[id='statistics-widget:chart-creation-widget:chart-management-form:create-case-by-finished-task-link']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("div[id$='add-chart-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - - inputNameForSupportedLanguages(CASE_BY_FINISHED_TASK_CHART_NAME); - return $("div[id$='add-chart-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void waitForChartCreationPageRendered() { - $("[id='statistics-widget:back-from-chart-creation']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public void backToDashboard() { - $("a[id$='back-from-chart-creation']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("a[id$='create-chart-link']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public SelenideElement getChartPanelByIndex(int index) { - return $(String.format("span[id$='%d:chart-panel']", index)); - } - - public WebElement waitAndGetChartPanelByIndex(int index) { - return getChartPanelByIndex(index).shouldBe(appear, DEFAULT_TIMEOUT); - } - - public WebElement getChartInfoDialogOfChart(int chartIndex) { - $("[id='" - + String.format("statistics-widget:statistic-dashboard-widget:statistic-chart-repeater:%d:chart-name-container", - chartIndex) - + "']").shouldBe(appear, DEFAULT_TIMEOUT).$("a.chart-info").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) - .click(); - return $("[id='statistics-widget:statistic-dashboard-widget:chart-details-dialog']").shouldBe(appear, - DEFAULT_TIMEOUT); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskAnalysisWidgetPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskAnalysisWidgetPage.java deleted file mode 100644 index 9b690d99d2e..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskAnalysisWidgetPage.java +++ /dev/null @@ -1,362 +0,0 @@ -package com.axonivy.portal.selenium.page; - -import static com.codeborne.selenide.Condition.appear; -import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; - -import java.util.List; - -import org.openqa.selenium.By; -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.ui.WebDriverWait; - -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.Condition; -import com.codeborne.selenide.ElementsCollection; -import com.codeborne.selenide.SelenideElement; -import com.codeborne.selenide.WebDriverRunner; - -public class TaskAnalysisWidgetPage extends TemplatePage { - - private static final String TASK_FILTER_SELECTION = "task-widget:task-filter-add-form:task-filter-selection"; - - @Override - protected String getLoadedLocator() { - return "div[id='task-widget']"; - } - - public void openAdvancedTaskFilter(String filterName, String filterIdName) { - findTaskFilterButton().shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='" + TASK_FILTER_SELECTION + "']").shouldBe(appear, DEFAULT_TIMEOUT).$$("label").asFixedIterable().stream() - .filter(filter -> filter.getText().contentEquals(filterName)).findFirst().get() - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='task-widget:task-filter-add-form:update-task-filter-selected-command']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("span[id$='" + filterIdName + "-filter:filter-open-form:advanced-filter-item-container']").shouldBe(appear, - DEFAULT_TIMEOUT); - } - - public void filterByTaskPriority(List selectedPriorities) { - $("[id$='priority-filter:filter-open-form:advanced-filter-command']") - .shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id$='priority-filter:filter-input-form:advanced-filter-panel-content']").shouldBe(appear, DEFAULT_TIMEOUT) - .$$("label").asFixedIterable().stream().filter(filter -> !selectedPriorities.contains(filter.getText())) - .forEach(filter -> filter.shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click()); - - $("[id$='priority-filter:filter-input-form:update-command']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) - .click(); - } - - public void clickApplyFilter() { - $("button[id$='task-widget:apply-filter']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - } - - private SelenideElement findTaskFilterButton() { - return $("[id='task-widget:task-filter-add-action']"); - } - - public void enterDataToSaveFilterSet(String filterSetName, boolean isPersonalFilter) { - $("[id='task-widget:filter-save-action']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - $("[id='task-widget:filter-save-form:save-filter-set-name-input']").shouldBe(appear, DEFAULT_TIMEOUT) - .sendKeys(filterSetName); - - SelenideElement filterVisibilityContainer = findElementById("task-widget:filter-save-form:save-filter-type-radio"); - if (isPersonalFilter) { - filterVisibilityContainer.$$(By.tagName("LABEL")).get(0).shouldBe(clickable(), DEFAULT_TIMEOUT).click(); - } else { - filterVisibilityContainer.$$(By.tagName("LABEL")).get(1).shouldBe(clickable(), DEFAULT_TIMEOUT).click(); - } - } - - public WebElement waitAndGetSavingFilterDialog() { - return $("div[id$='save-filter-set-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); - } - - public StatisticWidgetPage navigateToStatisticPage() { - String backButtonId = "task-widget:back-button"; - waitForElementDisplayed(By.id(backButtonId), true); - SelenideElement backButton = findElementById(backButtonId); - - clickByJavaScript(backButton); - waitForElementDisplayed(By.id("statistics-widget"), true); - return new StatisticWidgetPage(); - } - - public void clickOnColumnToggler() { - String togglerId = "task-widget:statistic-result-form:toggler"; - waitForElementDisplayed(By.id(togglerId), true); - clickByJavaScript(findElementById(togglerId)); - } - - public void filterByTaskName(String text) { - waitForElementClickableThenClick($("[id$='task-name-filter:filter-open-form:advanced-filter-command']")); - $("input[id$='task-name-filter:filter-input-form:name']").shouldBe(appear, DEFAULT_TIMEOUT).sendKeys(text); - waitForElementClickableThenClick($("[id$='task-name-filter:filter-input-form:update-command']")); - } - - public ElementsCollection getRowsInTaskTable() { - return findElementById("task-widget:statistic-result-form:task-table_data") - .$$(By.cssSelector("tr.ui-widget-content")); - } - - private SelenideElement findCaseFilterButton() { - String caseFilterButtonId = "task-widget:case-filter-add-action"; - waitForElementDisplayed(By.id(caseFilterButtonId), true); - return findElementById(caseFilterButtonId); - } - - public void openAdvancedCaseFilter(String filterName, String filterIdName) { - waitForElementClickableThenClick(findCaseFilterButton()); - waitForElementDisplayed(findElementById("task-widget:case-filter-add-form:case-filter-selection"), true); - SelenideElement filterSelectionElement = findElementById("task-widget:case-filter-add-form:case-filter-selection"); - for (SelenideElement filterElement : filterSelectionElement.$$(By.tagName("LABEL"))) { - if (filterName.equals(filterElement.getText())) { - waitForElementClickableThenClick(filterElement); - waitForElementClickableThenClick( - $("button[id$='task-widget:case-filter-add-form:update-task-filter-selected-command']")); - break; - } - } - waitForElementDisplayed( - By.cssSelector("span[id$='" + filterIdName + "-filter:filter-open-form:advanced-filter-item-container']"), - true); - } - - public void filterByCaseName(String text) { - waitForElementClickableThenClick($("[id$='case-name-filter:filter-open-form:advanced-filter-command']")); - findElementByCssSelector("input[id$='case-name-filter:filter-input-form:name']").shouldBe(appear, DEFAULT_TIMEOUT) - .sendKeys(text); - waitForElementClickableThenClick($("[id$='case-name-filter:filter-input-form:update-command']")); - } - - public void filterByCaseState(List selectedPriorities) { - waitForElementClickableThenClick($( - "div[id$='task-widget:case-filters-container'] button[id$='state-filter:filter-open-form:advanced-filter-command']")); - SelenideElement selectionElement = findElementByCssSelector( - "div[id$='task-widget:case-filters-container'] div[id$='state-filter:filter-input-form:advanced-filter-panel-content']"); - for (SelenideElement labelElement : selectionElement.$$(By.tagName("LABEL"))) { - if (!selectedPriorities.contains(labelElement.getText())) { - waitForElementClickableThenClick(labelElement); - } - } - waitForElementClickableThenClick( - $("div[id$='task-widget:case-filters-container'] button[id$='state-filter:filter-input-form:update-command']")); - } - - public void filterByTaskCategory(String selectedCategory) { - waitForElementClickableThenClick($("[id$='task-category-filter:filter-open-form:advanced-filter-command']")); - waitForElementDisplayed($("div[id$=':task-category-filter-tree']"), true); - SelenideElement selectionElement = - findElementByCssSelector("[id$='task-category-filter:filter-input-form:advanced-filter-panel-content']"); - List categoryTreeLabels = selectionElement.$$(By.className("ui-treenode-label")); - // Find parent node of tree first and uncheck it - SelenideElement parentNodeOfTree = categoryTreeLabels.stream().findFirst().get(); - waitForElementDisplayed(parentNodeOfTree, true); - waitForElementClickableThenClick(parentNodeOfTree); - for (SelenideElement labelElement : categoryTreeLabels) { - if (selectedCategory.contains(labelElement.getText())) { - waitForElementClickableThenClick(labelElement); - break; - } - } - waitForElementClickableThenClick($("[id$='task-category-filter:filter-input-form:update-command']")); - } - - public void filterByCaseCategory(String selectedCategory) { - waitForElementClickableThenClick($("[id$='case-category-filter:filter-open-form:advanced-filter-command']")); - waitForElementDisplayed($("div[id$=':case-category-filter-tree']"), true); - SelenideElement selectionElement = - findElementByCssSelector("[id$='case-category-filter:filter-input-form:advanced-filter-panel-content']"); - List categoryTreeLabels = selectionElement.$$(By.className("ui-treenode-label")); - // Find parent node of tree first and uncheck it - SelenideElement parentNodeOfTree = categoryTreeLabels.stream().findFirst().get(); - waitForElementDisplayed(parentNodeOfTree, true); - waitForElementClickableThenClick(parentNodeOfTree); - for (SelenideElement labelElement : categoryTreeLabels) { - if (selectedCategory.contains(labelElement.getText())) { - waitForElementClickableThenClick(labelElement); - break; - } - } - waitForElementClickableThenClick($("button[id$='case-category-filter:filter-input-form:update-command']")); - } - - public void filterByOwner(String user) { - openAdvancedCaseFilter("Owner", "owner"); - waitForElementClickableThenClick($("button[id$='owner-filter:filter-open-form:advanced-filter-command']")); - findElementByCssSelector("input[id$='owner-filter:filter-input-form:owner_input']").sendKeys(user); - waitForElementDisplayed($("span[id$='owner-filter:filter-input-form:owner_panel']"), true); - waitForElementDisplayed($("div[id*='owner-filter'] .ui-avatar-text"), true); - waitForElementClickableThenClick($("[id$=':owner-filter:filter-input-form:owner_panel']")); - waitForElementClickableThenClick($("button[id$='owner-filter:filter-input-form:update-command']")); - } - - public void saveFilterSet(String filterSetName, boolean isPersonalFilter) { - enterDataToSaveFilterSet(filterSetName, isPersonalFilter); - SelenideElement saveButton = - $("button[id$='task-widget:filter-save-form:filter-save-command']").shouldBe(appear, DEFAULT_TIMEOUT); - waitForElementClickableThenClick(saveButton); - $("[id='task-widget:save-filter-set-dialog']").shouldBe(Condition.disappear, DEFAULT_TIMEOUT); - saveButton.shouldBe(Condition.disappear, DEFAULT_TIMEOUT); - } - - public void waitForTaskDataChangeToSpecificSize(int size) { - new WebDriverWait(WebDriverRunner.getWebDriver(), DEFAULT_TIMEOUT).until((driver) -> { - return getRowsInTaskTable().size() == size; - }); - } - - public boolean loadFilterSet(String filterSetName, boolean isPersonalFilter) { - waitPageLoaded(); - waitForElementDisplayed( - $("a[id$='task-widget:filter-selection-form:filter-name']"), true); - waitForElementClickableThenClick( - "a[id$='task-widget:filter-selection-form:filter-name']"); - waitForElementDisplayed( - findElementById( - "task-widget:filter-selection-form:filter-name-overlay-panel"), - true); - SelenideElement filterContainer = null; - if (isPersonalFilter) { - try { - filterContainer = findElementById( - "task-widget:filter-selection-form:private-filters"); - } catch (NoSuchElementException e) { - return false; - } - } else { - try { - filterContainer = findElementById( - "task-widget:filter-selection-form:public-filters"); - } catch (NoSuchElementException e) { - return false; - } - } - - if (!filterContainer.$(By.linkText(filterSetName)).isDisplayed()) { - return false; - } - clickByJavaScript(filterContainer.$(By.linkText(filterSetName)) - .shouldBe(appear, DEFAULT_TIMEOUT)); - return true; - } - - public String getFilterName() { - new WebDriverWait(WebDriverRunner.getWebDriver(), DEFAULT_TIMEOUT).until((driver) -> - - $("a[id$='task-widget:filter-selection-form:filter-name'] > span:nth-child(2)").getText().length() > 1); - WebElement filterName = - findElementByCssSelector("a[id$='task-widget:filter-selection-form:filter-name'] > span:nth-child(2)"); - return filterName.getText(); - } - - private void filterByUserName(String user, String filterIdName) { - waitForElementClickableThenClick( - $("button[id$='" + filterIdName + "-filter:filter-open-form:advanced-filter-command']")); - $("input[id*='" + filterIdName + "-filter:filter-input-form:']").sendKeys(user); - waitForElementExisted(By.cssSelector("div[id*='" + filterIdName + "-filter'] .ui-avatar-text"), true); - waitForElementClickableThenClick($("tr[class$='ui-state-highlight']")); - waitForElementClickableThenClick($("button[id$='" + filterIdName + "-filter:filter-input-form:update-command']")); - } - - public void filterByResponsible(String user, String filterName, String filterIdName) { - openAdvancedTaskFilter(filterName, filterIdName); - waitForElementClickableThenClick($("button[id$='responsible-filter:filter-open-form:advanced-filter-command']")); - $("input[id$='responsible-filter:filter-input-form:responsible_input']").sendKeys(user); - waitForElementDisplayed($("span[id$='responsible-filter:filter-input-form:responsible_panel']"), true); - waitForElementDisplayed($("div[id*='responsible-filter'] .ui-avatar-text"), true); - waitForElementClickableThenClick($("[id$=':responsible-filter:filter-input-form:responsible_panel']")); - waitForElementClickableThenClick($("button[id$='responsible-filter:filter-input-form:update-command']")); - } - - public void removeUserInFilter() { - waitForElementDisplayed(By.cssSelector("button[id$='creator-filter:filter-open-form:advanced-filter-command']"), - true); - waitForElementClickableThenClick($("button[id$='creator-filter:filter-open-form:advanced-filter-command']")); - waitForElementDisplayed( - By.cssSelector("input[id$='creator-filter:filter-input-form:creator-component:creator-select_input']"), true); - findElementByCssSelector("input[id$='creator-filter:filter-input-form:creator-component:creator-select_input']") - .click(); - findElementByCssSelector("input[id$='creator-filter:filter-input-form:creator-component:creator-select_input']") - .clear(); - waitForElementClickableThenClick($("button[id$='creator-filter:filter-input-form:update-command']")); - } - - public void filterUserInCase(String user, String filterName, String filterIdName) { - openAdvancedCaseFilter(filterName, filterIdName); - filterByUserName(user, filterIdName); - } - - public void removeResponsible() { - waitForElementDisplayed(By.cssSelector("button[id$='responsible-filter:filter-open-form:advanced-filter-command']"), - true); - waitForElementClickableThenClick($("button[id$='responsible-filter:filter-open-form:advanced-filter-command']")); - waitForElementDisplayed(By.cssSelector("input[id$='responsible-filter:filter-input-form:responsible_input']"), - true); - findElementByCssSelector("input[id$='responsible-filter:filter-input-form:responsible_input']").click(); - findElementByCssSelector("input[id$='responsible-filter:filter-input-form:responsible_input']").clear(); - waitForElementClickableThenClick($("button[id$='responsible-filter:filter-input-form:update-command']")); - } - - public void openNoActivatorFilter(String filterName) { - findTaskFilterButton().click(); - SelenideElement filterSelectionElement = findElementById(TASK_FILTER_SELECTION); - for (SelenideElement filterElement : filterSelectionElement.$$(By.tagName("LABEL"))) { - if (filterName.equals(filterElement.getText())) { - filterElement.click(); - waitForElementClickableThenClick( - $("button[id$='task-widget:task-filter-add-form:update-task-filter-selected-command']")); - break; - } - } - } - - public void filterByUnavailableActivator() { - waitForElementDisplayed( - By.cssSelector("button[id$='available-activator-filter:filter-open-form:advanced-filter-command']"), true); - waitForElementClickableThenClick( - $("button[id$='available-activator-filter:filter-open-form:advanced-filter-command']")); - - waitForElementDisplayed(By.cssSelector("[id$='available-activator-filter:filter-input-form:available-activator']"), - true); - WebElement displayOnlyUnavailableTaskCheckbox = - findElementByCssSelector("[id$='available-activator-filter:filter-input-form:available-activator']"); - displayOnlyUnavailableTaskCheckbox.click(); - waitForElementClickableThenClick($("button[id$='available-activator-filter:filter-input-form:update-command']")); - } - - public boolean isResetButtonShown() { - waitForElementDisplayed(By.cssSelector("[id$='task-widget:filter-reset-action']"), true); - return isElementDisplayed(By.cssSelector("[id$='task-widget:filter-reset-action']")); - } - - public String getUser(String filterName) { - waitForElementDisplayed($("button[id$='" + filterName + "-filter:filter-open-form:advanced-filter-command']"), - true); - new WebDriverWait(WebDriverRunner.getWebDriver(), DEFAULT_TIMEOUT).until((driver) -> findElementByCssSelector( - "button[id$='" + filterName + "-filter:filter-open-form:advanced-filter-command'] > span").getText() - .length() > 1); - return findElementByCssSelector( - "button[id$='" + filterName + "-filter:filter-open-form:advanced-filter-command'] > span").getText(); - } - - public void resetFilter() { - waitForElementClickableThenClick($("[id$='task-widget:filter-reset-action']")); - waitForElementDisplayed($("[id$='task-widget:filter-reset-command']"), true); - waitForElementClickableThenClick($("[id$='task-widget:filter-reset-command']")); - new WebDriverWait(WebDriverRunner.getWebDriver(), DEFAULT_TIMEOUT) - .until((driver) -> $("a[id$='task-widget:filter-selection-form:filter-name'] > span:nth-child(2)").getText() - .contains("Default")); - } - - public SelenideElement findColumnContainer() { - return $(By.tagName("body")).$(By.cssSelector(".ui-columntoggler")); - } - - public void countSavedFilter(int size) { - waitForElementDisplayed($("a[id$='task-widget:filter-selection-form:filter-name']"), true); - waitForElementClickableThenClick("a[id$='task-widget:filter-selection-form:filter-name']"); - $$(".user-defined-filter-container").shouldBe(CollectionCondition.sizeGreaterThanOrEqual(size), DEFAULT_TIMEOUT); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/DefaultChartTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/DefaultChartTest.java deleted file mode 100644 index 1d5570ff092..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/DefaultChartTest.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.axonivy.portal.selenium.test; - -import static com.codeborne.selenide.Selenide.$; - -import java.util.Set; - -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.MainMenuPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; - -@IvyWebTest -public class DefaultChartTest extends BaseTest { - - private static final String DEFAULT_CHART = "Tasks by Priority"; - private static final String RESTORE_DEFAULT = "Restore default"; - - @Override - @BeforeEach - public void setup() { - super.setup(); - login(TestAccount.ADMIN_USER); - grantPermissionToCreateChart(); - } - - @AfterEach - public void clear() { - resetLanguageOfCurrentUser(); - } - - @Test - public void testCreateDefaultChart() { - new NewDashboardPage(); - MainMenuPage mainMenuPage = new MainMenuPage(); - StatisticWidgetPage statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - statisticWidgetPage.waitForElementDisplayed(By.id("statistics-widget:widget-container"), true); - Set chartNames = statisticWidgetPage.getAllChartNames(); - assertTrue(chartNames.contains(DEFAULT_CHART)); - assertEquals(RESTORE_DEFAULT, statisticWidgetPage.getRestoreDefaultButtonName()); - } - - @Test - public void testRestoreDefaultChart() { - MainMenuPage mainMenuPage = new MainMenuPage(); - StatisticWidgetPage statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - resizeBrowserTo2kResolution(); - statisticWidgetPage.waitForElementDisplayed(By.id("statistics-widget:widget-container"), true); - statisticWidgetPage.switchCreateMode(); - statisticWidgetPage.createCaseByFinishedTask(); - statisticWidgetPage.backToDashboard(); - statisticWidgetPage.restoreDefaultCharts(); - - WebElement taskByExpiryChartName3 = null; - try { - taskByExpiryChartName3 = - $("[id='statistics-widget:statistic-dashboard-widget:statistic-chart-repeater:2:chart-name']"); - } catch (Exception ex) { - } - - assertEquals(DEFAULT_CHART, statisticWidgetPage.getChartName(0)); - assertEquals(false, taskByExpiryChartName3.isDisplayed()); - } - - private void grantPermissionToCreateChart() { - redirectToRelativeLink(grantPortalPermission); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/MenuTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/MenuTest.java index 74280e0f9f9..7d61c6bf1f2 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/MenuTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/MenuTest.java @@ -1,19 +1,18 @@ package com.axonivy.portal.selenium.test; import org.junit.jupiter.api.Assertions; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import com.axonivy.ivy.webtest.IvyWebTest; import com.axonivy.portal.selenium.common.BaseTest; import com.axonivy.portal.selenium.common.TestAccount; +import com.axonivy.portal.selenium.common.Variable; +import com.axonivy.portal.selenium.page.CaseWidgetPage; import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; import com.axonivy.portal.selenium.page.TaskWidgetPage; import com.axonivy.portal.selenium.page.UserProfilePage; -import com.axonivy.portal.selenium.common.Variable; import ch.ivy.addon.portalkit.enums.PortalVariable; @@ -47,7 +46,7 @@ public void testLoadCustomMenuItems() { MainMenuPage mainMenuPage = new MainMenuPage(); String expected = - "Dashboard,Processes,Tasks,Cases,Statistics,User example guide,Google,Testing link google,Testing example,A link,B link"; + "Dashboard,Processes,Tasks,Cases,User example guide,Google,Testing link google,Testing example,A link,B link"; assertEquals(expected, mainMenuPage.getMenuItemsAsString()); } @@ -69,7 +68,7 @@ public void testKeepClosedStateWhenNavigateToAnotherPage() { NewDashboardPage newDashboardPage = new NewDashboardPage(); newDashboardPage.waitPageLoaded(); MainMenuPage mainMenuPage = newDashboardPage.openMainMenu(); - StatisticWidgetPage dashboardPage = mainMenuPage.selectStatisticDashboard(); + CaseWidgetPage dashboardPage = mainMenuPage.openCaseList(); dashboardPage.waitForPageLoad(); dashboardPage.closeMainMenu(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java index 5643b03f749..42db19d4e92 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/PortalPermissionTest.java @@ -54,14 +54,12 @@ public void testShowHideSubMenuItems() { assertFalse(mainMenuPage.isProcessesDisplayed()); assertFalse(mainMenuPage.isTasksDisplayed()); assertFalse(mainMenuPage.isCasesDisplayed()); - assertFalse(mainMenuPage.isStatisticsDisplayed()); grantAccessFullListPermissions(); newDashboardPage = new NewDashboardPage(); WaitHelper.assertTrueWithWait(() -> mainMenuPage.isProcessesDisplayed()); assertTrue(mainMenuPage.isTasksDisplayed()); assertTrue(mainMenuPage.isCasesDisplayed()); - assertTrue(mainMenuPage.isStatisticsDisplayed()); } @Test @@ -202,8 +200,6 @@ private void grantAccessFullListPermissions() { String.format(grantSpecificPortalPermissionLink, PortalPermission.ACCESS_FULL_CASE_LIST.getValue())); redirectToRelativeLink( String.format(grantSpecificPortalPermissionLink, PortalPermission.ACCESS_FULL_TASK_LIST.getValue())); - redirectToRelativeLink( - String.format(grantSpecificPortalPermissionLink, PortalPermission.ACCESS_FULL_STATISTICS_LIST.getValue())); } private void denyAccessFullListPermissions() { @@ -213,8 +209,6 @@ private void denyAccessFullListPermissions() { String.format(denySpecificPortalPermissionLink, PortalPermission.ACCESS_FULL_CASE_LIST.getValue())); redirectToRelativeLink( String.format(denySpecificPortalPermissionLink, PortalPermission.ACCESS_FULL_TASK_LIST.getValue())); - redirectToRelativeLink( - String.format(denySpecificPortalPermissionLink, PortalPermission.ACCESS_FULL_STATISTICS_LIST.getValue())); } private void grantTaskActionsPermissions() { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/StatisticDashboardWidgetTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/StatisticDashboardWidgetTest.java deleted file mode 100644 index 9982f833da4..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/StatisticDashboardWidgetTest.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.axonivy.portal.selenium.test; - -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.page.DashboardModificationPage; -import com.axonivy.portal.selenium.page.NewDashboardDetailsEditPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.Condition; - -import ch.ivy.addon.portalkit.enums.PortalVariable; - -@IvyWebTest -public class StatisticDashboardWidgetTest extends BaseTest { - - private static final String CHART_ID = "statistic_1"; - private NewDashboardPage newDashboardPage; - - @Override - @BeforeEach - public void setup() { - super.setup(); - newDashboardPage = new NewDashboardPage(); - } - - @Test - public void testShowChartInfo() { - login(TestAccount.ADMIN_USER); - createJSonFile("dashboard-has-one-chart-example.json", PortalVariable.DASHBOARD.key); - redirectToRelativeLink(createTestingTasksUrl); - var chartWidget = newDashboardPage.selectStatisticWidget(); - var chartName = chartWidget.getChartName(CHART_ID); - assertTrue(StringUtils.equalsIgnoreCase("Tasks by Priority", chartName)); - var infoIcon = chartWidget.getStatisticInfoIconOfChart(CHART_ID); - infoIcon.should(Condition.appear); - chartWidget.openStatisticInfoPanel(CHART_ID); - var chartFilter = chartWidget.countFilterOfStatistic(CHART_ID); - chartFilter.shouldHave(CollectionCondition.sizeGreaterThanOrEqual(4)); - } - - @Test - public void testEditStatisticChart() { - login(TestAccount.ADMIN_USER); - createJSonFile("dashboard-has-one-chart-example.json", PortalVariable.DASHBOARD.key); - NewDashboardDetailsEditPage newDashboardDetailsEditPage = gotoEditPublicDashboardPage(); - var chartWidget = newDashboardDetailsEditPage.selectStatisticWidget(); - chartWidget.getEditIconOfChart(CHART_ID).shouldBe(Condition.visible, Condition.enabled); - var editChartDialog = chartWidget.openEditStatisticWidgetDialog(CHART_ID); - assertTrue(StringUtils.equalsIgnoreCase(editChartDialog, "Edit Widget Configuration")); - chartWidget.clickOnCancelConfiguration(); - } - - private NewDashboardDetailsEditPage gotoEditPublicDashboardPage() { - newDashboardPage.waitForAbsencesGrowlMessageDisplay(); - var configurationPage = newDashboardPage.openDashboardConfigurationPage(); - DashboardModificationPage modificationPage = configurationPage.openEditPublicDashboardsPage(); - return modificationPage.navigateToEditDashboardDetailsByName("Dashboard"); - } - - @Test - public void testShowChartCasesByCategoryInfo() { - login(TestAccount.ADMIN_USER); - createJSonFile("dashboard-has-chart-cases-by-category.json", PortalVariable.DASHBOARD.key); - redirectToRelativeLink(createTestingTasksUrl); - var chartWidget = newDashboardPage.selectStatisticWidget(); - var chartName = chartWidget.getChartName(CHART_ID); - assertTrue(StringUtils.equalsIgnoreCase("Cases by Category", chartName)); - var infoIcon = chartWidget.getStatisticInfoIconOfChart(CHART_ID); - infoIcon.should(Condition.appear); - chartWidget.openStatisticInfoPanel(CHART_ID); - var chartFilter = chartWidget.countFilterOfStatistic(CHART_ID); - chartFilter.shouldHave(CollectionCondition.sizeGreaterThanOrEqual(4)); - } - - @Test - public void testEditCasesByCategoryChart() { - login(TestAccount.ADMIN_USER); - createJSonFile("dashboard-has-chart-cases-by-category.json", PortalVariable.DASHBOARD.key); - redirectToRelativeLink(createTestingTasksUrl); - NewDashboardDetailsEditPage newDashboardDetailsEditPage = gotoEditPublicDashboardPage(); - var chartWidget = newDashboardDetailsEditPage.selectStatisticWidget(); - chartWidget.getEditIconOfChart(CHART_ID).shouldBe(Condition.visible, Condition.enabled); - var editChartDialog = chartWidget.openEditStatisticWidgetDialog(CHART_ID); - assertTrue(StringUtils.equalsIgnoreCase(editChartDialog, "Edit Widget Configuration")); - chartWidget.clickOnCancelConfiguration(); - } -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/StatisticWidgetTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/StatisticWidgetTest.java deleted file mode 100644 index 07aa7602b15..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/StatisticWidgetTest.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.axonivy.portal.selenium.test; - -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.By; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.common.WaitHelper; -import com.axonivy.portal.selenium.page.MainMenuPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; -import com.axonivy.portal.selenium.page.UserProfilePage; - -@IvyWebTest -public class StatisticWidgetTest extends BaseTest { - private static final String TASK_BY_PRIORITY_DEFAULT_CHART_NAME = "Tasks by Priority"; - public static final String TASK_BY_PRIORITY_CHART_NAME = "Task by priority chart"; - public static final String CASE_BY_STATE_CHART_NAME = "Case by state chart"; - public static final String TASK_BY_EXPIRY_CHART_NAME = "Task by expiry chart"; - public static final String ELAPSED_TIME_CHART_NAME = "Elapsed time chart"; - public static final String CASE_BY_FINISHED_TASK_CHART_NAME = "Case by finished task chart"; - public static final String CASE_BY_FINISHED_TIME_CHART_NAME = "Case by finished time chart"; - public static final String CASES_BY_CATEGORY_CHART_NAME = "Cases by category chart"; - - private NewDashboardPage newDashboardPage; - private StatisticWidgetPage statisticWidgetPage; - private MainMenuPage mainMenuPage; - - @Override - @BeforeEach - public void setup() { - super.setup(); - redirectToRelativeLink(createTestingTasksUrl); - login(TestAccount.ADMIN_USER); - newDashboardPage = new NewDashboardPage(); - } - - @AfterEach - public void clear() { - resetLanguageOfCurrentUser(); - } - - @Test - public void testNavigateToChartFromMenu() { - grantPermissionToCreateChart(); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - statisticWidgetPage.waitForElementDisplayed(By.id("statistics-widget:widget-container"), true); - assertTrue(statisticWidgetPage.isFullMode()); - } - - @Test - public void testNavigateToChartWithoutPermissionFromMenu() { - String denyPortalPermissionsURL = "portalKitTestHelper/14DE09882B540AD5/denyPortalPermission.ivp"; - redirectToRelativeLink(denyPortalPermissionsURL); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - assertEquals(false, statisticWidgetPage.hasCreateChartsLink()); - redirectToRelativeLink(grantPortalPermission); - } - - @Test - public void testCreateCharts() { - grantPermissionToCreateChart(); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - statisticWidgetPage.waitForElementDisplayed(By.id("statistics-widget:widget-container"), true); - statisticWidgetPage.switchCreateMode(); - - statisticWidgetPage.createTaskByPriorityChart(); - statisticWidgetPage.createTaskByExpiryChart(); - statisticWidgetPage.createCaseByStateChart(); - statisticWidgetPage.createElapsedTimeChart(); - statisticWidgetPage.createCaseByFinishedTask(); - statisticWidgetPage.createCaseByFinishTime(); - statisticWidgetPage.createCasesByCategory(); - - statisticWidgetPage.backToDashboard(); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='0:chart-name-container'] .chart-name").getText() - .equals(TASK_BY_PRIORITY_DEFAULT_CHART_NAME)); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='1:chart-name-container'] .chart-name").getText() - .equals(TASK_BY_PRIORITY_CHART_NAME)); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='2:chart-name-container'] .chart-name").getText() - .equals(TASK_BY_EXPIRY_CHART_NAME)); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='3:chart-name-container'] .chart-name").getText() - .equals(CASE_BY_STATE_CHART_NAME)); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='4:chart-name-container'] .chart-name").getText() - .equals(ELAPSED_TIME_CHART_NAME)); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='5:chart-name-container'] .chart-name").getText() - .equals(CASE_BY_FINISHED_TASK_CHART_NAME)); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='6:chart-name-container'] .chart-name").getText() - .equals(CASE_BY_FINISHED_TIME_CHART_NAME)); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='7:chart-name-container'] .chart-name").getText() - .equals(CASES_BY_CATEGORY_CHART_NAME)); - } - - @Test - public void testBreadCrumb() { - grantPermissionToCreateChart(); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - statisticWidgetPage.waitForElementDisplayed(By.id("statistics-widget:widget-container"), true); - assertEquals("Statistics", statisticWidgetPage.getTextOfCurrentBreadcrumb()); - - statisticWidgetPage.switchCreateMode(); - assertEquals("Statistics", statisticWidgetPage.getTextOfCurrentBreadcrumb()); - - statisticWidgetPage.goToHomeFromBreadcrumb(); - newDashboardPage = new NewDashboardPage(); - assertEquals(true, newDashboardPage.isDisplayed()); - } - - private void grantPermissionToCreateChart() { - redirectToRelativeLink(grantPortalPermission); - } - - @Test - public void testChartNameMultiLanguage() { - resetLanguageOfCurrentUser(); - grantPermissionToCreateChart(); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - statisticWidgetPage.waitForElementDisplayed(By.id("statistics-widget:widget-container"), true); - - statisticWidgetPage.switchCreateMode(); - statisticWidgetPage.createTaskByPriorityChartMultiLanguage(); - - statisticWidgetPage.backToDashboard(); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='1:chart-name-container'] .chart-name").getText() - .equals("Task by priority chart English")); - - UserProfilePage userProfilePage = statisticWidgetPage.openMyProfilePage(); - userProfilePage.selectLanguage(3); - newDashboardPage = userProfilePage.save(); - - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - WaitHelper.assertTrueWithWait( - () -> statisticWidgetPage.findElementByCssSelector("div[id$='1:chart-name-container'] .chart-name").getText() - .equals("Task by priority chart German")); - } - -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardRestoreConfigurationTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardRestoreConfigurationTest.java index 20b854694fa..4da38cdb138 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardRestoreConfigurationTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardRestoreConfigurationTest.java @@ -73,7 +73,7 @@ public void testRestorePublicDashboardToDefaultTemplate() { @Test public void testCannotRestoreDashboardWhenTemplateNotFound() { var dashboardName = "Dashboard"; - createJSonFile("dashboard-has-one-chart-example.json", PortalVariable.DASHBOARD.key); + createJSonFile("dashboard-has-newsfeed.json", PortalVariable.DASHBOARD.key); newDashboardPage.waitForAbsencesGrowlMessageDisplay(); var configurationPage = newDashboardPage.openDashboardConfigurationPage(); var modificationPage = configurationPage.openEditPublicDashboardsPage(); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/task/TaskAnalysisWidgetTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/task/TaskAnalysisWidgetTest.java deleted file mode 100644 index 5129b83d9bc..00000000000 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/task/TaskAnalysisWidgetTest.java +++ /dev/null @@ -1,348 +0,0 @@ -package com.axonivy.portal.selenium.test.task; - -import static com.codeborne.selenide.Condition.exist; -import static com.codeborne.selenide.Condition.visible; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import com.axonivy.ivy.webtest.IvyWebTest; -import com.axonivy.portal.selenium.common.BaseTest; -import com.axonivy.portal.selenium.common.TestAccount; -import com.axonivy.portal.selenium.common.Variable; -import com.axonivy.portal.selenium.page.MainMenuPage; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.StatisticWidgetPage; -import com.axonivy.portal.selenium.page.TaskAnalysisWidgetPage; -import com.codeborne.selenide.CollectionCondition; -import com.codeborne.selenide.Condition; -import com.codeborne.selenide.ElementsCollection; -import com.codeborne.selenide.SelenideElement; - -@IvyWebTest -public class TaskAnalysisWidgetTest extends BaseTest { - - private static final String ENABLE_CASE_OWNER_SETTING = Variable.ENABLE_CASE_OWNER.getKey(); - private NewDashboardPage newDashboardPage; - private StatisticWidgetPage statisticWidgetPage; - private MainMenuPage mainMenuPage; - - @Override - @BeforeEach - public void setup() { - super.setup(); - createTestingTasks(); - createTestData(); - login(TestAccount.ADMIN_USER); - grantPermissionOfPortal(); - newDashboardPage = new NewDashboardPage(); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - } - - private void grantPermissionOfPortal() { - redirectToRelativeLink(grantPortalPermission); - } - - @Test - public void testBackToStatisticPage() { - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - assertTrue(taskAnalysisWidgetPage.isDisplayed()); - statisticWidgetPage = taskAnalysisWidgetPage.navigateToStatisticPage(); - assertTrue(statisticWidgetPage.isDisplayed()); - } - - @Test - public void testAddAndRemoveColumns() { - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - - taskAnalysisWidgetPage.clickOnColumnToggler(); - - SelenideElement columnContainer = taskAnalysisWidgetPage.findColumnContainer(); - int numberOfCheckboxes = columnContainer.findElements(By.cssSelector(".ui-chkbox-box")).size(); - List unselectedColumnCheckboxes = - columnContainer.$$(By.cssSelector(".ui-chkbox-box:not(.ui-state-active)")); - - unselectedColumnCheckboxes.forEach(elem -> elem.click()); - taskAnalysisWidgetPage.waitPageLoaded(); - - int numberOfColumns = taskAnalysisWidgetPage.findElementById("task-widget:statistic-result-form:task-table_head") - .findElements(By.cssSelector("th[scope='col']:not(.ui-helper-hidden)")).size(); - assertEquals(numberOfColumns, numberOfCheckboxes); - - refreshPage(); - taskAnalysisWidgetPage.waitPageLoaded(); - taskAnalysisWidgetPage.clickOnColumnToggler(); - List selectedColumnCheckboxes = columnContainer - .$$(By.cssSelector(".ui-chkbox-box.ui-state-active")); - - selectedColumnCheckboxes.get(0) - .shouldBe(Condition.and("should be clickable", visible, exist), - DEFAULT_TIMEOUT) - .click(); - selectedColumnCheckboxes.get(1) - .shouldBe(Condition.and("should be clickable", visible, exist), - DEFAULT_TIMEOUT) - .click(); - - taskAnalysisWidgetPage.waitPageLoaded(); - - numberOfColumns = taskAnalysisWidgetPage - .findElementById("task-widget:statistic-result-form:task-table_head") - .$$(By.cssSelector("th[scope='col']:not(.ui-helper-hidden)")) - .shouldBe(CollectionCondition.sizeGreaterThanOrEqual(0)).size(); - - assertEquals(numberOfColumns, selectedColumnCheckboxes.size()); - } - - @Test - public void testApplyTaskFilters() { - String nameKeyword = "request"; - String prioritySeletion = "NORMAL"; - - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - taskAnalysisWidgetPage.openAdvancedTaskFilter("Name", "name"); - taskAnalysisWidgetPage.filterByTaskName(nameKeyword); - - taskAnalysisWidgetPage.openAdvancedTaskFilter("Priority", "priority"); - List selectedPriorities = new ArrayList<>(); - selectedPriorities.add(prioritySeletion); - taskAnalysisWidgetPage.filterByTaskPriority(selectedPriorities); - taskAnalysisWidgetPage.clickApplyFilter(); - - ElementsCollection results = taskAnalysisWidgetPage.getRowsInTaskTable(); - results.shouldHave(CollectionCondition.size(2), DEFAULT_TIMEOUT); - - for (WebElement resultRow : results) { - List resultCells = resultRow.findElements(By.cssSelector("td:not([class='ui-helper-hidden'])")); - assertTrue(resultCells.get(2).getText().toLowerCase().contains(nameKeyword)); - assertTrue(resultCells.get(3).getText().equals(prioritySeletion)); - } - } - - @Test - public void testApplyCaseFilters() { - String keyword = "request"; - String stateSeletion = "In progress"; - - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - taskAnalysisWidgetPage.openAdvancedCaseFilter("State", "state"); - taskAnalysisWidgetPage.openAdvancedCaseFilter("Name", "case-name"); - taskAnalysisWidgetPage.filterByCaseName(keyword); - - List selectedStates = new ArrayList<>(); - selectedStates.add(stateSeletion); - taskAnalysisWidgetPage.filterByCaseState(selectedStates); - taskAnalysisWidgetPage.clickApplyFilter(); - - ElementsCollection results = taskAnalysisWidgetPage.getRowsInTaskTable(); - results.shouldHave(CollectionCondition.size(4), DEFAULT_TIMEOUT); - - for (WebElement resultRow : results) { - List resultCells = resultRow.findElements(By.cssSelector("td:not([class='ui-helper-hidden'])")); - assertTrue(resultCells.get(0).getText().toLowerCase().contains(keyword)); - assertTrue("RUNNING".equals(resultCells.get(1).getText())); - } - } - - @Test - public void testApplyCategoryFilters() { - resizeBrowserTo2kResolution(); - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - - // Task category filter - taskAnalysisWidgetPage.openAdvancedTaskFilter("Category", "task-category"); - taskAnalysisWidgetPage.filterByTaskCategory("Other Leave"); - taskAnalysisWidgetPage.clickApplyFilter(); - ElementsCollection results = taskAnalysisWidgetPage.getRowsInTaskTable(); - results.shouldHave(CollectionCondition.size(2), DEFAULT_TIMEOUT); - - // Case category filter - taskAnalysisWidgetPage.resetFilter(); - taskAnalysisWidgetPage.openAdvancedCaseFilter("Case category", - "case-category"); - taskAnalysisWidgetPage.filterByCaseCategory("Leave Request"); - taskAnalysisWidgetPage.clickApplyFilter(); - - results = taskAnalysisWidgetPage.getRowsInTaskTable(); - results.shouldHave(CollectionCondition.size(4), DEFAULT_TIMEOUT); - } - - @Test - public void testApplyCaseOwnerFilter() { - updatePortalSetting(ENABLE_CASE_OWNER_SETTING, "true"); - redirectToRelativeLink(userIsOwnerUrl); - newDashboardPage = new NewDashboardPage(); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - taskAnalysisWidgetPage.filterByOwner("Demo"); - taskAnalysisWidgetPage.clickApplyFilter(); - - ElementsCollection results = taskAnalysisWidgetPage.getRowsInTaskTable(); - results.shouldHave(CollectionCondition.size(2), DEFAULT_TIMEOUT); - updatePortalSetting(ENABLE_CASE_OWNER_SETTING, "false"); - } - - @Test - public void testAddCaseOwnerColumn() { - updatePortalSetting(ENABLE_CASE_OWNER_SETTING, "true"); - newDashboardPage = new NewDashboardPage(); - mainMenuPage = newDashboardPage.openMainMenu(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - - taskAnalysisWidgetPage.clickOnColumnToggler(); - - WebElement columnContainer = taskAnalysisWidgetPage.getDriver().findElement(By.tagName("body")) - .findElement(By.cssSelector(".ui-columntoggler")); - List checkboxes = columnContainer.findElements(By.cssSelector("li.ui-columntoggler-item")); - - checkboxes.forEach(elem -> { - if (StringUtils.equals(elem.getText(), "Case Owner")) { - elem.findElement(By.className("ui-chkbox")).click(); - } - }); - updatePortalSetting(ENABLE_CASE_OWNER_SETTING, "false"); - } - - @Test - public void testSavePublicFilterSet() { - String filterSetName = "Filters for annual"; - - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - resizeBrowserTo2kResolution(); - addFilters(taskAnalysisWidgetPage); - taskAnalysisWidgetPage.saveFilterSet(filterSetName, false); - taskAnalysisWidgetPage.countSavedFilter(2); - statisticWidgetPage = taskAnalysisWidgetPage.navigateToStatisticPage(); - TaskAnalysisWidgetPage secondTaskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - boolean isFilterSetloaded = secondTaskAnalysisWidgetPage.loadFilterSet(filterSetName, false); - - // Sometimes ES take longer time to save data... - if (!isFilterSetloaded) { - refreshPage(); - secondTaskAnalysisWidgetPage.loadFilterSet(filterSetName, false); - } - - secondTaskAnalysisWidgetPage.waitForTaskDataChangeToSpecificSize(1); - List resultCells = secondTaskAnalysisWidgetPage.getRowsInTaskTable().get(0) - .findElements(By.cssSelector("td:not([class='ui-helper-hidden'])")); - assertTrue(resultCells.get(0).getText().toLowerCase().contains("request")); - assertTrue("RUNNING".equals(resultCells.get(1).getText())); - assertTrue(resultCells.get(2).getText().toLowerCase().contains("annual")); - } - - @Test - public void testSavePrivateFilterSet() { - String filterSetName = "Filters for annual"; - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - resizeBrowserTo2kResolution(); - addFilters(taskAnalysisWidgetPage); - taskAnalysisWidgetPage.saveFilterSet(filterSetName, true); - taskAnalysisWidgetPage.countSavedFilter(2); - statisticWidgetPage = taskAnalysisWidgetPage.navigateToStatisticPage(); - TaskAnalysisWidgetPage secondTaskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - boolean isFilterSetloaded = secondTaskAnalysisWidgetPage.loadFilterSet(filterSetName, true); - - // Sometimes ES take longer time to save data... - if (!isFilterSetloaded) { - refreshPage(); - secondTaskAnalysisWidgetPage.loadFilterSet(filterSetName, true); - } - - secondTaskAnalysisWidgetPage.waitForTaskDataChangeToSpecificSize(1); - - List resultCells = secondTaskAnalysisWidgetPage.getRowsInTaskTable().get(0) - .findElements(By.cssSelector("td:not([class='ui-helper-hidden'])")); - assertTrue(resultCells.get(0).getText().toLowerCase().contains("request")); - assertTrue("RUNNING".equals(resultCells.get(1).getText())); - assertTrue(resultCells.get(2).getText().toLowerCase().contains("annual")); - } - - private void createTestData() { - redirectToRelativeLink(create12CasesWithCategoryUrl); - } - - private void addFilters(TaskAnalysisWidgetPage taskAnalysisWidgetPage) { - String taskNameKeyword = "annual"; - String taskCategory = "Annual Leave"; - String caseNameKeyword = "request"; - String caseCategory = "Leave Request"; - String caseState = "In progress"; - - taskAnalysisWidgetPage.openAdvancedCaseFilter("State", "state"); - taskAnalysisWidgetPage.openAdvancedTaskFilter("Name", "name"); - taskAnalysisWidgetPage.filterByTaskName(taskNameKeyword); - - taskAnalysisWidgetPage.openAdvancedTaskFilter("Category", "task-category"); - taskAnalysisWidgetPage.filterByTaskCategory(taskCategory); - - taskAnalysisWidgetPage.openAdvancedCaseFilter("Name", "case-name"); - taskAnalysisWidgetPage.filterByCaseName(caseNameKeyword); - - taskAnalysisWidgetPage.openAdvancedCaseFilter("Case category", "case-category"); - taskAnalysisWidgetPage.filterByCaseCategory(caseCategory); - - List selectedStates = new ArrayList<>(); - selectedStates.add(caseState); - taskAnalysisWidgetPage.filterByCaseState(selectedStates); - } - - @Test - public void testDefaultAndResetFilter() { - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - assertTrue(taskAnalysisWidgetPage.getFilterName().contains("Default filter")); - - taskAnalysisWidgetPage.openAdvancedTaskFilter("Name", "name"); - taskAnalysisWidgetPage.filterByTaskName("request"); - assertTrue(taskAnalysisWidgetPage.isResetButtonShown()); - - taskAnalysisWidgetPage.resetFilter(); - assertTrue(taskAnalysisWidgetPage.getFilterName().contains("Default filter")); - } - - @Test - public void testRemoveAndReloadFilter() { - // Task Responsible, Case Creator - String filterSetName = "saveUserFilter"; - - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - taskAnalysisWidgetPage.filterByResponsible("Demo", "Responsible", "responsible"); - taskAnalysisWidgetPage.filterUserInCase("Demo", "Creator", "creator"); - resizeBrowserTo2kResolution(); - taskAnalysisWidgetPage.saveFilterSet(filterSetName, false); - taskAnalysisWidgetPage.countSavedFilter(2); - - MainMenuPage mainMenuPage = new MainMenuPage(); - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - statisticWidgetPage.navigateToTaskAnalysisPage(); - taskAnalysisWidgetPage.loadFilterSet(filterSetName, false); - - taskAnalysisWidgetPage.removeResponsible(); - taskAnalysisWidgetPage.removeUserInFilter(); - - statisticWidgetPage = mainMenuPage.selectStatisticDashboard(); - statisticWidgetPage.navigateToTaskAnalysisPage(); - taskAnalysisWidgetPage.loadFilterSet(filterSetName, false); - - assertTrue(taskAnalysisWidgetPage.getUser("responsible").contains("Demo")); - assertTrue(taskAnalysisWidgetPage.getUser("creator").contains("Demo")); - } - - @Test - public void testTaskFilterForUnavailableActivator() { - TaskAnalysisWidgetPage taskAnalysisWidgetPage = statisticWidgetPage.navigateToTaskAnalysisPage(); - taskAnalysisWidgetPage.openNoActivatorFilter("Missing activator"); - taskAnalysisWidgetPage.filterByUnavailableActivator(); - taskAnalysisWidgetPage.clickApplyFilter(); - ElementsCollection results = taskAnalysisWidgetPage.getRowsInTaskTable(); - results.shouldHave(CollectionCondition.size(2), DEFAULT_TIMEOUT); - } -} diff --git a/AxonIvyPortal/portal/cms/cms.yaml b/AxonIvyPortal/portal/cms/cms.yaml index f036beb4fa2..0a2e406ac75 100644 --- a/AxonIvyPortal/portal/cms/cms.yaml +++ b/AxonIvyPortal/portal/cms/cms.yaml @@ -209,7 +209,6 @@ ch.ivy.addon.portalkit.ui.jsf: hideChangePasswordButtonNote: Set this variable to true to hide the "Change Password" option in the top menu and the "Forgotten Password" option on the login page. If set to false, these options will be shown. hideLogoutButtonNote: If true, the logout button on top menu will be hidden, otherwise it will be shown. hideRelatedCaseInfoFromHistory: If true, case history does not display the related case information in the history table. - hideStatisticWidget: Set to true to hide Statistic widget from homepage and application menu. hideSystemNotesFromHistory: If true, case/task note does not display any system notes for non-administrator users. hideSystemNotesFromHistoryAdministrator: If true, case/task note does not display any system notes for administrator. hideSystemTasksFromHistory: If true, case note does not display any system tasks for non-administrator users. @@ -227,7 +226,6 @@ ch.ivy.addon.portalkit.ui.jsf: showProcessInformation: Set to false to disable link to Show Information of process on Processes page (grid mode) and Case Details. showQuickGlobalSearch: For switch on/off the display of the quick global search. showTaskDurationTime: For switch on/off the display of the duration time in task details page. - statisticChartScalingInterval: Interval in seconds to do periodic statistic chart scaling requests. If the interval value is less than 10, periodic statistic chart scaling is disabled. uploadDocumentWhiteListExtensionNote: 'Leave value empty if you allow all extensions. If just allow some extensions, list out extensions here, separated by comma. Example: pdf, txt, doc, docx.' key: Key link: Link @@ -378,6 +376,7 @@ ch.ivy.addon.portalkit.ui.jsf: backgroundColor: Background color cancel: Cancel case: Case + caseCategory: Case category caseInformation: Case Information caseName: Case name categories: Categories @@ -590,10 +589,6 @@ ch.ivy.addon.portalkit.ui.jsf: waitingMessage: 'Data is collecting ... ' processChain: currentStepIsNotDefined: Current step ({0}) of process chain is not defined - statisticWidget: - chartDeletionConfirmation: Are you sure you want to delete this statistic chart? - contextMenuDrilldown: Drilldown - contextMenuToTaskList: Go to task list taskStart: cannotDelegateTaskMessage: This task cannot be delegated to any other user or group. cannotStartMessages: @@ -645,14 +640,7 @@ ch.ivy.addon.portalkit.ui.jsf: SavedFilterHeader: Saved filters SearchForFilter: Search for filter StatisticWidget: - AvailableCharts: Available statistics charts - Charts: 'Chart(s): {0}' - ConfigurationDescription: You can configure your widget in this configuration area. Please define the chart which will be shown on your dashboard. EmptyChartDataMessage: We do not have enough data to create a nice chart! - FilterChartText: Filter a chart by name - PlaceholderChartOption: Select a chart - PleaseSelectChart: Please select a chart - PreviewText: Please select a chart to see the canvas data WidgetFilterName: Widget filter name WidgetFilters: Widget filters actionSelection: Action selection @@ -756,7 +744,6 @@ ch.ivy.addon.portalkit.ui.jsf: yourCustomWidget: Your Custom Widget yourProcessViewer: Your Process Viewer yourProcesses: Your Processes - yourStatistics: Your Statistics yourTasks: Your Tasks documentFiles: deleteDocumentNote: '{0} has deleted {1}' @@ -913,147 +900,6 @@ ch.ivy.addon.portalkit.ui.jsf: searchResultsFor: '{0} search results for "{1}"' sidestep: addAdhocTask: Add Ad-hoc Task - statistic: - chart: - ExpandOrCollapseColumn: Expand/Collapse Columns - addChart: Add new chart - addChartDialogHeader: Add statistic chart to dashboard - backToDashboard: Back to dashboard - barchart: - Percentage: Percentage - daysOfWeek: - friday: Friday - monday: Monday - saturday: Saturday - sunday: Sunday - thursday: Thursday - tuesday: Tuesday - wednesday: Wednesday - expired: Expired - in2Days: In 2 days - in3Days: In 3 days - monthsOfYear: - April: April - August: August - December: December - February: February - January: January - July: July - June: June - March: March - May: May - November: November - October: October - September: September - today: Today - tomorrow: Tomorrow - weeksOfMonth: - fifthWeek: Fifth week - firstWeek: First week - fourthWeek: Fourth week - secondWeek: Second week - sixthWeek: Sixth week - thirdWeek: Third week - caseCategory: Case category - chartCreationSuccessDetailMsg: Chart with name {0} was created successfully - chartCreationSuccessTitle: Chart was created successfully - elapsedTime: Elapsed Time - elapsedTimeChart: - compareButton: Compare - compareRole: 'Compare Role:' - elapsedTimeInHours: Elapsed time in hours - noEntriesFound: No entries found with given criteria - taskCategory: Task category - withRole: 'With Role:' - emptystate: - defaultEmptyMessages: No statistic chart to display. - expiryPeriod: Expiry period - loadingCharts: Please wait, charts are loading... - notAllowedToCreateChart: You are not allowed to create a chart before clicking Apply Filters button - other: Others - restoreDefaultChart: If you proceed, you will loose all charts created by yourself. The standard settings will be applied. - second: sec - showAllCharts: Show all charts - statisticCarousel: Statistics Carousel - statistics: Statistics - taskByExpiry: - hour: (Hour) - thisMonth: This Month - thisWeek: This Week - thisYear: This Year - taskByPriority: - addToDashboardLink: Add to dashboard - exception: Exception - high: High - low: Low - normal: Normal - taskExpiry: Task expiry - chartInfo: - chartDetailsHeader: Chart Details - chartName: Chart Name - chartType: Chart Type - chartType: - caseByFinishedTask: Processed cases in time period - caseByFinishedTaskDescription: Cases where a task was finished in the selected time period - caseByFinishedTime: Done cases in time period - caseByFinishedTimeDescription: Cases which are done in the selected time period - caseByState: Case by state - elapsedTimeByCaseCategory: Elapsed time of done cases - elapsedTimeByCaseCategoryDescription: Elapsed time of finished cases by category - taskByExpiry: Task by expiry - taskByPriority: Task by priority - defaultChart: - newChart: New chart - tasksByPriority: Tasks by Priority - filter: - affectedCharts: Affected charts - allSelected: All - caseCategoriesLabel: Case Categories - caseCategoryFilterDescription: You can find all available case categories here. Only selected Case Categories are considered in the affected charts. - caseStateFilterDescription: Only selected States are considered in the affected charts. - filter: Filters - noRoles: There are no roles - noSelectionCustomVarChar: No selection. - noneSelected: None - roleFilterDescription: You can find all available process roles here. Only selected roles are considered in the affected charts - rolesLabel: Roles - selectAll: Select All - taskPrioritiesLabel: Task Priorities - taskPriorityFilterDescription: Tasks can be selected depending on their priority. - timePeriod: Time period - timePeriodFilterDescription: Restricts the time period for cases and tasks. - workflowStatesLabel: Workflow States - taskAnalysis: - applyFilter: Apply filters - caseCategory: Case category - caseCreator: Case creator - caseDescription: Case description - caseFilter: Case filters - caseID: Case ID - caseName: Case name - caseOwner: Case owner - caseState: Case state - downloadZipFileExplanation: The number of tasks to export exceeds the limit of Excel rows. Therefore, data will be split to multiple Excel files, then compressed in a Zip file to download. - taskAnalysis: Task Analysis - taskCategory: Task category - taskCreationTime: Task created - taskDescription: Task description - taskExpiryTime: Task expiry - taskFilter: Task filters - taskFinishedTime: Task completed on - taskID: Task ID - taskPriority: Task priority - taskResponsible: Task responsible - taskState: Task state - taskWorker: Task editor - waitingDownloadMessage: We are creating the Export, this can take a few minutes - timePeriod: - custom: Custom - last6Month: Last 6 month - lastMonth: Last month - lastWeek: Last week - validationErrors: - nameIsExisted: A chart with this name already exists taskActivator: assign: Assign cannotAssignTask: This task cannot be assigned to any other user or group. diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index 1a3d9030a8a..bbb5cc393cc 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -260,7 +260,6 @@ ch.ivy.addon.portalkit.ui.jsf: hideChangePasswordButtonNote: Setzen Sie diese Variable auf true, um die Option "Passwort ändern" im oberen Menü und die Option "Passwort vergessen" auf der Anmeldeseite auszublenden. Wenn sie auf false gesetzt ist, werden diese Optionen angezeigt. hideLogoutButtonNote: 'Auf "true" setzen, um die Logout Funktion im Top Menu zu deaktivieren. ' hideRelatedCaseInfoFromHistory: Wenn diese Option auf "true" gesetzt ist, werden die zugehörigen Fallinformationen nicht in der Tabelle "Historie" angezeigt. - hideStatisticWidget: Setzen Sie den Wert auf "true", um das Statistik-Widget auf der Startseite und im Anwendungsmenü auszublenden. hideSystemNotesFromHistory: Wenn diese Option aktiviert ist, werden in den Vorgangs-/Aufgabennotizen keine Systemnotizen für Benutzer ohne Administratorrechte angezeigt. hideSystemNotesFromHistoryAdministrator: Wenn diese Option aktiviert ist, werden in den Vorgangs-/Aufgabennotizen keine Systemnotizen für Administratoren angezeigt. hideSystemTasksFromHistory: Wenn diese Option aktiviert ist, zeigt die Vorgangs- / Aufgabennotiz keine technischen Verlaufseinträge für Benutzer ohne Administratorrechte an. @@ -279,7 +278,6 @@ ch.ivy.addon.portalkit.ui.jsf: showProcessInformation: Auf "false" setzen, um die Verknüpfung zu Informationen des Prozesses auf der Seite Prozesse (Gittermodus) und Falldetails anzeigen zu deaktivieren. showQuickGlobalSearch: Zum Ein-/Ausschalten der Anzeige der globalen Schnellsuche. showTaskDurationTime: Zum Ein-/Ausschalten der Anzeige der Bearbeitungszeit auf der Aufgabendetailseite. - statisticChartScalingInterval: Intervall in Sekunden, in dem die Skalierung des statistischen Diagramms regelmäßig angefordert wird. Ist der Intervallwert kleiner als 10, wird die periodische Skalierung des statistischen Diagramms deaktiviert. uploadDocumentWhiteListExtensionNote: 'Leer lassen, falls Sie alle Formate erlauben. Falls Sie nur eine geringe Anzahl an Formate erlauben möchten (White list), können Sie diese hier, mit Komma getrennt, aufführen. Z.B.: pdf, txt, doc, docx.' key: Schlüssel link: Link @@ -441,6 +439,7 @@ ch.ivy.addon.portalkit.ui.jsf: backgroundColor: Hintergrundfarbe cancel: Abbrechen case: Vorgang + caseCategory: Vorgangskategorie caseInformation: Vorgangsinformationen caseName: Vorgangsname categories: Kategorien @@ -703,11 +702,6 @@ ch.ivy.addon.portalkit.ui.jsf: titlePage: Passwort-Überprüfung processChain: currentStepIsNotDefined: Aktueller Schritt ({0}) der Prozesskette ist nicht definiert - statisticWidget: - chartDeletionConfirmation: Wollen Sie dieses Diagramm wirklich löschen? - contextMenuDrilldown: Drilldown - contextMenuToCaseList: Zur Fallliste gehen - contextMenuToTaskList: Zur Aufgabenliste taskStart: cannotDelegateTaskMessage: Diese Aufgabe kann an keinen anderen Benutzer oder keine andere Gruppe delegiert werden. cannotStartMessages: @@ -780,14 +774,7 @@ ch.ivy.addon.portalkit.ui.jsf: ShareThisDashboard: Teilen Sie dieses Dashboard StandardWidgets: Standard-Widgets StatisticWidget: - AvailableCharts: Verfügbare Statistikdiagramme - Charts: 'Diagramm(e): {0}' - ConfigurationDescription: Sie können Ihr Widget in diesem Konfigurationsbereich konfigurieren. Bitte definieren Sie die Grafik, die auf Ihrem Dashboard angezeigt werden soll. EmptyChartDataMessage: Wir haben nicht genug Daten, um ein schönes Diagramm zu erstellen! - FilterChartText: Filtern eines Diagramms nach Name - PlaceholderChartOption: Wählen Sie ein Diagramm - PleaseSelectChart: Bitte wählen Sie ein Diagramm aus - PreviewText: Bitte wählen Sie ein Diagramm aus, um die Canvas-Daten zu sehen WelcomeWidgetIntroduction: Dieses Widget zeigt einen Willkommenstext und ein Bild auf dem Dashboard an. WelcomeWidgetNotFoundMessage: Wir können das Bild des Widgets nicht finden, bitte konfigurieren Sie Ihr Bild neu! WidgetFilterName: Name des Widget-Filters @@ -931,7 +918,6 @@ ch.ivy.addon.portalkit.ui.jsf: yourNotifications: Ihre Benachrichtigungen yourProcessViewer: Ihr Prozessbetrachter yourProcesses: Ihre Prozesse - yourStatistics: Ihre Statistiken yourTasks: Ihre Aufgaben documentFiles: deleteDocumentNote: '{0} hat folgendes gelöscht: {1}' @@ -1133,154 +1119,6 @@ ch.ivy.addon.portalkit.ui.jsf: searchResultsFor: '{0} Suchresultate für "{1}"' sidestep: addAdhocTask: Ad-hoc Aufgabe hinzufügen - statistic: - chart: - ExpandOrCollapseColumn: Spalten auf-/zuklappen - addChart: Neues Diagramm hinzufügen - addChartDialogHeader: Diagramm zum Dashboard hinzufügen - backToDashboard: Zurück zum Dashboard - barchart: - Percentage: Prozent - daysOfWeek: - friday: Freitag - monday: Montag - saturday: Samstag - sunday: Sonntag - thursday: Donnerstag - tuesday: Dienstag - wednesday: Mittwoch - expired: Abgelaufen - in2Days: In 2 Tagen - in3Days: In 3 Tagen - monthsOfYear: - April: April - August: August - December: Dezember - February: Februar - January: Januar - July: Juli - June: Juni - March: März - May: Mai - November: November - October: Oktober - September: September - today: Heute - tomorrow: Morgen - weeksOfMonth: - fifthWeek: Fünfte Woche - firstWeek: Erste Woche - fourthWeek: Vierte Woche - secondWeek: Zweite Woche - sixthWeek: Sechste Woche - thirdWeek: Dritte Woche - caseCategory: Vorgangskategorie - chartCreationSuccessDetailMsg: Diagramm mit Name {0} wurde erfolgreich erstellt - chartCreationSuccessTitle: Diagramm wurde erfolgreich erstellt - elapsedTime: Verstrichene Zeit - elapsedTimeChart: - compareButton: Vergleichen - compareRole: Rollen vergleichen - elapsedTimeInHours: Laufzeit in Std. - noEntriesFound: Keine übereinstimmende Kriterien gefunden - taskCategory: Aufgabenkategorie - withRole: 'Mit Rolle:' - emptystate: - defaultEmptyMessages: Es sind keine Auswertungen vorhanden. - exception: - idNotFound: 'Diagramm-ID mit der ID: {0} nicht gefunden' - noPermission: Sie haben keine Berechtigung, diese Anfrage zu senden! - expiryPeriod: Fristende - loadingCharts: Bitte warten während die Diagramme geladen werden… - moveLeft: Nach links bewegen - moveRight: Nach rechts bewegen - notAllowedToCreateChart: Sie haben die Filtereinstellungen geändert. Bitte aktualisieren Sie gesetzten Filter mit "Filter anwenden", um das Diagramm anschließend erstellen zu können - other: Andere - restoreDefaultChart: Wenn Sie fortfahren, werden alle selbsterstellten Diagramme gelöscht. Die Standardeinstellung wird angewendet. - second: sek - showAllCharts: Alle Diagramme anzeigen - statisticCarousel: Statistik-Karussell - statistics: Statistiken - taskByExpiry: - hour: (Stunde) - thisMonth: Diesen Monat - thisWeek: Diese Woche - thisYear: Dieses Jahr - taskByPriority: - addToDashboardLink: Zum Dashboard hinzufügen - exception: Ausnahme - high: Hoch - low: Niedrig - normal: Normal - taskExpiry: Aufgabenfristen - chartInfo: - chartDetailsHeader: Diagrammdetails - chartName: Diagrammname - chartType: Diagrammtyp - name: Diagramm-Informationen - chartType: - caseByFinishedTask: Bearbeitete Vorgänge im Zeitraum - caseByFinishedTaskDescription: Vorgänge, in denen eine Aufgabe in der ausgewählten Zeitspanne abgeschlossen wurde - caseByFinishedTime: Abgeschlossene Vorgänge im Zeitraum - caseByFinishedTimeDescription: Vorgänge die in der ausgewählten Zeitspanne abgeschlossen wurden - caseByState: Vorgänge nach Status - casesByCategory: Vorgänge nach Kategorie - elapsedTimeByCaseCategory: Durchlaufzeit abgeschlossener Vorgänge - elapsedTimeByCaseCategoryDescription: Durchlaufszeit (Start bis Ende des Vorgangs) abgeschlossener Vorgänge nach Kategorie - taskByExpiry: Aufgaben nach Ablaufdatum - taskByPriority: Aufgaben nach Priorität - defaultChart: - newChart: Neues Diagramm - tasksByPriority: Aufgaben nach Priorität - filter: - affectedCharts: Betroffene Diagramme - allSelected: Alle - caseCategoriesLabel: Vorgangskategorien - caseCategoryFilterDescription: Hier sehen Sie alle verfügbaren Vorgangskategorien. Nur ausgewählte Vorgangskategorien werden in den betroffenen Diagrammen berücksichtigt. - caseStateFilterDescription: Nur ausgewählte Status werden in den betroffenen Diagrammen berücksichtigt. - filter: Filter - noRoles: Keine Rollen vorhanden - noSelectionCustomVarChar: Keine Auswahl - noneSelected: Keine - roleFilterDescription: Hier sehen Sie alle verfügbaren Prozessrollen. Nur ausgewählte Rollen werden in den betroffenen Diagrammen berücksichtigt. - rolesLabel: Rollen - selectAll: Alle selektieren - taskPrioritiesLabel: Aufgabenprioritäten - taskPriorityFilterDescription: Aufgaben können nach Ihrer Priorität gefiltert werden. - timePeriod: Zeitspanne - timePeriodFilterDescription: 'Schränkt den Zeitraum der Vorgänge und Aufgaben ein. ' - workflowStatesLabel: Workflowstatus - taskAnalysis: - applyFilter: Filter anwenden - caseCategory: Vorgangskategorie - caseCreator: Ersteller - caseDescription: Vorgangsbeschreibung - caseFilter: Vorgangsfilter - caseID: Vorgangs Id - caseName: Vorgangsname - caseOwner: Vorgangs Owner - caseState: Vorgangsstatus - downloadZipFileExplanation: Die Anzahl der zu exportierenden Aufgaben überschreitet die Grenze der Excel-Zeilen. Daher werden die Daten in mehrere Excel-Dateien aufgeteilt und dann in einer ZIP-Datei zum Herunterladen komprimiert. - taskAnalysis: Aufgabenanalyse - taskCategory: Aufgabenkategorie - taskCreationTime: Aufgabe erstellt - taskDescription: Aufgabenbeschreibung - taskExpiryTime: Aufgabenfälligkeit - taskFilter: Aufgabenfilter - taskFinishedTime: Aufgabe abgeschlossen am - taskID: Aufgabe Id - taskPriority: Aufgabenpriorität - taskResponsible: Aufgabenverantwortlicher - taskState: Aufgabenstatus - taskWorker: Aufgabenbearbeiter - waitingDownloadMessage: Bitte um Geduld. Wir erstellen gerade den Export. Das kann einige Minuten dauern. - timePeriod: - custom: Benutzerdefiniert - last6Month: Letzte 6 Monate - lastMonth: Letzter Monat - lastWeek: Letzte Woche - validationErrors: - nameIsExisted: Ein Diagramm mit dem selben Namen existiert bereits taskActivator: assign: Zuweisen cannotAssignTask: Diese Aufgabe kann keinem anderen Benutzer oder keiner anderen Gruppe zugewiesen werden. @@ -1612,6 +1450,7 @@ Dialogs: CaseWidgetConfiguration: AddFilter: Filter hinzufügen ClientStatisticWidget: + IdNotFound: 'Chart Id not found with id: {0}' NoPermissionChartMessage: Sie haben nicht die erforderliche Berechtigung, um diese Karte zu sehen. DashboardImportDetails: FileInfomation: Dateiinformationen diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index d793c1f43b1..50b16a225cf 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -259,7 +259,6 @@ ch.ivy.addon.portalkit.ui.jsf: hideChangePasswordButtonNote: Set this variable to true to hide the "Change Password" option in the top menu and the "Forgotten Password" option on the login page. If set to false, these options will be shown. hideLogoutButtonNote: If true, the logout button on top menu will be hidden, otherwise it will be shown. hideRelatedCaseInfoFromHistory: If true, case history does not display the related case information in the history table. - hideStatisticWidget: Set to true to hide Statistic widget from homepage and application menu. hideSystemNotesFromHistory: If true, case/task note does not display any system notes for non-administrator users. hideSystemNotesFromHistoryAdministrator: If true, case/task note does not display any system notes for administrator. hideSystemTasksFromHistory: If true, case note does not display any system tasks for non-administrator users. @@ -278,7 +277,6 @@ ch.ivy.addon.portalkit.ui.jsf: showProcessInformation: Set to false to disable link to Show Information of process on Processes page (grid mode) and Case Details. showQuickGlobalSearch: For switch on/off the display of the quick global search. showTaskDurationTime: For switch on/off the display of the duration time in task details page. - statisticChartScalingInterval: Interval in seconds to do periodic statistic chart scaling requests. If the interval value is less than 10, periodic statistic chart scaling is disabled. uploadDocumentWhiteListExtensionNote: 'Leave value empty if you allow all extensions. If just allow some extensions, list out extensions here, separated by comma. Example: pdf, txt, doc, docx.' key: Key link: Link @@ -440,6 +438,7 @@ ch.ivy.addon.portalkit.ui.jsf: backgroundColor: Background color cancel: Cancel case: Case + caseCategory: Case category caseInformation: Case Information caseName: Case name categories: Categories @@ -707,11 +706,6 @@ ch.ivy.addon.portalkit.ui.jsf: titlePage: Password Validation processChain: currentStepIsNotDefined: Current step ({0}) of process chain is not defined - statisticWidget: - chartDeletionConfirmation: Are you sure you want to delete this statistic chart? - contextMenuDrilldown: Drilldown - contextMenuToCaseList: Go to case list - contextMenuToTaskList: Go to task list taskStart: cannotDelegateTaskMessage: This task cannot be delegated to any other user or group. cannotStartMessages: @@ -782,14 +776,7 @@ ch.ivy.addon.portalkit.ui.jsf: ShareThisDashboard: Share this dashboard StandardWidgets: Standard Widgets StatisticWidget: - AvailableCharts: Available statistics charts - Charts: 'Chart(s): {0}' - ConfigurationDescription: You can configure your widget in this configuration area. Please define the chart which will be shown on your dashboard. EmptyChartDataMessage: We do not have enough data to create a nice chart! - FilterChartText: Filter a chart by name - PlaceholderChartOption: Select a chart - PleaseSelectChart: Please select a chart - PreviewText: Please select a chart to see the canvas data WelcomeWidgetIntroduction: This widget displays a welcome text and image on dashboard. WelcomeWidgetNotFoundMessage: We cannot find the image of widget, please reconfigure your image! WidgetFilterName: Widget filter name @@ -933,7 +920,6 @@ ch.ivy.addon.portalkit.ui.jsf: yourNotifications: Your Notifications yourProcessViewer: Your Process Viewer yourProcesses: Your Processes - yourStatistics: Your Statistics yourTasks: Your Tasks documentFiles: deleteDocumentNote: '{0} has deleted {1}' @@ -1135,154 +1121,6 @@ ch.ivy.addon.portalkit.ui.jsf: searchResultsFor: '{0} search results for "{1}"' sidestep: addAdhocTask: Add Ad-hoc Task - statistic: - chart: - ExpandOrCollapseColumn: Expand/Collapse Columns - addChart: Add new chart - addChartDialogHeader: Add statistic chart to dashboard - backToDashboard: Back to dashboard - barchart: - Percentage: Percentage - daysOfWeek: - friday: Friday - monday: Monday - saturday: Saturday - sunday: Sunday - thursday: Thursday - tuesday: Tuesday - wednesday: Wednesday - expired: Expired - in2Days: In 2 days - in3Days: In 3 days - monthsOfYear: - April: April - August: August - December: December - February: February - January: January - July: July - June: June - March: March - May: May - November: November - October: October - September: September - today: Today - tomorrow: Tomorrow - weeksOfMonth: - fifthWeek: Fifth week - firstWeek: First week - fourthWeek: Fourth week - secondWeek: Second week - sixthWeek: Sixth week - thirdWeek: Third week - caseCategory: Case category - chartCreationSuccessDetailMsg: Chart with name {0} was created successfully - chartCreationSuccessTitle: Chart was created successfully - elapsedTime: Elapsed Time - elapsedTimeChart: - compareButton: Compare - compareRole: 'Compare Role:' - elapsedTimeInHours: Elapsed time in hours - noEntriesFound: No entries found with given criteria - taskCategory: Task category - withRole: 'With Role:' - emptystate: - defaultEmptyMessages: No statistic chart to display. - exception: - idNotFound: 'Chart Id not found with id: {0}' - noPermission: You do not have the permission to send this request! - expiryPeriod: Expiry period - loadingCharts: Please wait, charts are loading... - moveLeft: Move left - moveRight: Move right - notAllowedToCreateChart: You are not allowed to create a chart before clicking Apply Filters button - other: Others - restoreDefaultChart: If you proceed, you will loose all charts created by yourself. The standard settings will be applied. - second: sec - showAllCharts: Show all charts - statisticCarousel: Statistics Carousel - statistics: Statistics - taskByExpiry: - hour: (Hour) - thisMonth: This Month - thisWeek: This Week - thisYear: This Year - taskByPriority: - addToDashboardLink: Add to dashboard - exception: Exception - high: High - low: Low - normal: Normal - taskExpiry: Task expiry - chartInfo: - chartDetailsHeader: Chart Details - chartName: Chart Name - chartType: Chart Type - name: Chart info - chartType: - caseByFinishedTask: Processed cases in time period - caseByFinishedTaskDescription: Cases where a task was finished in the selected time period - caseByFinishedTime: Done cases in time period - caseByFinishedTimeDescription: Cases which are done in the selected time period - caseByState: Case by state - casesByCategory: Cases by category - elapsedTimeByCaseCategory: Elapsed time of done cases - elapsedTimeByCaseCategoryDescription: Elapsed time of finished cases by category - taskByExpiry: Task by expiry - taskByPriority: Task by priority - defaultChart: - newChart: New chart - tasksByPriority: Tasks by Priority - filter: - affectedCharts: Affected charts - allSelected: All - caseCategoriesLabel: Case Categories - caseCategoryFilterDescription: You can find all available case categories here. Only selected Case Categories are considered in the affected charts. - caseStateFilterDescription: Only selected States are considered in the affected charts. - filter: Filters - noRoles: There are no roles - noSelectionCustomVarChar: No selection. - noneSelected: None - roleFilterDescription: You can find all available process roles here. Only selected roles are considered in the affected charts - rolesLabel: Roles - selectAll: Select All - taskPrioritiesLabel: Task Priorities - taskPriorityFilterDescription: Tasks can be selected depending on their priority. - timePeriod: Time period - timePeriodFilterDescription: Restricts the time period for cases and tasks. - workflowStatesLabel: Workflow States - taskAnalysis: - applyFilter: Apply filters - caseCategory: Case category - caseCreator: Case creator - caseDescription: Case description - caseFilter: Case filters - caseID: Case ID - caseName: Case name - caseOwner: Case owner - caseState: Case state - downloadZipFileExplanation: The number of tasks to export exceeds the limit of Excel rows. Therefore, data will be split to multiple Excel files, then compressed in a Zip file to download. - taskAnalysis: Task Analysis - taskCategory: Task category - taskCreationTime: Task created - taskDescription: Task description - taskExpiryTime: Task expiry - taskFilter: Task filters - taskFinishedTime: Task completed on - taskID: Task ID - taskPriority: Task priority - taskResponsible: Task responsible - taskState: Task state - taskWorker: Task editor - waitingDownloadMessage: We are creating the Export, this can take a few minutes - timePeriod: - custom: Custom - last6Month: Last 6 month - lastMonth: Last month - lastWeek: Last week - validationErrors: - nameIsExisted: A chart with this name already exists taskActivator: assign: Assign cannotAssignTask: This task cannot be assigned to any other user or group. @@ -1613,6 +1451,7 @@ Dialogs: CaseWidgetConfiguration: AddFilter: Add filter ClientStatisticWidget: + IdNotFound: 'Chart Id not found with id: {0}' NoPermissionChartMessage: You do not have the required permission to see this chart. DashboardImportDetails: FileInfomation: File Infomation diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index 1e93492e7ba..ff26912e4bf 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -261,7 +261,6 @@ ch.ivy.addon.portalkit.ui.jsf: hideChangePasswordButtonNote: Establezca esta variable a true para ocultar la opción "Cambiar contraseña" en el menú superior y la opción "Contraseña olvidada" en la página de inicio de sesión. Si se establece en false, estas opciones se mostrarán. hideLogoutButtonNote: Cambiar a "true" para ocultar la opción de logout. hideRelatedCaseInfoFromHistory: Si es verdadero, el historial de casos no muestra la información de los casos relacionados en la tabla de historial. - hideStatisticWidget: Cambiar a "true" para ocultar la estadística de la página principal y del menu lateral hideSystemNotesFromHistory: Si esto es cierto, no se muestran notas del sistema para los usuarios en las notas de tarea/tarea. hideSystemNotesFromHistoryAdministrator: Si esto es cierto, no se muestran notas de sistema para los administradores en las notas de tarea/tarea. hideSystemTasksFromHistory: Cambiar a "true" para ocultar notas técnicas del historial de tareas del caso para usuarios @@ -280,7 +279,6 @@ ch.ivy.addon.portalkit.ui.jsf: showProcessInformation: Cambiar a falso para desactivar el enlace "Más información" en la página de Procesos (modo cuadrícula) y Detalles del caso. showQuickGlobalSearch: Para activar/desactivar la visualización de la búsqueda global rápida. showTaskDurationTime: Activar o desactivar la visibilidad de la duración de la tarea en detalles de tarea. - statisticChartScalingInterval: Intervalo en segundos para realizar peticiones periódicas de escalado de gráficos estadísticos. Si el valor del intervalo es inferior a 10, se desactiva el escalado periódico de gráficos estadísticos. uploadDocumentWhiteListExtensionNote: 'Dejar libre, sie quiere permitir todos los anexos. Si quiere reducir los formatos permitidos, cree una lista separada por coma. Por ejemplo: pdf, txt, doc, docx.' key: Llave link: Enlazar @@ -442,6 +440,7 @@ ch.ivy.addon.portalkit.ui.jsf: backgroundColor: Color de fondo cancel: Cancelar case: Caso + caseCategory: Categoría de caso caseInformation: Informaciones del caso caseName: Nombre del caso categories: Categorias @@ -704,11 +703,6 @@ ch.ivy.addon.portalkit.ui.jsf: titlePage: Validación de contraseñas processChain: currentStepIsNotDefined: El paso ({0}) de la cadena de proceso no está definido - statisticWidget: - chartDeletionConfirmation: ¿Seguro que quiere eliminar esta tabla de estadísticas? - contextMenuDrilldown: Drilldown - contextMenuToCaseList: Ir a la lista de casos - contextMenuToTaskList: Ir a la lista de tareas taskStart: cannotDelegateTaskMessage: Esta tarea no se puede delegar a ningún otro usuario o grupo. cannotStartMessages: @@ -779,14 +773,7 @@ ch.ivy.addon.portalkit.ui.jsf: ShareThisDashboard: Comparte este panel StandardWidgets: Widgets estándar StatisticWidget: - AvailableCharts: Gráficos estadísticos disponibles - Charts: 'Gráfico(s): {0}' - ConfigurationDescription: Puede configurar su widget en esta área de configuración. Por favor, defina el gráfico que se mostrará en su panel de control. EmptyChartDataMessage: No tenemos suficientes datos para crear un buen gráfico. - FilterChartText: Filtrar un gráfico por nombre - PlaceholderChartOption: Seleccione un gráfico - PleaseSelectChart: Seleccione un gráfico - PreviewText: Seleccione un gráfico para ver los datos del lienzo WelcomeWidgetIntroduction: Este widget muestra un texto y una imagen de bienvenida en el panel de control. WelcomeWidgetNotFoundMessage: No podemos encontrar la imagen del widget, por favor reconfigure su imagen. WidgetFilterName: Nombre del filtro del widget @@ -930,7 +917,6 @@ ch.ivy.addon.portalkit.ui.jsf: yourNotifications: Sus notificaciones yourProcessViewer: Su visor de procesos yourProcesses: Sus procesos - yourStatistics: Sus estadísticas yourTasks: Sus tareas documentFiles: deleteDocumentNote: '{0} ha eliminado {1}' @@ -1132,157 +1118,6 @@ ch.ivy.addon.portalkit.ui.jsf: searchResultsFor: '{0} resultados de búsqueda para "{1}"' sidestep: addAdhocTask: Añadir tarea Ad-hoc - statistic: - chart: - ExpandOrCollapseColumn: Abrir/Cerrar columnas - addChart: Agregar nueva grafica - addChartDialogHeader: Agregar grafica estadística al tablero - backToDashboard: Regresar al tablero - barchart: - Percentage: Porcentaje - daysOfWeek: - friday: Viernes - monday: Lunes - saturday: Sábado - sunday: Domingo - thursday: Jueves - tuesday: Martes - wednesday: Miércoles - expired: Vencido - in2Days: En 2 días - in3Days: En 3 días - monthsOfYear: - April: Abril - August: Agosto - December: Diciembre - February: Febrero - January: Enero - July: Julio - June: Junio - March: Marzo - May: Mayo - November: Noviembre - October: Octubre - September: Septiembre - today: Hoy - tomorrow: Mañana - weeksOfMonth: - fifthWeek: Quinta semana - firstWeek: Primera semana - fourthWeek: Cuarta semana - secondWeek: Segunda semana - sixthWeek: Sexta semana - thirdWeek: Tercera semana - caseCategory: Categoría de caso - chartCreationSuccessDetailMsg: El gráfico con el nombre {0} se creó con éxito - chartCreationSuccessTitle: El gráfico fue creado con éxito - elapsedTime: Tiempo transcurrido - elapsedTimeChart: - compareButton: Comparar - compareRole: 'Comparar el rol:' - elapsedTimeInHours: Tiempo transcurrido en horas - noEntriesFound: No se encontraron entradas con los criterios dados - taskCategory: Categoría de tarea - withRole: 'Con Rol:' - emptystate: - defaultEmptyMessages: No hay tabla de estadísticas para mostrar. - exception: - idNotFound: 'Grafico ID no encontrado con id: {0}' - noPermission: ¡No tienes permiso para enviar esta solicitud! - expiryPeriod: Período de caducidad - loadingCharts: Por favor espere, los diagramas se están cargando - moveLeft: Muévete a la izquierda - moveRight: Muévete a la derecha - notAllowedToCreateChart: Ha cambiado los filtros aplicados. Por favor aplique los filtros. - other: Otros - restoreDefaultChart: Si continúa, todos los diagramas hechos por usted serán borrados. Los valores iniciales serán reestablecidos. - second: segundo - showAllCharts: Mostrar todas las estadísticas - statisticCarousel: Tiovivo de estadísticas - statistics: Estadísticas - taskByExpiry: - hour: (Hora) - thisMonth: Este mes - thisWeek: Esta semana - thisYear: Este año - taskByPriority: - addToDashboardLink: Agregar al tablero - exception: Excepción - high: Alto - low: Bajo - normal: Normal - taskExpiry: Vencimiento de tareas - chartInfo: - chartDetailsHeader: Detalles del gráfico - chartName: Nombre del gráfico - chartType: Tipo de gráfico - name: Información gráfica - chartType: - caseByFinishedTask: Caso por Tarea Terminada - caseByFinishedTaskDescription: Casos en los que al menos una tarea ha sido finalizada en el tiempo seleccionado - caseByFinishedTime: Caso por tiempo finalizado - caseByFinishedTimeDescription: Casos terminados en el periodo de tiempo seleccionado - caseByState: Caso por estado - casesByCategory: Casos por categoría - elapsedTimeByCaseCategory: Tiempo transcurrido por categoría de caso - elapsedTimeByCaseCategoryDescription: Tiempo de duración para casos terminados por categoría - taskByExpiry: Tarea por vencimiento - taskByPriority: Tarea por prioridad - defaultChart: - newChart: Diagrama nuevo - tasksByPriority: Tareas por prioridad - filter: - affectedCharts: Diagramas afectados - allSelected: Todos - caseCategoriesLabel: Categorías de casos - caseCategoryFilterDescription: Puede encontrar todos las categorias disponibles aqui. Solo las categorías seleccionadas serán consideradas en los diagramas creados - caseStateFilterDescription: Solo los estados seleccionados serán considerados en los diagramas - filter: Filtros - noRoles: No hay Roles - noSelectionCustomVarChar: Sin selección - noneSelected: Ninguno - roleFilterDescription: Puede encontra todos los roles disponibles aquí. Solo los roles seleccionados serán considerados en los diagramas - rolesLabel: Roles - selectAll: Seleccionar todo - taskPrioritiesLabel: Prioridades de tareas - taskPriorityFilterDescription: Puede filtrar tareas por prioridad. - timePeriod: Periodo de tiempo - timePeriodFilterDescription: Restringir el periodo de tiempo para casos y tareas - workflowStatesLabel: Estados de flujo de trabajo - taskAnalysis: - applyFilter: Aplicar filtros - caseCategory: Categoría de caso - caseCreator: Creador del caso - caseDescription: Descripción del caso - caseFilter: Filtros del caso - caseID: ID del caso - caseName: Nombre del caso - caseOwner: Propietario del caso - caseState: Estado del caso - downloadZipFileExplanation: |- - El número de tareas excede el Límite de Excel. Por ello se crearán varios archivos y se comprimirán en un archivo Zip. - - El número de tareas excede el Límite de Excel. Por ello se crearán varios archivos y se comprimirán en un archivo Zip. - taskAnalysis: Análisis de tareas - taskCategory: Categoría de la tarea - taskCreationTime: Tarea creada - taskDescription: Descripción de la tarea - taskExpiryTime: Fecha de expiración de la tarea - taskFilter: Filtros de tareas - taskFinishedTime: Tarea completada - taskID: ID de la tarea - taskPriority: Prioridad de tarea - taskResponsible: Resonsable de tarea - taskState: Estado de tarea - taskWorker: Editor de tareas - waitingDownloadMessage: 'Estamos creando su exporte, esto puede tardar unos minutos. ' - timePeriod: - custom: Personalizado - last6Month: Último 6 meses - lastMonth: El mes pasado - lastWeek: La semana pasada - validationErrors: - nameIsExisted: Ya existe una tabla con este nombre taskActivator: assign: Asignar cannotAssignTask: Esta tarea no puede ser asignada a otro usuario o grupo. @@ -1614,6 +1449,7 @@ Dialogs: CaseWidgetConfiguration: AddFilter: Añadir filtro ClientStatisticWidget: + IdNotFound: 'Chart Id not found with id: {0}' NoPermissionChartMessage: No tiene permiso para ver este gráfico. DashboardImportDetails: FileInfomation: Informacion del archivo diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index 9c4fd15c57c..4fe4a3ffa1b 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -258,7 +258,6 @@ ch.ivy.addon.portalkit.ui.jsf: hideChangePasswordButtonNote: Attribuez la valeur true à cette variable pour masquer l'option "Changer de mot de passe" dans le menu supérieur et l'option "Mot de passe oublié" sur la page de connexion. Si elle vaut false, ces options seront affichées. hideLogoutButtonNote: Si true, le bouton de déconnexion du menu supérieur sera masqué, sinon il sera affiché. hideRelatedCaseInfoFromHistory: Si la valeur est vraie, l'historique des cas n'affiche pas les informations relatives aux cas dans le tableau de l'historique. - hideStatisticWidget: Définissez la valeur sur "true" pour masquer le widget de statistiques de la page d'accueil et du menu de l'application. hideSystemNotesFromHistory: Si vrai, la remarque sur le cas/la tâche n'affiche aucune note de système pour les utilisateurs non administrateurs. hideSystemNotesFromHistoryAdministrator: Si vrai, la remarque sur le cas/la tâche n'affiche aucune note de système pour l'administrateur. hideSystemTasksFromHistory: Si vrai, la remarque sure le cas / de la tâche n'affiche aucune tâche du système pour les utilisateurs non administrateurs. @@ -277,7 +276,6 @@ ch.ivy.addon.portalkit.ui.jsf: showProcessInformation: Définissez la valeur false pour désactiver le lien vers l'option Afficher les informations du processus sur la page processus (mode grille) et détails du cas. showQuickGlobalSearch: Pour activer/désactiver l'affichage de la recherche globale rapide. showTaskDurationTime: Pour activer/désactiver l'affichage de la durée dans la page des détails de la tâche. - statisticChartScalingInterval: Intervalle en secondes pour effectuer les demandes de mise à l'échelle périodique des graphiques statistiques. Si la valeur de l'intervalle est inférieure à 10, la mise à l'échelle périodique des graphiques statistiques est désactivée. uploadDocumentWhiteListExtensionNote: 'Laissez la valeur vide si vous autorisez toutes les extensions. Si juste autoriser quelques extensions, listez les extensions ici, séparées par des virgules. Exemple: pdf, txt, doc, docx.' key: Clé link: Lien @@ -439,6 +437,7 @@ ch.ivy.addon.portalkit.ui.jsf: backgroundColor: Couleur de fond cancel: Annuler case: Dossier + caseCategory: Catégorie des cas caseInformation: Information sur le cas caseName: Nom de cas categories: Catégories @@ -701,11 +700,6 @@ ch.ivy.addon.portalkit.ui.jsf: titlePage: Validation du mot de passe processChain: currentStepIsNotDefined: L'étape actuelle ({0}) de la chaîne de processus n'est pas définie - statisticWidget: - chartDeletionConfirmation: Êtes-vous sûr de vouloir supprimer cette statistique? - contextMenuDrilldown: Drilldown - contextMenuToCaseList: Aller à la liste des affaires - contextMenuToTaskList: Aller à la liste des tâches taskStart: cannotDelegateTaskMessage: Cette tâche ne peut pas être déléguée ä un autre utilisateur ou une autre groupe. cannotStartMessages: @@ -776,14 +770,7 @@ ch.ivy.addon.portalkit.ui.jsf: ShareThisDashboard: Partager ce tableau de bord StandardWidgets: Widgets standard StatisticWidget: - AvailableCharts: Graphiques de statistiques disponibles - Charts: 'Graphique(s) : {0}' - ConfigurationDescription: Vous pouvez configurer votre widget dans cette zone de configuration. Veuillez définir le graphique qui sera affiché sur votre tableau de bord. EmptyChartDataMessage: Nous n'avons pas assez de données pour créer un beau graphique ! - FilterChartText: Filtrer un graphique par nom - PlaceholderChartOption: Sélectionnez un graphique - PleaseSelectChart: Veuillez sélectionner un graphique - PreviewText: Veuillez sélectionner un graphique pour voir les données du canevas WelcomeWidgetIntroduction: Ce widget affiche un texte et une image de bienvenue sur le tableau de bord. WelcomeWidgetNotFoundMessage: Nous ne pouvons pas trouver l'image du widget, veuillez reconfigurer votre image ! WidgetFilterName: Nom du filtre du widget @@ -927,7 +914,6 @@ ch.ivy.addon.portalkit.ui.jsf: yourNotifications: Vos notifications yourProcessViewer: Votre visualisateur de processus yourProcesses: Vos processus - yourStatistics: Vos statistiques yourTasks: Vos tâches documentFiles: deleteDocumentNote: '{0} a supprimé(e) {1}' @@ -1129,154 +1115,6 @@ ch.ivy.addon.portalkit.ui.jsf: searchResultsFor: '{0} résultats pour "{1}"' sidestep: addAdhocTask: Ajouter une Ad-hoc tâche - statistic: - chart: - ExpandOrCollapseColumn: Agrandir/réduire les colonnes - addChart: Ajouter un nouveau diagramme - addChartDialogHeader: Ajouter un diagramme au tableau de bord - backToDashboard: Retour au tableau de bord - barchart: - Percentage: Pourcentage - daysOfWeek: - friday: Vendredi - monday: Lundi - saturday: samedi - sunday: dimanche - thursday: Jeudi - tuesday: Mardi - wednesday: Mercredi - expired: Expiré - in2Days: Dans 2 jours - in3Days: Dans 3 jours - monthsOfYear: - April: avril - August: août - December: décembre - February: février - January: janvier - July: juillet - June: juin - March: Mars - May: Mai - November: novembre - October: octobre - September: septembre - today: Aujourd'hui - tomorrow: Demain - weeksOfMonth: - fifthWeek: Cinquième semaine - firstWeek: Première semaine - fourthWeek: Quatrième semaine - secondWeek: Deuxième semaine - sixthWeek: Sixième semaine - thirdWeek: Troisième semaine - caseCategory: Catégorie des cas - chartCreationSuccessDetailMsg: Diagramme avec le nom {0} a été créé avec succès - chartCreationSuccessTitle: Diagramme a été créé avec succès - elapsedTime: Temps écoulé - elapsedTimeChart: - compareButton: Comparer - compareRole: Comparer les rôles - elapsedTimeInHours: Temps écoulé en heures - noEntriesFound: Aucun critère correspondant trouvé - taskCategory: Catégorie de tâche - withRole: 'Avec rôle:' - emptystate: - defaultEmptyMessages: Pas de diagrammes à afficher - exception: - idNotFound: "Identifiant du diagramme non trouvé avec l'identifiant : {0}" - noPermission: Vous n'avez pas la permission d'envoyer cette demande ! - expiryPeriod: Période d'expiration - loadingCharts: Veuillez patienter, les graphiques sont en cours de chargement … - moveLeft: Déplacer vers la gauche - moveRight: Déplacer vers la droite - notAllowedToCreateChart: Vous n'êtes pas autorisé à créer un diagramme avant de cliquer sur le bouton Appliquer les filtres - other: Outres - restoreDefaultChart: Si vous continuez, vous perdrez tous les graphiques créés par vous-même. Les paramètres standard seront appliqués. - second: sec - showAllCharts: Voir tous les diagrammes - statisticCarousel: Carrousel de statistiques - statistics: Statistiques - taskByExpiry: - hour: (Heure) - thisMonth: Ce mois - thisWeek: Cette semaine - thisYear: Cette année - taskByPriority: - addToDashboardLink: Ajouter au tableau de bord - exception: Exception - high: Haute - low: Basse - normal: Normale - taskExpiry: Expiration de la tâche - chartInfo: - chartDetailsHeader: Détails du diagramme - chartName: Nom du diagramme - chartType: Type du diagramme - name: Infos graphiques - chartType: - caseByFinishedTask: Cas traités en période de temps - caseByFinishedTaskDescription: Cas où une tâche s'est terminée dans la période sélectionnée - caseByFinishedTime: Cas traités dans le temps - caseByFinishedTimeDescription: Cas qui se font dans la période sélectionnée - caseByState: Cas par état - casesByCategory: Affaires par catégorie - elapsedTimeByCaseCategory: Temps écoulé des cas accomplis - elapsedTimeByCaseCategoryDescription: Temps écoulé des cas finis par catégorie - taskByExpiry: Tâche par échéance - taskByPriority: Tâche par priorité - defaultChart: - newChart: Nouveau diagramme - tasksByPriority: Tãches par priorité - filter: - affectedCharts: Diagrammes concernés - allSelected: Tous - caseCategoriesLabel: Catégories de cas - caseCategoryFilterDescription: Vous pouvez trouver toutes les catégories de cas disponibles ici. Seules les catégories de cas sélectionnées sont prises en compte dans les diagrammes concernés. - caseStateFilterDescription: Seuls les états sélectionnés sont pris en compte dans les diagrammes concernés. - filter: Filtres - noRoles: Aucun rôle disponible - noSelectionCustomVarChar: Pas de choix. - noneSelected: Aucun - roleFilterDescription: Vous pouvez trouver tous les rôles de processus disponibles ici. Seuls les rôles sélectionnés sont pris en compte dans le diagramme concerné - rolesLabel: Rôle - selectAll: Tout sélectionner - taskPrioritiesLabel: Priorités de tâches - taskPriorityFilterDescription: Les tâches peuvent être sélectionnées en fonction de leur priorité. - timePeriod: Période de temps - timePeriodFilterDescription: Limite la période de temps pour les cas et les tâches. - workflowStatesLabel: État de flux de travail - taskAnalysis: - applyFilter: Appliquer les filtres - caseCategory: Catégorie de cas - caseCreator: Créateur de cas - caseDescription: Description du cas - caseFilter: Filtres de cas - caseID: ID de cas - caseName: Nom de cas - caseOwner: Propriétaire du cas - caseState: État du cas - downloadZipFileExplanation: Le nombre de tâches à exporter dépasse la limite des lignes Excel. Par conséquent, les données seront divisées en plusieurs fichiers Excel, puis compressées dans un fichier ZIP à télécharger. - taskAnalysis: Analyse des tâches - taskCategory: Catégorie de tâche - taskCreationTime: Tâche créée - taskDescription: Description de la tâche - taskExpiryTime: Expiration de la tâche - taskFilter: Filtres de la tâche - taskFinishedTime: Tâche terminée le - taskID: Id de tâche - taskPriority: Priorité de la tâche - taskResponsible: Tâche responsable - taskState: État de la tâche - taskWorker: Éditeur de tâche - waitingDownloadMessage: Nous créons l'export, cela peut prendre quelques minutes - timePeriod: - custom: Coutume - last6Month: Six derniers mois - lastMonth: Dernier Mois - lastWeek: Dernière semaine - validationErrors: - nameIsExisted: Un diagramme avec ce nom existe déjà taskActivator: assign: Assigner cannotAssignTask: Cette tâche ne peut être assignée à aucun autre utilisateur ou groupe. @@ -1608,6 +1446,7 @@ Dialogs: CaseWidgetConfiguration: AddFilter: Ajouter un filtre ClientStatisticWidget: + IdNotFound: 'Chart Id not found with id: {0}' NoPermissionChartMessage: Vous n'avez pas l'autorisation requise pour consulter ce graphique. DashboardImportDetails: FileInfomation: Informations sur le fichier diff --git a/AxonIvyPortal/portal/config/variables.yaml b/AxonIvyPortal/portal/config/variables.yaml index 2413a3697dd..8a4d45cbd59 100644 --- a/AxonIvyPortal/portal/config/variables.yaml +++ b/AxonIvyPortal/portal/config/variables.yaml @@ -41,11 +41,6 @@ Variables: # If set to true, icon info is shown beside the role name. DisplayUsersOfRole: false - # The standard sets of filters that Portal used to define the public filters set in the task analysis page. - # It will be shown as the public filters in the task analysis page. - # [file: json] - TaskAnalysisFilters: - # You can define your custom menu item via this JSON file. # It will be included to the left menu. # [file: json] @@ -84,9 +79,6 @@ Variables: # This setting will be taken over for all other dashboard. # [file: json] Dashboard: - # Set to true to hide Statistic widget from homepage and application menu. - HideStatisticWidget: false - # You can customize the name and icon of the main menu entry for Portal dashboards via this JSON file. # [file: json] MainMenuEntry: @@ -247,10 +239,6 @@ Variables: # For switch on/off the display of user/role avatars. ShowAvatar: true - - # Interval in seconds to do periodic statistic chart scaling requests. - # If the interval value is less than 10, periodic statistic chart scaling is disabled. - StatisticChartScalingInterval: 0 # The set number controls the amount of direct children roles that is shown in Role Management tab. # [enum: 10, 50, 100] diff --git a/AxonIvyPortal/portal/config/variables/Portal/StatisticCharts.json b/AxonIvyPortal/portal/config/variables/Portal/StatisticCharts.json deleted file mode 100644 index cdf9515e0ec..00000000000 --- a/AxonIvyPortal/portal/config/variables/Portal/StatisticCharts.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "id": "0", - "names": [ - { - "locale": "de", - "value": "Aufgaben nach Priorität" - }, - { - "locale": "en", - "value": "Tasks by Priority" - }, - { - "locale": "fr", - "value": "Tãches par priorité" - }, - { - "locale": "es", - "value": "Tareas por prioridad" - } - ], - "type": "TASK_BY_PRIORITY", - "filter": {} - } -] \ No newline at end of file diff --git a/AxonIvyPortal/portal/config/variables/Portal/TaskAnalysisFilters.json b/AxonIvyPortal/portal/config/variables/Portal/TaskAnalysisFilters.json deleted file mode 100644 index 9e26dfeeb6e..00000000000 --- a/AxonIvyPortal/portal/config/variables/Portal/TaskAnalysisFilters.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json b/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json index cb92d8cb9bf..788d1b0623c 100644 --- a/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json +++ b/AxonIvyPortal/portal/processes/Start Processes/PortalStart.p.json @@ -81,85 +81,6 @@ "connect" : [ { "id" : "f196", "to" : "f143" } ] - }, { - "id" : "S32", - "type" : "EmbeddedProcess", - "name" : "Authorize", - "elements" : [ { - "id" : "S32-f167", - "type" : "Script", - "name" : "Init isAuthorized", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.util.PermissionUtils;", - "import ch.ivy.addon.portalkit.enums.PortalPermission;", - "", - "in.isAuthorized = PermissionUtils.hasPermission(PortalPermission.STATISTIC_ANALYZE_TASK.getPermission());" - ] - } - }, - "visual" : { - "at" : { "x" : 176, "y" : 160 } - }, - "connect" : [ - { "id" : "S32-f170", "to" : "S32-f165" } - ] - }, { - "id" : "S32-f79", - "type" : "TaskEnd", - "visual" : { - "at" : { "x" : 296, "y" : 240 } - } - }, { - "id" : "S32-f165", - "type" : "Alternative", - "name" : "Authorized?", - "config" : { - "conditions" : { - "S32-f1" : "in.isAuthorized" - } - }, - "visual" : { - "at" : { "x" : 296, "y" : 160 }, - "labelOffset" : { "y" : -16 } - }, - "connect" : [ - { "id" : "S32-f1", "to" : "S32-g1", "label" : { - "name" : "Yes" - } }, - { "id" : "S32-f161", "to" : "S32-f79", "label" : { - "name" : "No", - "segment" : 0.55, - "offset" : { "x" : 11, "y" : -13 } - } } - ] - }, { - "id" : "S32-g0", - "type" : "EmbeddedStart", - "name" : "in 1", - "visual" : { - "at" : { "x" : 64, "y" : 160 } - }, - "parentConnector" : "f171", - "connect" : [ - { "id" : "S32-f0", "to" : "S32-f167" } - ] - }, { - "id" : "S32-g1", - "type" : "EmbeddedEnd", - "name" : "out 1", - "visual" : { - "at" : { "x" : 448, "y" : 160 } - }, - "parentConnector" : "f194" - } ], - "visual" : { - "at" : { "x" : 200, "y" : 3160 } - }, - "connect" : [ - { "id" : "f194", "to" : "f166" } - ] }, { "id" : "S22", "type" : "EmbeddedProcess", @@ -358,7 +279,7 @@ "parentConnector" : "f192" } ], "visual" : { - "at" : { "x" : 200, "y" : 3480 } + "at" : { "x" : 200, "y" : 3400 } }, "connect" : [ { "id" : "f192", "to" : "f137" } @@ -438,7 +359,7 @@ ] } ], "visual" : { - "at" : { "x" : 200, "y" : 3400 } + "at" : { "x" : 200, "y" : 3320 } }, "connect" : [ { "id" : "f190", "to" : "f237" } @@ -518,7 +439,7 @@ ] } ], "visual" : { - "at" : { "x" : 200, "y" : 3320 } + "at" : { "x" : 200, "y" : 3240 } }, "connect" : [ { "id" : "f187", "to" : "f232" } @@ -965,64 +886,6 @@ "connect" : [ { "id" : "f210", "to" : "f65" } ] - }, { - "id" : "S00", - "type" : "EmbeddedProcess", - "name" : "Authorize", - "elements" : [ { - "id" : "S00-f281", - "type" : "TaskEnd", - "visual" : { - "at" : { "x" : 152, "y" : 232 } - } - }, { - "id" : "S00-f279", - "type" : "Alternative", - "name" : "Authorized?", - "config" : { - "conditions" : { - "S00-f1" : "ch.ivy.addon.portalkit.util.PermissionUtils.checkAccessFullStatisticsListPermission()" - } - }, - "visual" : { - "at" : { "x" : 152, "y" : 144 }, - "labelOffset" : { "y" : -16 } - }, - "connect" : [ - { "id" : "S00-f1", "to" : "S00-g1", "label" : { - "name" : "Yes" - } }, - { "id" : "S00-f282", "to" : "S00-f281", "label" : { - "name" : "No", - "segment" : 0.56 - } } - ] - }, { - "id" : "S00-g0", - "type" : "EmbeddedStart", - "name" : "in 1", - "visual" : { - "at" : { "x" : 64, "y" : 144 } - }, - "parentConnector" : "f26", - "connect" : [ - { "id" : "S00-f0", "to" : "S00-f279" } - ] - }, { - "id" : "S00-g1", - "type" : "EmbeddedEnd", - "name" : "out 1", - "visual" : { - "at" : { "x" : 320, "y" : 144 } - }, - "parentConnector" : "f27" - } ], - "visual" : { - "at" : { "x" : 200, "y" : 960 } - }, - "connect" : [ - { "id" : "f27", "to" : "f32" } - ] }, { "id" : "S90", "type" : "EmbeddedProcess", @@ -1076,7 +939,7 @@ "parentConnector" : "f209" } ], "visual" : { - "at" : { "x" : 344, "y" : 880 } + "at" : { "x" : 344, "y" : 960 } }, "connect" : [ { "id" : "f209", "to" : "f274" } @@ -1159,7 +1022,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 400 }, + "at" : { "x" : 96, "y" : 480 }, "labelOffset" : { "x" : -23, "y" : 41 } }, "connect" : [ @@ -1223,7 +1086,7 @@ "sudo" : true }, "visual" : { - "at" : { "x" : 488, "y" : 400 } + "at" : { "x" : 488, "y" : 480 } }, "connect" : [ { "id" : "f2", "to" : "f1" } @@ -1253,7 +1116,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 240 }, + "at" : { "x" : 96, "y" : 320 }, "labelOffset" : { "x" : -55, "y" : 41 } }, "connect" : [ @@ -1263,7 +1126,7 @@ "id" : "f57", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 592, "y" : 640 } + "at" : { "x" : 592, "y" : 720 } } }, { "id" : "f58", @@ -1276,7 +1139,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 640 }, + "at" : { "x" : 96, "y" : 720 }, "labelOffset" : { "x" : -15, "y" : 41 } }, "connect" : [ @@ -1301,7 +1164,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 880 }, + "at" : { "x" : 96, "y" : 960 }, "labelOffset" : { "x" : -23, "y" : 33 } }, "connect" : [ @@ -1318,7 +1181,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 800 }, + "at" : { "x" : 96, "y" : 880 }, "labelOffset" : { "x" : -31, "y" : 41 } }, "connect" : [ @@ -1328,13 +1191,13 @@ "id" : "f105", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 736, "y" : 880 } + "at" : { "x" : 736, "y" : 960 } } }, { "id" : "f64", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 592, "y" : 800 } + "at" : { "x" : 592, "y" : 880 } } }, { "id" : "f1", @@ -1346,18 +1209,18 @@ } }, "visual" : { - "at" : { "x" : 592, "y" : 400 } + "at" : { "x" : 592, "y" : 480 } }, "connect" : [ { "id" : "f30", "to" : "f22" }, { "id" : "f36", "to" : "S70" }, - { "id" : "f19", "to" : "f5", "via" : [ { "x" : 592, "y" : 448 }, { "x" : 1008, "y" : 448 } ] } + { "id" : "f19", "to" : "f5", "via" : [ { "x" : 592, "y" : 528 }, { "x" : 1008, "y" : 528 } ] } ] }, { "id" : "f0", "type" : "Alternative", "visual" : { - "at" : { "x" : 1008, "y" : 240 } + "at" : { "x" : 1008, "y" : 320 } }, "connect" : [ { "id" : "f92", "to" : "S60" } @@ -1371,7 +1234,7 @@ } }, "visual" : { - "at" : { "x" : 1008, "y" : 400 } + "at" : { "x" : 1008, "y" : 480 } }, "connect" : [ { "id" : "f20", "to" : "f0" }, @@ -1397,48 +1260,12 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 480 }, + "at" : { "x" : 96, "y" : 560 }, "labelOffset" : { "x" : -39, "y" : 41 } }, "connect" : [ - { "id" : "f13", "to" : "f4", "via" : [ { "x" : 344, "y" : 480 } ] } + { "id" : "f13", "to" : "f4", "via" : [ { "x" : 344, "y" : 560 } ] } ] - }, { - "id" : "f32", - "type" : "DialogCall", - "name" : "Statistic", - "config" : { - "dialog" : "ch.ivy.addon.portal.generic.admin.PortalDashBoard:start()" - }, - "visual" : { - "at" : { "x" : 344, "y" : 960 } - }, - "connect" : [ - { "id" : "f35", "to" : "f34" } - ] - }, { - "id" : "f70", - "type" : "RequestStart", - "name" : "StatisticPage.ivp", - "config" : { - "signature" : "StatisticPage", - "request" : { - "isVisibleOnStartList" : false - } - }, - "visual" : { - "at" : { "x" : 96, "y" : 960 }, - "labelOffset" : { "x" : -15, "y" : 33 } - }, - "connect" : [ - { "id" : "f26", "to" : "S00" } - ] - }, { - "id" : "f34", - "type" : "TaskEnd", - "visual" : { - "at" : { "x" : 448, "y" : 960 } - } }, { "id" : "f39", "type" : "RequestStart", @@ -1888,7 +1715,7 @@ "homepage if you have" ], "visual" : { - "at" : { "x" : 1240, "y" : 240 }, + "at" : { "x" : 1240, "y" : 320 }, "size" : { "width" : 144, "height" : 44 } } }, { @@ -1910,7 +1737,7 @@ "id" : "f22", "type" : "Alternative", "visual" : { - "at" : { "x" : 592, "y" : 240 } + "at" : { "x" : 592, "y" : 320 } }, "connect" : [ { "id" : "f141", "to" : "f0" } @@ -1924,7 +1751,7 @@ } }, "visual" : { - "at" : { "x" : 344, "y" : 400 } + "at" : { "x" : 344, "y" : 480 } }, "connect" : [ { "id" : "f29", "to" : "f31" }, @@ -1943,7 +1770,7 @@ } }, "visual" : { - "at" : { "x" : 344, "y" : 240 } + "at" : { "x" : 344, "y" : 320 } }, "connect" : [ { "id" : "f49", "to" : "f31" }, @@ -1968,7 +1795,7 @@ } }, "visual" : { - "at" : { "x" : 344, "y" : 320 } + "at" : { "x" : 344, "y" : 400 } } }, { "id" : "f12", @@ -2324,11 +2151,11 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 160 }, + "at" : { "x" : 96, "y" : 240 }, "labelOffset" : { "x" : -39, "y" : 33 } }, "connect" : [ - { "id" : "f47", "to" : "f21", "via" : [ { "x" : 344, "y" : 160 } ] } + { "id" : "f47", "to" : "f21", "via" : [ { "x" : 344, "y" : 240 } ] } ] }, { "id" : "f122", @@ -2440,7 +2267,7 @@ "sudo" : true }, "visual" : { - "at" : { "x" : 488, "y" : 241 }, + "at" : { "x" : 488, "y" : 321 }, "size" : { "height" : 62 } }, "connect" : [ @@ -2541,7 +2368,7 @@ } } ], "visual" : { - "at" : { "x" : 1096, "y" : 240 } + "at" : { "x" : 1096, "y" : 320 } } }, { "id" : "S10", @@ -2765,7 +2592,7 @@ } } ], "visual" : { - "at" : { "x" : 1165, "y" : 399 }, + "at" : { "x" : 1165, "y" : 479 }, "size" : { "width" : 251, "height" : 65 } } }, { @@ -2864,7 +2691,7 @@ "parentConnector" : "f25" } ], "visual" : { - "at" : { "x" : 488, "y" : 640 } + "at" : { "x" : 488, "y" : 720 } }, "connect" : [ { "id" : "f25", "to" : "f57" } @@ -2963,7 +2790,7 @@ "parentConnector" : "f17" } ], "visual" : { - "at" : { "x" : 488, "y" : 800 } + "at" : { "x" : 488, "y" : 880 } }, "connect" : [ { "id" : "f17", "to" : "f64" } @@ -3063,7 +2890,7 @@ "parentConnector" : "f40" } ], "visual" : { - "at" : { "x" : 848, "y" : 400 }, + "at" : { "x" : 848, "y" : 480 }, "size" : { "width" : 248, "height" : 64 } }, "connect" : [ @@ -3316,42 +3143,6 @@ "connect" : [ { "id" : "f160", "to" : "f158" } ] - }, { - "id" : "f163", - "type" : "RequestStart", - "name" : "showTaskAnalysis.ivp", - "config" : { - "signature" : "showTaskAnalysis", - "request" : { - "isVisibleOnStartList" : false - } - }, - "visual" : { - "at" : { "x" : 96, "y" : 3160 }, - "labelOffset" : { "x" : -31, "y" : 41 } - }, - "connect" : [ - { "id" : "f171", "to" : "S32" } - ] - }, { - "id" : "f164", - "type" : "TaskEnd", - "visual" : { - "at" : { "x" : 448, "y" : 3160 } - } - }, { - "id" : "f166", - "type" : "DialogCall", - "name" : "Task Analysis dialog", - "config" : { - "dialog" : "ch.ivy.addon.portal.generic.TaskAnalysis:start()" - }, - "visual" : { - "at" : { "x" : 344, "y" : 3160 } - }, - "connect" : [ - { "id" : "f169", "to" : "f164" } - ] }, { "id" : "f188", "type" : "RequestStart", @@ -3413,7 +3204,7 @@ "signature" : "DefaultApplicationHomePageInTeams" }, "visual" : { - "at" : { "x" : 96, "y" : 320 }, + "at" : { "x" : 96, "y" : 400 }, "labelOffset" : { "x" : -79, "y" : 41 } }, "connect" : [ @@ -3435,7 +3226,7 @@ } }, "visual" : { - "at" : { "x" : 200, "y" : 320 } + "at" : { "x" : 200, "y" : 400 } }, "connect" : [ { "id" : "f205", "to" : "f203" } @@ -3444,7 +3235,7 @@ "id" : "f203", "type" : "Alternative", "visual" : { - "at" : { "x" : 200, "y" : 240 } + "at" : { "x" : 200, "y" : 320 } }, "connect" : [ { "id" : "f43", "to" : "f21" } @@ -3457,7 +3248,7 @@ "signature" : "DefaultCaseListPageInTeams" }, "visual" : { - "at" : { "x" : 96, "y" : 560 }, + "at" : { "x" : 96, "y" : 640 }, "labelOffset" : { "x" : -55, "y" : 41 } }, "connect" : [ @@ -3479,10 +3270,10 @@ } }, "visual" : { - "at" : { "x" : 200, "y" : 560 } + "at" : { "x" : 200, "y" : 640 } }, "connect" : [ - { "id" : "f61", "to" : "S71", "via" : [ { "x" : 344, "y" : 560 } ] } + { "id" : "f61", "to" : "S71", "via" : [ { "x" : 344, "y" : 640 } ] } ] }, { "id" : "f214", @@ -3500,10 +3291,10 @@ } }, "visual" : { - "at" : { "x" : 200, "y" : 720 } + "at" : { "x" : 200, "y" : 800 } }, "connect" : [ - { "id" : "f24", "to" : "S80", "via" : [ { "x" : 344, "y" : 720 } ] } + { "id" : "f24", "to" : "S80", "via" : [ { "x" : 344, "y" : 800 } ] } ] }, { "id" : "f215", @@ -3513,7 +3304,7 @@ "signature" : "DefaultTaskListPageInTeams" }, "visual" : { - "at" : { "x" : 96, "y" : 720 }, + "at" : { "x" : 96, "y" : 800 }, "labelOffset" : { "x" : -55, "y" : 41 } }, "connect" : [ @@ -3558,7 +3349,7 @@ "id" : "f224", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 304, "y" : 3240 } + "at" : { "x" : 304, "y" : 3160 } } }, { "id" : "f225", @@ -3575,7 +3366,7 @@ } }, "visual" : { - "at" : { "x" : 200, "y" : 3240 }, + "at" : { "x" : 200, "y" : 3160 }, "size" : { "width" : 116 } }, "connect" : [ @@ -3604,7 +3395,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3240 }, + "at" : { "x" : 96, "y" : 3160 }, "labelOffset" : { "x" : -31, "y" : 33 } }, "connect" : [ @@ -3629,7 +3420,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3320 }, + "at" : { "x" : 96, "y" : 3240 }, "labelOffset" : { "x" : -31, "y" : 33 } }, "connect" : [ @@ -3639,7 +3430,7 @@ "id" : "f230", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 448, "y" : 3320 } + "at" : { "x" : 448, "y" : 3240 } } }, { "id" : "f232", @@ -3654,7 +3445,7 @@ } }, "visual" : { - "at" : { "x" : 344, "y" : 3320 } + "at" : { "x" : 344, "y" : 3240 } }, "connect" : [ { "id" : "f231", "to" : "f230" } @@ -3678,7 +3469,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3400 }, + "at" : { "x" : 96, "y" : 3320 }, "labelOffset" : { "x" : -31, "y" : 33 } }, "connect" : [ @@ -3688,7 +3479,7 @@ "id" : "f235", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 448, "y" : 3400 } + "at" : { "x" : 448, "y" : 3320 } } }, { "id" : "f237", @@ -3703,7 +3494,7 @@ } }, "visual" : { - "at" : { "x" : 344, "y" : 3400 } + "at" : { "x" : 344, "y" : 3320 } }, "connect" : [ { "id" : "f236", "to" : "f235" } @@ -3719,7 +3510,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3480 }, + "at" : { "x" : 96, "y" : 3400 }, "labelOffset" : { "x" : -31, "y" : 33 } }, "connect" : [ @@ -3729,7 +3520,7 @@ "id" : "f41", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 448, "y" : 3480 } + "at" : { "x" : 448, "y" : 3400 } } }, { "id" : "f137", @@ -3739,7 +3530,7 @@ "dialog" : "ch.ivy.addon.portal.setting.PortalManagement:start()" }, "visual" : { - "at" : { "x" : 344, "y" : 3480 } + "at" : { "x" : 344, "y" : 3400 } }, "connect" : [ { "id" : "f129", "to" : "f41" } @@ -3821,7 +3612,7 @@ "sudo" : true }, "visual" : { - "at" : { "x" : 200, "y" : 880 } + "at" : { "x" : 200, "y" : 960 } }, "connect" : [ { "id" : "f15", "to" : "S90" } @@ -3840,7 +3631,7 @@ } }, "visual" : { - "at" : { "x" : 560, "y" : 880 }, + "at" : { "x" : 560, "y" : 960 }, "size" : { "width" : 256 } }, "connect" : [ @@ -3910,7 +3701,7 @@ "parentConnector" : "f176" } ], "visual" : { - "at" : { "x" : 344, "y" : 640 } + "at" : { "x" : 344, "y" : 720 } }, "connect" : [ { "id" : "f176", "to" : "S30" } @@ -3978,7 +3769,7 @@ "parentConnector" : "f179" } ], "visual" : { - "at" : { "x" : 344, "y" : 800 } + "at" : { "x" : 344, "y" : 880 } }, "connect" : [ { "id" : "f179", "to" : "S20" } @@ -4115,7 +3906,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3568 }, + "at" : { "x" : 96, "y" : 3488 }, "labelOffset" : { "x" : -31, "y" : 41 } }, "connect" : [ @@ -4125,7 +3916,7 @@ "id" : "f251", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 952, "y" : 3568 } + "at" : { "x" : 952, "y" : 3488 } } }, { "id" : "f252", @@ -4146,7 +3937,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3752 }, + "at" : { "x" : 96, "y" : 3672 }, "labelOffset" : { "x" : -31, "y" : 41 } }, "connect" : [ @@ -4156,7 +3947,7 @@ "id" : "f253", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 920, "y" : 3752 } + "at" : { "x" : 920, "y" : 3672 } } }, { "id" : "S63", @@ -4211,7 +4002,7 @@ "parentConnector" : "f260" } ], "visual" : { - "at" : { "x" : 504, "y" : 3752 } + "at" : { "x" : 504, "y" : 3672 } }, "connect" : [ { "id" : "f260", "to" : "f255" } @@ -4231,7 +4022,7 @@ } }, "visual" : { - "at" : { "x" : 332, "y" : 3752 }, + "at" : { "x" : 332, "y" : 3672 }, "size" : { "width" : 136 } }, "connect" : [ @@ -4251,7 +4042,7 @@ } }, "visual" : { - "at" : { "x" : 720, "y" : 3752 }, + "at" : { "x" : 720, "y" : 3672 }, "size" : { "width" : 256 } }, "connect" : [ @@ -4310,7 +4101,7 @@ "parentConnector" : "f261" } ], "visual" : { - "at" : { "x" : 504, "y" : 3568 } + "at" : { "x" : 504, "y" : 3488 } }, "connect" : [ { "id" : "f261", "to" : "f256" } @@ -4329,7 +4120,7 @@ } }, "visual" : { - "at" : { "x" : 720, "y" : 3568 }, + "at" : { "x" : 720, "y" : 3488 }, "size" : { "width" : 260, "height" : 58 } }, "connect" : [ @@ -4349,7 +4140,7 @@ } }, "visual" : { - "at" : { "x" : 332, "y" : 3568 }, + "at" : { "x" : 332, "y" : 3488 }, "size" : { "width" : 136 } }, "connect" : [ @@ -4376,7 +4167,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 72 } + "at" : { "x" : 96, "y" : 152 } }, "connect" : [ { "id" : "f212", "to" : "f170" } @@ -4403,10 +4194,10 @@ } }, "visual" : { - "at" : { "x" : 216, "y" : 72 } + "at" : { "x" : 216, "y" : 152 } }, "connect" : [ - { "id" : "f218", "to" : "f21", "via" : [ { "x" : 344, "y" : 72 } ] } + { "id" : "f218", "to" : "f21", "via" : [ { "x" : 344, "y" : 152 } ] } ] }, { "id" : "f219", @@ -4417,7 +4208,7 @@ } }, "visual" : { - "at" : { "x" : 192, "y" : 3568 } + "at" : { "x" : 192, "y" : 3488 } }, "connect" : [ { "id" : "f233", "to" : "f223" }, @@ -4439,7 +4230,7 @@ } }, "visual" : { - "at" : { "x" : 192, "y" : 3656 } + "at" : { "x" : 192, "y" : 3576 } } }, { "id" : "f239", @@ -4451,7 +4242,7 @@ } }, "visual" : { - "at" : { "x" : 192, "y" : 3752 } + "at" : { "x" : 192, "y" : 3672 } }, "connect" : [ { "id" : "f244", "to" : "f254" }, @@ -4528,7 +4319,7 @@ ] } ], "visual" : { - "at" : { "x" : 200, "y" : 3840 } + "at" : { "x" : 200, "y" : 3760 } }, "connect" : [ { "id" : "f266", "to" : "f247" } @@ -4537,7 +4328,7 @@ "id" : "f246", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 592, "y" : 3840 } + "at" : { "x" : 592, "y" : 3760 } } }, { "id" : "f247", @@ -4552,7 +4343,7 @@ } }, "visual" : { - "at" : { "x" : 416, "y" : 3840 }, + "at" : { "x" : 416, "y" : 3760 }, "size" : { "width" : 256 } }, "connect" : [ @@ -4577,7 +4368,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3840 }, + "at" : { "x" : 96, "y" : 3760 }, "labelOffset" : { "x" : -55, "y" : 33 } }, "connect" : [ @@ -4594,7 +4385,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 3952 } + "at" : { "x" : 96, "y" : 3872 } }, "connect" : [ { "id" : "f267", "to" : "f16" } @@ -4607,7 +4398,7 @@ "dialog" : "com.axonivy.portal.component.NotificationFullPage:start()" }, "visual" : { - "at" : { "x" : 240, "y" : 3952 } + "at" : { "x" : 240, "y" : 3872 } }, "connect" : [ { "id" : "f268", "to" : "f50" } @@ -4616,7 +4407,7 @@ "id" : "f50", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 376, "y" : 3952 } + "at" : { "x" : 376, "y" : 3872 } } }, { "id" : "f269", @@ -4637,7 +4428,7 @@ } }, "visual" : { - "at" : { "x" : 96, "y" : 4056 } + "at" : { "x" : 96, "y" : 3976 } }, "connect" : [ { "id" : "f273", "to" : "f281" } @@ -4662,7 +4453,7 @@ } }, "visual" : { - "at" : { "x" : 488, "y" : 4056 } + "at" : { "x" : 488, "y" : 3976 } }, "connect" : [ { "id" : "f277", "to" : "f278" } @@ -4671,7 +4462,7 @@ "id" : "f270", "type" : "TaskEnd", "visual" : { - "at" : { "x" : 936, "y" : 4056 } + "at" : { "x" : 936, "y" : 3976 } } }, { "id" : "f278", @@ -4687,7 +4478,7 @@ } }, "visual" : { - "at" : { "x" : 703, "y" : 4055 }, + "at" : { "x" : 703, "y" : 3975 }, "size" : { "width" : 255, "height" : 61 } }, "connect" : [ @@ -4796,7 +4587,7 @@ } }, "visual" : { - "at" : { "x" : 200, "y" : 4056 } + "at" : { "x" : 200, "y" : 3976 } }, "connect" : [ { "id" : "f293", "to" : "S02" } @@ -4869,7 +4660,7 @@ "parentConnector" : "f294" } ], "visual" : { - "at" : { "x" : 344, "y" : 4056 } + "at" : { "x" : 344, "y" : 3976 } }, "connect" : [ { "id" : "f294", "to" : "f271" } 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 060210c7591..e6cdba4d490 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/MenuView.java @@ -1,7 +1,6 @@ package ch.addon.portal.generic.menu; import static ch.ivy.addon.portalkit.util.DashboardUtils.DASHBOARD_MENU_ITEM_PATTERN; - import static ch.ivy.addon.portalkit.util.DashboardUtils.DASHBOARD_MENU_JS_CLASS; import static ch.ivy.addon.portalkit.util.DashboardUtils.DASHBOARD_MENU_PATTERN; import static ch.ivy.addon.portalkit.util.DashboardUtils.DASHBOARD_PAGE_URL; @@ -48,7 +47,6 @@ import ch.ivy.addon.portalkit.service.ApplicationMultiLanguage; import ch.ivy.addon.portalkit.service.IvyCacheService; import ch.ivy.addon.portalkit.service.MainMenuEntryService; -import ch.ivy.addon.portalkit.service.StatisticService; import ch.ivy.addon.portalkit.util.DashboardUtils; import ch.ivy.addon.portalkit.util.UrlUtils; import ch.ivy.addon.portalkit.util.UserUtils; @@ -178,7 +176,7 @@ private MenuElement buildDashboardItem() { String defaultTitle = (String) dashboardMenu.getValue(); String title = board.getTitles().stream() - .filter(name -> StatisticService.equalsLanguageLocale(name, currentLanguage) + .filter(name -> StringUtils.equalsIgnoreCase(name.getLocale().toString(), currentLanguage) && StringUtils.isNotBlank(name.getValue())) .map(DisplayName::getValue).findFirst().orElse(defaultTitle); dashboardMenu.setValue(title); @@ -274,7 +272,6 @@ public void loadBreadcrumb(String viewName, ITask userTask, ICase userCase) { case TECHNICAL_CASE -> buildBreadCrumbForTechnicalCaseList(userCase); case RELATED_TASK -> buildBreadCrumbForRelatedTask(userCase); case PROCESS -> buildBreadCrumbForProcess(); - case STATISTICS -> buildBreadCrumbForStatistic(); case TASK_DETAIL -> buildBreadCrumbForTaskDetails(userTask); case CASE_DETAIL -> buildBreadCrumbForCaseDetails(userCase); case EXPRESS -> buildBreadCrumbForExpress(); @@ -358,14 +355,6 @@ private void buildBreadCrumbForProcess() { breadcrumbModel.getElements().add(processListSubmenuItem); } - private void buildBreadCrumbForStatistic() { - setPortalHomeMenuToBreadcrumbModel(); - - DefaultMenuItem statisticListSubmenuItem = buildStatisticListMenuItem(); - statisticListSubmenuItem.setDisabled(true); - breadcrumbModel.getElements().add(statisticListSubmenuItem); - } - private void buildBreadCrumbForTaskDetails(ITask userTask) { setPortalHomeMenuToBreadcrumbModel(); breadcrumbModel.getElements().add(buildTaskListMenuItem()); @@ -433,11 +422,6 @@ private DefaultMenuItem buildProcessListMenuItem() { return buildMenuItemFromPortalSubMenuItem(processSubMenuItem); } - private DefaultMenuItem buildStatisticListMenuItem() { - StatisticSubMenuItem statisticSubMenuItem = new StatisticSubMenuItem(); - return buildMenuItemFromPortalSubMenuItem(statisticSubMenuItem); - } - private MenuItem buildTaskDetailsMenuItem(ITask userTask) { String taskName = StringUtils.isEmpty(userTask.getName()) ? Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/components/taskStart/taskNameNotAvailable") : userTask.names().current(); return DefaultMenuItem.builder() diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuItem.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuItem.java index 7755d32184b..c9ecce281e4 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuItem.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuItem.java @@ -109,7 +109,6 @@ private String generateMenuId(MenuKind menuKind) { case PROCESS: case TASK: case CASE: - case STATISTICS: case CUSTOM: menuFormat = SUB_MENU_ID_FORMAT; break; diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuNavigator.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuNavigator.java index aab7bffe407..cbc352d7266 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuNavigator.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/PortalMenuNavigator.java @@ -26,10 +26,8 @@ import ch.ivy.addon.portalkit.configuration.Application; import ch.ivy.addon.portalkit.constant.IvyCacheIdentifier; import ch.ivy.addon.portalkit.enums.BreadCrumbKind; -import ch.ivy.addon.portalkit.enums.GlobalVariable; import ch.ivy.addon.portalkit.enums.MenuKind; import ch.ivy.addon.portalkit.enums.SessionAttribute; -import ch.ivy.addon.portalkit.service.GlobalSettingService; import ch.ivy.addon.portalkit.service.IvyCacheService; import ch.ivy.addon.portalkit.service.RegisteredApplicationService; import ch.ivy.addon.portalkit.util.PermissionUtils; @@ -64,9 +62,6 @@ public static void navigateToTargetPage(Map> params) throws case CASE: PortalNavigator.navigateToPortalCase(); break; - case STATISTICS: - PortalNavigator.navigateToPortalStatistic(); - break; default: break; } @@ -162,7 +157,6 @@ private record PortalSubMenuItemWrapper(Locale loadedLocale, List p private static List getSubmenuList() { List subMenuItems = new ArrayList<>(); - GlobalSettingService globalSettingService = GlobalSettingService.getInstance(); if(PermissionUtils.checkAccessFullProcessListPermission()) { subMenuItems.add(new ProcessSubMenuItem()); @@ -176,11 +170,6 @@ private static List getSubmenuList() { subMenuItems.add(new CaseSubMenuItem()); } - if(PermissionUtils.checkAccessFullStatisticsListPermission() - && !globalSettingService.findBooleanGlobalSettingValue(GlobalVariable.HIDE_STATISTIC_WIDGET)) { - subMenuItems.add(new StatisticSubMenuItem()); - } - subMenuItems.addAll(CustomSubMenuItemService.findAll()); return subMenuItems; } diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/StatisticSubMenuItem.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/StatisticSubMenuItem.java deleted file mode 100644 index 1701385cb82..00000000000 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/menu/StatisticSubMenuItem.java +++ /dev/null @@ -1,17 +0,0 @@ -package ch.addon.portal.generic.menu; - -import com.axonivy.portal.components.publicapi.ApplicationMultiLanguageAPI; - -import ch.addon.portal.generic.userprofile.homepage.HomepageType; -import ch.ivy.addon.portal.generic.navigation.PortalNavigator; -import ch.ivy.addon.portalkit.enums.MenuKind; - -public class StatisticSubMenuItem extends SubMenuItem { - public StatisticSubMenuItem() { - this.icon = "si si-pie-line-graph"; - this.menuKind = MenuKind.STATISTICS; - this.label = ApplicationMultiLanguageAPI.getCmsValueByUserLocale("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/statistics"); - this.name = HomepageType.STATISTICS.name(); - this.link = PortalNavigator.getSubMenuItemUrlOfCurrentApplication(MenuKind.STATISTICS); - } -} diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageMapper.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageMapper.java index 241838b8613..07a8c049dbf 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageMapper.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageMapper.java @@ -23,8 +23,6 @@ public static Homepage toHomepage(SubMenuItem menuItem) { homepage.setType(HomepageType.TASK); } else if (menuItem.getMenuKind() == MenuKind.CASE) { homepage.setType(HomepageType.CASE); - } else if (menuItem.getMenuKind() == MenuKind.STATISTICS) { - homepage.setType(HomepageType.STATISTICS); } else if (menuItem.getMenuKind() == MenuKind.CUSTOM) { homepage.setType(HomepageType.CUSTOM); } else { diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageType.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageType.java index c0b0487db9a..1daa0efa627 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageType.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageType.java @@ -1,7 +1,7 @@ package ch.addon.portal.generic.userprofile.homepage; public enum HomepageType { - DASHBOARD, PROCESS, TASK, CASE, STATISTICS, CUSTOM; + DASHBOARD, PROCESS, TASK, CASE, CUSTOM; public static HomepageType getType(String typeName) { for (HomepageType type : HomepageType.values()) { diff --git a/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageUtils.java b/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageUtils.java index 8df31614d0c..a0e09fa30ed 100644 --- a/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageUtils.java +++ b/AxonIvyPortal/portal/src/ch/addon/portal/generic/userprofile/homepage/HomepageUtils.java @@ -88,7 +88,6 @@ private static void adjustHomepageStartLink(Homepage homepage) { case PROCESS -> findRelativeUrlByKeywork(PortalNavigator.PORTAL_PROCESS_START); case TASK -> findRelativeUrlByKeywork(PortalNavigator.PORTAL_TASK_START); case CASE -> findRelativeUrlByKeywork(PortalNavigator.PORTAL_CASE_START); - case STATISTICS -> findRelativeUrlByKeywork(PortalNavigator.PORTAL_STATISTIC_START); default -> ""; }; if (StringUtils.isNotEmpty(relativeUrl)) { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardDetailModificationBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardDetailModificationBean.java index 6925c0484af..3c0483041ba 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardDetailModificationBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardDetailModificationBean.java @@ -7,7 +7,6 @@ import static ch.ivy.addon.portalkit.enums.DashboardWidgetType.NOTIFICATION; import static ch.ivy.addon.portalkit.enums.DashboardWidgetType.PROCESS; import static ch.ivy.addon.portalkit.enums.DashboardWidgetType.PROCESS_VIEWER; -import static ch.ivy.addon.portalkit.enums.DashboardWidgetType.STATISTIC; import static ch.ivy.addon.portalkit.enums.DashboardWidgetType.TASK; import static ch.ivy.addon.portalkit.enums.DashboardWidgetType.WELCOME; import static org.apache.commons.lang3.StringUtils.EMPTY; @@ -70,7 +69,6 @@ import ch.ivy.addon.portalkit.dto.dashboard.ProcessDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.ProcessViewerDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.SingleProcessDashboardWidget; -import ch.ivy.addon.portalkit.dto.dashboard.StatisticDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.TaskDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.WelcomeDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.WidgetSample; @@ -84,7 +82,6 @@ import ch.ivy.addon.portalkit.jsf.Attrs; import ch.ivy.addon.portalkit.jsf.ManagedBeans; import ch.ivy.addon.portalkit.service.DashboardService; -import ch.ivy.addon.portalkit.service.StatisticService; import ch.ivy.addon.portalkit.service.exception.PortalException; import ch.ivy.addon.portalkit.util.CustomWidgetUtils; import ch.ivy.addon.portalkit.util.DashboardUtils; @@ -274,11 +271,6 @@ public void create(WidgetSample sample) { widget = getDefaultCustomDashboardWidget(); ((CustomDashboardWidget) widget).getData().setType(DashboardCustomWidgetType.EXTERNAL_URL); } - case STATISTIC -> { - newWidgetHeader = translate("/ch.ivy.addon.portalkit.ui.jsf/dashboard/configuration/newWidgetHeader", - Arrays.asList(translate("/ch.ivy.addon.portalkit.ui.jsf/dashboard/statisticChartWidget"))); - widget = getDefaultStatisticDashboardWidget(); - } case PROCESS_VIEWER -> { newWidgetHeader = translate("/ch.ivy.addon.portalkit.ui.jsf/dashboard/configuration/newWidgetHeader", Arrays.asList(translate("/ch.ivy.addon.portalkit.ui.jsf/ProcessViewer/ProcessViewerText"))); @@ -382,12 +374,6 @@ private ProcessDashboardWidget getDefaultProcessDashboardWidget() { return (ProcessDashboardWidget) DashboardWidgetUtils.buildDefaultWidget(widgetId, widgetName, PROCESS); } - private StatisticDashboardWidget getDefaultStatisticDashboardWidget() { - String widgetId = DashboardWidgetUtils.generateNewWidgetId(STATISTIC); - String widgetName = translate("/ch.ivy.addon.portalkit.ui.jsf/dashboard/yourStatistics"); - return (StatisticDashboardWidget) DashboardWidgetUtils.buildDefaultWidget(widgetId, widgetName, STATISTIC); - } - private ClientStatisticDashboardWidget getDefaultClientStatisticDashboardWidget(String widgetName, String chartId) { String widgetId = DashboardWidgetUtils.generateNewWidgetId(CLIENT_STATISTIC); ClientStatisticDashboardWidget widget = null; @@ -479,9 +465,6 @@ public void saveWidget() { CustomDashboardWidget customWidget = (CustomDashboardWidget) widget; unifyCustomWidgetData(customWidget); } - case STATISTIC -> { - updateStatisticWidgetData(widget); - } case WELCOME -> { updateWelcomeWidget(widget); } @@ -541,14 +524,6 @@ private void updateProcessWidgetSize(ProcessDashboardWidget processWidget, int h } } - private void updateStatisticWidgetData(DashboardWidget widget) { - var statisticWidget = (StatisticDashboardWidget) widget; - var displayName = StatisticService.getInstance().getDisplayNameInUserLanguageForChart(statisticWidget.getChart()); - if (displayName != null) { - statisticWidget.setName(displayName.getValue()); - } - } - /** * Add image to CMS, remove temp image CMS * @@ -814,11 +789,6 @@ public void prepareEditWidget(DashboardWidget widget) { }; setWidget(clonedWidget); } - case STATISTIC -> { - var statisticDashboardWidget = new StatisticDashboardWidget((StatisticDashboardWidget) widget); - setWidget(statisticDashboardWidget); - } - default -> { setWidget(editWidget); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/NavigatorBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/NavigatorBean.java index b7b95b68259..c354bba7337 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/NavigatorBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/NavigatorBean.java @@ -28,8 +28,5 @@ public String getTaskPage() { public String getCasePage() { return MenuKind.CASE.toString(); } - - public String getStatisticPage() { - return MenuKind.STATISTICS.toString(); - } + } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/StatisticBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/StatisticBean.java deleted file mode 100644 index 8320f00ff36..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/StatisticBean.java +++ /dev/null @@ -1,31 +0,0 @@ -package ch.ivy.addon.portal.generic.bean; - -import java.io.Serializable; - -import javax.annotation.PostConstruct; -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; - -import org.apache.commons.lang3.StringUtils; - -import ch.ivy.addon.portalkit.enums.GlobalVariable; -import ch.ivy.addon.portalkit.service.GlobalSettingService; - -@ManagedBean -@ViewScoped -public class StatisticBean implements Serializable { - private static final long serialVersionUID = 1L; - - private String isHideStatisticWidget; - - @PostConstruct - public void init() { - GlobalSettingService globalSettingService = GlobalSettingService.getInstance(); - isHideStatisticWidget = - globalSettingService.findGlobalSettingValue(GlobalVariable.HIDE_STATISTIC_WIDGET); - } - - public boolean isHiddenStatisticWidget() { - return StringUtils.isNotBlank(isHideStatisticWidget) ? Boolean.parseBoolean(isHideStatisticWidget) : false; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java index e600c320266..2872c437bc5 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/UserMenuBean.java @@ -110,10 +110,6 @@ private boolean loggedByExternalSecuritySystem() { return Ivy.session().getSessionUser() != null && Ivy.session().getSessionUser().getExternalId() != null; } - public boolean isHiddenStatisticWidget() { - return GlobalSettingService.getInstance().findGlobalSettingValueAsBoolean(GlobalVariable.HIDE_STATISTIC_WIDGET); - } - public boolean getIsShowGlobalSearch() { return isShowGlobalSearch; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/navigation/PortalNavigator.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/navigation/PortalNavigator.java index 230f77efb2f..b02592f9776 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/navigation/PortalNavigator.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/navigation/PortalNavigator.java @@ -24,7 +24,6 @@ public final class PortalNavigator extends BaseNavigator{ private static final String PORTAL_PROCESS = "Start Processes/PortalStart/DefaultProcessStartListPage.ivp"; private static final String PORTAL_TASK = "Start Processes/PortalStart/DefaultTaskListPage.ivp"; private static final String PORTAL_CASE = "Start Processes/PortalStart/CaseListPage.ivp"; - private static final String PORTAL_STATISTIC = "Start Processes/PortalStart/StatisticPage.ivp"; private static final String PORTAL_CASE_DETAILS = "Start Processes/PortalStart/DefaultCaseDetailPage.ivp"; private static final String PORTAL_RELATED_TASKS_OF_CASE = "Start Processes/PortalStart/RelatedTasksOfCasePage.ivp"; private static final String PORTAL_RELATED_TASKS_OF_CASE_IN_FRAME = "Start Processes/PortalStart/RelatedTasksOfCasePageInFrame.ivp"; @@ -45,7 +44,6 @@ public final class PortalNavigator extends BaseNavigator{ public static final String PORTAL_PROCESS_START = "/DefaultProcessStartListPage.ivp"; public static final String PORTAL_TASK_START = "/DefaultTaskListPage.ivp"; public static final String PORTAL_CASE_START = "/CaseListPage.ivp"; - public static final String PORTAL_STATISTIC_START = "/StatisticPage.ivp"; public static final String PORTAL_USER_PROFILE_START = "/UserProfile.ivp"; public static final String PORTAL_CASE_DETAILS_IN_IFRAME_START = "/CaseDetailsInIFrame.ivp"; private static final String UUID = "uuid"; @@ -99,7 +97,6 @@ public static String getSubMenuItemUrlOfCurrentApplication(MenuKind menuKind) { case PROCESS -> PORTAL_PROCESS; case TASK -> PORTAL_TASK; case CASE -> PORTAL_CASE; - case STATISTICS -> PORTAL_STATISTIC; default -> StringUtils.EMPTY; }; return ProcessStartAPI.findRelativeUrlByProcessStartFriendlyRequestPath(subMenuUrl); @@ -123,10 +120,6 @@ public static void navigateToPortalTask() { navigateByKeyword(PORTAL_TASK_START, PORTAL_TASK, new HashMap<>()); } - public static void navigateToPortalStatistic() { - navigateByKeyword(PORTAL_STATISTIC_START, PORTAL_STATISTIC, new HashMap<>()); - } - public static void navigateToPortalCaseDetails(String uuid) { Map params = new HashMap<>(); params.put(ID, uuid); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/view/TaskAnalysisView.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/view/TaskAnalysisView.java deleted file mode 100644 index c993547f8a6..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/view/TaskAnalysisView.java +++ /dev/null @@ -1,162 +0,0 @@ -package ch.ivy.addon.portal.generic.view; - -import org.apache.commons.lang3.StringUtils; - -import ch.ivy.addon.portalkit.datamodel.internal.TaskAnalysisLazyDataModel; -import ch.ivyteam.ivy.environment.Ivy; - -public class TaskAnalysisView { - - public static class Builder { - - private String pageTitle = StringUtils.EMPTY; - private TaskAnalysisLazyDataModel dataModel; - private String keyword = StringUtils.EMPTY; - private long taskId = -1L; - private boolean canLinkBackCaseDetail = Boolean.FALSE; - private String caseName = StringUtils.EMPTY; - private boolean hideTaskFilter = Boolean.FALSE; - private boolean showHeaderToolbar = Boolean.TRUE; - private String noTaskFoundMessage = Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/components/taskView/noTask"); - private boolean compactMode = Boolean.TRUE; - private Integer chunkSize = 10; - - public Builder pageTitle(String pageTitle) { - this.pageTitle = pageTitle; - return this; - } - - public Builder caseName(String caseName) { - this.caseName = caseName; - return this; - } - - public Builder dataModel(TaskAnalysisLazyDataModel taskAnalysisLazyDataModel) { - this.dataModel = taskAnalysisLazyDataModel; - return this; - } - - public Builder keyword(String keyword) { - this.keyword = keyword; - return this; - } - - public Builder taskId(long taskId) { - this.taskId = taskId; - return this; - } - - public Builder canLinkBackCaseDetail(boolean canLinkBackCaseDetail) { - this.canLinkBackCaseDetail = canLinkBackCaseDetail; - return this; - } - - public Builder hideTaskFilter(boolean hideTaskFilter) { - this.hideTaskFilter = hideTaskFilter; - return this; - } - - public Builder showHeaderToolbar(boolean showHeaderToolbar) { - this.showHeaderToolbar = showHeaderToolbar; - return this; - } - - public Builder noTaskFoundMessage(String noTaskFoundMessage) { - this.noTaskFoundMessage = noTaskFoundMessage; - return this; - } - - public Builder compactMode(boolean compactMode) { - this.compactMode = compactMode; - return this; - } - - public Builder chunkSize(Integer chunkSize) { - this.chunkSize = chunkSize; - return this; - } - - public TaskAnalysisView createNewTaskView() { - return new TaskAnalysisView(this); - } - } - - private final String pageTitle; - private TaskAnalysisLazyDataModel dataModel; - private final String keyword; - private final long taskId; - private final String caseName; - private final boolean canLinkBackCaseDetail; - private final boolean hideTaskFilter; - private final boolean showHeaderToolbar; - private final String noTaskFoundMessage; - private final boolean compactMode; - private final Integer chunkSize; - - private TaskAnalysisView(Builder builder) { - pageTitle = builder.pageTitle; - dataModel = builder.dataModel; - keyword = builder.keyword; - taskId = builder.taskId; - canLinkBackCaseDetail = builder.canLinkBackCaseDetail; - caseName = builder.caseName; - hideTaskFilter = builder.hideTaskFilter; - showHeaderToolbar = builder.showHeaderToolbar; - noTaskFoundMessage = builder.noTaskFoundMessage; - compactMode = builder.compactMode; - chunkSize = builder.chunkSize; - } - - public String getNoTaskFoundMessage() { - return noTaskFoundMessage; - } - - public static Builder create() { - return new Builder(); - } - - public String getPageTitle() { - return pageTitle; - } - - public TaskAnalysisLazyDataModel getDataModel() { - return dataModel; - } - - public void setDataModel(TaskAnalysisLazyDataModel dataModel) { - this.dataModel = dataModel; - } - - public String getKeyword() { - return keyword; - } - - public long getTaskId() { - return taskId; - } - - public boolean canLinkBackCaseDetail() { - return canLinkBackCaseDetail; - } - - public String getCaseName() { - return caseName; - } - - public boolean isHideTaskFilter() { - return hideTaskFilter; - } - - public boolean isShowHeaderToolbar() { - return showHeaderToolbar; - } - - public boolean isCompactMode() { - return compactMode; - } - - public Integer getChunkSize() { - return chunkSize; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/DashboardStatisticChartBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/DashboardStatisticChartBean.java deleted file mode 100644 index 5a994ba8502..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/DashboardStatisticChartBean.java +++ /dev/null @@ -1,196 +0,0 @@ -package ch.ivy.addon.portalkit.bean; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.primefaces.event.ItemSelectEvent; - -import ch.ivy.addon.portalkit.dto.dashboard.StatisticDashboardWidget; -import ch.ivy.addon.portalkit.enums.GlobalVariable; -import ch.ivy.addon.portalkit.enums.StatisticChartType; -import ch.ivy.addon.portalkit.service.GlobalSettingService; -import ch.ivy.addon.portalkit.service.StatisticService; -import ch.ivy.addon.portalkit.statistics.StatisticChart; -import ch.ivy.addon.portalkit.statistics.StatisticChartDrilldownUtils; -import ch.ivyteam.ivy.environment.Ivy; - -@ViewScoped -@ManagedBean -public class DashboardStatisticChartBean implements Serializable { - - private static final long serialVersionUID = -8491957877380766526L; - private List availableCharts; - private StatisticChart selectedChart; - private boolean isPublicDashboard; - private boolean isRenderedRefreshChartPoll; - private long statisticChartScalingInterval; - - public void initChartConfiguration(StatisticDashboardWidget widget, boolean isPublicDashboard) { - if (widget != null && widget.getChart() != null) { - selectedChart = widget.getChart(); - } else { - selectedChart = new StatisticChart(); - selectedChart.setType(StatisticChartType.TASK_BY_PRIORITY); - selectedChart.setDonutChartModel(StatisticService.getInstance().createDonutChartPlaceholder()); - } - this.isPublicDashboard = isPublicDashboard; - } - - public void fetchStatisticCharts() { - availableCharts = new ArrayList<>(); - if (isPublicDashboard) { - availableCharts.addAll(StatisticService.getInstance().getPublicConfig()); - } else { - availableCharts.addAll(StatisticService.getInstance().findStatisticCharts()); - } - } - - public void initSettings() { - var chartScalingSetting = GlobalSettingService.getInstance().findGlobalSettingValue(GlobalVariable.STATISTIC_CHART_SCALING_INTERVAL); - statisticChartScalingInterval = StringUtils.isNotBlank(chartScalingSetting) ? Long.valueOf(chartScalingSetting) : 0; - isRenderedRefreshChartPoll = statisticChartScalingInterval > StatisticChartCreationBean.MINIMUM_STATISTIC_CHART_SCALING_INTERVAL - && !Ivy.session().isSessionUserUnknown(); - } - - public List completeCharts(String filter) { - if (CollectionUtils.isEmpty(availableCharts)) { - fetchStatisticCharts(); - } - return availableCharts.stream().filter(chart -> StringUtils.containsAnyIgnoreCase(getDisplayChartName(chart), filter)) - .collect(Collectors.toList()); - } - - public boolean isCaseByFinishedTime(StatisticChart chart) { - if (chart == null) { - return false; - } - return StatisticService.getInstance().isCaseByFinishedTime(chart) && Objects.nonNull(chart.getDonutChartModel()); - } - - public boolean isCaseByFinishedTask(StatisticChart chart) { - if (chart == null) { - return false; - } - return StatisticService.getInstance().isCaseByFinishedTask(chart) && Objects.nonNull(chart.getDonutChartModel()); - } - - public boolean isElapsedTimeByCaseCategory(StatisticChart chart) { - if (chart == null) { - return false; - } - return StatisticService.getInstance().isElapsedTimeByCaseCategory(chart) && Objects.nonNull(chart.getBarChartModel()); - } - - public boolean isCaseByState(StatisticChart chart) { - if (chart == null) { - return false; - } - return StatisticService.getInstance().isCaseByState(chart) && Objects.nonNull(chart.getDonutChartModel()); - } - - public boolean isTaskByPriority(StatisticChart chart) { - if (chart == null) { - return false; - } - return StatisticService.getInstance().isTaskByPriority(chart) && Objects.nonNull(chart.getDonutChartModel()); - } - - public boolean isTaskByExpiry(StatisticChart chart) { - if (chart == null) { - return false; - } - return StatisticService.getInstance().isTaskByExpiry(chart) && Objects.nonNull(chart.getBarChartModel()); - } - - public boolean isCasesByCategory(StatisticChart chart) { - if (chart == null) { - return false; - } - return StatisticService.getInstance().isCasesByCategory(chart) && Objects.nonNull(chart.getBarChartModel()); - } - - public List completeStatisticChart(String filter) { - return getAvailableCharts().stream().filter(chart -> getDisplayChartName(chart).contains(filter)) - .collect(Collectors.toList()); - } - - public List getAvailableCharts() { - return availableCharts; - } - - public void setAvailableCharts(List availableCharts) { - this.availableCharts = availableCharts; - } - - public String getDisplayChartName(StatisticChart chart) { - if (chart == null) { - return ""; - } - var displayName = StatisticService.getInstance().getDisplayNameInUserLanguageForChart(chart); - return Objects.isNull(displayName) ? chart.getName() : displayName.getValue(); - } - - public StatisticChart getSelectedChart() { - return selectedChart; - } - - public void setSelectedChart(StatisticChart selectedChart) { - this.selectedChart = selectedChart; - } - - public void drilldownCaseByState(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - if (selectedStatisticChart == null) { - return; - } - StatisticChartDrilldownUtils.drilldownCaseByState(event, selectedStatisticChart); - } - - private StatisticChart getSelectedStatisticChart(ItemSelectEvent event) { - String selectedChartId = (String) event.getComponent().getAttributes().get("selectedChartId"); - var charts = StatisticService.getInstance().findAll(); - return charts.stream() - .filter(chart -> StringUtils.equals(chart.getId(), selectedChartId)) - .findFirst().orElse(null); - } - - public void drilldownTaskByPriority(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - if (selectedStatisticChart == null) { - return; - } - StatisticChartDrilldownUtils.drilldownTaskByPriority(event, selectedStatisticChart); - } - - public void toTaskByExpiryTaskList(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - if (selectedStatisticChart == null) { - return; - } - StatisticChartDrilldownUtils.toTaskByExpiryTaskList(event, selectedStatisticChart); - } - - public void toCasesByCategoryCaseList(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - if (selectedStatisticChart == null) { - return; - } - StatisticChartDrilldownUtils.toCasesByCategoryCaseList(event, selectedStatisticChart); - } - - public boolean isRenderedRefreshChartPoll() { - return isRenderedRefreshChartPoll; - } - - public long getStatisticChartScalingInterval() { - return statisticChartScalingInterval; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ElapsedTimeDetailsBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ElapsedTimeDetailsBean.java deleted file mode 100644 index ff541b5955e..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/ElapsedTimeDetailsBean.java +++ /dev/null @@ -1,60 +0,0 @@ -package ch.ivy.addon.portalkit.bean; - -import java.io.Serializable; - -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; - -import org.primefaces.model.SortMeta; - -import ch.ivy.addon.portalkit.dto.DisplayName; -import ch.ivy.addon.portalkit.service.StatisticService; -import ch.ivy.addon.portalkit.statistics.StatisticChart; -import ch.ivy.addon.portalkit.statistics.StatisticChartConstants; -import ch.ivy.addon.portalkit.util.DateTimeFormatterUtils; -import ch.ivy.addon.portalkit.util.SortFieldUtil; -import ch.ivy.addon.portalkit.util.UserUtils; -import ch.ivyteam.ivy.environment.Ivy; - -@ManagedBean -@ViewScoped -public class ElapsedTimeDetailsBean implements Serializable { - private static final long serialVersionUID = 1L; - - private String selectedCaseCategory; - private String chartName; - - public void initialize(String caseCategory, StatisticChart statisticChart) { - setSelectedCaseCategory(caseCategory); - String currentLanguage = UserUtils.getUserLanguage(); - chartName = statisticChart.getNames().stream() - .filter(name -> StatisticService.equalsLanguageLocale(name, currentLanguage)) - .map(DisplayName::getValue) - .findFirst().orElse(""); - } - - public String getSelectedCaseCategory() { - return selectedCaseCategory; - } - - public void setSelectedCaseCategory(String selectedCaseCategory) { - this.selectedCaseCategory = selectedCaseCategory; - } - - public String getExcelFileName() { - String fileName = chartName + "_" + selectedCaseCategory; - fileName = fileName.replace(" ", "_"); - if (Ivy.cms().co(StatisticChartConstants.NO_CATEGORY_CMS).equals(selectedCaseCategory)) { - fileName = fileName.replace("[", "").replace("]", ""); - } - return fileName; - } - - public String calculateElapsedTime(Number secondsValue) { - return DateTimeFormatterUtils.formatToExactTime(secondsValue); - } - - public SortMeta getSortById() { - return SortFieldUtil.buildSortMeta("ID", false); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/StatisticChartCreationBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/StatisticChartCreationBean.java deleted file mode 100644 index a5f298db15a..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/StatisticChartCreationBean.java +++ /dev/null @@ -1,403 +0,0 @@ -package ch.ivy.addon.portalkit.bean; - -import java.io.Serializable; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.PostConstruct; -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; -import javax.faces.context.FacesContext; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.primefaces.model.charts.bar.BarChartModel; -import org.primefaces.model.charts.donut.DonutChartModel; - -import ch.ivy.addon.portalkit.bo.CaseStateStatistic; -import ch.ivy.addon.portalkit.bo.CaseCategoryStatistic; -import ch.ivy.addon.portalkit.bo.ElapsedTimeStatistic; -import ch.ivy.addon.portalkit.bo.ExpiryStatistic; -import ch.ivy.addon.portalkit.bo.PriorityStatistic; -import ch.ivy.addon.portalkit.enums.GlobalVariable; -import ch.ivy.addon.portalkit.enums.StatisticChartType; -import ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection; -import ch.ivy.addon.portalkit.service.GlobalSettingService; -import ch.ivy.addon.portalkit.service.StatisticService; -import ch.ivy.addon.portalkit.statistics.StatisticChartQueryUtils; -import ch.ivy.addon.portalkit.statistics.StatisticFilter; -import ch.ivyteam.ivy.security.IRole; -import ch.ivyteam.ivy.security.IUser; -import ch.ivyteam.ivy.workflow.CaseState; -import ch.ivyteam.ivy.workflow.WorkflowPriority; -import ch.ivyteam.ivy.workflow.query.CaseQuery; -import ch.ivyteam.ivy.workflow.query.TaskQuery; - -@ManagedBean -@ViewScoped -public class StatisticChartCreationBean implements Serializable { - - private static final long serialVersionUID = 1L; - - private DonutChartModel taskByPriorityModel; - private DonutChartModel caseByStateModel; - private DonutChartModel caseByFinishedTimeModel; - private DonutChartModel caseByFinishedTaskModel; - private BarChartModel taskByExpiryModel; - private BarChartModel elapsedTimeModel; - private BarChartModel casesByCategoryModel; - private StatisticService statisticService; - private Map> customFieldFilters = new HashMap<>(); - - public static final int CASE_CATEGORIES_TYPE = 0; - public static final int MINIMUM_STATISTIC_CHART_SCALING_INTERVAL = 10; - - @PostConstruct - public void init() { - statisticService = StatisticService.getInstance(); - initStatisticChart(); - } - - /** - * Create a StatisticChart's placeholder when the data is collecting. - */ - private void initStatisticChart() { - taskByPriorityModel = statisticService.createDonutChartPlaceholder(); - caseByStateModel = statisticService.createDonutChartPlaceholder(); - caseByFinishedTimeModel = statisticService.createDonutChartPlaceholder(); - caseByFinishedTaskModel = statisticService.createDonutChartPlaceholder(); - taskByExpiryModel = statisticService.createBarChartPlaceholder(); - elapsedTimeModel = statisticService.createBarChartPlaceholder(); - casesByCategoryModel = statisticService.createBarChartPlaceholder(); - } - - /** - * Update filters - * - * @param filter - * @param oldFilter - */ - public void updateFilters(StatisticFilter filter, StatisticFilter oldFilter) { - filter.setCustomFieldFilters(this.customFieldFilters); - if(filter.getTimePeriodSelection() != StatisticTimePeriodSelection.CUSTOM) { - filter.setCreatedDateFrom(null); - filter.setCreatedDateTo(null); - } - if (oldFilter != null) { - setOldFiltersFromCurrentValues(filter, oldFilter); - } - } - - public void clearChartModels() { - initStatisticChart(); - } - - private void setOldFiltersFromCurrentValues(StatisticFilter filter, StatisticFilter oldFilter) { - oldFilter.setTimePeriodSelection(filter.getTimePeriodSelection()); - Date createdDateFrom = filter.getCreatedDateFrom(); - Date createdDateTo = filter.getCreatedDateTo(); - oldFilter.setCreatedDateFrom(createdDateFrom == null ? null : new Date(createdDateFrom.getTime())); - oldFilter.setCreatedDateTo(createdDateTo == null ? null : new Date(createdDateTo.getTime())); - oldFilter.setIsAllCaseStatesSelected(filter.getIsAllCaseStatesSelected()); - oldFilter.setIsAllRolesSelected(filter.getIsAllRolesSelected()); - oldFilter.setIsAllTaskPrioritiesSelected(filter.getIsAllTaskPrioritiesSelected()); - - updateCaseCategory(filter, oldFilter); - - if (!filter.getIsAllRolesSelected()) { - updateOldListFromNewList(oldFilter.getSelectedRoles(), filter.getSelectedRoles()); - } - if (!filter.getIsAllCaseStatesSelected()) { - updateOldListFromNewList(oldFilter.getSelectedCaseStates(), filter.getSelectedCaseStates()); - } - if (!filter.getIsAllTaskPrioritiesSelected()) { - updateOldListFromNewList(oldFilter.getSelectedTaskPriorities(), filter.getSelectedTaskPriorities()); - } - oldFilter.setCustomFieldFilters(filter.getCustomFieldFilters()); - } - - private void updateCaseCategory(StatisticFilter filter, StatisticFilter oldFilter) { - filter.setSelectedCaseCategories(filter.getCaseCategories().getCategoryPaths()); - oldFilter.setSelectedCaseCategories(filter.getSelectedCaseCategories()); - } - - public boolean checkIfAnyFilterChanges(StatisticFilter filter, StatisticFilter oldFilter) { - if (oldFilter.getTimePeriodSelection() != filter.getTimePeriodSelection()) { - return true; - } - if (isDateChanged(oldFilter.getCreatedDateFrom(), filter.getCreatedDateFrom())) { - return true; - } - if (isDateChanged(oldFilter.getCreatedDateTo(), filter.getCreatedDateTo())) { - return true; - } - if (checkIfAnyCaseStateChanged(filter, oldFilter)) { - return true; - } - if (checkIfAnyTaskPriorityChanged(filter, oldFilter)) { - return true; - } - if (checkIfAnyCaseCategoryChanged(filter, oldFilter)) { - return true; - } - if (checkIfAnyRoleChanged(filter, oldFilter)) { - return true; - } - return checkIfAnyCustomFieldChanged(filter, oldFilter); - } - - private boolean checkIfAnyCaseStateChanged(StatisticFilter filter, StatisticFilter oldFilter) { - //compare check box select all of case states - if (oldFilter.getIsAllCaseStatesSelected() != filter.getIsAllCaseStatesSelected()) { - return true; - } - //compare other check box of case states if select all is not checked - return !filter.getIsAllCaseStatesSelected() && !oldFilter.getSelectedCaseStates().equals(filter.getSelectedCaseStates()); - } - - private boolean checkIfAnyTaskPriorityChanged(StatisticFilter filter, StatisticFilter oldFilter) { - //compare check box select all of task priorities - if (oldFilter.getIsAllTaskPrioritiesSelected() != filter.getIsAllTaskPrioritiesSelected()) { - return true; - } - //compare other check box of task priorities if select all is not checked - return !filter.getIsAllTaskPrioritiesSelected() && !oldFilter.getSelectedTaskPriorities().equals(filter.getSelectedTaskPriorities()); - } - - private boolean checkIfAnyCaseCategoryChanged(StatisticFilter filter, StatisticFilter oldFilter) { - return !oldFilter.getCaseCategories().getCategoryPaths().equals(filter.getCaseCategories().getCategoryPaths()); - } - - private boolean checkIfAnyRoleChanged(StatisticFilter filter, StatisticFilter oldFilter) { - //compare check box select all of roles - if (oldFilter.getIsAllRolesSelected() != filter.getIsAllRolesSelected()) { - return true; - } - //compare other check box of roles if select all is not checked - return !filter.getIsAllRolesSelected() && !oldFilter.getSelectedRoles().equals(filter.getSelectedRoles()); - } - - private boolean checkIfAnyCustomFieldChanged(StatisticFilter filter, StatisticFilter oldFilter) { - for (Map.Entry> entry : filter.getCustomFieldFilters().entrySet()) { - List list = oldFilter.getCustomFieldFilters().get(entry.getKey()); - if (list != null && entry.getValue() != null && !CollectionUtils.isEqualCollection(list, entry.getValue())) { - return true; - } - } - return false; - } - - private boolean isDateChanged(Date oldDate, Date currentDate) { - if (oldDate == null) { - return currentDate != null; - } - if (currentDate == null) { - return true; - } - return oldDate.compareTo(currentDate) != 0; - } - - public void updateRolesCheckboxes(StatisticFilter filter) { - List selectedRoles = filter.getSelectedRoles(); - if (filter.getIsAllRolesSelected()) { - for (Object obj : filter.getRoles()) { - if (obj instanceof IUser) { - IUser user = (IUser) obj; - addToListIfNotExist(selectedRoles, user.getMemberName()); - } else if (obj instanceof IRole) { - IRole role = (IRole) obj; - addToListIfNotExist(selectedRoles, role.getMemberName()); - } - } - } else { - selectedRoles.clear(); - } - } - - public void updateCaseStatesCheckboxes(StatisticFilter filter) { - List selectedCaseStates = filter.getSelectedCaseStates(); - if (filter.getIsAllCaseStatesSelected()) { - for (CaseState state : filter.getCaseStates()) { - addToListIfNotExist(selectedCaseStates, state); - } - } else { - selectedCaseStates.clear(); - } - } - - public void updateTaskPrioritiesCheckboxes(StatisticFilter filter) { - List selectedTaskPriorities = filter.getSelectedTaskPriorities(); - if (filter.getIsAllTaskPrioritiesSelected()) { - for (WorkflowPriority priority : filter.getTaskPriorities()) { - addToListIfNotExist(selectedTaskPriorities, priority); - } - } else { - selectedTaskPriorities.clear(); - } - } - - private void updateOldListFromNewList(List oldList, List newList) { - oldList.clear(); - if (!newList.isEmpty()) { - oldList.addAll(newList); - } - } - - private void addToListIfNotExist(List list, T element) { - if (!list.contains(element)) { - list.add(element); - } - } - - /** - * Create model for "Task by Priority" chart from given statistic filter - * - * @param filter statistic filter - */ - public void updateTaskByPriorityModel(StatisticFilter filter) { - TaskQuery query = StatisticChartQueryUtils.generateTaskQuery(filter); - PriorityStatistic priorityStatisticData = statisticService.getPriorityStatisticData(query); - taskByPriorityModel = statisticService.generateTaskByPriorityModel(priorityStatisticData, false); - } - - /** - * Create model for "Task by Expiry Date" chart from given statistic filter - * - * @param filter statistic filter - */ - public void updateTaskByExpiryModel(StatisticFilter filter) { - TaskQuery taskQuery = StatisticChartQueryUtils.generateTaskQueryForExpiry(filter); - ExpiryStatistic expiryStatisticData = statisticService.getExpiryStatisticData(taskQuery); - taskByExpiryModel = statisticService.generateTaskByExpiryModel(expiryStatisticData, false, StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY); - } - - /** - * Create model for "Case by State" chart from given statistic filter - * - * @param filter statistic filter - */ - public void updateCaseByStateModel(StatisticFilter filter) { - CaseQuery caseQuery = StatisticChartQueryUtils.generateCaseQueryForCaseState(filter); - CaseStateStatistic caseStateStatisticData = statisticService.getCaseStateStatisticData(caseQuery); - caseByStateModel = statisticService.generateCaseByStateModel(caseStateStatisticData,StatisticChartType.CASES_BY_STATE, false); - } - - /** - * Create model for "Case by Finished task" chart from given statistic filter - * @param filter - */ - public void updateCaseByFinishedTaskModel(StatisticFilter filter) { - CaseQuery caseQuery = StatisticChartQueryUtils.generateCaseQueryForCaseHaveFinishedTask(filter); - CaseStateStatistic caseStateStatisticData = statisticService.getCaseStateStatisticData(caseQuery); - caseByFinishedTaskModel = statisticService.generateCaseByStateModel(caseStateStatisticData, StatisticChartType.CASES_BY_FINISHED_TASK, false); - } - - /** - * Create model for "Case by Finished time" chart from given statistic filter - * @param filter - */ - public void updateCaseByFinishedTimeModel(StatisticFilter filter) { - CaseQuery caseQuery = StatisticChartQueryUtils.generateCaseQueryByFinishedTime(filter); - CaseStateStatistic caseStateStatisticData = statisticService.getCaseStateStatisticData(caseQuery); - caseByFinishedTimeModel = statisticService.generateCaseByStateModel(caseStateStatisticData, StatisticChartType.CASES_BY_FINISHED_TIME, false); - } - - /** - * Create model for "Elapsed time by Case Category" chart from given statistic filter - * - * @param filter statistic filter - */ - public void updateElapsedTimeByCaseCategory(StatisticFilter filter) { - CaseQuery caseQuery = StatisticChartQueryUtils.generateCaseQuery(filter, true); - ElapsedTimeStatistic elapsedTimeStatisticData = statisticService.getElapsedTimeStatisticData(caseQuery); - setElapsedTimeModel(statisticService.generateElapsedTimeModel(elapsedTimeStatisticData, false)); - } - - /** - * Create model for "Cases by Category" chart from given statistic filter - * - * @param filter statistic filter - */ - public void updateCasesByCategoryModel(StatisticFilter filter) { - CaseQuery caseQuery = StatisticChartQueryUtils.generateCaseQueryForCasesByCategoryChart(filter, null); - CaseCategoryStatistic caseCategoryStatisticData = statisticService.getCasesByCategoryStatisticData(caseQuery,filter.getCaseCategories().getCategoryPaths()); - casesByCategoryModel = statisticService.generateCasesByCategoryModel(caseCategoryStatisticData, false); - } - - public DonutChartModel getTaskByPriorityModel() { - return taskByPriorityModel; - } - - public void setTaskByPriorityModel(DonutChartModel taskByPriorityModel) { - this.taskByPriorityModel = taskByPriorityModel; - } - - public DonutChartModel getCaseByStateModel() { - return caseByStateModel; - } - - public void setCaseByStateModel(DonutChartModel caseByStateModel) { - this.caseByStateModel = caseByStateModel; - } - - public BarChartModel getTaskByExpiryModel() { - return taskByExpiryModel; - } - - public void setTaskByExpiryModel(BarChartModel taskByExpiryModel) { - this.taskByExpiryModel = taskByExpiryModel; - } - - public BarChartModel getElapsedTimeModel() { - return elapsedTimeModel; - } - - public void setElapsedTimeModel(BarChartModel elapsedTimeModel) { - this.elapsedTimeModel = elapsedTimeModel; - } - - public DonutChartModel getCaseByFinishedTaskModel() { - return caseByFinishedTaskModel; - } - - public void setCaseByFinishedTaskModel(DonutChartModel caseByFinishedTaskModel) { - this.caseByFinishedTaskModel = caseByFinishedTaskModel; - } - - public DonutChartModel getCaseByFinishedTimeModel() { - return caseByFinishedTimeModel; - } - - public void setCaseByFinishedTimeModel(DonutChartModel caseByFinishedTimeModel) { - this.caseByFinishedTimeModel = caseByFinishedTimeModel; - } - - public BarChartModel getCasesByCategoryModel() { - return casesByCategoryModel; - } - - public void setCasesByCategoryModel(BarChartModel casesByCategoryModel) { - this.casesByCategoryModel = casesByCategoryModel; - } - - public List populateCustomStringFieldAutoComplete(String query) { - Map params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); - String fieldName = params.get("fieldName"); - return statisticService.getCustomFields(fieldName, query); - } - - public void setCustomFieldFilter(String customFieldName, List values) { - this.customFieldFilters.put(customFieldName, values); - } - - public long getStatisticChartScalingInterval() { - String statisticChartScalingInterval = GlobalSettingService.getInstance().findGlobalSettingValue(GlobalVariable.STATISTIC_CHART_SCALING_INTERVAL); - return StringUtils.isNotBlank(statisticChartScalingInterval) ? Long.valueOf(statisticChartScalingInterval) : 0; - } - - public int getMinimumStatisticChartScalingInterval() { - return MINIMUM_STATISTIC_CHART_SCALING_INTERVAL; - } -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/StatisticDashboardBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/StatisticDashboardBean.java deleted file mode 100644 index d4555dbf550..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/StatisticDashboardBean.java +++ /dev/null @@ -1,268 +0,0 @@ -package ch.ivy.addon.portalkit.bean; - -import java.io.Serializable; -import java.text.DateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Locale; - -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; - -import org.apache.commons.lang3.StringUtils; -import org.primefaces.event.ItemSelectEvent; -import org.primefaces.model.charts.donut.DonutChartModel; - -import ch.ivy.addon.portalkit.dto.DisplayName; -import ch.ivy.addon.portalkit.enums.StatisticChartType; -import ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection; -import ch.ivy.addon.portalkit.ivydata.bo.IvyLanguage; -import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService; -import ch.ivy.addon.portalkit.jsf.Attrs; -import ch.ivy.addon.portalkit.service.DateTimeGlobalSettingService; -import ch.ivy.addon.portalkit.service.StatisticService; -import ch.ivy.addon.portalkit.statistics.StatisticChart; -import ch.ivy.addon.portalkit.statistics.StatisticChartDrilldownUtils; -import ch.ivy.addon.portalkit.statistics.StatisticFilter; -import ch.ivyteam.ivy.environment.Ivy; - -@ManagedBean -@ViewScoped -public class StatisticDashboardBean implements Serializable { - private static final long serialVersionUID = 1L; - private static final int YEAR_CHART_WIDTH = 750; - private static final int MONTH_CHART_WIDTH = 500; - private static final int WEEK_CHART_WIDTH = 600; - private static final int DAY_CHART_WIDTH = 500; - private static final String GREATER_EQUAL = ">= %s"; - private static final String LESS_EQUAL = "<= %s"; - private static final String DASH = "%s - %s"; - private StatisticService statisticService = StatisticService.getInstance(); - private ItemSelectEvent taskByExpiryItemSelectEvent; - private ItemSelectEvent casesByCategoryItemSelectEvent; - - public String getChartWidthStyle(List chartList) { - List chartIdSuffixes = new ArrayList<>(); - for (StatisticChart chart : chartList) { - String chartId = chart.getId(); - if (chartId.contains("_")) { - // chart with format: id + _ + suffix is lower level (month/week/day/hour) - // chart when drilldown - chartIdSuffixes.add(chartId.substring(chartId.indexOf('_') + 1)); - } - } - int maxWidth = 0; - for (String suffix : chartIdSuffixes) { - if (StatisticService.selectThisYear(suffix)) { - maxWidth = Math.max(maxWidth, YEAR_CHART_WIDTH); - } else if (StatisticService.selectWeekOfMonth(suffix)) { - maxWidth = Math.max(maxWidth, WEEK_CHART_WIDTH); - } else if (StatisticService.selectMonthOfYear(suffix)) { - maxWidth = Math.max(maxWidth, MONTH_CHART_WIDTH); - } else if (StatisticService.selectDayOfWeek(suffix)) { - maxWidth = Math.max(maxWidth, DAY_CHART_WIDTH); - } - } - if (maxWidth > 0) { - return String.format("width: %spx", maxWidth); - } - return ""; - } - - public void drilldownTaskByPriority(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - StatisticChartDrilldownUtils.drilldownTaskByPriority(event, selectedStatisticChart); - } - - public void drilldownCaseByState(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - StatisticChartDrilldownUtils.drilldownCaseByState(event, selectedStatisticChart); - } - - public void drilldownElapsedTime(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - StatisticChartDrilldownUtils.drilldownElapsedTime(event, selectedStatisticChart); - } - - public void onSelectDrilldownTaskByExpiry(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - taskByExpiryItemSelectEvent = event; - StatisticChartDrilldownUtils.onSelectDrilldownTaskByExpiry(event, selectedStatisticChart); - } - - public void toTaskByExpiryTaskList(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - StatisticChartDrilldownUtils.toTaskByExpiryTaskList(event, selectedStatisticChart); - } - - // It's used for "Go to task list" selection from Statistic Dashboard - public void goToExpiriedTaskList() { - toTaskByExpiryTaskList(taskByExpiryItemSelectEvent); - releaseJSFEvent(); - } - - public void drilldownTaskByExpiry() { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(taskByExpiryItemSelectEvent); - StatisticChartDrilldownUtils.drilldownTaskByExpiry(taskByExpiryItemSelectEvent, selectedStatisticChart); - releaseJSFEvent(); - } - - public void drilldownCasesByCategory() { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(casesByCategoryItemSelectEvent); - StatisticChartDrilldownUtils.drilldownCasesByCategory(casesByCategoryItemSelectEvent, selectedStatisticChart); - releaseJSFEvent(); - } - - public void onSelectDrilldownCasesByCategory(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - casesByCategoryItemSelectEvent = event; - StatisticChartDrilldownUtils.onSelectDrilldownCasesByCategory(event, selectedStatisticChart); - } - - //It's used for "Go to case list" selection from Statistic Dashboard - public void goToCasesByCategoryList() { - toCasesByCategoryList(casesByCategoryItemSelectEvent); - releaseJSFEvent(); - } - - public void toCasesByCategoryList(ItemSelectEvent event) { - StatisticChart selectedStatisticChart = getSelectedStatisticChart(event); - StatisticChartDrilldownUtils.toCasesByCategoryCaseList(event, selectedStatisticChart); - } - - private void releaseJSFEvent() { - // Do not store JSF Event in a JSF bean that is not bound to request scope - this.taskByExpiryItemSelectEvent = null; - this.casesByCategoryItemSelectEvent = null; - } - - public StatisticChart createDefaultEmptyChart() { - StatisticChart emptyChart = new StatisticChart(); - emptyChart.setNames(generateNamesForEmptyChart()); - emptyChart.setType(StatisticChartType.TASK_BY_PRIORITY); - StatisticService service = StatisticService.getInstance(); - DonutChartModel model = service.createDonutChartPlaceholder(); - model.getOptions().getTitle().setText(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/emptystate/defaultEmptyMessages")); - emptyChart.setDonutChartModel(model); - return emptyChart; - } - - private List generateNamesForEmptyChart() { - List namesForEmptyChart = new ArrayList<>(); - IvyLanguage ivyLanguage = LanguageService.getInstance().getIvyLanguageOfUser(); - for (String language : ivyLanguage.getSupportedLanguages()) { - DisplayName name = new DisplayName(); - name.setLocale(Locale.forLanguageTag(language)); - name.setValue(Ivy.cms().coLocale(("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/statistics"), language)); - namesForEmptyChart.add(name); - } - return namesForEmptyChart; - } - - private static StatisticChart getSelectedStatisticChart(ItemSelectEvent event) { - String selectedChartId = (String) event.getComponent().getAttributes().get("selectedChartId"); - List statisticCharts = - Attrs.currentContext().getAttribute("#{data.statisticChartList}", List.class); - for (StatisticChart chart : statisticCharts) { - if (chart.getId() == selectedChartId) { - return chart; - } - } - return null; - } - - public String concatCreatedDate(StatisticFilter filter) { - StatisticTimePeriodSelection timeSelection = filter.getTimePeriodSelection(); - if (timeSelection != StatisticTimePeriodSelection.CUSTOM) { - return timeSelection.getLabel(); - } - - Date createdDateForm = filter.getCreatedDateFrom(); - Date createdDateTo = filter.getCreatedDateTo(); - DateFormat formatter = DateTimeGlobalSettingService.getInstance().getDefaultDateTimeFormatter(); - - if (createdDateForm != null && createdDateTo != null) { - return String.format(DASH, formatter.format(createdDateForm), formatter.format(createdDateTo)); - } - - if (createdDateForm != null) { - return String.format(GREATER_EQUAL, formatter.format(createdDateForm)); - } - - if (createdDateTo != null) { - return String.format(LESS_EQUAL, formatter.format(createdDateTo)); - } - - return StringUtils.EMPTY; - } - - public boolean isChartModelNotInitialized(List statisticChartList) { - for (StatisticChart statisticChart : statisticChartList) { - if (statisticChart.getBarChartModel() == null && statisticChart.getDonutChartModel() == null) { - return true; - } - } - return false; - } - - public boolean isTaskByPriority(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isTaskByPriority(statisticChart); - } - - public boolean isTaskByExpiry(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isTaskByExpiry(statisticChart); - } - - public boolean isTaskByExpiryHour(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isTaskByExpiryHour(statisticChart); - } - - public boolean isCaseByState(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isCaseByState(statisticChart); - } - - public boolean isCaseByFinishedTask(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isCaseByFinishedTask(statisticChart); - } - - public boolean isCaseByFinishedTime(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isCaseByFinishedTime(statisticChart); - } - - public boolean isElapsedTimeByCaseCategory(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isElapsedTimeByCaseCategory(statisticChart); - } - - public boolean isCasesByCategory(StatisticChart statisticChart) { - if (statisticChart == null) { - return false; - } - return statisticService.isCasesByCategory(statisticChart); - } - - public String getId(StatisticChart chart) { - return chart.getId(); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/TaskAnalysisWidgetBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/TaskAnalysisWidgetBean.java deleted file mode 100644 index cc917cfdec7..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/TaskAnalysisWidgetBean.java +++ /dev/null @@ -1,113 +0,0 @@ -package ch.ivy.addon.portalkit.bean; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -import javax.annotation.PostConstruct; -import javax.faces.bean.ManagedBean; -import javax.faces.bean.ViewScoped; - -import org.primefaces.event.ToggleEvent; -import org.primefaces.model.SortMeta; -import org.primefaces.model.Visibility; - -import ch.ivy.addon.portalkit.datamodel.internal.TaskAnalysisLazyDataModel; -import ch.ivy.addon.portalkit.enums.TaskAndCaseAnalysisColumn; -import ch.ivy.addon.portalkit.exporter.Exporter; -import ch.ivy.addon.portalkit.service.GlobalSettingService; -import ch.ivy.addon.portalkit.service.TaskAnalysisFilterService; -import ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData; -import ch.ivy.addon.portalkit.util.SortFieldUtil; -import ch.ivyteam.ivy.environment.Ivy; - -@ManagedBean -@ViewScoped -public class TaskAnalysisWidgetBean implements Serializable { - - private static final long serialVersionUID = 1L; - private TaskAnalysisLazyDataModel dataModel; - private Map columns; - private boolean isHideCaseCreator; - private boolean isCaseOwnerEnabled; - - public TaskAnalysisWidgetBean() { - } - - @PostConstruct - public void init() { - isCaseOwnerEnabled = GlobalSettingService.getInstance().isCaseOwnerEnabled(); - isHideCaseCreator = GlobalSettingService.getInstance().isHideCaseCreator(); - Ivy.log().error(isHideCaseCreator); - columns = new HashMap<>(); - for(TaskAndCaseAnalysisColumn column : TaskAndCaseAnalysisColumn.values()) { - if (column.name().equals(TaskAndCaseAnalysisColumn.CASE_CREATOR.name()) - && isHideCaseCreator) { - columns.put(column.name(), false); - } - columns.put(column.name(), column.isDefaultColumn()); - } - - } - - public TaskAnalysisLazyDataModel getDataModel() { - return dataModel; - } - - public void setDataModel(TaskAnalysisLazyDataModel dataModel) { - this.dataModel = dataModel; - } - - public boolean isDeleteFilterEnabledFor(TaskAnalysisFilterData filterData) { - TaskAnalysisFilterService filterService = new TaskAnalysisFilterService(); - return filterService.isDeleteFilterEnabledFor(filterData); - } - - public void onToggleColumns(ToggleEvent e) { - TaskAndCaseAnalysisColumn toggledColumn = TaskAndCaseAnalysisColumn.values()[(Integer) e.getData()]; - if (isHideCaseCreator() && TaskAndCaseAnalysisColumn.CASE_CREATOR.equals(toggledColumn)) { - toggledColumn = TaskAndCaseAnalysisColumn.CASE_STATE; - } - - // If the selected column has index of "Case Owner" column - // but the case owner feature is disabled - // shift the selected column to "Application" - if (!isCaseOwnerEnabled() && TaskAndCaseAnalysisColumn.CASE_OWNER.equals(toggledColumn)) { - toggledColumn = TaskAndCaseAnalysisColumn.APPLICATION; - } - columns.put(toggledColumn.name(), e.getVisibility() == Visibility.VISIBLE); - } - - public Map getColumns() { - return columns; - } - - public void setColumns(Map columns) { - this.columns = columns; - } - - public int getMaxTaskNumberInExcel() { - return Exporter.MAX_ROW_NUMBER_IN_EXCEL; - } - - - public boolean isHideCaseCreator() { - return isHideCaseCreator; - } - - public void setHideCaseCreator(boolean isHideCaseCreator) { - this.isHideCaseCreator = isHideCaseCreator; - } - - public boolean isCaseOwnerEnabled() { - return isCaseOwnerEnabled; - } - - public void setCaseOwnerEnabled(boolean isCaseOwnerEnabled) { - this.isCaseOwnerEnabled = isCaseOwnerEnabled; - } - - public SortMeta getSortByTaskName() { - return SortFieldUtil.buildSortMeta("TASK_NAME", false); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/casefilter/impl/CaseCategoryFilter.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/casefilter/impl/CaseCategoryFilter.java index e1facab3d3c..b5c1a20fa09 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/casefilter/impl/CaseCategoryFilter.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/casefilter/impl/CaseCategoryFilter.java @@ -32,7 +32,7 @@ public class CaseCategoryFilter extends CaseFilter { @Override public String label() { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/caseCategory"); + return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/caseCategory"); } @Override diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/casefilter/impl/TaskAnalysisCaseFilterContainer.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/casefilter/impl/TaskAnalysisCaseFilterContainer.java deleted file mode 100644 index 34a91d7aeab..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/casefilter/impl/TaskAnalysisCaseFilterContainer.java +++ /dev/null @@ -1,14 +0,0 @@ -package ch.ivy.addon.portalkit.casefilter.impl; - -import java.util.Collections; - -import ch.ivy.addon.portalkit.comparator.CaseFilterComparator; - -public class TaskAnalysisCaseFilterContainer extends DefaultCaseFilterContainer { - - public TaskAnalysisCaseFilterContainer() { - super(); - Collections.sort(filters, new CaseFilterComparator()); - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/converter/StatisticConverter.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/converter/StatisticConverter.java deleted file mode 100644 index bd136d4feb2..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/converter/StatisticConverter.java +++ /dev/null @@ -1,30 +0,0 @@ -package ch.ivy.addon.portalkit.converter; - -import javax.faces.convert.FacesConverter; - -import ch.ivy.addon.portalkit.statistics.StatisticChart; - -@FacesConverter("statisticConverter") -public class StatisticConverter extends AbstractConverter { - - @Override - protected Class getType() { - return StatisticConverter.class; - } - - @Override - protected boolean isEmptyObject(Object item) { - if (item == null || !(item instanceof StatisticChart)) { - return false; - } - var chart = (StatisticChart) item; - return chart.getType() == null && chart.getNames() == null; - } - - @Override - protected StatisticChart createNewObject(String selectedValue) { - var newChart = new StatisticChart(); - newChart.setName(selectedValue); - return newChart; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/internal/ElapsedTimeLazyDataModel.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/internal/ElapsedTimeLazyDataModel.java deleted file mode 100644 index 3936cca0a30..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/internal/ElapsedTimeLazyDataModel.java +++ /dev/null @@ -1,172 +0,0 @@ -package ch.ivy.addon.portalkit.datamodel.internal; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import org.apache.commons.lang3.StringUtils; -import org.primefaces.model.FilterMeta; -import org.primefaces.model.LazyDataModel; -import org.primefaces.model.SortMeta; -import org.primefaces.model.SortOrder; - -import ch.ivy.addon.portalkit.bean.IvyComponentLogicCaller; -import ch.ivy.addon.portalkit.constant.PortalConstants; -import ch.ivy.addon.portalkit.enums.CaseSortField; -import ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria; -import ch.ivy.addon.portalkit.jsf.Attrs; -import ch.ivy.addon.portalkit.util.PermissionUtils; -import ch.ivyteam.ivy.jsf.primefaces.sort.SortMetaConverter; -import ch.ivyteam.ivy.process.call.SubProcessCall; -import ch.ivyteam.ivy.workflow.CaseState; -import ch.ivyteam.ivy.workflow.ICase; -import ch.ivyteam.ivy.workflow.query.CaseQuery; -import ch.ivyteam.ivy.workflow.query.CaseQuery.OrderByColumnQuery; - -public class ElapsedTimeLazyDataModel extends LazyDataModel { - private static final long serialVersionUID = 1L; - protected final List data; - - protected String caseWidgetComponentId; - protected int rowIndex; - protected CaseSearchCriteria criteria; - public ElapsedTimeLazyDataModel() { - this("statistics-widget:statistic-dashboard-widget:elapsed-time-chart-details"); - } - - public ElapsedTimeLazyDataModel(String caseWidgetComponentId) { - super(); - data = new ArrayList<>(); - this.caseWidgetComponentId = caseWidgetComponentId; - buildCriteria(); - } - - @Override - public List load(int first, int pageSize, Map sortBy, Map filterBy) { - SortMetaConverter sort = new SortMetaConverter(sortBy); - criteria.setSortField(sort.toField()); - criteria.setSortDescending(sort.toOrder() == SortOrder.DESCENDING); - if (first == 0) { - initializedDataModel(); - } - List foundCases = findCases(criteria, first, pageSize); - data.addAll(foundCases); - return foundCases; - } - - /** - * Builds and converts CaseQuery to JsonQuery and put it into CaseSearchCriteria. - */ - protected void buildQueryToSearchCriteria() { - if (criteria.getCustomCaseQuery() == null) { - CaseQuery customCaseQuery = SubProcessCall.withPath(PortalConstants.BUILD_CASE_QUERY_CALLABLE) - .withStartSignature("buildCaseQuery()") - .call() - .get("caseQuery", CaseQuery.class); - criteria.setCustomCaseQuery(customCaseQuery); - } - CaseQuery caseQuery = buildCaseQuery(); - - /** - * Filter CaseSearchCriteria with noCategory - */ - if (StringUtils.isEmpty(criteria.getCategory())) { - caseQuery.where().and().category().isEqual(""); - } - buildSortCaseQuery(caseQuery); - this.criteria.setFinalCaseQuery(caseQuery); - } - - - private CaseQuery buildCaseQuery() { - return criteria.createQuery(); - } - - private List findCases(CaseSearchCriteria criteria, int first, int pageSize) { - IvyComponentLogicCaller> findCaseCaller = new IvyComponentLogicCaller<>(); - int startIndex = first; - int count = pageSize; - if (startIndex < 0) { - startIndex = 0; - count = first + pageSize; - } - String componentId = Attrs.currentContext().getBuildInAttribute("clientId"); - return findCaseCaller.invokeComponentLogic(componentId, "#{logic.findCases}", - new Object[] {criteria, startIndex, count}); - } - - private void initializedDataModel() { - data.clear(); - buildQueryToSearchCriteria(); - setRowCount(getCaseCount(criteria)); - } - - private int getCaseCount(CaseSearchCriteria criteria) { - IvyComponentLogicCaller countCaseCaller = new IvyComponentLogicCaller<>(); - String componentId = Attrs.currentContext().getBuildInAttribute("clientId"); - Long caseCount = countCaseCaller.invokeComponentLogic(componentId, "#{logic.countCases}", new Object[] { criteria }); - return caseCount.intValue(); - } - - private void buildCriteria() { - criteria = new CaseSearchCriteria(); - criteria.setBusinessCase(true); - criteria.setIncludedStates(new ArrayList<>(Arrays.asList(CaseState.DONE))); - criteria.setSortField(CaseSortField.ID.toString()); - criteria.setSortDescending(true); - criteria.setAdminQuery(PermissionUtils.checkReadAllCasesPermission()); - } - - private void buildSortCaseQuery(CaseQuery caseQuery) { - CaseSortField sortColumn = CaseSortField.valueOf(criteria.getSortField()); - OrderByColumnQuery orderQuery = null; - if (sortColumn.equals(CaseSortField.ELAPSED_TIME)) { - orderQuery = caseQuery.orderBy().businessRuntime(); - if (criteria.isSortDescending()) { - orderQuery.descending(); - } else { - orderQuery.ascending(); - } - } - } - - public void setCategory(String category) { - criteria.setCategory(category); - } - - public CaseSearchCriteria getCriteria() { - return criteria; - } - - public void setCriteria(CaseSearchCriteria criteria) { - this.criteria = criteria; - } - - @Override - public void setRowIndex(int index) { - int idx = index; - if (idx >= data.size()) { - idx = -1; - } - this.rowIndex = idx; - } - - @Override - public ICase getRowData() { - return data.get(rowIndex); - } - - @Override - public boolean isRowAvailable() { - if (data == null) { - return false; - } - return rowIndex >= 0 && rowIndex < data.size(); - } - - @Override - public int count(Map filterBy) { - return 0; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/internal/TaskAnalysisLazyDataModel.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/internal/TaskAnalysisLazyDataModel.java deleted file mode 100644 index 87668085503..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/datamodel/internal/TaskAnalysisLazyDataModel.java +++ /dev/null @@ -1,455 +0,0 @@ -package ch.ivy.addon.portalkit.datamodel.internal; - -import static ch.ivy.addon.portalkit.enums.FilterType.ALL_ADMINS; -import static ch.ivy.addon.portalkit.enums.FilterType.ALL_USERS; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.faces.event.ValueChangeEvent; - -import org.apache.commons.beanutils.BeanUtils; -import org.apache.commons.collections.CollectionUtils; -import org.primefaces.model.FilterMeta; -import org.primefaces.model.SortMeta; -import org.primefaces.model.SortOrder; - -import ch.ivy.addon.portalkit.casefilter.CaseFilter; -import ch.ivy.addon.portalkit.casefilter.CaseFilterContainer; -import ch.ivy.addon.portalkit.casefilter.impl.TaskAnalysisCaseFilterContainer; -import ch.ivy.addon.portalkit.constant.PortalConstants; -import ch.ivy.addon.portalkit.datamodel.TaskLazyDataModel; -import ch.ivy.addon.portalkit.enums.CaseSortField; -import ch.ivy.addon.portalkit.enums.FilterType; -import ch.ivy.addon.portalkit.enums.TaskAndCaseAnalysisColumn; -import ch.ivy.addon.portalkit.enums.TaskSortField; -import ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria; -import ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria; -import ch.ivy.addon.portalkit.service.TaskAnalysisFilterService; -import ch.ivy.addon.portalkit.taskfilter.TaskFilter; -import ch.ivy.addon.portalkit.taskfilter.TaskFilterContainer; -import ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData; -import ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisTaskFilterContainer; -import ch.ivy.addon.portalkit.taskfilter.impl.TaskFilterData; -import ch.ivy.addon.portalkit.util.PermissionUtils; -import ch.ivy.addon.portalkit.util.UserUtils; -import ch.ivyteam.ivy.business.data.store.BusinessDataInfo; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.jsf.primefaces.sort.SortMetaConverter; -import ch.ivyteam.ivy.process.call.SubProcessCall; -import ch.ivyteam.ivy.workflow.ITask; -import ch.ivyteam.ivy.workflow.query.CaseQuery; -import ch.ivyteam.ivy.workflow.query.TaskQuery; -import ch.ivyteam.ivy.workflow.query.TaskQuery.IFilterQuery; -import ch.ivyteam.ivy.workflow.query.TaskQuery.OrderByColumnQuery; - -public class TaskAnalysisLazyDataModel extends TaskLazyDataModel { - - private static final long serialVersionUID = -6615871274830927272L; - - private static final String TASK_COLUMN_PREFIX = "TASK_"; - - private TaskAnalysisFilterData selectedTaskAnalysisFilterData; - private TaskAnalysisFilterData defaultTaskAnalysisFilterData; - - private CaseSearchCriteria caseCriteria; - private List caseFilters; - private List selectedCaseFilters; - private List oldSelectedCaseFilters = new ArrayList<>(); - private CaseFilterContainer caseFilterContainer; - - public TaskAnalysisLazyDataModel() { - super(); - isNotKeepFilter = true; - selectedCaseFilters = new ArrayList<>(); - buildCaseCriteria(); - buildDefaultTaskAnalysisFilterData(); - } - - public TaskAnalysisFilterData buildDefaultTaskAnalysisFilterData() { - if (defaultTaskAnalysisFilterData == null) { - defaultTaskAnalysisFilterData = new TaskAnalysisFilterData(); - defaultTaskAnalysisFilterData.setFilterName(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/taskList/defaultFilter")); - defaultTaskAnalysisFilterData.setType(FilterType.DEFAULT); - collectFiltersForDefaultFilterSet(); - } - isSelectedDefaultFilter = isSelectedDefaultFilter == null ? true : isSelectedDefaultFilter; - return defaultTaskAnalysisFilterData; - } - - @Override - public TaskFilterData buildDefaultTaskFilterData() { - return null; - } - - @Override - public void initFilterContainer() { - filterContainer = new TaskAnalysisTaskFilterContainer(criteria.isAdminQuery()); - } - - @Override - public List load(int first, int pageSize, Map sortBy, Map filterBy) { - SortMetaConverter sort = new SortMetaConverter(sortBy); - criteria.setSortField(sort.toField()); - criteria.setSortDescending(sort.toOrder() == SortOrder.DESCENDING); - - if (first == 0) { - initializedDataModel(criteria); - } - - List foundTasks = findTasks(criteria, first, pageSize); - data.addAll(foundTasks); - return foundTasks; - } - - @Override - protected void buildCriteria() { - criteria = new TaskSearchCriteria(); - criteria.setIncludedStates(new ArrayList<>(TaskSearchCriteria.STANDARD_STATES)); - criteria.setSortField(TaskSortField.ID.toString()); - criteria.setSortDescending(true); - } - - public List getTaskFilters() { - return filters; - } - - public List getSelectedTaskFilters() { - return selectedFilters; - } - - public void setSelectedTaskFilters(List selectedFilters) { - this.selectedFilters = selectedFilters; - } - - public TaskFilterContainer getTaskFilterContainer() { - return filterContainer; - } - - public void setTaskFilterContainer(TaskFilterContainer filterContainer) { - this.filterContainer = filterContainer; - } - - public TaskAnalysisFilterData getSelectedTaskAnalysisFilterData() { - return selectedTaskAnalysisFilterData; - } - - public void setSelectedTaskAnalysisFilterData(TaskAnalysisFilterData selectedTaskAnalysisFilterData) { - this.selectedTaskAnalysisFilterData = selectedTaskAnalysisFilterData; - } - - @Override - public void onFilterApply() { - selectedTaskAnalysisFilterData = null; - isSelectedDefaultFilter = false; - } - @Override - public void removeFilter(TaskFilter filter) { - filter.resetValues(); - selectedFilters.remove(filter); - updateSelectedFilter(); - } - - public void removeFilter(CaseFilter filter) { - filter.resetValues(); - selectedCaseFilters.remove(filter); - updateSelectedFilter(); - } - - @Override - public void resetFilters() { - for (TaskFilter selectedFilter : selectedFilters) { - selectedFilter.resetValues(); - } - for (CaseFilter selectedCaseFilter : selectedCaseFilters) { - selectedCaseFilter.resetValues(); - } - selectedFilters = new ArrayList<>(); - selectedCaseFilters = new ArrayList<>(); - selectedTaskAnalysisFilterData = null; - isSelectedDefaultFilter = false; - } - - public boolean isSameTaskFilterData(TaskAnalysisFilterData filterToBeRemoved) { - if (filterToBeRemoved == null || selectedTaskAnalysisFilterData == null) { - return false; - } - return filterToBeRemoved.getFilterGroupId().equals(selectedTaskAnalysisFilterData.getFilterGroupId()) - && filterToBeRemoved.getType() == selectedTaskAnalysisFilterData.getType() - && filterToBeRemoved.getFilterName().equals(selectedTaskAnalysisFilterData.getFilterName()); - } - - /** - * Save all filter settings to business data - * - * @param filterName - * @param filterType - * @param taskFilterGroupId - * @return TaskAnalysisFilterData - */ - public TaskAnalysisFilterData saveTaskAnalysisFilter(String filterName, FilterType filterType, Long taskFilterGroupId) { - TaskAnalysisFilterData taskAnalysisFilterData = new TaskAnalysisFilterData(); - List taskFiltersToSave = new ArrayList<>(selectedFilters); - taskAnalysisFilterData.setTaskFilters(taskFiltersToSave); - List filtersToSave = new ArrayList<>(selectedCaseFilters); - taskAnalysisFilterData.setCaseFilters(filtersToSave); - taskAnalysisFilterData.setUserId(Ivy.session().getSessionUser().getId()); - taskAnalysisFilterData.setSecurityMemberId(Ivy.session().getSessionUser().getSecurityMemberId()); - taskAnalysisFilterData.setFilterGroupId(taskFilterGroupId); - taskAnalysisFilterData.setFilterName(filterName); - taskAnalysisFilterData.setType(filterType); - boolean isPublic = ALL_USERS == taskAnalysisFilterData.getType() || ALL_ADMINS == taskAnalysisFilterData.getType(); - taskAnalysisFilterData.setIsPublic(isPublic); - TaskAnalysisFilterService taskFilterService = new TaskAnalysisFilterService(); - taskFilterService.save(taskAnalysisFilterData); - BusinessDataInfo info = taskFilterService.save(taskAnalysisFilterData); - taskAnalysisFilterData = taskFilterService.findById(info.getId()); - return taskAnalysisFilterData; - } - - /** - * Apply filter settings loaded from business data to this {@link #TaskAnalysisLazyDataModel} - * - * @param taskAnalysisFilterData - * @throws ReflectiveOperationException - */ - public void applyFilter(TaskAnalysisFilterData taskAnalysisFilterData) throws ReflectiveOperationException { - isSelectedDefaultFilter = FilterType.DEFAULT.equals(taskAnalysisFilterData.getType()); - selectedTaskAnalysisFilterData = taskAnalysisFilterData; - new TaskAnalysisFilterService().applyFilter(this, taskAnalysisFilterData); - } - - /** - * Builds TaskQuery and put it into TaskSearchCriteria. - */ - @Override - protected void buildQueryToSearchCriteria() { - if (criteria.getCustomTaskQuery() == null) { - TaskQuery taskQuery = SubProcessCall.withPath(PortalConstants.BUILD_TASK_QUERY_CALLABLE) - .withStartSignature("buildTaskQuery()") - .call() - .get("taskQuery", TaskQuery.class); - criteria.setCustomTaskQuery(taskQuery); - } - - if (filterContainer != null) { - if (selectedFilters.contains(filterContainer.getStateFilter())) { - criteria.setIncludedStates(new ArrayList<>()); - } else { - criteria.setIncludedStates(filterContainer.getStateFilter().getSelectedFilteredStates()); - } - } - if (caseFilterContainer != null) { - if (selectedCaseFilters.contains(caseFilterContainer.getStateFilter())) { - caseCriteria.setIncludedStates(new ArrayList<>()); - } else { - caseCriteria.setIncludedStates(caseFilterContainer.getStateFilter().getSelectedFilteredStates()); - } - } - - TaskQuery taskQuery = buildTaskQuery(); - if (CollectionUtils.isNotEmpty(selectedCaseFilters)) { - CaseQuery caseQuery = buildCaseQuery(); - taskQuery = taskQuery.where().cases(caseQuery); - } - - String sortField = criteria.getSortField(); - if (sortField.startsWith(TASK_COLUMN_PREFIX)) { - buildSortTaskQuery(taskQuery); - } - - extendSort(taskQuery); - criteria.setFinalTaskQuery(taskQuery); - } - - @Override - protected TaskQuery buildTaskQuery() { - TaskQuery taskQuery = criteria.createQuery(); - IFilterQuery filterQuery = taskQuery.where(); - selectedFilters.forEach(selectedFilter -> { - TaskQuery subQuery = selectedFilter.buildQuery(); - if (subQuery != null) { - filterQuery.and(subQuery); - } - }); - return taskQuery; - } - - private CaseQuery buildCaseQuery() { - CaseQuery caseQuery = caseCriteria.createQuery(); - CaseQuery.IFilterQuery filterQuery = caseQuery.where(); - selectedCaseFilters.forEach(selectedFilter -> { - CaseQuery subQuery = selectedFilter.buildQuery(); - if (subQuery != null) { - filterQuery.and(subQuery); - } - }); - return caseQuery; - } - - private void buildSortTaskQuery(TaskQuery taskQuery) { - TaskAndCaseAnalysisColumn sortColumn = TaskAndCaseAnalysisColumn.valueOf(criteria.getSortField()); - OrderByColumnQuery orderQuery = switch (sortColumn) { - case TASK_ACTIVATOR -> taskQuery.orderBy().activatorDisplayName(); - case TASK_CATEGORY -> taskQuery.orderBy().category(); - case TASK_CREATION_TIME -> taskQuery.orderBy().startTimestamp(); - case TASK_EXPIRY_TIME -> taskQuery.orderBy().expiryTimestamp(); - case TASK_FINISHED_TIME -> taskQuery.orderBy().endTimestamp(); - case TASK_NAME -> taskQuery.orderBy().name(); - case TASK_PRIORITY -> taskQuery.orderBy().priority(); - case TASK_STATE -> taskQuery.orderBy().state(); - case TASK_WORKER -> taskQuery.orderBy().workerUserDisplayName(); - default -> taskQuery.orderBy().taskId(); - }; - - if (sortColumn == TaskAndCaseAnalysisColumn.TASK_EXPIRY_TIME) { - if (criteria.isSortDescending()) { - orderQuery.descendingNullFirst(); - } else { - orderQuery.ascendingNullLast(); - } - return; - } - - if (criteria.isSortDescending()) { - orderQuery.descending(); - } else { - orderQuery.ascending(); - } - } - - @Override - public void initFilters() throws ReflectiveOperationException { - super.initFilters(); - initCaseFilters(); - if (isNotKeepFilter) { - applyFilter(defaultTaskAnalysisFilterData); - } - } - - @Override - public void collectFiltersForDefaultFilterSet() { - defaultTaskAnalysisFilterData.setTaskFilters(new ArrayList<>()); - defaultTaskAnalysisFilterData.setCaseFilters(new ArrayList<>()); - } - - @Override - public void checkToApplyDefaultSet() { - if (isNotKeepFilter && defaultTaskAnalysisFilterData != null) { - selectedFilters.addAll(defaultTaskAnalysisFilterData.getTaskFilters()); - } - } - - private void setValuesForCaseStateFilter(CaseSearchCriteria criteria) { - if (caseFilterContainer != null) { - caseFilterContainer.getStateFilter().setFilteredStates(new ArrayList<>(criteria.getIncludedStates())); - caseFilterContainer.getStateFilter().setSelectedFilteredStates(criteria.getIncludedStates()); - } - } - - @SuppressWarnings("unchecked") - public void onCaseFilterChange(ValueChangeEvent event) { - oldSelectedCaseFilters = (List) event.getOldValue(); - } - - @SuppressWarnings("unchecked") - @Override - public void updateSelectedFilter() { - List toggleFilters = (List) CollectionUtils.subtract(selectedFilters, oldSelectedFilters); - if (CollectionUtils.isNotEmpty(toggleFilters)) { - toggleFilters.forEach(filter -> filter.resetValues()); - } - resetFilterData(); - } - - public void resetFilterData() { - if (selectedTaskAnalysisFilterData != null) { - selectedTaskAnalysisFilterData = null; - } - this.isSelectedDefaultFilter = false; - } - - @SuppressWarnings("unchecked") - public void updateSelectedCaseFilter() { - List toggleFilters = - (List) CollectionUtils.subtract(selectedCaseFilters, oldSelectedCaseFilters); - if (CollectionUtils.isNotEmpty(toggleFilters)) { - toggleFilters.forEach(filter -> filter.resetValues()); - } - resetFilterData(); - } - - public List getSelectedCaseFilters() { - return selectedCaseFilters; - } - - public void setSelectedCaseFilters(List selectedCaseFilters) { - this.selectedCaseFilters = selectedCaseFilters; - } - - public CaseFilterContainer getCaseFilterContainer() { - return caseFilterContainer; - } - - public void setCaseFilterContainer(CaseFilterContainer caseFilterContainer) { - this.caseFilterContainer = caseFilterContainer; - } - - public List getCaseFilters() { - return caseFilters; - } - - protected void buildCaseCriteria() { - caseCriteria = new CaseSearchCriteria(); - caseCriteria.setBusinessCase(true); - caseCriteria.setIncludedStates(new ArrayList<>(CaseSearchCriteria.STANDARD_STATES)); - caseCriteria.extendStatesQueryByPermission(PermissionUtils.checkReadAllCasesPermission()); - caseCriteria.setSortField(CaseSortField.ID.toString()); - caseCriteria.setSortDescending(true); - } - - private void restoreSessionAdvancedCaseFilters() throws IllegalAccessException, InvocationTargetException { - if (!isNotKeepFilter) { - List sessionCaseFilters = UserUtils.getSessionCaseAdvancedFilterAttribute(); - for (CaseFilter filter : caseFilters) { - for (CaseFilter sessionCaseFilter : sessionCaseFilters) { - copyProperties(sessionCaseFilter, filter); - } - } - } else if (defaultTaskAnalysisFilterData != null) { - selectedCaseFilters.addAll(defaultTaskAnalysisFilterData.getCaseFilters()); - } - } - - private void copyProperties(CaseFilter sessionCaseFilter, CaseFilter filter) throws IllegalAccessException, - InvocationTargetException { - if (sessionCaseFilter.getClass() == filter.getClass()) { - BeanUtils.copyProperties(filter, sessionCaseFilter); - selectedCaseFilters.add(filter); - } -} - - protected void initCaseFilterContainer() { - caseFilterContainer = new TaskAnalysisCaseFilterContainer(); - } - - private void initCaseFilters() throws IllegalAccessException, InvocationTargetException { - if (caseFilterContainer == null) { - initCaseFilterContainer(); - caseFilters = caseFilterContainer.getFilters(); - setValuesForCaseStateFilter(caseCriteria); - restoreSessionAdvancedCaseFilters(); - } - } - - public TaskAnalysisFilterData getDefaultTaskAnalysisFilterData() { - return defaultTaskAnalysisFilterData; - } - - public void setDefaultTaskAnalysisFilterData(TaskAnalysisFilterData defaultTaskAnalysisFilterData) { - this.defaultTaskAnalysisFilterData = defaultTaskAnalysisFilterData; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/DashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/DashboardWidget.java index 13de4b3e52f..abb9fc4d04a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/DashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/DashboardWidget.java @@ -35,7 +35,6 @@ @Type(value = ImageProcessDashboardWidget.class, name = "image-process"), @Type(value = CompactProcessDashboardWidget.class, name = "compact-process"), @Type(value = CombinedProcessDashboardWidget.class, name = "combined-process"), - @Type(value = StatisticDashboardWidget.class, name = "statistic"), @Type(value = CustomDashboardWidget.class, name = "custom"), @Type(value = ProcessViewerDashboardWidget.class, name = "process-viewer"), @Type(value = WelcomeDashboardWidget.class, name = "welcome"), diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/StatisticDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/StatisticDashboardWidget.java deleted file mode 100644 index bcc63ccaef3..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/StatisticDashboardWidget.java +++ /dev/null @@ -1,128 +0,0 @@ -package ch.ivy.addon.portalkit.dto.dashboard; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.stream.Collectors; - -import org.apache.commons.collections4.CollectionUtils; -import org.primefaces.model.charts.bar.BarChartDataSet; -import org.primefaces.model.charts.donut.DonutChartDataSet; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; - -import ch.ivy.addon.portalkit.enums.DashboardWidgetType; -import ch.ivy.addon.portalkit.service.StatisticService; -import ch.ivy.addon.portalkit.statistics.StatisticChart; -import ch.ivy.addon.portalkit.statistics.StatisticChartConstants; - -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class StatisticDashboardWidget extends DashboardWidget { - - private static final long serialVersionUID = 1803106705231907546L; - private StatisticChart chart; - @JsonIgnore - private boolean isChartEmpty; - private boolean showFullscreenMode; - - public StatisticDashboardWidget() { - setShowFullscreenMode(true); - } - - public StatisticDashboardWidget(StatisticDashboardWidget widget) { - super(widget); - chart = widget.getChart(); - showFullscreenMode = widget.showFullscreenMode; - } - - @JsonIgnore - @Override - public void resetWidgetFilters() {} - - @Override - public DashboardWidgetType getType() { - return DashboardWidgetType.STATISTIC; - } - - @Override - public String getName() { - if (chart != null) { - var displayName = StatisticService.getInstance().getDisplayNameInUserLanguageForChart(chart); - if (displayName != null) { - return displayName.getValue(); - } - } - return super.getName(); - } - - @JsonIgnore - public void generateChartModel() { - if (chart != null) { - StatisticService.getInstance().generateChartModelForStatisticCharts(Arrays.asList(chart)); - isChartEmpty = isChartDataSetEmpty(); - } - } - - @JsonIgnore - private boolean isChartDataSetEmpty() { - if (chart == null) { - return true; - } - var dataset = new ArrayList(); - var donutChart = chart.getDonutChartModel(); - var barChart = chart.getBarChartModel(); - if (donutChart != null && donutChart.getData().getDataSet().size() == 1) { - var donutDataset = (DonutChartDataSet) donutChart.getData().getDataSet().get(0); - dataset.addAll(donutDataset.getData().stream() - .filter(data -> data.intValue() != 0) - .collect(Collectors.toList())); - } else if (barChart != null && barChart.getData().getDataSet().size() == 1) { - var barDataset = (BarChartDataSet) barChart.getData().getDataSet().get(0); - if(barDataset.getData() != null) { - dataset.addAll(barDataset.getData().stream() - .filter(data -> data.intValue() != 0) - .collect(Collectors.toList())); - } - } - return CollectionUtils.isEmpty(dataset); - } - - public StatisticChart getChart() { - return chart; - } - - public void setChart(StatisticChart chart) { - this.chart = chart; - } - - public boolean isChartEmpty() { - return isChartEmpty; - } - - public void setChartEmpty(boolean isChartEmpty) { - this.isChartEmpty = isChartEmpty; - } - - @JsonIgnore - public String getEmptyChartIcon() { - if (chart != null) { - if (chart.getDonutChartModel() != null) { - return StatisticChartConstants.DONUT_CHART_ICON; - } else if (chart.getBarChartModel() != null) { - return StatisticChartConstants.BAR_CHART_ICON; - } - } - return StatisticChartConstants.DEFAULT_CHART_ICON; - } - - @Override - public void cancelUserFilter() {} - - public void setShowFullscreenMode(boolean showFullscreenMode) { - this.showFullscreenMode = showFullscreenMode; - } - - public boolean isShowFullscreenMode() { - return showFullscreenMode; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java index d26aa5f599b..7f9192e04c9 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/BreadCrumbKind.java @@ -1,6 +1,6 @@ package ch.ivy.addon.portalkit.enums; public enum BreadCrumbKind { - HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, STATISTICS, EXPRESS, USER_PROFILE, EXPRESS_BUSINESS, + HOME, PROCESS, TASK, TASK_DETAIL, CASE_DETAIL, CASE, TECHNICAL_CASE, RELATED_TASK, EXPRESS, USER_PROFILE, EXPRESS_BUSINESS, ABSENCES_MANAGEMENT, DASHBOARD_CONFIGURATION, EDIT_DASHBOARD_DETAILS, PROCESS_VIEWER, PORTAL_MANAGEMENT, NOTIFICATION; } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/DashboardWidgetType.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/DashboardWidgetType.java index 942d804bb2e..7bba1a175b5 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/DashboardWidgetType.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/DashboardWidgetType.java @@ -3,7 +3,7 @@ import ch.ivyteam.ivy.environment.Ivy; public enum DashboardWidgetType { - TASK, CASE, PROCESS, STATISTIC, NEW, CUSTOM, PROCESS_VIEWER, WELCOME, NEWS, NOTIFICATION, CLIENT_STATISTIC; + TASK, CASE, PROCESS, NEW, CUSTOM, PROCESS_VIEWER, WELCOME, NEWS, NOTIFICATION, CLIENT_STATISTIC; public static DashboardWidgetType typeOf(String typeName) { for (DashboardWidgetType type : DashboardWidgetType.values()) { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java index 3c8c2fad2d3..c5ccfa83a5c 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/GlobalVariable.java @@ -35,7 +35,6 @@ public enum GlobalVariable { HIDE_SYSTEM_TASKS_FROM_HISTORY_ADMINISTRATOR("Portal.Histories.HideSystemTasksForAdministrator", GlobalVariableType.SELECTION, Option.FALSE.toString(), "hideSystemTasksFromHistoryAdministrator"), HIDE_SYSTEM_NOTES_FROM_HISTORY("Portal.Histories.HideSystemNotes", GlobalVariableType.SELECTION, Option.TRUE.toString(), "hideSystemNotesFromHistory"), HIDE_SYSTEM_NOTES_FROM_HISTORY_ADMINISTRATOR("Portal.Histories.HideSystemNotesForAdministrator", GlobalVariableType.SELECTION, Option.FALSE.toString(), "hideSystemNotesFromHistoryAdministrator"), - HIDE_STATISTIC_WIDGET("Portal.Dashboard.HideStatisticWidget", GlobalVariableType.SELECTION, Option.FALSE.toString(), "hideStatisticWidget"), ENABLE_GROUP_CHAT("Portal.Chat.EnableGroup", GlobalVariableType.SELECTION, Option.FALSE.toString(), "enableGroupChat"), ENABLE_PRIVATE_CHAT("Portal.Chat.EnablePrivate", GlobalVariableType.SELECTION, Option.FALSE.toString(), "enablePrivateChat"), CHAT_RESPONSE_TIMEOUT("Portal.Chat.ResponseTimeout", GlobalVariableType.NUMBER, "0", "chatResponseTimeout"), @@ -71,7 +70,6 @@ public enum GlobalVariable { HIDE_RELATED_CASE_INFO_FROM_HISTORY("Portal.Histories.HideRelatedCaseInfo", GlobalVariableType.SELECTION, Option.TRUE.toString(), "hideRelatedCaseInfoFromHistory"), SHOW_ERROR_LOG_TO_CONSOLE("Portal.ShowErrorLogToConsole", GlobalVariableType.SELECTION, Option.FALSE.toString(), "showErrorLogToConsole"), SHOW_AVATAR("Portal.ShowAvatar",GlobalVariableType.SELECTION,Option.TRUE.toString(),"showAvatar"), - STATISTIC_CHART_SCALING_INTERVAL("Portal.StatisticChartScalingInterval", GlobalVariableType.NUMBER, "0", "statisticChartScalingInterval"), ROLE_DIRECT_CHILDREN_LIMIT("Portal.RoleDirectChildrenLimit", GlobalVariableType.SELECTION, "50", "RoleDirectChildrenLimit", new Object[] { 10, 50, 100}), ROLE_PARENT_LIMIT("Portal.RoleParentLimit", GlobalVariableType.SELECTION, "10", "RoleParentLimit", new Object[] { 5, 10, 20}), SHOW_LOGIN_FOOTER("Portal.LoginPage.ShowFooter", GlobalVariableType.SELECTION, Option.TRUE.toString(), "ShowLoginPageFooter"), diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/MenuKind.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/MenuKind.java index d188a1e3bff..4b0a5a2dfa3 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/MenuKind.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/MenuKind.java @@ -1,7 +1,7 @@ package ch.ivy.addon.portalkit.enums; public enum MenuKind { - DASHBOARD, PROCESS, TASK, CASE, STATISTICS, CUSTOM, EXTERNAL_LINK, THIRD_PARTY; + DASHBOARD, PROCESS, TASK, CASE, CUSTOM, EXTERNAL_LINK, THIRD_PARTY; @Override public String toString() { diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java index 417178d46fb..03f6bebbb4a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalPermission.java @@ -15,13 +15,10 @@ public enum PortalPermission { DASHBOARD_SHARE_LINK("ShareDashboardLink", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), TASK_WRITE_ACTIVATOR_OWN_TASKS("TaskWriteActivatorOwnTasks", PortalPermissionGroup.TASK_PERMISSIONS_GROUP), TASK_DISPLAY_ADDITIONAL_OPTIONS("TaskDisplayAdditionalOptions", PortalPermissionGroup.TASK_PERMISSIONS_GROUP), - STATISTIC_ADD_DASHBOARD_CHART("StatisticAddDashboardChart", PortalPermissionGroup.STATISTIC_GROUP), - STATISTIC_ANALYZE_TASK("StatisticAnalyzeTask", PortalPermissionGroup.STATISTIC_GROUP), EXPRESS_CREATE_WORKFLOW("ExpressCreateWorkflow", PortalPermissionGroup.EXPRESS_GROUP), ACCESS_FULL_PROCESS_LIST("AccessFullProcessList", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), ACCESS_FULL_TASK_LIST("AccessFullTaskList", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), ACCESS_FULL_CASE_LIST("AccessFullCaseList", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), - ACCESS_FULL_STATISTICS_LIST("AccessFullStatisticsList", PortalPermissionGroup.GENERAL_PERMISSIONS_GROUP), SHOW_ALL_TASKS_OF_CASE("ShowAllTasksOfCase", PortalPermissionGroup.CASE_PERMISSIONS_GROUP), SHOW_CASE_DETAILS("ShowCaseDetails", PortalPermissionGroup.CASE_PERMISSIONS_GROUP), CASE_DETAILS_SHARE_LINK("ShareCaseDetailsLink", PortalPermissionGroup.CASE_PERMISSIONS_GROUP), diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java index af68f81ee96..3fcfc81a686 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/PortalVariable.java @@ -4,7 +4,6 @@ public enum PortalVariable { PASSWORD_VALIDATION("Portal.PasswordValidation"), ANNOUNCEMENT("Portal.Announcement"), THIRD_PARTY_APP("Portal.ThirdPartyApplications"), - STATISTIC_CHART("Portal.StatisticCharts"), WIDGET_FILTER("Portal.Dashboard.WidgetFilters"), EXTERNAL_LINK("Portal.Processes.ExternalLinks"), EXPRESS_PROCESS("Portal.Processes.ExpressProcesses"), diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/StatisticChartType.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/StatisticChartType.java deleted file mode 100644 index b3cfa7476f5..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/StatisticChartType.java +++ /dev/null @@ -1,34 +0,0 @@ -package ch.ivy.addon.portalkit.enums; - -public enum StatisticChartType { - TASK_BY_PRIORITY("/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByPriority", null, "taskByPriorityChartExtender"), - CASES_BY_STATE("/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByState", null, "caseByStateChartExtender"), - CASES_BY_FINISHED_TASK("/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTask", "/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTaskDescription", "caseByStateFinishTaskChartExtender"), - CASES_BY_FINISHED_TIME("/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTime", "/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTimeDescription", "caseByStateFinishTimeChartExtender"), - TASK_BY_EXPIRY("/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByExpiry", null, "taskByExpiryChartDefaultExtender"), - ELAPSED_TIME_BY_CASE_CATEGORY("/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/elapsedTimeByCaseCategory", "/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/elapsedTimeByCaseCategoryDescription", "elapsedTimeChartExtender"), - CASES_BY_CATEGORY("/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/casesByCategory", null, "casesByCategoryChartExtender"); - - private String cmsUri; - private String cmsDescriptionUri; - private String chartExtender; - - private StatisticChartType(String cmsUri, String cmsDescriptionUri, String chartExtender) { - this.cmsUri = cmsUri; - this.cmsDescriptionUri = cmsDescriptionUri; - this.chartExtender = chartExtender; - } - - public String getCmsUri() { - return cmsUri; - } - - public String getCmsDescriptionUri() { - return cmsDescriptionUri; - } - - public String getChartExtender() { - return chartExtender; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/StatisticTimePeriodSelection.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/StatisticTimePeriodSelection.java deleted file mode 100644 index f381ed29b33..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/StatisticTimePeriodSelection.java +++ /dev/null @@ -1,20 +0,0 @@ -package ch.ivy.addon.portalkit.enums; - -import ch.ivyteam.ivy.environment.Ivy; - -public enum StatisticTimePeriodSelection { - CUSTOM("custom"), - LAST_WEEK("lastWeek"), - LAST_MONTH("lastMonth"), - LAST_6_MONTH("last6Month"); - -private final String label; - - StatisticTimePeriodSelection(String label) { - this.label = label; - } - - public String getLabel() { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/timePeriod/" + label); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/TaskAndCaseAnalysisColumn.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/TaskAndCaseAnalysisColumn.java deleted file mode 100644 index ef6539bcf5c..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/enums/TaskAndCaseAnalysisColumn.java +++ /dev/null @@ -1,41 +0,0 @@ -package ch.ivy.addon.portalkit.enums; - - -public enum TaskAndCaseAnalysisColumn { - CASE_NAME(false, true), - CASE_DESCRIPTION(false, false), - CASE_ID(false, false), - CASE_CATEGORY(false, false), - CASE_CREATOR(false, false), - CASE_STATE(false, true), - TASK_NAME(true, true), - TASK_ID(true, false), - TASK_CATEGORY(true, false), - TASK_DESCRIPTION(true, false), - TASK_ACTIVATOR(true, false), - TASK_WORKER(true, false), - TASK_PRIORITY(true, true), - TASK_STATE(true, false), - TASK_CREATION_TIME(true, true), - TASK_EXPIRY_TIME(true, false), - TASK_FINISHED_TIME(true, true), - CASE_OWNER(false, false), - APPLICATION(false, false); - - private boolean isTaskField; - private boolean isDefaultColumn; - - - private TaskAndCaseAnalysisColumn(boolean isTaskField, boolean isDefaultColumn) { - this.isTaskField = isTaskField; - this.isDefaultColumn = isDefaultColumn; - } - - public boolean isTaskField() { - return isTaskField; - } - - public boolean isDefaultColumn() { - return isDefaultColumn; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/exporter/CaseExporter.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/exporter/CaseExporter.java index 791df33e853..036f0782505 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/exporter/CaseExporter.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/exporter/CaseExporter.java @@ -67,7 +67,7 @@ public String getColumnName(String column) { */ protected String getSpecialColumnName(String column) { if (CaseSortField.NAME.name().equals(column)) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseName"); + return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/caseName"); } else if (CaseLazyDataModel.DESCRIPTION.equals(column)) { return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/description"); } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/exporter/internal/TaskAnalysisExporter.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/exporter/internal/TaskAnalysisExporter.java deleted file mode 100644 index 951b815bd3c..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/exporter/internal/TaskAnalysisExporter.java +++ /dev/null @@ -1,168 +0,0 @@ -package ch.ivy.addon.portalkit.exporter.internal; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import org.apache.commons.lang3.StringUtils; - -import ch.ivy.addon.portalkit.enums.TaskAndCaseAnalysisColumn; -import ch.ivy.addon.portalkit.exporter.Exporter; -import ch.ivy.addon.portalkit.util.SecurityMemberDisplayNameUtils; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.workflow.ITask; - -public class TaskAnalysisExporter extends Exporter{ - private Map taskAnalysisColumnsVisibility; - - public TaskAnalysisExporter(Map columnsVisibility) { - this.taskAnalysisColumnsVisibility = columnsVisibility; - } - - @Override - protected List generateHeaders() { - List headers = new ArrayList<>(); - for (TaskAndCaseAnalysisColumn column : TaskAndCaseAnalysisColumn.values()) { - if (isColumnVisible(column)) - headers.add(getColumnName(column)); - } - return headers; - } - - private String getColumnName(TaskAndCaseAnalysisColumn column) { - switch (column) { - case CASE_NAME: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseName"); - case CASE_DESCRIPTION: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseDescription"); - case CASE_ID: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseID"); - case CASE_CATEGORY: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseCategory"); - case CASE_CREATOR: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseCreator"); - case CASE_OWNER: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseOwner"); - case CASE_STATE: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/caseState"); - case TASK_NAME: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/taskName"); - case TASK_ID: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskID"); - case TASK_CATEGORY: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskCategory"); - case TASK_DESCRIPTION: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskDescription"); - case TASK_ACTIVATOR: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskResponsible"); - case TASK_WORKER: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskWorker"); - case TASK_PRIORITY: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskPriority"); - case TASK_STATE: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskState"); - case TASK_CREATION_TIME: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskCreationTime"); - case TASK_EXPIRY_TIME: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskExpiryTime"); - case TASK_FINISHED_TIME: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskFinishedTime"); - case APPLICATION: - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/taskList/defaultColumns/APPLICATION"); - default: - return ""; - } - } - - private Object getColumnValue(TaskAndCaseAnalysisColumn column, ITask task) { - switch (column) { - case CASE_NAME: - return StringUtils.isEmpty(task.getCase().names().current()) ? Ivy.cms().co("/Dialogs/ch/ivy/addon/portalkit/component/CaseWidget/caseNameNotAvailable") : task.getCase().names().current(); - case CASE_DESCRIPTION: - return task.getCase().descriptions().current(); - case CASE_ID: - return String.valueOf(task.getCase().getId()); - case CASE_CATEGORY: - return task.getCase().getCategory().getPath(); - case CASE_CREATOR: - if (task.getCase().getCreatorUserName() == null) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/notAvailable"); - } - return SecurityMemberDisplayNameUtils.generateBriefDisplayNameForSecurityMember(task.getCase().getCreatorUser(), task.getCase().getCreatorUserName()); - case CASE_OWNER: - if (task.getCase().getOwnerName() == null) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/notAvailable"); - } - return SecurityMemberDisplayNameUtils.generateBriefDisplayNameForSecurityMember(task.getCase().getOwner(), task.getCase().getOwnerName()); - case CASE_STATE: - return task.getCase().getState().toString(); - case TASK_NAME: - return StringUtils.isEmpty(task.names().current()) ? Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/components/taskStart/taskNameNotAvailable") : task.names().current(); - case TASK_ID: - return String.valueOf(task.getId()); - case TASK_CATEGORY: - return task.getCategory().getPath(); - case TASK_DESCRIPTION: - return task.descriptions().current(); - case TASK_ACTIVATOR: - if (task.getActivatorName() == null) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/notAvailable"); - } - return SecurityMemberDisplayNameUtils.generateBriefDisplayNameForSecurityMember(task.getActivator(), task.getActivatorName()); - case TASK_WORKER: - if (task.getWorkerUserName() == null) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/notAvailable"); - } - return SecurityMemberDisplayNameUtils.generateBriefDisplayNameForUser(task.getWorkerUser(), task.getWorkerUserName()); - case TASK_PRIORITY: - return task.getPriority().toString(); - case TASK_STATE: - return task.getState().toString(); - case TASK_CREATION_TIME: - return task.getStartTimestamp(); - case TASK_EXPIRY_TIME: - return task.getExpiryTimestamp(); - case TASK_FINISHED_TIME: - return task.getEndTimestamp(); - case APPLICATION: - return task.getApplication().getName(); - default: - return ""; - } - } - - @Override - public List> generateData(List tasks) { - List> rows = new ArrayList<>(); - for (T t : tasks) { - if (t instanceof ITask) { - List row = new ArrayList<>(); - for (TaskAndCaseAnalysisColumn column : TaskAndCaseAnalysisColumn.values()) { - if (isColumnVisible(column)) - row.add(getColumnValue(column, (ITask)t)); - } - rows.add(row); - } - } - return rows; - - } - - @Override - public String generateFileName(Date creationDate, String extension, String suffix) { - String fileNameSuffix = createFileNameSuffix(creationDate, suffix); - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/components/taskView/exportedTasksCasesFileName", - Arrays.asList(fileNameSuffix, extension)); - } - - private boolean isColumnVisible(TaskAndCaseAnalysisColumn column) { - return taskAnalysisColumnsVisibility.get(column.name()); - } - - @Override - public String getColumnName(String column) { - return null; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/CaseService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/CaseService.java index 66dcc5da22d..1b73953ff2a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/CaseService.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/ivydata/service/impl/CaseService.java @@ -28,7 +28,6 @@ import ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseCustomFieldSearchCriteria; import ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria; import ch.ivy.addon.portalkit.service.GlobalSettingService; -import ch.ivy.addon.portalkit.statistics.StatisticChartConstants; import ch.ivy.addon.portalkit.util.CategoryUtils; import ch.ivy.addon.portalkit.util.PermissionUtils; import ch.ivyteam.ivy.environment.Ivy; @@ -435,9 +434,9 @@ private void loopToSelectedNode(CaseCategoryStatistic caseCategoryStatistic, Cat private void putNode(CaseCategoryStatistic caseCategoryStatistic, CategoryTree category) { StringBuilder categoryPath = new StringBuilder(category.getCategory().getPath()); if (!category.getChildren().isEmpty()) { - categoryPath.append(StatisticChartConstants.PARENT_CATEGORY_DELIMITER); //parent Node + categoryPath.append(CategoryUtils.PARENT_CATEGORY_DELIMITER); //parent Node } else { - categoryPath.append(StatisticChartConstants.CHILD_CATEGORY_DELIMITER); // child Node + categoryPath.append(CategoryUtils.CHILD_CATEGORY_DELIMITER); // child Node } categoryPath.append(category.getRawPath()); caseCategoryStatistic.getNumberOfCasesByCategory().put(categoryPath.toString(), category.count()); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java index 3368f4c7f3c..31ac12b1c7a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/security/PortalSecurity.java @@ -69,9 +69,9 @@ private static class Permissions { IPermission.USER_READ_OWN_SUBSTITUTIONS); private static final List EVERYBODY_PERMISSIONS = Arrays.asList( - PortalPermission.STATISTIC_ADD_DASHBOARD_CHART, PortalPermission.EXPRESS_CREATE_WORKFLOW, + PortalPermission.EXPRESS_CREATE_WORKFLOW, PortalPermission.ACCESS_FULL_CASE_LIST, PortalPermission.ACCESS_FULL_TASK_LIST, - PortalPermission.ACCESS_FULL_PROCESS_LIST, PortalPermission.ACCESS_FULL_STATISTICS_LIST, + PortalPermission.ACCESS_FULL_PROCESS_LIST, PortalPermission.TASK_CASE_ADD_NOTE, PortalPermission.TASK_CASE_SHOW_MORE_NOTE, PortalPermission.TASK_DISPLAY_ADDITIONAL_OPTIONS, PortalPermission.SHOW_ALL_TASKS_OF_CASE, PortalPermission.TASK_DISPLAY_RESET_ACTION, PortalPermission.TASK_DISPLAY_RESERVE_ACTION, diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/StatisticService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/StatisticService.java deleted file mode 100644 index f9d9182ccf7..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/StatisticService.java +++ /dev/null @@ -1,1435 +0,0 @@ -package ch.ivy.addon.portalkit.service; - -import static ch.ivy.addon.portalkit.enums.StatisticChartType.CASES_BY_FINISHED_TASK; -import static ch.ivy.addon.portalkit.enums.StatisticChartType.CASES_BY_STATE; -import static ch.ivy.addon.portalkit.enums.StatisticChartType.TASK_BY_EXPIRY; -import static ch.ivy.addon.portalkit.enums.StatisticChartType.TASK_BY_PRIORITY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.AFTER_18; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.APRIL_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.AUGUST_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.BEFORE_8; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.CASE_CATEGORIES_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.CASE_QUERY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.CATEGORIES_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.CHILD_CATEGORY_DELIMITER; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.CHILD_CATEGORY_DELIMITER_REGEX; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.CREATED_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.DECEMBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.DONE_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.ELAPSED_TIME_DETAIL_CHART_NAME_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.EXCEPTION_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.EXPIRED_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.EXPIRY_PERIOD_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FAILED_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FEBRUARY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FIFTHWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FIRSTWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FOURTHWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FRIDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.HIGH_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_10; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_11; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_12; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_13; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_14; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_15; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_16; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_17; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_8; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.IN_9; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.JANUARY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.JULY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.JUNE_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.LOW_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.MARCH_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.MAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.MONDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.NEW_CHART_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.NORMAL_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.NOVEMBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.NO_CATEGORY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.OCTOBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.PARENT_CATEGORY_DELIMITER; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.PARENT_CATEGORY_DELIMITER_REGEX; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.RESULT; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.RUNNING_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SATURDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SECONDWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SELECTED_CATEGORIES; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SELECTED_CATEGORY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SEPTEMBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SIXTHWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SUNDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.TASK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.TASK_QUERY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THIRDWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THIS_MONTH_EXPIRY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THIS_WEEK_EXPIRY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THIS_YEAR_EXPIRY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THURSDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.TODAY_EXPIRY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.TUESDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.WEDNESDAY_CMS; - -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.time.Year; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Objects; -import java.util.Optional; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.DateUtils; -import org.primefaces.component.barchart.BarChart; -import org.primefaces.component.donutchart.DonutChart; -import org.primefaces.event.ItemSelectEvent; -import org.primefaces.model.charts.ChartData; -import org.primefaces.model.charts.axes.cartesian.CartesianAxes; -import org.primefaces.model.charts.axes.cartesian.CartesianScaleTitle; -import org.primefaces.model.charts.axes.cartesian.CartesianScales; -import org.primefaces.model.charts.axes.cartesian.linear.CartesianLinearAxes; -import org.primefaces.model.charts.axes.cartesian.linear.CartesianLinearTicks; -import org.primefaces.model.charts.bar.BarChartDataSet; -import org.primefaces.model.charts.bar.BarChartModel; -import org.primefaces.model.charts.bar.BarChartOptions; -import org.primefaces.model.charts.donut.DonutChartDataSet; -import org.primefaces.model.charts.donut.DonutChartModel; -import org.primefaces.model.charts.donut.DonutChartOptions; -import org.primefaces.model.charts.optionconfig.legend.Legend; -import org.primefaces.model.charts.optionconfig.legend.LegendLabel; -import org.primefaces.model.charts.optionconfig.title.Title; - -import com.axonivy.portal.components.service.IvyAdapterService; - -import ch.ivy.addon.portalkit.bo.CaseCategoryStatistic; -import ch.ivy.addon.portalkit.bo.CaseStateStatistic; -import ch.ivy.addon.portalkit.bo.ElapsedTimeStatistic; -import ch.ivy.addon.portalkit.bo.ExpiryStatistic; -import ch.ivy.addon.portalkit.bo.PriorityStatistic; -import ch.ivy.addon.portalkit.constant.PortalConstants; -import ch.ivy.addon.portalkit.dto.DisplayName; -import ch.ivy.addon.portalkit.enums.PortalVariable; -import ch.ivy.addon.portalkit.enums.StatisticChartType; -import ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseCustomFieldSearchCriteria; -import ch.ivy.addon.portalkit.statistics.StatisticChart; -import ch.ivy.addon.portalkit.statistics.StatisticChartQueryUtils; -import ch.ivy.addon.portalkit.statistics.StatisticChartTimeUtils; -import ch.ivy.addon.portalkit.statistics.StatisticFilter; -import ch.ivy.addon.portalkit.util.UserUtils; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.process.call.SubProcessCall; -import ch.ivyteam.ivy.workflow.query.CaseQuery; -import ch.ivyteam.ivy.workflow.query.TaskQuery; - -public class StatisticService extends JsonConfigurationService { - - private static final String CHART_LEGEND_POSITION_LEFT = "left"; - private static final String CHART_LEGEND_POSITION_RIGHT = "right"; - private static final String CHART_LEGEND_POSITION_BOTTOM = "bottom"; - private int numberOfDefaultCharts; - private final static String LOADING_MESSAGE = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/loadingCharts"; - - private static StatisticService instance; - - private StatisticService() {} - - public static StatisticService getInstance() { - if (instance == null) { - instance = new StatisticService(); - } - return instance; - } - - public int getNumberOfDefaultCharts() { - return numberOfDefaultCharts; - } - - /** - * Find all statistic charts of the current login user - * Include public and private charts - * @return list of StatisticChart sorted by position - */ - public List findStatisticCharts() { - List charts = new ArrayList<>(getPublicConfig()); - numberOfDefaultCharts = charts.size(); - charts.addAll(getPrivateConfig().stream().sorted(Comparator.comparingLong(StatisticChart::getPosition)) - .collect(Collectors.toList())); - return charts; - } - - /** - * Charts load from business data don't have list roles for current user - * This method initialize role list for charts load from business data - * @param result - */ - private void initRolesForSavedChart(List result) { - List arrs = Arrays.asList(TASK_BY_PRIORITY, CASES_BY_STATE, TASK_BY_EXPIRY, CASES_BY_FINISHED_TASK); - List roles = null; - // Find first chart which unselect all roles, when all roles are unselected, getRoles() from filter return empty - StatisticChart firstChartUnselectAllRoles = result - .stream() - .filter(chart -> arrs.contains(chart.getType()) && CollectionUtils.isEmpty(chart.getFilter().getSelectedRoles())) - .findFirst() - .orElse(null); - - if (firstChartUnselectAllRoles != null) { - StatisticFilter filter = firstChartUnselectAllRoles.getFilter(); - filter.initRoles(); - roles = filter.getRoles(); - - // set all roles for other charts which unselect all roles - for (StatisticChart chart : result) { - if (arrs.contains(chart.getType()) && CollectionUtils.isEmpty(chart.getFilter().getSelectedRoles()) && !chart.getId().equals(firstChartUnselectAllRoles.getId())){ - chart.getFilter().setRoles(roles); - } - } - } - } - - /** - * Get Task by Priority statistic data - * - * @param taskQuery - * @return Task by Priority statistic data - */ - public PriorityStatistic getPriorityStatisticData(TaskQuery taskQuery) { - Map params = new HashMap<>(); - params.put(TASK_QUERY, taskQuery); - - Map response = - IvyAdapterService.startSubProcessInProjectAndAllRequired("analyzePriorityStatistic(ch.ivyteam.ivy.workflow.query.TaskQuery)", params); - return (PriorityStatistic) response.get(RESULT); - } - - /** - * Get Task by Expiry statistic data - * - * @param taskQuery - * @return Task by Expiry statistic data - */ - public ExpiryStatistic getExpiryStatisticData(TaskQuery taskQuery) { - Map params = new HashMap<>(); - params.put(TASK_QUERY, taskQuery); - - Map response = - IvyAdapterService.startSubProcessInProjectAndAllRequired("analyzeExpiryStatistic(ch.ivyteam.ivy.workflow.query.TaskQuery)", params); - return (ExpiryStatistic) response.get(RESULT); - } - - /** - * Get Case by State statistic data - * - * @param caseQuery - * @return Case by State statistic data - */ - public CaseStateStatistic getCaseStateStatisticData(CaseQuery caseQuery) { - Map params = new HashMap<>(); - params.put(CASE_QUERY, caseQuery); - - Map response = - IvyAdapterService.startSubProcessInProjectAndAllRequired("analyzeCaseStateStatistic(ch.ivyteam.ivy.workflow.query.CaseQuery)", params); - return (CaseStateStatistic) response.get(RESULT); - } - - /** - * Get Elapsed time by Case Category data - * - * @param caseQuery - * @return Elapsed time by Case Category data - */ - public ElapsedTimeStatistic getElapsedTimeStatisticData(CaseQuery caseQuery) { - Map params = new HashMap<>(); - params.put(CASE_QUERY, caseQuery); - - Map response = - IvyAdapterService.startSubProcessInProjectAndAllRequired("analyzeElapsedTimeStatistic(ch.ivyteam.ivy.workflow.query.CaseQuery)", params); - return (ElapsedTimeStatistic) response.get(RESULT); - } - - /** - * Get Cases by Case Category data - * - * @param caseQuery - * @param categoryNodes - * @return Cases by Case Category data - */ - public CaseCategoryStatistic getCasesByCategoryStatisticData(CaseQuery caseQuery, List categoryNodes) { - Map params = new HashMap<>(); - params.put(CASE_QUERY, caseQuery); - params.put(SELECTED_CATEGORIES, categoryNodes); - Map response = - IvyAdapterService.startSubProcessInProjectAndAllRequired("analyzeCasesByCategoryStatistic(ch.ivyteam.ivy.workflow.query.CaseQuery,java.util.List)", params); - return (CaseCategoryStatistic) response.get(RESULT); - } - - public CaseCategoryStatistic getCasesByCategoryDrilldownStatisticData(CaseQuery caseQuery, String categoryNode) { - Map params = new HashMap<>(); - params.put(CASE_QUERY, caseQuery); - params.put(SELECTED_CATEGORY, categoryNode); - Map response = - IvyAdapterService.startSubProcessInProjectAndAllRequired("analyzeCasesByCategoryDrilldownStatistic(ch.ivyteam.ivy.workflow.query.CaseQuery,String)", params); - return (CaseCategoryStatistic) response.get(RESULT); - } - - @SuppressWarnings("unchecked") - public List getCustomFields(String fieldName, String keyword){ - CaseCustomFieldSearchCriteria criteria = new CaseCustomFieldSearchCriteria(); - criteria.setKeyword(keyword); - criteria.setFieldName(fieldName); - return SubProcessCall.withPath(PortalConstants.ANALYZE_STATISTIC_CALLABLE) - .withStartSignature("findCaseCustomFields(CaseCustomFieldSearchCriteria)") - .withParam("caseCustomFieldSearchCriteria", criteria).call().get(RESULT, List.class); - } - - /** - * generate data for "Task by Priority" chart - * - * @param priorityStatistic statistic data - * @return generated data - */ - private Map generateDataForTaskByPriorityChart(PriorityStatistic priorityStatistic) { - Map chartData = new LinkedHashMap<>(); - chartData.put(Ivy.cms().co(EXCEPTION_PRIORITY_KEY), priorityStatistic.getException()); - chartData.put(Ivy.cms().co(HIGH_PRIORITY_KEY), priorityStatistic.getHigh()); - chartData.put(Ivy.cms().co(NORMAL_PRIORITY_KEY), priorityStatistic.getNormal()); - chartData.put(Ivy.cms().co(LOW_PRIORITY_KEY), priorityStatistic.getLow()); - return chartData; - } - - /** - * generate data for "Task by Expiry" overview chart - * - * @param expiryStatistic statistic data - * @param selectedValue selected value - * @param previousSelectedMonth previous selected month - * @param previousSelectedWeek previous selected week - * @return generated data - */ - private Map generateDataForTaskByExpiryOverviewChart(ExpiryStatistic expiryStatistic, - String selectedValue, String previousSelectedMonth, String previousSelectedWeek) { - Map chartData; - Map numberOfTasksByExpiryTime = expiryStatistic.getNumberOfTasksByExpiryTime(); - if (selectThisYear(selectedValue)) { - chartData = generateExpiryModelForDrilldownLevelYear(numberOfTasksByExpiryTime); - } else if (selectMonthOfYear(selectedValue)) { - chartData = generateExpiryModelForDrilldownLevelMonth(numberOfTasksByExpiryTime, selectedValue); - } else if (selectWeekOfMonth(selectedValue)) { - chartData = generateExpiryModelForDrilldownLevelWeek(numberOfTasksByExpiryTime, selectedValue, previousSelectedMonth); - } else if (selectDayOfWeek(selectedValue)) { - chartData = - generateExpiryModelForDrilldownLevelDay(numberOfTasksByExpiryTime, selectedValue, previousSelectedWeek, - previousSelectedMonth); - } else { - chartData = generateDefaultExpiryModel(numberOfTasksByExpiryTime); - } - - return chartData; - } - - private Map generateExpiryModelForDrilldownLevelDay(Map numberOfTasksByExpiryTime, - String selectedDay, String previousSelectedWeek, String previousSelectedMonth) { - Map chartData = new LinkedHashMap<>(); - - Long taskExpireBefore8 = 0L; - Long taskExpireIn8 = 0L; - Long taskExpireIn9 = 0L; - Long taskExpireIn10 = 0L; - Long taskExpireIn11 = 0L; - Long taskExpireIn12 = 0L; - Long taskExpireIn13 = 0L; - Long taskExpireIn14 = 0L; - Long taskExpireIn15 = 0L; - Long taskExpireIn16 = 0L; - Long taskExpireIn17 = 0L; - Long taskExpireAfter18 = 0L; - Long[] taskExpireInHour = - {taskExpireIn8, taskExpireIn9, taskExpireIn10, taskExpireIn11, taskExpireIn12, taskExpireIn13, taskExpireIn14, - taskExpireIn15, taskExpireIn16, taskExpireIn17}; - - for (Entry result : numberOfTasksByExpiryTime.entrySet()) { - if (new Date().after(result.getKey())) { - continue; - } - Date resultDate = result.getKey(); - Calendar cal = Calendar.getInstance(); - cal.setTime(resultDate); - - if (StatisticChartTimeUtils.isSameDay(resultDate, selectedDay, previousSelectedWeek, previousSelectedMonth)) { - if (cal.get(Calendar.HOUR_OF_DAY) < 8) { - taskExpireBefore8 += result.getValue(); - } else if (cal.get(Calendar.HOUR_OF_DAY) >= 18) { - taskExpireAfter18 += result.getValue(); - } else { - int hourIndex = cal.get(Calendar.HOUR_OF_DAY); - taskExpireInHour[hourIndex - 8] += result.getValue(); // example: hourIndex = 8 => taskExpireInHour[ 8 - 8] = - // taskExpireInHour[0] = taskExpireIn8 += - // result.getValue() ... - } - } - - } - - chartData.put(BEFORE_8, taskExpireBefore8); - chartData.put(IN_8, taskExpireInHour[0]); - chartData.put(IN_9, taskExpireInHour[1]); - chartData.put(IN_10, taskExpireInHour[2]); - chartData.put(IN_11, taskExpireInHour[3]); - chartData.put(IN_12, taskExpireInHour[4]); - chartData.put(IN_13, taskExpireInHour[5]); - chartData.put(IN_14, taskExpireInHour[6]); - chartData.put(IN_15, taskExpireInHour[7]); - chartData.put(IN_16, taskExpireInHour[8]); - chartData.put(IN_17, taskExpireInHour[9]); - chartData.put(AFTER_18, taskExpireAfter18); - - return chartData; - } - - private Map generateExpiryModelForDrilldownLevelWeek(Map numberOfTasksByExpiryTime, - String selectedWeek, String previousSelectedMonth) { - Map chartData = new LinkedHashMap<>(); - - Date firstDateOfSelectedWeek = - StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfWeek(selectedWeek, - previousSelectedMonth)); - Date firstDateOfNextWeek = - StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addWeeks(firstDateOfSelectedWeek, 1)); - - if (!StringUtils.isEmpty(previousSelectedMonth)) { - Date firstDateOfMonth = - StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils - .getFirstDateOfMonth(previousSelectedMonth)); - if (firstDateOfMonth.compareTo(firstDateOfSelectedWeek) > 0) { - firstDateOfSelectedWeek = firstDateOfMonth; - } - Date firstDayOfNextMonth = DateUtils.addMonths(firstDateOfMonth, 1); - if (firstDateOfNextWeek.compareTo(firstDayOfNextMonth) > 0) { - firstDateOfNextWeek = firstDayOfNextMonth; - } - } - - Long taskExpireOnMonday = 0L; - Long taskExpireOnTuesday = 0L; - Long taskExpireOnWednesday = 0L; - Long taskExpireOnThursday = 0L; - Long taskExpireOnFriday = 0L; - Long taskExpireOnSaturday = 0L; - Long taskExpireOnSunday = 0L; - Long[] taskExpireOnDaysOfWeek = - {taskExpireOnMonday, taskExpireOnTuesday, taskExpireOnWednesday, taskExpireOnThursday, taskExpireOnFriday, - taskExpireOnSaturday, taskExpireOnSunday}; - - for (Entry result : numberOfTasksByExpiryTime.entrySet()) { - if (new Date().after(result.getKey())) { - continue; - } - Date resultDate = StatisticChartTimeUtils.truncateMinutesPart(result.getKey()); - Calendar cal = Calendar.getInstance(); - cal.setTime(resultDate); - - if (checkIfDateBetweenRange(firstDateOfSelectedWeek, firstDateOfNextWeek, resultDate)) { - int dayOfWeekIndex = cal.get(Calendar.DAY_OF_WEEK); - if (dayOfWeekIndex == 1) { // SUNDAY - taskExpireOnDaysOfWeek[6] += result.getValue(); // index 6 means taskExpireOnSunday - } else {// MONDAY TO SATURDAY - day of week index from 2 to 7 - taskExpireOnDaysOfWeek[dayOfWeekIndex - 2] += result.getValue(); - } - } - } - - chartData.put(Ivy.cms().co(MONDAY_CMS), taskExpireOnDaysOfWeek[0]); - chartData.put(Ivy.cms().co(TUESDAY_CMS), taskExpireOnDaysOfWeek[1]); - chartData.put(Ivy.cms().co(WEDNESDAY_CMS), taskExpireOnDaysOfWeek[2]); - chartData.put(Ivy.cms().co(THURSDAY_CMS), taskExpireOnDaysOfWeek[3]); - chartData.put(Ivy.cms().co(FRIDAY_CMS), taskExpireOnDaysOfWeek[4]); - chartData.put(Ivy.cms().co(SATURDAY_CMS), taskExpireOnDaysOfWeek[5]); - chartData.put(Ivy.cms().co(SUNDAY_CMS), taskExpireOnDaysOfWeek[6]); - - return chartData; - } - - private Map generateExpiryModelForDrilldownLevelMonth(Map numberOfTasksByExpiryTime, - String selectedValue) { - Map chartData = new LinkedHashMap<>(); - - Long taskExpireOnFirstWeek = 0L; - Long taskExpireOnSecondWeek = 0L; - Long taskExpireOnThirdWeek = 0L; - Long taskExpireOnFourthWeek = 0L; - Long taskExpireOnFifthWeek = 0L; - Long taskExpireOnSixthWeek = 0L; - - Date firstDateOfSelectedMonth = StatisticChartTimeUtils.getFirstDateOfMonth(selectedValue); - Date firstDateOfWeek = StatisticChartTimeUtils.getFirstDateOfWeekContainsDate(firstDateOfSelectedMonth); - - Date firstDateOfFirstWeek = StatisticChartTimeUtils.truncateMinutesPart(firstDateOfSelectedMonth); - Date firstDateOfSecondWeek = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addDays(firstDateOfWeek, 7)); - Date firstDateOfThirdWeek = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addDays(firstDateOfWeek, 14)); - Date firstDateOfFourthWeek = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addDays(firstDateOfWeek, 21)); - Date firstDateOfFifthWeek = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addDays(firstDateOfWeek, 28)); - Date firstDateOfSixthWeek = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addDays(firstDateOfWeek, 35)); - Date firstDateOfNextMonth = - StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addMonths(firstDateOfSelectedMonth, 1)); - - for (Entry result : numberOfTasksByExpiryTime.entrySet()) { - if (new Date().after(result.getKey())) { - continue; - } - Date resultDate = StatisticChartTimeUtils.truncateMinutesPart(result.getKey()); - if (checkIfDateBetweenRange(firstDateOfFirstWeek, firstDateOfSecondWeek, resultDate)) { - taskExpireOnFirstWeek += result.getValue(); - } - if (checkIfDateBetweenRange(firstDateOfSecondWeek, firstDateOfThirdWeek, resultDate)) { - taskExpireOnSecondWeek += result.getValue(); - } - if (checkIfDateBetweenRange(firstDateOfThirdWeek, firstDateOfFourthWeek, resultDate)) { - taskExpireOnThirdWeek += result.getValue(); - } - if (checkIfDateBetweenRange(firstDateOfFourthWeek, firstDateOfFifthWeek, resultDate)) { - taskExpireOnFourthWeek += result.getValue(); - } - Long[] taskOfFifthAndSixWeek = - calculateTaskExpireOnFifthAndSixthWeek(firstDateOfFifthWeek, firstDateOfSixthWeek, firstDateOfNextMonth, - resultDate, result.getValue()); - taskExpireOnFifthWeek += taskOfFifthAndSixWeek[0]; - taskExpireOnSixthWeek += taskOfFifthAndSixWeek[1]; - } - - chartData.put(Ivy.cms().co(FIRSTWEEK_CMS), taskExpireOnFirstWeek); - chartData.put(Ivy.cms().co(SECONDWEEK_CMS), taskExpireOnSecondWeek); - chartData.put(Ivy.cms().co(THIRDWEEK_CMS), taskExpireOnThirdWeek); - chartData.put(Ivy.cms().co(FOURTHWEEK_CMS), taskExpireOnFourthWeek); - if (firstDateOfNextMonth.compareTo(firstDateOfFifthWeek) > 0) { - chartData.put(Ivy.cms().co(FIFTHWEEK_CMS), taskExpireOnFifthWeek); - } - if (firstDateOfNextMonth.compareTo(firstDateOfSixthWeek) > 0) { - chartData.put(Ivy.cms().co(SIXTHWEEK_CMS), taskExpireOnSixthWeek); - } - return chartData; - } - - private Long[] calculateTaskExpireOnFifthAndSixthWeek(Date firstDateOfFifthWeek, Date firstDateOfSixthWeek, - Date firstDateOfNextMonth, Date resultDate, Long resultValue) { - Long taskExpireOnFifthWeek = 0L; - Long taskExpireOnSixthWeek = 0L; - if (firstDateOfSixthWeek.compareTo(firstDateOfNextMonth) < 0) { - if (checkIfDateBetweenRange(firstDateOfFifthWeek, firstDateOfSixthWeek, resultDate)) { - taskExpireOnFifthWeek = resultValue; - } - if (checkIfDateBetweenRange(firstDateOfSixthWeek, firstDateOfNextMonth, resultDate)) { - taskExpireOnSixthWeek = resultValue; - } - } else { - if (checkIfDateBetweenRange(firstDateOfFifthWeek, firstDateOfNextMonth, resultDate)) { - taskExpireOnFifthWeek = resultValue; - } - } - return new Long[] {taskExpireOnFifthWeek, taskExpireOnSixthWeek}; - } - - private boolean checkIfDateBetweenRange(Date startDate, Date endDate, Date resultDate) { - return startDate.compareTo(resultDate) <= 0 && endDate.compareTo(resultDate) > 0; - } - - private Map generateExpiryModelForDrilldownLevelYear(Map numberOfTasksByExpiryTime) { - Map chartData = new LinkedHashMap<>(); - - Long taskExpireOnJanuary = 0L; - Long taskExpireOnFebruary = 0L; - Long taskExpireOnMarch = 0L; - Long taskExpireOnApril = 0L; - Long taskExpireOnMay = 0L; - Long taskExpireOnJune = 0L; - Long taskExpireOnJuly = 0L; - Long taskExpireOnAugust = 0L; - Long taskExpireOnSeptember = 0L; - Long taskExpireOnOctober = 0L; - Long taskExpireOnNovember = 0L; - Long taskExpireOnDecember = 0L; - Long[] takExpireOnMonths = - {taskExpireOnJanuary, taskExpireOnFebruary, taskExpireOnMarch, taskExpireOnApril, taskExpireOnMay, - taskExpireOnJune, taskExpireOnJuly, taskExpireOnAugust, taskExpireOnSeptember, taskExpireOnOctober, - taskExpireOnNovember, taskExpireOnDecember}; - - if (numberOfTasksByExpiryTime != null) { - for (Entry result : numberOfTasksByExpiryTime.entrySet()) { - if (new Date().after(result.getKey())) { - continue; - } - Date resultDate = StatisticChartTimeUtils.truncateMinutesPart(result.getKey()); - Calendar cal = Calendar.getInstance(); - cal.setTime(resultDate); - - int thisYear = Year.now().getValue(); - if (cal.get(Calendar.YEAR) == thisYear) { - int monthIndex = cal.get(Calendar.MONTH); // from JANUARY to DECEMBER, month index from 0 to 11 - takExpireOnMonths[monthIndex] += result.getValue(); - } - } - } - - chartData.put(Ivy.cms().co(JANUARY_CMS), takExpireOnMonths[0]); - chartData.put(Ivy.cms().co(FEBRUARY_CMS), takExpireOnMonths[1]); - chartData.put(Ivy.cms().co(MARCH_CMS), takExpireOnMonths[2]); - chartData.put(Ivy.cms().co(APRIL_CMS), takExpireOnMonths[3]); - chartData.put(Ivy.cms().co(MAY_CMS), takExpireOnMonths[4]); - chartData.put(Ivy.cms().co(JUNE_CMS), takExpireOnMonths[5]); - chartData.put(Ivy.cms().co(JULY_CMS), takExpireOnMonths[6]); - chartData.put(Ivy.cms().co(AUGUST_CMS), takExpireOnMonths[7]); - chartData.put(Ivy.cms().co(SEPTEMBER_CMS), takExpireOnMonths[8]); - chartData.put(Ivy.cms().co(OCTOBER_CMS), takExpireOnMonths[9]); - chartData.put(Ivy.cms().co(NOVEMBER_CMS), takExpireOnMonths[10]); - chartData.put(Ivy.cms().co(DECEMBER_CMS), takExpireOnMonths[11]); - return chartData; - } - - private Map generateDefaultExpiryModel(Map numberOfTasksByExpiryTime) { - Map chartData = new LinkedHashMap<>(); - // Calculate result - Long expiredTasks = 0L; - Long taskExpireToday = 0L; - Long taskExpireThisWeek = 0L; - Long taskExpireThisMonth = 0L; - Long taskExpireThisYear = 0L; - - Date today = StatisticChartTimeUtils.truncateMinutesPart(new Date()); - Date firstDateOfWeek = - StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfWeekContainsDate(new Date())); - Date firstDateOfNextWeek = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addWeeks(firstDateOfWeek, 1)); - Date firstDateOfMonth = - StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfThisMonth()); - Date firsDateOfNextMonth = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addMonths(firstDateOfMonth, 1)); - Date firsDateOfYear = StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfThisYear()); - Date firsDateOfNextYear = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addYears(firsDateOfYear, 1)); - - if (numberOfTasksByExpiryTime != null) { - for (Entry result : numberOfTasksByExpiryTime.entrySet()) { - Date resultDate = StatisticChartTimeUtils.truncateMinutesPart(result.getKey()); - - if (new Date().after(result.getKey())) { - expiredTasks += result.getValue(); - continue; // Not include expired tasks to other bars - } - - if (today.compareTo(resultDate) == 0) { - taskExpireToday += result.getValue(); - } - - if (firstDateOfWeek.compareTo(resultDate) <= 0 && firstDateOfNextWeek.compareTo(resultDate) > 0) { - taskExpireThisWeek += result.getValue(); - } - if (firstDateOfMonth.compareTo(resultDate) <= 0 && firsDateOfNextMonth.compareTo(resultDate) > 0) { - taskExpireThisMonth += result.getValue(); - } - if (firsDateOfYear.compareTo(resultDate) <= 0 && firsDateOfNextYear.compareTo(resultDate) > 0) { - taskExpireThisYear += result.getValue(); - } - } - } - - chartData.put(Ivy.cms().co(EXPIRED_KEY), expiredTasks); - chartData.put(Ivy.cms().co(TODAY_EXPIRY_KEY), taskExpireToday); - chartData.put(Ivy.cms().co(THIS_WEEK_EXPIRY_KEY), taskExpireThisWeek); - chartData.put(Ivy.cms().co(THIS_MONTH_EXPIRY_KEY), taskExpireThisMonth); - chartData.put(Ivy.cms().co(THIS_YEAR_EXPIRY_KEY), taskExpireThisYear); - - return chartData; - } - - /** - * generate data for "Case by State" chart - * Build with correct order: CREATED, RUNNING, DONE, FAILED - * - * @param caseStateStatistic statistic data - * @return generated data - */ - private Map generateDataForCaseStateChart(CaseStateStatistic caseStateStatistic) { - Map chartData = new LinkedHashMap<>(); - chartData.put(Ivy.cms().co(CREATED_CASE_KEY), caseStateStatistic.getCreated()); - chartData.put(Ivy.cms().co(RUNNING_CASE_KEY), caseStateStatistic.getRunning()); - chartData.put(Ivy.cms().co(DONE_CASE_KEY), caseStateStatistic.getDone()); - chartData.put(Ivy.cms().co(FAILED_CASE_KEY), caseStateStatistic.getFailed()); - return chartData; - } - - /** - * generate data for "Elapsed Time by Case Category" chart - * - * @param elapsedTimeStatistic statistic data - * @return generated data - */ - private Map generateDataForElapsedTimeChart(ElapsedTimeStatistic elapsedTimeStatistic) { - Map chartData = new LinkedHashMap<>(); - if(!Objects.isNull(elapsedTimeStatistic.getAverageElapsedTimeByCategory())) { - for (Entry entry : elapsedTimeStatistic.getAverageElapsedTimeByCategory().entrySet()) { - String key = entry.getKey(); - if (StringUtils.isBlank(key)) { - key = Ivy.cms().co(NO_CATEGORY_CMS); - } - chartData.put(key, entry.getValue()); - } - } - return chartData; - } - - /** - * Add statistic chart to business data - * - * @param filter filter to generate json query for statistic chart - * @param chartNames chart names - * @param chartType chart type - * @param isDefault is a default chart - * @return Added statistic chart - */ - public StatisticChart createStatisticChart(StatisticFilter filter, List chartNames, - StatisticChartType chartType, boolean isDefault) { - StatisticChart statisticChart = new StatisticChart(); - - updateChartNames(chartNames); - statisticChart.setType(chartType); - statisticChart.setNames(chartNames); - statisticChart.setPosition(getPrivateConfig().size() + getPublicConfig().size()); - statisticChart.setIsPublic(isDefault); - - if (filter.getIsAllCaseStatesSelected()) { - StatisticFilter newFilter = ObjectUtils.clone(filter); - if (filter.getIsAllRolesSelected()) { - newFilter.setSelectedRoles(new ArrayList<>()); - } - statisticChart.setFilter(newFilter); - } else { - statisticChart.setFilter(filter); - } - return save(statisticChart); - } - - private void updateChartNames(List chartNames) { - if (chartNames == null) { - chartNames = new ArrayList<>(); - } - - for (DisplayName chartName : chartNames) { - if (StringUtils.isBlank(chartName.getValue())) { - chartName.setValue(Ivy.cms().co(NEW_CHART_CMS)); - } - } - } - - private DonutChartModel createDonutChartModel(Map chartData, StatisticChartType chartType) { - DonutChartModel model = new DonutChartModel(); - ChartData data = new ChartData(); - DonutChartOptions options = new DonutChartOptions(); - data.setLabels(chartData.keySet().stream().collect(Collectors.toList())); - options.setLegend(buildChartLegend(CHART_LEGEND_POSITION_RIGHT, true)); - - model.setData(data); - model.setOptions(options); - model.setExtender(chartType.getChartExtender()); - return model; - } - - private Legend buildChartLegend(String legendPosition, boolean isDisplay) { - Legend legend = new Legend(); - legend.setPosition(legendPosition); - legend.setDisplay(isDisplay); - LegendLabel labels = new LegendLabel(); - legend.setLabels(labels); - return legend; - } - - /** - * Generate chart model for "Task By Priority" chart - * - * @param statisticData statistic data - * @param isSetDefaultName - * @return chart model for "Task By Priority" chart - */ - public DonutChartModel generateTaskByPriorityModel(PriorityStatistic statisticData, boolean isSetDefaultName) { - Map chartData = generateDataForTaskByPriorityChart(statisticData); - boolean isEmptyData = chartData.isEmpty(); - - if (isEmptyData) { - chartData.put(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/common/tasks"), 0); - } - - DonutChartModel model = createDonutChartModel(chartData, StatisticChartType.TASK_BY_PRIORITY); - DonutChartDataSet dataSet = createDonutChartDataSet(chartData); - model.getData().addChartDataSet(dataSet); - - if (isSetDefaultName) { - Title title = generateChartTitle(StatisticChartType.TASK_BY_PRIORITY, false); - model.getOptions().setTitle(title); - } - - return model; - } - - private Title generateChartTitle(StatisticChartType chartType, boolean isDisplayed) { - Title title = new Title(); - title.setDisplay(isDisplayed); - title.setText(Ivy.cms().co(chartType.getCmsUri())); - return title; - } - - private DonutChartDataSet createDonutChartDataSet(Map chartData) { - DonutChartDataSet dataSet = new DonutChartDataSet(); - dataSet.setData(chartData.values().stream().collect(Collectors.toList())); - return dataSet; - } - - /** - * Generate chart model for "Task By Expiry" chart - * - * @param statisticData statistic data - * @param isSetDefaultName - * @param selectedValue selected value - * @param previousSelectedMonth previous selected month - * @param previousSelectedWeek previous selected week - * @return chart model for "Task By Expiry" chart - */ - public BarChartModel generateTaskByExpiryModel(ExpiryStatistic statisticData, boolean isSetDefaultName, - String selectedValue, String previousSelectedMonth, String previousSelectedWeek) { - Map chartData = generateDataForTaskByExpiryOverviewChart(statisticData, selectedValue, - previousSelectedMonth, previousSelectedWeek); - - BarChartModel model = new BarChartModel(); - ChartData data = new ChartData(); - BarChartDataSet dataSet = new BarChartDataSet(); - BarChartOptions options = new BarChartOptions(); - CartesianScales scales = new CartesianScales(); - - options.setLegend(buildChartLegend(CHART_LEGEND_POSITION_BOTTOM, false)); - - if (chartData.size() != 0) { - buildBarChartDataSet(chartData, data, dataSet); - - String label = Ivy.cms().co(EXPIRY_PERIOD_CMS); - if (selectDayOfWeek(selectedValue)) { - label = label + " " + Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByExpiry/hour"); - } - scales.addXAxesData(createLinearAxes(CHART_LEGEND_POSITION_LEFT, label)); - scales.addYAxesData(createLinearAxes(CHART_LEGEND_POSITION_BOTTOM, Ivy.cms().co(TASK_CMS))); - } - data.addChartDataSet(dataSet); - - if (isSetDefaultName) { - options.setTitle(generateChartTitle(StatisticChartType.TASK_BY_EXPIRY, false)); - } - options.setScales(scales); - model.setData(data); - model.setOptions(options); - model.setExtender(getTaskByExpiryChartExtenderBySelectedValue(selectedValue)); - - return model; - } - - private void buildBarChartDataSet(Map chartData, ChartData data, BarChartDataSet dataSet) { - dataSet.setData(chartData.values().stream().collect(Collectors.toList())); - data.setLabels(chartData.keySet().stream().collect(Collectors.toList())); - } - - private String getTaskByExpiryChartExtenderBySelectedValue(String selectedValue) { - String extender = ""; - String today = Ivy.cms().co(TODAY_EXPIRY_KEY); - String week = Ivy.cms().co(THIS_WEEK_EXPIRY_KEY); - String month = Ivy.cms().co(THIS_MONTH_EXPIRY_KEY); - String year = Ivy.cms().co(THIS_YEAR_EXPIRY_KEY); - if (selectedValue.equalsIgnoreCase(today) || selectDayOfWeek(selectedValue)) { - extender = "taskByExpiryChartTodayExtender"; - } else if (selectedValue.equalsIgnoreCase(week) || selectWeekOfMonth(selectedValue)) { - extender = "taskByExpiryChartThisWeekExtender"; - } else if (selectedValue.equalsIgnoreCase(month) || selectMonthOfYear(selectedValue)) { - extender = "taskByExpiryChartThisMonthExtender"; - } else if (selectedValue.equalsIgnoreCase(year)) { - extender = "taskByExpiryChartThisYearExtender"; - } else { - extender = "taskByExpiryChartDefaultExtender"; - } - return extender; - } - - private CartesianLinearAxes createLinearAxes(String position, String axesLabel) { - CartesianLinearAxes newAxesData = new CartesianLinearAxes(); - newAxesData.setPosition(position); - CartesianLinearTicks ticks = new CartesianLinearTicks(); - newAxesData.setBeginAtZero(true); - newAxesData.setTicks(ticks); - - CartesianScaleTitle scaleLabel = new CartesianScaleTitle(); - scaleLabel.setDisplay(true); - scaleLabel.setText(axesLabel); - - newAxesData.setScaleTitle(scaleLabel); - - return newAxesData; - } - - /** - * Generate chart model for "Case By State" chart - * - * @param statisticData statistic data - * @param chartType statistic chart type - * @param isSetDefaultName - * @return chart model for "Case By State" chart - */ - public DonutChartModel generateCaseByStateModel(CaseStateStatistic statisticData, StatisticChartType chartType, - boolean isSetDefaultName) { - Map chartData = generateDataForCaseStateChart(statisticData); - boolean isEmptyData = chartData.isEmpty(); - - if (isEmptyData) { - chartData.put(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/caseList/cases"), 0); - } - - DonutChartModel model = createDonutChartModel(chartData, chartType); - DonutChartDataSet dataSet = createDonutChartDataSet(chartData); - model.getData().addChartDataSet(dataSet); - if (isSetDefaultName) { - model.getOptions().setTitle(generateChartTitle(chartType, false)); - } - return model; - } - - /** - * Generate chart model for "Elapsed time by Case Category" chart - * - * @param statisticData statistic data - * @param isSetDefaultName - * @return chart model for "Elapsed time by Case Category" chart - */ - public BarChartModel generateElapsedTimeModel(ElapsedTimeStatistic statisticData, boolean isSetDefaultName) { - Map chartData = getElapsedTimeChartData(statisticData); - - BarChartModel model = new BarChartModel(); - ChartData data = new ChartData(); - BarChartDataSet dataSet = new BarChartDataSet(); - BarChartOptions options = new BarChartOptions(); - CartesianScales scales = new CartesianScales(); - if (chartData.size() != 0) { - buildBarChartDataSet(new HashMap<>(chartData), data, dataSet); - - scales.addXAxesData(createLinearAxes(CHART_LEGEND_POSITION_LEFT, Ivy.cms().co(CASE_CATEGORIES_CMS))); - scales.addYAxesData(createLinearAxes(CHART_LEGEND_POSITION_BOTTOM, Ivy.cms().co(ELAPSED_TIME_DETAIL_CHART_NAME_CMS))); - } - - data.addChartDataSet(dataSet); - if (isSetDefaultName) { - options.setTitle(generateChartTitle(StatisticChartType.ELAPSED_TIME_BY_CASE_CATEGORY, false)); - } - options.setScales(scales); - options.setLegend(buildChartLegend(CHART_LEGEND_POSITION_BOTTOM, false)); - - model.setData(data); - model.setOptions(options); - model.setExtender("elapsedTimeChartExtender"); - return model; - } - - private Map getElapsedTimeChartData(ElapsedTimeStatistic statisticData) { - Map caseCategoryToElapsedTime = generateDataForElapsedTimeChart(statisticData); - - if (caseCategoryToElapsedTime.isEmpty()) { - caseCategoryToElapsedTime.put(StringUtils.EMPTY, 0); - } - - for (Iterator> iterator = caseCategoryToElapsedTime.entrySet().iterator(); iterator.hasNext();) { - Entry chartDataEntry = iterator.next(); - float floatValueOfChartData = chartDataEntry.getValue().floatValue()/3600; - BigDecimal roundElapsedTime = new BigDecimal(floatValueOfChartData).setScale(2, RoundingMode.HALF_UP); - chartDataEntry.setValue(roundElapsedTime); - } - - return new HashMap<>(caseCategoryToElapsedTime); - } - - /** - * Generate chart model for "Cases By Category" chart - * - * @param statisticData statistic data - * @param isSetDefaultName - * @return chart model for "Cases By Category" chart - */ - public BarChartModel generateCasesByCategoryModel(CaseCategoryStatistic statisticData, boolean isSetDefaultName) { - BarChartModel model = new BarChartModel(); - ChartData data = new ChartData(); - BarChartDataSet dataSet = new BarChartDataSet(); - BarChartOptions options = new BarChartOptions(); - CartesianScales scales = new CartesianScales(); - if (statisticData.getNumberOfCasesByCategory().size() != 0) { - buildBarChartDataSet(new LinkedHashMap<>(statisticData.getNumberOfCasesByCategory()), data, dataSet); - - scales.addXAxesData(createLinearAxes(CHART_LEGEND_POSITION_LEFT, Ivy.cms().co(CASE_CATEGORIES_CMS))); - scales.addYAxesData(createLinearAxes(CHART_LEGEND_POSITION_BOTTOM, Ivy.cms().co(CATEGORIES_CMS))); - } - - data.addChartDataSet(dataSet); - if (isSetDefaultName) { - options.setTitle(generateChartTitle(StatisticChartType.CASES_BY_CATEGORY, false)); - } - options.setScales(scales); - options.setLegend(buildChartLegend(CHART_LEGEND_POSITION_BOTTOM, false)); - - model.setData(data); - model.setOptions(options); - model.setExtender("casesByCategoryChartExtender"); - return model; - } - - public boolean isTaskByPriority(StatisticChart statisticChart) { - return statisticChart.getType() == StatisticChartType.TASK_BY_PRIORITY; - } - - public boolean isTaskByExpiry(StatisticChart statisticChart) { - return statisticChart.getType() == StatisticChartType.TASK_BY_EXPIRY; - } - - public boolean isTaskByExpiryHour(StatisticChart statisticChart) { - String taskScaleLabel = StringUtils.EMPTY; - - List scales = Optional.ofNullable(statisticChart.getBarChartModel()).map(BarChartModel::getOptions) - .map(BarChartOptions::getScales).map(CartesianScales::getXAxes).orElse(new ArrayList<>()); - if (!scales.isEmpty()) { - taskScaleLabel = Optional.ofNullable(scales.get(0)).map(CartesianAxes::getScaleTitle) - .map(CartesianScaleTitle::getText).orElse(StringUtils.EMPTY); - } - - return statisticChart.getType() == StatisticChartType.TASK_BY_EXPIRY - && taskScaleLabel.contains(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByExpiry/hour")); - } - - public boolean isCaseByState(StatisticChart statisticChart) { - return statisticChart.getType() == StatisticChartType.CASES_BY_STATE; - } - - public boolean isElapsedTimeByCaseCategory(StatisticChart statisticChart) { - return statisticChart.getType() == StatisticChartType.ELAPSED_TIME_BY_CASE_CATEGORY; - } - - public boolean isCaseByFinishedTask(StatisticChart statisticChart) { - return statisticChart.getType() == StatisticChartType.CASES_BY_FINISHED_TASK; - } - - public boolean isCaseByFinishedTime(StatisticChart statisticChart) { - return statisticChart.getType() == StatisticChartType.CASES_BY_FINISHED_TIME; - } - - public boolean isCasesByCategory(StatisticChart statisticChart) { - return statisticChart.getType() == StatisticChartType.CASES_BY_CATEGORY; - } - - /** - * - * @param statisticChartList - */ - public void generateChartModelForStatisticCharts(List statisticChartList) { - if (!statisticChartList.isEmpty()) { - initRolesForSavedChart(statisticChartList); - } - - for (StatisticChart statisticChart : statisticChartList) { - switch (statisticChart.getType()) { - case TASK_BY_PRIORITY: - statisticChart.setDonutChartModel(buildChartModelForTaskPriority(statisticChart)); - break; - case TASK_BY_EXPIRY: - statisticChart.setBarChartModel(buildChartModelForTaskExpiry(statisticChart)); - break; - case CASES_BY_STATE: - statisticChart.setDonutChartModel(buildChartModelForCaseState(statisticChart)); - break; - case ELAPSED_TIME_BY_CASE_CATEGORY: - statisticChart.setBarChartModel(buildChartModelForCaseElapsedTime(statisticChart)); - break; - case CASES_BY_FINISHED_TASK: - statisticChart.setDonutChartModel(buildCharModelForCaseHasFinishedTask(statisticChart)); - break; - case CASES_BY_FINISHED_TIME: - statisticChart.setDonutChartModel(buildChartModelForCaseFinishedTime(statisticChart)); - break; - case CASES_BY_CATEGORY: - statisticChart.setBarChartModel(buildChartModelForCasesByCategory(statisticChart)); - break; - default: - break; - } - - DisplayName currentDisplayName = getDisplayNameInUserLanguageForChart(statisticChart); - statisticChart.setName(currentDisplayName.getValue()); - } - } - - public DisplayName getDisplayNameInUserLanguageForChart(StatisticChart statisticChart) { - String userLanguage = UserUtils.getUserLanguage(); - return CollectionUtils.emptyIfNull(statisticChart.getNames()).stream() - .filter(name -> equalsLanguageLocale(name, userLanguage)) - .findFirst().orElse(new DisplayName()); - } - - /** - * Create placeholder chart for Statistic - * @param statisticChartList - * @return list of statisticChart with placeholder chart - */ - public List generatePlaceholderForChart(List statisticChartList) { - DonutChartModel donutChartModel = createDonutChartPlaceholder(); - BarChartModel barChartModel = createBarChartPlaceholder(); - for (StatisticChart statisticChart : statisticChartList) { - switch (statisticChart.getType()) { - case TASK_BY_PRIORITY: - case CASES_BY_STATE: - case CASES_BY_FINISHED_TASK: - case CASES_BY_FINISHED_TIME: - statisticChart.setDonutChartModel(donutChartModel); - break; - case TASK_BY_EXPIRY: - case ELAPSED_TIME_BY_CASE_CATEGORY: - case CASES_BY_CATEGORY: - statisticChart.setBarChartModel(barChartModel); - break; - default: - break; - } - } - return statisticChartList; - } - - /** - * Create a BarChart's placeholder when Statistic chart is loading - * @return BarChartModel - * - */ - public BarChartModel createBarChartPlaceholder() { - BarChartModel model = new BarChartModel(); - ChartData data = new ChartData(); - BarChartDataSet dataSet = new BarChartDataSet(); - dataSet.setData(new ArrayList<>()); - dataSet.setLabel(Ivy.cms().co(LOADING_MESSAGE)); - data.addChartDataSet(dataSet); - model.setData(data); - return model; - } - - /** - * Create a DonutChart's placeholder when Statistic chart is loading - * @return DonutChartModel - * - */ - public DonutChartModel createDonutChartPlaceholder() { - DonutChartModel model = new DonutChartModel(); - Title title = new Title(); - title.setDisplay(true); - title.setText(Ivy.cms().co(LOADING_MESSAGE)); - model.setOptions(new DonutChartOptions()); - model.getOptions().setTitle(title); - return model; - } - - private DonutChartModel buildChartModelForCaseFinishedTime(StatisticChart statisticChart) { - CaseStateStatistic caseByFinishedTimeData = new CaseStateStatistic(); - if (statisticChart.getFilter() != null) { - caseByFinishedTimeData = - getCaseStateStatisticData(StatisticChartQueryUtils - .generateCaseQueryByFinishedTime(statisticChart.getFilter())); - } - return generateCaseByStateModel(caseByFinishedTimeData, StatisticChartType.CASES_BY_FINISHED_TIME, true); - } - - private DonutChartModel buildCharModelForCaseHasFinishedTask(StatisticChart statisticChart) { - CaseStateStatistic caseByFinishedTaskData = new CaseStateStatistic(); - if (statisticChart.getFilter() != null) { - caseByFinishedTaskData = - getCaseStateStatisticData(StatisticChartQueryUtils.generateCaseQueryForCaseHaveFinishedTask( - statisticChart.getFilter())); - } - return generateCaseByStateModel(caseByFinishedTaskData, StatisticChartType.CASES_BY_FINISHED_TASK, true); - } - - private BarChartModel buildChartModelForCaseElapsedTime(StatisticChart statisticChart) { - ElapsedTimeStatistic elapsedTimeData = new ElapsedTimeStatistic(); - if (statisticChart.getFilter() != null) { - elapsedTimeData = - getElapsedTimeStatisticData(StatisticChartQueryUtils.generateCaseQuery(statisticChart.getFilter(), true)); - } - return generateElapsedTimeModel(elapsedTimeData, true); - } - - private DonutChartModel buildChartModelForCaseState(StatisticChart statisticChart) { - CaseStateStatistic caseStateData = new CaseStateStatistic(); - if (statisticChart.getFilter() != null) { - caseStateData = - getCaseStateStatisticData(StatisticChartQueryUtils.generateCaseQueryForCaseState(statisticChart.getFilter())); - } - return generateCaseByStateModel(caseStateData, StatisticChartType.CASES_BY_STATE, true); - } - - private DonutChartModel buildChartModelForTaskPriority(StatisticChart statisticChart) { - PriorityStatistic taskByPriorityData = new PriorityStatistic(); - if (statisticChart.getFilter() != null) { - taskByPriorityData = - getPriorityStatisticData(StatisticChartQueryUtils.generateTaskQuery(statisticChart.getFilter())); - } - return generateTaskByPriorityModel(taskByPriorityData, true); - } - - private BarChartModel buildChartModelForTaskExpiry(StatisticChart statisticChart) { - if (!statisticChart.getId().contains("_")) { - ExpiryStatistic taskByExpiryData = new ExpiryStatistic(); - if (statisticChart.getFilter() != null) { - taskByExpiryData = - getExpiryStatisticData(StatisticChartQueryUtils.generateTaskQueryForExpiry(statisticChart.getFilter())); - } - return generateTaskByExpiryModel(taskByExpiryData, true, StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY); - } - return statisticChart.getBarChartModel(); - } - - private BarChartModel buildChartModelForCasesByCategory(StatisticChart statisticChart) { - if (!statisticChart.getId().contains("_")) { - CaseCategoryStatistic casesByCategoryData = new CaseCategoryStatistic(); - if (statisticChart.getFilter() != null) { - casesByCategoryData = getCasesByCategoryStatisticData( - StatisticChartQueryUtils.generateCaseQueryForCasesByCategoryChart(statisticChart.getFilter(), null), - statisticChart.getFilter().getCaseCategories().getCategoryPaths()); - } - return generateCasesByCategoryModel(casesByCategoryData, true); - } - return statisticChart.getBarChartModel(); - } - - public static boolean selectThisYear(String selectedItem) { - return StringUtils.containsIgnoreCase(selectedItem, Ivy.cms().co(THIS_YEAR_EXPIRY_KEY)); - } - - public static boolean selectMonthOfYear(String selectedItem) { - if (selectedItem.isEmpty()) { - return false; - } - String[] monthsOfYear = - {Ivy.cms().co(JANUARY_CMS), Ivy.cms().co(FEBRUARY_CMS), Ivy.cms().co(MARCH_CMS), Ivy.cms().co(APRIL_CMS), - Ivy.cms().co(MAY_CMS), Ivy.cms().co(JUNE_CMS), Ivy.cms().co(JULY_CMS), Ivy.cms().co(AUGUST_CMS), - Ivy.cms().co(SEPTEMBER_CMS), Ivy.cms().co(OCTOBER_CMS), Ivy.cms().co(NOVEMBER_CMS), - Ivy.cms().co(DECEMBER_CMS)}; - - return Arrays.asList(monthsOfYear).contains(selectedItem) - || StringUtils.containsIgnoreCase(selectedItem, Ivy.cms().co(THIS_MONTH_EXPIRY_KEY)); - } - - public static boolean selectWeekOfMonth(String selectedItem) { - if (selectedItem.isEmpty()) { - return false; - } - String[] weeksOfMonth = - {Ivy.cms().co(FIRSTWEEK_CMS), Ivy.cms().co(SECONDWEEK_CMS), Ivy.cms().co(THIRDWEEK_CMS), - Ivy.cms().co(FOURTHWEEK_CMS), Ivy.cms().co(FIFTHWEEK_CMS), Ivy.cms().co(SIXTHWEEK_CMS)}; - - return Arrays.asList(weeksOfMonth).contains(selectedItem) - || StringUtils.containsIgnoreCase(selectedItem, Ivy.cms().co(THIS_WEEK_EXPIRY_KEY)); - } - - public static boolean selectDayOfWeek(String selectedItem) { - if (selectedItem.isEmpty()) { - return false; - } - String[] daysOfWeek = - {Ivy.cms().co(MONDAY_CMS), Ivy.cms().co(TUESDAY_CMS), Ivy.cms().co(WEDNESDAY_CMS), Ivy.cms().co(THURSDAY_CMS), - Ivy.cms().co(FRIDAY_CMS), Ivy.cms().co(SATURDAY_CMS), Ivy.cms().co(SUNDAY_CMS)}; - - return Arrays.asList(daysOfWeek).contains(selectedItem) - || StringUtils.containsIgnoreCase(selectedItem, Ivy.cms().co(TODAY_EXPIRY_KEY)); - } - - public static boolean selectHourOfDay(String selectedItem) { - if (selectedItem.isEmpty()) { - return false; - } - String[] hoursOfDay = {BEFORE_8, IN_8, IN_9, IN_10, IN_11, IN_12, IN_13, IN_14, IN_15, IN_16, IN_17, AFTER_18}; - - return Arrays.asList(hoursOfDay).contains(selectedItem); - } - - public StatisticChart drilldownExpiryChart(String selectedValue, StatisticChart selectedChart, - String previousSelectedMonth, String previousSelectedWeek) { - ExpiryStatistic taskByExpiryData = - getExpiryStatisticData(StatisticChartQueryUtils.generateTaskQuery(selectedChart.getFilter())); - StatisticChart newStatisticChart = new StatisticChart(); - newStatisticChart.setId(selectedChart.getId() + "_" + selectedValue); // chart with format: id + _ + suffix is lower - // level (month/week/day/hour) chart when - // drill down - - List newNames = new ArrayList<>(); - for (DisplayName name : selectedChart.getNames()) { - DisplayName newName = new DisplayName(); - newName.setLocale(name.getLocale()); - newName.setValue(name.getValue().concat(" - ").concat(selectedValue)); - newNames.add(newName); - } - - newStatisticChart.setNames(newNames); - newStatisticChart.setName(getDisplayNameInUserLanguageForChart(newStatisticChart).getValue()); - newStatisticChart.setFilter(selectedChart.getFilter()); - newStatisticChart.setType(StatisticChartType.TASK_BY_EXPIRY); - newStatisticChart.setBarChartModel(generateTaskByExpiryModel(taskByExpiryData, true, selectedValue, - previousSelectedMonth, previousSelectedWeek)); - return newStatisticChart; - } - - public StatisticChart drilldownCasesByCategory(String selectedValue, StatisticChart selectedChart) { - CaseCategoryStatistic caseCategoryStatisticData = getCasesByCategoryDrilldownStatisticData( - StatisticChartQueryUtils.generateCaseQueryForCasesByCategoryChart(selectedChart.getFilter(), selectedValue), selectedValue); - StatisticChart newStatisticChart = new StatisticChart(); - newStatisticChart.setId(selectedChart.getId() + "_" + selectedValue); - List newNames = new ArrayList<>(); - for (DisplayName name : selectedChart.getNames()) { - DisplayName newName = new DisplayName(); - newName.setLocale(name.getLocale()); - newName.setValue(name.getValue().concat(" - ").concat(selectedValue)); - newNames.add(newName); - } - newStatisticChart.setNames(newNames); - newStatisticChart.setName(getDisplayNameInUserLanguageForChart(newStatisticChart).getValue()); - newStatisticChart.setFilter(selectedChart.getFilter()); - newStatisticChart.setType(StatisticChartType.CASES_BY_CATEGORY); - newStatisticChart.setBarChartModel(generateCasesByCategoryModel(caseCategoryStatisticData, false)); - return newStatisticChart; - } - - @SuppressWarnings("unchecked") - public static String getSelectedValueOfDonutChart(ItemSelectEvent event) { - try { - List labels = (List) ((DonutChart) event.getSource()).getModel().getData().getLabels(); - int index = event.getItemIndex(); - return labels.get(index); - } catch (Exception e) { - Ivy.log().error(e); - return StringUtils.EMPTY; - } - } - - @SuppressWarnings("unchecked") - public static String getSelectedValueOfBarChart(ItemSelectEvent event) { - try { - List labels = (List) ((BarChart) event.getSource()).getModel().getData().getLabels(); - int index = event.getItemIndex(); - return labels.get(index); - } catch (Exception e) { - Ivy.log().error(e); - return StringUtils.EMPTY; - } - } - - /** - * this method only for chart case by Category - * the labels of chart is name category (CMS) + category delimiter + path category - * Split category delimiter to get path category for case query - * @param event - * @return labels - */ - @SuppressWarnings("unchecked") - public static String getSelectedValueOfBarChartCasesByCategory(ItemSelectEvent event) { - try { - List labels = (List) ((BarChart) event.getSource()).getModel().getData().getLabels(); - int index = event.getItemIndex(); - if(labels.get(index).contains(PARENT_CATEGORY_DELIMITER)) { - return labels.get(index).split(PARENT_CATEGORY_DELIMITER_REGEX)[1]; - } - if(labels.get(index).contains(CHILD_CATEGORY_DELIMITER)) { - return labels.get(index).split(CHILD_CATEGORY_DELIMITER_REGEX)[1]; - } - return labels.get(index); - } catch (Exception e) { - Ivy.log().error(e); - return StringUtils.EMPTY; - } - } - - public static Boolean hasChildNode(String value) { - return !value.contains(PARENT_CATEGORY_DELIMITER); - } - - public boolean checkStatisticChartNameExisted(String chartName, String language) { - List privateCharts = getPrivateConfig(); - List allCharts = new ArrayList<>(privateCharts); - allCharts.addAll(getPublicConfig()); - - Predicate predicate = chart -> CollectionUtils.emptyIfNull(chart.getNames()).stream() - .filter(name -> equalsDisplayName(chartName, language, name)) - .findFirst().isPresent(); - return allCharts.stream() - .filter(predicate) - .findFirst().isPresent(); - } - - private boolean equalsDisplayName(String chartName, String language, DisplayName displayName) { - return equalsLanguageLocale(displayName, language) && StringUtils.equals(displayName.getValue(), chartName); - } - - public static boolean equalsLanguageLocale(DisplayName displayName, String language) { - return StringUtils.equalsIgnoreCase(displayName.getLocale().toString(), language); - } - - public boolean isDefaultChart(List statisticCharts) { - return statisticCharts.stream().anyMatch(StatisticChart::getIsPublic); - } - - public boolean isSame(List first, List second) { - if (CollectionUtils.isEmpty(first) || CollectionUtils.isEmpty(second) || first.size() != second.size()) { - return false; - } - return first.stream().allMatch(s -> second.contains(s)); - } - - public List updateExistedChartsWithNewCharts(List existedCharts) { - List newCharts = getPublicConfig(); - if (CollectionUtils.isEmpty(newCharts)) { - return existedCharts; - } - if (CollectionUtils.isEmpty(existedCharts)) { - return new ArrayList<>(newCharts); - } - - existedCharts.removeAll(filterObsoletedChartsByNewCharts(existedCharts, newCharts)); - existedCharts.stream().sorted(Comparator.comparingLong(StatisticChart::getPosition)).collect(Collectors.toList()); - List allCharts = new ArrayList<>(newCharts); - allCharts.addAll(existedCharts); - return allCharts; - } - - private List filterObsoletedChartsByNewCharts(List targetList, List newCharts) { - List obsoletedCharts = new ArrayList<>(); - for (StatisticChart newChart : newCharts) { - if (newChart.getId() == null) { - continue; - } - targetList.forEach(existedChart -> { - if (existedChart.getId().equals(newChart.getId())) { - obsoletedCharts.add(existedChart); - } - }); - } - return obsoletedCharts; - } - - @Override - public Class getType() { - return StatisticChart.class; - } - - @Override - public String getConfigKey() { - return PortalVariable.STATISTIC_CHART.key; - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/TaskAnalysisFilterService.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/TaskAnalysisFilterService.java deleted file mode 100644 index 8c2a82e4773..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/service/TaskAnalysisFilterService.java +++ /dev/null @@ -1,57 +0,0 @@ -package ch.ivy.addon.portalkit.service; - - -import java.util.ArrayList; -import java.util.List; - -import ch.ivy.addon.portalkit.casefilter.CaseFilter; -import ch.ivy.addon.portalkit.datamodel.internal.TaskAnalysisLazyDataModel; -import ch.ivy.addon.portalkit.taskfilter.TaskFilter; -import ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData; - -public class TaskAnalysisFilterService extends AbstractFilterService { - @Override - public Class getType() { - return TaskAnalysisFilterData.class; - } - - public void applyFilter(TaskAnalysisLazyDataModel dataModel, TaskAnalysisFilterData savedFilterData) - throws ReflectiveOperationException { - applyTaskFilter(dataModel, savedFilterData); - applyCaseFilter(dataModel, savedFilterData); - } - - private void applyTaskFilter(TaskAnalysisLazyDataModel dataModel, TaskAnalysisFilterData savedFilterData) - throws ReflectiveOperationException { - List filters = dataModel.getTaskFilterContainer().getFilters(); - dataModel.setSelectedTaskFilters(new ArrayList<>()); - for (int i = 0; i < filters.size(); i++) { - TaskFilter taskFilter = dataModel.getTaskFilterContainer().getFilters().get(i); - for (int j = 0; j < savedFilterData.getTaskFilters().size(); j++) { - TaskFilter savedTaskFilter = savedFilterData.getTaskFilters().get(j); - if (taskFilter.getClass().equals(savedTaskFilter.getClass())) { - copyFilterValues(taskFilter, savedTaskFilter); - dataModel.getSelectedTaskFilters().add(taskFilter); - break; - } - } - } - } - - public void applyCaseFilter(TaskAnalysisLazyDataModel dataModel, TaskAnalysisFilterData savedFilterData) - throws ReflectiveOperationException { - List filters = dataModel.getCaseFilterContainer().getFilters(); - dataModel.setSelectedCaseFilters(new ArrayList<>()); - for (int i = 0; i < filters.size(); i++) { - CaseFilter filter = dataModel.getCaseFilterContainer().getFilters().get(i); - for (int j = 0; j < savedFilterData.getCaseFilters().size(); j++) { - CaseFilter savedFilter = savedFilterData.getCaseFilters().get(j); - if (filter.getClass().equals(savedFilter.getClass())) { - copyFilterValues(filter, savedFilter); - dataModel.getSelectedCaseFilters().add(filter); - break; - } - } - } - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticCaseCategoryFilter.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticCaseCategoryFilter.java deleted file mode 100644 index ca96b51e52b..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticCaseCategoryFilter.java +++ /dev/null @@ -1,83 +0,0 @@ -package ch.ivy.addon.portalkit.statistics; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.primefaces.model.CheckboxTreeNode; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -import ch.ivy.addon.portalkit.bo.CategoryNode; -import ch.ivy.addon.portalkit.util.CaseTreeUtils; -import ch.ivy.addon.portalkit.util.CaseUtils; -import ch.ivy.addon.portalkit.util.CategoryUtils; -import ch.ivyteam.ivy.workflow.query.CaseQuery; -import ch.ivyteam.ivy.workflow.query.CaseQuery.IFilterQuery; - -public class StatisticCaseCategoryFilter implements Serializable { - - private static final long serialVersionUID = -1200590667880254731L; - - @JsonIgnore - private CheckboxTreeNode[] categories; - @JsonIgnore - private CheckboxTreeNode root; - - private List categoryPaths = new ArrayList<>(); - - public CaseQuery buildQuery() { - if (CollectionUtils.isEmpty(categoryPaths)) { - return null; - } - CaseQuery caseQuery = CaseUtils.createBusinessCaseQuery(); - IFilterQuery filterQuery = caseQuery.where(); - for (String category : categoryPaths) { - if (StringUtils.equals(category, CategoryUtils.NO_CATEGORY)) { - filterQuery.or().category().isEqual(StringUtils.EMPTY); - } else { - filterQuery.or().category().isEqualIgnoreCase(category); - } - } - return caseQuery; - } - - public CheckboxTreeNode[] getCategories() { - return categories; - } - - public void setCategories(CheckboxTreeNode[] categories) { - this.categories = categories; - this.categoryPaths = CategoryUtils.getCategoryPaths(categories); - } - - public CheckboxTreeNode getRoot() { - if (root == null) { - root = CaseTreeUtils.buildCaseCategoryCheckboxTreeRoot(); - } - return root; - } - - public void setRoot(CheckboxTreeNode root) { - this.root = root; - } - - /** - * get Case's category path by data from Tree node component - * @return list of paths for case's category - */ - public List getCategoryPaths() { - return this.categoryPaths; - } - - /** - * set Case's category path to categoryPaths is provided and update categories by the change on Tree - * @param categoryPaths - */ - public void setCategoryPaths(List categoryPaths) { - this.categoryPaths = categoryPaths; - categories = CategoryUtils.recoverSelectedCategories(root, categoryPaths); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChart.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChart.java deleted file mode 100644 index 1baca908bd4..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChart.java +++ /dev/null @@ -1,114 +0,0 @@ -package ch.ivy.addon.portalkit.statistics; - - -import java.util.List; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.primefaces.model.charts.bar.BarChartModel; -import org.primefaces.model.charts.donut.DonutChartModel; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; - -import ch.ivy.addon.portalkit.configuration.AbstractConfiguration; -import ch.ivy.addon.portalkit.dto.DisplayName; -import ch.ivy.addon.portalkit.enums.StatisticChartType; - -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class StatisticChart extends AbstractConfiguration { - private List names; - private StatisticChartType type; - private StatisticFilter filter; - private long position; - private List permissions; - @JsonIgnore - private DonutChartModel donutChartModel; - @JsonIgnore - private BarChartModel barChartModel; - @JsonIgnore - private String name; - - public List getNames() { - return names; - } - - public void setNames(List names) { - this.names = names; - } - - public StatisticChartType getType() { - return type; - } - - public void setType(StatisticChartType type) { - this.type = type; - } - - public long getPosition() { - return position; - } - - public void setPosition(long position) { - this.position = position; - } - - public DonutChartModel getDonutChartModel() { - return donutChartModel; - } - - public void setDonutChartModel(DonutChartModel donutChartModel) { - this.donutChartModel = donutChartModel; - } - - public BarChartModel getBarChartModel() { - return barChartModel; - } - - public void setBarChartModel(BarChartModel barChartModel) { - this.barChartModel = barChartModel; - } - - public StatisticFilter getFilter() { - return filter; - } - - public void setFilter(StatisticFilter filter) { - this.filter = filter; - } - - @Override - public boolean equals(Object object) { - if (object == null) { - return false; - } - StatisticChart chart = (StatisticChart) object; - EqualsBuilder builder = new EqualsBuilder(); - builder.append(getId(), chart.getId()); - return builder.isEquals(); - } - - @Override - public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); - builder.append(getId()); - return builder.hashCode(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getPermissions() { - return permissions; - } - - public void setPermissions(List permissions) { - this.permissions = permissions; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartConstants.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartConstants.java deleted file mode 100644 index db65209109a..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartConstants.java +++ /dev/null @@ -1,100 +0,0 @@ -package ch.ivy.addon.portalkit.statistics; - - -public class StatisticChartConstants { - - public static final String EXPIRED_KEY = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/expired"; - public static final String TODAY_EXPIRY_KEY = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/today"; - public static final String THIS_WEEK_EXPIRY_KEY = - "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByExpiry/thisWeek"; - public static final String THIS_MONTH_EXPIRY_KEY = - "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByExpiry/thisMonth"; - public static final String THIS_YEAR_EXPIRY_KEY = - "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByExpiry/thisYear"; - - public static final String JANUARY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/January"; - public static final String FEBRUARY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/February"; - public static final String MARCH_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/March"; - public static final String APRIL_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/April"; - public static final String MAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/May"; - public static final String JUNE_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/June"; - public static final String JULY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/July"; - public static final String AUGUST_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/August"; - public static final String SEPTEMBER_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/September"; - public static final String OCTOBER_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/October"; - public static final String NOVEMBER_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/November"; - public static final String DECEMBER_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/monthsOfYear/December"; - - public static final String FIRSTWEEK_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/weeksOfMonth/firstWeek"; - public static final String SECONDWEEK_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/weeksOfMonth/secondWeek"; - public static final String THIRDWEEK_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/weeksOfMonth/thirdWeek"; - public static final String FOURTHWEEK_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/weeksOfMonth/fourthWeek"; - public static final String FIFTHWEEK_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/weeksOfMonth/fifthWeek"; - public static final String SIXTHWEEK_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/weeksOfMonth/sixthWeek"; - - public static final String MONDAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/daysOfWeek/monday"; - public static final String TUESDAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/daysOfWeek/tuesday"; - public static final String WEDNESDAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/daysOfWeek/wednesday"; - public static final String THURSDAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/daysOfWeek/thursday"; - public static final String FRIDAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/daysOfWeek/friday"; - public static final String SATURDAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/daysOfWeek/saturday"; - public static final String SUNDAY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/daysOfWeek/sunday"; - - public static final String NEW_CHART_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/defaultChart/newChart"; - - public static final String BEFORE_8 = "<8"; - public static final String IN_8 = "8"; - public static final String IN_9 = "9"; - public static final String IN_10 = "10"; - public static final String IN_11 = "11"; - public static final String IN_12 = "12"; - public static final String IN_13 = "13"; - public static final String IN_14 = "14"; - public static final String IN_15 = "15"; - public static final String IN_16 = "16"; - public static final String IN_17 = "17"; - public static final String AFTER_18 = ">18"; - - public static final String EXCEPTION_PRIORITY_KEY = - "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByPriority/exception"; - public static final String HIGH_PRIORITY_KEY = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByPriority/high"; - public static final String NORMAL_PRIORITY_KEY = - "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByPriority/normal"; - public static final String LOW_PRIORITY_KEY = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByPriority/low"; - - public static final String CREATED_CASE_KEY = "/ch.ivy.addon.portalkit.ui.jsf/caseState/CREATED"; - public static final String RUNNING_CASE_KEY = "/ch.ivy.addon.portalkit.ui.jsf/caseState/RUNNING"; - public static final String DONE_CASE_KEY = "/ch.ivy.addon.portalkit.ui.jsf/caseState/DONE"; - public static final String FAILED_CASE_KEY = "/ch.ivy.addon.portalkit.ui.jsf/caseState/FAILED"; - - public static final String EXPIRY_PERIOD_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/expiryPeriod"; - public static final String TASK_CMS = "/ch.ivy.addon.portalkit.ui.jsf/common/tasks"; - public static final String TASK_DATATIP_CMS = "/ch.ivy.addon.portalkit.ui.jsf/common/tasks"; - public static final String SECOND_DATATIP_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/second"; - public static final String PERCENTAGE_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/Percentage"; - public static final String CASE_CATEGORIES_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/caseCategoriesLabel"; - public static final String NO_CATEGORY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/common/noCategory"; - - public static final String ELAPSED_TIME_DETAIL_CHART_NAME_CMS = "/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/elapsedTimeChart/elapsedTimeInHours"; - - public static final String USER_ID = "userId"; - public static final String NAME = "name"; - - public static final String TASK_QUERY = "taskQuery"; - public static final String CASE_QUERY = "caseQuery"; - public static final String RESULT = "result"; - - public static final String DEFAULT_CHART_ICON = "si-pie-line-graph"; - public static final String DONUT_CHART_ICON = "si-analytics-pie-2"; - public static final String BAR_CHART_ICON = "si-analytics-bars"; - - public static final String CATEGORIES_CMS = "/ch.ivy.addon.portalkit.ui.jsf/common/categories"; - public static final String SELECTED_CATEGORIES = "selectedCategories"; - public static final String SELECTED_CATEGORY = "selectedCategory"; - public static final String PARENT_CATEGORY_DELIMITER = "\\\\"; - public static final String CHILD_CATEGORY_DELIMITER = "\\"; - public static final String PARENT_CATEGORY_DELIMITER_REGEX = "\\\\\\\\"; - public static final String CHILD_CATEGORY_DELIMITER_REGEX = "\\\\"; - - private StatisticChartConstants() {} -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartDrilldownUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartDrilldownUtils.java deleted file mode 100644 index 5c86d2071cb..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartDrilldownUtils.java +++ /dev/null @@ -1,102 +0,0 @@ -package ch.ivy.addon.portalkit.statistics; - -import static org.apache.commons.lang3.StringUtils.EMPTY; - -import org.primefaces.event.ItemSelectEvent; - -import ch.ivy.addon.portalkit.bean.IvyComponentLogicCaller; -import ch.ivy.addon.portalkit.dto.DisplayName; -import ch.ivy.addon.portalkit.jsf.Attrs; -import ch.ivy.addon.portalkit.service.StatisticService; -import ch.ivy.addon.portalkit.util.UserUtils; -import ch.ivyteam.ivy.workflow.query.TaskQuery; - -public class StatisticChartDrilldownUtils { - public static final String CLIENT_ID = "clientId"; - public static final String DRILLDOWN_TASK_PRIORITY_METHOD = "#{logic.drilldownTaskByPriority}"; - public static final String DRILLDOWN_CASE_STATE_METHOD = "#{logic.drilldownCaseByState}"; - public static final String DRILLDOWN_ELAPSED_TIME_METHOD = "#{logic.drilldownElapsedTime}"; - public static final String ONSELECT_DRILLDOWN_TASK_EXPIRY_METHOD = "#{logic.onSelectDrilldownTaskByExpiry}"; - public static final String TOTASK_EXPIRY_TASK_LIST_METHOD = "#{logic.toTaskByExpiryTaskList}"; - public static final String DRILLDOWN_TASK_EXPIRY_METHOD = "#{logic.drilldownTaskByExpiry}"; - public static final String PREVIOUS_SELECTED_MONTH_FIELD = "#{data.previousSelectedMonth}"; - public static final String PREVIOUS_SELECTED_WEEK_FIELD = "#{data.previousSelectedWeek}"; - public static final String PREVIOUS_SELECTED_DAY_FIELD = "#{data.previousSelectedDay}"; - public static final String DRILLDOWN_CASES_BY_CATEGORY_METHOD = "#{logic.drilldownCasesByCategory}"; - public static final String TO_CASES_BY_CATEGORY_CASE_LIST_METHOD = "#{logic.goToCasesByCategoryList}"; - public static final String ONSELECT_DRILLDOWN_CASES_BY_CATEGORY_METHOD = "#{logic.onSelectDrilldownCasesByCategory}"; - - public static void drilldownTaskByPriority(ItemSelectEvent event, StatisticChart chart) { - var taskQuery = StatisticChartQueryUtils.getQueryForSelectedItemOfTaskByPriorityChart(event, chart); - var currentLanguage = UserUtils.getUserLanguage(); - var chartName = chart.getNames().stream() - .filter(name -> StatisticService.equalsLanguageLocale(name, currentLanguage)) - .map(DisplayName::getValue).findFirst().orElse(EMPTY); - callIvyComponentLogic(DRILLDOWN_TASK_PRIORITY_METHOD, new Object[] {chartName, taskQuery}); - } - - public static void drilldownCaseByState(ItemSelectEvent event, StatisticChart chart) { - var caseQuery = StatisticChartQueryUtils.getQueryForSelectedItemByCaseByState(event, chart); - callIvyComponentLogic(DRILLDOWN_CASE_STATE_METHOD, new Object[] {chart, caseQuery}); - } - - public static void drilldownElapsedTime(ItemSelectEvent event, StatisticChart chart) { - var selectedCaseCategory = StatisticService.getSelectedValueOfBarChart(event); - callIvyComponentLogic(DRILLDOWN_ELAPSED_TIME_METHOD, new Object[] {chart, selectedCaseCategory}); - } - - public static void onSelectDrilldownTaskByExpiry(ItemSelectEvent event, StatisticChart chart) { - var selectedDrilldownItem = StatisticService.getSelectedValueOfBarChart(event); - var selectedItemOfDrilldown = StatisticService.getSelectedValueOfBarChart(event); - var isDrilldownToTaskList = StatisticService.selectHourOfDay(selectedDrilldownItem); - var taskQuery = generateQueryForTaskByExpiry(event, chart); - callIvyComponentLogic(ONSELECT_DRILLDOWN_TASK_EXPIRY_METHOD, - new Object[] {isDrilldownToTaskList, selectedItemOfDrilldown, chart, taskQuery}); - } - - public static void toTaskByExpiryTaskList(ItemSelectEvent event, StatisticChart chart) { - var selectedItemOfDrilldown = StatisticService.getSelectedValueOfBarChart(event); - var taskQuery = generateQueryForTaskByExpiry(event, chart); - callIvyComponentLogic(TOTASK_EXPIRY_TASK_LIST_METHOD, new Object[] {selectedItemOfDrilldown, chart, taskQuery}); - } - - public static void drilldownTaskByExpiry(ItemSelectEvent event, StatisticChart chart) { - var selectedItemOfDrilldown = StatisticService.getSelectedValueOfBarChart(event); - callIvyComponentLogic(DRILLDOWN_TASK_EXPIRY_METHOD, new Object[] {chart, selectedItemOfDrilldown}); - } - - public static void onSelectDrilldownCasesByCategory(ItemSelectEvent event, StatisticChart chart) { - var selectedDrilldownItem = StatisticService.getSelectedValueOfBarChart(event); - var isDrilldownToCaseList = StatisticService.hasChildNode(selectedDrilldownItem); - var caseQuery = StatisticChartQueryUtils.getQueryForSelectedItemByCasesByCategory(event, chart); - callIvyComponentLogic(ONSELECT_DRILLDOWN_CASES_BY_CATEGORY_METHOD, - new Object[] {isDrilldownToCaseList, chart, caseQuery}); - } - - public static void drilldownCasesByCategory(ItemSelectEvent event, StatisticChart chart) { - var selectedItemOfDrilldown = StatisticService.getSelectedValueOfBarChartCasesByCategory(event); - callIvyComponentLogic(DRILLDOWN_CASES_BY_CATEGORY_METHOD, new Object[] {chart, selectedItemOfDrilldown}); - } - - public static void toCasesByCategoryCaseList(ItemSelectEvent event, StatisticChart chart) { - var casesQuery = StatisticChartQueryUtils.getQueryForSelectedItemByCasesByCategory(event, chart); - callIvyComponentLogic(TO_CASES_BY_CATEGORY_CASE_LIST_METHOD, new Object[] {chart, casesQuery}); - } - - private static TaskQuery generateQueryForTaskByExpiry(ItemSelectEvent event, StatisticChart statisticChart) { - String previousSelectedMonth = Attrs.currentContext().getAttribute(PREVIOUS_SELECTED_MONTH_FIELD, String.class); - String previousSelectedWeek = Attrs.currentContext().getAttribute(PREVIOUS_SELECTED_WEEK_FIELD, String.class); - String previousSelectedDay = Attrs.currentContext().getAttribute(PREVIOUS_SELECTED_DAY_FIELD, String.class); - return StatisticChartQueryUtils.getQueryForSelectedItemOfTaskByExpiryChart(event, statisticChart, - previousSelectedMonth, previousSelectedWeek, previousSelectedDay); - } - - private static void callIvyComponentLogic(String methodSignature, Object[] paramValues) { - var ivyComponentLogicCaller = new IvyComponentLogicCaller(); - ivyComponentLogicCaller.invokeComponentLogic(getComponentId(), methodSignature, paramValues); - } - - private static String getComponentId() { - return Attrs.currentContext().getBuildInAttribute(CLIENT_ID); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartQueryUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartQueryUtils.java deleted file mode 100644 index beb430c24d4..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartQueryUtils.java +++ /dev/null @@ -1,666 +0,0 @@ -package ch.ivy.addon.portalkit.statistics; - -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.AFTER_18; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.BEFORE_8; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.CREATED_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.DONE_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.EXCEPTION_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FAILED_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.HIGH_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.LOW_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.NORMAL_PRIORITY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.RUNNING_CASE_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.TODAY_EXPIRY_KEY; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.EXCEPTION; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.HIGH; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.LOW; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.NORMAL; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.DateUtils; -import org.primefaces.event.ItemSelectEvent; - -import ch.ivy.addon.portalkit.enums.StatisticChartType; -import ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection; -import ch.ivy.addon.portalkit.service.StatisticService; -import ch.ivy.addon.portalkit.util.CaseUtils; -import ch.ivy.addon.portalkit.util.CategoryUtils; -import ch.ivy.addon.portalkit.util.Dates; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.security.IRole; -import ch.ivyteam.ivy.workflow.CaseState; -import ch.ivyteam.ivy.workflow.TaskState; -import ch.ivyteam.ivy.workflow.WorkflowPriority; -import ch.ivyteam.ivy.workflow.query.CaseQuery; -import ch.ivyteam.ivy.workflow.query.TaskQuery; -import ch.ivyteam.ivy.workflow.query.TaskQuery.IFilterQuery; - -public class StatisticChartQueryUtils { - - private static final String FROM_DATE_KEY = "fromDate"; - private static final String TO_DATE_KEY = "toDate"; - - private StatisticChartQueryUtils() { - - } - - /** - * Get updated task query for Task by Priority chart based on selected item - * - * @param event - * @param statisticChart - * @return updated task query - */ - public static TaskQuery getQueryForSelectedItemOfTaskByPriorityChart(ItemSelectEvent event, StatisticChart statisticChart) { - TaskQuery query = StatisticChartQueryUtils.generateTaskQuery(statisticChart.getFilter()); - String selectedValue = StatisticService.getSelectedValueOfDonutChart(event); - WorkflowPriority priority = null; - - if (selectedValue.equals(Ivy.cms().co(EXCEPTION_PRIORITY_KEY))) { - priority = EXCEPTION; - } else if (selectedValue.equals(Ivy.cms().co(HIGH_PRIORITY_KEY))) { - priority = HIGH; - } else if (selectedValue.equals(Ivy.cms().co(NORMAL_PRIORITY_KEY))) { - priority = NORMAL; - } else if (selectedValue.equals(Ivy.cms().co(LOW_PRIORITY_KEY))) { - priority = LOW; - } - return priority != null ? query.where().and().priority().isEqual(priority) : query; - } - - /** - * Get updated task query for Task by Expiry chart based on selected item - * - * @param event - * @param statisticChart statistic chart - * @param previousSelectedMonth previous selected month - * @param previousSelectedWeek previous selected week - * @param previousSelectedDay previous selected day - * @return updated task query - */ - public static TaskQuery getQueryForSelectedItemOfTaskByExpiryChart(ItemSelectEvent event, StatisticChart statisticChart, String previousSelectedMonth, String previousSelectedWeek, String previousSelectedDay) { - TaskQuery query = StatisticChartQueryUtils.generateTaskQueryForExpiry(statisticChart.getFilter()); - String selectedValue = StatisticService.getSelectedValueOfBarChart(event); - Date fromDate; - Date toDate; - HashMap fromToDateMap; - if (StringUtils.equals(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/barchart/expired"), selectedValue)) { - query.where().isExpired().isEqual(true).and().state().isNotEqual(TaskState.DONE); - return query; - } else if (StatisticService.selectHourOfDay(selectedValue)) { - fromToDateMap = calculateTimeRangeOfSelectedHour(selectedValue, previousSelectedMonth, previousSelectedWeek, previousSelectedDay); - fromDate = fromToDateMap.get(FROM_DATE_KEY); - toDate = fromToDateMap.get(TO_DATE_KEY); - } else if (StatisticService.selectDayOfWeek(selectedValue)) { - fromToDateMap = calculateTimeRangeOfSelectedDay(selectedValue, previousSelectedMonth, previousSelectedWeek); - fromDate = fromToDateMap.get(FROM_DATE_KEY); - toDate = fromToDateMap.get(TO_DATE_KEY); - } else if (StatisticService.selectWeekOfMonth(selectedValue)) { - fromToDateMap = calculateTimeRangeOfSelectedWeek(selectedValue, previousSelectedMonth); - fromDate = fromToDateMap.get(FROM_DATE_KEY); - toDate = fromToDateMap.get(TO_DATE_KEY); - } else if (StatisticService.selectMonthOfYear(selectedValue)) { - fromToDateMap = calculateTimeRangeOfSelectedMonth(selectedValue); - fromDate = fromToDateMap.get(FROM_DATE_KEY); - toDate = fromToDateMap.get(TO_DATE_KEY); - } else { - fromDate = StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfThisYear()); - toDate = DateUtils.addYears(fromDate, 1); - } - - query.where().and().expiryTimestamp().isGreaterOrEqualThan(fromDate).and().expiryTimestamp() - .isLowerThan(toDate).and().isExpired().isEqual(false).and().state().isNotEqual(TaskState.DONE); - - return query; - } - - private static HashMap calculateTimeRangeOfSelectedHour(String selectedValue, String previousSelectedMonth, String previousSelectedWeek, String previousSelectedDay) { - Date fromDate; - Date toDate; - HashMap fromToDate = new HashMap<>(); - Date currentDate; - if (StringUtils.containsIgnoreCase(previousSelectedDay, Ivy.cms().co(TODAY_EXPIRY_KEY))) { - currentDate = new Date(); - } else { - int shiftDays = StatisticChartTimeUtils.getShiftDaysFromDayOfWeek(previousSelectedDay); - currentDate = DateUtils.addDays(StatisticChartTimeUtils.getFirstDateOfWeek(previousSelectedWeek, previousSelectedMonth), shiftDays); - } - - Date dateWithoutTime = StatisticChartTimeUtils.truncateMinutesPart(currentDate); - if (selectedValue.equals(BEFORE_8)) { - fromDate = dateWithoutTime; - toDate = DateUtils.setHours(dateWithoutTime, 8); - } else if (selectedValue.equals(AFTER_18)) { - fromDate = DateUtils.setHours(dateWithoutTime, 18); - toDate = DateUtils.addDays(dateWithoutTime, 1); - } else { - fromDate = DateUtils.setHours(dateWithoutTime, Integer.parseInt(selectedValue)); - toDate = DateUtils.setHours(dateWithoutTime, Integer.parseInt(selectedValue) + 1); - } - fromToDate.put(FROM_DATE_KEY, fromDate); - fromToDate.put(TO_DATE_KEY, toDate); - return fromToDate; - } - - private static HashMap calculateTimeRangeOfSelectedDay(String selectedValue, String previousSelectedMonth, String previousSelectedWeek) { - Date fromDate; - Date toDate; - HashMap fromToDate = new HashMap<>(); - if (StringUtils.containsIgnoreCase(selectedValue, Ivy.cms().co(TODAY_EXPIRY_KEY))) { - fromDate = StatisticChartTimeUtils.truncateMinutesPart(new Date()); - } else { - int shiftDays = StatisticChartTimeUtils.getShiftDaysFromDayOfWeek(selectedValue); - fromDate = DateUtils.addDays(StatisticChartTimeUtils.getFirstDateOfWeek(previousSelectedWeek, previousSelectedMonth), shiftDays); - fromDate = StatisticChartTimeUtils.truncateMinutesPart(fromDate); - } - toDate = DateUtils.addDays(fromDate, 1); - fromToDate.put(FROM_DATE_KEY, fromDate); - fromToDate.put(TO_DATE_KEY, toDate); - return fromToDate; - } - - private static HashMap calculateTimeRangeOfSelectedWeek(String selectedValue, String previousSelectedMonth) { - Date fromDate; - Date toDate; - HashMap fromToDate = new HashMap<>(); - fromDate = StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfWeek(selectedValue, previousSelectedMonth)); - toDate = DateUtils.addWeeks(fromDate, 1); - - if (!StringUtils.isEmpty(previousSelectedMonth)) { - Date firstDateOfMonth = StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfMonth(previousSelectedMonth)); - if (firstDateOfMonth.compareTo(fromDate) > 0) { - fromDate = firstDateOfMonth; - } - Date firstDayOfNextMonth = DateUtils.addMonths(firstDateOfMonth, 1); - if (toDate.compareTo(firstDayOfNextMonth) > 0) { - toDate = firstDayOfNextMonth; - } - } - fromToDate.put(FROM_DATE_KEY, fromDate); - fromToDate.put(TO_DATE_KEY, toDate); - return fromToDate; - } - - private static HashMap calculateTimeRangeOfSelectedMonth(String selectedValue) { - Date fromDate; - Date toDate; - HashMap fromToDate = new HashMap<>(); - fromDate = StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfMonth(selectedValue)); - toDate = DateUtils.addMonths(fromDate, 1); - fromToDate.put(FROM_DATE_KEY, fromDate); - fromToDate.put(TO_DATE_KEY, toDate); - return fromToDate; - } - - /** - * Get updated task query for Case by State chart based on selected item - * - * @param event - * @param statisticChart - * @return case query for selected item by case state - */ - public static CaseQuery getQueryForSelectedItemByCaseByState(ItemSelectEvent event, StatisticChart statisticChart) { - CaseQuery query = CaseUtils.createBusinessCaseQuery(); - if(statisticChart.getType() == StatisticChartType.CASES_BY_STATE){ - query = StatisticChartQueryUtils.generateCaseQueryForCaseState(statisticChart.getFilter()); - } - else if(statisticChart.getType() == StatisticChartType.CASES_BY_FINISHED_TIME) { - query = StatisticChartQueryUtils.generateCaseQueryByFinishedTime(statisticChart.getFilter()); - } - else if(statisticChart.getType() == StatisticChartType.CASES_BY_FINISHED_TASK) { - query = StatisticChartQueryUtils.generateCaseQueryForCaseHaveFinishedTask(statisticChart.getFilter()); - } - - String selectedValue = StatisticService.getSelectedValueOfDonutChart(event); - - if (selectedValue.equals(Ivy.cms().co(CREATED_CASE_KEY))) { - query.where().state().isEqual(CaseState.CREATED); - } else if (selectedValue.equals(Ivy.cms().co(RUNNING_CASE_KEY))) { - query.where().state().isEqual(CaseState.RUNNING); - } else if (selectedValue.equals(Ivy.cms().co(DONE_CASE_KEY))) { - query.where().state().isEqual(CaseState.DONE); - } else if (selectedValue.equals(Ivy.cms().co(FAILED_CASE_KEY))) { - query.where().state().isEqual(CaseState.DESTROYED); - } - - return query; - } - - /** - * Get updated case query for Cases by Category chart based on selected item - * - * @param event - * @param statisticChart - * @return case query for selected item by case category - */ - public static CaseQuery getQueryForSelectedItemByCasesByCategory(ItemSelectEvent event, StatisticChart statisticChart) { - CaseQuery query = CaseUtils.createBusinessCaseQuery(); - query = StatisticChartQueryUtils.generateCaseQueryForCasesByCategoryChart(statisticChart.getFilter(), StatisticService.getSelectedValueOfBarChartCasesByCategory(event)); - return query; - } - - /** - * Generate task query for statistic - * - * @param filter statistic filter - * @return generated task query - */ - public static TaskQuery generateTaskQuery(StatisticFilter filter) { - TaskQuery taskQuery = TaskQuery.create(); - - // Filter by created date - if (!isStartTimeFilterEmpty(filter)) { - taskQuery.where().and(generateTaskQueryForStartTimestamp(filter)); - } - - // Filter by roles - if (!filter.getIsAllRolesSelected()) { - taskQuery.where().and(generateTaskQueryForRoles(filter)); - } - - if (!filter.getIsAllTaskPrioritiesSelected()) { - taskQuery.where().and(generateTaskQueryForTaskPriority(filter)); - } - - if (isGenerateCaseQuery(filter)) { - taskQuery.where().and().cases(generateCaseQuery(filter, false)); - } - - return taskQuery; - } - - private static boolean isStartTimeFilterEmpty(StatisticFilter filter) { - return filter.getTimePeriodSelection() == StatisticTimePeriodSelection.CUSTOM - && filter.getCreatedDateFrom() == null && filter.getCreatedDateTo() == null; - } - - private static boolean isGenerateCaseQuery(StatisticFilter filter) { - return !isStartTimeFilterEmpty(filter) || !filter.getIsAllCaseStatesSelected() - || CollectionUtils.isNotEmpty(filter.getSelectedCaseCategories()) || isCustomFieldFilterNotEmpty(filter); - } - - private static TaskQuery generateTaskQueryForRoles(StatisticFilter filter) { - TaskQuery subTaskQueryForRoles = TaskQuery.create(); - if (CollectionUtils.isNotEmpty(filter.getSelectedRoles())) { - filter.getSelectedRoles().forEach(role -> subTaskQueryForRoles.where().or().activatorName().isEqual(role)); - } else { - subTaskQueryForRoles.where().and().activatorName().isNotLike("#%"); //exclude other users - List roles = CollectionUtils.emptyIfNull(filter.getRoles()).stream().filter(role -> role instanceof IRole).map(role -> (IRole)role).collect(Collectors.toList()); - roles.forEach(role -> subTaskQueryForRoles.where().and().activatorName().isNotEqual(role.getMemberName())); //exclude role - } - - return subTaskQueryForRoles; - } - - private static TaskQuery generateTaskQueryForStartTimestamp(StatisticFilter filter) { - TaskQuery subTaskQueryForCreatedDate = TaskQuery.create(); - if(filter.getTimePeriodSelection() == null || filter.getTimePeriodSelection() == StatisticTimePeriodSelection.CUSTOM){ - Date createdDateFrom = filter.getCreatedDateFrom(); - Date createdDateTo = filter.getCreatedDateTo(); - if (createdDateFrom != null || createdDateTo != null) { - if (createdDateFrom != null) { - subTaskQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(createdDateFrom); - } - if (createdDateTo != null) { - subTaskQueryForCreatedDate.where().startTimestamp().isLowerOrEqualThan(createdDateTo); - } - } - } else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_WEEK){ - subTaskQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(Dates.getMondayOfLastWeek()); - subTaskQueryForCreatedDate.where().startTimestamp().isLowerOrEqualThan(Dates.getSundayOfLastWeek()); - } else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_MONTH) { - subTaskQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLastMonth()); - subTaskQueryForCreatedDate.where().startTimestamp().isLowerOrEqualThan(Dates.getLastDayOfLastMonth()); - } else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_6_MONTH){ - subTaskQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLast6Month()); - } - return subTaskQueryForCreatedDate; - } - - /** - * Generate task query for expiry statistic - * - * @param filter statistic filter - * @return generated task query - */ - public static TaskQuery generateTaskQueryForExpiry(StatisticFilter filter) { - TaskQuery taskQuery = generateTaskQuery(filter); - filterOnlyTasksExpireInThisYear(taskQuery); - return taskQuery; - } - - /** - * Generate case query for statistic - * - * @param filter statistic filter - * @param isElapsedStatistic for elapsed statistic - * @return generated case query - */ - public static CaseQuery generateCaseQuery(StatisticFilter filter, boolean isElapsedStatistic) { - CaseQuery caseQuery = CaseUtils.createBusinessCaseQuery(); - - // Filter by created date - if (!isStartTimeFilterEmpty(filter)) { - caseQuery.where().and(generateCaseQueryForStartTimestamp(filter)); - } - - // Filter by case state - if (!filter.getIsAllCaseStatesSelected()) { - caseQuery.where().and(generateCaseQueryForCaseState(filter, isElapsedStatistic)); - } - // Filter by case category - if (isCaseCategoriesNotEmpty(filter)) { - CaseQuery query = generateCaseQueryForCaseCategory(filter); - if (query != null) { - caseQuery.where().and(query); - } - } - - // Filter by custom field - if (isCustomFieldFilterNotEmpty(filter)) { - generateCaseQueryForCustomField(filter, caseQuery); - } - return caseQuery; - } - - private static boolean isCustomFieldFilterNotEmpty(StatisticFilter filter) { - return filter.getCustomFieldFilters() != null && !filter.getCustomFieldFilters().values().isEmpty(); - } - - private static CaseQuery generateCaseQueryForCaseState(StatisticFilter filter, boolean forElapsedStatistic) { - List selectedCaseStates = Optional.ofNullable(filter.getSelectedCaseStates()).orElse(new ArrayList<>()); - CaseQuery subCaseQueryForSelectedCaseStates = CaseUtils.createBusinessCaseQuery(); - - if (selectedCaseStates.isEmpty()) { - List caseStates = Arrays.asList(CaseState.values()); - caseStates.forEach(caseState -> subCaseQueryForSelectedCaseStates.where().and().state().isNotEqual(caseState)); - } else if (forElapsedStatistic) { - subCaseQueryForSelectedCaseStates.where().or().state().isEqual(CaseState.DONE); - } else { - selectedCaseStates.forEach(caseState -> subCaseQueryForSelectedCaseStates.where().or().state().isEqual(caseState)); - } - return subCaseQueryForSelectedCaseStates; - } - - private static CaseQuery generateCaseQueryForStartTimestamp(StatisticFilter filter) { - CaseQuery subCaseQueryForCreatedDate = CaseUtils.createBusinessCaseQuery(); - if(filter.getTimePeriodSelection() == null || filter.getTimePeriodSelection() == StatisticTimePeriodSelection.CUSTOM){ - Date createdDateFrom = filter.getCreatedDateFrom(); - Date createdDateTo = filter.getCreatedDateTo(); - if (createdDateFrom != null || createdDateTo != null) { - - if (createdDateFrom != null) { - subCaseQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(createdDateFrom); - } - if (createdDateTo != null) { - subCaseQueryForCreatedDate.where().startTimestamp().isLowerOrEqualThan(createdDateTo); - } - } - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_WEEK){ - subCaseQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(Dates.getMondayOfLastWeek()); - subCaseQueryForCreatedDate.where().startTimestamp().isLowerOrEqualThan(Dates.getSundayOfLastWeek()); - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_MONTH) { - subCaseQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLastMonth()); - subCaseQueryForCreatedDate.where().startTimestamp().isLowerOrEqualThan(Dates.getLastDayOfLastMonth()); - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_6_MONTH) { - subCaseQueryForCreatedDate.where().startTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLast6Month()); - } - return subCaseQueryForCreatedDate; - } - - private static void generateCaseQueryForRole(StatisticFilter filter, CaseQuery caseQuery) { - TaskQuery taskQuery = TaskQuery.create(); - taskQuery.where().and(generateTaskQueryForRoles(filter)); - caseQuery.where().and().tasks(taskQuery); - } - - /** - * generate case query for case which having finished task - * @param filter - * @return case query for case which having finished task - */ - public static CaseQuery generateCaseQueryForCaseHaveFinishedTask(StatisticFilter filter) { - CaseQuery caseQuery = generateCaseQuery(filter, false); - caseQuery.where().and().tasks(generateTaskQueryForFinishedTask(filter)); - return caseQuery; - } - - /** - * generate case query by finished time - * @param filter - * @return case query by finished time - */ - public static CaseQuery generateCaseQueryByFinishedTime(StatisticFilter filter) { - CaseQuery caseQuery = CaseUtils.createBusinessCaseQuery(); - // Filter by finished date - generateCaseQueryForEndTimestamp(filter, caseQuery); - - // Filter by case state - List selectedCaseStates = Optional.ofNullable(filter.getSelectedCaseStates()).orElse(new ArrayList<>()); - CaseQuery subCaseQueryForSelectedCaseStates = CaseUtils.createBusinessCaseQuery(); - ch.ivyteam.ivy.workflow.query.CaseQuery.IFilterQuery subCaseFilterForSelectedCaseStates = - subCaseQueryForSelectedCaseStates.where(); - - if (selectedCaseStates.contains(CaseState.DONE)) { - subCaseFilterForSelectedCaseStates.and().state().isEqual(CaseState.DONE); - } - else { - //if user don't choose Done state, generate query to get no information - subCaseFilterForSelectedCaseStates.and().state().isEqual(CaseState.DONE); - subCaseFilterForSelectedCaseStates.and().state().isEqual(CaseState.RUNNING); - } - caseQuery.where().and(subCaseQueryForSelectedCaseStates); - - if (isCaseCategoriesNotEmpty(filter)) { - CaseQuery query = generateCaseQueryForCaseCategory(filter); - if (query != null) { - caseQuery.where().and(query); - } - } - - // Filter by customVarChar - generateCaseQueryForCustomField(filter, caseQuery); - - return caseQuery; - } - - /** - * generate case query for case by state - * - * @param filter - * @return case query for case by state - */ - public static CaseQuery generateCaseQueryForCaseState(StatisticFilter filter) { - CaseQuery caseQuery = CaseUtils.createBusinessCaseQuery(); - if (isGenerateCaseQuery(filter)) { - caseQuery = StatisticChartQueryUtils.generateCaseQuery(filter, false); - } - if (!filter.getIsAllRolesSelected()) { - generateCaseQueryForRole(filter, caseQuery); - } - return caseQuery; - } - - private static void generateCaseQueryForEndTimestamp(StatisticFilter filter, CaseQuery caseQuery) { - CaseQuery subCaseQueryForCreatedDate = CaseUtils.createBusinessCaseQuery(); - ch.ivyteam.ivy.workflow.query.CaseQuery.IFilterQuery subCaseFilterForCreatedDate = subCaseQueryForCreatedDate.where(); - if(filter.getTimePeriodSelection() == null || filter.getTimePeriodSelection() == StatisticTimePeriodSelection.CUSTOM){ - Date startTimePeriod = filter.getCreatedDateFrom(); - Date endTimePeriod = filter.getCreatedDateTo(); - if (startTimePeriod != null || endTimePeriod != null) { - - if (startTimePeriod != null) { - subCaseFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(startTimePeriod); - } - if (endTimePeriod != null) { - subCaseFilterForCreatedDate.endTimestamp().isLowerOrEqualThan(endTimePeriod); - } - caseQuery.where().and(subCaseQueryForCreatedDate); - } - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_WEEK){ - subCaseFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(Dates.getMondayOfLastWeek()); - subCaseFilterForCreatedDate.endTimestamp().isLowerOrEqualThan(Dates.getSundayOfLastWeek()); - caseQuery.where().and(subCaseQueryForCreatedDate); - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_MONTH) { - subCaseFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLastMonth()); - subCaseFilterForCreatedDate.endTimestamp().isLowerOrEqualThan(Dates.getLastDayOfLastMonth()); - caseQuery.where().and(subCaseQueryForCreatedDate); - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_6_MONTH) { - subCaseFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLast6Month()); - caseQuery.where().and(subCaseQueryForCreatedDate); - } - caseQuery.where().and().endTimestamp().isNotNull(); - } - - private static TaskQuery generateTaskQueryForFinishedTask(StatisticFilter filter) { - TaskQuery taskQuery = TaskQuery.create(); - - // Filter by end date - taskQuery.where().and(generateTaskQueryForEndTimestamp(filter)); - taskQuery.where().and().endTimestamp().isNotNull(); - - //Filter by DONE state - taskQuery.where().and().state().isEqual(TaskState.DONE); - - //Filter by role which finished task - if(!filter.getIsAllRolesSelected()) { - taskQuery.where().and(generateTaskQueryForRoles(filter)); - } - - // Filter by task priority - if(!filter.getIsAllTaskPrioritiesSelected()) { - taskQuery.where().and(generateTaskQueryForTaskPriority(filter)); - } - - return taskQuery; - } - - private static boolean isCaseCategoriesNotEmpty(StatisticFilter filter) { - return (CollectionUtils.isNotEmpty(filter.getSelectedCaseCategories())) - || (filter.getCaseCategories() != null && filter.getCaseCategories().getCategories() != null && filter.getCaseCategories().getCategories().length > 0); - } - - private static CaseQuery generateCaseQueryForCaseCategory(StatisticFilter filter) { - return Optional.ofNullable(filter).map(StatisticFilter::getCaseCategories).map(StatisticCaseCategoryFilter::buildQuery).orElse(null); - } - - private static TaskQuery generateTaskQueryForEndTimestamp(StatisticFilter filter) { - TaskQuery subTaskQueryForCreatedDate = TaskQuery.create(); - IFilterQuery subTaskFilterForCreatedDate = subTaskQueryForCreatedDate.where(); - if(filter.getTimePeriodSelection() == null || filter.getTimePeriodSelection() == StatisticTimePeriodSelection.CUSTOM){ - Date createdDateFrom = filter.getCreatedDateFrom(); - Date createdDateTo = filter.getCreatedDateTo(); - if (createdDateFrom != null || createdDateTo != null) { - if (createdDateFrom != null) { - subTaskFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(createdDateFrom); - } - if (createdDateTo != null) { - subTaskFilterForCreatedDate.endTimestamp().isLowerOrEqualThan(createdDateTo); - } - } - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_WEEK){ - subTaskFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(Dates.getMondayOfLastWeek()); - subTaskFilterForCreatedDate.endTimestamp().isLowerOrEqualThan(Dates.getSundayOfLastWeek()); - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_MONTH) { - subTaskFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLastMonth()); - subTaskFilterForCreatedDate.endTimestamp().isLowerOrEqualThan(Dates.getLastDayOfLastMonth()); - } - else if (filter.getTimePeriodSelection() == StatisticTimePeriodSelection.LAST_6_MONTH){ - subTaskFilterForCreatedDate.endTimestamp().isGreaterOrEqualThan(Dates.getFirstDayOfLast6Month()); - } - return subTaskQueryForCreatedDate; - } - - private static TaskQuery generateTaskQueryForTaskPriority(StatisticFilter filter) { - List selectedPriorities = - Optional.ofNullable(filter.getSelectedTaskPriorities()).orElse(new ArrayList<>()); - TaskQuery subTaskQueryForPriority = TaskQuery.create(); - if (!selectedPriorities.isEmpty()) { - selectedPriorities.forEach(priority -> subTaskQueryForPriority.where().or().priority().isEqual(priority)); - } else { - List priorities = Optional.ofNullable(filter.getTaskPriorities()).orElse(new ArrayList<>()); - priorities.forEach(priority -> subTaskQueryForPriority.where().and().priority().isNotEqual(priority)); - } - return subTaskQueryForPriority; - } - - private static void filterOnlyTasksExpireInThisYear(TaskQuery taskQuery) { - Date firsDateOfThisYear = StatisticChartTimeUtils.truncateMinutesPart(StatisticChartTimeUtils.getFirstDateOfThisYear()); - Date firsDateOfNextYear = StatisticChartTimeUtils.truncateMinutesPart(DateUtils.addYears(firsDateOfThisYear, 1)); - - TaskQuery taskQueryForExpiryDate = TaskQuery.create(); - IFilterQuery filterQueryForExpiryDate = taskQueryForExpiryDate.where(); - filterQueryForExpiryDate.and().state().isNotEqual(TaskState.DESTROYED).and().expiryTimestamp().isGreaterOrEqualThan(firsDateOfThisYear).and().expiryTimestamp() - .isLowerThan(firsDateOfNextYear).and().expiryTimestamp().isNotNull(); - - taskQuery.where().and(taskQueryForExpiryDate); - } - - private static void generateCaseQueryForCustomField(StatisticFilter filter, CaseQuery caseQuery) { - Map> customFieldFilters = filter.getCustomFieldFilters(); - if (customFieldFilters != null) { - customFieldFilters.forEach((k,v) -> { - if (CollectionUtils.isNotEmpty(v)) { - CaseQuery subTaskQueryForCustomVarCharField = CaseUtils.createBusinessCaseQuery(); - ch.ivyteam.ivy.workflow.query.CaseQuery.IFilterQuery subCaseFilterForCustomVarCharField = subTaskQueryForCustomVarCharField.where(); - v.forEach(item -> subCaseFilterForCustomVarCharField.or().customField().stringField(k).isEqual(item)); - caseQuery.where().and(subTaskQueryForCustomVarCharField); - } - }); - } - } - - /** - * Generate case query for statistic - * - * @param filter statistic filter - * @param selectedCategoryValue for selected category - * @return generated case query - */ - public static CaseQuery generateCaseQueryForCasesByCategoryChart(StatisticFilter filter, String selectedCategoryValue) { - CaseQuery caseQuery = CaseUtils.createBusinessCaseQuery(); - - // Filter by created date - if (!isStartTimeFilterEmpty(filter)) { - caseQuery.where().and(generateCaseQueryForStartTimestamp(filter)); - } - - // Filter by case state - if (!filter.getIsAllCaseStatesSelected()) { - caseQuery.where().and(generateCaseQueryForCaseState(filter)); - } - // Filter by case category - if (isCaseCategoriesNotEmpty(filter)) { - CaseQuery query = generateCaseQueryForCaseCategory(filter); - if (query != null) { - caseQuery.where().and(query); - } - } - if(StringUtils.isNotBlank(selectedCategoryValue)) { - if(selectedCategoryValue.equalsIgnoreCase(Ivy.cms().co(CategoryUtils.NO_CATEGORY_CMS))) { - caseQuery.where().and().category().isEqual(StringUtils.EMPTY); - } else { - caseQuery.where().and().category().isLike("%"+selectedCategoryValue.trim()+"%"); - } - } - return caseQuery; - } -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartTimeUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartTimeUtils.java deleted file mode 100644 index f1fa629e258..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticChartTimeUtils.java +++ /dev/null @@ -1,150 +0,0 @@ -package ch.ivy.addon.portalkit.statistics; - -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.APRIL_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.AUGUST_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.DECEMBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FEBRUARY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FIFTHWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FIRSTWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FOURTHWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.FRIDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.JANUARY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.JULY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.JUNE_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.MARCH_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.MAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.MONDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.NOVEMBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.OCTOBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SATURDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SECONDWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SEPTEMBER_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SIXTHWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.SUNDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THIRDWEEK_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THIS_MONTH_EXPIRY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THIS_WEEK_EXPIRY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.THURSDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.TODAY_EXPIRY_KEY; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.TUESDAY_CMS; -import static ch.ivy.addon.portalkit.statistics.StatisticChartConstants.WEDNESDAY_CMS; - -import java.util.Arrays; -import java.util.Calendar; -import java.util.Date; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.DateUtils; - -import ch.ivyteam.ivy.environment.Ivy; - -public class StatisticChartTimeUtils { - - private StatisticChartTimeUtils() { - - } - - public static int getShiftDaysFromDayOfWeek(String dayOfWeek) { - int shiftDays = 0; - if (dayOfWeek.equals(Ivy.cms().co(MONDAY_CMS))) { - shiftDays = 0; - } else if (dayOfWeek.equals(Ivy.cms().co(TUESDAY_CMS))) { - shiftDays = 1; - } else if (dayOfWeek.equals(Ivy.cms().co(WEDNESDAY_CMS))) { - shiftDays = 2; - } else if (dayOfWeek.equals(Ivy.cms().co(THURSDAY_CMS))) { - shiftDays = 3; - } else if (dayOfWeek.equals(Ivy.cms().co(FRIDAY_CMS))) { - shiftDays = 4; - } else if (dayOfWeek.equals(Ivy.cms().co(SATURDAY_CMS))) { - shiftDays = 5; - } else if (dayOfWeek.equals(Ivy.cms().co(SUNDAY_CMS))) { - shiftDays = 6; - } - return shiftDays; - } - - public static Date getFirstDateOfThisMonth() { - Calendar calendar = Calendar.getInstance(); - while (calendar.get(Calendar.DAY_OF_MONTH) > 1) { - calendar.add(Calendar.DATE, -1); - } - return calendar.getTime(); - } - - public static Date getFirstDateOfMonth(String selectedMonth) { - if (StringUtils.containsIgnoreCase(selectedMonth, Ivy.cms().co(THIS_MONTH_EXPIRY_KEY))) { - return getFirstDateOfThisMonth(); - } - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.DAY_OF_MONTH, 1); - String[] monthsOfYear = - {Ivy.cms().co(JANUARY_CMS), Ivy.cms().co(FEBRUARY_CMS), Ivy.cms().co(MARCH_CMS), Ivy.cms().co(APRIL_CMS), - Ivy.cms().co(MAY_CMS), Ivy.cms().co(JUNE_CMS), Ivy.cms().co(JULY_CMS), Ivy.cms().co(AUGUST_CMS), - Ivy.cms().co(SEPTEMBER_CMS), Ivy.cms().co(OCTOBER_CMS), Ivy.cms().co(NOVEMBER_CMS), - Ivy.cms().co(DECEMBER_CMS)}; - int monthIndex = Arrays.asList(monthsOfYear).indexOf(selectedMonth); - cal.set(Calendar.MONTH, monthIndex); - return cal.getTime(); - } - - public static Date getFirstDateOfWeek(String selectedWeek, String selectedMonth) { - - Date firstDateOfWeek = new Date(); - if (StringUtils.containsIgnoreCase(selectedWeek, Ivy.cms().co(THIS_WEEK_EXPIRY_KEY))) { - firstDateOfWeek = getFirstDateOfWeekContainsDate(new Date()); - } else { - Date firstDateOfMonth = getFirstDateOfMonth(selectedMonth); - Date firstDateOfFirstWeek = getFirstDateOfWeekContainsDate(firstDateOfMonth); - if (StringUtils.containsIgnoreCase(selectedWeek, Ivy.cms().co(FIRSTWEEK_CMS))) { - firstDateOfWeek = firstDateOfFirstWeek; - } else if (StringUtils.containsIgnoreCase(selectedWeek, Ivy.cms().co(SECONDWEEK_CMS))) { - firstDateOfWeek = truncateMinutesPart(DateUtils.addWeeks(firstDateOfFirstWeek, 1)); - } else if (StringUtils.containsIgnoreCase(selectedWeek, Ivy.cms().co(THIRDWEEK_CMS))) { - firstDateOfWeek = truncateMinutesPart(DateUtils.addWeeks(firstDateOfFirstWeek, 2)); - } else if (StringUtils.containsIgnoreCase(selectedWeek, Ivy.cms().co(FOURTHWEEK_CMS))) { - firstDateOfWeek = truncateMinutesPart(DateUtils.addWeeks(firstDateOfFirstWeek, 3)); - } else if (StringUtils.containsIgnoreCase(selectedWeek, Ivy.cms().co(FIFTHWEEK_CMS))) { - firstDateOfWeek = truncateMinutesPart(DateUtils.addWeeks(firstDateOfFirstWeek, 4)); - } else if (StringUtils.containsIgnoreCase(selectedWeek, Ivy.cms().co(SIXTHWEEK_CMS))) { - firstDateOfWeek = truncateMinutesPart(DateUtils.addWeeks(firstDateOfFirstWeek, 5)); - } - } - - return firstDateOfWeek; - } - - public static Date getFirstDateOfWeekContainsDate(Date containedDate) { - Calendar calendar = Calendar.getInstance(); - calendar.setTime(containedDate); - while (calendar.get(Calendar.DAY_OF_WEEK) > Calendar.MONDAY) { - calendar.add(Calendar.DATE, -1); - } - return calendar.getTime(); - } - - public static boolean isSameDay(Date resultDate, String selectedDay, String previousSelectedWeek, - String previousSelectedMonth) { - int shiftDays = 0; - if (StringUtils.containsIgnoreCase(selectedDay, Ivy.cms().co(TODAY_EXPIRY_KEY))) { - return DateUtils.isSameDay(resultDate, new Date()); - } else { - shiftDays = getShiftDaysFromDayOfWeek(selectedDay); - } - - Date compareDate = DateUtils.addDays(getFirstDateOfWeek(previousSelectedWeek, previousSelectedMonth), shiftDays); - return DateUtils.isSameDay(resultDate, compareDate); - } - - public static Date getFirstDateOfThisYear() { - Calendar calendar = Calendar.getInstance(); - while (calendar.get(Calendar.DAY_OF_YEAR) > 1) { - calendar.add(Calendar.DATE, -1); - } - return calendar.getTime(); - } - - public static Date truncateMinutesPart(Date date) { - return DateUtils.truncate(date, Calendar.DATE); - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticFilter.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticFilter.java deleted file mode 100644 index 768270ee0fa..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/statistics/StatisticFilter.java +++ /dev/null @@ -1,357 +0,0 @@ -package ch.ivy.addon.portalkit.statistics; - -import static ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection.CUSTOM; -import static ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection.LAST_6_MONTH; -import static ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection.LAST_MONTH; -import static ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection.LAST_WEEK; -import static ch.ivyteam.ivy.workflow.CaseState.CREATED; -import static ch.ivyteam.ivy.workflow.CaseState.DONE; -import static ch.ivyteam.ivy.workflow.CaseState.RUNNING; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.EXCEPTION; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.HIGH; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.LOW; -import static ch.ivyteam.ivy.workflow.WorkflowPriority.NORMAL; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; - -import ch.ivy.addon.portalkit.enums.AdditionalProperty; -import ch.ivy.addon.portalkit.enums.StatisticTimePeriodSelection; -import ch.ivy.addon.portalkit.util.PermissionUtils; -import ch.ivyteam.ivy.environment.Ivy; -import ch.ivyteam.ivy.security.IRole; -import ch.ivyteam.ivy.workflow.CaseState; -import ch.ivyteam.ivy.workflow.WorkflowPriority; - -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class StatisticFilter implements Cloneable { - - private StatisticTimePeriodSelection timePeriodSelection = StatisticTimePeriodSelection.CUSTOM; - @JsonIgnore - private List allTimePeriodSelection = Arrays.asList(CUSTOM, LAST_WEEK, LAST_MONTH, LAST_6_MONTH); - private Date createdDateFrom; - private Date createdDateTo; - - @JsonIgnore - private StatisticCaseCategoryFilter caseCategories = new StatisticCaseCategoryFilter(); - private List selectedCaseCategories = new ArrayList<>(); - private boolean isAllCategoriesSelected; - - @JsonIgnore - private List roles = new ArrayList<>(); - private List selectedRoles = new ArrayList<>(); - private boolean isAllRolesSelected = true; - - @JsonIgnore - private List caseStates = new ArrayList<>(Arrays.asList(CREATED, RUNNING, DONE)); - private List selectedCaseStates = new ArrayList<>(); - private boolean isAllCaseStatesSelected = true; - - @JsonIgnore - private List taskPriorities = Arrays.asList(EXCEPTION, HIGH, NORMAL, LOW); - private List selectedTaskPriorities = new ArrayList<>(); - private boolean isAllTaskPrioritiesSelected = true; - private Map> customFieldFilters; - - private List selectedCustomVarCharFields1 = new ArrayList<>(); - private List selectedCustomVarCharFields2 = new ArrayList<>(); - private List selectedCustomVarCharFields3 = new ArrayList<>(); - private List selectedCustomVarCharFields4 = new ArrayList<>(); - private List selectedCustomVarCharFields5 = new ArrayList<>(); - - public void init() { - initCustomFieldFromDeprecatedCustomVarChar(); - List distinctRoles = findDistinctRoles(); - - this.roles.add(Ivy.session().getSessionUser()); - this.roles.addAll(distinctRoles); - - this.selectedRoles = new ArrayList<>(distinctRoles.stream().map(IRole::getMemberName).collect(Collectors.toList())); - this.selectedRoles.add(0, Ivy.session().getSessionUser().getMemberName()); - - // Initialize list of case states - extendCaseStatesForAdmin(); - this.selectedCaseStates = new ArrayList<>(this.caseStates); - - // Initialize list of task priorities - this.selectedTaskPriorities = new ArrayList<>(this.taskPriorities); - - // Initialize list of case categories - caseCategories = new StatisticCaseCategoryFilter(); - } - - private void extendCaseStatesForAdmin() { - if (PermissionUtils.checkReadAllCasesPermission() && !caseStates.contains(CaseState.DESTROYED)) { - caseStates.add(CaseState.DESTROYED); - } - } - - private List findDistinctRoles() { - List allRoles = Ivy.session().getSessionUser().getAllRoles(); - allRoles.removeIf(role -> role.getProperty(AdditionalProperty.HIDE.toString()) != null); - List distinctRoles = allRoles - .stream() - .sorted((r1, r2) -> StringUtils.compareIgnoreCase(r1.getDisplayName(), r2.getDisplayName())) - .collect(Collectors.toList()); - return distinctRoles; - } - - public void initRoles() { - this.roles.clear(); - this.roles.add(Ivy.session().getSessionUser()); - this.roles.addAll(findDistinctRoles()); - } - - public Date getCreatedDateFrom() { - return createdDateFrom; - } - - public void setCreatedDateFrom(Date createdDateFrom) { - this.createdDateFrom = createdDateFrom; - } - - public Date getCreatedDateTo() { - return createdDateTo; - } - - public void setCreatedDateTo(Date createdDateTo) { - this.createdDateTo = createdDateTo; - } - - public StatisticCaseCategoryFilter getCaseCategories() { - return caseCategories; - } - - public void setCaseCategories(StatisticCaseCategoryFilter caseCategories) { - this.caseCategories = caseCategories; - } - - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - - public List getSelectedRoles() { - return selectedRoles; - } - - public void setSelectedRoles(List selectedRoles) { - this.selectedRoles = selectedRoles; - } - - public List getCaseStates() { - return caseStates; - } - - public void setCaseStates(List caseStates) { - this.caseStates = caseStates; - } - - public List getSelectedCaseStates() { - return selectedCaseStates; - } - - public void setSelectedCaseStates(List selectedCaseStates) { - this.selectedCaseStates = selectedCaseStates; - } - - public List getTaskPriorities() { - return taskPriorities; - } - - public void setTaskPriorities(List taskPriorities) { - this.taskPriorities = taskPriorities; - } - - public List getSelectedTaskPriorities() { - return selectedTaskPriorities; - } - - public void setSelectedTaskPriorities(List selectedTaskPriorities) { - this.selectedTaskPriorities = selectedTaskPriorities; - } - - public String getCaseStateName(CaseState state) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/caseState/" + state); - } - - public String getPriorityName(WorkflowPriority priority) { - return Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/taskPriority/" + priority); - } - - public StatisticTimePeriodSelection getTimePeriodSelection() { - return timePeriodSelection; - } - - public void setTimePeriodSelection(StatisticTimePeriodSelection timePeriodSelection) { - this.timePeriodSelection = timePeriodSelection; - } - - public List getAllTimePeriodSelection() { - return allTimePeriodSelection; - } - - public void setAllTimePeriodSelection(List allTimePeriodSelection) { - this.allTimePeriodSelection = allTimePeriodSelection; - } - - @Deprecated - public boolean getIsAllCategoriesSelected() { - return isAllCategoriesSelected; - } - - @Deprecated - public void setIsAllCategoriesSelected(boolean isAllCategoriesSelected) { - this.isAllCategoriesSelected = isAllCategoriesSelected; - // For migration - if (isAllCategoriesSelected && this.caseCategories != null) { - this.caseCategories.setCategoryPaths(new ArrayList<>()); - } - } - - public List getSelectedCaseCategories() { - return selectedCaseCategories; - } - - public void setSelectedCaseCategories(List selectedCaseCategories) { - this.selectedCaseCategories = selectedCaseCategories; - if (this.caseCategories != null) { - this.caseCategories.setCategoryPaths(selectedCaseCategories); - } - } - - public boolean getIsAllRolesSelected() { - return isAllRolesSelected; - } - - public void setIsAllRolesSelected(boolean isAllRolesSelected) { - this.isAllRolesSelected = isAllRolesSelected; - } - - public boolean getIsAllCaseStatesSelected() { - return isAllCaseStatesSelected; - } - - public void setIsAllCaseStatesSelected(boolean isAllCaseStatesSelected) { - this.isAllCaseStatesSelected = isAllCaseStatesSelected; - } - - public boolean getIsAllTaskPrioritiesSelected() { - return isAllTaskPrioritiesSelected; - } - - public void setIsAllTaskPrioritiesSelected(boolean isAllTaskPrioritiesSelected) { - this.isAllTaskPrioritiesSelected = isAllTaskPrioritiesSelected; - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public Map> getCustomFieldFilters() { - return customFieldFilters; - } - - public void setCustomFieldFilters(Map> customFieldFilters) { - this.customFieldFilters = customFieldFilters; - } - - public List getCustomFieldFilter(String customFieldName) { - return this.customFieldFilters.get(customFieldName); - } - - public List findSavedCustomFields(){ - if (customFieldFilters == null) { - initCustomFieldFromDeprecatedCustomVarChar(); - } - return customFieldFilters.entrySet() - .stream() - .filter(item -> CollectionUtils.isNotEmpty(item.getValue())) - .map(Map.Entry::getKey) - .collect(Collectors.toList()); - } - - @Deprecated - public List getSelectedCustomVarCharFields1() { - return selectedCustomVarCharFields1; - } - - @Deprecated - public void setSelectedCustomVarCharFields1(List selectedCustomVarCharFields1) { - this.selectedCustomVarCharFields1 = selectedCustomVarCharFields1; - } - - @Deprecated - public List getSelectedCustomVarCharFields2() { - return selectedCustomVarCharFields2; - } - - @Deprecated - public void setSelectedCustomVarCharFields2(List selectedCustomVarCharFields2) { - this.selectedCustomVarCharFields2 = selectedCustomVarCharFields2; - } - - @Deprecated - public List getSelectedCustomVarCharFields3() { - return selectedCustomVarCharFields3; - } - - @Deprecated - public void setSelectedCustomVarCharFields3(List selectedCustomVarCharFields3) { - this.selectedCustomVarCharFields3 = selectedCustomVarCharFields3; - } - - @Deprecated - public List getSelectedCustomVarCharFields4() { - return selectedCustomVarCharFields4; - } - - @Deprecated - public void setSelectedCustomVarCharFields4(List selectedCustomVarCharFields4) { - this.selectedCustomVarCharFields4 = selectedCustomVarCharFields4; - } - - @Deprecated - public List getSelectedCustomVarCharFields5() { - return selectedCustomVarCharFields5; - } - - @Deprecated - public void setSelectedCustomVarCharFields5(List selectedCustomVarCharFields5) { - this.selectedCustomVarCharFields5 = selectedCustomVarCharFields5; - } - - private void initCustomFieldFromDeprecatedCustomVarChar() { - customFieldFilters = new HashMap<>(); - if (CollectionUtils.isNotEmpty(selectedCustomVarCharFields1)) { - customFieldFilters.put("CustomVarCharFields1", selectedCustomVarCharFields1); - } - if (CollectionUtils.isNotEmpty(selectedCustomVarCharFields2)) { - customFieldFilters.put("CustomVarCharFields2", selectedCustomVarCharFields2); - } - if (CollectionUtils.isNotEmpty(selectedCustomVarCharFields3)) { - customFieldFilters.put("CustomVarCharFields3", selectedCustomVarCharFields3); - } - if (CollectionUtils.isNotEmpty(selectedCustomVarCharFields4)) { - customFieldFilters.put("CustomVarCharFields4", selectedCustomVarCharFields4); - } - if (CollectionUtils.isNotEmpty(selectedCustomVarCharFields5)) { - customFieldFilters.put("CustomVarCharFields5", selectedCustomVarCharFields5); - } - } -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/taskfilter/impl/TaskAnalysisFilterData.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/taskfilter/impl/TaskAnalysisFilterData.java deleted file mode 100644 index bb20eb6b955..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/taskfilter/impl/TaskAnalysisFilterData.java +++ /dev/null @@ -1,53 +0,0 @@ -package ch.ivy.addon.portalkit.taskfilter.impl; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; - -import ch.ivy.addon.portalkit.casefilter.CaseFilter; -import ch.ivy.addon.portalkit.filter.AbstractFilterData; -import ch.ivy.addon.portalkit.taskfilter.TaskFilter; - -@SuppressWarnings("rawtypes") -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class TaskAnalysisFilterData extends AbstractFilterData { - private List taskFilters = new ArrayList<>(); - private List caseFilters = new ArrayList<>(); - - public List getTaskFilters() { - return taskFilters; - } - - public void setTaskFilters(List taskFilters) { - this.taskFilters = taskFilters; - } - - public List getCaseFilters() { - return caseFilters; - } - - public void setCaseFilters(List caseFilters) { - this.caseFilters = caseFilters; - } - - @Override - public void setFilters(List filters) { - throw new UnsupportedOperationException(); - } - - @Override - @JsonIgnore - public List getFilters() { - throw new UnsupportedOperationException(); - } - - @Override - @JsonIgnore - public String getKeyword() { - return super.getKeyword(); - } - - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/taskfilter/impl/TaskAnalysisTaskFilterContainer.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/taskfilter/impl/TaskAnalysisTaskFilterContainer.java deleted file mode 100644 index 77f57ad6ea2..00000000000 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/taskfilter/impl/TaskAnalysisTaskFilterContainer.java +++ /dev/null @@ -1,31 +0,0 @@ -package ch.ivy.addon.portalkit.taskfilter.impl; - -import java.util.Collections; - -import ch.ivy.addon.portalkit.comparator.TaskFilterComparator; - -public class TaskAnalysisTaskFilterContainer extends DefaultTaskFilterContainer { - - private TaskWorkerFilter workerFilter = new TaskWorkerFilter(); - - public TaskAnalysisTaskFilterContainer() { - super(); - filters.add(workerFilter); - Collections.sort(filters, new TaskFilterComparator()); - } - - public TaskAnalysisTaskFilterContainer(boolean filterForUnavailableActivator) { - super(filterForUnavailableActivator); - filters.add(workerFilter); - Collections.sort(filters, new TaskFilterComparator()); - } - - public TaskWorkerFilter getWorkerFilter() { - return workerFilter; - } - - public void setWorkerFilter(TaskWorkerFilter workerFilter) { - this.workerFilter = workerFilter; - } - -} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java index 199d389db69..a52d2833639 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/CategoryUtils.java @@ -24,6 +24,8 @@ public class CategoryUtils { public static final String NO_CATEGORY_CMS = "/ch.ivy.addon.portalkit.ui.jsf/common/noCategory"; public static final String CATEGORY_SEPARATOR = ", "; public static final String CATEGORY_PATH_DELIMITER = "/"; + public static final String PARENT_CATEGORY_DELIMITER = "\\\\"; + public static final String CHILD_CATEGORY_DELIMITER = "\\"; private CategoryUtils() {} diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardWidgetUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardWidgetUtils.java index 32025dc24f4..b9d6e4f2a4a 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardWidgetUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/DashboardWidgetUtils.java @@ -35,7 +35,6 @@ import ch.ivy.addon.portalkit.dto.dashboard.DashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.ProcessDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.SingleProcessDashboardWidget; -import ch.ivy.addon.portalkit.dto.dashboard.StatisticDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.TaskDashboardWidget; import ch.ivy.addon.portalkit.dto.dashboard.casecolumn.CaseColumnModel; import ch.ivy.addon.portalkit.dto.dashboard.process.DashboardProcess; @@ -385,8 +384,7 @@ public static DashboardWidget buildDefaultWidget(String id, String name, Dashboa case TASK -> buildDefaultTaskWidget(id, name); case CASE -> buildDefaultCaseWidget(id, name); case PROCESS -> buildDefaultProcessWidget(id, name); - case STATISTIC, - CLIENT_STATISTIC -> buildDefaultStatisticWidget(id, name, type); + case CLIENT_STATISTIC -> buildDefaultStatisticWidget(id, name, type); default -> null; }; } @@ -394,12 +392,7 @@ public static DashboardWidget buildDefaultWidget(String id, String name, Dashboa private static DashboardWidget buildDefaultStatisticWidget(String id, String name, DashboardWidgetType widgetType) { DashboardWidget widget = null; - if (widgetType == DashboardWidgetType.CLIENT_STATISTIC) { - widget = new ClientStatisticDashboardWidget(); - } else { - widget = new StatisticDashboardWidget(); - widget.setName(name); - } + widget = new ClientStatisticDashboardWidget(); widget.setId(id); var layout = new WidgetLayout(); layout.setWidth(5); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java index 8ad546ef60c..b6d86e3eba0 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/util/PermissionUtils.java @@ -188,15 +188,6 @@ public static boolean checkAccessFullCaseListPermission() { return hasPortalPermission(PortalPermission.ACCESS_FULL_CASE_LIST); } - /** - * Check if current user has permission to see full statistic list - * - * @return true if current user has permission to see full statistic list - */ - public static boolean checkAccessFullStatisticsListPermission() { - return hasPortalPermission(PortalPermission.ACCESS_FULL_STATISTICS_LIST); - } - /** * Check if current user has permission to create public external link * diff --git a/AxonIvyPortal/portal/src/com/axonivy/portal/service/ClientStatisticService.java b/AxonIvyPortal/portal/src/com/axonivy/portal/service/ClientStatisticService.java index e15bee40a9d..3e89b6d197d 100644 --- a/AxonIvyPortal/portal/src/com/axonivy/portal/service/ClientStatisticService.java +++ b/AxonIvyPortal/portal/src/com/axonivy/portal/service/ClientStatisticService.java @@ -62,7 +62,7 @@ public ClientStatisticResponse getStatisticData(ClientStatisticDto payload) private void validateChart(String chartId, ClientStatistic chart) throws NotFoundException, NoPermissionException { if (chart == null) { - throw new NotFoundException(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/exception/idNotFound", + throw new NotFoundException(Ivy.cms().co("/Dialogs/com/axonivy/portal/dashboard/component/ClientStatisticWidget/IdNotFound", Arrays.asList(chartId))); } diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysis.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysis.xhtml deleted file mode 100644 index c52dc911e72..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysis.xhtml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/taskAnalysis')} - - - - - - - - \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysisData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysisData.d.json deleted file mode 100644 index 855185f003f..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysisData.d.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "TaskAnalysisData", - "namespace" : "ch.ivy.addon.portal.generic.TaskAnalysis", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "taskView", - "type" : "ch.ivy.addon.portal.generic.view.TaskAnalysisView", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysisProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysisProcess.p.json deleted file mode 100644 index e5bc186c778..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/TaskAnalysis/TaskAnalysisProcess.p.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "163DD37A38FA2BC8", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portal.generic.TaskAnalysis.TaskAnalysisData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "163DD37A3BC5BFD2" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 } - }, - "connect" : [ - { "id" : "f7", "to" : "f6" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 352, "y" : 64 } - } - }, { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "163DD37A3E43A70E" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 224, "y" : 160 } - } - }, { - "id" : "f6", - "type" : "Script", - "name" : "init", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portal.generic.view.TaskAnalysisView;", - "import ch.ivy.addon.portalkit.enums.TaskSortField;", - "import ch.ivy.addon.portalkit.datamodel.internal.TaskAnalysisLazyDataModel;", - "", - "TaskAnalysisLazyDataModel dataModel = new TaskAnalysisLazyDataModel();", - "dataModel.getCriteria().setNewQueryCreated(true);", - "dataModel.setAdminQuery(true);", - "dataModel.setSortField(TaskSortField.PRIORITY.toString(), false);", - " ", - "String pageTitle = ivy.cms.co(\"/Labels/Task\"); ", - "String noTaskMessage = ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/taskWarning/taskNotFound\");", - "out.taskView = TaskAnalysisView.create().dataModel(dataModel).pageTitle(pageTitle).hideTaskFilter(false).showHeaderToolbar(false).noTaskFoundMessage(noTaskMessage).chunkSize(20).createNewTaskView();" - ] - } - }, - "visual" : { - "at" : { "x" : 224, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoard.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoard.xhtml deleted file mode 100644 index b3f00019c0c..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoard.xhtml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/statistics')} - - - - - - - \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoardData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoardData.d.json deleted file mode 100644 index aa69526050c..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoardData.d.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "PortalDashBoardData", - "namespace" : "ch.ivy.addon.portal.generic.admin.PortalDashBoard", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "statisticChartList", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskQuery", - "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", - "comment" : "Customized TaskQuery", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoardProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoardProcess.p.json deleted file mode 100644 index 6590334f977..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/admin/PortalDashBoard/PortalDashBoardProcess.p.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "14EB4D799BBF04C8", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portal.generic.admin.PortalDashBoard.PortalDashBoardData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "14EB4D799DA15883" - }, - "visual" : { - "at" : { "x" : 112, "y" : 64 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f7", "to" : "f2" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 320, "y" : 64 } - } - }, { - "id" : "f2", - "type" : "Script", - "name" : "get statistic charts", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - "in.statisticChartList = service.findStatisticCharts();" - ] - } - }, - "visual" : { - "at" : { "x" : 227, "y" : 64 } - }, - "connect" : [ - { "id" : "f9", "to" : "f1" } - ] - } ], - "layout" : { - "lanes" : [ { - "name" : "Start method", - "size" : 192 - } ] - } -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardAddNewWidgets.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardAddNewWidgets.xhtml index b8f320cbb34..1cb61172a8f 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardAddNewWidgets.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardDetailModification/PortalDashboardAddNewWidgets.xhtml @@ -168,11 +168,6 @@ managedBean="#{dashboardDetailModificationBean}"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/StatisticWidget/PreviewText')}

-
- - - - - - - - - - - - -

#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/StatisticWidget/EmptyChartDataMessage')}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- - \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidget/StatisticChartWidgetData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidget/StatisticChartWidgetData.d.json deleted file mode 100644 index 68490a8668f..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidget/StatisticChartWidgetData.d.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "StatisticChartWidgetData", - "namespace" : "ch.ivy.addon.portal.generic.dashboard.component.StatisticChartWidget", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "taskListName", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskQuery", - "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDrilldownToTaskList", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedItemOfDrilldown", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedStatisticChart", - "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "showTaskListImmediately", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "caseQuery", - "type" : "ch.ivyteam.ivy.workflow.query.CaseQuery", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedCaseCategory", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "chartNameOfCurrentLanguage", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "previousSelectedMonth", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "previousSelectedWeek", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "previousSelectedDay", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidget/StatisticChartWidgetProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidget/StatisticChartWidgetProcess.p.json deleted file mode 100644 index 7a5b4f7c46e..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidget/StatisticChartWidgetProcess.p.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "17FF80435B6470D3", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portal.generic.dashboard.component.StatisticChartWidget.StatisticChartWidgetData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "17FF8043641EBB62" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 224, "y" : 64 } - } - }, { - "id" : "f6", - "type" : "HtmlDialogMethodStart", - "name" : "drilldownCaseByState(StatisticChart,CaseQuery)", - "config" : { - "signature" : "drilldownCaseByState", - "input" : { - "params" : [ - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "caseQuery", "type" : "ch.ivyteam.ivy.workflow.query.CaseQuery", "desc" : "" } - ], - "map" : { - "out.caseQuery" : "param.caseQuery", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "17FFE85588CFA06E" - }, - "visual" : { - "at" : { "x" : 96, "y" : 416 }, - "labelOffset" : { "x" : 77, "y" : 34 } - }, - "connect" : [ - { "id" : "f8", "to" : "f42" } - ] - }, { - "id" : "f39", - "type" : "Alternative", - "config" : { - "conditions" : { - "f37" : "in.showTaskListImmediately || in.isDrilldownToTaskList" - } - }, - "visual" : { - "at" : { "x" : 200, "y" : 192 } - }, - "connect" : [ - { "id" : "f37", "to" : "f36" }, - { "id" : "f47", "to" : "f46", "via" : [ { "x" : 200, "y" : 128 } ] } - ] - }, { - "id" : "f7", - "type" : "SubProcessCall", - "name" : "Navigator", - "config" : { - "processCall" : "Functional Processes/Navigator:viewTaskForAnalytic(String,ch.ivyteam.ivy.workflow.query.TaskQuery)", - "call" : { - "map" : { - "param.chartName" : "in.taskListName", - "param.taskQuery" : "in.taskQuery" - } - } - }, - "visual" : { - "at" : { "x" : 483, "y" : 344 } - } - }, { - "id" : "f83", - "type" : "HtmlDialogMethodStart", - "name" : "drilldownTaskByPriority(String,TaskQuery)", - "config" : { - "signature" : "drilldownTaskByPriority", - "input" : { - "params" : [ - { "name" : "taskListName", "type" : "String", "desc" : "" }, - { "name" : "taskQuery", "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", "desc" : "" } - ], - "map" : { - "out.taskListName" : "param.taskListName", - "out.taskQuery" : "param.taskQuery" - } - }, - "guid" : "17FFE85588DA0A15" - }, - "visual" : { - "at" : { "x" : 96, "y" : 344 }, - "labelOffset" : { "x" : 58, "y" : 32 } - }, - "connect" : [ - { "id" : "f84", "to" : "f7" } - ] - }, { - "id" : "f46", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 483, "y" : 128 } - } - }, { - "id" : "f42", - "type" : "SubProcessCall", - "name" : "Navigator", - "config" : { - "processCall" : "Functional Processes/Navigator:viewCaseForAnalytic(String,ch.ivyteam.ivy.workflow.query.CaseQuery)", - "call" : { - "map" : { - "param.chartName" : "in.chartNameOfCurrentLanguage", - "param.caseQuery" : "in.caseQuery" - } - } - }, - "visual" : { - "at" : { "x" : 320, "y" : 416 } - } - }, { - "id" : "f36", - "type" : "Script", - "name" : "Build task query", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService;", - "import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService;", - "import org.apache.commons.lang3.StringUtils;", - "import ch.ivy.addon.portalkit.datamodel.TaskLazyDataModel;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import ch.ivy.addon.portalkit.statistics.StatisticChartQueryUtils;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "", - "if (StatisticService.selectMonthOfYear(in.selectedItemOfDrilldown)) {", - " in.previousSelectedMonth = in.selectedItemOfDrilldown;", - "} else if (StatisticService.selectWeekOfMonth(in.selectedItemOfDrilldown)) {", - " in.previousSelectedWeek = in.selectedItemOfDrilldown;", - "} else if (StatisticService.selectDayOfWeek(in.selectedItemOfDrilldown)) {", - " in.previousSelectedDay = in.selectedItemOfDrilldown;", - "}", - "", - "StatisticService service = StatisticService.getInstance();", - "in.chartNameOfCurrentLanguage = service.getDisplayNameInUserLanguageForChart(in.selectedStatisticChart).getValue();", - "", - "in.taskListName = in.chartNameOfCurrentLanguage + \" - \" + in.selectedItemOfDrilldown;", - "if (StatisticService.selectHourOfDay(in.selectedItemOfDrilldown)) {", - " in.taskListName += \" \" + ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByExpiry/hour\");", - "}", - "in.selectedItemOfDrilldown = StringUtils.EMPTY;" - ] - } - }, - "visual" : { - "at" : { "x" : 320, "y" : 192 } - }, - "connect" : [ - { "id" : "f38", "to" : "f7", "via" : [ { "x" : 483, "y" : 192 } ] } - ] - }, { - "id" : "f41", - "type" : "HtmlDialogMethodStart", - "name" : "toTaskByExpiryTaskList(String,StatisticChart,TaskQuery)", - "config" : { - "signature" : "toTaskByExpiryTaskList", - "input" : { - "params" : [ - { "name" : "selectedItemOfDrilldown", "type" : "String", "desc" : "" }, - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "taskQuery", "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", "desc" : "" } - ], - "map" : { - "out.selectedItemOfDrilldown" : "param.selectedItemOfDrilldown", - "out.selectedStatisticChart" : "param.selectedStatisticChart", - "out.taskQuery" : "param.taskQuery" - } - }, - "guid" : "17FFE85588D604E1" - }, - "visual" : { - "at" : { "x" : 96, "y" : 272 }, - "labelOffset" : { "x" : 95, "y" : 31 } - }, - "connect" : [ - { "id" : "f43", "to" : "f36", "via" : [ { "x" : 320, "y" : 272 } ] } - ] - }, { - "id" : "f35", - "type" : "HtmlDialogMethodStart", - "name" : "onSelectDrilldownTaskByExpiry(Boolean,String,StatisticChart,TaskQuery)", - "config" : { - "signature" : "onSelectDrilldownTaskByExpiry", - "input" : { - "params" : [ - { "name" : "isDrilldownToTaskList", "type" : "Boolean", "desc" : "" }, - { "name" : "selectedItemOfDrilldown", "type" : "String", "desc" : "" }, - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "taskQuery", "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", "desc" : "" } - ], - "map" : { - "out.isDrilldownToTaskList" : "param.isDrilldownToTaskList", - "out.selectedItemOfDrilldown" : "param.selectedItemOfDrilldown", - "out.selectedStatisticChart" : "param.selectedStatisticChart", - "out.taskQuery" : "param.taskQuery" - } - }, - "guid" : "17FFE85588DC1FA9" - }, - "visual" : { - "at" : { "x" : 96, "y" : 192 }, - "labelOffset" : { "x" : 144, "y" : 48 } - }, - "connect" : [ - { "id" : "f40", "to" : "f39" } - ] - }, { - "id" : "f94", - "type" : "Script", - "name" : "Get chart name", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - "in.chartNameOfCurrentLanguage = service.getDisplayNameInUserLanguageForChart(in.selectedStatisticChart).getValue();" - ] - } - }, - "visual" : { - "at" : { "x" : 360, "y" : 512 } - }, - "connect" : [ - { "id" : "f14", "to" : "f11" } - ] - }, { - "id" : "f11", - "type" : "SubProcessCall", - "name" : "Navigator", - "config" : { - "processCall" : "Functional Processes/Navigator:viewCaseForAnalytic(String,ch.ivyteam.ivy.workflow.query.CaseQuery)", - "call" : { - "map" : { - "param.chartName" : "in.chartNameOfCurrentLanguage", - "param.caseQuery" : "in.caseQuery" - } - } - }, - "visual" : { - "at" : { "x" : 512, "y" : 512 } - } - }, { - "id" : "f12", - "type" : "HtmlDialogMethodStart", - "name" : "goToCasesByCategoryList(StatisticChart,CaseQuery)", - "config" : { - "signature" : "goToCasesByCategoryList", - "input" : { - "params" : [ - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "caseQuery", "type" : "ch.ivyteam.ivy.workflow.query.CaseQuery", "desc" : "" } - ], - "map" : { - "out.caseQuery" : "param.caseQuery", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "18214957424B6AC8" - }, - "visual" : { - "at" : { "x" : 96, "y" : 512 }, - "labelOffset" : { "x" : 90, "y" : 34 } - }, - "connect" : [ - { "id" : "f13", "to" : "f94" } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfiguration.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfiguration.xhtml deleted file mode 100644 index b10c0e507e2..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfiguration.xhtml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - -
-
-

#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/configuration/configuration')}

-

#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/StatisticWidget/ConfigurationDescription')}

-
- - - -
-
- #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/StatisticWidget/AvailableCharts')} -
-
- -
-
- - - -
- -
-
- - - - - -
-
- -
-
-
-
- - - -
-
-

#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/preview')}

-
- - - - - -
-
-
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfigurationData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfigurationData.d.json deleted file mode 100644 index bcafbab81a5..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfigurationData.d.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "StatisticChartWidgetConfigurationData", - "namespace" : "ch.ivy.addon.portal.generic.dashboard.component.StatisticChartWidgetConfiguration", - "isBusinessCaseData" : false -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfigurationProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfigurationProcess.p.json deleted file mode 100644 index ef097692319..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/StatisticChartWidgetConfiguration/StatisticChartWidgetConfigurationProcess.p.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "17FE498A0B4F9B30", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portal.generic.dashboard.component.StatisticChartWidgetConfiguration.StatisticChartWidgetConfigurationData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "17B382D89473A921" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 224, "y" : 64 } - } - }, { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "17B382D895DC8AB8" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 224, "y" : 160 } - } - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettingsProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettingsProcess.p.json index 45d0838a3e9..a7b27c54ecb 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettingsProcess.p.json +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/admin/AdminSettings/AdminSettingsProcess.p.json @@ -211,7 +211,6 @@ "import ch.addon.portal.generic.userprofile.homepage.HomepageUtils;", "import ch.ivy.addon.portalkit.enums.GlobalVariable;", "import ch.ivy.addon.portalkit.enums.GlobalVariableType;", - "import ch.ivy.addon.portalkit.statistics.StatisticChartConstants;", "import java.util.Arrays;", "import ch.ivy.addon.portalkit.enums.GlobalVariable;", "", diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidget.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidget.xhtml deleted file mode 100644 index 0bb2b7a8978..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidget.xhtml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-
-
-
-
- - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidgetData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidgetData.d.json deleted file mode 100644 index e16e5c5b342..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidgetData.d.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "StatisticWidgetData", - "namespace" : "ch.ivy.addon.portalkit.component.StatisticWidget", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "compactMode", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "username", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "jsonQuery", - "type" : "String", - "comment" : "Customized TaskQuery", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "createMode", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "statisticChartList", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDrilldownElapsedTime", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDrilldownExpiryChart", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isBackFromDrilldown", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "defaultCharts", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "canCreateNewCharts", - "type" : "Boolean", - "comment" : "Check user has permission to creating new charts", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "hasDefaultChart", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "canAnalyzeTask", - "type" : "Boolean", - "comment" : "Check user has permission to analyzing task", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDisplayShowAllChartLink", - "type" : "Boolean", - "comment" : "Is show all chart link at home page", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDrilldownCasesByCategory", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidgetProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidgetProcess.p.json deleted file mode 100644 index 233f222f5d7..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/StatisticWidget/StatisticWidgetProcess.p.json +++ /dev/null @@ -1,477 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "1521B28EE98E8444", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.StatisticWidget.StatisticWidgetData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start(List)", - "config" : { - "signature" : "start", - "input" : { - "params" : [ - { "name" : "statisticChartList", "type" : "java.util.List", "desc" : "" } - ], - "map" : { - "out.createMode" : "false" - }, - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "if(!param.#statisticChartList is initialized) {", - " StatisticService service = StatisticService.getInstance();", - " out.statisticChartList = service.findStatisticCharts();", - "} else { ", - " out.statisticChartList = param.statisticChartList;", - "}" - ] - }, - "guid" : "16034D800DC77D9C" - }, - "visual" : { - "at" : { "x" : 94, "y" : 64 } - }, - "connect" : [ - { "id" : "f49", "to" : "f47" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogMethodStart", - "name" : "switchMode()", - "config" : { - "signature" : "switchMode", - "input" : { - "map" : { }, - "code" : "out.compactMode = !out.compactMode;" - }, - "guid" : "16034D80ACC379F5" - }, - "visual" : { - "at" : { "x" : 94, "y" : 256 } - }, - "connect" : [ - { "id" : "f3", "to" : "f2" } - ] - }, { - "id" : "f2", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 264, "y" : 256 } - } - }, { - "id" : "f4", - "type" : "HtmlDialogMethodStart", - "name" : "setCompactMode(Boolean)", - "config" : { - "signature" : "setCompactMode", - "input" : { - "params" : [ - { "name" : "compactMode", "type" : "Boolean", "desc" : "" } - ], - "map" : { - "out.compactMode" : "param.compactMode" - } - }, - "guid" : "16034D8582DD119E" - }, - "visual" : { - "at" : { "x" : 94, "y" : 384 } - }, - "connect" : [ - { "id" : "f35", "to" : "f34" } - ] - }, { - "id" : "f5", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 736, "y" : 384 } - } - }, { - "id" : "f7", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 976, "y" : 160 } - } - }, { - "id" : "f10", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 264, "y" : 448 } - } - }, { - "id" : "f12", - "type" : "HtmlDialogEventStart", - "name" : "switchCreateMode", - "config" : { - "guid" : "16048C1223A5C53A", - "output" : { - "code" : "out.createMode = !out.createMode;" - } - }, - "visual" : { - "at" : { "x" : 94, "y" : 448 } - }, - "connect" : [ - { "id" : "f13", "to" : "f10" } - ] - }, { - "id" : "f15", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 264, "y" : 513 } - } - }, { - "id" : "f16", - "type" : "HtmlDialogEventStart", - "name" : "switchDrilldownMode", - "config" : { - "guid" : "161BBCEDA1C24D09", - "output" : { - "map" : { - "out" : "in", - "out.isDrilldownElapsedTime" : "false" - } - } - }, - "visual" : { - "at" : { "x" : 94, "y" : 513 } - }, - "connect" : [ - { "id" : "f17", "to" : "f15" } - ] - }, { - "id" : "f18", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 264, "y" : 577 } - } - }, { - "id" : "f19", - "type" : "HtmlDialogEventStart", - "name" : "drilldownElapsedTimeListener", - "config" : { - "guid" : "161BBD78F902AFC2", - "output" : { - "map" : { - "out" : "in", - "out.isDrilldownElapsedTime" : "true" - } - } - }, - "visual" : { - "at" : { "x" : 94, "y" : 577 } - }, - "connect" : [ - { "id" : "f20", "to" : "f18" } - ] - }, { - "id" : "f9", - "type" : "HtmlDialogEventStart", - "name" : "switchDrilldownExpiryChartMode", - "config" : { - "guid" : "16250B3D0BF56AEB", - "output" : { - "map" : { - "out" : "in", - "out.isBackFromDrilldown" : "true", - "out.isDrilldownExpiryChart" : "false" - } - } - }, - "visual" : { - "at" : { "x" : 96, "y" : 640 } - }, - "connect" : [ - { "id" : "f14", "to" : "f11" } - ] - }, { - "id" : "f11", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 264, "y" : 639 } - } - }, { - "id" : "f21", - "type" : "HtmlDialogMethodStart", - "name" : "drillDownExpiryListener()", - "config" : { - "signature" : "drillDownExpiryListener", - "input" : { - "map" : { - "out.isBackFromDrilldown" : "false", - "out.isDrilldownExpiryChart" : "true" - } - }, - "guid" : "1625100B1C7D96D2" - }, - "visual" : { - "at" : { "x" : 96, "y" : 704 } - }, - "connect" : [ - { "id" : "f23", "to" : "f22" } - ] - }, { - "id" : "f22", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 264, "y" : 704 } - } - }, { - "id" : "f26", - "type" : "Script", - "name" : "add to chart list", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "in.statisticChartList.addAll(StatisticService.getInstance().getPublicConfig());" - ] - } - }, - "visual" : { - "at" : { "x" : 824, "y" : 160 } - }, - "connect" : [ - { "id" : "f25", "to" : "f7" } - ] - }, { - "id" : "f28", - "type" : "HtmlDialogEventStart", - "name" : "restoreDefault", - "config" : { - "guid" : "163AF4A8A1BFD729" - }, - "visual" : { - "at" : { "x" : 94, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f32", "to" : "f31" } - ] - }, { - "id" : "f31", - "type" : "Script", - "name" : "restore default charts", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "in.statisticChartList.clear();", - "", - "StatisticService service = StatisticService.getInstance();", - "service.deletePrivateConfig();" - ] - } - }, - "visual" : { - "at" : { "x" : 256, "y" : 160 }, - "size" : { "width" : 120, "height" : 48 } - }, - "connect" : [ - { "id" : "f43", "to" : "f26" } - ] - }, { - "id" : "f30", - "type" : "Script", - "name" : [ - "Check permission", - "to creating new charts" - ], - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.enums.PortalPermission;", - "import ch.ivy.addon.portalkit.util.PermissionUtils;", - "", - "in.canCreateNewCharts = PermissionUtils.hasPortalPermission(PortalPermission.STATISTIC_ADD_DASHBOARD_CHART);", - "in.canAnalyzeTask = PermissionUtils.hasPortalPermission(PortalPermission.STATISTIC_ANALYZE_TASK);" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 560, "y" : 320 }, - "size" : { "width" : 144 } - }, - "connect" : [ - { "id" : "f39", "to" : "f5", "via" : [ { "x" : 736, "y" : 320 } ] } - ] - }, { - "id" : "f34", - "type" : "Alternative", - "name" : "is compact mode?", - "config" : { - "conditions" : { - "f45" : "in.compactMode" - } - }, - "visual" : { - "at" : { "x" : 264, "y" : 384 }, - "labelOffset" : { "x" : 13, "y" : 34 } - }, - "connect" : [ - { "id" : "f45", "to" : "f44", "label" : { - "name" : "yes", - "segment" : 0.47, - "offset" : { "y" : 12 } - } }, - { "id" : "f38", "to" : "f36", "via" : [ { "x" : 264, "y" : 320 } ] } - ] - }, { - "id" : "f36", - "type" : "Script", - "name" : "check default chart", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - "if(!in.#statisticChartList is initialized || in.statisticChartList.isEmpty()) {", - " in.statisticChartList = service.findStatisticCharts();", - " in.hasDefaultChart = service.isDefaultChart(in.statisticChartList);", - "} else {", - " in.hasDefaultChart = service.isDefaultChart(in.statisticChartList);", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 384, "y" : 320 } - }, - "connect" : [ - { "id" : "f33", "to" : "f30" } - ] - }, { - "id" : "f29", - "type" : "HtmlDialogEventStart", - "name" : "navigateToTaskAnalysisPage", - "config" : { - "guid" : "16411B8894BC5C90" - }, - "visual" : { - "at" : { "x" : 96, "y" : 784 } - }, - "connect" : [ - { "id" : "f42", "to" : "f41" } - ] - }, { - "id" : "f37", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 480, "y" : 784 } - } - }, { - "id" : "f41", - "type" : "Script", - "name" : "Redirect to analysis page", - "config" : { - "output" : { - "code" : [ - "import java.util.HashMap;", - "import ch.ivy.addon.portal.generic.navigation.PortalNavigator;", - "import javax.faces.context.FacesContext;", - "", - "String taskAnalysisUrl = PortalNavigator.buildUrlByKeyword(\"showTaskAnalysis.ivp\", \"Start Processes/PortalStart/showTaskAnalysis.ivp\", new HashMap());", - "FacesContext.getCurrentInstance().getExternalContext().redirect(taskAnalysisUrl);" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 288, "y" : 784 }, - "size" : { "width" : 144 } - }, - "connect" : [ - { "id" : "f40", "to" : "f37" } - ] - }, { - "id" : "f44", - "type" : "Script", - "name" : [ - "Check permission ", - "to see show all chart link" - ], - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.util.PermissionUtils;", - "in.isDisplayShowAllChartLink = PermissionUtils.checkAccessFullStatisticsListPermission();" - ] - } - }, - "visual" : { - "at" : { "x" : 480, "y" : 384 }, - "size" : { "width" : 160 } - }, - "connect" : [ - { "id" : "f6", "to" : "f5" } - ] - }, { - "id" : "f47", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 264, "y" : 64 } - } - }, { - "id" : "f8", - "type" : "HtmlDialogMethodStart", - "name" : "drillDownCasesByCategoryListener()", - "config" : { - "signature" : "drillDownCasesByCategoryListener", - "input" : { - "map" : { - "out.isBackFromDrilldown" : "false", - "out.isDrilldownCasesByCategory" : "true" - } - }, - "guid" : "181FBB8B75EBFFDC" - }, - "visual" : { - "at" : { "x" : 376, "y" : 448 }, - "labelOffset" : { "x" : 42, "y" : 35 } - }, - "connect" : [ - { "id" : "f27", "to" : "f24" } - ] - }, { - "id" : "f24", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 544, "y" : 448 } - } - }, { - "id" : "f50", - "type" : "HtmlDialogEventStart", - "name" : "switchDrilldownCasesByCategoryMode", - "config" : { - "guid" : "181FBD8405DADDB5", - "output" : { - "map" : { - "out" : "in", - "out.isBackFromDrilldown" : "true", - "out.isDrilldownCasesByCategory" : "false" - } - } - }, - "visual" : { - "at" : { "x" : 376, "y" : 520 }, - "labelOffset" : { "x" : 27, "y" : 35 } - }, - "connect" : [ - { "id" : "f52", "to" : "f51" } - ] - }, { - "id" : "f51", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 544, "y" : 520 } - } - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/StatisticResult.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/StatisticResult.xhtml deleted file mode 100644 index 38ef98efa05..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/StatisticResult.xhtml +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/waitingDownloadMessage')}
- #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/taskAnalysis/downloadZipFileExplanation')} -
- -
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidget.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidget.xhtml deleted file mode 100644 index 5a050443748..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidget.xhtml +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - #{ivy.cms.co(data.dataModel.isSelectedDefaultFilter() or data.dataModel.selectedTaskAnalysisFilterData == null ? '/ch.ivy.addon.portalkit.ui.jsf/components/taskView/filter' : '/ch.ivy.addon.portalkit.ui.jsf/components/taskView/savedFilters')} - #{data.dataModel.isSelectedDefaultFilter() ? data.dataModel.defaultTaskAnalysisFilterData.filterName : data.dataModel.selectedTaskAnalysisFilterData == null ? ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/NoSelection') : data.dataModel.selectedTaskAnalysisFilterData.filterName} - - - - -
- -
- - - - - - - -
- - -
- -
- - - - - - - -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidgetData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidgetData.d.json deleted file mode 100644 index e8be002b697..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidgetData.d.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "TaskAnalysisWidgetData", - "namespace" : "ch.ivy.addon.portalkit.component.TaskAnalysisWidget", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "count", - "type" : "Integer", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "dataModel", - "type" : "ch.ivy.addon.portalkit.datamodel.internal.TaskAnalysisLazyDataModel", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "startIndex", - "type" : "Integer", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "totalTasks", - "type" : "Long", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "tasks", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskSearchCriteria", - "type" : "ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "filterSetName", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "filterType", - "type" : "ch.ivy.addon.portalkit.enums.FilterType", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskFilterDataToBeRemoved", - "type" : "ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isFilterExisted", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskFilterGroupId", - "type" : "Long", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskPublicFilters", - "type" : "List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskPrivateFilters", - "type" : "List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "exportedFile", - "type" : "org.primefaces.model.StreamedContent", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "columnsVisibility", - "type" : "java.util.Map", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "collectedTasksForExporting", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "loopCounter", - "type" : "Integer", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "maxResultNumberPerQuery", - "type" : "Integer", - "comment" : "max number of records when querying task for exporting", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidgetProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidgetProcess.p.json deleted file mode 100644 index e5ef8e5ce7b..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/TaskAnalysisWidget/TaskAnalysisWidgetProcess.p.json +++ /dev/null @@ -1,706 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "163DD68942416255", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.TaskAnalysisWidget.TaskAnalysisWidgetData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start(TaskAnalysisLazyDataModel,Long)", - "config" : { - "signature" : "start", - "input" : { - "params" : [ - { "name" : "dataModel", "type" : "ch.ivy.addon.portalkit.datamodel.internal.TaskAnalysisLazyDataModel", "desc" : "" }, - { "name" : "filterGroupId", "type" : "Long", "desc" : "" } - ], - "map" : { - "out.taskFilterGroupId" : "param.filterGroupId" - }, - "code" : [ - "if (param.#dataModel is initialized){", - " out.dataModel = param.dataModel;", - "}" - ] - }, - "guid" : "14FDF92006C61D35" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 }, - "labelOffset" : { "x" : 34, "y" : 40 } - }, - "connect" : [ - { "id" : "f10", "to" : "f8" } - ] - }, { - "id" : "f94", - "type" : "HtmlDialogMethodStart", - "name" : "findTasks(TaskSearchCriteria,Integer,Integer)", - "config" : { - "signature" : "findTasks", - "input" : { - "params" : [ - { "name" : "criteria", "type" : "ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria", "desc" : "" }, - { "name" : "startIndex", "type" : "Integer", "desc" : "" }, - { "name" : "count", "type" : "Integer", "desc" : "" } - ], - "map" : { - "out.count" : "param.count", - "out.startIndex" : "param.startIndex", - "out.taskSearchCriteria" : "param.criteria" - } - }, - "result" : { - "params" : [ - { "name" : "tasks", "type" : "java.util.List", "desc" : "" } - ], - "map" : { - "result.tasks" : "in.tasks" - } - }, - "guid" : "153EF14248ECB35E" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 }, - "labelOffset" : { "x" : 57, "y" : 30 } - }, - "connect" : [ - { "id" : "f19", "to" : "f9" } - ] - }, { - "id" : "f23", - "type" : "HtmlDialogEventStart", - "name" : "saveFilter", - "config" : { - "guid" : "15F5844AD96F4A4C" - }, - "visual" : { - "at" : { "x" : 80, "y" : 384 } - }, - "connect" : [ - { "id" : "f46", "to" : "f45" } - ] - }, { - "id" : "f24", - "type" : "Script", - "name" : "save filter set", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.TaskAnalysisFilterService;", - "import ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData;", - "import ch.ivy.addon.portalkit.enums.FilterType;", - "TaskAnalysisFilterService taskFilterService = new TaskAnalysisFilterService();", - "TaskAnalysisFilterData taskFilterData = in.dataModel.saveTaskAnalysisFilter(in.filterSetName, in.filterType, in.taskFilterGroupId);", - "if(FilterType.ONLY_ME == taskFilterData.type) {", - " in.taskPrivateFilters.add(taskFilterData);", - " in.taskPrivateFilters = taskFilterService.sortFilters(in.taskPrivateFilters) as List;", - "} else {", - " in.taskPublicFilters.add(taskFilterData);", - " in.taskPublicFilters = taskFilterService.sortFilters(in.taskPublicFilters) as List;", - "}", - "in.dataModel.selectedTaskAnalysisFilterData = taskFilterData;" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 464, "y" : 384 } - }, - "connect" : [ - { "id" : "f26", "to" : "f31" } - ] - }, { - "id" : "f28", - "type" : "HtmlDialogEventStart", - "name" : "clearSaveFilterDialog", - "config" : { - "guid" : "15F5BFFC0DEF027B" - }, - "visual" : { - "at" : { "x" : 80, "y" : 480 } - }, - "connect" : [ - { "id" : "f32", "to" : "f31" } - ] - }, { - "id" : "f29", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 600, "y" : 480 } - } - }, { - "id" : "f31", - "type" : "Script", - "name" : "Clear filter", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.enums.FilterType;", - "in.filterType = FilterType.ONLY_ME;", - "in.filterSetName = \"\";" - ] - } - }, - "visual" : { - "at" : { "x" : 464, "y" : 480 } - }, - "connect" : [ - { "id" : "f30", "to" : "f29" } - ] - }, { - "id" : "f27", - "type" : "Script", - "name" : "load filter set", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.bean.PermissionBean;", - "import ch.ivy.addon.portalkit.enums.FilterType;", - "import ch.ivy.addon.portalkit.service.TaskAnalysisFilterService;", - "TaskAnalysisFilterService taskFilterService = new TaskAnalysisFilterService();", - "in.taskPrivateFilters = taskFilterService.getPrivateFilterForCurrentUser(in.taskFilterGroupId) as List;", - "in.taskPublicFilters = taskFilterService.getPublicFilter(in.taskFilterGroupId) as List;", - "in.taskPublicFilters.add(in.dataModel.buildDefaultTaskAnalysisFilterData());", - "in.filterType = FilterType.ONLY_ME;" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 384, "y" : 64 }, - "size" : { "width" : 96, "height" : 48 } - }, - "connect" : [ - { "id" : "f57", "to" : "f3" } - ] - }, { - "id" : "f3", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 480, "y" : 64 } - } - }, { - "id" : "f34", - "type" : "HtmlDialogMethodStart", - "name" : "deleteFilter()", - "config" : { - "signature" : "deleteFilter", - "guid" : "15F5C0F9B77406B4" - }, - "visual" : { - "at" : { "x" : 80, "y" : 576 } - }, - "connect" : [ - { "id" : "f39", "to" : "f35" } - ] - }, { - "id" : "f35", - "type" : "Script", - "name" : "remove filter", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.enums.FilterType;", - "import ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData;", - "import ch.ivy.addon.portalkit.service.TaskAnalysisFilterService;", - "TaskAnalysisFilterService service = new TaskAnalysisFilterService();", - "service.delete(in.taskFilterDataToBeRemoved.id);", - "if(in.taskFilterDataToBeRemoved.type == FilterType.ONLY_ME) {", - " in.taskPrivateFilters.remove(in.taskFilterDataToBeRemoved);", - "} else {", - " in.taskPublicFilters.remove(in.taskFilterDataToBeRemoved);", - "}", - "if (in.dataModel.isSameTaskFilterData(in.taskFilterDataToBeRemoved)) {", - " in.dataModel.resetFilters();", - "}" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 232, "y" : 576 } - }, - "connect" : [ - { "id" : "f40", "to" : "f36" } - ] - }, { - "id" : "f36", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 400, "y" : 576 } - } - }, { - "id" : "f41", - "type" : "HtmlDialogMethodStart", - "name" : "setFilterToBeDeleted", - "config" : { - "signature" : "setFilterToBeDeleted", - "input" : { - "params" : [ - { "name" : "taskFilterData", "type" : "ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData", "desc" : "" } - ], - "map" : { - "out.taskFilterDataToBeRemoved" : "param.taskFilterData" - } - }, - "guid" : "15F5C9F2AA5C9BA1" - }, - "visual" : { - "at" : { "x" : 80, "y" : 672 }, - "labelOffset" : { "x" : 15, "y" : 34 } - }, - "connect" : [ - { "id" : "f43", "to" : "f42" } - ] - }, { - "id" : "f42", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 400, "y" : 672 } - } - }, { - "id" : "f45", - "type" : "Script", - "name" : "validate", - "config" : { - "output" : { - "code" : [ - "import com.axonivy.portal.components.util.FacesMessageUtils;", - "import javax.faces.application.FacesMessage;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.service.TaskAnalysisFilterService;", - "TaskAnalysisFilterService service = new TaskAnalysisFilterService();", - "in.isFilterExisted = false;", - "if (service.isFilterExisted(in.filterSetName, in.filterType, in.taskFilterGroupId)) {", - " FacesMessage message = FacesMessageUtils.sanitizedMessage( FacesMessage.SEVERITY_ERROR, ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/components/taskView/filterExistedValidationError\"), \"\");", - " FacesContext.getCurrentInstance().addMessage(\"\", message);", - " FacesContext.getCurrentInstance().validationFailed();", - " in.isFilterExisted = true;", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 208, "y" : 384 } - }, - "connect" : [ - { "id" : "f48", "to" : "f47" } - ] - }, { - "id" : "f47", - "type" : "Alternative", - "name" : [ - "is filter", - "existed?" - ], - "config" : { - "conditions" : { - "f25" : "in.isFilterExisted == false" - } - }, - "visual" : { - "at" : { "x" : 336, "y" : 384 } - }, - "connect" : [ - { "id" : "f25", "to" : "f24", "label" : { - "name" : "no" - } }, - { "id" : "f51", "to" : "f50", "via" : [ { "x" : 336, "y" : 336 } ], "label" : { - "name" : "yes", - "segment" : 1.3 - } } - ] - }, { - "id" : "f50", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 592, "y" : 336 } - } - }, { - "id" : "f16", - "type" : "HtmlDialogMethodStart", - "name" : "applyFilter", - "config" : { - "signature" : "applyFilter", - "input" : { - "params" : [ - { "name" : "taskFilterData", "type" : "ch.ivy.addon.portalkit.taskfilter.impl.TaskAnalysisFilterData", "desc" : "" } - ], - "map" : { }, - "code" : "out.dataModel.applyFilter(param.taskFilterData);" - }, - "guid" : "15F772190BB92384" - }, - "visual" : { - "at" : { "x" : 80, "y" : 768 } - }, - "connect" : [ - { "id" : "f20", "to" : "f17" } - ] - }, { - "id" : "f17", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 400, "y" : 768 } - } - }, { - "id" : "f8", - "type" : "Script", - "name" : "init data model", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.datamodel.internal.TaskAnalysisLazyDataModel;", - "import ch.ivy.addon.portalkit.bean.TaskAnalysisWidgetBean;", - "import javax.faces.context.FacesContext;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "TaskAnalysisWidgetBean taskAnalysisWidgetBean = context.getApplication().evaluateExpressionGet(context, \"#{taskAnalysisWidgetBean}\", TaskAnalysisWidgetBean.class) as TaskAnalysisWidgetBean;", - "if (!in.#dataModel is initialized) {", - " TaskAnalysisLazyDataModel dataModel = new TaskAnalysisLazyDataModel();", - " taskAnalysisWidgetBean.setDataModel(dataModel);", - " in.dataModel = taskAnalysisWidgetBean.dataModel;", - "} else {", - " taskAnalysisWidgetBean.setDataModel(in.dataModel);", - "}" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 240, "y" : 64 } - }, - "connect" : [ - { "id" : "f1", "to" : "f27" } - ] - }, { - "id" : "f11", - "type" : "HtmlDialogEventStart", - "name" : "redirectToStatisticPage", - "config" : { - "guid" : "1645924828285975" - }, - "visual" : { - "at" : { "x" : 80, "y" : 880 } - }, - "connect" : [ - { "id" : "f6", "to" : "f5" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 400, "y" : 880 } - } - }, { - "id" : "f5", - "type" : "Script", - "name" : "Redirect to Statistic page", - "config" : { - "output" : { - "code" : [ - "import com.axonivy.portal.components.publicapi.ProcessStartAPI;", - "import javax.faces.context.FacesContext;", - "", - "String statisticPageUrl = ProcessStartAPI.findRelativeUrlByProcessStartFriendlyRequestPath(\"Start Processes/PortalStart/StatisticPage.ivp\");", - "FacesContext.getCurrentInstance().getExternalContext().redirect(statisticPageUrl);" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 232, "y" : 880 }, - "size" : { "width" : 144 } - }, - "connect" : [ - { "id" : "f12", "to" : "f4" } - ] - }, { - "id" : "f13", - "type" : "HtmlDialogMethodStart", - "name" : "getExportedFile()", - "config" : { - "signature" : "getExportedFile", - "input" : { - "params" : [ - { "name" : "columnsVisibility", "type" : "java.util.Map", "desc" : "" } - ], - "map" : { - "out.columnsVisibility" : "param.columnsVisibility" - } - }, - "result" : { - "params" : [ - { "name" : "exportedFile", "type" : "org.primefaces.model.StreamedContent", "desc" : "" } - ], - "map" : { - "result.exportedFile" : "in.exportedFile" - } - }, - "guid" : "1646EC49808E6672" - }, - "visual" : { - "at" : { "x" : 80, "y" : 992 } - }, - "connect" : [ - { "id" : "f65", "to" : "f52" } - ] - }, { - "id" : "f14", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 776, "y" : 992 } - } - }, { - "id" : "f37", - "type" : "Script", - "name" : "export excel", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.exporter.internal.TaskAnalysisExporter;", - "TaskAnalysisExporter exporter = new TaskAnalysisExporter(in.columnsVisibility);", - "in.exportedFile = exporter.getStreamedContent(in.collectedTasksForExporting);" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 616, "y" : 992 } - }, - "connect" : [ - { "id" : "f56", "to" : "f14" } - ] - }, { - "id" : "f15", - "type" : "SubProcessCall", - "name" : "find tasks", - "config" : { - "processCall" : "Ivy Data Processes/TaskService:findTasksByCriteria(ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria,Integer,Integer)", - "call" : { - "map" : { - "param.taskSearchCriteria" : "in.taskSearchCriteria", - "param.startIndex" : "in.loopCounter * in.maxResultNumberPerQuery", - "param.count" : "in.maxResultNumberPerQuery" - } - }, - "output" : { - "code" : "in.collectedTasksForExporting.addAll(result.tasks);" - } - }, - "visual" : { - "at" : { "x" : 464, "y" : 1120 } - }, - "connect" : [ - { "id" : "f54", "to" : "f53" } - ] - }, { - "id" : "f9", - "type" : "SubProcessCall", - "name" : "TaskService", - "config" : { - "processCall" : "Ivy Data Processes/TaskService:findTasksByCriteria(ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria,Integer,Integer)", - "call" : { - "map" : { - "param.taskSearchCriteria" : "in.taskSearchCriteria", - "param.startIndex" : "in.startIndex", - "param.count" : "in.count" - } - }, - "output" : { - "map" : { - "out" : "in", - "out.tasks" : "result.tasks" - } - } - }, - "visual" : { - "at" : { "x" : 272, "y" : 160 } - }, - "connect" : [ - { "id" : "f33", "to" : "f22" } - ] - }, { - "id" : "f22", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 416, "y" : 160 } - } - }, { - "id" : "f2", - "type" : "HtmlDialogMethodStart", - "name" : "countTasks(TaskSearchCriteria)", - "config" : { - "signature" : "countTasks", - "input" : { - "params" : [ - { "name" : "criteria", "type" : "ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria", "desc" : "" } - ], - "map" : { - "out.taskSearchCriteria" : "param.criteria" - } - }, - "result" : { - "params" : [ - { "name" : "totalTasks", "type" : "Long", "desc" : "" } - ], - "map" : { - "result.totalTasks" : "in.totalTasks" - } - }, - "guid" : "1682C611F21483D7" - }, - "visual" : { - "at" : { "x" : 96, "y" : 256 } - }, - "connect" : [ - { "id" : "f44", "to" : "f7" } - ] - }, { - "id" : "f7", - "type" : "SubProcessCall", - "name" : "TaskService", - "config" : { - "processCall" : "Ivy Data Processes/TaskService:countTasksByCriteria(ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria)", - "call" : { - "map" : { - "param.taskSearchCriteria" : "in.taskSearchCriteria" - } - }, - "output" : { - "map" : { - "out" : "in", - "out.totalTasks" : "result.totalTasks" - } - } - }, - "visual" : { - "at" : { "x" : 272, "y" : 256 } - }, - "connect" : [ - { "id" : "f49", "to" : "f38" } - ] - }, { - "id" : "f38", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 416, "y" : 256 } - } - }, { - "id" : "f52", - "type" : "SubProcessCall", - "name" : "count tasks", - "config" : { - "processCall" : "Ivy Data Processes/TaskService:countTasksByCriteria(ch.ivy.addon.portalkit.ivydata.searchcriteria.TaskSearchCriteria)", - "call" : { - "map" : { - "param.taskSearchCriteria" : "in.taskSearchCriteria" - } - }, - "output" : { - "map" : { - "out" : "in", - "out.totalTasks" : "result.totalTasks" - } - } - }, - "visual" : { - "at" : { "x" : 216, "y" : 992 } - }, - "connect" : [ - { "id" : "f60", "to" : "f59" } - ] - }, { - "id" : "f53", - "type" : "Script", - "name" : "counter++", - "config" : { - "output" : { - "code" : "in.loopCounter++;" - } - }, - "visual" : { - "at" : { "x" : 616, "y" : 1120 } - }, - "connect" : [ - { "id" : "f21", "to" : "f18" } - ] - }, { - "id" : "f18", - "type" : "Alternative", - "config" : { - "conditions" : { - "f61" : "in.loopCounter <= in.totalTasks / in.maxResultNumberPerQuery" - } - }, - "visual" : { - "at" : { "x" : 464, "y" : 992 } - }, - "connect" : [ - { "id" : "f61", "to" : "f15" }, - { "id" : "f62", "to" : "f37" } - ] - }, { - "id" : "f59", - "type" : "Script", - "name" : "init data", - "config" : { - "output" : { - "code" : [ - "import java.util.ArrayList;", - "in.loopCounter = 0;", - "in.maxResultNumberPerQuery = 100000;", - "in.collectedTasksForExporting = new ArrayList();" - ] - } - }, - "visual" : { - "at" : { "x" : 360, "y" : 992 } - }, - "connect" : [ - { "id" : "f58", "to" : "f18" } - ] - }, { - "id" : "f55", - "type" : "HtmlDialogMethodStart", - "name" : "restoreDefaultFilterSet()", - "config" : { - "signature" : "restoreDefaultFilterSet", - "guid" : "17055DF5174D824A" - }, - "visual" : { - "at" : { "x" : 80, "y" : 1248 }, - "labelOffset" : { "x" : 26, "y" : 35 } - }, - "connect" : [ - { "id" : "f66", "to" : "f64" } - ] - }, { - "id" : "f63", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 384, "y" : 1248 } - } - }, { - "id" : "f64", - "type" : "Script", - "name" : "Apply default filter", - "config" : { - "output" : { - "code" : [ - "out.dataModel.selectedTaskAnalysisFilterData = null;", - "out.dataModel.applyFilter(out.dataModel.defaultTaskAnalysisFilterData);" - ] - } - }, - "visual" : { - "at" : { "x" : 248, "y" : 1248 } - }, - "connect" : [ - { "id" : "f67", "to" : "f63" } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidget.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidget.xhtml deleted file mode 100644 index f2121c3cf30..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidget.xhtml +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - -
-
-
-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidgetData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidgetData.d.json deleted file mode 100644 index ac63d83ceae..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidgetData.d.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "ChartCreationWidgetData", - "namespace" : "ch.ivy.addon.portalkit.component.statistic.ChartCreationWidget", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "statisticFilter", - "type" : "ch.ivy.addon.portalkit.statistics.StatisticFilter", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "chartType", - "type" : "ch.ivy.addon.portalkit.enums.StatisticChartType", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isChartNameExisted", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "statisticChartList", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isAllowedToCreateChart", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "oldStatisticFilter", - "type" : "ch.ivy.addon.portalkit.statistics.StatisticFilter", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "customFields", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "chartNames", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDefaultApplicationLanguage", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "language", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidgetProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidgetProcess.p.json deleted file mode 100644 index 580fadd3e46..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartCreationWidget/ChartCreationWidgetProcess.p.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "15FFC669C88F7E0B", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.statistic.ChartCreationWidget.ChartCreationWidgetData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "input" : { - "map" : { - "out.isAllowedToCreateChart" : "true" - } - }, - "guid" : "15FFC669CAD8BE32" - }, - "visual" : { - "at" : { "x" : 112, "y" : 64 } - }, - "connect" : [ - { "id" : "f47", "to" : "f39" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 1336, "y" : 88 } - } - }, { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "15FFC669CBAE4804" - }, - "visual" : { - "at" : { "x" : 112, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 448, "y" : 160 } - } - }, { - "id" : "f35", - "type" : "HtmlDialogMethodStart", - "name" : "createStatisticChart(List)", - "config" : { - "signature" : "createStatisticChart", - "input" : { - "params" : [ - { "name" : "statisticChartList", "type" : "java.util.List", "desc" : "" } - ], - "map" : { - "out.statisticChartList" : "param.statisticChartList" - } - }, - "guid" : "1601F664C9C78C71" - }, - "visual" : { - "at" : { "x" : 88, "y" : 976 }, - "labelOffset" : { "x" : 21, "y" : 49 } - }, - "connect" : [ - { "id" : "f30", "to" : "f26" } - ] - }, { - "id" : "f40", - "type" : "HtmlDialogMethodStart", - "name" : "updateBeforeAddCaseByState()", - "config" : { - "signature" : "updateBeforeAddCaseByState", - "input" : { - "map" : { }, - "code" : [ - "import ch.ivy.addon.portalkit.bean.StatisticChartCreationBean;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.enums.StatisticChartType;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "StatisticChartCreationBean chartCreationBean = context.getApplication().evaluateExpressionGet(context, \"#{statisticChartCreationBean}\", StatisticChartCreationBean.class) as StatisticChartCreationBean;", - "out.isAllowedToCreateChart = !chartCreationBean.checkIfAnyFilterChanges(out.statisticFilter, out.oldStatisticFilter);", - "", - "if (out.isAllowedToCreateChart) {", - " out.chartType = StatisticChartType.CASES_BY_STATE;", - "}" - ] - }, - "guid" : "1601F9BADD2EC1C0" - }, - "visual" : { - "at" : { "x" : 112, "y" : 448 } - }, - "connect" : [ - { "id" : "f45", "to" : "f43", "via" : [ { "x" : 448, "y" : 448 } ] } - ] - }, { - "id" : "f42", - "type" : "HtmlDialogMethodStart", - "name" : "updateBeforeAddTaskByExpiry()", - "config" : { - "signature" : "updateBeforeAddTaskByExpiry", - "input" : { - "map" : { }, - "code" : [ - "import ch.ivy.addon.portalkit.bean.StatisticChartCreationBean;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.enums.StatisticChartType;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "StatisticChartCreationBean chartCreationBean = context.getApplication().evaluateExpressionGet(context, \"#{statisticChartCreationBean}\", StatisticChartCreationBean.class) as StatisticChartCreationBean;", - "out.isAllowedToCreateChart = !chartCreationBean.checkIfAnyFilterChanges(out.statisticFilter, out.oldStatisticFilter);", - "", - "if (out.isAllowedToCreateChart) {", - " out.chartType = StatisticChartType.TASK_BY_EXPIRY;", - "}" - ] - }, - "guid" : "1601F9BBC3E25AD8" - }, - "visual" : { - "at" : { "x" : 112, "y" : 544 } - }, - "connect" : [ - { "id" : "f46", "to" : "f43", "via" : [ { "x" : 448, "y" : 544 } ] } - ] - }, { - "id" : "f43", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 448, "y" : 496 } - } - }, { - "id" : "f6", - "type" : "HtmlDialogMethodStart", - "name" : "initialize()", - "config" : { - "signature" : "initialize", - "guid" : "160358C7FBCD2AE2" - }, - "visual" : { - "at" : { "x" : 112, "y" : 256 } - }, - "connect" : [ - { "id" : "f8", "to" : "f7" } - ] - }, { - "id" : "f15", - "type" : "Script", - "name" : "Initialize", - "config" : { - "output" : { - "code" : [ - "import java.util.Locale;", - "import ch.ivy.addon.portalkit.dto.DisplayName;", - "import java.util.ArrayList;", - "import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService;", - "import org.apache.commons.lang3.ObjectUtils;", - "import ch.ivy.addon.portalkit.statistics.StatisticFilter;", - "import java.util.ArrayList;", - "", - "if (!(in.statisticChartList is initialized)) {", - " in.statisticChartList = new ArrayList();", - "}", - "", - "in.statisticFilter = new StatisticFilter();", - "in.statisticFilter.init();", - "in.oldStatisticFilter = ObjectUtils.clone(in.statisticFilter) as StatisticFilter;", - "", - "in.chartNames = new ArrayList();", - "for(String lang : LanguageService.getInstance().getIvyLanguageOfUser().supportedLanguages) {", - " DisplayName displayName = new DisplayName();", - " displayName.locale = Locale.forLanguageTag(lang);", - " displayName.value = \"\";", - " in.chartNames.add(displayName);", - "}" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 776, "y" : 88 } - }, - "connect" : [ - { "id" : "f27", "to" : "f28" } - ] - }, { - "id" : "f7", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 448, "y" : 256 } - } - }, { - "id" : "f11", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 648, "y" : 1168 } - } - }, { - "id" : "f41", - "type" : "HtmlDialogMethodStart", - "name" : "updateBeforeAddTaskByPriority()", - "config" : { - "signature" : "updateBeforeAddTaskByPriority", - "input" : { - "map" : { }, - "code" : [ - "import ch.ivy.addon.portalkit.bean.StatisticChartCreationBean;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.enums.StatisticChartType;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "StatisticChartCreationBean chartCreationBean = context.getApplication().evaluateExpressionGet(context, \"#{statisticChartCreationBean}\", StatisticChartCreationBean.class) as StatisticChartCreationBean;", - "out.isAllowedToCreateChart = !chartCreationBean.checkIfAnyFilterChanges(out.statisticFilter, out.oldStatisticFilter);", - "", - "if (out.isAllowedToCreateChart) {", - " out.chartType = StatisticChartType.TASK_BY_PRIORITY;", - "}" - ] - }, - "guid" : "1601F9BB6832261A" - }, - "visual" : { - "at" : { "x" : 112, "y" : 352 } - }, - "connect" : [ - { "id" : "f44", "to" : "f43", "via" : [ { "x" : 448, "y" : 352 } ] } - ] - }, { - "id" : "f13", - "type" : "Script", - "name" : "Clear chart name", - "config" : { - "output" : { - "code" : [ - "import java.util.ArrayList;", - "import java.util.Locale;", - "import ch.ivy.addon.portalkit.dto.DisplayName;", - "import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService;", - "", - "in.chartNames = new ArrayList();", - "", - "for(String lang : LanguageService.getInstance().getIvyLanguageOfUser().supportedLanguages) {", - " DisplayName displayName = new DisplayName();", - " displayName.locale = Locale.forLanguageTag(lang);", - " displayName.value = \"\";", - " in.chartNames.add(displayName);", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 392, "y" : 1168 } - }, - "connect" : [ - { "id" : "f12", "to" : "f11" } - ] - }, { - "id" : "f17", - "type" : "HtmlDialogMethodStart", - "name" : "updateBeforeAddElapsedTime()", - "config" : { - "signature" : "updateBeforeAddElapsedTime", - "input" : { - "map" : { }, - "code" : [ - "import ch.ivy.addon.portalkit.bean.StatisticChartCreationBean;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.enums.StatisticChartType;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "StatisticChartCreationBean chartCreationBean = context.getApplication().evaluateExpressionGet(context, \"#{statisticChartCreationBean}\", StatisticChartCreationBean.class) as StatisticChartCreationBean;", - "out.isAllowedToCreateChart = !chartCreationBean.checkIfAnyFilterChanges(out.statisticFilter, out.oldStatisticFilter);", - "", - "if (out.isAllowedToCreateChart) {", - " out.chartType = StatisticChartType.ELAPSED_TIME_BY_CASE_CATEGORY;", - "}" - ] - }, - "guid" : "160485D2143D0001" - }, - "visual" : { - "at" : { "x" : 112, "y" : 640 } - }, - "connect" : [ - { "id" : "f18", "to" : "f43", "via" : [ { "x" : 448, "y" : 640 } ] } - ] - }, { - "id" : "f21", - "type" : "Alternative", - "config" : { - "conditions" : { - "f32" : "!in.isChartNameExisted" - } - }, - "visual" : { - "at" : { "x" : 392, "y" : 976 } - }, - "connect" : [ - { "id" : "f32", "to" : "f31" }, - { "id" : "f20", "to" : "f11", "via" : [ { "x" : 648, "y" : 976 } ] } - ] - }, { - "id" : "f10", - "type" : "HtmlDialogEventStart", - "name" : "clearChartInput", - "config" : { - "guid" : "160911F3882D9937" - }, - "visual" : { - "at" : { "x" : 88, "y" : 1168 } - }, - "connect" : [ - { "id" : "f14", "to" : "f13" } - ] - }, { - "id" : "f22", - "type" : "HtmlDialogMethodStart", - "name" : "updateBeforeAddCaseByFinishedTask()", - "config" : { - "signature" : "updateBeforeAddCaseByFinishedTask", - "input" : { - "map" : { }, - "code" : [ - "import ch.ivy.addon.portalkit.bean.StatisticChartCreationBean;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.enums.StatisticChartType;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "StatisticChartCreationBean chartCreationBean = context.getApplication().evaluateExpressionGet(context, \"#{statisticChartCreationBean}\", StatisticChartCreationBean.class) as StatisticChartCreationBean;", - "out.isAllowedToCreateChart = !chartCreationBean.checkIfAnyFilterChanges(out.statisticFilter, out.oldStatisticFilter);", - "", - "if (out.isAllowedToCreateChart) {", - " out.chartType = StatisticChartType.CASES_BY_FINISHED_TASK;", - "}" - ] - }, - "guid" : "1621EDBADBEB0978" - }, - "visual" : { - "at" : { "x" : 112, "y" : 736 }, - "labelOffset" : { "x" : 23, "y" : 36 } - }, - "connect" : [ - { "id" : "f23", "to" : "f43", "via" : [ { "x" : 448, "y" : 736 } ] } - ] - }, { - "id" : "f24", - "type" : "HtmlDialogMethodStart", - "name" : "updateBeforeAddCaseByFinishedTime()", - "config" : { - "signature" : "updateBeforeAddCaseByFinishedTime", - "input" : { - "map" : { }, - "code" : [ - "import ch.ivy.addon.portalkit.bean.StatisticChartCreationBean;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.enums.StatisticChartType;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "StatisticChartCreationBean chartCreationBean = context.getApplication().evaluateExpressionGet(context, \"#{statisticChartCreationBean}\", StatisticChartCreationBean.class) as StatisticChartCreationBean;", - "out.isAllowedToCreateChart = !chartCreationBean.checkIfAnyFilterChanges(out.statisticFilter, out.oldStatisticFilter);", - "", - "if (out.isAllowedToCreateChart) {", - " out.chartType = StatisticChartType.CASES_BY_FINISHED_TIME;", - "}" - ] - }, - "guid" : "162233637AE65F94" - }, - "visual" : { - "at" : { "x" : 112, "y" : 832 } - }, - "connect" : [ - { "id" : "f25", "to" : "f43", "via" : [ { "x" : 448, "y" : 832 } ] } - ] - }, { - "id" : "f28", - "type" : "Script", - "name" : "init custom fields", - "config" : { - "output" : { - "code" : [ - "import java.util.ArrayList;", - "for (String field : in.customFields){", - " in.statisticFilter.customFieldFilters.put(field, new ArrayList()); ", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 1192, "y" : 88 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f87", - "type" : "HtmlDialogMethodStart", - "name" : "isApplicationDefaultEmailLanguage(String)", - "config" : { - "signature" : "isApplicationDefaultEmailLanguage", - "input" : { - "params" : [ - { "name" : "language", "type" : "String", "desc" : "" } - ], - "map" : { - "out.language" : "param.language" - } - }, - "result" : { - "params" : [ - { "name" : "result", "type" : "Boolean", "desc" : "" } - ], - "map" : { - "result.result" : "in.isDefaultApplicationLanguage" - } - }, - "guid" : "17597ECF890D0A64" - }, - "visual" : { - "at" : { "x" : 112, "y" : 1256 }, - "labelOffset" : { "x" : 29, "y" : 36 } - }, - "connect" : [ - { "id" : "f36", "to" : "f34" } - ] - }, { - "id" : "f89", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 448, "y" : 1256 } - } - }, { - "id" : "f26", - "type" : "Script", - "name" : "Check chart name is existed", - "config" : { - "output" : { - "code" : [ - "import com.axonivy.portal.components.util.FacesMessageUtils;", - "import ch.ivy.addon.portalkit.dto.DisplayName;", - "import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService;", - "import javax.faces.context.FacesContext;", - "import javax.faces.application.FacesMessage;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "", - "in.isChartNameExisted = false;", - "", - "StatisticService service = StatisticService.getInstance();", - "for (DisplayName name : out.chartNames) {", - " String chartName = name.value;", - " if (service.checkStatisticChartNameExisted(chartName.trim(), name.getLocale().toLanguageTag())) {", - " FacesMessage message = FacesMessageUtils.sanitizedMessage( FacesMessage.SEVERITY_ERROR, ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/statistic/validationErrors/nameIsExisted\"), \"\");", - " FacesContext.getCurrentInstance().addMessage(\"chart-name-input\", message);", - " FacesContext.getCurrentInstance().validationFailed();", - " in.isChartNameExisted = true;", - " break;", - " }", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 256, "y" : 976 }, - "size" : { "width" : 160 } - }, - "connect" : [ - { "id" : "f16", "to" : "f21" } - ] - }, { - "id" : "f31", - "type" : "Script", - "name" : [ - "Save and", - "show growl message" - ], - "config" : { - "output" : { - "code" : [ - "import com.axonivy.portal.components.util.FacesMessageUtils;", - "import ch.ivyteam.ivy.language.LanguageConfigurator;", - "import ch.ivyteam.ivy.security.ISecurityContext;", - "import org.apache.commons.lang3.StringUtils;", - "import java.util.HashMap;", - "import java.util.Map;", - "import ch.ivy.addon.portalkit.dto.DisplayName;", - "import java.util.Arrays;", - "import javax.faces.context.FacesContext;", - "import javax.faces.application.FacesMessage;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "", - "// Update empty chart name", - "String defaultEmailLanguage = new LanguageConfigurator(ISecurityContext.current()).content().toLanguageTag();", - "String defaultChartName = \"\";", - "for (DisplayName name : in.chartNames) {", - " if (defaultEmailLanguage.equalsIgnoreCase(name.locale.toLanguageTag())) {", - " defaultChartName = name.value;", - " }", - "}", - "", - "for (DisplayName name : in.chartNames) {", - " if (!defaultEmailLanguage.equalsIgnoreCase(name.locale.toLanguageTag()) && StringUtils.isBlank(name.value)) {", - " name.value = defaultChartName;", - " }", - "}", - "", - "StatisticService service = StatisticService.getInstance();", - "StatisticChart newChart = service.createStatisticChart(in.statisticFilter, in.chartNames, in.chartType, false);", - "in.statisticChartList.add(newChart);", - "", - "String growlTitle = ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/chartCreationSuccessTitle\");", - "String growlDetail = ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/chartCreationSuccessDetailMsg\", Arrays.asList(service.getDisplayNameInUserLanguageForChart(newChart).value));", - "FacesMessage message = FacesMessageUtils.sanitizedMessage( FacesMessage.SEVERITY_INFO, growlTitle, growlDetail);", - "FacesContext.getCurrentInstance().addMessage(\"chart-creation-growl\", message);" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 392, "y" : 1072 }, - "size" : { "width" : 144 } - }, - "connect" : [ - { "id" : "f19", "to" : "f13" } - ] - }, { - "id" : "f34", - "type" : "Script", - "name" : "Check language", - "config" : { - "output" : { - "code" : [ - "import ch.ivyteam.ivy.security.ISecurityContext;", - "import ch.ivyteam.ivy.language.LanguageConfigurator;", - "import java.util.Locale;", - "import ch.ivyteam.ivy.application.IApplication;", - "", - "Locale defaultLocale = new LanguageConfigurator(ISecurityContext.current()).content();", - "in.isDefaultApplicationLanguage = defaultLocale.toLanguageTag().equalsIgnoreCase(in.language);" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 304, "y" : 1256 } - }, - "connect" : [ - { "id" : "f37", "to" : "f89" } - ] - }, { - "id" : "f38", - "type" : "HtmlDialogMethodStart", - "name" : "initializeRoleAndCustomField()", - "config" : { - "signature" : "initializeRoleAndCustomField", - "guid" : "181229E2D2BA036C" - }, - "visual" : { - "at" : { "x" : 544, "y" : 88 }, - "labelOffset" : { "x" : 70, "y" : 35 } - }, - "connect" : [ - { "id" : "f33", "to" : "f15" } - ] - }, { - "id" : "f39", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 448, "y" : 64 } - } - }, { - "id" : "f48", - "type" : "HtmlDialogMethodStart", - "name" : "updateBeforeAddCasesByCategory()", - "config" : { - "signature" : "updateBeforeAddCasesByCategory", - "input" : { - "map" : { }, - "code" : [ - "import ch.ivy.addon.portalkit.bean.StatisticChartCreationBean;", - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.enums.StatisticChartType;", - "", - "FacesContext context = FacesContext.getCurrentInstance();", - "StatisticChartCreationBean chartCreationBean = context.getApplication().evaluateExpressionGet(context, \"#{statisticChartCreationBean}\", StatisticChartCreationBean.class) as StatisticChartCreationBean;", - "out.isAllowedToCreateChart = !chartCreationBean.checkIfAnyFilterChanges(out.statisticFilter, out.oldStatisticFilter);", - "", - "if (out.isAllowedToCreateChart) {", - " out.chartType = StatisticChartType.CASES_BY_CATEGORY;", - "}" - ] - }, - "guid" : "182142F4128BCDB9" - }, - "visual" : { - "at" : { "x" : 112, "y" : 904 }, - "labelOffset" : { "x" : -2, "y" : 35 } - }, - "connect" : [ - { "id" : "f49", "to" : "f43", "via" : [ { "x" : 448, "y" : 904 } ] } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialog.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialog.xhtml deleted file mode 100644 index bed51c33fe0..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialog.xhtml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialogData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialogData.d.json deleted file mode 100644 index 0c6d30a7acb..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialogData.d.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "ChartInformationDialogData", - "namespace" : "ch.ivy.addon.portalkit.component.statistic.ChartInformationDialog", - "isBusinessCaseData" : false -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialogProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialogProcess.p.json deleted file mode 100644 index 3f4a6efcb91..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ChartInformationDialog/ChartInformationDialogProcess.p.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "16247D906B46FE52", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.statistic.ChartInformationDialog.ChartInformationDialogData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "16247D9083290EA2" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 224, "y" : 64 } - } - }, { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "16247D9084A4636A" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 224, "y" : 160 } - } - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomField.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomField.xhtml deleted file mode 100644 index cafb78ee6ce..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomField.xhtml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomFieldData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomFieldData.d.json deleted file mode 100644 index 5685fd498b0..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomFieldData.d.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "CustomFieldData", - "namespace" : "ch.ivy.addon.portalkit.component.statistic.CustomField", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "selectedCustomValue", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "tempSelectedCustomValues", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedCustomValues", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomFieldProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomFieldProcess.p.json deleted file mode 100644 index 97389c457f4..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomField/CustomFieldProcess.p.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "16A76A01ED2FA2D0", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.statistic.CustomField.CustomFieldData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "16A76A01F08609A3" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 224, "y" : 64 } - } - }, { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "16A76A01F317AB59" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 224, "y" : 160 } - } - }, { - "id" : "f12", - "type" : "Script", - "config" : { - "output" : { - "code" : [ - "if(!in.tempSelectedCustomValues.contains(in.selectedCustomValue)) {", - " in.tempSelectedCustomValues.add(in.selectedCustomValue);", - " in.selectedCustomValue = null;", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 225, "y" : 258 } - }, - "connect" : [ - { "id" : "f11", "to" : "f10" } - ] - }, { - "id" : "f10", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 353, "y" : 258 } - } - }, { - "id" : "f9", - "type" : "HtmlDialogMethodStart", - "name" : "addCustomVal()", - "config" : { - "signature" : "addCustomVal", - "guid" : "16A76A3527AC714D" - }, - "visual" : { - "at" : { "x" : 97, "y" : 258 } - }, - "connect" : [ - { "id" : "f13", "to" : "f12" } - ] - }, { - "id" : "f7", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 224, "y" : 352 } - } - }, { - "id" : "f14", - "type" : "HtmlDialogMethodStart", - "name" : "cleanUp()", - "config" : { - "signature" : "cleanUp", - "input" : { - "map" : { - "out.selectedCustomValues" : "new java.util.ArrayList()", - "out.tempSelectedCustomValues" : "new java.util.ArrayList()" - } - }, - "guid" : "16ADE4E91DC3CB1F" - }, - "visual" : { - "at" : { "x" : 96, "y" : 352 } - }, - "connect" : [ - { "id" : "f15", "to" : "f7" } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarField.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarField.xhtml deleted file mode 100644 index f72c517d67a..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarField.xhtml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarFieldData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarFieldData.d.json deleted file mode 100644 index df0da298592..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarFieldData.d.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "CustomVarFieldData", - "namespace" : "ch.ivy.addon.portalkit.component.statistic.CustomVarField", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "selectedCustomValue", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "tempSelectedCustomValues", - "type" : "List", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarFieldProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarFieldProcess.p.json deleted file mode 100644 index 3dc98c433ff..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/CustomVarField/CustomVarFieldProcess.p.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "163B018AA65AA403", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.statistic.CustomVarField.CustomVarFieldData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "163B018AAA51EB1F" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 224, "y" : 64 } - } - }, { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "163B018AAC28212E" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 224, "y" : 160 } - } - }, { - "id" : "f10", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 353, "y" : 258 } - } - }, { - "id" : "f9", - "type" : "HtmlDialogMethodStart", - "name" : "addCustomVal()", - "config" : { - "signature" : "addCustomVal", - "guid" : "163B02A2C957AD5F" - }, - "visual" : { - "at" : { "x" : 97, "y" : 258 } - }, - "connect" : [ - { "id" : "f13", "to" : "f12" } - ] - }, { - "id" : "f12", - "type" : "Script", - "config" : { - "output" : { - "code" : [ - "if(!in.tempSelectedCustomValues.contains(in.selectedCustomValue)) {", - " in.tempSelectedCustomValues.add(in.selectedCustomValue);", - " in.selectedCustomValue = null;", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 225, "y" : 258 } - }, - "connect" : [ - { "id" : "f11", "to" : "f10" } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetails.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetails.xhtml deleted file mode 100644 index 3191c830be4..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetails.xhtml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetailsData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetailsData.d.json deleted file mode 100644 index 5b1c02a928a..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetailsData.d.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "ElapsedTimeChartDetailsData", - "namespace" : "ch.ivy.addon.portalkit.component.statistic.ElapsedTimeChartDetails", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "dataModel", - "type" : "ch.ivy.addon.portalkit.datamodel.internal.ElapsedTimeLazyDataModel", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "cases", - "type" : "List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "totalCases", - "type" : "Long", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "startIndex", - "type" : "Integer", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "count", - "type" : "Integer", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "caseSearchCriteria", - "type" : "ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "filterGroupId", - "type" : "Long", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "category", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetailsProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetailsProcess.p.json deleted file mode 100644 index 1f7626cd7a4..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/ElapsedTimeChartDetails/ElapsedTimeChartDetailsProcess.p.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "161504784DDFCFC7", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.statistic.ElapsedTimeChartDetails.ElapsedTimeChartDetailsData" - }, - "elements" : [ { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "161504785367B2A4" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 224, "y" : 160 } - } - }, { - "id" : "f15", - "type" : "HtmlDialogMethodStart", - "name" : "countCases(CaseSearchCriteria)", - "config" : { - "signature" : "countCases", - "input" : { - "params" : [ - { "name" : "caseSearchCriteria", "type" : "ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria", "desc" : "" } - ], - "map" : { - "out.caseSearchCriteria" : "param.caseSearchCriteria" - } - }, - "result" : { - "params" : [ - { "name" : "totalCases", "type" : "Long", "desc" : "" } - ], - "map" : { - "result.totalCases" : "in.totalCases" - } - }, - "guid" : "16AD339444C2C97E" - }, - "visual" : { - "at" : { "x" : 96, "y" : 352 }, - "labelOffset" : { "x" : 55, "y" : 34 } - }, - "connect" : [ - { "id" : "f19", "to" : "f18" } - ] - }, { - "id" : "f20", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 576, "y" : 352 } - } - }, { - "id" : "f6", - "type" : "HtmlDialogMethodStart", - "name" : "findCases(CaseSearchCriteria,Integer,Integer)", - "config" : { - "signature" : "findCases", - "input" : { - "params" : [ - { "name" : "caseSearchCriteria", "type" : "ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria", "desc" : "" }, - { "name" : "startIndex", "type" : "Integer", "desc" : "" }, - { "name" : "count", "type" : "Integer", "desc" : "" } - ], - "map" : { - "out.caseSearchCriteria" : "param.caseSearchCriteria", - "out.count" : "param.count", - "out.startIndex" : "param.startIndex" - } - }, - "result" : { - "params" : [ - { "name" : "cases", "type" : "List", "desc" : "" } - ], - "map" : { - "result.cases" : "in.cases" - } - }, - "guid" : "16AD339444E6AFE5" - }, - "visual" : { - "at" : { "x" : 96, "y" : 256 }, - "size" : { "width" : 24, "height" : 24 }, - "labelOffset" : { "x" : 62, "y" : 34 } - }, - "connect" : [ - { "id" : "f8", "to" : "f7" } - ] - }, { - "id" : "f7", - "type" : "SubProcessCall", - "name" : "CaseService", - "config" : { - "processCall" : "Ivy Data Processes/CaseService:findCasesByCriteria(ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria,Integer,Integer)", - "call" : { - "map" : { - "param.caseSearchCriteria" : "in.caseSearchCriteria", - "param.startIndex" : "in.startIndex", - "param.count" : "in.count" - } - }, - "output" : { - "map" : { - "out" : "in", - "out.cases" : "result.cases" - } - } - }, - "visual" : { - "at" : { "x" : 360, "y" : 256 } - }, - "connect" : [ - { "id" : "f10", "to" : "f9" } - ] - }, { - "id" : "f9", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 576, "y" : 256 } - } - }, { - "id" : "f18", - "type" : "SubProcessCall", - "name" : "CaseService", - "config" : { - "processCall" : "Ivy Data Processes/CaseService:countCasesByCriteria(ch.ivy.addon.portalkit.ivydata.searchcriteria.CaseSearchCriteria)", - "call" : { - "map" : { - "param.caseSearchCriteria" : "in.caseSearchCriteria" - } - }, - "output" : { - "map" : { - "out" : "in", - "out.totalCases" : "result.totalCases" - } - } - }, - "visual" : { - "at" : { "x" : 360, "y" : 352 } - }, - "connect" : [ - { "id" : "f11", "to" : "f20" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 576, "y" : 96 } - } - }, { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start", - "config" : { - "signature" : "start", - "guid" : "16AD3D99ECE5523E" - }, - "visual" : { - "at" : { "x" : 96, "y" : 96 }, - "labelOffset" : { "x" : 34, "y" : 20 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f12", - "type" : "HtmlDialogMethodStart", - "name" : "initialize(String)", - "config" : { - "signature" : "initialize", - "input" : { - "params" : [ - { "name" : "caseCategory", "type" : "String", "desc" : "" } - ], - "map" : { - "out.category" : "param.caseCategory" - } - }, - "guid" : "16AD87286B4BA607" - }, - "visual" : { - "at" : { "x" : 96, "y" : 448 } - }, - "connect" : [ - { "id" : "f17", "to" : "f16" } - ] - }, { - "id" : "f13", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 576, "y" : 448 } - } - }, { - "id" : "f16", - "type" : "Script", - "name" : "Set CaseCatgory", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.datamodel.internal.ElapsedTimeLazyDataModel;", - "import ch.ivy.addon.portalkit.statistics.StatisticChartConstants;", - "", - "in.dataModel = new ElapsedTimeLazyDataModel();", - "if(!ivy.cms.co(StatisticChartConstants.NO_CATEGORY_CMS).equalsIgnoreCase(in.category)) {", - " in.dataModel.setCategory(in.category);", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 256, "y" : 448 } - }, - "connect" : [ - { "id" : "f14", "to" : "f13" } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticCarousel.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticCarousel.xhtml deleted file mode 100644 index 357e8fdc9d3..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticCarousel.xhtml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidget.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidget.xhtml deleted file mode 100644 index 2c6f256a551..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidget.xhtml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
- - - -

#{chart.name}

- -
- - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
-
-
-
-
- - - - - - - - - -
- - - - - - - - - - -
- -
- - -
-
-
- - - - - - - - - - - - - - - -
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidgetData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidgetData.d.json deleted file mode 100644 index b954777b944..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidgetData.d.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "StatisticDashboardWidgetData", - "namespace" : "ch.ivy.addon.portalkit.component.statistic.StatisticDashboardWidget", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "selectedStatisticChart", - "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "statisticChartList", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskQuery", - "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "caseQuery", - "type" : "ch.ivyteam.ivy.workflow.query.CaseQuery", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "hasStatistic", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedItemOfDrilldown", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDrilldownToTaskList", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedCaseCategory", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "previousSelectedMonth", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "previousSelectedWeek", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "previousSelectedDay", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "showTaskListImmediately", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "taskListName", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isBackFromDrilldown", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isFinishLoadCharts", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isCompactMode", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "defaultCharts", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDrilldownExpiryChart", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isReloadChartContent", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "prevStatisticList", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "chartNameOfCurrentLanguage", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "numberOfDefaultCharts", - "type" : "Integer", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedCategoryOfDrilldown", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "isDrilldownToCaseList", - "type" : "Boolean", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "selectedCategories", - "type" : "java.util.List", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidgetProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidgetProcess.p.json deleted file mode 100644 index f3d32dfc460..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticDashboardWidget/StatisticDashboardWidgetProcess.p.json +++ /dev/null @@ -1,1121 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "1600AC95D2CA7CEA", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.statistic.StatisticDashboardWidget.StatisticDashboardWidgetData" - }, - "elements" : [ { - "id" : "S10", - "type" : "EmbeddedProcess", - "name" : "Fetch Default Charts", - "elements" : [ { - "id" : "S10-f73", - "type" : "Script", - "name" : "add to chart list", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "import java.util.ArrayList;", - "", - "StatisticService service = StatisticService.getInstance();", - "in.statisticChartList = service.updateExistedChartsWithNewCharts(in.statisticChartList);" - ] - } - }, - "visual" : { - "at" : { "x" : 624, "y" : 160 } - }, - "connect" : [ - { "id" : "S10-f2", "to" : "S10-g2" } - ] - }, { - "id" : "S10-g2", - "type" : "EmbeddedEnd", - "visual" : { - "at" : { "x" : 792, "y" : 160 } - }, - "parentConnector" : "f1" - }, { - "id" : "S10-g1", - "type" : "EmbeddedStart", - "visual" : { - "at" : { "x" : 88, "y" : 160 } - }, - "parentConnector" : "f67", - "connect" : [ - { "id" : "S10-f0", "to" : "S10-f73" } - ] - }, { - "id" : "S10-g0", - "type" : "EmbeddedStart", - "visual" : { - "at" : { "x" : 336, "y" : 272 } - } - } ], - "visual" : { - "at" : { "x" : 936, "y" : 288 }, - "size" : { "width" : 128 } - }, - "connect" : [ - { "id" : "f1", "to" : "f3" } - ] - }, { - "id" : "f11", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "input" : { - "map" : { - "out.isFinishLoadCharts" : "false" - } - }, - "guid" : "1604F11B5BA97CC5" - }, - "visual" : { - "at" : { "x" : 136, "y" : 64 } - }, - "connect" : [ - { "id" : "f0", "to" : "f14" } - ] - }, { - "id" : "f14", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 288, "y" : 64 } - } - }, { - "id" : "f2", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 1480, "y" : 288 } - } - }, { - "id" : "f16", - "type" : "HtmlDialogMethodStart", - "name" : "moveLeft(StatisticChart)", - "config" : { - "signature" : "moveLeft", - "input" : { - "params" : [ - { "name" : "statisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" } - ], - "map" : { - "out.selectedStatisticChart" : "param.statisticChart" - } - }, - "guid" : "16052B0B212D3060" - }, - "visual" : { - "at" : { "x" : 704, "y" : 672 } - }, - "connect" : [ - { "id" : "f15", "to" : "f13" } - ] - }, { - "id" : "f17", - "type" : "HtmlDialogMethodStart", - "name" : "moveRight(StatisticChart)", - "config" : { - "signature" : "moveRight", - "input" : { - "params" : [ - { "name" : "statisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" } - ], - "map" : { - "out.selectedStatisticChart" : "param.statisticChart" - } - }, - "guid" : "16052B0B70AD24B1" - }, - "visual" : { - "at" : { "x" : 704, "y" : 768 } - }, - "connect" : [ - { "id" : "f23", "to" : "f22" } - ] - }, { - "id" : "f18", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 1136, "y" : 672 } - } - }, { - "id" : "f19", - "type" : "Script", - "name" : "Update charts position", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "", - "StatisticService service = StatisticService.getInstance();", - "", - "for(StatisticChart chart : in.statisticChartList) {", - " int newPosition = in.statisticChartList.indexOf(chart);", - " if (chart.position != newPosition) {", - " chart.setPosition(newPosition);", - " service.save(chart);", - " }", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 992, "y" : 672 }, - "size" : { "width" : 128 } - }, - "connect" : [ - { "id" : "f20", "to" : "f18" } - ] - }, { - "id" : "f25", - "type" : "HtmlDialogMethodStart", - "name" : "deleteChart(StatisticChart)", - "config" : { - "signature" : "deleteChart", - "guid" : "16052B8CCBF953C6" - }, - "visual" : { - "at" : { "x" : 128, "y" : 672 } - }, - "connect" : [ - { "id" : "f27", "to" : "f26" } - ] - }, { - "id" : "f26", - "type" : "Script", - "name" : "Delete chart", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - "", - "in.statisticChartList.remove(in.selectedStatisticChart);", - "service.delete(in.selectedStatisticChart.id);", - "", - "for(StatisticChart chart : in.statisticChartList) {", - " chart.setPosition(in.statisticChartList.indexOf(chart));", - " service.save(chart);", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 312, "y" : 672 } - }, - "connect" : [ - { "id" : "f29", "to" : "f28" } - ] - }, { - "id" : "f28", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 488, "y" : 672 } - } - }, { - "id" : "f30", - "type" : "Script", - "name" : "Generate dashboard chart", - "config" : { - "output" : { - "code" : [ - "import java.util.ArrayList;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - "if (in.statisticChartList.size() != 0) {", - " in.hasStatistic = true;", - " if(in.selectedItemOfDrilldown.isEmpty() || in.selectedCategoryOfDrilldown.isEmpty()){", - " service.generateChartModelForStatisticCharts(in.statisticChartList);", - " }", - "} else {", - " in.hasStatistic = false;", - "}", - "", - "in.isFinishLoadCharts = true;", - "in.prevStatisticList = new ArrayList(in.statisticChartList);", - "in.defaultCharts.clear();" - ] - }, - "sudo" : true - }, - "visual" : { - "at" : { "x" : 1280, "y" : 288 }, - "size" : { "width" : 144, "height" : 48 } - }, - "connect" : [ - { "id" : "f80", "to" : "f2" } - ] - }, { - "id" : "f7", - "type" : "SubProcessCall", - "name" : "Navigator", - "config" : { - "processCall" : "Functional Processes/Navigator:viewTaskForAnalytic(String,ch.ivyteam.ivy.workflow.query.TaskQuery)", - "call" : { - "map" : { - "param.chartName" : "in.taskListName", - "param.taskQuery" : "in.taskQuery" - } - } - }, - "visual" : { - "at" : { "x" : 544, "y" : 424 } - } - }, { - "id" : "f36", - "type" : "Script", - "name" : "Build task query", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService;", - "import ch.ivy.addon.portalkit.ivydata.service.impl.LanguageService;", - "import org.apache.commons.lang3.StringUtils;", - "import ch.ivy.addon.portalkit.datamodel.TaskLazyDataModel;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import ch.ivy.addon.portalkit.statistics.StatisticChartQueryUtils;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "", - "if (StatisticService.selectMonthOfYear(in.selectedItemOfDrilldown)) {", - " in.previousSelectedMonth = in.selectedItemOfDrilldown;", - "} else if (StatisticService.selectWeekOfMonth(in.selectedItemOfDrilldown)) {", - " in.previousSelectedWeek = in.selectedItemOfDrilldown;", - "} else if (StatisticService.selectDayOfWeek(in.selectedItemOfDrilldown)) {", - " in.previousSelectedDay = in.selectedItemOfDrilldown;", - "}", - "", - "StatisticService service = StatisticService.getInstance();", - "in.chartNameOfCurrentLanguage = service.getDisplayNameInUserLanguageForChart(in.selectedStatisticChart).getValue();", - "", - "in.taskListName = in.chartNameOfCurrentLanguage + \" - \" + in.selectedItemOfDrilldown;", - "if (StatisticService.selectHourOfDay(in.selectedItemOfDrilldown)) {", - " in.taskListName += \" \" + ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/statistic/chart/taskByExpiry/hour\");", - "}", - "in.selectedItemOfDrilldown = StringUtils.EMPTY;" - ] - } - }, - "visual" : { - "at" : { "x" : 352, "y" : 272 } - }, - "connect" : [ - { "id" : "f38", "to" : "f7", "via" : [ { "x" : 544, "y" : 272 } ] } - ] - }, { - "id" : "f42", - "type" : "SubProcessCall", - "name" : "Navigator", - "config" : { - "processCall" : "Functional Processes/Navigator:viewCaseForAnalytic(String,ch.ivyteam.ivy.workflow.query.CaseQuery)", - "call" : { - "map" : { - "param.chartName" : "in.chartNameOfCurrentLanguage", - "param.caseQuery" : "in.caseQuery" - } - } - }, - "visual" : { - "at" : { "x" : 400, "y" : 496 } - } - }, { - "id" : "f32", - "type" : "HtmlDialogMethodStart", - "name" : "selectChart(StatisticChart)", - "config" : { - "signature" : "selectChart", - "input" : { - "params" : [ - { "name" : "chart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" } - ], - "map" : { - "out.selectedStatisticChart" : "param.chart" - } - }, - "guid" : "160E2C0243084AFE" - }, - "visual" : { - "at" : { "x" : 128, "y" : 768 } - }, - "connect" : [ - { "id" : "f34", "to" : "f33" } - ] - }, { - "id" : "f33", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 488, "y" : 768 } - } - }, { - "id" : "f39", - "type" : "Alternative", - "config" : { - "conditions" : { - "f37" : "in.showTaskListImmediately || in.isDrilldownToTaskList" - } - }, - "visual" : { - "at" : { "x" : 232, "y" : 272 } - }, - "connect" : [ - { "id" : "f37", "to" : "f36" }, - { "id" : "f99", "to" : "f98", "via" : [ { "x" : 232, "y" : 208 } ] } - ] - }, { - "id" : "f46", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 552, "y" : 208 } - } - }, { - "id" : "f48", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 499, "y" : 576 } - } - }, { - "id" : "f52", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 1120, "y" : 544 } - } - }, { - "id" : "f53", - "type" : "Script", - "name" : "Set data", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "in.isFinishLoadCharts = false;", - "", - "if (StatisticService.selectMonthOfYear(in.selectedItemOfDrilldown)) {", - " in.previousSelectedMonth = in.selectedItemOfDrilldown;", - "} else if (StatisticService.selectWeekOfMonth(in.selectedItemOfDrilldown)) {", - " in.previousSelectedWeek = in.selectedItemOfDrilldown;", - "} else if (StatisticService.selectDayOfWeek(in.selectedItemOfDrilldown)) {", - " in.previousSelectedDay = in.selectedItemOfDrilldown;", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 888, "y" : 544 } - }, - "connect" : [ - { "id" : "f55", "to" : "f52" } - ] - }, { - "id" : "f63", - "type" : "HtmlDialogMethodStart", - "name" : "generateChartModel", - "config" : { - "signature" : "generateChartModel", - "guid" : "168FFD6C153F13B5" - }, - "visual" : { - "at" : { "x" : 712, "y" : 288 }, - "labelOffset" : { "x" : 6, "y" : 41 } - }, - "connect" : [ - { "id" : "f60", "to" : "f59" } - ] - }, { - "id" : "f65", - "type" : "Script", - "name" : "Generate compact chart", - "config" : { - "output" : { - "code" : [ - "import java.util.ArrayList;", - "import org.apache.commons.collections.CollectionUtils;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "if (in.statisticChartList.size() != 0) {", - " StatisticService service = StatisticService.getInstance();", - " service.generateChartModelForStatisticCharts(in.statisticChartList);", - " in.hasStatistic = true;", - "} else {", - " in.hasStatistic = false;", - "}", - "", - "in.prevStatisticList = new ArrayList(in.statisticChartList);", - "in.isFinishLoadCharts = true;", - "in.defaultCharts.clear();" - ] - } - }, - "visual" : { - "at" : { "x" : 1280, "y" : 224 }, - "size" : { "width" : 144, "height" : 48 } - }, - "connect" : [ - { "id" : "f77", "to" : "f2", "via" : [ { "x" : 1480, "y" : 224 } ] } - ] - }, { - "id" : "f66", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 1232, "y" : 64 } - } - }, { - "id" : "f70", - "type" : "HtmlDialogMethodStart", - "name" : "initialize", - "config" : { - "signature" : "initialize", - "input" : { - "params" : [ - { "name" : "statisticChartList", "type" : "java.util.List", "desc" : "" }, - { "name" : "showTaskListImmediately", "type" : "Boolean", "desc" : "" }, - { "name" : "isBackFromDrilldown", "type" : "Boolean", "desc" : "" }, - { "name" : "isCompactMode", "type" : "Boolean", "desc" : "" }, - { "name" : "isDrilldownExpiryChart", "type" : "Boolean", "desc" : "" } - ], - "map" : { - "out.isBackFromDrilldown" : "param.isBackFromDrilldown", - "out.isCompactMode" : "param.isCompactMode", - "out.showTaskListImmediately" : "param.showTaskListImmediately", - "out.statisticChartList" : "param.statisticChartList" - } - }, - "guid" : "16F16B7D136FCEC1" - }, - "visual" : { - "at" : { "x" : 712, "y" : 64 }, - "labelOffset" : { "x" : 3, "y" : 36 } - }, - "connect" : [ - { "id" : "f69", "to" : "f62" } - ] - }, { - "id" : "f62", - "type" : "Alternative", - "config" : { - "conditions" : { - "f79" : "in.isCompactMode" - } - }, - "visual" : { - "at" : { "x" : 800, "y" : 64 } - }, - "connect" : [ - { "id" : "f79", "to" : "f72", "via" : [ { "x" : 800, "y" : 136 } ], "label" : { - "name" : "compact mode", - "segment" : 1.0, - "offset" : { "x" : 35, "y" : 17 } - } }, - { "id" : "f31", "to" : "f5" } - ] - }, { - "id" : "f3", - "type" : "Alternative", - "config" : { - "conditions" : { - "f50" : "in.statisticChartList.isEmpty()", - "f54" : "in.isFinishLoadCharts && ch.ivy.addon.portalkit.service.StatisticService.getInstance().isSame(in.prevStatisticList, in.statisticChartList)", - "f56" : "in.isCompactMode" - } - }, - "visual" : { - "at" : { "x" : 1080, "y" : 288 } - }, - "connect" : [ - { "id" : "f50", "to" : "f4", "via" : [ { "x" : 1096, "y" : 384 } ] }, - { "id" : "f54", "to" : "f2", "via" : [ { "x" : 1096, "y" : 336 }, { "x" : 1480, "y" : 336 } ], "label" : { - "name" : "haven't data changed in Statistics" - } }, - { "id" : "f56", "to" : "f65", "via" : [ { "x" : 1096, "y" : 224 } ] }, - { "id" : "f57", "to" : "f30" } - ] - }, { - "id" : "f5", - "type" : "Script", - "name" : "Create a placeholder for dashboard", - "config" : { - "output" : { - "code" : [ - "import java.util.ArrayList;", - "import org.apache.commons.lang3.StringUtils;", - "import ch.ivy.addon.portalkit.jsf.ManagedBeans;", - "import ch.ivy.addon.portalkit.bean.StatisticDashboardBean;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - " ", - "if (in.isBackFromDrilldown) {", - " in.selectedItemOfDrilldown = null;", - " in.selectedCategoryOfDrilldown = null;", - " in.isFinishLoadCharts = false;", - " ", - " in.statisticChartList = service.findStatisticCharts();", - "}", - "", - "if (!in.isDrilldownExpiryChart) {", - " in.hasStatistic = false;", - "}", - "", - "/* isReloadChartContent is a flag to reload the ChartJS canvas on UI ", - " If isFinishLoadCharts is true, we will reload the ChartJS canvas to draw new canva based on new data", - " If statisticChartList is changed, we need to reload ChartJS canvas due to we have to rebuild chart", - " Always set new value for isReloadChartContent when re-rendering component", - "*/", - "StatisticDashboardBean statisticDashboardBean = ManagedBeans.get(\"statisticDashboardBean\") as StatisticDashboardBean;", - "in.isReloadChartContent = statisticDashboardBean.isChartModelNotInitialized(in.statisticChartList) || !in.isFinishLoadCharts || !service.isSame(in.prevStatisticList, in.statisticChartList);", - "", - "if (in.isReloadChartContent && StringUtils.isEmpty(in.selectedItemOfDrilldown) && StringUtils.isEmpty(in.selectedCategoryOfDrilldown)) {", - " // In case, isReloadChartContent indicator is true and not drilldown to expiry chart, we need to generate a placeholder chart to show on UI", - " // It will make comfortable when user is waiting for drawing canvas", - " service.generatePlaceholderForChart(in.statisticChartList);", - " in.isFinishLoadCharts = false;", - "} else if (StringUtils.isNotEmpty(in.selectedItemOfDrilldown)) {", - " // Drilldown to expiry chart, no need to build placeholder chart because we don't call database", - " // Directly generate ChartJS canva, so we dont need to reload page", - " StatisticChart newChart = service.drilldownExpiryChart(in.selectedItemOfDrilldown,in.selectedStatisticChart,in.previousSelectedMonth, in.previousSelectedWeek);", - " service.drilldownExpiryChart(in.selectedItemOfDrilldown,in.selectedStatisticChart,in.previousSelectedMonth, in.previousSelectedWeek);", - " in.statisticChartList.clear();", - " in.statisticChartList.add(in.selectedStatisticChart);", - " in.statisticChartList.add(newChart);", - "", - " in.isFinishLoadCharts = true;", - " in.prevStatisticList = new ArrayList(in.statisticChartList);", - " in.isReloadChartContent = false;", - "} else if (StringUtils.isNotEmpty(in.selectedCategoryOfDrilldown)) {", - " StatisticChart newChart = service.drilldownCasesByCategory(in.selectedCategoryOfDrilldown, in.selectedStatisticChart);", - " in.statisticChartList.clear();", - " in.statisticChartList.add(in.selectedStatisticChart);", - " in.statisticChartList.add(newChart);", - " ", - " in.isFinishLoadCharts = true;", - " in.prevStatisticList = new ArrayList(in.statisticChartList);", - " in.isReloadChartContent = false;", - "}", - "", - "in.numberOfDefaultCharts = service.getNumberOfDefaultCharts();" - ] - } - }, - "visual" : { - "at" : { "x" : 992, "y" : 64 }, - "size" : { "width" : 208 } - }, - "connect" : [ - { "id" : "f61", "to" : "f66" } - ] - }, { - "id" : "f4", - "type" : "Script", - "name" : "Check user has charts", - "config" : { - "output" : { - "code" : [ - "import javax.faces.context.FacesContext;", - "import ch.ivy.addon.portalkit.bean.StatisticDashboardBean;", - "import ch.ivy.addon.portalkit.statistics.StatisticChart;", - "import java.util.ArrayList;", - "", - "if (in.statisticChartList.isEmpty()) {", - " FacesContext context = FacesContext.getCurrentInstance();", - " StatisticDashboardBean statisticDashboardBean = context.getApplication()", - " .evaluateExpressionGet(context, \"#{statisticDashboardBean}\", StatisticDashboardBean.class) as StatisticDashboardBean;", - " StatisticChart emptyChart = statisticDashboardBean.createDefaultEmptyChart();", - " in.statisticChartList = new ArrayList();", - " in.statisticChartList.add(emptyChart);", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 1280, "y" : 384 }, - "size" : { "width" : 144, "height" : 48 } - }, - "connect" : [ - { "id" : "f64", "to" : "f2", "via" : [ { "x" : 1480, "y" : 384 } ] } - ] - }, { - "id" : "f72", - "type" : "Script", - "name" : "Create a placeholder for carousel", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "import java.util.ArrayList;", - "", - "StatisticService service = StatisticService.getInstance();", - "", - "/* isReloadChartContent is a flag to reload the ChartJS canvas on UI ", - " If isFinishLoadCharts is true, we will reload the ChartJS canvas to draw new canva based on new data", - " If statisticChartList is changed, we need to reload ChartJS canvas due to we have to rebuild chart", - " Always set new value for isReloadChartContent when re-rendering component", - "*/", - "in.isReloadChartContent = !in.isFinishLoadCharts || !service.isSame(in.prevStatisticList, in.statisticChartList);", - "", - "if (in.isReloadChartContent) {", - " // In case, isReloadChartContent indicator is true and not drilldown to expiry chart, we need to generate a placeholder chart to show on UI", - " // It will make comfortable when user is waiting for drawing canvas", - " service.generatePlaceholderForChart(in.statisticChartList);", - " in.isFinishLoadCharts = false;", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 992, "y" : 136 }, - "size" : { "width" : 208, "height" : 48 } - }, - "connect" : [ - { "id" : "f81", "to" : "f66", "via" : [ { "x" : 1232, "y" : 136 } ] } - ] - }, { - "id" : "f83", - "type" : "HtmlDialogMethodStart", - "name" : "drilldownTaskByPriority(String,TaskQuery)", - "config" : { - "signature" : "drilldownTaskByPriority", - "input" : { - "params" : [ - { "name" : "taskListName", "type" : "String", "desc" : "" }, - { "name" : "taskQuery", "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", "desc" : "" } - ], - "map" : { - "out.taskListName" : "param.taskListName", - "out.taskQuery" : "param.taskQuery" - } - }, - "guid" : "172118B5A5BCDFA3" - }, - "visual" : { - "at" : { "x" : 128, "y" : 424 }, - "labelOffset" : { "x" : 58, "y" : 32 } - }, - "connect" : [ - { "id" : "f84", "to" : "f7" } - ] - }, { - "id" : "f6", - "type" : "HtmlDialogMethodStart", - "name" : "drilldownCaseByState(StatisticChart,CaseQuery)", - "config" : { - "signature" : "drilldownCaseByState", - "input" : { - "params" : [ - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "caseQuery", "type" : "ch.ivyteam.ivy.workflow.query.CaseQuery", "desc" : "" } - ], - "map" : { - "out.caseQuery" : "param.caseQuery", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "17211FB704E994CF" - }, - "visual" : { - "at" : { "x" : 128, "y" : 496 }, - "labelOffset" : { "x" : 77, "y" : 34 } - }, - "connect" : [ - { "id" : "f8", "to" : "f42" } - ] - }, { - "id" : "f9", - "type" : "HtmlDialogMethodStart", - "name" : "drilldownElapsedTime(StatisticChart,String)", - "config" : { - "signature" : "drilldownElapsedTime", - "input" : { - "params" : [ - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "selectedCaseCategory", "type" : "String", "desc" : "" } - ], - "map" : { - "out.selectedCaseCategory" : "param.selectedCaseCategory", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "172122396A7D2B17" - }, - "visual" : { - "at" : { "x" : 128, "y" : 576 }, - "labelOffset" : { "x" : 64, "y" : 38 } - }, - "connect" : [ - { "id" : "f10", "to" : "f48" } - ] - }, { - "id" : "f35", - "type" : "HtmlDialogMethodStart", - "name" : "onSelectDrilldownTaskByExpiry(Boolean,String,StatisticChart,TaskQuery)", - "config" : { - "signature" : "onSelectDrilldownTaskByExpiry", - "input" : { - "params" : [ - { "name" : "isDrilldownToTaskList", "type" : "Boolean", "desc" : "" }, - { "name" : "selectedItemOfDrilldown", "type" : "String", "desc" : "" }, - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "taskQuery", "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", "desc" : "" } - ], - "map" : { - "out.isDrilldownToTaskList" : "param.isDrilldownToTaskList", - "out.selectedItemOfDrilldown" : "param.selectedItemOfDrilldown", - "out.selectedStatisticChart" : "param.selectedStatisticChart", - "out.taskQuery" : "param.taskQuery" - } - }, - "guid" : "172124FE5841FB53" - }, - "visual" : { - "at" : { "x" : 128, "y" : 272 }, - "labelOffset" : { "x" : 144, "y" : 48 } - }, - "connect" : [ - { "id" : "f40", "to" : "f39" } - ] - }, { - "id" : "f41", - "type" : "HtmlDialogMethodStart", - "name" : "toTaskByExpiryTaskList(String,StatisticChart,TaskQuery)", - "config" : { - "signature" : "toTaskByExpiryTaskList", - "input" : { - "params" : [ - { "name" : "selectedItemOfDrilldown", "type" : "String", "desc" : "" }, - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "taskQuery", "type" : "ch.ivyteam.ivy.workflow.query.TaskQuery", "desc" : "" } - ], - "map" : { - "out.selectedItemOfDrilldown" : "param.selectedItemOfDrilldown", - "out.selectedStatisticChart" : "param.selectedStatisticChart", - "out.taskQuery" : "param.taskQuery" - } - }, - "guid" : "1721265AF851FB22" - }, - "visual" : { - "at" : { "x" : 128, "y" : 352 }, - "labelOffset" : { "x" : 95, "y" : 31 } - }, - "connect" : [ - { "id" : "f43", "to" : "f36", "via" : [ { "x" : 352, "y" : 352 } ] } - ] - }, { - "id" : "f44", - "type" : "HtmlDialogMethodStart", - "name" : "drilldownTaskByExpiry(StatisticChart,String)", - "config" : { - "signature" : "drilldownTaskByExpiry", - "input" : { - "params" : [ - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "selectedItemOfDrilldown", "type" : "String", "desc" : "" } - ], - "map" : { - "out.selectedItemOfDrilldown" : "param.selectedItemOfDrilldown", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "1721272BDEB5A469" - }, - "visual" : { - "at" : { "x" : 704, "y" : 544 }, - "labelOffset" : { "x" : 72, "y" : 40 } - }, - "connect" : [ - { "id" : "f45", "to" : "f53" } - ] - }, { - "id" : "f13", - "type" : "Script", - "name" : "Move left", - "config" : { - "output" : { - "code" : [ - "import java.util.Collections;", - "", - "int currentIndex = out.statisticChartList.indexOf(out.selectedStatisticChart);", - "if (currentIndex > 0) {", - " Collections.swap(out.statisticChartList, currentIndex, currentIndex - 1);", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 832, "y" : 672 } - }, - "connect" : [ - { "id" : "f21", "to" : "f19" } - ] - }, { - "id" : "f22", - "type" : "Script", - "name" : "Move right", - "config" : { - "output" : { - "code" : [ - "import java.util.Collections;", - "", - "int currentIndex = in.statisticChartList.indexOf(in.selectedStatisticChart);", - "if (currentIndex < in.statisticChartList.size()) {", - " Collections.swap(in.statisticChartList, currentIndex, currentIndex + 1);", - "}" - ] - } - }, - "visual" : { - "at" : { "x" : 832, "y" : 768 } - }, - "connect" : [ - { "id" : "f24", "to" : "f19", "via" : [ { "x" : 992, "y" : 768 } ] } - ] - }, { - "id" : "f59", - "type" : "Alternative", - "config" : { - "conditions" : { - "f68" : "in.isFinishLoadCharts" - } - }, - "visual" : { - "at" : { "x" : 808, "y" : 288 } - }, - "connect" : [ - { "id" : "f68", "to" : "f3", "via" : [ { "x" : 808, "y" : 232 }, { "x" : 1080, "y" : 232 } ] }, - { "id" : "f67", "to" : "S10" } - ] - }, { - "id" : "f58", - "type" : "HtmlDialogMethodStart", - "name" : "regenerateChartModel", - "config" : { - "signature" : "regenerateChartModel", - "input" : { - "params" : [ - { "name" : "statisticChartList", "type" : "java.util.List", "desc" : "" } - ], - "map" : { - "out.statisticChartList" : "param.statisticChartList" - } - }, - "guid" : "18142119F2A1776C" - }, - "visual" : { - "at" : { "x" : 88, "y" : 872 }, - "labelOffset" : { "x" : 44, "y" : 35 } - }, - "connect" : [ - { "id" : "f74", "to" : "f71" } - ] - }, { - "id" : "f71", - "type" : "Script", - "name" : "Generate chart", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - "service.generateChartModelForStatisticCharts(in.statisticChartList);" - ] - } - }, - "visual" : { - "at" : { "x" : 312, "y" : 872 } - }, - "connect" : [ - { "id" : "f75", "to" : "f73" } - ] - }, { - "id" : "f73", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 464, "y" : 872 } - } - }, { - "id" : "f76", - "type" : "HtmlDialogMethodStart", - "name" : "drilldownCasesByCategory(StatisticChart,String)", - "config" : { - "signature" : "drilldownCasesByCategory", - "input" : { - "params" : [ - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "selectedCategoryOfDrilldown", "type" : "String", "desc" : "" } - ], - "map" : { - "out.selectedCategoryOfDrilldown" : "param.selectedCategoryOfDrilldown", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "181FB91910DEB007" - }, - "visual" : { - "at" : { "x" : 704, "y" : 864 }, - "labelOffset" : { "x" : 85, "y" : 40 } - }, - "connect" : [ - { "id" : "f85", "to" : "f78" } - ] - }, { - "id" : "f78", - "type" : "Script", - "name" : "Set data", - "config" : { - "output" : { - "code" : [ - "in.isFinishLoadCharts = false;", - "in.selectedItemOfDrilldown = null; // clear value drilldown expiry chart" - ] - } - }, - "visual" : { - "at" : { "x" : 888, "y" : 864 } - }, - "connect" : [ - { "id" : "f86", "to" : "f82" } - ] - }, { - "id" : "f82", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 1120, "y" : 864 } - } - }, { - "id" : "f87", - "type" : "HtmlDialogMethodStart", - "name" : "goToCasesByCategoryList(StatisticChart,CaseQuery)", - "config" : { - "signature" : "goToCasesByCategoryList", - "input" : { - "params" : [ - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "caseQuery", "type" : "ch.ivyteam.ivy.workflow.query.CaseQuery", "desc" : "" } - ], - "map" : { - "out.caseQuery" : "param.caseQuery", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "181FBEB9A544AC80" - }, - "visual" : { - "at" : { "x" : 704, "y" : 952 }, - "labelOffset" : { "x" : 90, "y" : 34 } - }, - "connect" : [ - { "id" : "f89", "to" : "f94" } - ] - }, { - "id" : "f88", - "type" : "SubProcessCall", - "name" : "Navigator", - "config" : { - "processCall" : "Functional Processes/Navigator:viewCaseForAnalytic(String,ch.ivyteam.ivy.workflow.query.CaseQuery)", - "call" : { - "map" : { - "param.chartName" : "in.chartNameOfCurrentLanguage", - "param.caseQuery" : "in.caseQuery" - } - } - }, - "visual" : { - "at" : { "x" : 1128, "y" : 952 } - } - }, { - "id" : "f90", - "type" : "Alternative", - "config" : { - "conditions" : { - "f93" : "in.isDrilldownToCaseList" - } - }, - "visual" : { - "at" : { "x" : 968, "y" : 1072 } - }, - "connect" : [ - { "id" : "f93", "to" : "f94" }, - { "id" : "f95", "to" : "f92" } - ] - }, { - "id" : "f91", - "type" : "HtmlDialogMethodStart", - "name" : "onSelectDrilldownCasesByCategory(Boolean,StatisticChart,CaseQuery)", - "config" : { - "signature" : "onSelectDrilldownCasesByCategory", - "input" : { - "params" : [ - { "name" : "isDrilldownToCaseList", "type" : "Boolean", "desc" : "" }, - { "name" : "selectedStatisticChart", "type" : "ch.ivy.addon.portalkit.statistics.StatisticChart", "desc" : "" }, - { "name" : "caseQuery", "type" : "ch.ivyteam.ivy.workflow.query.CaseQuery", "desc" : "" } - ], - "map" : { - "out.caseQuery" : "param.caseQuery", - "out.isDrilldownToCaseList" : "param.isDrilldownToCaseList", - "out.selectedStatisticChart" : "param.selectedStatisticChart" - } - }, - "guid" : "182010C71CA41ADF" - }, - "visual" : { - "at" : { "x" : 704, "y" : 1072 }, - "labelOffset" : { "x" : 142, "y" : 48 } - }, - "connect" : [ - { "id" : "f97", "to" : "f90" } - ] - }, { - "id" : "f92", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 1176, "y" : 1072 } - } - }, { - "id" : "f94", - "type" : "Script", - "name" : "Get chart name", - "config" : { - "output" : { - "code" : [ - "import ch.ivy.addon.portalkit.service.StatisticService;", - "", - "StatisticService service = StatisticService.getInstance();", - "in.chartNameOfCurrentLanguage = service.getDisplayNameInUserLanguageForChart(in.selectedStatisticChart).getValue();" - ] - } - }, - "visual" : { - "at" : { "x" : 968, "y" : 952 } - }, - "connect" : [ - { "id" : "f96", "to" : "f88" } - ] - }, { - "id" : "f98", - "type" : "Script", - "name" : "clear selected item drill down", - "config" : { - "output" : { - "code" : "in.selectedItemOfDrilldown = null;" - } - }, - "visual" : { - "at" : { "x" : 408, "y" : 208 }, - "size" : { "width" : 176 } - }, - "connect" : [ - { "id" : "f47", "to" : "f46" } - ] - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFilters.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFilters.xhtml deleted file mode 100644 index c598dd92ac0..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFilters.xhtml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - -
-
- - -
- - - - - - - - - - #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/affectedCharts")}: #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByPriority')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByState')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByExpiry')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/elapsedTimeByCaseCategory')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTask')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTime')}
- #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/common/description")}: #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/timePeriodFilterDescription")} -
-
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/affectedCharts")}: #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByPriority')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByState')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByExpiry')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTask')}
- #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/common/description")}: #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/roleFilterDescription")} -
-
- - - - - - - - - - -
- - - - - - - - - #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/affectedCharts")}: #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByPriority')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByState')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByExpiry')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/elapsedTimeByCaseCategory')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTask')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTime')}
- #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/common/description")}: #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/caseCategoryFilterDescription")} -
-
- - - - - - -
- - - - - - - - - #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/affectedCharts")}: #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByPriority')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByState')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByExpiry')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/elapsedTimeByCaseCategory')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTask')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTime')}
- #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/common/description")}: #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/caseStateFilterDescription")} -
-
- - - - - - - - - - -
- - - - - - - - - #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/affectedCharts")}: #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByPriority')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByExpiry')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTask')}
- #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/common/description")}: #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/taskPriorityFilterDescription")} -
-
- - - - - - - - - - -
- - - - - - - - - - - #{ivy.cms.co("/ch.ivy.addon.portalkit.ui.jsf/statistic/filter/affectedCharts")}: #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByPriority')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByState')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/taskByExpiry')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/elapsedTimeByCaseCategory')}, - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTask')}, #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/statistic/chartType/caseByFinishedTime')} - - - - - - -
-
- -
- \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFiltersData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFiltersData.d.json deleted file mode 100644 index c8aedc1e7df..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFiltersData.d.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", - "simpleName" : "StatisticFiltersData", - "namespace" : "ch.ivy.addon.portalkit.component.statistic.StatisticFilters", - "isBusinessCaseData" : false -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFiltersProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFiltersProcess.p.json deleted file mode 100644 index bdb5b3487d6..00000000000 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/statistic/StatisticFilters/StatisticFiltersProcess.p.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", - "id" : "15FFC75C94B7465F", - "kind" : "HTML_DIALOG", - "config" : { - "data" : "ch.ivy.addon.portalkit.component.statistic.StatisticFilters.StatisticFiltersData" - }, - "elements" : [ { - "id" : "f0", - "type" : "HtmlDialogStart", - "name" : "start()", - "config" : { - "signature" : "start", - "guid" : "15FFC75C96565ED7" - }, - "visual" : { - "at" : { "x" : 96, "y" : 64 } - }, - "connect" : [ - { "id" : "f2", "to" : "f1" } - ] - }, { - "id" : "f1", - "type" : "HtmlDialogEnd", - "visual" : { - "at" : { "x" : 224, "y" : 64 } - } - }, { - "id" : "f3", - "type" : "HtmlDialogEventStart", - "name" : "close", - "config" : { - "guid" : "15FFC75C97151669" - }, - "visual" : { - "at" : { "x" : 96, "y" : 160 }, - "labelOffset" : { "x" : 8, "y" : 32 } - }, - "connect" : [ - { "id" : "f5", "to" : "f4" } - ] - }, { - "id" : "f4", - "type" : "HtmlDialogExit", - "visual" : { - "at" : { "x" : 224, "y" : 160 } - } - } ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/ClientStatisticWidget/ClientStatisticWidget.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/ClientStatisticWidget/ClientStatisticWidget.xhtml index 8b9fa35b6bb..1fda363f276 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/ClientStatisticWidget/ClientStatisticWidget.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/ClientStatisticWidget/ClientStatisticWidget.xhtml @@ -12,7 +12,6 @@ - diff --git a/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml b/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml index 2c9093ef2fa..9ef1cbad408 100644 --- a/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml @@ -46,7 +46,7 @@ - diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml index 8dc9f6adce0..b84e551c5d0 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml @@ -99,15 +99,6 @@ isInConfiguration="#{isInConfiguration}" />
- - - - -