feat: Update agent report filename to use generated date (#2934)

This commit is contained in:
Sanju
2021-09-03 11:58:26 +05:30
committed by GitHub
parent ad83d1bb71
commit a03ed4eea0
3 changed files with 21 additions and 4 deletions

View File

@@ -116,7 +116,8 @@ export default {
},
downloadAgentReports() {
const { from, to } = this;
this.$store.dispatch('downloadAgentReports', { from, to });
const fileName = `agent-report-${format(fromUnixTime(to), 'dd-MM-yyyy')}.csv`;
this.$store.dispatch('downloadAgentReports', { from, to, fileName });
},
changeSelection(index) {
this.currentSelection = index;