Skip to content

Commit

Permalink
Fiscal Year Multiselect (#3151)
Browse files Browse the repository at this point in the history
* - Update multi select template to allow multiple fitlers to exist on same page
- Updated search_indexes to allow mutliselect for fiscal period

* - Update 508

* - remove whitespace

* - regenerate lock as test

* - upgrade setuptools

* - revewrt 508

* - testing

* - revert changes

* - Updating lock file and pipfile

---------

Co-authored-by: Alex P. <[email protected]>
  • Loading branch information
elipe17 and ADPennington authored Sep 10, 2024
1 parent 8868eea commit 7f1e28d
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 201 deletions.
4 changes: 2 additions & 2 deletions tdrs-backend/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ boto3 = "==1.28.4"
cryptography = "==3.4.7"
dj-database-url = "==0.5.0"
django = "==3.2.15"
django-admin-508 = "==1.0.1"
django-admin-508 = "==1.0.2"
django-admin-logs = "==1.0.2"
django-configurations = "==2.2"
django-cors-headers = "==3.12.0"
Expand Down Expand Up @@ -61,4 +61,4 @@ sendgrid = "==6.10.0"
sentry-sdk = "==2.11.0"

[requires]
python_version = "3.10.8"
python_version = "3.10.8"
228 changes: 114 additions & 114 deletions tdrs-backend/Pipfile.lock

Large diffs are not rendered by default.

38 changes: 23 additions & 15 deletions tdrs-backend/tdpservice/search_indexes/admin/ssp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""ModelAdmin classes for parsed SSP data files."""
from .filters import CreationDateFilter, FiscalPeriodFilter, STTFilter
from .filters import CreationDateFilter, STTFilter
from .mixins import CsvExportAdminMixin, ReadOnlyAdminMixin
from tdpservice.search_indexes.admin.multiselect_filter import MultiSelectDropdownFilter


class SSP_M1Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -14,9 +15,10 @@ class SSP_M1Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -31,9 +33,10 @@ class SSP_M2Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -48,9 +51,10 @@ class SSP_M3Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]

class SSP_M4Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -64,9 +68,10 @@ class SSP_M4Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]

class SSP_M5Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -80,9 +85,10 @@ class SSP_M5Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]

class SSP_M6Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -97,9 +103,10 @@ class SSP_M6Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]

class SSP_M7Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -117,7 +124,8 @@ class SSP_M7Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]
38 changes: 23 additions & 15 deletions tdrs-backend/tdpservice/search_indexes/admin/tanf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""ModelAdmin classes for parsed TANF data files."""
from .filters import CreationDateFilter, FiscalPeriodFilter, STTFilter
from .filters import CreationDateFilter, STTFilter
from .mixins import CsvExportAdminMixin, ReadOnlyAdminMixin
from tdpservice.search_indexes.admin.multiselect_filter import MultiSelectDropdownFilter


class TANF_T1Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -14,9 +15,10 @@ class TANF_T1Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -31,9 +33,10 @@ class TANF_T2Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -48,9 +51,10 @@ class TANF_T3Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -65,9 +69,10 @@ class TANF_T4Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -82,9 +87,10 @@ class TANF_T5Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -99,9 +105,10 @@ class TANF_T6Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -120,7 +127,8 @@ class TANF_T7Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]
38 changes: 23 additions & 15 deletions tdrs-backend/tdpservice/search_indexes/admin/tribal.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""ModelAdmin classes for parsed TRIBAL data files."""
from .filters import CreationDateFilter, FiscalPeriodFilter, STTFilter
from .filters import CreationDateFilter, STTFilter
from .mixins import CsvExportAdminMixin, ReadOnlyAdminMixin
from tdpservice.search_indexes.admin.multiselect_filter import MultiSelectDropdownFilter


class Tribal_TANF_T1Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -14,9 +15,10 @@ class Tribal_TANF_T1Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -31,9 +33,10 @@ class Tribal_TANF_T2Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]


Expand All @@ -48,9 +51,10 @@ class Tribal_TANF_T3Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]

class Tribal_TANF_T4Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -64,9 +68,10 @@ class Tribal_TANF_T4Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]
class Tribal_TANF_T5Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
"""ModelAdmin class for parsed Tribal_T5 data files."""
Expand All @@ -79,9 +84,10 @@ class Tribal_TANF_T5Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]

class Tribal_TANF_T6Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -96,9 +102,10 @@ class Tribal_TANF_T6Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]

class Tribal_TANF_T7Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
Expand All @@ -116,7 +123,8 @@ class Tribal_TANF_T7Admin(ReadOnlyAdminMixin, CsvExportAdminMixin):
]

list_filter = [
FiscalPeriodFilter,
CreationDateFilter,
('datafile__year', MultiSelectDropdownFilter),
('datafile__quarter', MultiSelectDropdownFilter),
('datafile__stt__name', STTFilter),
CreationDateFilter,
]
Loading

0 comments on commit 7f1e28d

Please sign in to comment.