Skip to content

Commit 7d31b5c

Browse files
committed
improvement(new-submission-upload): f2f part 3 manage submissions
1 parent 63f6fbc commit 7d31b5c

File tree

11 files changed

+376
-232
lines changed

11 files changed

+376
-232
lines changed
Lines changed: 2 additions & 6 deletions
Loading
Lines changed: 3 additions & 6 deletions
Loading
Lines changed: 2 additions & 9 deletions
Loading

src/shared/components/SubmissionManagement/ScreeningDetails/index.jsx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,31 +87,29 @@ export default function ScreeningDetails(props) {
8787
{setStatusInfo().title}
8888
</p>
8989
{/*
90-
NOTE: TonyJ asked to remove the OR links from the page to keep
91-
users within the new Topcoder site as much as we can. Not wiping
92-
out the code just in case we decide to bring it back later.
93-
<a href={onlineReviewUrl} styleName="online-review-link">
94-
Online Review
95-
</a>
96-
*/}
90+
NOTE: TonyJ asked to remove the OR links from the page to keep
91+
users within the new Topcoder site as much as we can. Not wiping
92+
out the code just in case we decide to bring it back later.
93+
<a href={onlineReviewUrl} styleName="online-review-link">
94+
Online Review
95+
</a>
96+
*/}
9797
</div>
9898
<p>
9999
{setStatusInfo().message}
100+
<a href={helpPageUrl} styleName="help-link">
101+
{' '}Need help?
102+
</a>
100103
</p>
101104
<div styleName="screening-warning">
102105
{warnings}
103106
{((hasStatusFailed) || (hasStatusPassed && hasWarnings))
104-
&& (
105-
<p styleName="more-info">
106-
Need more info on how to pass screening?
107-
Go to help to read Rules & Policies.
108-
</p>
109-
)}
110-
<div styleName="help-btn">
111-
<a href={helpPageUrl} styleName="help-link" className="tc-btn-default">
112-
Help
113-
</a>
114-
</div>
107+
&& (
108+
<p styleName="more-info">
109+
Need more info on how to pass screening?
110+
Go to help to read Rules & Policies.
111+
</p>
112+
)}
115113
</div>
116114
</div>
117115
);

src/shared/components/SubmissionManagement/ScreeningDetails/styles.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ $red-color: $tc-red;
1212
}
1313

1414
.screening-details {
15-
background: $tc-gray-neutral-light;
16-
font-weight: 400;
17-
font-size: 15px;
18-
color: $gray-color;
15+
font-weight: 500;
16+
font-size: 14px;
17+
color: $tc-black;
1918
letter-spacing: 0;
20-
line-height: $status-space-25;
19+
line-height: 22px;
2120

2221
.screening-details-head {
2322
display: flex;
@@ -83,6 +82,7 @@ $red-color: $tc-red;
8382
}
8483

8584
.help-link {
86-
padding: 1px 6px;
85+
color: $tc-dark-blue-110;
86+
cursor: pointer;
8787
}
8888
}

src/shared/components/SubmissionManagement/Submission/index.jsx

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,33 @@ export default function Submission(props) {
4343
return (
4444
<tr styleName="submission-row">
4545
<td styleName="id-col">
46+
<span styleName="mobile-header">ID</span>
4647
{submissionObject.id}
47-
<div styleName="legacy-id">{submissionObject.legacySubmissionId}</div>
48+
{/* <div styleName="legacy-id">{submissionObject.legacySubmissionId}</div> */}
4849
</td>
49-
<td>
50+
<td styleName="type-col">
51+
<span styleName="mobile-header">TYPE</span>
5052
{submissionObject.type}
5153
</td>
5254
<td styleName="date-col">
55+
<span styleName="mobile-header">Submission Date</span>
5356
{formatDate(submissionObject.created)}
5457
</td>
5558
{
56-
track === COMPETITION_TRACKS.DES && (
57-
<td styleName="status-col">
58-
{safeForDownloadCheck !== true ? safeForDownloadCheck : submissionObject.screening
59-
&& (
60-
<ScreeningStatus
61-
screeningObject={submissionObject.screening}
62-
onShowDetails={onShowDetails}
63-
submissionId={submissionObject.id}
64-
/>
65-
)}
66-
</td>
67-
)
68-
}
59+
track === COMPETITION_TRACKS.DES && (
60+
<td styleName="status-col">
61+
<span styleName="mobile-header">Screening Status</span>
62+
{safeForDownloadCheck !== true ? safeForDownloadCheck : submissionObject.screening
63+
&& (
64+
<ScreeningStatus
65+
screeningObject={submissionObject.screening}
66+
onShowDetails={onShowDetails}
67+
submissionId={submissionObject.id}
68+
/>
69+
)}
70+
</td>
71+
)
72+
}
6973
<td styleName="action-col">
7074
<div>
7175
<button
@@ -75,28 +79,28 @@ export default function Submission(props) {
7579
{ safeForDownloadCheck === true && <DownloadIcon /> }
7680
</button>
7781
{ /*
78-
TODO: At the moment we just fetch downloads from the legacy
79-
Topcoder Studio API, and we don't need any JS code to this.
80-
It may change soon, as we move to the new TC API for
81-
downloads. Then we'll use this commented out code or
82-
remove it for good.
83-
<button
84-
onClick={() => onDownload(submissionObject.id)}
85-
><DownloadIcon /></button>
86-
*/ }
82+
TODO: At the moment we just fetch downloads from the legacy
83+
Topcoder Studio API, and we don't need any JS code to this.
84+
It may change soon, as we move to the new TC API for
85+
downloads. Then we'll use this commented out code or
86+
remove it for good.
87+
<button
88+
onClick={() => onDownload(submissionObject.id)}
89+
><DownloadIcon /></button>
90+
*/ }
8791
{status !== CHALLENGE_STATUS.COMPLETED
88-
&& track !== COMPETITION_TRACKS.DES
89-
&& (
90-
<button
91-
styleName="delete-icon"
92-
onClick={() => onDelete(submissionObject.id)}
93-
disabled={!allowDelete}
94-
type="button"
95-
>
96-
<DeleteIcon />
97-
</button>
98-
)
99-
}
92+
&& track !== COMPETITION_TRACKS.DES
93+
&& (
94+
<button
95+
styleName="delete-icon"
96+
onClick={() => onDelete(submissionObject.id)}
97+
disabled={!allowDelete}
98+
type="button"
99+
>
100+
<DeleteIcon />
101+
</button>
102+
)
103+
}
100104
<button
101105
styleName={`expand-icon ${(showScreeningDetails ? 'expanded' : '')}`}
102106
onClick={() => onShowDetails(submissionObject.id)}

src/shared/components/SubmissionManagement/Submission/styles.scss

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,27 @@ $submission-space-50: $base-unit * 10;
1818

1919
td {
2020
vertical-align: middle;
21-
padding: $submission-space-20;
21+
padding: 16px;
2222
background: $tc-white;
2323
border-top: 1px solid $tc-gray-10;
24+
color: $tc-black;
25+
font-weight: 500;
26+
font-size: 14px;
27+
line-height: 22px;
28+
29+
.mobile-header {
30+
display: none;
31+
32+
@include xs-to-md {
33+
display: block;
34+
color: #767676;
35+
font-size: 11px;
36+
line-height: 14px;
37+
text-transform: uppercase;
38+
text-align: left;
39+
justify-content: flex-start;
40+
}
41+
}
2442

2543
@include xs-to-lg {
2644
padding: $submission-space-10;
@@ -38,7 +56,11 @@ $submission-space-50: $base-unit * 10;
3856
}
3957

4058
&.dev-details {
41-
padding-right: 60px;
59+
padding: 16px;
60+
61+
@include xs-to-md {
62+
padding: 0 10px;
63+
}
4264
}
4365
}
4466

@@ -65,12 +87,19 @@ $submission-space-50: $base-unit * 10;
6587

6688
.id-col {
6789
font-weight: 700;
90+
width: 32%;
91+
}
92+
93+
.type-col {
94+
width: 21%;
6895
}
6996

7097
.date-col {
71-
color: $tc-gray-50;
72-
font-weight: 400;
73-
line-height: $submission-space-20;
98+
width: 20%;
99+
color: $tc-black;
100+
font-weight: 500;
101+
font-size: 14px;
102+
line-height: 22px;
74103

75104
@include xs-to-sm {
76105
padding: 0 10px;
@@ -108,17 +137,14 @@ $submission-space-50: $base-unit * 10;
108137
top: 10px;
109138
padding: 10px 0;
110139
min-width: 100px;
140+
text-align: right;
111141

112142
svg {
113143
width: 14px;
114144
height: 14px;
115145
}
116146
}
117147

118-
path {
119-
fill: $tc-gray-80;
120-
}
121-
122148
.delete-icon {
123149
margin: 0 0 0 24px;
124150

@@ -128,6 +154,8 @@ $submission-space-50: $base-unit * 10;
128154
}
129155

130156
button {
157+
margin-left: 15px;
158+
margin-top: 3px;
131159
background: none;
132160
border: 0;
133161
font-size: 0;

0 commit comments

Comments
 (0)