Skip to content

Commit 4f4fe79

Browse files
committed
improvement(reskin): submission upload - part 2 f2f
1 parent 5a11d19 commit 4f4fe79

File tree

11 files changed

+281
-215
lines changed

11 files changed

+281
-215
lines changed

__tests__/shared/components/SubmissionManagement/__snapshots__/Submission.jsx.snap

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ exports[`Snapshot match 1`] = `
4747
type="button"
4848
>
4949
<DeleteIcon
50-
fill="none"
51-
height="9"
52-
viewBox="0 0 16 9"
50+
height="16"
51+
viewBox="0 0 16 16"
5352
width="16"
5453
xmlns="http://www.w3.org/2000/svg"
5554
/>
@@ -120,9 +119,8 @@ exports[`Snapshot match 2`] = `
120119
type="button"
121120
>
122121
<DeleteIcon
123-
fill="none"
124-
height="9"
125-
viewBox="0 0 16 9"
122+
height="16"
123+
viewBox="0 0 16 16"
126124
width="16"
127125
xmlns="http://www.w3.org/2000/svg"
128126
/>

src/shared/components/ProfilePage/BadgesModal/modal.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
left: 50%;
1313
transform: translate(-50%, -50%);
1414
z-index: 999;
15+
border-radius: 8px;
1516
padding: 30px;
1617
display: flex;
1718
flex-direction: column;
1819
justify-content: center;
1920
align-items: center;
20-
border-radius: 0;
2121

2222
@include xs-to-lg {
2323
max-width: 95vw;
Lines changed: 9 additions & 2 deletions
Loading

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

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
import _ from 'lodash';
1515
import moment from 'moment';
1616
import React from 'react';
17-
import { COMPETITION_TRACKS, CHALLENGE_STATUS, safeForDownload } from 'utils/tc';
17+
// CHALLENGE_STATUS
18+
import { COMPETITION_TRACKS, safeForDownload } from 'utils/tc';
1819

1920
import PT from 'prop-types';
2021

21-
import DeleteIcon from '../Icons/IconTrashSimple.svg';
22+
// import DeleteIcon from '../Icons/IconTrashSimple.svg';
2223
import DownloadIcon from '../Icons/IconSquareDownload.svg';
2324
import ExpandIcon from '../Icons/IconMinimalDown.svg';
2425
import ScreeningStatus from '../ScreeningStatus';
@@ -31,10 +32,10 @@ export default function Submission(props) {
3132
showScreeningDetails,
3233
track,
3334
onDownload,
34-
onDelete,
35+
// onDelete,
3536
onShowDetails,
36-
status,
37-
allowDelete,
37+
// status,
38+
// allowDelete,
3839
} = props;
3940
const formatDate = date => moment(+new Date(date)).format('MMM DD, YYYY hh:mm A');
4041
const onDownloadSubmission = onDownload.bind(1, submissionObject.id);
@@ -88,19 +89,19 @@ export default function Submission(props) {
8889
onClick={() => onDownload(submissionObject.id)}
8990
><DownloadIcon /></button>
9091
*/ }
91-
{status !== CHALLENGE_STATUS.COMPLETED
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-
}
92+
{/* {status !== CHALLENGE_STATUS.COMPLETED */}
93+
{/* && track !== COMPETITION_TRACKS.DES */}
94+
{/* && ( */}
95+
{/* <button */}
96+
{/* styleName="delete-icon" */}
97+
{/* onClick={() => onDelete(submissionObject.id)} */}
98+
{/* disabled={!allowDelete} */}
99+
{/* type="button" */}
100+
{/* > */}
101+
{/* <DeleteIcon /> */}
102+
{/* </button> */}
103+
{/* ) */}
104+
{/* } */}
104105
<button
105106
styleName={`expand-icon ${(showScreeningDetails ? 'expanded' : '')}`}
106107
onClick={() => onShowDetails(submissionObject.id)}
@@ -137,8 +138,8 @@ Submission.propTypes = {
137138
showScreeningDetails: PT.bool,
138139
track: PT.string.isRequired,
139140
onDownload: PT.func.isRequired,
140-
onDelete: PT.func.isRequired,
141+
// onDelete: PT.func.isRequired,
141142
onShowDetails: PT.func,
142-
status: PT.string.isRequired,
143-
allowDelete: PT.bool.isRequired,
143+
// status: PT.string.isRequired,
144+
// allowDelete: PT.bool.isRequired,
144145
};

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,18 @@ $submission-space-50: $base-unit * 10;
8888
.id-col {
8989
font-weight: 700;
9090
width: 32%;
91+
92+
@include xs-to-sm {
93+
width: 80%;
94+
}
9195
}
9296

9397
.type-col {
9498
width: 21%;
99+
100+
@include xs-to-sm {
101+
width: 80%;
102+
}
95103
}
96104

97105
.date-col {
@@ -103,6 +111,7 @@ $submission-space-50: $base-unit * 10;
103111

104112
@include xs-to-sm {
105113
padding: 0 10px;
114+
width: 80%;
106115
}
107116
}
108117

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@ $light-gray-color: $tc-gray-neutral-light;
3838
}
3939
}
4040

41+
.add-sub-btn-warning {
42+
@include roboto-bold;
43+
44+
font-weight: 700;
45+
font-size: 16px;
46+
line-height: 24px;
47+
border-radius: 50px !important;
48+
background: $tc-red-70 !important;
49+
color: #fff !important;
50+
text-transform: uppercase;
51+
52+
@include xs-to-md {
53+
font-size: 14px;
54+
line-height: 20px;
55+
}
56+
}
57+
4158
.submission-management {
4259
padding-bottom: 40px;
4360
}

src/shared/components/SubmissionPage/FilestackFilePicker/index.jsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ class FilestackFilePicker extends React.Component {
146146
fileName,
147147
fileExtensions,
148148
title,
149-
mandatory,
150149
error,
151150
dragged,
152151
setDragged,
@@ -167,13 +166,6 @@ class FilestackFilePicker extends React.Component {
167166
<p>
168167
{title}
169168
</p>
170-
{
171-
mandatory && (
172-
<p styleName="mandatory">
173-
*mandatory
174-
</p>
175-
)
176-
}
177169
</div>
178170
<div
179171
styleName={`file-picker ${error ? 'error' : ''} ${dragged ? 'drag' : ''}`}
@@ -338,7 +330,6 @@ FilestackFilePicker.propTypes = {
338330
fileName: PT.string,
339331
fileExtensions: PT.arrayOf(PT.string).isRequired,
340332
title: PT.string.isRequired,
341-
mandatory: PT.bool.isRequired,
342333
setError: PT.func.isRequired,
343334
setFileName: PT.func.isRequired,
344335
setUploadProgress: PT.func.isRequired,

0 commit comments

Comments
 (0)