Spielerstatistik - {{campaignPlayer.name}}
{{campaignPlayer.campaign.title}} Kampagne
diff --git a/static/src/app/statistic/campaign-player-detail/campaign-player-detail.component.ts b/static/src/app/statistic/campaign-player-detail/campaign-player-detail.component.ts
index c490c46..7f7b556 100644
--- a/static/src/app/statistic/campaign-player-detail/campaign-player-detail.component.ts
+++ b/static/src/app/statistic/campaign-player-detail/campaign-player-detail.component.ts
@@ -9,7 +9,8 @@ import {Location} from '@angular/common';
@Component({
selector: 'campaign-player-detail',
templateUrl: './campaign-player-detail.component.html',
- styleUrls: ['./campaign-player-detail.component.css', '../../style/list-entry.css', '../../style/hide-scrollbar.css']
+ styleUrls: ['./campaign-player-detail.component.css', '../../style/list-entry.css',
+ '../../style/hide-scrollbar.css', '../../style/overview.css']
})
export class CampaignPlayerDetailComponent {
diff --git a/static/src/app/statistic/campaign-submit/campaign-submit.component.css b/static/src/app/statistic/campaign-submit/campaign-submit.component.css
index f0ba23d..e69de29 100644
--- a/static/src/app/statistic/campaign-submit/campaign-submit.component.css
+++ b/static/src/app/statistic/campaign-submit/campaign-submit.component.css
@@ -1,8 +0,0 @@
-.overview {
- position: fixed;
- width: 25%;
- min-width: 300px;
- padding-left: 50px;
- padding-top: 70px;
- margin-left: 10px;
-}
diff --git a/static/src/app/statistic/campaign-submit/campaign-submit.component.ts b/static/src/app/statistic/campaign-submit/campaign-submit.component.ts
index 469b968..8182d8e 100644
--- a/static/src/app/statistic/campaign-submit/campaign-submit.component.ts
+++ b/static/src/app/statistic/campaign-submit/campaign-submit.component.ts
@@ -8,7 +8,7 @@ import {CampaignService} from "../../services/campaign-service/campaign.service"
@Component({
selector: 'campaign-submit',
templateUrl: './campaign-submit.component.html',
- styleUrls: ['./campaign-submit.component.css']
+ styleUrls: ['./campaign-submit.component.css', '../../style/entry-form.css', '../../style/overview.css']
})
export class CampaignSubmitComponent {
diff --git a/static/src/app/statistic/overview/stats-overview.component.html b/static/src/app/statistic/overview/stats-overview.component.html
index 9c9430f..2cea8db 100644
--- a/static/src/app/statistic/overview/stats-overview.component.html
+++ b/static/src/app/statistic/overview/stats-overview.component.html
@@ -1,15 +1,15 @@
{{title}}
-
Gesamtpunktzahl
-
-
Punkte je Schlacht
-
-
Spielerzahlen
-
+
Gesamtpunktzahl
+
+
Punkte je Schlacht
+
+
Spielerzahlen
+
@@ -25,7 +25,8 @@
[showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisLabel"
[autoScale]="autoscale"
- [timeline]="timeline">
+ [timeline]="timeline"
+ [roundDomains]="roundDomains">
diff --git a/static/src/app/statistic/overview/stats-overview.component.ts b/static/src/app/statistic/overview/stats-overview.component.ts
index 12f7ec9..919a966 100644
--- a/static/src/app/statistic/overview/stats-overview.component.ts
+++ b/static/src/app/statistic/overview/stats-overview.component.ts
@@ -8,7 +8,7 @@ import {ChartUtils} from "../../utils/chart-utils";
@Component({
selector: 'stats-overview',
templateUrl: './stats-overview.component.html',
- styleUrls: ['./stats-overview.component.css', '../../style/list-entry.css'],
+ styleUrls: ['./stats-overview.component.css', '../../style/list-entry.css', '../../style/overview.css'],
inputs: ['campaigns'],
providers: [{provide: CarouselConfig, useValue: {interval: false}}]
})
@@ -38,7 +38,6 @@ export class StatisticOverviewComponent {
autoscale = true;
timeline = false;
-
constructor(private route: ActivatedRoute,
private campaignService: CampaignService) {
}
@@ -63,14 +62,20 @@ export class StatisticOverviewComponent {
let itemsProcessed = 0;
campaigns = campaigns.filter(campaign => this.id === 'all' || campaign._id === this.id);
campaigns.forEach(campaign => {
- if (this.id === 'all') {
- this.title = "Gesamtübersicht";
- } else {
- this.title = campaign.title;
- }
wars = wars.concat(campaign.wars);
itemsProcessed++;
if (itemsProcessed === campaigns.length) {
+ if (this.id === 'all') {
+ this.title = "Gesamtübersicht";
+ wars.sort((a, b) => {
+ // sort by dates, because older campaign can contain newer war
+ if (a['date'] > (b['date'])) return -1;
+ if (a['date'] < (b['date'])) return 1;
+ return 0;
+ })
+ } else {
+ this.title = campaign.title;
+ }
this.initChart(wars);
}
})
diff --git a/static/src/app/statistic/war-submit/war-submit.component.css b/static/src/app/statistic/war-submit/war-submit.component.css
index f0ba23d..e69de29 100644
--- a/static/src/app/statistic/war-submit/war-submit.component.css
+++ b/static/src/app/statistic/war-submit/war-submit.component.css
@@ -1,8 +0,0 @@
-.overview {
- position: fixed;
- width: 25%;
- min-width: 300px;
- padding-left: 50px;
- padding-top: 70px;
- margin-left: 10px;
-}
diff --git a/static/src/app/statistic/war-submit/war-submit.component.ts b/static/src/app/statistic/war-submit/war-submit.component.ts
index ae96343..87c0b79 100644
--- a/static/src/app/statistic/war-submit/war-submit.component.ts
+++ b/static/src/app/statistic/war-submit/war-submit.component.ts
@@ -9,7 +9,8 @@ import {CampaignService} from "../../services/campaign-service/campaign.service"
@Component({
selector: 'war-submit',
templateUrl: './war-submit.component.html',
- styleUrls: ['./war-submit.component.css', '../../style/load-indicator.css']
+ styleUrls: ['./war-submit.component.css', '../../style/load-indicator.css',
+ '../../style/entry-form.css', '../../style/overview.css']
})
export class WarSubmitComponent {
diff --git a/static/src/app/style/entry-form.css b/static/src/app/style/entry-form.css
index 6fa2d36..7440bcf 100644
--- a/static/src/app/style/entry-form.css
+++ b/static/src/app/style/entry-form.css
@@ -1,3 +1,10 @@
+.overview {
+ overflow: hidden!important;
+ padding-top: 80px!important;
+ width: 20%;
+ min-width: 280px;
+}
+
h3 {
margin-left: -20px;
}
@@ -10,17 +17,6 @@ label {
border-color: red;
}
-.overview {
- position: fixed;
- width: 25%;
- min-width: 500px;
- border-left: thin solid lightgrey;
- padding-left: 50px;
- padding-top: 20px;
- margin-left: 10px;
- height: 100vh;
-}
-
.preview-image {
margin: 10px;
}
diff --git a/static/src/app/style/load-indicator.css b/static/src/app/style/load-indicator.css
index f224632..4fed87a 100644
--- a/static/src/app/style/load-indicator.css
+++ b/static/src/app/style/load-indicator.css
@@ -1,9 +1,7 @@
.load-indicator {
position: absolute;
top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 50%;
+ left: 48.5%;
z-index: 1;
}
diff --git a/static/src/app/style/overview.css b/static/src/app/style/overview.css
new file mode 100644
index 0000000..6f3e5eb
--- /dev/null
+++ b/static/src/app/style/overview.css
@@ -0,0 +1,17 @@
+.overview {
+ position: fixed;
+ overflow-y: scroll;
+ overflow-x: hidden;
+ border-left: thin solid lightgrey;
+ padding: 20px 0 0 50px;
+ height: 100vh;
+ bottom: 10px;
+}
+
+.absolute-label {
+ display: block;
+ position: absolute;
+ font-size: 12px;
+ padding: 5px;
+ margin-left: 25%;
+}
diff --git a/static/src/app/users/award-user/award-user.component.css b/static/src/app/users/award-user/award-user.component.css
index dc5e592..63dbe91 100644
--- a/static/src/app/users/award-user/award-user.component.css
+++ b/static/src/app/users/award-user/award-user.component.css
@@ -18,19 +18,6 @@
width: 50%;
}
-/* enable scrolling for long list of awardings */
-.overview {
- position: fixed;
- overflow-y: scroll;
- overflow-x: hidden;
- width: 100%;
- border-left: thin solid lightgrey;
- padding: 20px 0 0 50px;
- margin-left: 10px;
- height: 100vh;
- bottom: 10px;
-}
-
.form-group {
width: 25%;
}
diff --git a/static/src/app/users/award-user/award-user.component.ts b/static/src/app/users/award-user/award-user.component.ts
index 0ab6e37..4ee5d92 100644
--- a/static/src/app/users/award-user/award-user.component.ts
+++ b/static/src/app/users/award-user/award-user.component.ts
@@ -8,7 +8,7 @@ import {DecorationService} from "../../services/decoration-service/decoration.se
@Component({
templateUrl: './award-user.component.html',
- styleUrls: ['./award-user.component.css'],
+ styleUrls: ['./award-user.component.css', '../../style/overview.css', '../../style/hide-scrollbar.css'],
})
export class AwardUserComponent {
diff --git a/static/src/app/users/edit-user/edit-user.component.ts b/static/src/app/users/edit-user/edit-user.component.ts
index df115f3..8b495ce 100644
--- a/static/src/app/users/edit-user/edit-user.component.ts
+++ b/static/src/app/users/edit-user/edit-user.component.ts
@@ -10,7 +10,7 @@ import {NgForm} from "@angular/forms";
@Component({
templateUrl: './edit-user.component.html',
- styleUrls: ['./edit-user.component.css', '../../style/entry-form.css'],
+ styleUrls: ['./edit-user.component.css', '../../style/entry-form.css', '../../style/overview.css'],
})
export class EditUserComponent {