-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathsimulationSheet-const.ts
104 lines (102 loc) · 3.14 KB
/
simulationSheet-const.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
import enTranslations from '../../public/locales/en/stdcm-simulation-report-sheet.json';
import frTranslations from '../../public/locales/fr/stdcm-simulation-report-sheet.json';
import type { Simulation } from '../utils/simulationSheet';
const simulationSheetDetails = (selectedLanguage: string): Simulation => {
const translations = selectedLanguage === 'English' ? enTranslations : frTranslations;
return {
header: {
toolDescription: translations.warningMessage,
documentTitle: translations.stdcm,
creationDetails: {
number: 'n°1224-352-455',
date: translations.formattedDate
.replace('{{day}}', '24')
.replace('{{month}}', '12')
.replace('{{year}}', '2024')
.replace('{{hours}}', '12')
.replace('{{minutes}}', '53'),
time: '12:53',
},
},
responsiblePerson: {
role: 'Super Fret',
name: 'Jane Smith',
phone: '01 23 45 67 89',
email: '[email protected]',
},
applicationDate: translations.applicationDate,
referenceTrack: translations.referencePath.replace('XXXXXX', '1224'),
trainDetails: {
compositionCode: translations.speedLimitByTag,
towedMaterial: translations.towedMaterial,
maxSpeed: translations.maxSpeed.replace('{{value}}', '180 km/h'),
maxTonnage: translations.maxWeight.replace('{{value}}', '400 t'),
referenceEngine: translations.referenceEngine,
maxLength: translations.maxLength.replace('{{value}}', '300 m'),
},
requestedRoute: [
{
stopNumber: 1,
station: 'North_West_station',
type: 'BV',
arrivalTime: '20:21',
departureTime: '20:21',
reason: translations.serviceStop,
},
{
stopNumber: 2,
station: 'Mid_West_station',
type: 'BV',
reason: translations.passageStop,
},
{
stopNumber: 3,
station: 'South_station',
type: 'BV',
arrivalTime: translations.asap,
departureTime: translations.asap,
reason: translations.serviceStop,
},
],
simulationDetails: {
referenceTrackNumber: translations.referencePath.replace('XXXXXX', 'YYYYYY'),
viewSimulationLink: translations.viewSimulation,
totalDistance: '51 km',
simulationPath: [
{
stopNumber: 1,
station: 'North_West_station',
type: 'BV',
arrivalTime: '20:21',
tonnage: translations.weight.replace('{{value}}', '400 t'),
},
{
stopNumber: 2,
station: 'Mid_West_station',
type: 'BV',
departureTime: '20:41',
},
{
stopNumber: 3,
station: 'Mid_East_station',
type: 'BV',
departureTime: '20:46',
},
{
stopNumber: 4,
station: 'North_station',
type: 'BV',
departureTime: '20:52',
},
{
stopNumber: 5,
station: 'South_station',
type: 'BV',
departureTime: '20:56',
},
],
disclaimer: translations.withoutWarranty,
},
};
};
export default simulationSheetDetails;