Commit 02eb6a43 authored by Kushal Pandya's avatar Kushal Pandya

Include URL query param in epics path when params are present

parent ec4c18a0
......@@ -27,6 +27,7 @@ export default () => {
},
data() {
const dataset = this.$options.el.dataset;
const filterQueryString = window.location.search.substring(1);
// Construct Epic API path to include
// `start_date` & `end_date` query params to get list of
......@@ -36,7 +37,11 @@ export default () => {
const end = timeframe[TIMEFRAME_LENGTH - 1];
const startDate = `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`;
const endDate = `${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()}`;
const epicsPath = `${dataset.epicsPath}?start_date=${startDate}&end_date=${endDate}`;
let epicsPath = `${dataset.epicsPath}?start_date=${startDate}&end_date=${endDate}`;
if (filterQueryString) {
epicsPath += `&${filterQueryString}`;
}
const store = new RoadmapStore(parseInt(dataset.groupId, 0), timeframe);
const service = new RoadmapService(epicsPath);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment