-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create dialog to show all demands and capacities
- Loading branch information
1 parent
a602c88
commit b6d6543
Showing
8 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ontend/src/app/shared/components/load-demands-metrics/load-demands-metrics.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="title metric-box-title" mat-dialog-title> | ||
<div class="m-0 mr-6"> | ||
{{ data.isShipmentDemands ? 'Total shipment demands' : 'Total vehicle capacity' }} | ||
</div> | ||
<button mat-icon-button type="button" title="Cancel" matDialogClose=""> | ||
<mat-icon svgIcon="clear"></mat-icon> | ||
</button> | ||
</div> | ||
<div mat-dialog-container> | ||
<div *ngFor="let kpi of data.kpis" class="metric-box-value"> | ||
{{ kpi.selected | number }} {{ kpi.type }} | ||
</div> | ||
</div> |
5 changes: 5 additions & 0 deletions
5
...ontend/src/app/shared/components/load-demands-metrics/load-demands-metrics.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.title { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} |
22 changes: 22 additions & 0 deletions
22
...end/src/app/shared/components/load-demands-metrics/load-demands-metrics.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { LoadDemandsMetricsComponent } from './load-demands-metrics.component'; | ||
|
||
describe('LoadDemandsMetricsComponent', () => { | ||
let component: LoadDemandsMetricsComponent; | ||
let fixture: ComponentFixture<LoadDemandsMetricsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [LoadDemandsMetricsComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(LoadDemandsMetricsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
...frontend/src/app/shared/components/load-demands-metrics/load-demands-metrics.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; | ||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | ||
import { LoadDemandKPI } from 'src/app/core/models'; | ||
|
||
@Component({ | ||
selector: 'app-load-demands-metrics', | ||
templateUrl: './load-demands-metrics.component.html', | ||
styleUrls: ['./load-demands-metrics.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class LoadDemandsMetricsComponent { | ||
constructor( | ||
private dialogRef: MatDialogRef<LoadDemandsMetricsComponent>, | ||
@Inject(MAT_DIALOG_DATA) | ||
public data: { | ||
kpis: LoadDemandKPI[]; | ||
isShipmentDemands: boolean; | ||
} | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters