fix: abandon de commande borne, formulaires produit/categorie, stock plafonne #153

Merged
Corentin merged 4 commits from fix/borne-abandon-stock-product into dev 2026-09-26 07:18:41 +02:00
Owner
No description provided.
The back-to-welcome link and the browser back button left the cart in place, so a customer returning later found a ghost order. A leave guard now asks for confirmation when the cart is not empty, clears cart and mode on confirm, and the welcome screen silently resets any residual state. Wired as an external script because the kiosk CSP blocks inline modules.
Request::formBody() only parsed urlencoded bodies, while the product and category forms are always multipart because of the image field, so _csrf was never read and every create or update answered 'invalid request'. Multipart now reads $_POST, and a body dropped by post_max_size shows a clear size message instead of the CSRF error. The JSON admin API still rejects non-JSON content types.
Demo ingredients are seeded at full capacity, so a restock or positive adjustment was capped to zero while the page claimed success. The repository now returns the applied delta; the HTML flash says when a movement was capped and the JSON API returns applied_delta, requested_delta and clamped.
test: target a fixed seeded product in the recipe checkbox e2e test
All checks were successful
CI / secret-scan (pull_request) Successful in 25s
CI / php-lint (pull_request) Successful in 31s
CI / static-tests (pull_request) Successful in 2m29s
CI / js-tests (pull_request) Successful in 49s
CI / secret-scan (push) Successful in 24s
CI / php-lint (push) Successful in 26s
CI / static-tests (push) Successful in 2m40s
CI / js-tests (push) Successful in 42s
adadea5243
The test picked the first product of the list by position, which moved when other tests created products. It now opens the recipe of seeded product 1 directly.
Corentin scheduled this pull request to auto merge when all checks succeed 2026-09-26 07:14:21 +02:00
Sign in to join this conversation.
No reviewers
No labels
auto-merge
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AcadeNice/corentin_wakdo!153
No description provided.