2021-07-22 10:00:59 +02:00
|
|
|
"""
|
|
|
|
Author: Michel Peltriaux
|
|
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
|
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
|
|
|
Created on: 22.07.21
|
|
|
|
|
|
|
|
"""
|
2022-01-12 08:56:49 +01:00
|
|
|
from konova.filters import QueryTableFilter, CheckboxTableFilter, SelectionTableFilter
|
2021-07-22 10:00:59 +02:00
|
|
|
|
|
|
|
|
2022-01-11 15:19:16 +01:00
|
|
|
class InterventionTableFilter:
|
2022-01-12 08:56:49 +01:00
|
|
|
selection_filter = None
|
2022-01-11 15:19:16 +01:00
|
|
|
query_filter = None
|
|
|
|
checkbox_filter = None
|
|
|
|
qs = None
|
2021-07-22 10:00:59 +02:00
|
|
|
|
2022-01-11 12:56:27 +01:00
|
|
|
def __init__(self, *args, **kwargs):
|
2022-01-11 15:19:16 +01:00
|
|
|
user = kwargs.get("user", None)
|
|
|
|
qs = kwargs.get("queryset", None)
|
|
|
|
request_data = kwargs.get("data", None)
|
|
|
|
|
2022-01-12 08:56:49 +01:00
|
|
|
self.selection_filter = SelectionTableFilter(
|
2022-01-11 15:19:16 +01:00
|
|
|
user=user,
|
|
|
|
data=request_data,
|
|
|
|
queryset=qs,
|
|
|
|
)
|
2022-01-12 08:56:49 +01:00
|
|
|
self.query_filter = QueryTableFilter(
|
|
|
|
user=user,
|
|
|
|
data=request_data,
|
|
|
|
queryset=self.selection_filter.qs,
|
|
|
|
)
|
2022-01-11 15:19:16 +01:00
|
|
|
self.checkbox_filter = CheckboxTableFilter(
|
|
|
|
user=user,
|
|
|
|
data=request_data,
|
|
|
|
queryset=self.query_filter.qs,
|
|
|
|
)
|
|
|
|
self.qs = self.checkbox_filter.qs
|