Compare commits
No commits in common. "783d30e91ef00a7054ce6e14caabc215816bd8c9" and "0a5c70d465c93eec65c82f23544018e78f0bd53b" have entirely different histories.
783d30e91e
...
0a5c70d465
|
@ -2132,9 +2132,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"circular-json": {
|
"circular-json": {
|
||||||
"version": "0.5.5",
|
"version": "0.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.4.tgz",
|
||||||
"integrity": "sha512-13YaR6kiz0kBNmIVM87Io8Hp7bWOo4r61vkEANy8iH9R9bc6avud/1FT0SBpqR1RpIQADOh/Q+yHZDA1iL6ysA==",
|
"integrity": "sha512-vnJA8KS0BfOihugYEUkLRcnmq21FbuivbxgzDLXNs3zIk4KllV4Mx4UuTzBXht9F00C7QfD1YqMXg1zP6EXpig==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"class-utils": {
|
"class-utils": {
|
||||||
|
@ -3569,9 +3569,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"escodegen": {
|
"escodegen": {
|
||||||
"version": "1.11.0",
|
"version": "1.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz",
|
||||||
"integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==",
|
"integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -7067,9 +7067,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"log4js": {
|
"log4js": {
|
||||||
"version": "2.11.0",
|
"version": "2.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/log4js/-/log4js-2.10.0.tgz",
|
||||||
"integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==",
|
"integrity": "sha512-NnhN9PjFF9zhxinAjlmDYvkqqrIW+yA3LLJAoTJ3fs6d1zru86OqQHfsxiUcc1kRq3z+faGR4DeyXUfiNbVxKQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"amqplib": "^0.5.2",
|
"amqplib": "^0.5.2",
|
||||||
|
@ -7739,9 +7739,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ngx-cookie-service": {
|
"ngx-cookie-service": {
|
||||||
"version": "1.0.10",
|
"version": "1.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/ngx-cookie-service/-/ngx-cookie-service-1.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/ngx-cookie-service/-/ngx-cookie-service-1.0.9.tgz",
|
||||||
"integrity": "sha512-TAXpQsIONAupTqkUDcH44hFQsLTvsXpxM80eKgxvy3vhBFfT1uIdR7BRhM7VpUW5J7BN9qCbGNgLN5lsnVu7pw=="
|
"integrity": "sha512-n4kTAZQr4EnnQLBaRPMjSmf98N/aLlYWknmbRunonJj9aMhpT1Nki6PfjBuRPl5DxT/9NMAVrQyvk66k/pJ0uQ=="
|
||||||
},
|
},
|
||||||
"ngx-infinite-scroll": {
|
"ngx-infinite-scroll": {
|
||||||
"version": "0.5.2",
|
"version": "0.5.2",
|
||||||
|
@ -8578,17 +8578,6 @@
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"socks-proxy-agent": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"agent-base": "^4.1.0",
|
|
||||||
"socks": "^1.1.10"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -9125,9 +9114,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"proxy-agent": {
|
"proxy-agent": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.0.tgz",
|
||||||
"integrity": "sha512-mAZexaz9ZxQhYPWfAjzlrloEjW+JHiBFryE4AJXFDTnaXfmH/FKqC1swTRKuEPbHWz02flQNXFOyDUF7zfEG6A==",
|
"integrity": "sha512-g6n6vnk8fRf705ShN+FEXFG/SDJaW++lSs0d9KaJh4uBWW/wi7en4Cpo5VYQW3SZzAE121lhB/KLQrbURoubZw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -9138,7 +9127,7 @@
|
||||||
"lru-cache": "^4.1.2",
|
"lru-cache": "^4.1.2",
|
||||||
"pac-proxy-agent": "^2.0.1",
|
"pac-proxy-agent": "^2.0.1",
|
||||||
"proxy-from-env": "^1.0.0",
|
"proxy-from-env": "^1.0.0",
|
||||||
"socks-proxy-agent": "^4.0.1"
|
"socks-proxy-agent": "^3.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": {
|
"debug": {
|
||||||
|
@ -10150,8 +10139,7 @@
|
||||||
"version": "1.1.15",
|
"version": "1.1.15",
|
||||||
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
|
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
|
||||||
"integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=",
|
"integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"smtp-connection": {
|
"smtp-connection": {
|
||||||
"version": "2.12.0",
|
"version": "2.12.0",
|
||||||
|
@ -10373,41 +10361,19 @@
|
||||||
"resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
|
"resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
|
||||||
"integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
|
"integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ip": "^1.1.4",
|
"ip": "^1.1.4",
|
||||||
"smart-buffer": "^1.0.13"
|
"smart-buffer": "^1.0.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"socks-proxy-agent": {
|
"socks-proxy-agent": {
|
||||||
"version": "4.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz",
|
||||||
"integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==",
|
"integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"agent-base": "~4.2.0",
|
"agent-base": "^4.1.0",
|
||||||
"socks": "~2.2.0"
|
"socks": "^1.1.10"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"smart-buffer": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"socks": {
|
|
||||||
"version": "2.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz",
|
|
||||||
"integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"ip": "^1.1.5",
|
|
||||||
"smart-buffer": "^4.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"source-list-map": {
|
"source-list-map": {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"jquery-ui": "^1.12.0",
|
"jquery-ui": "^1.12.0",
|
||||||
"jquery-ui-bundle": "^1.11.4",
|
"jquery-ui-bundle": "^1.11.4",
|
||||||
"ngx-clipboard": "^11.1.1",
|
"ngx-clipboard": "^11.1.1",
|
||||||
"ngx-cookie-service": "^1.0.10",
|
"ngx-cookie-service": "^1.0.9",
|
||||||
"ngx-infinite-scroll": "^0.5.2",
|
"ngx-infinite-scroll": "^0.5.2",
|
||||||
"rxjs-compat": "^6.2.1",
|
"rxjs-compat": "^6.2.1",
|
||||||
"ts-helpers": "^1.1.2",
|
"ts-helpers": "^1.1.2",
|
||||||
|
|
|
@ -15,10 +15,6 @@ li {
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-toggle-btn mat-icon {
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
|
|
|
@ -20,34 +20,24 @@
|
||||||
<li routerLinkActive="active">
|
<li routerLinkActive="active">
|
||||||
<a [routerLink]="[config.publicPath,{outlets:{right:'ranks'}}]" class="link">Ränge</a>
|
<a [routerLink]="[config.publicPath,{outlets:{right:'ranks'}}]" class="link">Ränge</a>
|
||||||
</li>
|
</li>
|
||||||
<li routerLinkActive="active">
|
<!--<li routerLinkActive="active">-->
|
||||||
<a [routerLink]="[config.publicPath,{outlets:{right:'decorations'}}]" class="link">Auszeichnungen</a>
|
<!--<a [routerLink]="[config.publicPath,{outlets:{right:'decorations'}}]" class="link">Auszeichnungen</a>-->
|
||||||
</li>
|
<!--</li>-->
|
||||||
<li routerLinkActive="active">
|
<li routerLinkActive="active">
|
||||||
<a routerLink='{{config.statsPath}}' class="link">Statistiken</a>
|
<a routerLink='{{config.statsPath}}' class="link">Statistiken</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="loginService.hasPermission(2)"
|
<li *ngIf="loginService.hasPermission(2)" routerLinkActive="active">
|
||||||
class="dropdown">
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
|
||||||
aria-expanded="false">
|
|
||||||
Verwaltung
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li routerLinkActive="active">
|
|
||||||
<a routerLink='{{config.userPath}}' class="link">Teilnehmer</a>
|
<a routerLink='{{config.userPath}}' class="link">Teilnehmer</a>
|
||||||
</li>
|
</li>
|
||||||
<li routerLinkActive="active">
|
<li *ngIf="loginService.hasPermission(2)" routerLinkActive="active">
|
||||||
<a routerLink='{{config.squadPath}}' class="link">Squads</a>
|
<a routerLink='{{config.squadPath}}' class="link">Squads</a>
|
||||||
</li>
|
</li>
|
||||||
<li routerLinkActive="active">
|
<li *ngIf="loginService.hasPermission(2)" routerLinkActive="active">
|
||||||
<a routerLink='{{config.decorationPath}}' class="link">Auszeichnungen</a>
|
<a routerLink='{{config.decorationPath}}' class="link">Auszeichnungen</a>
|
||||||
</li>
|
</li>
|
||||||
<li routerLinkActive="active">
|
<li *ngIf="loginService.hasPermission(2)" routerLinkActive="active">
|
||||||
<a routerLink='{{config.rankPath}}' class="link">Ränge</a>
|
<a routerLink='{{config.rankPath}}' class="link">Ränge</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li *ngIf="loginService.hasPermission(1) && !loginService.hasPermission(2) && loginService.hasSquad()"
|
<li *ngIf="loginService.hasPermission(1) && !loginService.hasPermission(2) && loginService.hasSquad()"
|
||||||
class="dropdown">
|
class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
||||||
|
|
|
@ -1,42 +1,75 @@
|
||||||
table {
|
.squad-layout {
|
||||||
width: 100%;
|
overflow: hidden;
|
||||||
margin-bottom: 20px;
|
padding: 5px 15px 5px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ table.mat-table {
|
.row {
|
||||||
background: rgba(255, 255, 255, 0.6);
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.squad-cell {
|
||||||
|
display: table-cell;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.colored-row {
|
||||||
|
background: rgb(34, 34, 34);
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-row {
|
||||||
|
border-radius: 12px 12px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-row {
|
||||||
|
border-radius: 0 0 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.middle-row {
|
||||||
|
min-height: 120px;
|
||||||
|
border: rgb(34, 34, 34);
|
||||||
|
background-color: rgba(255, 255, 255, 0.88);
|
||||||
|
border-left-style: solid;
|
||||||
|
border-right-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: whitesmoke;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name-cell {
|
||||||
|
display: inherit;
|
||||||
|
margin-left: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
td > img {
|
img {
|
||||||
margin: 5px 2px;
|
position: absolute;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-left: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-column-image {
|
.member-link {
|
||||||
width: 160px;
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-column-fraction {
|
.army-head {
|
||||||
width: 90px;
|
font-weight: bolder;
|
||||||
text-indent: 10px;
|
text-align: center
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-column-description {
|
.member-count {
|
||||||
width: 55%;
|
margin-top: 15px;
|
||||||
|
padding: 8px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
color: whitesmoke;
|
||||||
|
background: #222222;
|
||||||
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.mat-row:hover {
|
|
||||||
background: rgba(231, 231, 231, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
:host /deep/ table.fixed-header-table > thead {
|
|
||||||
position: fixed;
|
|
||||||
display: inherit;
|
|
||||||
width: 1100px;
|
|
||||||
background: white;
|
|
||||||
top: 50px;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,44 +1,18 @@
|
||||||
<div style="width: 1100px; margin:auto; position: relative;">
|
<div style="width: 1100px; margin:auto; position: relative;">
|
||||||
<h1>Übersicht über alle Auszeichnungen</h1>
|
<h1>Übersicht über alle Ränge</h1>
|
||||||
|
|
||||||
<table mat-table
|
<div class="pull-left" style="width: 45%;">
|
||||||
[dataSource]="rows"
|
<h3 class="army-head" [style.color]="fraction.COLOR_BLUFOR">{{fraction.BLUFOR}}</h3>
|
||||||
[class.fixed-header-table]="hasFixedTableHeader"
|
<div class="squad-layout" *ngFor="let decoration of decorations">
|
||||||
class="mat-elevation-z8">
|
{{decoration.name}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ng-container matColumnDef="{{columnMap[0].prop}}">
|
<div class="pull-right" style="width: 45%;">
|
||||||
<th mat-header-cell *matHeaderCellDef>{{columnMap[0].head}}</th>
|
<h3 class="army-head" [style.color]="fraction.COLOR_OPFOR">{{fraction.OPFOR}}</h3>
|
||||||
<td mat-cell *matCellDef="let element">
|
<div class="squad-layout" *ngFor="let decoration of decorations">
|
||||||
<img src="resource/decoration/{{element._id}}.png"
|
{{decoration.name}}
|
||||||
matTooltip="{{element.name}}"
|
</div>
|
||||||
alt="{{element.name}}">
|
</div>
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="{{columnMap[1].prop}}">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>{{columnMap[1].head}}</th>
|
|
||||||
<td mat-cell *matCellDef="let element">{{element[columnMap[1].prop]}}</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="{{columnMap[2].prop}}">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>{{columnMap[2].head}}</th>
|
|
||||||
<td mat-cell *matCellDef="let element"
|
|
||||||
[style.color]="element['fraction'] === 'BLUFOR' ?
|
|
||||||
fraction.COLOR_BLUFOR :
|
|
||||||
element['fraction'] === 'OPFOR' ? fraction.COLOR_OPFOR : '#666666'">
|
|
||||||
{{element[columnMap[2].prop] === 'BLUFOR'?
|
|
||||||
'NATO' :
|
|
||||||
element[columnMap[2].prop] === 'OPFOR' ? 'CSAT' : 'GLOBAL'}}
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="{{columnMap[3].prop}}">
|
|
||||||
<th mat-header-cell *matHeaderCellDef>{{columnMap[3].head}}</th>
|
|
||||||
<td mat-cell *matCellDef="let element">{{element[columnMap[3].prop]}}</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {Component, HostListener, Inject, OnDestroy, OnInit} from '@angular/core';
|
import {Component, Inject, OnDestroy, OnInit} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
import {DOCUMENT} from '@angular/common';
|
import {DOCUMENT} from '@angular/common';
|
||||||
|
@ -16,20 +16,7 @@ import {DecorationService} from '../../services/army-management/decoration.servi
|
||||||
})
|
})
|
||||||
export class DecorationOverviewComponent implements OnInit, OnDestroy {
|
export class DecorationOverviewComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
rows: Decoration[];
|
decorations: Decoration[];
|
||||||
|
|
||||||
columnMap = [
|
|
||||||
{prop: 'image', head: 'Abbildung'},
|
|
||||||
{prop: 'name', head: 'Bezeichnung'},
|
|
||||||
{prop: 'fraction', head: 'Fraktion'},
|
|
||||||
{prop: 'description', head: 'Beschreibung'}
|
|
||||||
];
|
|
||||||
|
|
||||||
displayedColumns = this.columnMap.map(col => col.prop);
|
|
||||||
|
|
||||||
tableHeaderFixedVal = 100;
|
|
||||||
|
|
||||||
hasFixedTableHeader = false;
|
|
||||||
|
|
||||||
readonly fraction = Fraction;
|
readonly fraction = Fraction;
|
||||||
|
|
||||||
|
@ -43,19 +30,13 @@ export class DecorationOverviewComponent implements OnInit, OnDestroy {
|
||||||
// set background image css
|
// set background image css
|
||||||
this.document.getElementById('right').setAttribute('style', CSSHelpers.getBackgroundCSS('../assets/bg.jpg'));
|
this.document.getElementById('right').setAttribute('style', CSSHelpers.getBackgroundCSS('../assets/bg.jpg'));
|
||||||
|
|
||||||
// init decoration data
|
// init rank data
|
||||||
this.decorationService.findDecorations()
|
this.decorationService.findDecorations()
|
||||||
.subscribe(decorations => {
|
.subscribe(decorations => {
|
||||||
this.rows = decorations;
|
this.decorations = decorations;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@HostListener('window:scroll', [])
|
|
||||||
onWindowScroll() {
|
|
||||||
this.hasFixedTableHeader = document.body.scrollTop > this.tableHeaderFixedVal
|
|
||||||
|| document.documentElement.scrollTop > this.tableHeaderFixedVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
if (!this.router.url.includes(RouteConfig.overviewPath)) {
|
if (!this.router.url.includes(RouteConfig.overviewPath)) {
|
||||||
this.document.getElementById('right').setAttribute('style', '');
|
this.document.getElementById('right').setAttribute('style', '');
|
||||||
|
|
|
@ -5,7 +5,6 @@ import {RankService} from '../services/army-management/rank.service';
|
||||||
import {pubRouterModule, pubRoutingComponents} from './public.routing';
|
import {pubRouterModule, pubRoutingComponents} from './public.routing';
|
||||||
import {DecorationService} from '../services/army-management/decoration.service';
|
import {DecorationService} from '../services/army-management/decoration.service';
|
||||||
import {MatTableModule} from '@angular/material/table';
|
import {MatTableModule} from '@angular/material/table';
|
||||||
import {MatSortModule} from '@angular/material';
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -66,7 +66,6 @@ export class StatisticOverviewComponent implements OnInit {
|
||||||
itemsProcessed++;
|
itemsProcessed++;
|
||||||
if (itemsProcessed === campaigns.length) {
|
if (itemsProcessed === campaigns.length) {
|
||||||
if (this.id === 'all') {
|
if (this.id === 'all') {
|
||||||
this.timeline = true;
|
|
||||||
this.title = 'Gesamtübersicht';
|
this.title = 'Gesamtübersicht';
|
||||||
wars.sort((a, b) => {
|
wars.sort((a, b) => {
|
||||||
// sort by dates, because older campaign can contain newer war
|
// sort by dates, because older campaign can contain newer war
|
||||||
|
@ -111,34 +110,34 @@ export class StatisticOverviewComponent implements OnInit {
|
||||||
|
|
||||||
for (let i = wars.length - 1; i >= 0; i--) {
|
for (let i = wars.length - 1; i >= 0; i--) {
|
||||||
const j = wars.length - i - 1;
|
const j = wars.length - i - 1;
|
||||||
const warDate = (this.id === 'all') ? new Date(wars[i].date) : ChartUtils.getShortDateString(wars[i].date);
|
const warDateString = ChartUtils.getShortDateString(wars[i].date);
|
||||||
|
|
||||||
pointsObj[0].series.push({
|
pointsObj[0].series.push({
|
||||||
name: warDate,
|
name: warDateString,
|
||||||
value: wars[i].ptBlufor
|
value: wars[i].ptBlufor
|
||||||
});
|
});
|
||||||
pointsObj[1].series.push({
|
pointsObj[1].series.push({
|
||||||
name: warDate,
|
name: warDateString,
|
||||||
value: wars[i].ptOpfor
|
value: wars[i].ptOpfor
|
||||||
});
|
});
|
||||||
pointsSumObj[0].series.push({
|
pointsSumObj[0].series.push({
|
||||||
name: warDate,
|
name: warDateString,
|
||||||
value: pointsSumObj[0].series[j - 1] ?
|
value: pointsSumObj[0].series[j - 1] ?
|
||||||
pointsSumObj[0].series[j - 1].value + wars[i].ptBlufor :
|
pointsSumObj[0].series[j - 1].value + wars[i].ptBlufor :
|
||||||
wars[i].ptBlufor
|
wars[i].ptBlufor
|
||||||
});
|
});
|
||||||
pointsSumObj[1].series.push({
|
pointsSumObj[1].series.push({
|
||||||
name: warDate,
|
name: warDateString,
|
||||||
value: pointsSumObj[1].series[j - 1]
|
value: pointsSumObj[1].series[j - 1]
|
||||||
? pointsSumObj[1].series[j - 1].value + wars[i].ptOpfor :
|
? pointsSumObj[1].series[j - 1].value + wars[i].ptOpfor :
|
||||||
wars[i].ptOpfor
|
wars[i].ptOpfor
|
||||||
});
|
});
|
||||||
playersObj[0].series.push({
|
playersObj[0].series.push({
|
||||||
name: warDate,
|
name: warDateString,
|
||||||
value: wars[i].playersBlufor
|
value: wars[i].playersBlufor
|
||||||
});
|
});
|
||||||
playersObj[1].series.push({
|
playersObj[1].series.push({
|
||||||
name: warDate,
|
name: warDateString,
|
||||||
value: wars[i].playersOpfor
|
value: wars[i].playersOpfor
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -157,4 +156,5 @@ export class StatisticOverviewComponent implements OnInit {
|
||||||
isActiveSlide(index) {
|
isActiveSlide(index) {
|
||||||
return this.activeSlideIndex === index ? '#d9edf7' : 'white';
|
return this.activeSlideIndex === index ? '#d9edf7' : 'white';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue