Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBC22-1909/1910: empty display for cam and delay lists #327

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/frontend/src/pages/CamerasListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ export default function CamerasListPage() {

<CameraList cameras={ displayedCameras ? displayedCameras : [] }></CameraList>

{!(displayedCameras && displayedCameras.length) &&
<Container className="empty-cam-display">
<h2>No cameras to display</h2>

<h6><b>Do you have a starting location and a destination entered?</b></h6>
<p>Adding a route will narrow down the information for the whole site, including the camera list. There might not be any cameras between those two locations.</p>

<h6><b>Have you entered search terms to narrow down the list?</b></h6>
<p>Try checking your spelling, changing, or removing your search terms.</p>
</Container>
}

<Footer />
</div>
);
Expand Down
10 changes: 10 additions & 0 deletions src/frontend/src/pages/CamerasListPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,13 @@
}
}
}

.empty-cam-display {
h2, h6 {
color: #053662;
}

h6 {
margin-top: 2rem;
}
}
14 changes: 13 additions & 1 deletion src/frontend/src/pages/EventsListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export default function EventsListPage() {
</div>

<div>
{ largeScreen &&
{ largeScreen && !!processedEvents.length &&
<EventsTable data={processedEvents} routeHandler={handleRoute} showLoader={showLoader} sortingKey={sortingKey} />
}

Expand Down Expand Up @@ -306,6 +306,18 @@ export default function EventsListPage() {
)}
</div>
}

{!processedEvents.length &&
<Container className="empty-event-display">
<h2>No delays to display</h2>

<h6><b>Do you have a starting location and a destination entered?</b></h6>
<p>Adding a route will narrow down the information for the whole site, including the delays list. There might not be any delays between those two locations.</p>

<h6><b>Have you hidden any of the layers using the filters?</b></h6>
<p>Try toggling the filters on and off so that more information can be displayed.</p>
</Container>
}
</div>
</Container>

Expand Down
13 changes: 9 additions & 4 deletions src/frontend/src/pages/EventsListPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

.filters-component {
position: relative;

button {
margin: 0;
}
Expand Down Expand Up @@ -166,7 +166,12 @@
}
}

// Searchbox size
.rbt {
height: 40px;
.empty-event-display {
h2, h6 {
color: #053662;
}

h6 {
margin-top: 2rem;
}
}
Loading