diff --git a/static/src/app/app.module.ts b/static/src/app/app.module.ts
index 5c8f9c6..c92e571 100644
--- a/static/src/app/app.module.ts
+++ b/static/src/app/app.module.ts
@@ -26,6 +26,7 @@ import {SnackBarService} from './services/user-interface/snack-bar/snack-bar.ser
import {HttpClientModule} from '@angular/common/http';
import {SpinnerService} from './services/user-interface/spinner/spinner.service';
import {MatSnackBarModule} from '@angular/material';
+import {DataTraceService} from './services/army-service/data-trace.service';
@NgModule({
imports: [SharedModule, BrowserModule, BrowserAnimationsModule, appRouting, HttpModule, HttpClientModule,
@@ -51,7 +52,8 @@ import {MatSnackBarModule} from '@angular/material';
routingProviders,
CookieService,
SnackBarService,
- SpinnerService
+ SpinnerService,
+ DataTraceService,
],
declarations: [
AppComponent,
diff --git a/static/src/app/pub/decoration-overview/decoration-overview.component.css b/static/src/app/pub/decoration-overview/decoration-overview.component.css
index 5c1c52a..5dfee0c 100644
--- a/static/src/app/pub/decoration-overview/decoration-overview.component.css
+++ b/static/src/app/pub/decoration-overview/decoration-overview.component.css
@@ -13,12 +13,12 @@ h1, h3 {
.decoration-overview-container {
max-width: 1782px;
min-width: 927px;
- margin:auto;
position: relative;
+ margin: auto auto 25px;
}
.fraction-global {
- display: flow-root;
+ display: inline-block;
}
.fraction-global > h3 {
@@ -29,12 +29,12 @@ h1, h3 {
float: left;
width: 50%;
padding-right:81px;
- margin-bottom: 135px;
+ margin-bottom: 70px;
}
.fraction-right {
float: right;
width: 50%;
padding-left:81px;
- margin-bottom: 135px;
+ margin-bottom: 70px;
}
diff --git a/static/src/app/pub/decoration-overview/decoration-overview.component.html b/static/src/app/pub/decoration-overview/decoration-overview.component.html
index 6c36c11..4d95372 100644
--- a/static/src/app/pub/decoration-overview/decoration-overview.component.html
+++ b/static/src/app/pub/decoration-overview/decoration-overview.component.html
@@ -1,24 +1,27 @@
Übersicht über alle Auszeichnungen
-
-
Global
-
-
-
-
{{fraction.BLUFOR}}
+ [decoration]="decoration"
+ (select)="select($event)">
{{fraction.OPFOR}}
+ [decoration]="decoration"
+ (select)="select($event)">
+
+
+
+
+
Global
+
diff --git a/static/src/app/pub/decoration-overview/decoration-overview.component.ts b/static/src/app/pub/decoration-overview/decoration-overview.component.ts
index 470d04d..e06d9a6 100644
--- a/static/src/app/pub/decoration-overview/decoration-overview.component.ts
+++ b/static/src/app/pub/decoration-overview/decoration-overview.component.ts
@@ -7,6 +7,7 @@ import {CSSHelpers} from '../../utils/global.helpers';
import {RouteConfig} from '../../app.config';
import {Decoration} from '../../models/model-interfaces';
import {DecorationService} from '../../services/army-management/decoration.service';
+import {DataTraceService} from '../../services/army-service/data-trace.service';
@Component({
@@ -29,6 +30,7 @@ export class DecorationOverviewComponent implements OnInit, OnDestroy {
constructor(private router: Router,
private route: ActivatedRoute,
private decorationService: DecorationService,
+ private dataTraceService: DataTraceService,
@Inject(DOCUMENT) private document) {
}
@@ -45,6 +47,11 @@ export class DecorationOverviewComponent implements OnInit, OnDestroy {
});
};
+ select(decoration: Decoration) {
+ this.dataTraceService.setData(decoration);
+ this.router.navigate(['../find'], {relativeTo: this.route});
+ }
+
ngOnDestroy() {
if (!this.router.url.includes(RouteConfig.overviewPath)) {
this.document.getElementById('right').setAttribute('style', '');
diff --git a/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.css b/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.css
index 0bf1ca2..189a0ea 100644
--- a/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.css
+++ b/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.css
@@ -6,6 +6,7 @@
padding: 0;
overflow: hidden;
float: left;
+ cursor: pointer;
}
.decoration-card:hover {
diff --git a/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.html b/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.html
index 592bc22..4886e5d 100644
--- a/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.html
+++ b/static/src/app/pub/decoration-overview/decoration-panel/decoration-panel.component.html
@@ -1,4 +1,4 @@
-
+

img {
diff --git a/static/src/app/pub/rank-overview/rank-overview.component.html b/static/src/app/pub/rank-overview/rank-overview.component.html
index 53d75df..b208e7b 100644
--- a/static/src/app/pub/rank-overview/rank-overview.component.html
+++ b/static/src/app/pub/rank-overview/rank-overview.component.html
@@ -17,7 +17,7 @@
|
-
|
+
@@ -37,7 +37,7 @@
-
+
diff --git a/static/src/app/pub/rank-overview/rank-overview.component.ts b/static/src/app/pub/rank-overview/rank-overview.component.ts
index 45f7989..53f59e0 100644
--- a/static/src/app/pub/rank-overview/rank-overview.component.ts
+++ b/static/src/app/pub/rank-overview/rank-overview.component.ts
@@ -3,9 +3,10 @@ import {ActivatedRoute, Router} from '@angular/router';
import {DOCUMENT} from '@angular/common';
import {Fraction} from '../../utils/fraction.enum';
import {CSSHelpers} from '../../utils/global.helpers';
-import {RouteConfig} from '../../app.config';
+import {AppConfig, RouteConfig} from '../../app.config';
import {Rank} from '../../models/model-interfaces';
import {RankService} from '../../services/army-management/rank.service';
+import {DataTraceService} from '../../services/army-service/data-trace.service';
@Component({
@@ -26,6 +27,7 @@ export class RankOverviewComponent implements OnInit, OnDestroy {
constructor(private router: Router,
private route: ActivatedRoute,
private rankService: RankService,
+ private dataTraceService: DataTraceService,
@Inject(DOCUMENT) private document) {
}
@@ -41,6 +43,11 @@ export class RankOverviewComponent implements OnInit, OnDestroy {
});
};
+ selectRow(row: Rank) {
+ this.dataTraceService.setData(row);
+ this.router.navigate(['../find'], {relativeTo: this.route});
+ }
+
ngOnDestroy() {
if (!this.router.url.includes(RouteConfig.overviewPath)) {
diff --git a/static/src/app/pub/trace-overview/trace-overview.component.css b/static/src/app/pub/trace-overview/trace-overview.component.css
new file mode 100644
index 0000000..e69de29
diff --git a/static/src/app/pub/trace-overview/trace-overview.component.html b/static/src/app/pub/trace-overview/trace-overview.component.html
new file mode 100644
index 0000000..e69de29
diff --git a/static/src/app/pub/trace-overview/trace-overview.component.ts b/static/src/app/pub/trace-overview/trace-overview.component.ts
new file mode 100644
index 0000000..18b519b
--- /dev/null
+++ b/static/src/app/pub/trace-overview/trace-overview.component.ts
@@ -0,0 +1,46 @@
+import {Component, Inject, Input, OnDestroy, OnInit} from '@angular/core';
+import {ActivatedRoute, Router} from '@angular/router';
+import {DOCUMENT} from '@angular/common';
+import {Fraction} from '../../utils/fraction.enum';
+import {CSSHelpers} from '../../utils/global.helpers';
+import {RouteConfig} from '../../app.config';
+import {RankService} from '../../services/army-management/rank.service';
+import {DataTraceService} from '../../services/army-service/data-trace.service';
+import {Decoration, Rank} from '../../models/model-interfaces';
+
+
+@Component({
+ selector: 'cc-trace-overview',
+ templateUrl: './trace-overview.component.html',
+ styleUrls: ['./trace-overview.component.css']
+})
+export class TraceOverviewComponent implements OnInit, OnDestroy {
+
+ traceItem: Rank | Decoration;
+
+ displayedColumns: string[] = ['picture', 'name'];
+
+ readonly fraction = Fraction;
+
+ constructor(private router: Router,
+ private route: ActivatedRoute,
+ private rankService: RankService,
+ private dataTraceService: DataTraceService,
+ @Inject(DOCUMENT) private document) {
+ this.traceItem = this.dataTraceService.getData();
+ }
+
+ ngOnInit() {
+ // set background image css
+ this.document.getElementById('right').setAttribute('style', CSSHelpers.getBackgroundCSS('../assets/bg.jpg'));
+
+ console.log(typeof this.traceItem);
+ };
+
+
+ ngOnDestroy() {
+ if (!this.router.url.includes(RouteConfig.overviewPath)) {
+ this.document.getElementById('right').setAttribute('style', '');
+ }
+ }
+}
diff --git a/static/src/app/services/army-service/army.service.ts b/static/src/app/services/army-service/army.service.ts
index cba89a5..bf2d90c 100644
--- a/static/src/app/services/army-service/army.service.ts
+++ b/static/src/app/services/army-service/army.service.ts
@@ -16,4 +16,3 @@ export class ArmyService {
}
}
-
diff --git a/static/src/app/services/army-service/data-trace.service.ts b/static/src/app/services/army-service/data-trace.service.ts
new file mode 100644
index 0000000..818e2bb
--- /dev/null
+++ b/static/src/app/services/army-service/data-trace.service.ts
@@ -0,0 +1,16 @@
+import {Injectable} from '@angular/core';
+import {Decoration, Rank} from '../../models/model-interfaces';
+
+@Injectable()
+export class DataTraceService {
+
+ data: Rank | Decoration = {};
+
+ setData(data: Rank | Decoration) {
+ this.data = data;
+ }
+
+ getData(): Rank | Decoration {
+ return this.data;
+ }
+}