@@ -249,15 +248,15 @@ export default function ChallengeHeader(props) {
);
break;
default:
- nextDeadlineMsg = (
-
- Status:
-
-
- {_.upperFirst(_.lowerCase(status))}
-
-
- );
+ // nextDeadlineMsg = (
+ //
+ // Status:
+ //
+ //
+ // {_.upperFirst(_.lowerCase(status))}
+ //
+ //
+ // );
break;
}
@@ -446,9 +445,9 @@ export default function ChallengeHeader(props) {
(status || '').toLowerCase() === 'active'
&& (
- Current Deadline Ends:{' '}
+ {currentPhases && `${currentPhases.name} Ends: `}
- {timeLeft}
+ {timeDiff.text}
)
@@ -532,7 +531,6 @@ ChallengeHeader.propTypes = {
timelineTemplateId: PT.string,
reliabilityBonus: PT.any,
userDetails: PT.any,
- currentPhases: PT.any,
numOfRegistrants: PT.any,
numOfCheckpointSubmissions: PT.any,
numOfSubmissions: PT.any,
diff --git a/src/shared/components/challenge-detail/Header/style.scss b/src/shared/components/challenge-detail/Header/style.scss
index cd1e155ae5..a8bfa1cec7 100644
--- a/src/shared/components/challenge-detail/Header/style.scss
+++ b/src/shared/components/challenge-detail/Header/style.scss
@@ -602,7 +602,6 @@
.current-phase {
overflow-wrap: normal;
- padding-left: 10px;
@include xs-to-md {
padding-left: 0;
From 6a6590865502e8936dd930dcfd7692d80cd4d955 Mon Sep 17 00:00:00 2001
From: lunarkid <4476442+dedywahyudi@users.noreply.github.com>
Date: Thu, 6 Oct 2022 10:06:50 +0700
Subject: [PATCH 10/18] fix: timeline appeal response
---
.../Header/DeadlinesPanel/index.jsx | 1 -
.../challenge-detail/Header/index.jsx | 32 +++++++++++--------
.../challenge-detail/Header/style.scss | 3 +-
3 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/shared/components/challenge-detail/Header/DeadlinesPanel/index.jsx b/src/shared/components/challenge-detail/Header/DeadlinesPanel/index.jsx
index 7eb853efd1..081d958d84 100644
--- a/src/shared/components/challenge-detail/Header/DeadlinesPanel/index.jsx
+++ b/src/shared/components/challenge-detail/Header/DeadlinesPanel/index.jsx
@@ -35,7 +35,6 @@ export default function DeadlinesPanel({ deadlines }) {
}
}
if (index === deadlines.length - 1) {
- name = 'Winners Announced';
showRange = false;
}
diff --git a/src/shared/components/challenge-detail/Header/index.jsx b/src/shared/components/challenge-detail/Header/index.jsx
index 43c82b8b0a..12b0281f6b 100644
--- a/src/shared/components/challenge-detail/Header/index.jsx
+++ b/src/shared/components/challenge-detail/Header/index.jsx
@@ -213,26 +213,23 @@ export default function ChallengeHeader(props) {
|| phaseEndDate(p).getTime() < endPhaseDate));
relevantPhases.push({
id: -1,
- name: 'Winners',
+ name: 'Winners Announced',
isOpen: false,
actualEndDate: endPhaseDate,
scheduledEndDate: endPhaseDate,
});
} else if (relevantPhases.length > 1) {
- const lastPhase = relevantPhases[relevantPhases.length - 1];
- const lastPhaseTime = phaseEndDate(lastPhase).getTime();
-
+ // const lastPhase = relevantPhases[relevantPhases.length - 1];
+ // const lastPhaseTime = phaseEndDate(lastPhase).getTime();
const appealsEndDate = phaseEndDate(sortedAllPhases[sortedAllPhases.length - 1]);
- const appealsEnd = appealsEndDate.getTime();
- if (lastPhaseTime < appealsEnd) {
- relevantPhases.push({
- id: -1,
- name: 'Winners',
- isOpen: false,
- actualEndDate: appealsEndDate,
- scheduledEndDate: appealsEndDate,
- });
- }
+ // const appealsEnd = appealsEndDate.getTime();
+ relevantPhases.push({
+ id: -1,
+ name: 'Winners Announced',
+ isOpen: false,
+ actualEndDate: appealsEndDate,
+ scheduledEndDate: appealsEndDate,
+ });
}
}
@@ -247,6 +244,13 @@ export default function ChallengeHeader(props) {
);
break;
+ case 'draft':
+ nextDeadlineMsg = (
+
diff --git a/src/shared/components/challenge-detail/Header/style.scss b/src/shared/components/challenge-detail/Header/style.scss
index a8bfa1cec7..f97c457a6d 100644
--- a/src/shared/components/challenge-detail/Header/style.scss
+++ b/src/shared/components/challenge-detail/Header/style.scss
@@ -596,7 +596,8 @@
}
}
- .completed {
+ .completed,
+ .draft {
border-right: none;
}
From da20efe449fb0193d84017bd3b8dc0f18815cae4 Mon Sep 17 00:00:00 2001
From: lunarkid <4476442+dedywahyudi@users.noreply.github.com>
Date: Thu, 6 Oct 2022 22:18:24 +0700
Subject: [PATCH 11/18] fix: view submissions 2 lines
---
src/shared/components/challenge-detail/Header/style.scss | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/shared/components/challenge-detail/Header/style.scss b/src/shared/components/challenge-detail/Header/style.scss
index f97c457a6d..9aabdd7c00 100644
--- a/src/shared/components/challenge-detail/Header/style.scss
+++ b/src/shared/components/challenge-detail/Header/style.scss
@@ -16,9 +16,10 @@
width: 100%;
border-radius: 50px !important;
height: 48px;
- padding: 0 25px !important;
background: #137d60 !important;
color: #fff !important;
+ white-space: nowrap;
+ padding: 0 35px !important;
@include xs-to-sm {
width: fit-content;
From 86031489c7fbf710e56d9a0f6dec6b593406785f Mon Sep 17 00:00:00 2001
From: lunarkid <4476442+dedywahyudi@users.noreply.github.com>
Date: Thu, 6 Oct 2022 22:26:22 +0700
Subject: [PATCH 12/18] fix: challenge status missing
---
.../challenge-detail/Header/index.jsx | 23 ++++++++-----------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/shared/components/challenge-detail/Header/index.jsx b/src/shared/components/challenge-detail/Header/index.jsx
index 12b0281f6b..a92b2e90a6 100644
--- a/src/shared/components/challenge-detail/Header/index.jsx
+++ b/src/shared/components/challenge-detail/Header/index.jsx
@@ -244,24 +244,19 @@ export default function ChallengeHeader(props) {
);
break;
- case 'draft':
+ case 'active':
+ break;
+ default:
nextDeadlineMsg = (
-
- In Draft
+
+ Status:
+
+
+ {_.upperFirst(_.lowerCase(status))}
+
);
break;
- default:
- // nextDeadlineMsg = (
- //
- // Status:
- //
- //
- // {_.upperFirst(_.lowerCase(status))}
- //
- //
- // );
- break;
}
// Legacy MMs have a roundId field, but new MMs do not.
From ad36fef99d505b8d79ff4dc4835f87de264eb205 Mon Sep 17 00:00:00 2001
From: lunarkid <4476442+dedywahyudi@users.noreply.github.com>
Date: Fri, 7 Oct 2022 19:26:22 +0700
Subject: [PATCH 13/18] fix: buttons design system
---
.../ProfilePage/Awards/AwardBadge/index.jsx | 1 +
.../challenge-detail/Header/index.jsx | 18 ++++----
.../challenge-detail/Header/style.scss | 42 +++++++++++++++----
3 files changed, 44 insertions(+), 17 deletions(-)
diff --git a/src/shared/components/ProfilePage/Awards/AwardBadge/index.jsx b/src/shared/components/ProfilePage/Awards/AwardBadge/index.jsx
index 39a2a126eb..1903b27c2f 100644
--- a/src/shared/components/ProfilePage/Awards/AwardBadge/index.jsx
+++ b/src/shared/components/ProfilePage/Awards/AwardBadge/index.jsx
@@ -17,6 +17,7 @@ const AwardBadge = ({
}
+ {/* eslint-disable-next-line react/no-danger */}
diff --git a/src/shared/components/challenge-detail/Header/index.jsx b/src/shared/components/challenge-detail/Header/index.jsx
index a92b2e90a6..b7e4e62b43 100644
--- a/src/shared/components/challenge-detail/Header/index.jsx
+++ b/src/shared/components/challenge-detail/Header/index.jsx
@@ -423,16 +423,16 @@ export default function ChallengeHeader(props) {
Submit
{
- track === COMPETITION_TRACKS.DES && hasRegistered && !unregistering
+ track === COMPETITION_TRACKS.DES && hasRegistered && !unregistering
&& hasSubmissions && (
-
- View Submissions
-
- )
- }
+
+ View Submissions
+
+ )
+ }