Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
arsnova-lite
Commits
9a595d54
Commit
9a595d54
authored
6 years ago
by
Lukas Mauß
Browse files
Options
Downloads
Plain Diff
Merge branch '192-content-management' into 'master'
Fix statistics-landing-tab Closes
#192
See merge request
!136
parents
e0590ee7
6983a09b
1 merge request
!136
Fix statistics-landing-tab
Pipeline
#22962
passed with stages
in 3 minutes and 10 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/components/shared/statistics-page/statistics-page.component.ts
+12
-1
12 additions, 1 deletion
...nents/shared/statistics-page/statistics-page.component.ts
with
12 additions
and
1 deletion
src/app/components/shared/statistics-page/statistics-page.component.ts
+
12
−
1
View file @
9a595d54
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
RoomService
}
from
'
../../../services/http/room.service
'
;
import
{
RoomService
}
from
'
../../../services/http/room.service
'
;
import
{
ContentGroup
}
from
'
../../../models/content-group
'
;
import
{
ContentGroup
}
from
'
../../../models/content-group
'
;
import
{
Room
}
from
'
../../../models/room
'
;
import
{
Room
}
from
'
../../../models/room
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
LanguageService
}
from
'
../../../services/util/language.service
'
;
import
{
LanguageService
}
from
'
../../../services/util/language.service
'
;
import
{
MatTabGroup
}
from
'
@angular/material
'
;
@
Component
({
@
Component
({
selector
:
'
app-statistics
'
,
selector
:
'
app-statistics
'
,
...
@@ -17,6 +18,9 @@ export class StatisticsPageComponent implements OnInit {
...
@@ -17,6 +18,9 @@ export class StatisticsPageComponent implements OnInit {
room
:
Room
;
room
:
Room
;
contentGroups
:
ContentGroup
[];
contentGroups
:
ContentGroup
[];
isLoading
=
true
;
isLoading
=
true
;
currentCG
:
string
;
@
ViewChild
(
MatTabGroup
)
tabGroup
:
MatTabGroup
;
constructor
(
constructor
(
private
route
:
ActivatedRoute
,
private
route
:
ActivatedRoute
,
...
@@ -27,7 +31,9 @@ export class StatisticsPageComponent implements OnInit {
...
@@ -27,7 +31,9 @@ export class StatisticsPageComponent implements OnInit {
}
}
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
currentCG
=
sessionStorage
.
getItem
(
'
contentGroup
'
);
this
.
getRoom
(
localStorage
.
getItem
(
'
roomId
'
));
this
.
getRoom
(
localStorage
.
getItem
(
'
roomId
'
));
this
.
tabGroup
.
selectedIndex
=
1
;
}
}
getRoom
(
id
:
string
):
void
{
getRoom
(
id
:
string
):
void
{
...
@@ -35,6 +41,11 @@ export class StatisticsPageComponent implements OnInit {
...
@@ -35,6 +41,11 @@ export class StatisticsPageComponent implements OnInit {
this
.
roomService
.
getRoom
(
id
).
subscribe
(
room
=>
{
this
.
roomService
.
getRoom
(
id
).
subscribe
(
room
=>
{
this
.
contentGroups
=
room
.
contentGroups
;
this
.
contentGroups
=
room
.
contentGroups
;
this
.
isLoading
=
false
;
this
.
isLoading
=
false
;
for
(
let
i
=
0
;
i
<
this
.
contentGroups
.
length
;
i
++
)
{
if
(
this
.
currentCG
.
includes
(
this
.
contentGroups
[
i
].
name
))
{
this
.
tabGroup
.
selectedIndex
=
i
;
}
}
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment