Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
af3ddea
feat: list artifacts and allow them to be donwload
hentrymartin Feb 26, 2025
76348b1
fix: lint issues
hentrymartin Feb 27, 2025
84228e2
feat: show list of scores in submission list table per submission
hentrymartin Mar 3, 2025
9d544a6
feat: show list of scores in submission list table per submission
hentrymartin Mar 3, 2025
b66b683
fix: lint
hentrymartin Mar 4, 2025
6fc9baa
fix: scss lint
hentrymartin Mar 4, 2025
96b1001
fix: moved some api calls to CA
hentrymartin Mar 4, 2025
87fc1a5
fix: added use callback
hentrymartin Mar 5, 2025
3923c2b
fix: lint
hentrymartin Mar 5, 2025
9b585a2
fix: lint
hentrymartin Mar 5, 2025
8a8bd71
fix: lint
hentrymartin Mar 5, 2025
f3fd00e
fix: reverted package lock json
hentrymartin Mar 5, 2025
8a75b26
fix: reverted package lock json
hentrymartin Mar 5, 2025
4c88849
fix: updated snapshot"
hentrymartin Mar 5, 2025
5abcc07
fix: updated snapshot
hentrymartin Mar 5, 2025
bfa0341
Merge pull request #7076 from topcoder-platform/pm-811
hentrymartin Mar 5, 2025
8a3e044
fix: download artifact
hentrymartin Mar 6, 2025
4ee6b79
Merge pull request #7077 from topcoder-platform/pm-896
hentrymartin Mar 6, 2025
dd9b957
feat: added download artifacts modal to my submissions tab
hentrymartin Mar 14, 2025
42ff22e
fix: styles
hentrymartin Mar 14, 2025
5d683a4
fix: styles
hentrymartin Mar 14, 2025
fe61181
fix: lint in css
hentrymartin Mar 14, 2025
54d9924
Merge pull request #7078 from topcoder-platform/pm-811_1
hentrymartin Mar 14, 2025
c480fd6
fix: download artifacts
hentrymartin Mar 14, 2025
d308a74
Merge pull request #7079 from topcoder-platform/pm-896_1
hentrymartin Mar 14, 2025
e7c4fc9
fix: submission artifact download in submission management screen
hentrymartin Mar 18, 2025
0de5ca8
Merge pull request #7081 from topcoder-platform/pm-896_2
hentrymartin Mar 18, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,74 @@ exports[`Snapshot match 1`] = `
<td
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
>
<div>
<button
onClick={[Function]}
type="button"
/>
<div
className="src-shared-components-SubmissionManagement-Submission-___styles__button-wrapper___3T2jH"
>
<Tooltip
align={Object {}}
className=""
content={[Function]}
defaultVisible={false}
id=""
onTooltipHover={[Function]}
placeArrow={[Function]}
position="top"
suppressDiv={false}
trigger={
Array [
"hover",
]
}
>
<button
onClick={[Function]}
type="button"
/>
</Tooltip>
<Tooltip
align={Object {}}
className=""
content={[Function]}
defaultVisible={false}
id=""
onTooltipHover={[Function]}
placeArrow={[Function]}
position="top"
suppressDiv={false}
trigger={
Array [
"hover",
]
}
>
<button
className="src-shared-components-SubmissionManagement-Submission-___styles__download-artifacts-button___2lSi_"
onClick={[Function]}
type="button"
/>
</Tooltip>
<Tooltip
align={Object {}}
className=""
content={[Function]}
defaultVisible={false}
id=""
onTooltipHover={[Function]}
placeArrow={[Function]}
position="top"
suppressDiv={false}
trigger={
Array [
"hover",
]
}
>
<button
className="src-shared-components-SubmissionManagement-Submission-___styles__download-artifacts-button___2lSi_"
onClick={[Function]}
type="button"
/>
</Tooltip>
<button
className="src-shared-components-SubmissionManagement-Submission-___styles__expand-icon___TDY6Y src-shared-components-SubmissionManagement-Submission-___styles__expanded___8pRX_"
onClick={[Function]}
Expand Down Expand Up @@ -101,11 +164,74 @@ exports[`Snapshot match 2`] = `
<td
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
>
<div>
<button
onClick={[Function]}
type="button"
/>
<div
className="src-shared-components-SubmissionManagement-Submission-___styles__button-wrapper___3T2jH"
>
<Tooltip
align={Object {}}
className=""
content={[Function]}
defaultVisible={false}
id=""
onTooltipHover={[Function]}
placeArrow={[Function]}
position="top"
suppressDiv={false}
trigger={
Array [
"hover",
]
}
>
<button
onClick={[Function]}
type="button"
/>
</Tooltip>
<Tooltip
align={Object {}}
className=""
content={[Function]}
defaultVisible={false}
id=""
onTooltipHover={[Function]}
placeArrow={[Function]}
position="top"
suppressDiv={false}
trigger={
Array [
"hover",
]
}
>
<button
className="src-shared-components-SubmissionManagement-Submission-___styles__download-artifacts-button___2lSi_"
onClick={[Function]}
type="button"
/>
</Tooltip>
<Tooltip
align={Object {}}
className=""
content={[Function]}
defaultVisible={false}
id=""
onTooltipHover={[Function]}
placeArrow={[Function]}
position="top"
suppressDiv={false}
trigger={
Array [
"hover",
]
}
>
<button
className="src-shared-components-SubmissionManagement-Submission-___styles__download-artifacts-button___2lSi_"
onClick={[Function]}
type="button"
/>
</Tooltip>
<button
className="src-shared-components-SubmissionManagement-Submission-___styles__expand-icon___TDY6Y"
onClick={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ exports[`Matches shallow shapshot 1`] = `
<Submission
onDelete={[Function]}
onDownload={[Function]}
onOpenDownloadArtifactsModal={[Function]}
onOpenRatingsListModal={[Function]}
onShowDetails={[Function]}
showScreeningDetails={true}
submissionObject={
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ module.exports = {
groupId: '20000000', communityId: 'wipro', communityName: 'topgear', userProfile: 'https://topgear-app.wipro.com/user-details',
}],
TIMELINE_WALL_API: 'https://api.topcoder-dev.com/v5/timeline-wall',
REVIEW_API_URL: '/reviewTypes',
},

/* Information about Topcoder user groups can be cached in various places.
Expand Down
1 change: 1 addition & 0 deletions config/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
SERVER_API_KEY: '79b2d5eb-c1fd-42c4-9391-6b2c9780d591',
URL: {
USER_SETTINGS: '', /* No dev server is available for saved searches */
REVIEW_API_URL: '/reviewTypes',
},
PLATFORM_SITE_URL: 'https://platform.topcoder-dev.com',
PLATFORMUI_SITE_URL: 'https://platform-ui.topcoder-dev.com',
Expand Down
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = {
EMAIL_VERIFY_URL: 'http://www.topcoder.com/settings/account/changeEmail',
THRIVE_FEED: 'https://topcoder.com/api/feeds/thrive',
TIMELINE_WALL_API: 'https://api.topcoder.com/v5/timeline-wall',
REVIEW_API_URL: '/reviewTypes',
},
/* Filestack configuration for uploading Submissions
* These are for the production back end */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class ApplyModal extends React.Component {
onChange={() => toggleRole(position.roleId)}
type="checkbox"
/>
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
<label htmlFor={`${position.roleId}-checkbox`}>
<input type="hidden" />
<div styleName="tc-checkbox-label" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/**
* Modal Component for Image Decorators
*/
import _ from 'lodash';
import PT from 'prop-types';
import React, { useEffect, useState } from 'react';

import { Modal, PrimaryButton } from 'topcoder-react-ui-kit';
import tc from 'components/buttons/themed/tc.scss';

import LoadingIndicator from 'components/LoadingIndicator';
import IconClose from 'assets/images/icon-close-green.svg';
import DownloadIcon from '../Icons/IconSquareDownload.svg';
import style from './style.scss';

const theme = {
container: style.modalContainer,
overlay: style.modalOverlay,
};

const buttonThemes = {
tc,
};

export default function DownloadArtifactsModal({
submissionId,
onCancel,
getSubmissionArtifacts,
onDownloadArtifacts,
}) {
const [artifacts, setArtifacts] = useState([]);
const [loading, setLoading] = useState(false);

const getArtifacts = async () => {
const { artifacts: resp } = await getSubmissionArtifacts(submissionId);
setArtifacts(resp);
setLoading(false);
};

useEffect(() => {
setLoading(true);
getArtifacts();
}, [submissionId]);

return (
<div className={style.container}>
<Modal
onCancel={() => onCancel()}
theme={theme}
>
<div className={style['content-wrapper']}>
<div className={style['modal-header']}>
<h2 className={style['modal-title']}>Artifacts</h2>
<div className={style.icon} role="presentation" onClick={() => onCancel()}>
<IconClose />
</div>
</div>
<hr className={style.hr} />
<div className={style['artifacts-list']}>
<div className={style.header}>
<div className={style['header-title']}>Artifact ID</div>
<div>Action</div>
</div>
{
!loading && artifacts.map(item => (
<div className={style['list-item']}>
<div className={style['artifact-name']}>{item}</div>
<button
onClick={() => onDownloadArtifacts(submissionId, item)}
type="button"
className={style['icon-download']}
>
<DownloadIcon />
</button>
</div>
))
}

{
!loading && artifacts.length === 0 && <div className={style['no-artifacts']}>No artifacts found</div>
}
</div>
{loading && <LoadingIndicator />}
</div>
<div className={style['buttons-container']}>
<PrimaryButton
onClick={() => onCancel()}
theme={{
button: buttonThemes.tc['primary-green-md'],
}}
>
Close
</PrimaryButton>
</div>
</Modal>
</div>
);
}

DownloadArtifactsModal.defaultProps = {
onCancel: _.noop,
submissionId: '',
getSubmissionArtifacts: _.noop,
onDownloadArtifacts: _.noop,
};

DownloadArtifactsModal.propTypes = {
onCancel: PT.func,
submissionId: PT.string,
getSubmissionArtifacts: PT.func,
onDownloadArtifacts: PT.func,
};
Loading