-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathconsts.ts
111 lines (103 loc) · 2.54 KB
/
consts.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import type {
LabelGroupDto,
NetzgrafikDto,
TimeLockDto,
TrainrunCategory,
TrainrunFrequency,
TrainrunTimeCategory,
} from '../NGE/types';
export const TRAINRUN_CATEGORY_HALTEZEITEN = {
HaltezeitIPV: { haltezeit: 0, no_halt: false },
HaltezeitA: { haltezeit: 0, no_halt: false },
HaltezeitB: { haltezeit: 0, no_halt: false },
HaltezeitC: { haltezeit: 0, no_halt: false },
HaltezeitD: { haltezeit: 0, no_halt: false },
HaltezeitUncategorized: { haltezeit: 0, no_halt: false },
};
export const TRAINRUN_LABEL_GROUP: LabelGroupDto = {
id: 1,
name: 'Default',
labelRef: 'Trainrun',
};
export const NODE_LABEL_GROUP: LabelGroupDto = {
id: 2,
name: 'Node',
labelRef: 'Node',
};
export const DEFAULT_TRAINRUN_CATEGORY: TrainrunCategory = {
id: 1, // In NGE, Trainrun.DEFAULT_TRAINRUN_CATEGORY
order: 0,
name: 'Default',
shortName: '', // TODO: find a better way to hide this in the graph
fachCategory: 'HaltezeitUncategorized',
colorRef: 'EC',
minimalTurnaroundTime: 0,
nodeHeadwayStop: 0,
nodeHeadwayNonStop: 0,
sectionHeadway: 0,
};
export const DEFAULT_TRAINRUN_FREQUENCIES: TrainrunFrequency[] = [
{
id: 2,
order: 0,
frequency: 30,
offset: 0,
name: 'Half-hourly',
shortName: '30',
linePatternRef: '30',
},
{
id: 3, // default NGE frequency takes id 3
order: 1,
frequency: 60,
offset: 0,
name: 'Hourly',
/** Short name, needs to be unique */
shortName: '60',
linePatternRef: '60',
},
{
id: 4,
order: 2,
frequency: 120,
offset: 0,
name: 'Two-hourly',
shortName: '120',
linePatternRef: '120',
},
];
export const DEFAULT_TRAINRUN_FREQUENCY: TrainrunFrequency = DEFAULT_TRAINRUN_FREQUENCIES[1];
export const DEFAULT_TRAINRUN_TIME_CATEGORY: TrainrunTimeCategory = {
id: 0, // In NGE, Trainrun.DEFAULT_TRAINRUN_TIME_CATEGORY
order: 0,
name: 'Default',
shortName: '7/24',
dayTimeInterval: [],
weekday: [1, 2, 3, 4, 5, 6, 7],
linePatternRef: '7/24',
};
export const DEFAULT_DTO: NetzgrafikDto = {
resources: [],
nodes: [],
trainruns: [],
trainrunSections: [],
metadata: {
netzgrafikColors: [],
trainrunCategories: [DEFAULT_TRAINRUN_CATEGORY],
trainrunFrequencies: [...DEFAULT_TRAINRUN_FREQUENCIES],
trainrunTimeCategories: [DEFAULT_TRAINRUN_TIME_CATEGORY],
},
freeFloatingTexts: [],
labels: [],
labelGroups: [],
filterData: {
filterSettings: [],
},
};
export const DEFAULT_TIME_LOCK: TimeLockDto = {
time: null,
consecutiveTime: null,
lock: false,
warning: null,
timeFormatter: null,
};