@autobusal/routes-order 1.34.4 → 1.34.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/Found/Route/Route.tsx +10 -1
- package/Found/Route/styles.ts +24 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 1.34.5 - 2026-08-30
|
|
2
|
+
|
|
3
|
+
- A fare a dynamic price rule brought DOWN shows the standard price struck through in red above the one being charged; a rise shows only the price (roadmap P5, ruled by Ferjolt).
|
|
4
|
+
|
|
1
5
|
## 1.34.4 - 2026-08-29
|
|
2
6
|
|
|
3
7
|
- The date strip and the search-again panel WRITE THE SEARCH INTO THE URL, so a refresh keeps the chosen day and a shared link opens the results it was copied from (audit A3-02f).
|
package/Found/Route/Route.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { formatDuration, splitPrice } from '../refine';
|
|
|
8
8
|
import { Button, RouteFeature, Information, Rating } from '@autobusal/common';
|
|
9
9
|
import { useGetSettings } from '@autobusal/providers/services';
|
|
10
10
|
import { createDate, getDayParts } from '@autobusal/utilities';
|
|
11
|
-
import { Container, ButtonDetails, SpecialOffer, FavoriteStop, Trip, Company, Location, Stop, Iso, Time, Price, Amount, Decimals, Currency, PriceNotice, LinkCompany, CodeCompany, Details, Detail, ButtonPolicy, TitleDetail, FeaturesItems, Leaves, Day, NextDay, Stops, StopsItems, StopRow, StopTime, StopDay, StopBorder } from './styles';
|
|
11
|
+
import { Container, ButtonDetails, SpecialOffer, FavoriteStop, Trip, Company, Location, Stop, Iso, Time, Price, Amount, Decimals, Currency, PriceNotice, LinkCompany, CodeCompany, Details, Detail, ButtonPolicy, TitleDetail, FeaturesItems, Leaves, Day, NextDay, Standard, Stops, StopsItems, StopRow, StopTime, StopDay, StopBorder } from './styles';
|
|
12
12
|
import { FoundData } from '@autobusal/providers/types/routes';
|
|
13
13
|
|
|
14
14
|
// neutral placeholder so a missing/broken operator logo doesn't render the
|
|
@@ -228,6 +228,15 @@ const Route = ({ data, type, date, passengers, t, onSave, children }: Props): JS
|
|
|
228
228
|
</Location>
|
|
229
229
|
|
|
230
230
|
<Price>
|
|
231
|
+
{ /* Claude - 2026-08-30 (roadmap P5, ruled by Ferjolt): when a
|
|
232
|
+
dynamic price rule brought the fare DOWN, the standard fare is
|
|
233
|
+
shown struck through above the one being charged. A rise shows
|
|
234
|
+
only the price - the server publishes no `base` for one, so
|
|
235
|
+
there is nothing here to render by accident. */ }
|
|
236
|
+
{ data.price.base_display && (
|
|
237
|
+
<Standard>{ data.price.base_display }</Standard>
|
|
238
|
+
) }
|
|
239
|
+
|
|
231
240
|
<Amount>
|
|
232
241
|
{ price.whole }
|
|
233
242
|
{ price.decimals !== null && <Decimals>{ price.decimals }</Decimals> }
|
package/Found/Route/styles.ts
CHANGED
|
@@ -381,6 +381,30 @@ export const Amount = styled.strong`
|
|
|
381
381
|
font-size: ${ props => props.theme.size.xxl };
|
|
382
382
|
`;
|
|
383
383
|
|
|
384
|
+
/**
|
|
385
|
+
* The standard fare, struck through, above the reduced one.
|
|
386
|
+
*
|
|
387
|
+
* Claude - 2026-08-30 (roadmap P5, ruled by Ferjolt): "if price drops, to be
|
|
388
|
+
* displayed the standard fare cut, with a middle line in red, and the actual
|
|
389
|
+
* price discounted".
|
|
390
|
+
*
|
|
391
|
+
* The rule is line-through in the error colour, and the FIGURE is muted rather
|
|
392
|
+
* than red - a red number beside a black one reads as the price, which is the
|
|
393
|
+
* opposite of what the strike-through is saying. Only ever rendered when the
|
|
394
|
+
* server published a base, which it does only for a genuine reduction.
|
|
395
|
+
*/
|
|
396
|
+
export const Standard = styled.span`
|
|
397
|
+
display: block;
|
|
398
|
+
margin-bottom: 2px;
|
|
399
|
+
font-size: ${ props => props.theme.size.s };
|
|
400
|
+
font-weight: 400;
|
|
401
|
+
line-height: 1;
|
|
402
|
+
color: ${ props => props.theme.font.faded };
|
|
403
|
+
text-decoration: line-through;
|
|
404
|
+
text-decoration-color: ${ props => props.theme.font.error };
|
|
405
|
+
text-decoration-thickness: 2px;
|
|
406
|
+
`;
|
|
407
|
+
|
|
384
408
|
export const Decimals = styled.span`
|
|
385
409
|
margin-left: 1px;
|
|
386
410
|
font-size: ${ props => props.theme.size.s };
|