-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1009 from appirio-tech/dev
promote to prod
- Loading branch information
Showing
9 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}) | ||
} | ||
|
||
} | ||
|
||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters