diff --git a/app/listings/listings.controller.js b/app/listings/listings.controller.js old mode 100644 new mode 100755 index 5ed5eae6a..9d0774758 --- a/app/listings/listings.controller.js +++ b/app/listings/listings.controller.js @@ -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 + }) } + } })() diff --git a/app/listings/listings.jade b/app/listings/listings.jade old mode 100644 new mode 100755 index 1774c70e3..ccbc73bd0 --- a/app/listings/listings.jade +++ b/app/listings/listings.jade @@ -1 +1,2 @@ -react-component(name="ChallengeFiltersExample") + + \ No newline at end of file diff --git a/app/listings/listings.module.js b/app/listings/listings.module.js old mode 100644 new mode 100755 diff --git a/app/listings/listings.routes.js b/app/listings/listings.routes.js old mode 100644 new mode 100755 diff --git a/package.json b/package.json index ca19358b7..3f2ab1635 100644 --- a/package.json +++ b/package.json @@ -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", 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