Skip to content

Commit c6135b5

Browse files
committed
Add send to clearance option
1 parent 7a32d2c commit c6135b5

File tree

3 files changed

+27
-21
lines changed

3 files changed

+27
-21
lines changed

tally_ho/apps/tally/templates/audit/review.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,26 @@ <h3>{% trans "Problem" %}</h3>
8383
<p>{{ form.blank_reconciliation }}<label for="id_blank_reconciliation">{% trans "Blank reconciliation:" %}</label></p>
8484
<p>{{ form.blank_results }}<label for="id_blank_results">{% trans "Blank results:" %}</label> </p>
8585
<p>{{ form.unclear_figures }}<label for="id_unclear_figures">{% trans "Unclear figures:" %}</label> </p>
86-
<p>{{ form.damaged_form }}<label for="id_damaged_form">{% trans "Damaged form:" %}</label> </p>
87-
<p class="large"><label class="wrap_label" for="id_other">
88-
{% trans "Other:" %}</label>{{ form.other }}</p>
89-
<p>
90-
<button class="btn btn-primary" type="submit" name="save">{% trans "Save" %}</button>
91-
<a class="btn btn-danger" role="button" href="{% url 'audit_dashboard' tally_id=tally_id %}">{% trans "Cancel" %}</a>
92-
</p>
93-
<h3>{% trans "Action Prior to Recommendation" %}</h3>
94-
<p><label for="id_action_prior_to_recommendation">{% trans "Action prior to recommendation:" %}</label>
95-
{{ form.action_prior_to_recommendation }}
96-
</p>
97-
<p><label for="id_resolution_recommendation">{% trans "Resolution recommendation:" %}</label>
98-
{{ form.resolution_recommendation }}
99-
</p>
100-
{% if is_clerk %}
101-
<p><button class="btn btn-success" type="submit" name="forward">{% trans "Forward to Supervisor and Print Cover" %}</button></p>
102-
{% else %}
103-
<p><button class="btn btn-success" type="submit" name="implement">{% trans "Mark Form as Resolved" %}</button></p>
104-
<p><button class="btn btn-danger" type="submit" name="return">{% trans "Return to Audit Team" %}</button></p>
105-
{% endif %}
86+
<p>{{ form.damaged_form }}<label for="id_damaged_form">{% trans "Damaged form:" %}</label> </p>
87+
<p class="large"><label class="wrap_label" for="id_other">
88+
{% trans "Other:" %}</label>{{ form.other }}</p>
89+
<p>
90+
<button class="btn btn-primary" type="submit" name="save">{% trans "Save" %}</button>
91+
<a class="btn btn-danger" role="button" href="{% url 'audit_dashboard' tally_id=tally_id %}">{% trans "Cancel" %}</a>
92+
</p>
93+
<h3>{% trans "Action Prior to Recommendation" %}</h3>
94+
<p><label for="id_action_prior_to_recommendation">{% trans "Action prior to recommendation:" %}</label>
95+
{{ form.action_prior_to_recommendation }}
96+
</p>
97+
<p><label for="id_resolution_recommendation">{% trans "Resolution recommendation:" %}</label>
98+
{{ form.resolution_recommendation }}
99+
</p>
100+
{% if is_clerk %}
101+
<p><button class="btn btn-success" type="submit" name="forward">{% trans "Forward to Supervisor and Print Cover" %}</button></p>
102+
{% else %}
103+
<p><button class="btn btn-success" type="submit" name="implement">{% trans "Mark Form as Resolved" %}</button></p>
104+
<p><button class="btn btn-danger" type="submit" name="return">{% trans "Return to Audit Team" %}</button></p>
105+
{% endif %}
106106
</div>
107107
<div class="col-md-2 col-sm-1 grid2 righter">
108108
{% if is_clerk %}

tally_ho/apps/tally/views/audit.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ def audit_action(audit, post_data, result_form, url):
9292
if audit.resolution_recommendation ==\
9393
AuditResolution.MAKE_AVAILABLE_FOR_ARCHIVE:
9494
audit.for_superadmin = True
95+
elif audit.resolution_recommendation ==\
96+
AuditResolution.SEND_TO_CLEARANCE:
97+
audit.active = False
98+
result_form.reject(new_state=FormState.CLEARANCE)
9599
elif audit.action_prior_to_recommendation in\
96100
[ActionsPrior.REQUEST_AUDIT_ACTION_FROM_FIELD,
97101
ActionsPrior.REQUEST_COPY_FROM_FIELD]:

tally_ho/libs/models/enums/audit_resolution.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class AuditResolution(Enum):
99
CLARIFIED_FIGURES_TO_DE_1 = 2
1010
OTHER_CORRECTION_TO_DE_1 = 3
1111
MAKE_AVAILABLE_FOR_ARCHIVE = 4
12+
SEND_TO_CLEARANCE = 5
1213

1314
CHOICES = [
1415
(EMPTY, '----'),
@@ -18,5 +19,6 @@ class AuditResolution(Enum):
1819
(OTHER_CORRECTION_TO_DE_1,
1920
_(u"Other Correction To Data Entry 1")),
2021
(MAKE_AVAILABLE_FOR_ARCHIVE,
21-
_(u"Make Available For Archive"))
22+
_(u"Make Available For Archive")),
23+
(SEND_TO_CLEARANCE, _(u"Send to Clearance"))
2224
]

0 commit comments

Comments
 (0)