Skip to content

Commit 2c51fb4

Browse files
committed
fixed styling & bus in searchbar
1 parent 6a0a04e commit 2c51fb4

File tree

3 files changed

+8
-44
lines changed

3 files changed

+8
-44
lines changed

src/Pages/Executive/CustomerSupportChat.jsx

+3-11
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ const CustomerSupportChat = ({socket}) => {
8383
handleSendMessage();
8484
}
8585
};
86+
8687
useEffect(()=>{
8788
console.log({selectedConversation})
8889
}, [selectedConversation])
@@ -162,18 +163,9 @@ const CustomerSupportChat = ({socket}) => {
162163

163164
// Function to filter conversations based on search term and status filters
164165
const filteredConversations = OriginalListOfConvos.filter((conversation) => {
165-
const hasSearchTerm = conversation._id.toString().includes(searchTerm);
166-
// const isFiltered =
167-
// (statusFilters.ongoing && conversation.status === "ongoing") ||
168-
// (statusFilters.waiting && conversation.status === "waiting") ||
169-
// (statusFilters.closed && conversation.status === "closed");
170-
166+
const hasSearchTerm = conversation._id.toString().toLowerCase().includes(searchTerm.toLowerCase());
171167
return (
172168
hasSearchTerm
173-
// (isFiltered ||
174-
// (!statusFilters.ongoing &&
175-
// !statusFilters.waiting &&
176-
// !statusFilters.closed))
177169
);
178170
});
179171

@@ -312,7 +304,7 @@ const CustomerSupportChat = ({socket}) => {
312304
<div className="conversation-box">
313305
<ul className="conversation-list">
314306
{convos.length===0?<p>No chats found</p> :
315-
convos.length > 0 && convos.map((conversation, i) => (
307+
convos.length > 0 && convos.map /*&& filteredConversations.map*/ ((conversation, i) => (
316308
<div
317309
key={conversation._id}
318310
className={`conversation-item ${

src/Pages/Executive/customer-support-chat.css

+5-32
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/* customer-support-chat.css */
2-
/* body {
3-
margin: 0;
4-
font-family: Arial, sans-serif;
5-
} */
61

72
.chat-container{
83
display: flex;
@@ -97,9 +92,13 @@ border-radius: 10px;
9792

9893
/* no data found */
9994
.conversation-list p{
95+
height: 73.5vh;
10096
font-size: 16px;
10197
color: #667781;
10298
font-family: inherit;
99+
display: flex;
100+
justify-content: center;
101+
align-items: center;
103102
}
104103

105104

@@ -132,36 +131,13 @@ border-radius: 10px;
132131

133132
.status-filter input{
134133
margin-right: 5px;
135-
appearance: none;
136-
-webkit-appearance: none;
137-
-moz-appearance: none;
138-
width: 13px;
139-
height: 13px;
140-
border: 2px solid #f8f8fd; /* Checkbox border color */
141-
border-radius: 2px;
142-
outline: none;
143-
transition: background-color 0.3s, border-color 0.3s;
144-
145-
}
146-
147-
.status-filter input:checked{
148-
background-color: #eb1818; /* Checked background color */
149-
border-color: #eb1818; /* Checked border color */
150-
}
151-
152-
.conversation-item:hover:not(.selected){
153-
background-color: #f5f5f5;
134+
cursor: pointer;
154135
}
155136

156137
.selected{
157138
background-color: rgb(212, 212, 212);
158139
}
159140

160-
161-
162-
163-
164-
165141
/* Right Column */
166142
.Rightcol{
167143
width: 73%;
@@ -208,14 +184,11 @@ padding: 8px;
208184

209185

210186
.message-container {
211-
/* border: 1px solid #ccc; */
212-
/* min-height: 300px; */
213187
padding: 20px 40px;
214188
height: 80vh;
215189
overflow-y: scroll;
216190
background: #dcdaf8;
217191
background: #e6dddd;
218-
/* background-color: #c2b8b8; */
219192
}
220193

221194
.message-item {

src/assets/morevert.svg

-1
This file was deleted.

0 commit comments

Comments
 (0)