Skip to content

Commit e8ebb9a

Browse files
Template out showing start time windows
1 parent 5da2b4e commit e8ebb9a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

application/frontend/src/app/core/components/base-pre-solve-vehicle-info-window/base-pre-solve-vehicle-info-window.component.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,14 @@
1313
<div>None</div>
1414
</ng-template>
1515
</div>
16+
<div class="text__caption">
17+
<div class="strong underline">Start Windows</div>
18+
<div *ngIf="startTimeWindows.length; else noStartWindows">
19+
<div *ngFor="let window of startTimeWindows">
20+
<span>{{ window | formatHardTimeWindow }}</span>
21+
</div>
22+
</div>
23+
<ng-template #noStartWindows>
24+
<div>None</div>
25+
</ng-template>
26+
</div>

application/frontend/src/app/core/components/base-pre-solve-vehicle-info-window/base-pre-solve-vehicle-info-window.component.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ limitations under the License.
1515
*/
1616
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
1717
import { Vehicle } from '../../models';
18+
import { timeWindowToDuration } from 'src/app/util';
1819

1920
@Component({
2021
selector: 'app-base-pre-solve-vehicle-info-window',
@@ -27,9 +28,20 @@ export class BasePreSolveVehicleInfoWindowComponent implements OnChanges {
2728

2829
loadLimitsNames: string[] = [];
2930
loadLimitsValues: string[] = [];
31+
startTimeWindows: {
32+
startDate: string;
33+
startTime: string;
34+
endDate?: string;
35+
endTime: string;
36+
}[] = [];
3037

3138
ngOnChanges(_changes: SimpleChanges): void {
3239
this.getFormattedLoadLimits();
40+
this.getFormattedTimeWindows();
41+
}
42+
43+
getFormattedTimeWindows(): void {
44+
this.startTimeWindows = [];
3345
}
3446

3547
getFormattedLoadLimits(): void {

0 commit comments

Comments
 (0)