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

Commit 70d9b7b

Browse files
authored
Merge pull request #923 from appirio-tech/new-listings
New listings
2 parents 802bdbb + 30c46f5 commit 70d9b7b

7 files changed

+91
-1
lines changed

app/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ require('angucomplete-alt')
2222
require('angularjs-toaster')
2323
require('ng-dialog')
2424
require('xml2js')
25+
require('ngreact')
2526

2627
require('appirio-tech-ng-ui-components')
2728
require('appirio-tech-ng-iso-constants')

app/listings/listings.controller.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import angular from 'angular'
2+
3+
(function () {
4+
'use strict'
5+
6+
angular.module('tc.listings').controller('ListingsCtrl', ListingsCtrl)
7+
8+
ListingsCtrl.$inject = ['CONSTANTS', 'logger', '$q',
9+
'TcAuthService', 'UserService', 'UserStatsService', 'ProfileService', 'ChallengeService', 'ExternalAccountService',
10+
'ngDialog', '$anchorScroll'
11+
]
12+
13+
function ListingsCtrl(CONSTANTS, logger, $q, TcAuthService, UserService, UserStatsService, ProfileService, ChallengeService, ExternalAccountService, ngDialog, $anchorScroll) {
14+
15+
activate()
16+
17+
function activate() {
18+
logger.debug('Calling ListingsController activate()')
19+
20+
}
21+
}
22+
23+
})()

app/listings/listings.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
react-component(name="ChallengeFiltersExample")

app/listings/listings.module.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import angular from 'angular'
2+
import { ChallengeFiltersExample } from 'appirio-tech-react-components'
3+
4+
(function() {
5+
'use strict'
6+
7+
var dependencies = [
8+
'angular-jwt',
9+
'ui.router',
10+
'ngCookies',
11+
'tc.services',
12+
'tcUIComponents',
13+
'angularSlideables',
14+
'ngDialog',
15+
'react'
16+
]
17+
18+
angular.module('tc.listings', dependencies)
19+
.value('ChallengeFiltersExample', ChallengeFiltersExample.default)
20+
21+
})()

app/listings/listings.routes.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import angular from 'angular'
2+
3+
(function() {
4+
'use strict'
5+
6+
angular.module('tc.listings').config([
7+
'$stateProvider',
8+
routes
9+
]).run(['$rootScope', '$state', function($rootScope, $state) {
10+
$rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error) {
11+
// if (toState.name.indexOf('sloog') > -1 && 400 <= error.status <= 500 ) {
12+
//
13+
// // unable to find a member with that username
14+
// $state.go('404')
15+
// }
16+
})
17+
}])
18+
19+
function routes($stateProvider) {
20+
var states = {
21+
'listings': {
22+
parent: 'root',
23+
url: '/listings/',
24+
template: require('./listings')(),
25+
controller: 'ListingsCtrl as vm',
26+
resolve: {
27+
userHandle: ['$stateParams', function($stateParams) {
28+
return $stateParams.userHandle
29+
}]
30+
},
31+
data: {
32+
authRequired: false,
33+
title: 'Listings'
34+
}
35+
}
36+
}
37+
38+
for (var name in states) {
39+
var state = states[name]
40+
$stateProvider.state(name, state)
41+
}
42+
}
43+
})()

app/topcoder.module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { getCurrentUser, loadUser } from './services/userv3.service.js'
1010
'tc.account',
1111
'tc.peer-review',
1212
'tc.myDashboard',
13+
'tc.listings',
1314
'tc.mySRMs',
1415
'tc.myChallenges',
1516
'tc.profile',

package.json

Lines changed: 1 addition & 1 deletion
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": "^0.0.12",
59+
"appirio-tech-react-components": "appirio-tech/react-components.git#challenge-filters",
6060
"auth0-angular": "^4.1.0",
6161
"auth0-js": "^6.8.0",
6262
"d3": "^3.5.14",

0 commit comments

Comments
 (0)