mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
fix: Clicking on contact attributes doesn't do anything if contact attributes list is empty (#9257)
* fix: Clicking on contact attributes doesn't do anything if contact attributes list is empty * Update app/javascript/dashboard/i18n/locale/en/conversation.json Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> * Update app/javascript/dashboard/i18n/locale/en/contact.json Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -48,7 +48,8 @@
|
|||||||
"SIDEBAR_SECTIONS": {
|
"SIDEBAR_SECTIONS": {
|
||||||
"CUSTOM_ATTRIBUTES": "Custom Attributes",
|
"CUSTOM_ATTRIBUTES": "Custom Attributes",
|
||||||
"CONTACT_LABELS": "Contact Labels",
|
"CONTACT_LABELS": "Contact Labels",
|
||||||
"PREVIOUS_CONVERSATIONS": "Previous Conversations"
|
"PREVIOUS_CONVERSATIONS": "Previous Conversations",
|
||||||
|
"NO_RECORDS_FOUND": "No attributes found"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EDIT_CONTACT": {
|
"EDIT_CONTACT": {
|
||||||
|
|||||||
@@ -280,6 +280,7 @@
|
|||||||
},
|
},
|
||||||
"CONVERSATION_CUSTOM_ATTRIBUTES": {
|
"CONVERSATION_CUSTOM_ATTRIBUTES": {
|
||||||
"ADD_BUTTON_TEXT": "Create attribute",
|
"ADD_BUTTON_TEXT": "Create attribute",
|
||||||
|
"NO_RECORDS_FOUND": "No attributes found",
|
||||||
"UPDATE": {
|
"UPDATE": {
|
||||||
"SUCCESS": "Attribute updated successfully",
|
"SUCCESS": "Attribute updated successfully",
|
||||||
"ERROR": "Unable to update attribute. Please try again later"
|
"ERROR": "Unable to update attribute. Please try again later"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="w-1/4 bg-white dark:bg-slate-900 border-slate-50 dark:border-slate-800/50 h-full text-sm overflow-y-auto relative"
|
class="relative w-1/4 h-full overflow-y-auto text-sm bg-white dark:bg-slate-900 border-slate-50 dark:border-slate-800/50"
|
||||||
:class="showAvatar ? 'border-l border-solid ' : 'border-r border-solid'"
|
:class="showAvatar ? 'border-l border-solid ' : 'border-r border-solid'"
|
||||||
>
|
>
|
||||||
<contact-info
|
<contact-info
|
||||||
@@ -40,6 +40,9 @@
|
|||||||
attribute-class="conversation--attribute"
|
attribute-class="conversation--attribute"
|
||||||
attribute-from="contact_panel"
|
attribute-from="contact_panel"
|
||||||
:custom-attributes="contact.custom_attributes"
|
:custom-attributes="contact.custom_attributes"
|
||||||
|
:empty-state-message="
|
||||||
|
$t('CONTACT_PANEL.SIDEBAR_SECTIONS.NO_RECORDS_FOUND')
|
||||||
|
"
|
||||||
class="even"
|
class="even"
|
||||||
/>
|
/>
|
||||||
</accordion-item>
|
</accordion-item>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-300 border-slate-50 dark:border-slate-800/50 border-l rtl:border-l-0 rtl:border-r contact--panel overflow-y-auto"
|
class="overflow-y-auto bg-white border-l dark:bg-slate-900 text-slate-900 dark:text-slate-300 border-slate-50 dark:border-slate-800/50 rtl:border-l-0 rtl:border-r contact--panel"
|
||||||
>
|
>
|
||||||
<contact-info
|
<contact-info
|
||||||
:contact="contact"
|
:contact="contact"
|
||||||
@@ -89,6 +89,9 @@
|
|||||||
class="even"
|
class="even"
|
||||||
attribute-from="conversation_contact_panel"
|
attribute-from="conversation_contact_panel"
|
||||||
:contact-id="contact.id"
|
:contact-id="contact.id"
|
||||||
|
:empty-state-message="
|
||||||
|
$t('CONVERSATION_CUSTOM_ATTRIBUTES.NO_RECORDS_FOUND')
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</accordion-item>
|
</accordion-item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,6 +17,12 @@
|
|||||||
@delete="onDelete"
|
@delete="onDelete"
|
||||||
@copy="onCopy"
|
@copy="onCopy"
|
||||||
/>
|
/>
|
||||||
|
<p
|
||||||
|
v-if="!displayedAttributes.length && emptyStateMessage"
|
||||||
|
class="p-3 text-center"
|
||||||
|
>
|
||||||
|
{{ emptyStateMessage }}
|
||||||
|
</p>
|
||||||
<!-- Show more and show less buttons show it if the filteredAttributes length is greater than 5 -->
|
<!-- Show more and show less buttons show it if the filteredAttributes length is greater than 5 -->
|
||||||
<div v-if="filteredAttributes.length > 5" class="flex px-2 py-2">
|
<div v-if="filteredAttributes.length > 5" class="flex px-2 py-2">
|
||||||
<woot-button
|
<woot-button
|
||||||
@@ -59,6 +65,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
emptyStateMessage: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user