Skip to content

Commit

Permalink
DBC22-1735: merge fixes, improvements for recent commits
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-oxd authored and fatbird committed Feb 14, 2024
1 parent d73b9d3 commit f063a72
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ DRIVEBC_OPEN_511_API_BASE_URL=<open511 api url>
DRIVEBC_DIT_API_BASE_URL=<CARS api url>
DRIVEBC_ROUTE_PLANNER_API_BASE_URL=<route planner url>
DRIVEBC_ROUTE_PLANNER_API_AUTH_KEY=<route planner auth key>
DRIVEBC_WEATHER_API_BASE_URL=<weather api base url>
DRIVEBC_WEATHER_API_TOKEN_URL=<weather api token url>
DRIVEBC_WEATHER_AREAS_API_BASE_URL=<weather areas api base url>
WEATHER_CLIENT_ID=<weather client id>
WEATHER_CLIENT_SECRET=<weather client secret>
7 changes: 6 additions & 1 deletion src/backend/apps/shared/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CacheTimeout:
WEBCAM_LIST = 60*7 # 5min buffer + (2*1)min twice of task interval
EVENT_LIST = 60 * 15 # 5min buffer + (2*5)min twice of task interval
FERRY_LIST = 60*60*24 # 24hr
REGIONAL_WEATHER_LIST = 60 * 15 # 5min buffer + (2*5)min twice of task interval
REGIONAL_WEATHER_LIST = 60 * 15 # 5min buffer + (2*5)min twice of task interval


class CacheKey:
Expand All @@ -70,3 +70,8 @@ class FeedbackSubject:
SUBJECT_CHOICES = (
(FeedbackSubject.WEBSITE_FEEDBACK, 'Website Feedback'),
)


SUBJECT_TITLE = {
FeedbackSubject.WEBSITE_FEEDBACK: 'Website Feedback',
}
4 changes: 2 additions & 2 deletions src/backend/apps/shared/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from apps.shared.enums import (
ROUTE_FILTER_TOLERANCE,
SUBJECT_CHOICES,
SUBJECT_TITLE,
CacheKey,
CacheTimeout,
)
Expand Down Expand Up @@ -47,10 +48,9 @@ def post(self, request):

# Currently unused but potentially important data
# score = serializer.fields['recToken'].score
# subject = serializer.data['subject']

send_mail(
"DriveBC Feedback message",
'DriveBC feedback received: ' + SUBJECT_TITLE[serializer.data['subject']],
serializer.data['message'],
serializer.data['email'],
[env("DRIVEBC_FEEDBACK_EMAIL_DEFAULT")],
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/Components/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ export default function MapWrapper({
)}

{!isPreview && (
<div>
<div className='routing-outer-container'>
<RouteSearch routeEdit={true} />
<AdvisoriesOnMap />
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/frontend/src/Components/Map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@
height: 100%;
overflow: hidden;

.routing-outer-container {
position: absolute;
z-index: 16;
}

.ol-overlay-container:not(:has(> img)) {
//overriding openlayers dynamic styles for mobile layout except for having img as a direct child
@media (max-width: 575px) {
Expand Down
1 change: 0 additions & 1 deletion src/frontend/src/Components/map/RouteSearch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

.routing-container {
// background: white;
position: absolute;
padding: 1rem 1rem 0;
z-index: 5;

Expand Down
12 changes: 6 additions & 6 deletions src/frontend/src/Header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
left: 0;
right: 0;
top: 0;
z-index: 2;
z-index: 128;
background: white;
padding: 0;
box-shadow: rgb(169, 169, 169) 0px 2px 10px 0px;
Expand Down Expand Up @@ -33,13 +33,13 @@
transform-origin: 0% 0%;
transition: transform 100ms ease-in-out;
}

.line3 {
transform-origin: 0% 100%;
transition: transform 100ms ease-in-out;
}



&:not(.collapsed) {
.line {
Expand All @@ -50,11 +50,11 @@
display: block;
transform: rotate(45deg);
}

.line2 {
opacity: 0;
}

.line3 {
display: block;
transform: rotate(-45deg);
Expand Down Expand Up @@ -143,4 +143,4 @@
padding: 0;
}
}
}
}

0 comments on commit f063a72

Please sign in to comment.