Skip to content

Commit 09ee56b

Browse files
committed
chore: move fare mapping to waltti base config (it is always the same)
1 parent 4b69e58 commit 09ee56b

File tree

4 files changed

+11
-29
lines changed

4 files changed

+11
-29
lines changed

app/configurations/config.jyvaskyla.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ export default configMerger(walttiConfig, {
161161
4: 'D',
162162
},
163163

164-
showTicketInformation: false,
165164
useTicketIcons: true,
165+
showTicketInformation: false,
166166
ticketLink: 'https://linkki.jyvaskyla.fi/liput-ja-hinnat',
167167
showTicketPrice: false,
168168

@@ -175,13 +175,6 @@ export default configMerger(walttiConfig, {
175175
return `https://kauppa.waltti.fi/walttiappfeat/busTicket/?operator=50209&ticketType=single&customerGroup=adult&zones=${zones}`;
176176
},
177177

178-
// mapping fareId from OTP fare identifiers to human readable form
179-
fareMapping: function mapFareId(fareId) {
180-
return fareId && fareId.substring
181-
? fareId.substring(fareId.indexOf(':') + 1)
182-
: '';
183-
},
184-
185178
stopCard: {
186179
header: {
187180
virtualMonitorBaseUrl: 'https://pysakit.jyvaskyla.fi/',

app/configurations/config.kuopio.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,14 @@ export default configMerger(walttiConfig, {
3636

3737
feedIds: ['Kuopio', 'digitraffic'],
3838

39-
showTicketInformation: true,
40-
4139
useTicketIcons: true,
42-
40+
showTicketInformation: true,
41+
showTicketPrice: true,
4342
ticketInformation: {
4443
primaryAgencyName: 'Kuopion seudun joukkoliikenne',
4544
},
46-
4745
ticketLink: 'https://vilkku.kuopio.fi/lipputyypit-hinnat/lippujen-hinnat',
4846

49-
// mapping fareId from OTP fare identifiers to human readable form
50-
fareMapping: function mapFareId(fareId) {
51-
return fareId && fareId.substring
52-
? fareId.substring(fareId.indexOf(':') + 1)
53-
: '';
54-
},
55-
showTicketPrice: true,
5647
searchParams: {
5748
'boundary.rect.min_lat': 62.454915,
5849
'boundary.rect.max_lat': 63.469325,

app/configurations/config.tampere.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,12 @@ export default configMerger(walttiConfig, {
6060
stops: true,
6161
itinerary: true,
6262
},
63-
showTicketInformation: true,
6463

6564
useTicketIcons: true,
66-
65+
showTicketInformation: true,
6766
ticketInformation: {
6867
primaryAgencyName: 'Tampereen seudun joukkoliikenne',
6968
},
70-
7169
ticketLink: 'https://www.nysse.fi/liput-ja-hinnat.html',
7270

7371
callAgencyInfo: {
@@ -108,13 +106,6 @@ export default configMerger(walttiConfig, {
108106
},
109107
},
110108

111-
// mapping fareId from OTP fare identifiers to human readable form
112-
fareMapping: function mapFareId(fareId) {
113-
return fareId && fareId.substring
114-
? fareId.substring(fareId.indexOf(':') + 1)
115-
: '';
116-
},
117-
118109
useSearchPolygon: true,
119110

120111
areaPolygon: [

app/configurations/config.waltti.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,11 @@ export default {
217217
],
218218

219219
showDisclaimer: true,
220+
221+
// mapping fareId from OTP fare identifiers to human readable form
222+
fareMapping: function mapFareId(fareId) {
223+
return fareId && fareId.substring
224+
? fareId.substring(fareId.indexOf(':') + 1)
225+
: '';
226+
},
220227
};

0 commit comments

Comments
 (0)