Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
testing-fetch-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MuzafferDede committed Jul 29, 2020
1 parent 00e7c62 commit d8349ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/js/card.js

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions resources/js/components/FilterableValueMetric.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ export default {
extends: ValueMetric,
components: {
BaseValueMetric
BaseValueMetric,
},
data: () => ({
selectedFilters: {
type: Object
}
type: Object,
},
}),
methods: {
Expand All @@ -44,6 +44,8 @@ export default {
} else {
this.selectedFilters[payload.filter.class] = payload.selected;
}
this.fetch();
},
fetch() {
Expand All @@ -59,9 +61,9 @@ export default {
suffix,
suffixInflection,
format,
zeroResult
}
}
zeroResult,
},
},
}) => {
this.value = value;
this.format = format || this.format;
Expand All @@ -78,22 +80,22 @@ export default {
filterPayload() {
const payload = {
params: {
timezone: this.userTimezone
}
timezone: this.userTimezone,
},
};
if (this.hasRanges) {
payload.params.range = this.selectedRangeKey;
}
this.card.filters.forEach(filter => {
this.card.filters.forEach((filter) => {
if (typeof this.selectedFilters[filter.class] !== "undefined") {
payload.params[filter.class] = this.selectedFilters[filter.class];
}
});
return payload;
}
}
},
},
};
</script>

0 comments on commit d8349ca

Please sign in to comment.