-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add barebones feature allowing users to send submissions back to in p…
…rogress from ready for certification.
- Loading branch information
1 parent
92dec12
commit 48aa466
Showing
12 changed files
with
408 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from .submission_event import ( # noqa | ||
SubmissionEvent, | ||
) | ||
|
||
# In case we want to iterate through all the models for some reason: | ||
models = [ | ||
SubmissionEvent, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import logging | ||
from django.contrib.auth import get_user_model | ||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
User = get_user_model() | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class SubmissionEvent(models.Model): | ||
class EventType: | ||
ACCESS_GRANTED = "access-granted" | ||
ADDITIONAL_EINS_UPDATED = "additional-eins-updated" | ||
ADDITIONAL_UEIS_UPDATED = "additional-ueis-updated" | ||
AUDIT_INFORMATION_UPDATED = "audit-information-updated" | ||
AUDIT_REPORT_PDF_UPDATED = "audit-report-pdf-updated" | ||
AUDITEE_CERTIFICATION_COMPLETED = "auditee-certification-completed" | ||
AUDITOR_CERTIFICATION_COMPLETED = "auditor-certification-completed" | ||
CORRECTIVE_ACTION_PLAN_UPDATED = "corrective-action-plan-updated" | ||
CREATED = "created" | ||
FEDERAL_AWARDS_UPDATED = "federal-awards-updated" | ||
FEDERAL_AWARDS_AUDIT_FINDINGS_UPDATED = "federal-awards-audit-findings-updated" | ||
FEDERAL_AWARDS_AUDIT_FINDINGS_TEXT_UPDATED = ( | ||
"federal-awards-audit-findings-text-updated" | ||
) | ||
FINDINGS_UNIFORM_GUIDANCE_UPDATED = "findings-uniform-guidance-updated" | ||
GENERAL_INFORMATION_UPDATED = "general-information-updated" | ||
LOCKED_FOR_CERTIFICATION = "locked-for-certification" | ||
UNLOCKED_AFTER_CERTIFICATION = "unlocked-after-certification" | ||
NOTES_TO_SEFA_UPDATED = "notes-to-sefa-updated" | ||
SECONDARY_AUDITORS_UPDATED = "secondary-auditors-updated" | ||
SUBMITTED = "submitted" | ||
DISSEMINATED = "disseminated" | ||
TRIBAL_CONSENT_UPDATED = "tribal-consent-updated" | ||
|
||
EVENT_TYPES = ( | ||
(EventType.ACCESS_GRANTED, _("Access granted")), | ||
(EventType.ADDITIONAL_EINS_UPDATED, _("Additional EINs updated")), | ||
(EventType.ADDITIONAL_UEIS_UPDATED, _("Additional UEIs updated")), | ||
(EventType.AUDIT_INFORMATION_UPDATED, _("Audit information updated")), | ||
(EventType.AUDIT_REPORT_PDF_UPDATED, _("Audit report PDF updated")), | ||
( | ||
EventType.AUDITEE_CERTIFICATION_COMPLETED, | ||
_("Auditee certification completed"), | ||
), | ||
( | ||
EventType.AUDITOR_CERTIFICATION_COMPLETED, | ||
_("Auditor certification completed"), | ||
), | ||
(EventType.CORRECTIVE_ACTION_PLAN_UPDATED, _("Corrective action plan updated")), | ||
(EventType.CREATED, _("Created")), | ||
(EventType.FEDERAL_AWARDS_UPDATED, _("Federal awards updated")), | ||
( | ||
EventType.FEDERAL_AWARDS_AUDIT_FINDINGS_UPDATED, | ||
_("Federal awards audit findings updated"), | ||
), | ||
( | ||
EventType.FEDERAL_AWARDS_AUDIT_FINDINGS_TEXT_UPDATED, | ||
_("Federal awards audit findings text updated"), | ||
), | ||
( | ||
EventType.FINDINGS_UNIFORM_GUIDANCE_UPDATED, | ||
_("Findings uniform guidance updated"), | ||
), | ||
(EventType.GENERAL_INFORMATION_UPDATED, _("General information updated")), | ||
(EventType.LOCKED_FOR_CERTIFICATION, _("Locked for certification")), | ||
(EventType.UNLOCKED_AFTER_CERTIFICATION, _("Unlocked after certification")), | ||
(EventType.NOTES_TO_SEFA_UPDATED, _("Notes to SEFA updated")), | ||
(EventType.SECONDARY_AUDITORS_UPDATED, _("Secondary auditors updated")), | ||
(EventType.SUBMITTED, _("Submitted to the FAC for processing")), | ||
(EventType.DISSEMINATED, _("Copied to dissemination tables")), | ||
(EventType.TRIBAL_CONSENT_UPDATED, _("Tribal audit consent updated")), | ||
) | ||
|
||
sac = models.ForeignKey("audit.SingleAuditChecklist", on_delete=models.CASCADE) | ||
user = models.ForeignKey(User, on_delete=models.PROTECT) | ||
timestamp = models.DateTimeField(auto_now_add=True) | ||
event = models.CharField(choices=EVENT_TYPES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
backend/audit/templates/audit/unlock-after-certification.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
{% block content %} | ||
<div class="grid-container margin-top-6 margin-bottom-10"> | ||
<div class="grid-row"> | ||
<h1 class="font-sans-2xl" id="title">Unlock after certification</h1> | ||
{% if submission_status == target_status %} | ||
<form class="padding-x-6" | ||
id="unlock-after-certification" | ||
method="post"> | ||
{% csrf_token %} | ||
<fieldset class="usa-fieldset"> | ||
|
||
{% comment %} This div is the grey box, and should handle its own margins and padding. {% endcomment %} | ||
<div class="bg-base-lightest padding-5"> | ||
<fieldset class="usa-fieldset radio margin-bottom-6" id="question-opt-in-out"> | ||
<legend class="margin-bottom-3 font-sans-lg text-bold text-underline"> | ||
I understand that this will move the submission back to an in-progress, editable state and that it will need to be marked as ready for certification again in future. | ||
</legend> | ||
|
||
<div class="usa-checkbox"> | ||
<input id="unlock_after_certification" | ||
name="unlock_after_certification" | ||
class="usa-checkbox__input" | ||
type="checkbox" | ||
value="True" | ||
checked | ||
<label class="usa-checkbox__label" for="unlock-for-certification-checkbox"></label> | ||
</div> | ||
|
||
<fieldset class="usa-fieldset margin-top-2 tablet:grid-col-12" id="agree-or-cancel"> | ||
<button class="usa-button" id="continue">Agree to unlock for certification</button> | ||
<a class="usa-button usa-button--unstyled margin-left-2 margin-top-2 tablet:margin-top-0" | ||
id="unlock-after-certification-button" | ||
href="{% url 'audit:SubmissionProgress' report_id %}" | ||
aria-controls="form-cancel">Cancel</a> | ||
</fieldset> | ||
</fieldset> | ||
</div> | ||
</fieldset> | ||
</form> | ||
{% else %} | ||
<p>This form is only accessible for submissions with a ready for certification status.</p> | ||
|
||
{% endif%} | ||
</div> | ||
</div> | ||
{% include "audit-metadata.html" %} | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.