Collect audit reason for extra time sales (#240)

## Summary
- Add a shared POS audit helper for approved 10-minute extra sale
reason/comment payloads.
- Prompt for audit metadata in desktop add/copy, desktop item edit,
booking hydration, and mobile completion rebuild flows.
- Include preview evidence files under
`docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/`.

## Verification
- `npm ci --legacy-peer-deps`
- `npm run lint`
- `npm run build`

## Visual change previews
### View: POS extra sale audit
**Description:** POS order item add/edit flows now require an approved
reason for “10 min ekstra”, with a comment field available and required
for the `other` reason.

#### Mobile (390x844)
**Before:**
![Mobile
before](../blob/69fa62f6e38e5c6a28d6aa00c95f749df33b3e0a/docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/pos-extra-sale-audit-mobile-before.png?raw=true)

**After:**
![Mobile
after](../blob/69fa62f6e38e5c6a28d6aa00c95f749df33b3e0a/docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/pos-extra-sale-audit-mobile-after.png?raw=true)

#### Tablet (768x1024)
**Before:**
![Tablet
before](../blob/69fa62f6e38e5c6a28d6aa00c95f749df33b3e0a/docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/pos-extra-sale-audit-tablet-before.png?raw=true)

**After:**
![Tablet
after](../blob/69fa62f6e38e5c6a28d6aa00c95f749df33b3e0a/docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/pos-extra-sale-audit-tablet-after.png?raw=true)

#### Desktop (1440x900)
**Before:**
![Desktop
before](../blob/69fa62f6e38e5c6a28d6aa00c95f749df33b3e0a/docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/pos-extra-sale-audit-desktop-before.png?raw=true)

**After:**
![Desktop
after](../blob/69fa62f6e38e5c6a28d6aa00c95f749df33b3e0a/docs/pr-previews/workboard-94209138-31f6-422e-ac8c-181ad391b8a7/pos-extra-sale-audit-desktop-after.png?raw=true)

## Notes
- Automatic merge remains disabled per Workboard contract.

---------

Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Jeppe B
2026-08-13 17:49:27 +02:00
committed by GitHub
co-authored by Jeppe Bundgaard openhands
parent eb8482585b
commit b1e0c61df0
14 changed files with 341 additions and 47 deletions
+8 -2
View File
@@ -777,8 +777,14 @@ describe("POSDepartmentProcess.hydrateSelectedOrderBookingForDesktop", () => {
await expect(hydrateSelectedOrderBookingForDesktop()).resolves.toBe(true);
expect(mocks.createOrderItem).toHaveBeenNthCalledWith(1, 51207, 10, 1, null, null, 500);
expect(mocks.createOrderItem).toHaveBeenNthCalledWith(2, 51207, 20, 3, 9001, "Addon note", 500);
expect(mocks.createOrderItem).toHaveBeenNthCalledWith(1, 51207, 10, 1, null, null, 500, null, {
extra_sale_comment: null,
extra_sale_reason_code: null,
});
expect(mocks.createOrderItem).toHaveBeenNthCalledWith(2, 51207, 20, 3, 9001, "Addon note", 500, null, {
extra_sale_comment: null,
extra_sale_reason_code: null,
});
expect(SessionUser.objects.products.get.single).toHaveBeenCalledWith(10, {
department_id: 2,
customer_id: 12345679,