@autobusal/order-process 1.3.6 → 1.3.7
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/Standard/Standard.tsx +25 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.7 - 2026-08-29
|
|
4
|
+
|
|
5
|
+
- A refused funds/cash settlement lands on the booking's own payment-not-completed page instead of navigate(-1) (audit A9-39). Back returned to the checkout URL while the checkout's contents lived in wizard state the navigation had destroyed, so the seller arrived at a bare results page with their held reservation findable only through Browse Orders.
|
|
6
|
+
|
|
3
7
|
## 1.3.6
|
|
4
8
|
|
|
5
9
|
### Fixed
|
package/Standard/Standard.tsx
CHANGED
|
@@ -27,15 +27,37 @@ const Standard = ({ type, hash, t }: Props): JSX.Element => {
|
|
|
27
27
|
|
|
28
28
|
const navigate = useNavigate();
|
|
29
29
|
|
|
30
|
+
/*
|
|
31
|
+
* Claude - 2026-08-29 (audit A9-39, low)
|
|
32
|
+
*
|
|
33
|
+
* BACK IS NOT WHERE THE BUYER WAS. `navigate(-1)` returns to the checkout
|
|
34
|
+
* URL, but the checkout's CONTENTS - the chosen coach, the typed
|
|
35
|
+
* passengers, the picked seats - live in the wizard's React state, which
|
|
36
|
+
* navigating here destroyed. So an agent whose balance would not cover the
|
|
37
|
+
* sale landed on a bare results page with everything they had filled in
|
|
38
|
+
* gone, and the reservation they had just made discoverable only by
|
|
39
|
+
* hunting through Browse Orders.
|
|
40
|
+
*
|
|
41
|
+
* The order EXISTS at this point and its seats are still held; what failed
|
|
42
|
+
* is the settlement. So the honest destination is the booking's own
|
|
43
|
+
* payment-not-completed page - it says the reservation is still theirs,
|
|
44
|
+
* carries the reason, and offers both a retry and a way to release the
|
|
45
|
+
* seats. That page was written for exactly this outcome on the card path
|
|
46
|
+
* (BOOK-11-b); the funds path was the abrupt one. Going back promised a
|
|
47
|
+
* restoration it could not perform.
|
|
48
|
+
*/
|
|
30
49
|
useEffect(() => {
|
|
31
50
|
if (isError) {
|
|
32
51
|
const message = (error as { response?: { data?: { message?: string } } })?.response?.data?.message;
|
|
33
52
|
|
|
34
|
-
|
|
53
|
+
const reason = message ?? t('order_process.error', { ns: 'common', defaultValue: 'We could not complete your order. Please try again.' });
|
|
54
|
+
|
|
55
|
+
notifyError(reason);
|
|
35
56
|
|
|
36
|
-
|
|
57
|
+
// replace: a failed attempt is not a step anybody should press Back into
|
|
58
|
+
navigate(hash ? `/orders/cancelled/${ hash }?msg=${ encodeURIComponent(reason) }` : '/', { replace: true });
|
|
37
59
|
}
|
|
38
|
-
}, [isError, error, navigate, t]);
|
|
60
|
+
}, [isError, error, hash, navigate, t]);
|
|
39
61
|
|
|
40
62
|
/*
|
|
41
63
|
* Claude - 2026-08-22 (audit finding BOOK-04-b): a 200 whose body is
|