territories-dashboard-lib 0.1.5__py3-none-any.whl → 0.1.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of territories-dashboard-lib might be problematic. Click here for more details.
- territories_dashboard_lib/geo_lib/views.py +13 -1
- territories_dashboard_lib/website_lib/static/territories_dashboard_lib/website/css/website.css +41 -3
- territories_dashboard_lib/website_lib/static/territories_dashboard_lib/website/react/indicatorMap.bundle.js +1 -1
- {territories_dashboard_lib-0.1.5.dist-info → territories_dashboard_lib-0.1.7.dist-info}/METADATA +1 -1
- {territories_dashboard_lib-0.1.5.dist-info → territories_dashboard_lib-0.1.7.dist-info}/RECORD +7 -7
- {territories_dashboard_lib-0.1.5.dist-info → territories_dashboard_lib-0.1.7.dist-info}/WHEEL +0 -0
- {territories_dashboard_lib-0.1.5.dist-info → territories_dashboard_lib-0.1.7.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import base64
|
|
2
|
+
import datetime
|
|
2
3
|
import gzip
|
|
3
4
|
import json
|
|
4
5
|
from typing import Optional
|
|
@@ -32,6 +33,17 @@ class GeoFeaturesParams(BaseModel):
|
|
|
32
33
|
feature: str
|
|
33
34
|
|
|
34
35
|
|
|
36
|
+
class DateTimeEncoder(json.JSONEncoder):
|
|
37
|
+
def default(self, obj):
|
|
38
|
+
if isinstance(obj, (datetime.date, datetime.datetime)):
|
|
39
|
+
return (
|
|
40
|
+
obj.date().isoformat()
|
|
41
|
+
if isinstance(obj, datetime.datetime)
|
|
42
|
+
else obj.isoformat()
|
|
43
|
+
)
|
|
44
|
+
return super().default(obj)
|
|
45
|
+
|
|
46
|
+
|
|
35
47
|
@require_GET
|
|
36
48
|
@cache_control(max_age=3600)
|
|
37
49
|
def geo_features_view(request):
|
|
@@ -96,7 +108,7 @@ def geo_features_view(request):
|
|
|
96
108
|
|
|
97
109
|
last_queried_order_id = results[-1]["order_id"] if results else None
|
|
98
110
|
|
|
99
|
-
compressed_data = gzip.compress(json.dumps(data).encode())
|
|
111
|
+
compressed_data = gzip.compress(json.dumps(data, cls=DateTimeEncoder).encode())
|
|
100
112
|
compressed_base64 = base64.b64encode(compressed_data).decode()
|
|
101
113
|
|
|
102
114
|
return JsonResponse({"data": compressed_base64, "last": last_queried_order_id})
|
territories_dashboard_lib/website_lib/static/territories_dashboard_lib/website/css/website.css
CHANGED
|
@@ -878,12 +878,12 @@ footer .fr-follow {
|
|
|
878
878
|
padding-bottom: 64px;
|
|
879
879
|
}
|
|
880
880
|
|
|
881
|
-
.table-geo-filters
|
|
881
|
+
.table-geo-filters {
|
|
882
882
|
font-size: 0.9rem;
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
.table-geo-filters
|
|
886
|
-
padding-bottom:
|
|
885
|
+
.table-geo-filters:has(details[open]) {
|
|
886
|
+
padding-bottom: 300px;
|
|
887
887
|
}
|
|
888
888
|
|
|
889
889
|
.table-geo-filters input,
|
|
@@ -975,3 +975,41 @@ footer .fr-follow {
|
|
|
975
975
|
.fr-footer__bottom-link {
|
|
976
976
|
white-space: nowrap;
|
|
977
977
|
}
|
|
978
|
+
|
|
979
|
+
.react-datepicker__input-container input {
|
|
980
|
+
border-color: hsl(0, 0%, 80%);
|
|
981
|
+
border-radius: 4px;
|
|
982
|
+
border-style: solid;
|
|
983
|
+
border-width: 1px;
|
|
984
|
+
width: 95px;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
.date-pickers-range {
|
|
988
|
+
display: flex;
|
|
989
|
+
flex-direction: row;
|
|
990
|
+
gap: 32px;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
.react-datepicker__header {
|
|
994
|
+
background-color: #ececfe !important;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.react-datepicker__header h2 {
|
|
998
|
+
padding: 0px !important;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.react-datepicker__header__dropdown {
|
|
1002
|
+
padding-bottom: 16px !important;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.react-datepicker__close-icon:hover {
|
|
1006
|
+
background-color: inherit !important;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.react-select__menu {
|
|
1010
|
+
font-size: 0.8rem !important;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.react-select__option {
|
|
1014
|
+
padding: 4px 12px !important;
|
|
1015
|
+
}
|