From caa45d1d923fcd0bc922dfeaa79afc50c996f774 Mon Sep 17 00:00:00 2001 From: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Date: Wed, 7 Dec 2022 12:02:27 -0800 Subject: [PATCH] feat: Pass logged in agent context to dashboard app (#6034) Co-authored-by: Pranav Raj S --- .../dashboard/components/widgets/DashboardApp/Frame.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/javascript/dashboard/components/widgets/DashboardApp/Frame.vue b/app/javascript/dashboard/components/widgets/DashboardApp/Frame.vue index 03b1f5d5e..c1db1ad4d 100644 --- a/app/javascript/dashboard/components/widgets/DashboardApp/Frame.vue +++ b/app/javascript/dashboard/components/widgets/DashboardApp/Frame.vue @@ -46,11 +46,16 @@ export default { return { conversation: this.currentChat, contact: this.$store.getters['contacts/getContact'](this.contactId), + currentAgent: this.currentAgent, }; }, contactId() { return this.currentChat?.meta?.sender?.id; }, + currentAgent() { + const { id, name, email } = this.$store.getters.getCurrentUser; + return { id, name, email }; + }, }, mounted() {