feat: Add CSAT response submit action (#2506)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Muhsin Keloth 2021-06-25 12:00:49 +05:30 committed by GitHub
parent 2f9637bde5
commit dbddb1ece4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 103 additions and 29 deletions

View file

@ -44,7 +44,11 @@
<div v-if="isArticle">
<chat-article :items="messageContentAttributes.items"></chat-article>
</div>
<customer-satisfaction v-if="isCSAT" />
<customer-satisfaction
v-if="isCSAT"
:message-content-attributes="messageContentAttributes.submitted_values"
@submit="onCSATSubmit"
/>
</div>
</template>
@ -121,6 +125,17 @@ export default {
messageId: this.messageId,
});
},
onCSATSubmit({ feedback, rating }) {
this.onResponse({
submittedValues: {
csat_survey_response: {
rating,
feedback_text: feedback,
},
},
messageId: this.messageId,
});
},
},
};
</script>