Skip to content

Commit bf96af0

Browse files
authored
Merge pull request #1609 from topcoder-platform/PM-690_asset-library-management
PM-690 - assets library management
2 parents 158140b + cfe0b83 commit bf96af0

File tree

133 files changed

+3865
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+3865
-134
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ workflows:
152152
context: org-global
153153
filters: &filters-dev
154154
branches:
155-
only: ["develop", "multiround", "release_0.20.9", "metadata-fix"]
155+
only: ["develop", "PM-803_wm-regression-fixes"]
156156

157157
# Production builds are exectuted only on tagged commits to the
158158
# master branch.

config/constants/development.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ module.exports = {
4444
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c', 'ecd58c69-238f-43a4-a4bb-d172719b9f31', '78b37a69-92d5-4ad7-bf85-c79b65420c79', '929bc408-9cf2-4b3e-ba71-adfbf693046c'],
4545
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
4646
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-dev',
47+
FILE_PICKER_SUBMISSION_CONTAINER_NAME: process.env.FILE_PICKER_SUBMISSION_CONTAINER_NAME || 'submission-staging-dev',
4748
FILE_PICKER_REGION: 'us-east-1',
4849
FILE_PICKER_CNAME: 'fs.topcoder.com',
50+
FILE_PICKER_LOCATION: 's3',
4951
// if idle for this many minutes, show user a prompt saying they'll be logged out
5052
IDLE_TIMEOUT_MINUTES: 10,
5153
// duration to show the prompt saying user will be logged out, before actually logging out the user
@@ -57,5 +59,6 @@ module.exports = {
5759
SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`,
5860
UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`,
5961
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://c.cs18.visual.force.com/apex/baredirect?id=',
60-
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8'
62+
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8',
63+
PROFILE_URL: 'https://profiles.topcoder-dev.com/'
6164
}

config/constants/production.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ module.exports = {
4343
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c', 'ecd58c69-238f-43a4-a4bb-d172719b9f31', '78b37a69-92d5-4ad7-bf85-c79b65420c79', '929bc408-9cf2-4b3e-ba71-adfbf693046c'],
4444
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
4545
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-prod',
46+
FILE_PICKER_SUBMISSION_CONTAINER_NAME: process.env.FILE_PICKER_SUBMISSION_CONTAINER_NAME || 'submission-staging-prod',
4647
FILE_PICKER_REGION: 'us-east-1',
4748
FILE_PICKER_CNAME: 'fs.topcoder.com',
49+
FILE_PICKER_LOCATION: 's3',
4850
IDLE_TIMEOUT_MINUTES: 10,
4951
IDLE_TIMEOUT_GRACE_MINUTES: 5,
5052
MULTI_ROUND_CHALLENGE_TEMPLATE_ID: 'd4201ca4-8437-4d63-9957-3f7708184b07',
@@ -54,5 +56,6 @@ module.exports = {
5456
SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`,
5557
UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`,
5658
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://topcoder.my.salesforce.com/apex/baredirect?id=',
57-
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8'
59+
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8',
60+
PROFILE_URL: 'https://profiles.topcoder.com/'
5861
}

package-lock.json

Lines changed: 134 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@fortawesome/fontawesome-svg-core": "^1.2.14",
88
"@fortawesome/free-solid-svg-icons": "^5.7.1",
99
"@fortawesome/react-fontawesome": "^0.1.4",
10+
"@hookform/resolvers": "^3.10.0",
1011
"@nateradebaugh/react-datetime": "^4.4.11",
1112
"@popperjs/core": "^2.5.4",
1213
"@svgr/webpack": "2.4.1",

src/actions/projects.js

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import {
99
LOAD_PROJECT_BILLING_ACCOUNTS,
1010
UPDATE_PROJECT_PENDING,
1111
UPDATE_PROJECT_SUCCESS,
12-
UPDATE_PROJECT_FAILURE
12+
UPDATE_PROJECT_FAILURE,
13+
ADD_PROJECT_ATTACHMENT_SUCCESS,
14+
UPDATE_PROJECT_ATTACHMENT_SUCCESS,
15+
REMOVE_PROJECT_ATTACHMENT_SUCCESS
1316
} from '../config/constants'
1417
import {
1518
fetchProjectById,
@@ -84,6 +87,45 @@ export function createProject (project) {
8487
}
8588
}
8689

90+
/**
91+
* Add attachment to project
92+
* @param {Object} newAttachment new attachment data
93+
*/
94+
export function addAttachment (newAttachment) {
95+
return (dispatch) => {
96+
return dispatch({
97+
type: ADD_PROJECT_ATTACHMENT_SUCCESS,
98+
payload: newAttachment
99+
})
100+
}
101+
}
102+
103+
/**
104+
* Update project attachment
105+
* @param {Object} newAttachment new attachment data
106+
*/
107+
export function updateAttachment (newAttachment) {
108+
return (dispatch) => {
109+
return dispatch({
110+
type: UPDATE_PROJECT_ATTACHMENT_SUCCESS,
111+
payload: newAttachment
112+
})
113+
}
114+
}
115+
116+
/**
117+
* Remove project attachment
118+
* @param {number} attachmentId attachment id
119+
*/
120+
export function removeAttachment (attachmentId) {
121+
return (dispatch) => {
122+
return dispatch({
123+
type: REMOVE_PROJECT_ATTACHMENT_SUCCESS,
124+
payload: attachmentId
125+
})
126+
}
127+
}
128+
87129
/**
88130
* Only loads project details
89131
* @param {String} projectId Id of the project

0 commit comments

Comments
 (0)