Skip to content

Commit fe626b0

Browse files
committed
wip
Signed-off-by: Louis Greiner <[email protected]>
1 parent 71d8d77 commit fe626b0

35 files changed

+28224
-27149
lines changed

src/app/data-structures/business.data.structures.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,14 @@ export interface TrainrunSectionDto {
117117
targetNodeId: number; // reference to the node by Node.id
118118
targetPortId: number; // reference to the node by Node.id
119119

120+
sourceSymmetry: boolean; // binds sourceDeparture and sourceArrival times
121+
targetSymmetry: boolean; // binds targetDeparture and targetArrival times
120122
sourceArrival: TimeLockDto; // declares the soruce arrival time
121123
sourceDeparture: TimeLockDto; // declares the soruce departure time
122124
targetArrival: TimeLockDto; // declares the target arrival time
123125
targetDeparture: TimeLockDto; // declares the target departure time
124-
travelTime: TimeLockDto; // declares the travel arrival time
126+
travelTime: TimeLockDto; // declares the travel time (forward direction)
127+
backwardTravelTime: TimeLockDto; // declares the travel time in the opposite direction
125128

126129
numberOfStops: number; // number of stops - not declared in detail (no node attached)
127130

@@ -291,6 +294,7 @@ export interface FilterSettingDto {
291294
filterNoteLabels: number[]; // labels to filter out (labels only of type - LabelRef: note)
292295
filterTrainrunLabels: number[]; // labels to filter out (labels only of type - LabelRef: trainrun)
293296
filterTrainrunDirectionArrows: boolean; // flag for trainrun direction arrows (hide/show)
297+
filterTrainrunSectionSymmetryArrows: boolean; // flag for trainrun section symmetry arrows (hide/show)
294298
filterArrivalDepartureTime: boolean; // flag for arrival and departure time filtering (hide/show)
295299
filterTravelTime: boolean; // flag for travel time filter (hide/show)
296300
filterTrainrunName: boolean; // flag for trainrun time filter (hide/show)
@@ -300,6 +304,7 @@ export interface FilterSettingDto {
300304
filterTrainrunFrequency: TrainrunFrequency[]; // list of frequency to filter out
301305
filterTrainrunTimeCategory: TrainrunTimeCategory[]; // list of time categroy to filter out
302306
filterTrainrunDirection: TrainrunDirection[]; // list of trainrun direction to filter out
307+
filterTrainrunSectionSymmetry: boolean[]; // list of trainrun symmetry values (true/false) to filter out
303308
filterAllEmptyNodes: boolean; // flag to filter all empty nodes (hide/show)
304309
filterAllNonStopNodes: boolean; // flag to filter all only non-stop nodes (hide/show)
305310
filterNotes: boolean; // flag to filter notes (hide/show)

src/app/data-structures/technical.data.structures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export enum TrainrunSectionText {
2323
TargetDeparture,
2424
TrainrunSectionName,
2525
TrainrunSectionTravelTime,
26+
TrainrunSectionBackwardTravelTime,
2627
TrainrunSectionNumberOfStops,
2728
}
2829

@@ -38,6 +39,7 @@ export interface TrainrunSectionTextPositions {
3839
[TrainrunSectionText.TargetDeparture]: PointDto;
3940
[TrainrunSectionText.TrainrunSectionName]: PointDto;
4041
[TrainrunSectionText.TrainrunSectionTravelTime]: PointDto;
42+
[TrainrunSectionText.TrainrunSectionBackwardTravelTime]: PointDto;
4143
[TrainrunSectionText.TrainrunSectionNumberOfStops]: PointDto;
4244
}
4345

src/app/models/filterSettings.model.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class FilterSetting {
2020
public filterNoteLabels: number[];
2121
public filterTrainrunLabels: number[];
2222
public filterTrainrunDirectionArrows;
23+
public filterTrainrunSectionSymmetryArrows;
2324
public filterArrivalDepartureTime;
2425
public filterTravelTime;
2526
public filterTrainrunName;
@@ -29,6 +30,7 @@ export class FilterSetting {
2930
public filterTrainrunFrequency: TrainrunFrequency[];
3031
public filterTrainrunTimeCategory: TrainrunTimeCategory[];
3132
public filterTrainrunDirection: TrainrunDirection[];
33+
public filterTrainrunSectionSymmetry: boolean[];
3234
public filterAllEmptyNodes;
3335
public filterAllNonStopNodes;
3436
public filterNotes;
@@ -45,6 +47,7 @@ export class FilterSetting {
4547
filterNoteLabels,
4648
filterTrainrunLabels,
4749
filterTrainrunDirectionArrows,
50+
filterTrainrunSectionSymmetryArrows,
4851
filterArrivalDepartureTime,
4952
filterTravelTime,
5053
filterTrainrunName,
@@ -54,6 +57,7 @@ export class FilterSetting {
5457
filterTrainrunFrequency,
5558
filterTrainrunTimeCategory,
5659
filterTrainrunDirection,
60+
filterTrainrunSectionSymmetry,
5761
filterAllEmptyNodes,
5862
filterAllNonStopNodes,
5963
filterNotes,
@@ -68,6 +72,7 @@ export class FilterSetting {
6872
filterNoteLabels: [],
6973
filterTrainrunLabels: [],
7074
filterTrainrunDirectionArrows: true,
75+
filterTrainrunSectionSymmetryArrows: true,
7176
filterArrivalDepartureTime: true,
7277
filterTravelTime: true,
7378
filterTrainrunName: true,
@@ -77,6 +82,7 @@ export class FilterSetting {
7782
filterTrainrunFrequency: null,
7883
filterTrainrunTimeCategory: null,
7984
filterTrainrunDirection: null,
85+
filterTrainrunSectionSymmetry: null,
8086
filterAllEmptyNodes: false,
8187
filterAllNonStopNodes: false,
8288
filterNotes: false,
@@ -92,6 +98,7 @@ export class FilterSetting {
9298
this.filterNoteLabels = filterNoteLabels;
9399
this.filterTrainrunLabels = filterTrainrunLabels;
94100
this.filterTrainrunDirectionArrows = filterTrainrunDirectionArrows;
101+
this.filterTrainrunSectionSymmetryArrows = filterTrainrunSectionSymmetryArrows;
95102
this.filterArrivalDepartureTime = filterArrivalDepartureTime;
96103
this.filterTravelTime = filterTravelTime;
97104
this.filterTrainrunName = filterTrainrunName;
@@ -101,6 +108,7 @@ export class FilterSetting {
101108
this.filterTrainrunFrequency = filterTrainrunFrequency;
102109
this.filterTrainrunTimeCategory = filterTrainrunTimeCategory;
103110
this.filterTrainrunDirection = filterTrainrunDirection;
111+
this.filterTrainrunSectionSymmetry = filterTrainrunSectionSymmetry;
104112
this.filterAllEmptyNodes = filterAllEmptyNodes;
105113
this.filterAllNonStopNodes = filterAllNonStopNodes;
106114
this.filterNotes = filterNotes;
@@ -173,6 +181,7 @@ export class FilterSetting {
173181
this.filterNoteLabels.length === 0 &&
174182
this.filterTrainrunLabels.length === 0 &&
175183
this.filterTrainrunDirectionArrows === true &&
184+
this.filterTrainrunSectionSymmetryArrows === true &&
176185
this.filterArrivalDepartureTime === true &&
177186
this.filterTravelTime === true &&
178187
this.filterTrainrunName === true &&
@@ -182,6 +191,7 @@ export class FilterSetting {
182191
this.filterTrainrunFrequency.length === frainrunFrequenciesLength &&
183192
this.filterTrainrunTimeCategory.length === trainrunTimeCategoryLength &&
184193
this.filterTrainrunDirection.length === Object.values(TrainrunDirection).length &&
194+
this.filterTrainrunSectionSymmetry.length === 2 &&
185195
this.filterAllEmptyNodes === false &&
186196
this.filterAllNonStopNodes === false &&
187197
this.filterNotes === false &&
@@ -200,6 +210,7 @@ export class FilterSetting {
200210
filterNoteLabels: this.filterNoteLabels,
201211
filterTrainrunLabels: this.filterTrainrunLabels,
202212
filterTrainrunDirectionArrows: this.filterTrainrunDirectionArrows,
213+
filterTrainrunSectionSymmetryArrows: this.filterTrainrunSectionSymmetryArrows,
203214
filterArrivalDepartureTime: this.filterArrivalDepartureTime,
204215
filterTravelTime: this.filterTravelTime,
205216
filterTrainrunName: this.filterTrainrunName,
@@ -209,6 +220,7 @@ export class FilterSetting {
209220
filterTrainrunFrequency: this.filterTrainrunFrequency,
210221
filterTrainrunTimeCategory: this.filterTrainrunTimeCategory,
211222
filterTrainrunDirection: this.filterTrainrunDirection,
223+
filterTrainrunSectionSymmetry: this.filterTrainrunSectionSymmetry,
212224
filterAllEmptyNodes: this.filterAllEmptyNodes,
213225
filterAllNonStopNodes: this.filterAllNonStopNodes,
214226
filterNotes: this.filterNotes,

src/app/models/trainrunsection.model.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ describe("TrainrunSection Model Test", () => {
162162
ts.setSourceDepartureLock(false);
163163
ts.setSourceArrivalLock(false);
164164
ts.setTravelTimeLock(false);
165+
ts.setBackwardTravelTimeLock(false);
165166
expect(ts.getTargetDepartureLock()).toBe(false);
166167
expect(ts.getTargetArrivalLock()).toBe(false);
167168
expect(ts.getSourceDepartureLock()).toBe(false);
@@ -176,6 +177,7 @@ describe("TrainrunSection Model Test", () => {
176177
ts.setSourceDepartureLock(false);
177178
ts.setSourceArrivalLock(false);
178179
ts.setTravelTimeLock(false);
180+
ts.setBackwardTravelTimeLock(false);
179181
ts.setTargetDepartureLock(true);
180182
expect(ts.getTargetDepartureLock()).toBe(true);
181183
expect(ts.getTargetArrivalLock()).toBe(false);
@@ -191,6 +193,7 @@ describe("TrainrunSection Model Test", () => {
191193
ts.setSourceDepartureLock(false);
192194
ts.setSourceArrivalLock(false);
193195
ts.setTravelTimeLock(false);
196+
ts.setBackwardTravelTimeLock(false);
194197
ts.setTargetArrivalLock(true);
195198
expect(ts.getTargetDepartureLock()).toBe(false);
196199
expect(ts.getTargetArrivalLock()).toBe(true);
@@ -206,6 +209,7 @@ describe("TrainrunSection Model Test", () => {
206209
ts.setSourceDepartureLock(false);
207210
ts.setSourceArrivalLock(false);
208211
ts.setTravelTimeLock(false);
212+
ts.setBackwardTravelTimeLock(false);
209213
ts.setSourceDepartureLock(true);
210214
expect(ts.getTargetDepartureLock()).toBe(false);
211215
expect(ts.getTargetArrivalLock()).toBe(false);
@@ -221,6 +225,7 @@ describe("TrainrunSection Model Test", () => {
221225
ts.setSourceDepartureLock(false);
222226
ts.setSourceArrivalLock(false);
223227
ts.setTravelTimeLock(false);
228+
ts.setBackwardTravelTimeLock(false);
224229
ts.setSourceArrivalLock(true);
225230
expect(ts.getTargetDepartureLock()).toBe(false);
226231
expect(ts.getTargetArrivalLock()).toBe(false);
@@ -236,7 +241,9 @@ describe("TrainrunSection Model Test", () => {
236241
ts.setSourceDepartureLock(false);
237242
ts.setSourceArrivalLock(false);
238243
ts.setTravelTimeLock(false);
244+
ts.setBackwardTravelTimeLock(false);
239245
ts.setTravelTimeLock(true);
246+
ts.setBackwardTravelTimeLock(true);
240247
expect(ts.getTargetDepartureLock()).toBe(false);
241248
expect(ts.getTargetArrivalLock()).toBe(false);
242249
expect(ts.getSourceDepartureLock()).toBe(false);

0 commit comments

Comments
 (0)