Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock for certification flow #1795

Merged
merged 4 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions backend/audit/templates/audit/cross-validation-results.html

This file was deleted.

20 changes: 0 additions & 20 deletions backend/audit/templates/audit/cross-validation.html

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% extends "base.html" %}
{% load static %}
{% block content %}
<div class="grid-container margin-y-6">
<div class="grid-row grid-gap">
<form class="tablet:grid-col-8" id="cross-validation" method="post">
{% csrf_token %}
<fieldset class="usa-fieldset">
<legend class="usa-legend usa-legend--large" id="federal-awards">Pre-submission validation</legend>
<p>
Check your workbooks to confirm you entered your data correctly. This tool also cross-validates the workbooks against each other.
</p>
<p>If there are errors, you may re-upload the affected workbooks.</p>
{% if errors.errors %}
<table id="federal-awards-table margin-y-3"
class="usa-table usa-table--striped overflow-scroll">
<thead>
<tr>
<th scope="col">Errors</th>
</tr>
</thead>
<tbody>
<tr>
{% for error in errors.errors %}<td>{{ error.error }}</td>{% endfor %}
</tr>
</tbody>
</table>
{% else %}
<h3>No errors were found.</h3>
{% endif %}
<div class="margin-top-6">
<button class="usa-button margin-right-105" id="begin-validation">Begin Validation</button>
<a href="{% url 'audit:ReadyForCertification' report_id %}">
<button class="usa-button margin-right-105"
type="button"
id="proceed-to-certification"
{% if errors.errors %}disabled{% endif %}>Proceed to certification</button>
</a>
<a href="{% url 'audit:SubmissionProgress' report_id %}">Return to checklist</a>
</div>
</fieldset>
</form>
</div>
</div>
{% endblock content %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% load static %}
{% block content %}
<div class="grid-container margin-top-6 margin-bottom-6">
<div class="grid-row grid-gap">
<form class="tablet:grid-col-8" id="cross-validation" method="post">
{% csrf_token %}
<fieldset class="usa-fieldset">
<legend class="usa-legend usa-legend--large" id="federal-awards">Pre-submission validation</legend>
<p class="margin-y-3">
Check your workbooks to confirm you entered your data correctly. This tool also cross-validates the workbooks against each other.
</p>
<p>If there are errors, you may re-upload the affected workbooks.</p>
<div class="margin-top-6">
<button class="usa-button" id="begin-validation">Begin Validation</button>
<button class="usa-button" id="proceed-to-certification" disabled>Proceed to certification</button>
<a href="{% url 'audit:SubmissionProgress' report_id %}">Return to checklist</a>
</div>
</fieldset>
</form>
</div>
</div>
{% endblock content %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% extends "base.html" %}
{% load static %}
{% block content %}
<div class="grid-container margin-top-6 margin-bottom-6">
<div class="grid-row grid-gap">
<form class="tablet:grid-col-8" id="ready-for-certification" method="post">
{% csrf_token %}
<fieldset class="usa-fieldset">
<legend class="usa-legend usa-legend--large" id="federal-awards">Lock for certification</legend>
<p>The audit validates and is ready for certification.</p>
<p>
In order to certify, your submission must be locked. No further changes will be possible. Click to lock this audit for certification by the designated certifying officials.
</p>
<button class="usa-button margin-top-10" id="continue">Lock for Certification</button>
<a href="{% url 'audit:CrossValidation' report_id %}">Back</a>
</fieldset>
</form>
</div>
</div>
{% endblock content %}
21 changes: 0 additions & 21 deletions backend/audit/templates/audit/ready-for-certification.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
<div>
<p class="text-bold margin-0">
<a class="usa-link"
href="{% url 'audit:ReadyForCertification' report_id %}">Pre-submission validation</a>
href="{% url 'audit:CrossValidation' report_id %}">Pre-submission validation</a>
</p>
<p class="margin-0">Before submitting your audit, use our validation tool to check your workbooks for errors.</p>
</div>
Expand Down
16 changes: 12 additions & 4 deletions backend/audit/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ def get(self, request, *args, **kwargs):
"report_id": report_id,
"submission_status": sac.submission_status,
}
return render(request, "audit/cross-validation.html", context)
return render(
request, "audit/cross-validation/cross-validation.html", context
)
except SingleAuditChecklist.DoesNotExist:
raise PermissionDenied("You do not have access to this audit.")

Expand All @@ -287,7 +289,9 @@ def post(self, request, *args, **kwargs):

context = {"report_id": report_id, "errors": errors}

return render(request, "audit/cross-validation-results.html", context)
return render(
request, "audit/cross-validation/cross-validation-results.html", context
)

except SingleAuditChecklist.DoesNotExist:
raise PermissionDenied("You do not have access to this audit.")
Expand All @@ -304,7 +308,9 @@ def get(self, request, *args, **kwargs):
"report_id": report_id,
"submission_status": sac.submission_status,
}
return render(request, "audit/ready-for-certification.html", context)
return render(
request, "audit/cross-validation/ready-for-certification.html", context
)
except SingleAuditChecklist.DoesNotExist:
raise PermissionDenied("You do not have access to this audit.")

Expand All @@ -321,7 +327,9 @@ def post(self, request, *args, **kwargs):
return redirect(reverse("audit:SubmissionProgress", args=[report_id]))

context = {"report_id": report_id, "errors": errors}
return render(request, "audit/cross-validation-results.html", context)
return render(
request, "audit/cross-validation/cross-validation-results.html", context
)

except SingleAuditChecklist.DoesNotExist:
raise PermissionDenied("You do not have access to this audit.")
Expand Down