feat: Add CSAT response submit action (#2506)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
parent
2f9637bde5
commit
dbddb1ece4
6 changed files with 103 additions and 29 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue