Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 9efd0bd

Browse files
Merge branch 'issue_315' into develop
2 parents 0318b7f + d87e53a commit 9efd0bd

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

client/src/components/AddToGroupModal/index.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ export default function AddToGroupModal({ onCancel, updateUser, user }) {
190190
/>
191191
))}
192192
</div>
193+
{myGroups.filter((g) =>
194+
g.name.toLowerCase().includes(filter.toLowerCase())
195+
).length === 0 &&
196+
!loadingGroups && <div className={style.message}>No results found</div>}
193197
<h3 className={style.subTitle}>
194198
Other Groups{loadingGroups && " (Loading...)"}
195199
</h3>
@@ -206,6 +210,10 @@ export default function AddToGroupModal({ onCancel, updateUser, user }) {
206210
/>
207211
))}
208212
</div>
213+
{otherGroups.filter((g) =>
214+
g.name.toLowerCase().includes(filter.toLowerCase())
215+
).length === 0 &&
216+
!loadingGroups && <div className={style.message}>No results found</div>}
209217
<div className={style.buttons}>
210218
<Button onClick={onCancel} disabled={updatingGroups || creatingGroup}>
211219
Cancel

client/src/components/AddToGroupModal/style.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,8 @@
8484
left: 10px;
8585
top: 10px;
8686
}
87+
88+
.message {
89+
color: $textColor2;
90+
font: 400 12pt/1.25 Inter;
91+
}

client/src/components/GroupsSideMenu/filters.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export default function GroupTabFilters({
9090
)}
9191
onItemClicked={handleGroupItemClicked}
9292
selectedItemId={selectedGroup === "My Groups" ? selectedItemId : -1}
93+
loadingGroups={loadingGroups}
9394
/>
9495
<GroupsSection
9596
title={loadingGroups ? "Other Groups (Loading...)" : "Other Groups"}
@@ -100,6 +101,7 @@ export default function GroupTabFilters({
100101
selectedItemId={
101102
selectedGroup === "Other Groups" ? selectedItemId : -1
102103
}
104+
loadingGroups={loadingGroups}
103105
/>
104106
</div>
105107
</div>
@@ -116,7 +118,7 @@ GroupTabFilters.propTypes = {
116118
onCreateNewGroup: PT.func,
117119
};
118120

119-
function GroupsSection({ title, items, onItemClicked, selectedItemId }) {
121+
function GroupsSection({ title, items, onItemClicked, selectedItemId, loadingGroups }) {
120122
return (
121123
<>
122124
<div className={styles.sectionTitle}>{title}</div>
@@ -135,6 +137,7 @@ function GroupsSection({ title, items, onItemClicked, selectedItemId }) {
135137
);
136138
})}
137139
</div>
140+
{items.length === 0 && !loadingGroups && <div className={styles.message}>No results found</div>}
138141
</>
139142
);
140143
}
@@ -144,6 +147,7 @@ GroupsSection.propTypes = {
144147
items: PT.array.isRequired,
145148
onItemClicked: PT.func,
146149
selectedIndex: PT.number,
150+
loadingGroups: PT.bool,
147151
};
148152

149153
function SectionRow({ title, badge, selected = false, action }) {

client/src/components/GroupsSideMenu/filters.module.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* importing colors */
22
@value colors: "../../styles/colors.module.css";
3-
@value gray1, gray2, gray1_025, white, blue from colors;
3+
@value gray1, gray2, gray1_025, lightGray2, white, blue from colors;
44

55
/* Group Tab filters (lett col) styles */
66
.groupTabFilters {
@@ -140,3 +140,8 @@
140140
.sectionItemChevron {
141141
margin-left: 13px;
142142
}
143+
144+
.message {
145+
color: lightGray2;
146+
font: 400 12pt/1.25 Inter;
147+
}

client/src/styles/colors.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@value green2: #0FE030;
1212
@value lightGray: #EEEEEE;
1313
@value lightGray1: #f6f6f6;
14+
@value lightGray2: #a1a3ad;
1415
@value blue: #00A3FF;
1516
@value lightBlue: #8CD6FF;
1617
@value gray_overlay: rgba(37,37,38, 0.1);

0 commit comments

Comments
 (0)