Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Fix /my-dashboard ENDS IN time counter issue #986

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions app/directives/challenge-tile/challenge-tile.jade
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
.challenge-details
p.currentPhase {{challenge.userCurrentPhase}}

.challenge-calendar(ng-show="challenge.userCurrentPhaseEndTime")
p.ends-in Ends In
.challenge-calendar(ng-show="challenge.userCurrentPhaseEndTime", ng-class="{'challenge-late' : challenge.isLate}")
p.ends-in {{challenge.isLate ? 'Late for' : 'Ends In'}}
p.time-remaining {{challenge.userCurrentPhaseEndTime[0]}}
p.unit-of-time {{challenge.userCurrentPhaseEndTime[1]}}

Expand Down Expand Up @@ -88,7 +88,7 @@
p.roles(ng-hide="challenge.track === 'DATA_SCIENCE'") #[span Role: ] #[span {{challenge.userDetails.roles | listRoles}}]

.challenge-details
.challenge-info
.challenge-info(ng-class="{'challenge-late' : challenge.isLate}")
p.currentPhase {{challenge.userCurrentPhase}}

p.ends-in(ng-show="challenge.userCurrentPhaseEndTime") Ends: {{challenge.userCurrentPhaseEndTime[2] | localTime}}
Expand Down
1 change: 1 addition & 0 deletions app/services/challenge.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ import moment from 'moment'
// Add actual time ['2', 'months', actual date]
timeAndUnit.push(fullTime)
challenge.userCurrentPhaseEndTime = timeAndUnit
challenge.isLate = moment().diff(fullTime) > 0 // If > 0 then the challenge has 'Late Deliverables' or
}
})
}
Expand Down
12 changes: 12 additions & 0 deletions assets/css/directives/challenge-tile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ challenge-tile .challenge.tile-view {
text-transform: lowercase;
color: #7F7F7F;
}

&.challenge-late {
.ends-in, .time-remaining, .unit-of-time {
color: #ee6666;
}
}
}

.stalled-challenge {
Expand Down Expand Up @@ -462,6 +468,12 @@ challenge-tile .challenge.list-view {
font-size: 14px;
color: #A3A3AE;
}

&.challenge-late {
.ends-in, .time-remaining, .unit-of-time {
color: #ee6666;
}
}
}

.marathon-score {
Expand Down