diff --git a/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx b/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx index 70bfc5b5d..8bf185756 100644 --- a/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx +++ b/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx @@ -62,10 +62,7 @@ function ChatConversationListComponent({ conversationList, selectedConversation, const renderConversation = (index, t) => { const item = sortedConversationList[index]; const normalizedPhone = phone(item.phone_num, "CA").phoneNumber.replace(/^\+1/, ""); - // Check if the phone number exists in the consentMap const hasOptOutEntry = optOutMap.has(normalizedPhone); - // Only consider it non-consented if it exists and consent_status is false - const isOptedOut = hasOptOutEntry ? optOutMap.get(normalizedPhone) : true; const cardContentRight = {item.updated_at}; const cardContentLeft = @@ -91,7 +88,7 @@ function ChatConversationListComponent({ conversationList, selectedConversation, const cardExtra = ( <> - {hasOptOutEntry && !isOptedOut && {t("messaging.labels.no_consent")}} + {hasOptOutEntry && {t("messaging.labels.no_consent")}} ); diff --git a/client/src/components/phone-number-consent/phone-number-consent.component.jsx b/client/src/components/phone-number-consent/phone-number-consent.component.jsx index fa0f810c0..020bb1750 100644 --- a/client/src/components/phone-number-consent/phone-number-consent.component.jsx +++ b/client/src/components/phone-number-consent/phone-number-consent.component.jsx @@ -39,9 +39,10 @@ function PhoneNumberConsentList({ bodyshop, currentUser }) { sorter: (a, b) => a.phone_number.localeCompare(b.phone_number) }, { - title: t("consent.updated_at"), - dataIndex: "consent_updated_at", - render: (text) => {text} + title: t("consent.created_at"), + dataIndex: "created_at", + render: (text) => {text}, + sorter: (a, b) => new Date(a.created_at) - new Date(b.created_at) } ]; @@ -55,7 +56,7 @@ function PhoneNumberConsentList({ bodyshop, currentUser }) {