Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/FooterV2/FooterV2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const FooterV2 = () => (
<li><a href="https://connect.topcoder.com/terms">Terms</a></li>
</ul>
<div className="footer-copyright">
Topcoder © { moment().format('YYYY') }.
© Topcoder { moment().format('YYYY') }
</div>
</div>
)
Expand Down
22 changes: 18 additions & 4 deletions src/reducers/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
CREATE_PROJECT_SUCCESS, CREATE_PROJECT_FAILURE,
UPDATE_PROJECT_SUCCESS, UPDATE_PROJECT_FAILURE,
DELETE_PROJECT_SUCCESS, DELETE_PROJECT_FAILURE,
LOAD_PROJECT_SUCCESS,
// Attachments
ADD_PROJECT_ATTACHMENT_SUCCESS, ADD_PROJECT_ATTACHMENT_FAILURE,
UPDATE_PROJECT_ATTACHMENT_SUCCESS, UPDATE_PROJECT_ATTACHMENT_FAILURE,
Expand All @@ -20,7 +21,9 @@ import {
SAVE_PROJECT_FEED_FAILURE,
SAVE_PROJECT_FEED_COMMENT_FAILURE,
DELETE_PROJECT_FEED_FAILURE,
DELETE_PROJECT_FEED_COMMENT_FAILURE
DELETE_PROJECT_FEED_COMMENT_FAILURE,
// Project status
PROJECT_STATUS_IN_REVIEW
} from '../config/constants'
/* eslint-enable no-unused-vars */

Expand All @@ -36,13 +39,24 @@ export default function(state = {}, action) {
Alert.success('Project deleted.')
return state

case UPDATE_PROJECT_SUCCESS:
if (action.payload.status === 'in_review') {
case LOAD_PROJECT_SUCCESS:
return Object.assign({}, state, {
project: action.payload
})

case UPDATE_PROJECT_SUCCESS: {
const prevStatus = _.get(state, 'project.status', '')
if (action.payload.status === PROJECT_STATUS_IN_REVIEW
&& prevStatus && prevStatus !== PROJECT_STATUS_IN_REVIEW) {
Alert.success('Project submitted.')
} else {
Alert.success('Project updated.')
}
return state
return Object.assign({}, state, {
project: action.payload
})
}

case REMOVE_PROJECT_MEMBER_SUCCESS:
// show notification message if user leaving a project
if (action.meta.isUserLeaving) {
Expand Down