Skip to content

Commit

Permalink
Refactor render logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMwashuma committed Nov 12, 2024
1 parent 07e06cb commit c5e0313
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions tally_ho/apps/tally/templates/audit/review.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ <h1>{% trans 'Quarantined Form' %}</h1>
{% include 'quality_control/reconciliation.html' with form=reconciliation_form %}
{% endif %}

{% if results %}
{% include 'quality_control/results.html' with results=results header_text=header_text %}
{% endif %}
{% endfor %}
{% endif %}

Expand Down Expand Up @@ -54,25 +56,37 @@ <h3>{% trans "Action Prior to Recommendation" %}</h3>
<p><button class="btn btn-danger" type="submit" name="return">{% trans "Return to Audit Team" %}</button></p>
{% endif %}
</div>
{% if not is_clerk %}
{% if form.action_prior_to_recommendation.value|get_audit_action_name != '----' or form.action_prior_to_recommendation.value|get_audit_action_name != '----' %}
<div class="col-md-2 col-sm-1 grid2 righter">
<h3>{% trans "Action Prior to Recommendation" %}</h3>
{% if form.action_prior_to_recommendation.value|get_audit_action_name != '----' %}
<p><label for="id_action_prior_to_recommendation">{% trans "Action prior to recommendation:" %}</label>
{{ form.action_prior_to_recommendation.value|get_audit_action_name }}
</p>
{% endif %}
{% if form.action_prior_to_recommendation.value|get_audit_action_name != '----' %}
<p><label for="id_resolution_recommendation">{% trans "Resolution recommendation:" %}</label>
{{ form.resolution_recommendation.value|get_audit_resolution_name }}
</p>
{% endif %}
</div>
{% endif %}
<div class="col-md-2 col-sm-1 grid2 righter">
{% if is_clerk %}
{% if form.team_comment.value %}
<p><label for="id_team_comment">{% trans "Team comment:" %}</label>
{{ form.team_comment }}
{{ form.team_comment.value }}
</p>
{% else %}
{% endif %}
{% if not is_clerk %}
{% if form.supervisor_comment.value %}
<p><label for="id_supervisor_comment">{% trans "Supervisor comment:" %}</label>
{{ form.supervisor_comment.value }}
</p>
{% endif %}
{% endif %}
{% if is_clerk %}
<p><label for="id_team_comment">{% trans "Team comment:" %}</label>
{{ form.team_comment.value }}
{{ form.team_comment }}
</p>
{% endif %}
{% if not is_clerk %}
Expand Down

0 comments on commit c5e0313

Please sign in to comment.