-
-
-
TEASE
+
+
+
+
TEASE
+
+
+
+
+
+
+
+
+
+
+
+
@@ -19,69 +49,6 @@
-
-
-
diff --git a/src/app/app.component.scss b/src/app/app.component.scss
index cee7e0f4a..822548e09 100644
--- a/src/app/app.component.scss
+++ b/src/app/app.component.scss
@@ -15,31 +15,6 @@
background-color: $gray-f5;
}
-// toolbar
-.title-bar {
- width: 100vw;
- height: $toolbar-height;
- background-color: $primary-color;
- position:sticky;
-}
-
-.title-bar-item-container {
- padding: 10px 20px;
-}
-
-@include horizontal-spacing(toolbar-items-spacing, 5px);
-
-.icon {
- height: 60px;
- margin-right: 20px;
-}
-
-.app-title {
- color: white;
- font-size: 40px;
- font-weight: 100;
-}
-
/* overlay container */
.overlay-container {
margin-top: auto;
@@ -79,15 +54,3 @@
width: 100vw;
overflow: hidden;
}
-
-// toolbar temporary
-.buttons-overlay {
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
-}
-
-.buttons-overlay-item {
- margin: 10px 10px 0 0;
-}
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index a8afeb038..9e328ff75 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,4 +1,4 @@
-import { Component, ComponentFactoryResolver, EventEmitter, Type, ViewChild, ViewEncapsulation } from '@angular/core';
+import { Component, ComponentFactoryResolver, Type, ViewChild, ViewEncapsulation } from '@angular/core';
import { TeamService } from './shared/layers/business-logic-layer/team.service';
import { DashboardComponent } from './dashboard/dashboard/dashboard.component';
import { OverlayHostDirective } from './overlay-host.directive';
@@ -9,6 +9,7 @@ import { PersonHighlightingOverlayComponent } from './dashboard/person-highlight
import { Location } from '@angular/common';
import { ExportOverlayComponent } from './dashboard/export-overlay/export-overlay.component';
import { ConstraintLoggingService } from './shared/layers/business-logic-layer/constraint-logging.service';
+import { ConstraintsOverlayComponent } from './dashboard/constraints-overlay/constraints-overlay.component';
@Component({
selector: 'app-root',
@@ -18,8 +19,6 @@ import { ConstraintLoggingService } from './shared/layers/business-logic-layer/c
})
export class AppComponent implements OverlayServiceHost {
overlayVisible = false;
- teamStatisticsButtonPressed = new EventEmitter
();
- toggleTeamStatisticsButtonState = true;
@ViewChild(DashboardComponent)
dashboardComponent: DashboardComponent;
@@ -41,7 +40,7 @@ export class AppComponent implements OverlayServiceHost {
history.pushState(null, '', '#TEASE');
};
pushState();
- this.location.subscribe(event => {
+ this.location.subscribe(() => {
pushState();
});
}
@@ -97,6 +96,14 @@ export class AppComponent implements OverlayServiceHost {
this.overlayService.displayComponent(PersonHighlightingOverlayComponent, {});
}
+ openConstraintsDialog(): void {
+ this.overlayService.displayComponent(ConstraintsOverlayComponent, { displayWarning: !this.areAllTeamsEmpty() });
+ }
+
+ protected areAllTeamsEmpty(): boolean {
+ return this.teamService.teams.reduce((acc, team) => acc && !team.persons.length, true);
+ }
+
/* OverlayServiceHost interface */
public displayComponent(component: Type, data: any) {
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(component);
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 5d219a866..8294bfe72 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -20,6 +20,8 @@ import { LPTeamGenerationService } from './shared/layers/business-logic-layer/te
import { HighlightingToolbarComponent } from './highlighting-toolbar/highlighting-toolbar.component';
import { Location, LocationStrategy, PathLocationStrategy } from '@angular/common';
import { ReactiveFormsModule } from '@angular/forms';
+import { MatTooltipModule } from '@angular/material/tooltip';
+import { MatMenuModule } from '@angular/material/menu';
@NgModule({
declarations: [AppComponent, OverlayHostDirective, HighlightingToolbarComponent],
@@ -33,9 +35,11 @@ import { ReactiveFormsModule } from '@angular/forms';
AppRoutingModule,
DragulaModule.forRoot(),
ReactiveFormsModule,
+ MatTooltipModule,
/* own modules */
SharedModule,
DashboardModule,
+ MatMenuModule,
],
providers: [
TeamService,
diff --git a/src/app/dashboard/dashboard/dashboard.component.html b/src/app/dashboard/dashboard/dashboard.component.html
index eb8272960..cfdd6fac2 100644
--- a/src/app/dashboard/dashboard/dashboard.component.html
+++ b/src/app/dashboard/dashboard/dashboard.component.html
@@ -30,20 +30,20 @@
mat-raised-button
color="primary"
class="distribute-button flex-no-shrink"
- (click)="togglePersonPoolStatistics()">
-