Skip to content

Commit 88cb1d5

Browse files
committed
show error popup when some or all users couldn't be invited
1 parent 99fb93b commit 88cb1d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/reducers/alerts.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,12 @@ export default function(state = {}, action) {
142142

143143
case INVITE_TOPCODER_MEMBER_SUCCESS:
144144
case INVITE_CUSTOMER_SUCCESS:
145-
if(action.payload.success.length) {
145+
if(action.payload.success.length && !action.payload.failed) {
146146
Alert.success('You\'ve successfully invited member(s).')
147+
} else if (action.payload.success.length && action.payload.failed) {
148+
Alert.warning('Some members couldn\’t be invited.')
149+
} else if (!action.payload.success.length && action.payload.failed) {
150+
Alert.error('You are unable to invite members successfully.')
147151
}
148152
return state
149153

0 commit comments

Comments
 (0)