Skip to content

Commit

Permalink
Merge pull request #1609 from topcoder-platform/PM-690_asset-library-…
Browse files Browse the repository at this point in the history
…management

PM-690 - assets library management
  • Loading branch information
vas3a authored Feb 25, 2025
2 parents 158140b + cfe0b83 commit bf96af0
Show file tree
Hide file tree
Showing 133 changed files with 3,865 additions and 134 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ workflows:
context: org-global
filters: &filters-dev
branches:
only: ["develop", "multiround", "release_0.20.9", "metadata-fix"]
only: ["develop", "PM-803_wm-regression-fixes"]

# Production builds are exectuted only on tagged commits to the
# master branch.
Expand Down
5 changes: 4 additions & 1 deletion config/constants/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ module.exports = {
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'],
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-dev',
FILE_PICKER_SUBMISSION_CONTAINER_NAME: process.env.FILE_PICKER_SUBMISSION_CONTAINER_NAME || 'submission-staging-dev',
FILE_PICKER_REGION: 'us-east-1',
FILE_PICKER_CNAME: 'fs.topcoder.com',
FILE_PICKER_LOCATION: 's3',
// if idle for this many minutes, show user a prompt saying they'll be logged out
IDLE_TIMEOUT_MINUTES: 10,
// duration to show the prompt saying user will be logged out, before actually logging out the user
Expand All @@ -57,5 +59,6 @@ module.exports = {
SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`,
UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`,
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://c.cs18.visual.force.com/apex/baredirect?id=',
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8'
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8',
PROFILE_URL: 'https://profiles.topcoder-dev.com/'
}
5 changes: 4 additions & 1 deletion config/constants/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ module.exports = {
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'],
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-prod',
FILE_PICKER_SUBMISSION_CONTAINER_NAME: process.env.FILE_PICKER_SUBMISSION_CONTAINER_NAME || 'submission-staging-prod',
FILE_PICKER_REGION: 'us-east-1',
FILE_PICKER_CNAME: 'fs.topcoder.com',
FILE_PICKER_LOCATION: 's3',
IDLE_TIMEOUT_MINUTES: 10,
IDLE_TIMEOUT_GRACE_MINUTES: 5,
MULTI_ROUND_CHALLENGE_TEMPLATE_ID: 'd4201ca4-8437-4d63-9957-3f7708184b07',
Expand All @@ -54,5 +56,6 @@ module.exports = {
SKILLS_V5_API_URL: `${API_V5}/standardized-skills/skills/autocomplete`,
UPDATE_SKILLS_V5_API_URL: `${API_V5}/standardized-skills/challenge-skills`,
SALESFORCE_BILLING_ACCOUNT_LINK: 'https://topcoder.my.salesforce.com/apex/baredirect?id=',
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8'
TYPEFORM_URL: 'https://topcoder.typeform.com/to/YJ7AL4p8',
PROFILE_URL: 'https://profiles.topcoder.com/'
}
134 changes: 134 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@fortawesome/fontawesome-svg-core": "^1.2.14",
"@fortawesome/free-solid-svg-icons": "^5.7.1",
"@fortawesome/react-fontawesome": "^0.1.4",
"@hookform/resolvers": "^3.10.0",
"@nateradebaugh/react-datetime": "^4.4.11",
"@popperjs/core": "^2.5.4",
"@svgr/webpack": "2.4.1",
Expand Down
44 changes: 43 additions & 1 deletion src/actions/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import {
LOAD_PROJECT_BILLING_ACCOUNTS,
UPDATE_PROJECT_PENDING,
UPDATE_PROJECT_SUCCESS,
UPDATE_PROJECT_FAILURE
UPDATE_PROJECT_FAILURE,
ADD_PROJECT_ATTACHMENT_SUCCESS,
UPDATE_PROJECT_ATTACHMENT_SUCCESS,
REMOVE_PROJECT_ATTACHMENT_SUCCESS
} from '../config/constants'
import {
fetchProjectById,
Expand Down Expand Up @@ -84,6 +87,45 @@ export function createProject (project) {
}
}

/**
* Add attachment to project
* @param {Object} newAttachment new attachment data
*/
export function addAttachment (newAttachment) {
return (dispatch) => {
return dispatch({
type: ADD_PROJECT_ATTACHMENT_SUCCESS,
payload: newAttachment
})
}
}

/**
* Update project attachment
* @param {Object} newAttachment new attachment data
*/
export function updateAttachment (newAttachment) {
return (dispatch) => {
return dispatch({
type: UPDATE_PROJECT_ATTACHMENT_SUCCESS,
payload: newAttachment
})
}
}

/**
* Remove project attachment
* @param {number} attachmentId attachment id
*/
export function removeAttachment (attachmentId) {
return (dispatch) => {
return dispatch({
type: REMOVE_PROJECT_ATTACHMENT_SUCCESS,
payload: attachmentId
})
}
}

/**
* Only loads project details
* @param {String} projectId Id of the project
Expand Down
Loading

0 comments on commit bf96af0

Please sign in to comment.