Skip to content

Commit

Permalink
fix: do not render elements inside when no survey assigned
Browse files Browse the repository at this point in the history
Signed-off-by: Oleh Astappiev <[email protected]>
  • Loading branch information
astappiev committed Feb 22, 2024
1 parent 409ac84 commit 2990f7e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/webapp/lw/admin/chat-feedback.xhtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<ui:composition template="/WEB-INF/templates/layout/template.xhtml"
xmlns:c="jakarta.tags.core"
xmlns:ui="jakarta.faces.facelets"
xmlns:h="jakarta.faces.html"
xmlns:f="jakarta.faces.core"
Expand All @@ -20,11 +21,11 @@
<p:commandButton action="#{adminChatFeedbackBean.createPromptSurvey}" value="#{msg.create}" update="@parent"
rendered="#{empty adminChatFeedbackBean.promptSurvey}"/>

<ui:fragment rendered="#{not empty adminChatFeedbackBean.promptSurvey}">
<c:if test="#{not empty adminChatFeedbackBean.responseSurvey}">
<ui:decorate template="/WEB-INF/templates/blocks/survey/snippet_page_edit.xhtml">
<ui:param name="page" value="#{adminChatFeedbackBean.promptSurvey}"/>
</ui:decorate>
</ui:fragment>
</c:if>
</p:panel>
</div>

Expand All @@ -33,11 +34,11 @@
<p:commandButton action="#{adminChatFeedbackBean.createResponseSurvey}" value="#{msg.create}" update="@parent"
rendered="#{empty adminChatFeedbackBean.responseSurvey}"/>

<ui:fragment rendered="#{not empty adminChatFeedbackBean.responseSurvey}">
<c:if test="#{not empty adminChatFeedbackBean.responseSurvey}">
<ui:decorate template="/WEB-INF/templates/blocks/survey/snippet_page_edit.xhtml">
<ui:param name="page" value="#{adminChatFeedbackBean.responseSurvey}"/>
</ui:decorate>
</ui:fragment>
</c:if>
</p:panel>
</div>
</div>
Expand Down

0 comments on commit 2990f7e

Please sign in to comment.