diff --git a/web/src/api/genomics.js b/web/src/api/genomics.js
index 85a5b090b..c19bd5dd6 100644
--- a/web/src/api/genomics.js
+++ b/web/src/api/genomics.js
@@ -1608,8 +1608,8 @@ export const getTemporalPrevalence = (
queryStr,
indivCall = false,
returnFlat = true,
- minDate,
- maxDate,
+ minDate = '',
+ maxDate = '',
) => {
store.state.admin.reportloading = true;
let url;
diff --git a/web/src/components/LocationReportComponent.vue b/web/src/components/LocationReportComponent.vue
index a0124cd90..b875607c4 100644
--- a/web/src/components/LocationReportComponent.vue
+++ b/web/src/components/LocationReportComponent.vue
@@ -747,7 +747,7 @@
@@ -797,7 +797,7 @@
:margin="marginHist"
:mutationName="null"
className="sequencing-histogram"
- :title="`Samples sequenced per day over last ${recentWindow} days`"
+ :title="`Samples sequenced per day ${getDateRangeText()}`"
:onlyTotals="true"
notDetectedColor="#bab0ab"
/>
@@ -928,8 +928,8 @@
:data="lineageTable"
:locationName="selectedLocation.label"
:locationID="selectedLocation.id"
- :minDate="minDate"
- :maxDate="maxDate"
+ :minDate="xmin"
+ :maxDate="xmax"
/>
@@ -1771,9 +1771,6 @@ export default {
const format = timeFormat('%Y-%m-%d');
this.maxDate = format(newMax);
this.minDate = format(newMin);
- this.setupReport();
- this.updateMaps();
- this.updateTable();
const queryParams = this.$route.query;
this.$router.push({
name: 'LocationReport',
@@ -1791,6 +1788,16 @@ export default {
selected: queryParams.selected,
},
});
+ this.setupReport();
+ this.updateMaps();
+ this.updateTable();
+ },
+ getDateRangeText() {
+ if (this.xmin && this.xmax) {
+ return `${this.xmin} - ${this.xmax}`;
+ } else {
+ return 'all time';
+ }
},
},
};
diff --git a/web/src/components/LocationTable.vue b/web/src/components/LocationTable.vue
index 0d251c49d..e25209234 100644
--- a/web/src/components/LocationTable.vue
+++ b/web/src/components/LocationTable.vue
@@ -9,26 +9,25 @@
colspan="2"
>
lineage found
+
+ {{ getDateRangeText() }}
|
- when found
+ when found in date range
**
|
- total |
+ count |
cumulative prevalence
*
-
- {{ `${xMin} - ${xMax}` }}
|
|
- first |
last |
@@ -111,7 +110,7 @@
:to="{
name: 'MutationReport',
params: lineage.params ? lineage.params : {},
- query: lineage.route,
+ query: transformQuery(lineage.route),
}"
:data-tippy-info="lineage.tooltip"
>
@@ -145,9 +144,6 @@
|
-
- {{ lineage.first_detected }}
- |
{{ lineage.last_detected }}
|
@@ -177,6 +173,7 @@
diff --git a/web/src/components/ReportSummary.vue b/web/src/components/ReportSummary.vue
index c8483c1e4..3179f1093 100644
--- a/web/src/components/ReportSummary.vue
+++ b/web/src/components/ReportSummary.vue
@@ -42,6 +42,8 @@
colspan="2"
>
{{ mutationName }} found
+
+ {{ getDateRangeText() }}
|
diff --git a/web/src/components/SituationReportComponent.vue b/web/src/components/SituationReportComponent.vue
index dcae0d6ca..8ec1f464e 100644
--- a/web/src/components/SituationReportComponent.vue
+++ b/web/src/components/SituationReportComponent.vue
@@ -634,6 +634,8 @@
:countries="countries"
:states="states"
:routeTo="routeTo"
+ :xmin="xmin"
+ :xmax="xmax"
/>
@@ -1077,7 +1079,7 @@ import {
updateLocationData,
} from '@/api/genomics.js';
import { lazyLoad } from '@/js/lazy-load';
-import {timeMonth} from "d3-time";
+import { timeMonth } from 'd3-time';
export default {
name: 'SituationReportComponent',
|