Skip to content

Commit

Permalink
Merge pull request #1009 from appirio-tech/dev
Browse files Browse the repository at this point in the history
promote to prod
  • Loading branch information
ajefts authored Feb 15, 2017
2 parents ce1b96a + d8489b9 commit aecc440
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 9 deletions.
4 changes: 4 additions & 0 deletions app/directives/challenge-tile/challenge-tile.jade
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

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

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

Expand Down Expand Up @@ -97,6 +99,8 @@

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

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

Expand Down
4 changes: 4 additions & 0 deletions app/filters/challengeLinks.filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ import _ from 'lodash'
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data)
case 'detail':
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data)
case 'viewScorecards':
return String.supplant('https://software.{domain}/review/actions/ViewProjectDetails?pid={id}', data)
case 'completeAppeals':
return String.supplant('https://software.{domain}/review/actions/EarlyAppeals?pid={id}', data)
}
}
}
Expand Down
21 changes: 17 additions & 4 deletions app/listings/listings.controller.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
import angular from 'angular'
import { loadUser } from '../services/userv3.service.js'

(function () {
'use strict'

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

ListingsCtrl.$inject = ['CONSTANTS', 'logger', '$q',
'TcAuthService', 'UserService', 'UserStatsService', 'ProfileService', 'ChallengeService', 'ExternalAccountService',
'ngDialog', '$anchorScroll'
ListingsCtrl.$inject = ['CONSTANTS', 'logger', '$q','TcAuthService', 'UserService',
'UserStatsService', 'ProfileService', 'ChallengeService',
'ExternalAccountService', 'ngDialog', '$anchorScroll', '$scope'
]

function ListingsCtrl(CONSTANTS, logger, $q, TcAuthService, UserService, UserStatsService, ProfileService, ChallengeService, ExternalAccountService, ngDialog, $anchorScroll) {
function ListingsCtrl(CONSTANTS, logger, $q, TcAuthService, UserService, UserStatsService, ProfileService,
ChallengeService, ExternalAccountService, ngDialog, $anchorScroll, $scope) {

activate()

function activate() {
$scope.myChallenges = []
$scope.userProps = { isAuth: false }
logger.debug('Calling ListingsController activate()')

loadUser().then(function(token) {
// update auth flag
if(TcAuthService.isAuthenticated()) {
$scope.userProps = { isAuth: true }
}
}, function(error) {
// do nothing, just show non logged in state of navigation bar
})
}

}

})()
3 changes: 2 additions & 1 deletion app/listings/listings.jade
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
react-component(name="ChallengeFiltersExample")

<react-component name="ChallengeFiltersExample" props="userProps" watch-depth="reference"/>
Empty file modified app/listings/listings.module.js
100644 → 100755
Empty file.
Empty file modified app/listings/listings.routes.js
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions app/services/challenge.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ import moment from 'moment'
}
})
}
if (challenge.userCurrentPhase === 'Appeals') {
challenge.userAction = 'Appeal'
}

if (challenge.userCurrentPhaseEndTime) {
var fullTime = challenge.userCurrentPhaseEndTime
Expand Down
7 changes: 4 additions & 3 deletions assets/css/directives/challenge-tile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ challenge-tile .challenge.tile-view {
min-height: 55px;

.submit {
margin-bottom: 25px;
display: inline-block;
margin: 12px;
display: block;
}

.submitted {
Expand Down Expand Up @@ -498,7 +498,8 @@ challenge-tile .challenge.list-view {

.phase-action {
.submit {
display: inline-block;
display: block;
margin: 6px 0;
}

.submitted {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"appirio-styles": "0.x.x",
"appirio-tech-ng-iso-constants": "^1.0.6",
"appirio-tech-ng-ui-components": "^2.1.2",
"appirio-tech-react-components": "appirio-tech/react-components.git#challenge-listings",
"appirio-tech-react-components": "nomo-kazza/react-components.git#challenge-listings",
"auth0-angular": "^4.1.0",
"auth0-js": "^6.8.0",
"d3": "^3.5.14",
Expand Down

0 comments on commit aecc440

Please sign in to comment.