Files
libredesk/frontend/shared-ui/utils/csat.js
T
Abhinav Raut eb6a195aaf feat: add conversation transcript download and CSAT in sidebar
Agents can download a full conversation as a .txt file from the
header menu. The conversation sidebar now shows the CSAT rating and
feedback once the customer responds.
2026-06-02 16:25:33 +05:30

17 lines
416 B
JavaScript

const RATING_EMOJI = { 1: '😢', 2: '😕', 3: '😊', 4: '😃', 5: '🤩' }
const RATING_TEXT_KEY = {
1: 'globals.terms.poor',
2: 'globals.terms.fair',
3: 'globals.terms.good',
4: 'globals.terms.great',
5: 'globals.terms.excellent'
}
export function csatRatingEmoji (rating) {
return RATING_EMOJI[rating] || ''
}
export function csatRatingTextKey (rating) {
return RATING_TEXT_KEY[rating] || ''
}