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

Add start time, end time, and date to each Place card #937

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
4 changes: 3 additions & 1 deletion www/js/diary/infinite_scroll_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ angular.module('emission.main.diary.infscrolllist',['ui-leaflet',
const numButtons = entry.INPUTS?.length || 1;
height = 272 + (54 * numButtons)
} else if (entry.enter_ts) { // entry is a place
height = 106;
height = 188;
}
if (entry.additionsList) {
height += 40 * entry.additionsList.length; // for each trip/place addition object, we need to increase the card height
Expand Down Expand Up @@ -317,6 +317,8 @@ angular.module('emission.main.diary.infscrolllist',['ui-leaflet',
const place = cTrip.confirmed_place;
$scope.data.displayTimelineEntries.push(cTrip);
if ($scope.showPlaces && place) {
// if a place (such as the last place) does not have a display_end_time, make the display_end_time be the end of the day
!place.display_end_time ? place.display_end_time = moment(place.enter_fmt_time).parseZone().endOf('day').format("h:mm A") : place.display_end_time = place.display_end_time;
$scope.data.displayTimelineEntries.push(place);
}
});
Expand Down
5 changes: 5 additions & 0 deletions www/templates/diary/place_list_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<!-- Place Item Template -->
<ion-item class="unified-diary-item" style="background-color: transparent;" class="list-item">
<!-- Start Time Tag -->
<div class="start-time-tag">{{place.display_start_time}}</div>
<!-- <div class="start-time-tag">{{place.display_enter_time}}</div> -->
<div class="diary-card short" style="padding-top: 10px;">
<div style="width: 100%; margin: auto; padding-block: 5px">
<div class="row" style="font-size: 12px; place-content: center; padding: 8px">
<b><u>{{place.display_date}}</u></b>
</div>
<div class="row place-title">
<!-- Place (Destination of Prev. Trip) -->
<i class="icon ion-location"></i>
Expand All @@ -19,6 +23,7 @@
</div>
</div>
<!-- End Time Tag -->
<div class="stop-time-tag">{{place.display_end_time}}</div>
<!-- <div class="stop-time-tag">{{place.display_exit_time}}</div> -->
</ion-item>
</div>