Skip to content

Commit

Permalink
IVYPORTAL-17408 DB query for filter in task/case widget is executed 3… (
Browse files Browse the repository at this point in the history
#1010)

* IVYPORTAL-17408 DB query for filter in task/case widget is executed 3 times: fix bug

* IVYPORTAL-17408 DB query for filter in task/case widget is executed 3 times: update jenkinfile

* IVYPORTAL-17408 DB query for filter in task/case widget is executed 3 times: revert jenkinfile

---------

Co-authored-by: lndanh-axonivy <[email protected]>
  • Loading branch information
lndanh-axonivy and lndanh-axonivy authored Sep 19, 2024
1 parent 882d2d5 commit 22af8ac
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ui:param name="onStatisticTabShow" value="handleFilterCategoryHeight(this);" />
<ui:param name="componentToProcessOnApplyFilter" value="filter-container" />
<ui:param name="componentToUpdateOnApplyFilter"
value="#{component.parent.namingContainer.clientId}:case-component:dashboard-cases #{component.parent.namingContainer.clientId}:case-component:empty-message-container" />
value="#{cc.clientId}:case-component:dashboard-cases #{cc.clientId}:case-component:empty-message-container" />
<ui:param name="componentToUpdateOnResetFilter"
value="#{cc.clientId}:case-component:dashboard-cases #{cc.clientId}:case-component:empty-message-container" />
<ui:param name="onCompleteApplyFilters" value="PF('dashboard-cases-#{widget.id}').filter()" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ui:param name="isReadOnlyMode" value="#{cc.attrs.isReadOnlyMode}" />
<ui:param name="widgetContentStyleClass" value="process-widget" />
<ui:param name="componentToProcessOnApplyFilter" value="filter-container" />
<ui:param name="componentToUpdateOnApplyFilter" value="#{component.parent.namingContainer.clientId}:widget-content" />
<ui:param name="componentToUpdateOnApplyFilter" value="#{cc.clientId}:widget-content" />
<ui:param name="componentToUpdateOnResetFilter" value="#{cc.clientId}:widget-content" />
<ui:param name="isRenderExpandCollapse" value="#{widget.isShowFullscreenMode()}" />
<ui:param name="isRenderInfo" value="#{widget.isShowWidgetInfo()}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ui:param name="isReadOnlyMode" value="#{isReadOnlyMode}" />
<ui:param name="onStatisticTabShow" value="handleFilterCategoryHeight(this);" />
<ui:param name="componentToProcessOnApplyFilter" value="filter-container" />
<ui:param name="componentToUpdateOnApplyFilter" value="#{component.parent.namingContainer.clientId}:task-component:dashboard-tasks #{component.parent.namingContainer.clientId}:task-component:empty-message-container" />
<ui:param name="componentToUpdateOnApplyFilter" value="#{cc.clientId}:task-component:dashboard-tasks #{cc.clientId}:task-component:empty-message-container" />
<ui:param name="componentToUpdateOnResetFilter" value="#{cc.clientId}:task-component:dashboard-tasks #{cc.clientId}:task-component:empty-message-container" />
<ui:param name="onCompleteApplyFilters" value="PF('dashboard-tasks-#{widget.id}').filter()" />
<ui:param name="isRenderExpandCollapse" value="#{widget.isShowFullscreenMode()}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@
<!-- remote-command to apply widget filter -->
<p:remoteCommand id="apply-widget-filter-command-#{index}"
name="applyWidgetFilterCommand#{index}"
oncomplete="PF('filter-overlay-panel-#{index}').hide(); #{onCompleteApplyFilters}; resizeTableBody()"
update="widget-header-actions #{componentToUpdateOnApplyFilter}"
update="#{componentToUpdateOnApplyFilter} #{cc.clientId}:widget-header-actions"
oncomplete="PF('filter-overlay-panel-#{index}').hide();"
global="false" process="@this" partialSubmit="true" immediate="true"
rendered="#{renderFilter}"/>

<p:remoteCommand id="apply-widget-filter-command2-#{index}"
name="applyInvalidWidgetFilterCommand#{index}"
global="false" process="@this" partialSubmit="true" immediate="true"
rendered="#{renderFilter}"/>

Expand Down Expand Up @@ -232,16 +237,21 @@
<p:commandButton id="reset-button" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/reset')}"
styleClass="secondary-btn u-mar-right-5" partialSubmit="true"
process="filter-form-#{index}"
update="filter-form-#{index} #{componentToUpdateOnResetFilter}"
oncomplete="#{onCompleteResetFilters}; {applyWidgetFilterCommand#{index}();} initWidgetFilterHtml('#{widget.id}');"
update="#{componentToUpdateOnResetFilter} #{cc.clientId}:widget-header-actions"
oncomplete="PF('filter-overlay-panel-#{index}').hide(); initWidgetFilterHtml('#{widget.id}');"
actionListener="#{widget.onResetUserFilters()}"
icon="si si-button-refresh-arrows" resetValues="true"/>

<p:commandButton id="apply-button" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/apply')}"
partialSubmit="true"
update="filter-form-#{index}"
process="filter-form-#{index}"
oncomplete="if (args &amp;&amp; !args.validationFailed) {applyWidgetFilterCommand#{index}();} initWidgetFilterHtml('#{widget.id}');"
oncomplete="if (args &amp;&amp; !args.validationFailed) {
applyWidgetFilterCommand#{index}();
} else {
applyInvalidWidgetFilterCommand#{index}();
}
initWidgetFilterHtml('#{widget.id}');"
actionListener="#{widget.onApplyUserFilters()}"
icon="si si-check-1"
styleClass="u-mar-right-5" />
Expand Down

0 comments on commit 22af8ac

Please sign in to comment.