Skip to content

Commit

Permalink
fix for showing of triggers in Approval case(MID-6880)
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Mar 10, 2021
1 parent a3abf19 commit bf2d763
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -31,6 +31,7 @@ <h3 class="box-title"><wicket:message key="ItemApprovalPanel.wholeProcess"/></h3
</div>
<div class="box-body">
<div wicket:id="wholeProcess" />
<div wicket:id="triggers" style="margin-right:5px;margin-left: 5px;"/>
</div>
</div>
<div style="padding-bottom:15px"> <!-- TODO use some css here -->
Expand Down
Expand Up @@ -10,11 +10,14 @@
import java.util.Collections;
import java.util.Optional;

import org.apache.commons.collections.CollectionUtils;
import com.evolveum.midpoint.web.page.admin.workflow.EvaluatedTriggerGroupPanel;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.PropertyModel;
import org.jetbrains.annotations.Nullable;

import com.evolveum.midpoint.gui.api.component.BasePanel;
Expand Down Expand Up @@ -49,6 +52,7 @@ public class SwitchableApprovalProcessPreviewsPanel extends BasePanel<String> {
private static final String ID_SHOW_WHOLE_PROCESS_CONTAINER = "showWholeProcessContainer";
private static final String ID_SHOW_WHOLE_PROCESS = "showWholeProcess";
private static final String ID_SHOW_WHOLE_PROCESS_HELP = "showWholeProcessHelp";
private static final String ID_TRIGGERS = "triggers";

private LoadableModel<ApprovalSchemaExecutionInformationType> approvalExecutionInfoModel;
private LoadableModel<ApprovalProcessExecutionInformationDto> nextStagesModel;
Expand Down Expand Up @@ -137,6 +141,7 @@ private void initLayout(IModel<Boolean> showNextStagesModel) {

WebMarkupContainer wholeProcessContainer = new WebMarkupContainer(ID_WHOLE_PROCESS_CONTAINER);
wholeProcessContainer.add(new ApprovalProcessExecutionInformationPanel(ID_WHOLE_PROCESS, wholeProcessModel));
wholeProcessContainer.add(new EvaluatedTriggerGroupPanel(ID_TRIGGERS, new PropertyModel<>(wholeProcessModel, ApprovalProcessExecutionInformationDto.F_TRIGGERS)));
wholeProcessContainer.add(WebComponentUtil.createHelp(ID_WHOLE_PROCESS_HELP));
wholeProcessContainer.add(new VisibleBehaviour(() -> displayedProcessInfoBox == ProcessInfoBox.WHOLE_PROCESS));
add(wholeProcessContainer);
Expand Down

0 comments on commit bf2d763

Please sign in to comment.