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

Commit aecc440

Browse files
authored
Merge pull request #1009 from appirio-tech/dev
promote to prod
2 parents ce1b96a + d8489b9 commit aecc440

File tree

9 files changed

+35
-9
lines changed

9 files changed

+35
-9
lines changed

Diff for: app/directives/challenge-tile/challenge-tile.jade

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
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

@@ -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

Diff for: app/filters/challengeLinks.filter.js

+4
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
}

Diff for: app/listings/listings.controller.js

100644100755
+17-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
import angular from 'angular'
2+
import { loadUser } from '../services/userv3.service.js'
23

34
(function () {
45
'use strict'
56

67
angular.module('tc.listings').controller('ListingsCtrl', ListingsCtrl)
78

8-
ListingsCtrl.$inject = ['CONSTANTS', 'logger', '$q',
9-
'TcAuthService', 'UserService', 'UserStatsService', 'ProfileService', 'ChallengeService', 'ExternalAccountService',
10-
'ngDialog', '$anchorScroll'
9+
ListingsCtrl.$inject = ['CONSTANTS', 'logger', '$q','TcAuthService', 'UserService',
10+
'UserStatsService', 'ProfileService', 'ChallengeService',
11+
'ExternalAccountService', 'ngDialog', '$anchorScroll', '$scope'
1112
]
1213

13-
function ListingsCtrl(CONSTANTS, logger, $q, TcAuthService, UserService, UserStatsService, ProfileService, ChallengeService, ExternalAccountService, ngDialog, $anchorScroll) {
14+
function ListingsCtrl(CONSTANTS, logger, $q, TcAuthService, UserService, UserStatsService, ProfileService,
15+
ChallengeService, ExternalAccountService, ngDialog, $anchorScroll, $scope) {
1416

1517
activate()
1618

1719
function activate() {
20+
$scope.myChallenges = []
21+
$scope.userProps = { isAuth: false }
1822
logger.debug('Calling ListingsController activate()')
1923

24+
loadUser().then(function(token) {
25+
// update auth flag
26+
if(TcAuthService.isAuthenticated()) {
27+
$scope.userProps = { isAuth: true }
28+
}
29+
}, function(error) {
30+
// do nothing, just show non logged in state of navigation bar
31+
})
2032
}
33+
2134
}
2235

2336
})()

Diff for: app/listings/listings.jade

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
react-component(name="ChallengeFiltersExample")
1+
2+
<react-component name="ChallengeFiltersExample" props="userProps" watch-depth="reference"/>

Diff for: app/listings/listings.module.js

100644100755
File mode changed.

Diff for: app/listings/listings.routes.js

100644100755
File mode changed.

Diff for: app/services/challenge.service.js

+3
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

Diff for: assets/css/directives/challenge-tile.scss

+4-3
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ challenge-tile .challenge.tile-view {
245245
min-height: 55px;
246246

247247
.submit {
248-
margin-bottom: 25px;
249-
display: inline-block;
248+
margin: 12px;
249+
display: block;
250250
}
251251

252252
.submitted {
@@ -498,7 +498,8 @@ challenge-tile .challenge.list-view {
498498

499499
.phase-action {
500500
.submit {
501-
display: inline-block;
501+
display: block;
502+
margin: 6px 0;
502503
}
503504

504505
.submitted {

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"appirio-styles": "0.x.x",
5757
"appirio-tech-ng-iso-constants": "^1.0.6",
5858
"appirio-tech-ng-ui-components": "^2.1.2",
59-
"appirio-tech-react-components": "appirio-tech/react-components.git#challenge-listings",
59+
"appirio-tech-react-components": "nomo-kazza/react-components.git#challenge-listings",
6060
"auth0-angular": "^4.1.0",
6161
"auth0-js": "^6.8.0",
6262
"d3": "^3.5.14",

0 commit comments

Comments
 (0)