feat: Add business hours in downloadable reports (#4674)

Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
This commit is contained in:
Pranav Raj S
2022-05-27 09:26:59 +05:30
committed by GitHub
parent dceeb57a1d
commit 52fad886b8
13 changed files with 138 additions and 67 deletions

View File

@@ -251,7 +251,7 @@ export default {
});
},
downloadReports() {
const { from, to, type } = this;
const { from, to, type, businessHours } = this;
const dispatchMethods = {
agent: 'downloadAgentReports',
label: 'downloadLabelReports',
@@ -259,8 +259,8 @@ export default {
team: 'downloadTeamReports',
};
if (dispatchMethods[type]) {
const fileName = generateFileName({ type, to });
const params = { from, to, fileName };
const fileName = generateFileName({ type, to, businessHours });
const params = { from, to, fileName, businessHours };
this.$store.dispatch(dispatchMethods[type], params);
}
},