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

promote to prod #1009

Merged
merged 6 commits into from
Feb 15, 2017
Merged
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
4 changes: 4 additions & 0 deletions app/directives/challenge-tile/challenge-tile.jade
Original file line number Diff line number Diff line change
@@ -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

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

4 changes: 4 additions & 0 deletions app/filters/challengeLinks.filter.js
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
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
@@ -105,6 +105,9 @@ import moment from 'moment'
}
})
}
if (challenge.userCurrentPhase === 'Appeals') {
challenge.userAction = 'Appeal'
}

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

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

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

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

.submitted {
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",