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

Commit 6fbd130

Browse files
Merge branch 'develop' into issues/timor/281
2 parents 4ad34be + dae2919 commit 6fbd130

File tree

11 files changed

+66
-82
lines changed

11 files changed

+66
-82
lines changed
Lines changed: 16 additions & 74 deletions
Loading

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: 13 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,13 @@ GroupTabFilters.propTypes = {
116118
onCreateNewGroup: PT.func,
117119
};
118120

119-
function GroupsSection({ title, items, onItemClicked, selectedItemId }) {
121+
function GroupsSection({
122+
title,
123+
items,
124+
onItemClicked,
125+
selectedItemId,
126+
loadingGroups,
127+
}) {
120128
return (
121129
<>
122130
<div className={styles.sectionTitle}>{title}</div>
@@ -135,6 +143,9 @@ function GroupsSection({ title, items, onItemClicked, selectedItemId }) {
135143
);
136144
})}
137145
</div>
146+
{items.length === 0 && !loadingGroups && (
147+
<div className={styles.message}>No results found</div>
148+
)}
138149
</>
139150
);
140151
}
@@ -144,6 +155,7 @@ GroupsSection.propTypes = {
144155
items: PT.array.isRequired,
145156
onItemClicked: PT.func,
146157
selectedIndex: PT.number,
158+
loadingGroups: PT.bool,
147159
};
148160

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

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

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

95
/* Group Tab filters (lett col) styles */
106
.groupTabFilters {
@@ -144,3 +140,8 @@ blue from colors;
144140
.sectionItemChevron {
145141
margin-left: 13px;
146142
}
143+
144+
.message {
145+
color: lightGray2;
146+
font: 400 12pt/1.25 Inter;
147+
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
.logo {
44
display: flex;
55
align-items: center;
6+
7+
img {
8+
width: 80px;
9+
height: auto;
10+
}
611
}
712

813
.accountMenu {

client/src/components/Upload/Initial/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ export default function Initial({ onError, onUpload, templateId }) {
3232
const { data } = await apiClient.get(url);
3333
window.location = data.url;
3434
} catch (error) {
35-
if (onError) onError(error.toJSON());
35+
if (onError) onError(error);
3636
}
3737
};
3838

3939
const upload = (files) => {
4040
const allowedMineTypes = [
4141
"application/vnd.ms-excel",
4242
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
43+
"text/csv",
4344
];
4445
if (files && files[0] && allowedMineTypes.indexOf(files[0].type) !== -1)
4546
onUpload(files[0]);

client/src/components/UserGroup/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default function UserGroup({
2121
.map((group, index) => {
2222
return (
2323
<Pill
24+
className={styles.pillContainer}
2425
key={group.id}
2526
name={group.name}
2627
removable={true}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,11 @@ div.groupContent > button:first-child {
5151
align-items: center;
5252
height: 30px;
5353
}
54+
55+
.pillContainer {
56+
max-width: -webkit-fill-available;
57+
/* Mozilla-based browsers will ignore this. */
58+
max-width: stretch;
59+
max-width: -moz-available;
60+
/* WebKit-based browsers will ignore this. */
61+
}

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);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"@hapi/joi": "^16.1.8",
2323
"aws-sdk": "^2.627.0",
2424
"axios": "^0.19.2",
25-
"clsx": "^1.1.1",
2625
"bluebird": "^3.5.1",
2726
"body-parser": "^1.19.0",
27+
"clsx": "^1.1.1",
2828
"config": "^3.2.4",
2929
"cors": "^2.8.5",
3030
"dynamoose": "^1.8.0",

0 commit comments

Comments
 (0)