Skip to content

Commit

Permalink
Merge pull request #1882 from watchdogpolska/develop
Browse files Browse the repository at this point in the history
v1.5.24
  • Loading branch information
PiotrIw authored Nov 19, 2024
2 parents 59ecf5e + bed185e commit 5c79681
Show file tree
Hide file tree
Showing 10 changed files with 439 additions and 19 deletions.
2 changes: 1 addition & 1 deletion feder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PEP 396: The __version__ attribute's value SHOULD be a string.
__version__ = "1.5.23"
__version__ = "1.5.24"


# Compatibility to eg. django-rest-framework
Expand Down
4 changes: 2 additions & 2 deletions feder/letters/formsets.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from atom.ext.crispy_forms.forms import BaseTableFormSet
from extra_views import InlineFormSet
from extra_views import InlineFormSetFactory

from feder.letters.models import Attachment


class AttachmentInline(InlineFormSet):
class AttachmentInline(InlineFormSetFactory):
model = Attachment
formset_class = BaseTableFormSet
fields = ["attachment"]
1 change: 1 addition & 0 deletions feder/letters/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Meta:
"html_quote",
"email",
"note",
"ai_evaluation",
"is_spam",
"is_draft",
"is_incoming",
Expand Down
7 changes: 7 additions & 0 deletions feder/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ def generate_voivodeship_table(self):
+ str(Institution.objects.area(voivodeship).count())
+ "</td></tr>"
)
table += (
"<tr><td><b>Wszystkie</b></td><td><b>"
+ str(Case.objects.all().count())
+ "</b></td><td><b>"
+ str(Institution.objects.all().count())
+ "</b></td></tr>"
)
table += "</table>"
return table

Expand Down
22 changes: 20 additions & 2 deletions feder/monitorings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ def generate_voivodeship_table(self):
<tr>
<th>Województwo</th>
<th>Liczba spraw</th>
<th>Liczba spraw w kwarantannie</th>
<th>Liczba spraw z potw. odbioru</th>
<th>Liczba spraw z odpowiedzią</th>
</tr>"""
for voivodeship in voivodeship_list:
table += (
Expand All @@ -265,10 +266,27 @@ def generate_voivodeship_table(self):
+ str(self.case_set.area(voivodeship).count())
+ "</td><td>"
+ str(
self.case_set.filter(is_quarantined=True).area(voivodeship).count()
self.case_set.filter(confirmation_received=True)
.area(voivodeship)
.count()
)
+ "</td><td>"
+ str(
self.case_set.filter(response_received=True)
.area(voivodeship)
.count()
)
+ "</td></tr>"
)
table += (
"<tr><td><b>Wszystkie</b></td><td><b>"
+ str(str(self.case_set.all().count()))
+ "</b></td><td><b>"
+ str(self.case_set.filter(confirmation_received=True).all().count())
+ "</b></td><td><b>"
+ str(self.case_set.filter(response_received=True).all().count())
+ "</b></td></tr>"
)
table += "</table>"
return table

Expand Down
2 changes: 1 addition & 1 deletion feder/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3005,7 +3005,7 @@ tbody.collapse.in {
padding-left: 8px;
}

.btn-group > .btn-lg + .dropdown-toggle, .btn-group-lg.btn-group > .btn + .dropdown-toggle {
.btn-group > .btn-lg + .dropdown-toggle, .btn-group.btn-group-lg > .btn + .dropdown-toggle {
padding-right: 12px;
padding-left: 12px;
}
Expand Down
2 changes: 1 addition & 1 deletion feder/static/css/style.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 5c79681

Please sign in to comment.