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

Summary Updates #2605

Merged
merged 49 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9c62ba7
Add basic search form
Oct 5, 2023
c0704aa
Add dummy results table
Oct 5, 2023
92c7197
move search to dissem app, impl basic form (#2431)
timoballard Oct 12, 2023
9191ea0
Basic styles for search sidebar
Oct 12, 2023
f5a9235
Merge branch 'main' into mh/implement-mvp-search-form-2369
timoballard Oct 12, 2023
eb661f3
Style up results column
Oct 12, 2023
d37b8e1
Merge branch 'mh/implement-mvp-search-form-2369' of github.com:GSA-TT…
Oct 12, 2023
2d13a7a
[DRAFT] Search Summary (#2480)
jperson1 Oct 16, 2023
6c502d9
Linting - py whitespace & imports, html closed tag
jperson1 Oct 16, 2023
c5f470c
Summary view tests (#2512)
jperson1 Oct 16, 2023
d421415
Flesh out Search view (#2494)
timoballard Oct 16, 2023
8e265f6
Add explainer text
Oct 18, 2023
0da216b
Remove filter chicklets (for now)
Oct 18, 2023
0c65422
Add pagination component
Oct 18, 2023
9c7eee9
Rm download all results button
Oct 18, 2023
33c079f
Add alt text
Oct 18, 2023
d7d1c27
Search - Pre-populate Form, Summary Link, Link Icons, Formatting (#2538)
jperson1 Oct 18, 2023
d572e29
Search - Audit Year (#2547)
jperson1 Oct 19, 2023
1c6a06d
PDF downloads via Search (#2520)
timoballard Oct 20, 2023
3e92f48
linter
timoballard Oct 20, 2023
9a92121
Merge branch 'main' into mh/implement-mvp-search-form-2369
timoballard Oct 20, 2023
90115af
Merge branch 'main' into mh/implement-mvp-search-form-2369
timoballard Oct 23, 2023
6031f46
fix cog_or_over field name mismatch
timoballard Oct 24, 2023
0cc9bd3
fix search tests
timoballard Oct 24, 2023
b3f7993
check if file exists in s3, else 404
timoballard Oct 24, 2023
70a34f3
log warning if file not found in S3
timoballard Oct 24, 2023
ce62e99
Summary - restructure general, PDF download link
jperson1 Oct 24, 2023
caa3514
Merge branch 'mh/implement-mvp-search-form-2369' into jp/summary-updates
jperson1 Oct 24, 2023
5ef4de2
getkey tag utilizes ".get" method.
jperson1 Oct 25, 2023
c2c5a1f
Remove useless return in test_audit_year
jperson1 Oct 25, 2023
2865ae3
Merge branch 'main' into jp/summary-updates
jperson1 Oct 25, 2023
963be2f
Renaming - "Notes" -> "Notes to SEFA" in test
jperson1 Oct 25, 2023
274e3ed
Audit metadata, django comment over HTML comment
jperson1 Oct 27, 2023
75b4a49
Main.scss - override base-lighter, semibold to 600
jperson1 Oct 27, 2023
dc81274
Summary - Updates. Table-based with workbook links
jperson1 Oct 27, 2023
dbffbbb
Remove unused summary-general.html
jperson1 Oct 27, 2023
9cf5f39
Grab additional UEI/EIN/Auditors
jperson1 Oct 27, 2023
c8e050f
django.contrib.humanize to installed apps.
jperson1 Oct 27, 2023
3e138f6
Mobile spacing
jperson1 Oct 27, 2023
b460d39
Remove unneeded formatting. Lint!
jperson1 Oct 27, 2023
88cb8d0
Remove passthroughs from the summary info
jperson1 Oct 27, 2023
e959cf4
Summary HTML - "disabled" cells if no data exists
jperson1 Oct 27, 2023
c202811
Lint - unused passthrough import
jperson1 Oct 27, 2023
ae0acbf
Merge branch 'main' into jp/summary-updates
jperson1 Oct 27, 2023
55e6668
Summary tests - remove passthrough
jperson1 Oct 27, 2023
78e333a
Tests - actually remove passthrough. Oops.
jperson1 Oct 27, 2023
3fc2e05
XLSX links
jperson1 Oct 30, 2023
3fce64a
Merge branch 'main' into jp/summary-updates
jperson1 Oct 30, 2023
97bd111
Merge branch 'main' into jp/summary-updates
jperson1 Oct 30, 2023
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
1 change: 1 addition & 0 deletions backend/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.humanize",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.postgres",
Expand Down
472 changes: 409 additions & 63 deletions backend/dissemination/templates/summary.html

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions backend/dissemination/templatetags/getkey.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Custom tag to pull a key with a space out of a dictionary.
Example:
{{ data.'Notes to SEFA' }} does not work.
Instead, {{ data|getkey:"Notes to SEFA" }}
"""
from django import template

register = template.Library()


@register.filter(name="getkey")
def getkey(value, arg):
return value.get(arg, [])
2 changes: 0 additions & 2 deletions backend/dissemination/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,3 @@ def test_audit_year(self):
audit_years=[2020, 2021, 2022],
)
self.assertEqual(len(results), 3)

return
8 changes: 1 addition & 7 deletions backend/dissemination/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from dissemination.models import (
General,
FederalAward,
Passthrough,
Finding,
FindingText,
CapText,
Expand Down Expand Up @@ -124,7 +123,6 @@ def test_summary_context(self):
"""
baker.make(General, report_id="2022-12-GSAFAC-0000000001", is_public=True)
award = baker.make(FederalAward, report_id="2022-12-GSAFAC-0000000001")
passthrough = baker.make(Passthrough, report_id="2022-12-GSAFAC-0000000001")
finding = baker.make(Finding, report_id="2022-12-GSAFAC-0000000001")
finding_text = baker.make(FindingText, report_id="2022-12-GSAFAC-0000000001")
cap_text = baker.make(CapText, report_id="2022-12-GSAFAC-0000000001")
Expand All @@ -139,10 +137,6 @@ def test_summary_context(self):
response.context["data"]["Awards"][0]["additional_award_identification"],
award.additional_award_identification,
)
self.assertEquals(
response.context["data"]["Passthrough Entities"][0]["award_reference"],
passthrough.award_reference,
)
self.assertEquals(
response.context["data"]["Audit Findings"][0]["reference_number"],
finding.reference_number,
Expand All @@ -158,6 +152,6 @@ def test_summary_context(self):
cap_text.contains_chart_or_table,
)
self.assertEquals(
response.context["data"]["Notes"][0]["accounting_policies"],
response.context["data"]["Notes to SEFA"][0]["accounting_policies"],
note.accounting_policies,
)
25 changes: 14 additions & 11 deletions backend/dissemination/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
from dissemination.models import (
General,
FederalAward,
Passthrough,
Finding,
FindingText,
CapText,
Note,
SecondaryAuditor,
AdditionalEin,
AdditionalUei,
)


Expand Down Expand Up @@ -97,20 +99,22 @@ def get_audit_content(self, report_id):
further. I.e. remove DB ids or something.
"""
awards = FederalAward.objects.filter(report_id=report_id)
passthrough_entities = Passthrough.objects.filter(report_id=report_id)
audit_findings = Finding.objects.filter(report_id=report_id)
audit_findings_text = FindingText.objects.filter(report_id=report_id)
corrective_action_plan = CapText.objects.filter(report_id=report_id)
notes_to_sefa = Note.objects.filter(report_id=report_id)
secondary_auditors = SecondaryAuditor.objects.filter(report_id=report_id)
additional_ueis = AdditionalUei.objects.filter(report_id=report_id)
additional_eins = AdditionalEin.objects.filter(report_id=report_id)

data = {}

data["Awards"] = [
x for x in awards.values()
] # Take QuerySet to a list of objects

if passthrough_entities.exists():
data["Passthrough Entities"] = [x for x in passthrough_entities.values()]
if notes_to_sefa.exists():
data["Notes to SEFA"] = [x for x in notes_to_sefa.values()]
if audit_findings.exists():
data["Audit Findings"] = [x for x in audit_findings.values()]
if audit_findings_text.exists():
Expand All @@ -119,13 +123,12 @@ def get_audit_content(self, report_id):
data["Corrective Action Plan"] = [
x for x in corrective_action_plan.values()
]
if notes_to_sefa.exists():
data["Notes"] = [x for x in notes_to_sefa.values()]

for key in data:
for item in data[key]:
del item["id"]
del item["report_id"]
if secondary_auditors.exists():
data["Secondary Auditors"] = [x for x in secondary_auditors.values()]
if additional_ueis.exists():
data["Additional UEIs"] = [x for x in additional_ueis.values()]
if additional_eins.exists():
data["Additional EINs"] = [x for x in additional_eins.values()]

return data

Expand Down
2 changes: 2 additions & 0 deletions backend/static/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
$theme-font-path: '../fonts',
$theme-image-path: '../img',
$theme-font-type-sans: 'public-sans',
$theme-font-weight-semibold: 600,
$theme-type-scale-md: 7,
$theme-type-scale-2xl: 13,
$theme-color-success-lighter: #eef8eb,
$theme-color-base-lighter: #efefef,
);
@forward 'uswds';
@use '_home.scss';
Expand Down
2 changes: 1 addition & 1 deletion backend/templates/audit-metadata.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Audit metadata. Included at the bottom of several screens. -->
{% comment %} Audit metadata. Included at the bottom of several screens. {% endcomment %}
<div class="audit-metadata">
<div class="grid-container">
<dl class="grid-row grid-gap">
Expand Down