Skip to content

Commit 9b4addf

Browse files
author
vikasrohit
authored
Merge pull request #1138 from appirio-tech/feature/misc-changes
Feature/misc changes
2 parents 236a87a + d2e3893 commit 9b4addf

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

src/components/FooterV2/FooterV2.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const FooterV2 = () => (
1212
<li><a href="https://connect.topcoder.com/terms">Terms</a></li>
1313
</ul>
1414
<div className="footer-copyright">
15-
Topcoder © { moment().format('YYYY') }.
15+
© Topcoder { moment().format('YYYY') }
1616
</div>
1717
</div>
1818
)

src/reducers/alerts.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
CREATE_PROJECT_SUCCESS, CREATE_PROJECT_FAILURE,
77
UPDATE_PROJECT_SUCCESS, UPDATE_PROJECT_FAILURE,
88
DELETE_PROJECT_SUCCESS, DELETE_PROJECT_FAILURE,
9+
LOAD_PROJECT_SUCCESS,
910
// Attachments
1011
ADD_PROJECT_ATTACHMENT_SUCCESS, ADD_PROJECT_ATTACHMENT_FAILURE,
1112
UPDATE_PROJECT_ATTACHMENT_SUCCESS, UPDATE_PROJECT_ATTACHMENT_FAILURE,
@@ -20,7 +21,9 @@ import {
2021
SAVE_PROJECT_FEED_FAILURE,
2122
SAVE_PROJECT_FEED_COMMENT_FAILURE,
2223
DELETE_PROJECT_FEED_FAILURE,
23-
DELETE_PROJECT_FEED_COMMENT_FAILURE
24+
DELETE_PROJECT_FEED_COMMENT_FAILURE,
25+
// Project status
26+
PROJECT_STATUS_IN_REVIEW
2427
} from '../config/constants'
2528
/* eslint-enable no-unused-vars */
2629

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

39-
case UPDATE_PROJECT_SUCCESS:
40-
if (action.payload.status === 'in_review') {
42+
case LOAD_PROJECT_SUCCESS:
43+
return Object.assign({}, state, {
44+
project: action.payload
45+
})
46+
47+
case UPDATE_PROJECT_SUCCESS: {
48+
const prevStatus = _.get(state, 'project.status', '')
49+
if (action.payload.status === PROJECT_STATUS_IN_REVIEW
50+
&& prevStatus && prevStatus !== PROJECT_STATUS_IN_REVIEW) {
4151
Alert.success('Project submitted.')
4252
} else {
4353
Alert.success('Project updated.')
4454
}
45-
return state
55+
return Object.assign({}, state, {
56+
project: action.payload
57+
})
58+
}
59+
4660
case REMOVE_PROJECT_MEMBER_SUCCESS:
4761
// show notification message if user leaving a project
4862
if (action.meta.isUserLeaving) {

0 commit comments

Comments
 (0)