Skip to content

Commit 3faefdd

Browse files
committed
Merge branch 'dev' into tom-listings-auth
2 parents c514513 + 03bcd01 commit 3faefdd

File tree

15 files changed

+114
-76
lines changed

15 files changed

+114
-76
lines changed

app/account/logout/logout.spec.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import angular from 'angular'
44
describe('Logout Controller', function() {
55
var controller
66
var fakeWindow = {
7+
// Without the `angular` field our fake window will crush
8+
// `angular-mocks@1.6.2` and higher!
9+
angular: {
10+
callbacks: {}
11+
},
712
location: {
813
href: ''
914
}
@@ -15,14 +20,11 @@ describe('Logout Controller', function() {
1520
angular.mock.module('tc.account', function($provide) {
1621
$provide.value('$window', fakeWindow)
1722
})
18-
1923
bard.inject(this, '$controller', 'TcAuthService', '$window', '$q', 'CONSTANTS')
20-
2124
bard.mockService(TcAuthService, {
2225
logout: $q.when({}),
2326
_default: $q.when({})
2427
})
25-
2628
controller = $controller('LogoutController')
2729
})
2830

app/directives/challenge-tile/challenge-tile.jade

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@
1212
.challenge-details
1313
p.currentPhase {{challenge.userCurrentPhase}}
1414

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

2020
.stalled-challenge(ng-hide="challenge.userCurrentPhaseEndTime") This challenge is currently paused.
2121

2222
.phase-action(ng-show="challenge.userAction", ng-switch="challenge.userAction")
2323
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'submit'}}") Submit
24+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'viewScorecards'}}") View Scorecards
25+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'completeAppeals'}}") Complete Appeals
2426

2527
.submitted(ng-switch-when="Submitted") Submitted
2628

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

9092
.challenge-details
91-
.challenge-info
93+
.challenge-info(ng-class="{'challenge-late' : challenge.isLate}")
9294
p.currentPhase {{challenge.userCurrentPhase}}
9395

9496
p.ends-in(ng-show="challenge.userCurrentPhaseEndTime") Ends: {{challenge.userCurrentPhaseEndTime[2] | localTime}}
@@ -97,6 +99,8 @@
9799

98100
.phase-action(ng-switch="challenge.userAction")
99101
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Submit", ng-href="{{challenge|challengeLinks:'submit'}}") Submit
102+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'viewScorecards'}}") View Scorecards
103+
a.tc-btn.tc-btn-s.tc-btn-wide.tc-btn-ghost.submit(ng-switch-when="Appeal", ng-href="{{challenge|challengeLinks:'completeAppeals'}}") Complete Appeals
100104

101105
.submitted(ng-switch-when="Submitted") Submitted
102106

app/filters/challengeLinks.filter.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ import _ from 'lodash'
6969
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data)
7070
case 'detail':
7171
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data)
72+
case 'viewScorecards':
73+
return String.supplant('https://software.{domain}/review/actions/ViewProjectDetails?pid={id}', data)
74+
case 'completeAppeals':
75+
return String.supplant('https://software.{domain}/review/actions/EarlyAppeals?pid={id}', data)
7276
}
7377
}
7478
}

app/layout/footer/footer.jade

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
footer.bottom-footer
22
// Footer links
33
nav.menu-item
4-
.menu-item-header.show-small OTHERS
54

65
ul.submenu
76
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/sitemap") SITE MAP]

app/profile/badges/badges.controller.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,12 @@ import moment from 'moment-timezone'
661661
name: 'Predix Community',
662662
groupClass: 'Predix-Community',
663663
active: false
664+
},
665+
{
666+
id: 1009,
667+
name: 'iOS Community',
668+
groupClass: 'iOS-Community',
669+
active: false
664670
}
665671
]
666672
}

app/services/challenge.service.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ import moment from 'moment'
105105
}
106106
})
107107
}
108+
if (challenge.userCurrentPhase === 'Appeals') {
109+
challenge.userAction = 'Appeal'
110+
}
108111

109112
if (challenge.userCurrentPhaseEndTime) {
110113
var fullTime = challenge.userCurrentPhaseEndTime
@@ -119,6 +122,7 @@ import moment from 'moment'
119122
// Add actual time ['2', 'months', actual date]
120123
timeAndUnit.push(fullTime)
121124
challenge.userCurrentPhaseEndTime = timeAndUnit
125+
challenge.isLate = moment().diff(fullTime) > 0 // If > 0 then the challenge has 'Late Deliverables' or
122126
}
123127
})
124128
}

app/services/helpers.service.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ const mockData = require('../../tests/test-helpers/mock-data')
55
describe('Helper Service', function() {
66

77
var fakeWindow = {
8+
// Without the `angular` field our fake window will crush
9+
// `angular-mocks@1.6.2` and higher!
10+
angular: {
11+
callbacks: {}
12+
},
813
location: {
914
href: '/'
1015
},

app/services/jwtInterceptor.service.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ describe('JWT Interceptor Service', function() {
3333
})
3434
},
3535
fakeWindow = {
36+
// Without the `angular` field our fake window will crush
37+
// `angular-mocks@1.6.2` and higher!
38+
angular: {
39+
callbacks: {}
40+
},
3641
location: ''
3742
}
3843

assets/css/directives/badge-tooltip.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,9 @@
440440
.Predix-Community {
441441
background-position: -50px -672px;
442442
}
443+
.iOS-Community {
444+
background-position: -95px -672px;
445+
}
443446
.Wireframe {
444447
width: 31px;
445448
background-position: 0px -1009px !important;

assets/css/directives/challenge-tile.scss

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ challenge-tile .challenge.tile-view {
222222
text-transform: lowercase;
223223
color: #7F7F7F;
224224
}
225+
226+
&.challenge-late {
227+
.ends-in, .time-remaining, .unit-of-time {
228+
color: #ee6666;
229+
}
230+
}
225231
}
226232

227233
.stalled-challenge {
@@ -239,8 +245,8 @@ challenge-tile .challenge.tile-view {
239245
min-height: 55px;
240246

241247
.submit {
242-
margin-bottom: 25px;
243-
display: inline-block;
248+
margin: 12px;
249+
display: block;
244250
}
245251

246252
.submitted {
@@ -462,6 +468,12 @@ challenge-tile .challenge.list-view {
462468
font-size: 14px;
463469
color: #A3A3AE;
464470
}
471+
472+
&.challenge-late {
473+
.ends-in, .time-remaining, .unit-of-time {
474+
color: #ee6666;
475+
}
476+
}
465477
}
466478

467479
.marathon-score {
@@ -486,7 +498,8 @@ challenge-tile .challenge.list-view {
486498

487499
.phase-action {
488500
.submit {
489-
display: inline-block;
501+
display: block;
502+
margin: 6px 0;
490503
}
491504

492505
.submitted {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy