From a5fda8e11876e55eac283d3976017dc82fdf2649 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Mon, 2 Jun 2025 14:08:01 +0530 Subject: [PATCH] fix: Style issue with CSAT reports table (#11653) --- .../components/widgets/UserAvatarWithName.vue | 5 +--- .../settings/reports/components/CsatTable.vue | 23 +++++++++++++------ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/app/javascript/dashboard/components/widgets/UserAvatarWithName.vue b/app/javascript/dashboard/components/widgets/UserAvatarWithName.vue index 1e78c334d..f91f96711 100644 --- a/app/javascript/dashboard/components/widgets/UserAvatarWithName.vue +++ b/app/javascript/dashboard/components/widgets/UserAvatarWithName.vue @@ -25,10 +25,7 @@ defineProps({ :username="user.name" :status="user.availability_status" /> - + {{ user.name }} diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue index b66ec20f6..8beeafd70 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue @@ -47,14 +47,17 @@ const tableData = computed(() => { })); }); -const defaulSpanRender = cellProps => - h( +const defaultSpanRender = cellProps => { + const value = cellProps.getValue() || '---'; + return h( 'span', { - class: cellProps.getValue() ? '' : 'text-slate-300 dark:text-slate-700', + class: 'line-clamp-5 break-words max-w-full text-n-slate-12', + title: value, }, - cellProps.getValue() ? cellProps.getValue() : '---' + value ); +}; const columnHelper = createColumnHelper(); @@ -65,7 +68,10 @@ const columns = [ cell: cellProps => { const { contact } = cellProps.row.original; if (contact) { - return h(UserAvatarWithName, { user: contact }); + return h(UserAvatarWithName, { + user: contact, + class: 'max-w-[200px] overflow-hidden', + }); } return '--'; }, @@ -76,7 +82,10 @@ const columns = [ cell: cellProps => { const { assignedAgent } = cellProps.row.original; if (assignedAgent) { - return h(UserAvatarWithName, { user: assignedAgent }); + return h(UserAvatarWithName, { + user: assignedAgent, + class: 'max-w-[200px] overflow-hidden', + }); } return '--'; }, @@ -105,7 +114,7 @@ const columns = [ columnHelper.accessor('feedbackText', { header: t('CSAT_REPORTS.TABLE.HEADER.FEEDBACK_TEXT'), width: 400, - cell: defaulSpanRender, + cell: defaultSpanRender, }), columnHelper.accessor('conversationId', { header: '',