This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +52
-3
lines changed Expand file tree Collapse file tree 4 files changed +52
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
angular . module ( 'tc.community' ) . controller ( 'MembersController' , MembersController ) ;
5
5
6
- MembersController . $inject = [ 'CommunityDataService' , 'CONSTANTS' ] ;
6
+ MembersController . $inject = [ 'CommunityDataService' , 'StatisticsService' , ' CONSTANTS'] ;
7
7
8
- function MembersController ( CommunityDataService , CONSTANTS ) {
8
+ function MembersController ( CommunityDataService , StatisticsService , CONSTANTS ) {
9
9
var ctrl = this ;
10
10
ctrl . notSearch = true ;
11
11
ctrl . showing = 'list' ;
26
26
ctrl . notSearch = true ;
27
27
}
28
28
} ;
29
+
30
+ StatisticsService . getPlatformStats ( ) . then ( function ( data ) {
31
+ ctrl . platformStats = data ;
32
+ } )
29
33
}
30
34
31
35
} ) ( ) ;
Original file line number Diff line number Diff line change 10
10
input( type ="submit" name ="search-btn" value ="" ) .search-ico
11
11
12
12
.default-show-container ( ng-show ="ctrl.notSearch" )
13
+ .platform-stats-container
14
+ .stat
15
+ p.statVal {{ctrl.platformStats.memberCount | number : 0}}
16
+ p.statLabel ACTIVE MEMBER
17
+ .stat
18
+ p.statVal {{ctrl.platformStats.activeMembersCount | number : 0}}
19
+ p.statLabel COMPETING TODAY
20
+ .stat
21
+ p.statVal {{ctrl.platformStats.prizePurse | currency:undefined:0}}
22
+ p.statLabel AVAILABLE PRIZE
23
+ .stat
24
+ p.statVal {{ctrl.platformStats.activeContestsCount | number : 0}}
25
+ p.statLabel ACTIVE CHALLENGES
13
26
.members-of-month-container
14
27
h2 Members of the Month
15
28
small {{ctrl.currentMonth}}
Original file line number Diff line number Diff line change 10
10
var service = {
11
11
getDevTop : getDevTop ,
12
12
getDesignTop : getDesignTop ,
13
- getDataTop : getDataTop
13
+ getDataTop : getDataTop ,
14
+ getPlatformStats : getPlatformStats
14
15
} ;
15
16
return service ;
16
17
17
18
///////////////
18
19
20
+
21
+ function getPlatformStats ( ) {
22
+ return ApiService . restangularV2 . all ( 'platform' )
23
+ . withHttpConfig ( { skipAuthorization : true } )
24
+ . customGET ( 'statistics' ) ;
25
+ }
26
+
19
27
function getDevTop ( size ) {
20
28
var url = CONSTANTS . API_URL_V2 + '/users/tops/develop?pageSize=' + size ;
21
29
return ApiService . restangularV2 . all ( 'users' )
Original file line number Diff line number Diff line change 37
37
}
38
38
}
39
39
}
40
+ .platform-stats-container {
41
+ background : $white ;
42
+ padding : 10px ;
43
+ margin-bottom : 6px ;
44
+ height : 70px ;
45
+ font-family : " Sofia Pro" ,Arial ,Helvetica ,sans-serif ;
46
+ .stat {
47
+ float : left ;
48
+ width : 25% ;
49
+ text-align : center ;
50
+ }
51
+ .statVal {
52
+ color : #3d3d3d ;
53
+ font-size : 32px ;
54
+ margin-bottom : 7px ;
55
+ position : relative ;
56
+ }
57
+
58
+ .statLabel {
59
+ color : #a3a3ae ;
60
+ font-size : 12px ;
61
+ font-weight : 400 ;
62
+ }
63
+ }
40
64
.search-container {
41
65
@include module-full-width ;
42
66
background : $white ;
You can’t perform that action at this time.
0 commit comments