Skip to content

Commit

Permalink
chore: update report summary
Browse files Browse the repository at this point in the history
  • Loading branch information
olekkorob committed Feb 27, 2023
1 parent a02f79d commit f493404
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion web/src/components/LineagesByLocation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</div>
<div v-else class="d-flex align-items-center">
Prevalence in the last {{ recentWindow }} days:
<b id="proportion" class="ml-1" />
<b id="proportion-1" class="ml-1" />
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/LocationReportComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header border-secondary">
<h5 id="exampleModalLabel" class="modal-title">
<h5 id="selectReportModalLabel" class="modal-title">
Select report location
</h5>
<button
Expand Down Expand Up @@ -217,7 +217,7 @@
</small>
<div
v-if="totalSequences"
id="sequence-count"
id="sequence-count-1"
class="text-grey font-size-2 ml-3"
>
with
Expand Down Expand Up @@ -436,7 +436,7 @@
>
<section
v-if="lineagesByDay"
id="lineages-over-time"
id="lineages-over-time-1"
class="flex-grow-1 flex-shrink-1"
>
<LineagesByLocation
Expand Down
12 changes: 4 additions & 8 deletions web/src/components/ReportSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,17 @@
class="text-center padded border-bottom border-secondary"
colspan="2"
>
when found
when found in date range
<sup>**</sup>
</th>
</tr>
<tr class="border-bottom">
<th class="text-center padded">total</th>
<th class="text-center padded">count</th>
<th class="text-center padded">
cumulative prevalence
<sup>*</sup>
</th>
<th />
<th class="text-center padded">first</th>
<th class="text-center padded">last</th>
</tr>
</thead>
Expand Down Expand Up @@ -121,9 +120,6 @@
</span>
</td>
<td />
<td class="text-center">
{{ location.first_detected }}
</td>
<td class="text-center">
{{ location.last_detected }}
</td>
Expand All @@ -146,8 +142,8 @@
<em>
<sup>*</sup>
Apparent cumulative prevalence is the ratio of the sequences
containing {{ mutationName }} to all sequences collected since the
identification of {{ mutationName }} in that location.
containing {{ mutationName }} to all sequences collected within
the selected time window
</em>
</small>
<small class="ml-2">
Expand Down
15 changes: 10 additions & 5 deletions web/src/components/SituationReportComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header border-secondary">
<h5 id="exampleModalLabel" class="modal-title">
<h5 id="selectReportLocationModalLabel" class="modal-title">
Select report locations
</h5>
<button
Expand Down Expand Up @@ -65,7 +65,7 @@
</div>

<div
id="select-location"
id="select-location-1"
class="d-flex align-items-center justify-content-center my-3"
>
<TypeaheadSelect
Expand Down Expand Up @@ -103,7 +103,7 @@
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header border-secondary">
<h5 id="exampleModalLabel" class="modal-title">
<h5 id="changeSelectedLocationModalLabel" class="modal-title">
Change selected location
</h5>
<button
Expand Down Expand Up @@ -649,7 +649,7 @@
<small class="text-muted mb-2">
Based on reported sample collection date
</small>
<div id="location-buttons" class="d-flex flex-wrap mb-3">
<div id="location-buttons-1" class="d-flex flex-wrap mb-3">
<button
v-for="(location, lIdx) in selectedLocations"
:key="lIdx"
Expand Down Expand Up @@ -697,7 +697,7 @@

<!-- change location selectors for sublineage prevalences -->
<div
id="location-buttons"
id="location-buttons-2"
class="d-flex flex-wrap align-items-center"
>
<button
Expand Down Expand Up @@ -1077,6 +1077,7 @@ import {
updateLocationData,
} from '@/api/genomics.js';
import { lazyLoad } from '@/js/lazy-load';
import {timeMonth} from "d3-time";
export default {
name: 'SituationReportComponent',
Expand Down Expand Up @@ -1327,8 +1328,12 @@ export default {
// Get date for the citation object
const formatDate = timeFormat('%e %B %Y');
const format = timeFormat('%Y-%m-%d');
let currentTime = new Date();
this.today = formatDate(currentTime);
let newMin = timeMonth.offset(currentTime, -6);
this.maxDate = format(currentTime);
this.minDate = format(newMin);
// set URL for sharing, etc.
this.$nextTick(() => {
Expand Down

0 comments on commit f493404

Please sign in to comment.