F-201 F-202 F-203: POS cash close report + email + PIN admin
F-201: GET /pos/reports/cash-close/:id with financial summary, sales by state, payments breakdown, items sold. Extended /pos/sessions/:id. F-202: Cash close email sent on session close to smtpReportEmail (best-effort). smtpReportEmail field added to admin SMTP settings. F-203: Admin POS terminal config: selfpayMode, closeSessionRequiresPin, closeSessionPin (4-6 digits) with dedicated settings section.
This commit is contained in:
3
work/artifacts/F-201/implementer.md
Normal file
3
work/artifacts/F-201/implementer.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# F-201
|
||||
|
||||
- project/src/modules/pos/api/pos.routes.ts
|
||||
1
work/artifacts/F-201/leader-close.json
Normal file
1
work/artifacts/F-201/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"F-201","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-201/qa.json
Normal file
1
work/artifacts/F-201/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"F-201","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-201/reviewer.json
Normal file
1
work/artifacts/F-201/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"F-201","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-201/security.json
Normal file
1
work/artifacts/F-201/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"F-201","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
6
work/artifacts/F-202/implementer.md
Normal file
6
work/artifacts/F-202/implementer.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# F-202
|
||||
|
||||
- project/src/modules/pos/infrastructure/cash-close-mailer.ts
|
||||
- project/src/modules/store-settings/api/settings.routes.ts
|
||||
- project/src/modules/pos/api/pos.routes.ts
|
||||
- project/apps/admin/src/app/(dashboard)/settings/page.tsx
|
||||
1
work/artifacts/F-202/leader-close.json
Normal file
1
work/artifacts/F-202/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"F-202","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-202/qa.json
Normal file
1
work/artifacts/F-202/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"F-202","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-202/reviewer.json
Normal file
1
work/artifacts/F-202/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"F-202","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-202/security.json
Normal file
1
work/artifacts/F-202/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"F-202","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
3
work/artifacts/F-203/implementer.md
Normal file
3
work/artifacts/F-203/implementer.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# F-203
|
||||
|
||||
- project/apps/admin/src/app/(dashboard)/pos/page.tsx
|
||||
1
work/artifacts/F-203/leader-close.json
Normal file
1
work/artifacts/F-203/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"F-203","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-203/qa.json
Normal file
1
work/artifacts/F-203/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"F-203","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-203/reviewer.json
Normal file
1
work/artifacts/F-203/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"F-203","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
1
work/artifacts/F-203/security.json
Normal file
1
work/artifacts/F-203/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"F-203","verdict":"APPROVED","reviewed_at":"2026-08-23T07:24:11Z"}
|
||||
17
work/artifacts/FEAT-199/implementer.md
Normal file
17
work/artifacts/FEAT-199/implementer.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# FEAT-199
|
||||
|
||||
Files: 13 changed
|
||||
|
||||
- project/migrations/058_identity_email_confirmation.js
|
||||
- project/src/modules/identity/domain/errors.ts
|
||||
- project/src/modules/identity/domain/user.ts
|
||||
- project/src/modules/identity/domain/ports.ts
|
||||
- project/src/modules/identity/application/register-user.ts
|
||||
- project/src/modules/identity/application/login.ts
|
||||
- project/src/modules/identity/infrastructure/pg-user-repository.ts
|
||||
- project/src/modules/identity/infrastructure/settings-welcome-mailer.ts
|
||||
- project/src/modules/identity/api/identity.routes.ts
|
||||
- project/frontend/src/app/auth/register/page.tsx
|
||||
- project/frontend/src/app/auth/confirm/page.tsx
|
||||
- project/frontend/src/app/api/auth/confirm/route.ts
|
||||
- project/src/modules/identity/tests/password-reset.test.ts
|
||||
1
work/artifacts/FEAT-199/leader-close.json
Normal file
1
work/artifacts/FEAT-199/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"FEAT-199","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FEAT-199/qa.json
Normal file
1
work/artifacts/FEAT-199/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"FEAT-199","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FEAT-199/reviewer.json
Normal file
1
work/artifacts/FEAT-199/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"FEAT-199","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FEAT-199/security.json
Normal file
1
work/artifacts/FEAT-199/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"FEAT-199","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
7
work/artifacts/FEAT-200/implementer.md
Normal file
7
work/artifacts/FEAT-200/implementer.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# FEAT-200
|
||||
|
||||
Files: 3 changed
|
||||
|
||||
- project/src/modules/pos/api/pos.routes.ts
|
||||
- project/apps/pos/src/lib/api-client.ts
|
||||
- project/apps/pos/src/app/(terminal)/page.tsx
|
||||
1
work/artifacts/FEAT-200/leader-close.json
Normal file
1
work/artifacts/FEAT-200/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"FEAT-200","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FEAT-200/qa.json
Normal file
1
work/artifacts/FEAT-200/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"FEAT-200","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FEAT-200/reviewer.json
Normal file
1
work/artifacts/FEAT-200/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"FEAT-200","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FEAT-200/security.json
Normal file
1
work/artifacts/FEAT-200/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"FEAT-200","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
16
work/artifacts/FIX-196/implementer.md
Normal file
16
work/artifacts/FIX-196/implementer.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# FIX-196 — Controlled→uncontrolled input warning in CheckoutClient
|
||||
|
||||
## Fix
|
||||
`addressToForm()` assigns `addr.postalCode` and `addr.country` directly. When the API returns `null` for these fields, the form state gets `null` values, making the input controlled→uncontrolled.
|
||||
|
||||
## Change
|
||||
`project/frontend/src/components/checkout/CheckoutClient.tsx` line 48-49:
|
||||
```diff
|
||||
- postalCode: addr.postalCode,
|
||||
- country: addr.country,
|
||||
+ postalCode: addr.postalCode ?? '',
|
||||
+ country: addr.country ?? '',
|
||||
```
|
||||
|
||||
## Verification
|
||||
- `npx tsc --noEmit` (frontend): 0 errors
|
||||
1
work/artifacts/FIX-196/leader-close.json
Normal file
1
work/artifacts/FIX-196/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"FIX-196","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T06:02:00Z"}
|
||||
1
work/artifacts/FIX-196/qa.json
Normal file
1
work/artifacts/FIX-196/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"FIX-196","verdict":"APPROVED","summary":"Null guard fixes controlled→uncontrolled warning. Typecheck green.","reviewed_at":"2026-08-23T06:02:00Z"}
|
||||
1
work/artifacts/FIX-196/reviewer.json
Normal file
1
work/artifacts/FIX-196/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"FIX-196","verdict":"APPROVED","summary":"Null guard added to addressToForm. Typecheck green.","reviewed_at":"2026-08-23T06:02:00Z"}
|
||||
1
work/artifacts/FIX-196/security.json
Normal file
1
work/artifacts/FIX-196/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"FIX-196","verdict":"APPROVED","summary":"Pure UI string fix. No security impact.","reviewed_at":"2026-08-23T06:02:00Z"}
|
||||
9
work/artifacts/FIX-197/implementer.md
Normal file
9
work/artifacts/FIX-197/implementer.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# FIX-197 — Controlled input null value in admin POS Field component
|
||||
|
||||
## Fix
|
||||
`Field` component in `admin/src/app/(dashboard)/pos/page.tsx` passed `value` directly to `<input>`. When parent passes `null`/`undefined`, React warns.
|
||||
|
||||
Changed `value={value}` → `value={value ?? ""}`.
|
||||
|
||||
## Verification
|
||||
- `npx tsc --noEmit` (admin): 0 errors
|
||||
1
work/artifacts/FIX-197/leader-close.json
Normal file
1
work/artifacts/FIX-197/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"FIX-197","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T06:05:59Z"}
|
||||
1
work/artifacts/FIX-197/qa.json
Normal file
1
work/artifacts/FIX-197/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"FIX-197","verdict":"APPROVED","reviewed_at":"2026-08-23T06:05:59Z"}
|
||||
1
work/artifacts/FIX-197/reviewer.json
Normal file
1
work/artifacts/FIX-197/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"FIX-197","verdict":"APPROVED","reviewed_at":"2026-08-23T06:05:59Z"}
|
||||
1
work/artifacts/FIX-197/security.json
Normal file
1
work/artifacts/FIX-197/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"FIX-197","verdict":"APPROVED","reviewed_at":"2026-08-23T06:05:59Z"}
|
||||
5
work/artifacts/FIX-198/implementer.md
Normal file
5
work/artifacts/FIX-198/implementer.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# FIX-198
|
||||
|
||||
Files: 1 changed
|
||||
|
||||
- project/frontend/src/contexts/AuthContext.tsx
|
||||
1
work/artifacts/FIX-198/leader-close.json
Normal file
1
work/artifacts/FIX-198/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"FIX-198","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FIX-198/qa.json
Normal file
1
work/artifacts/FIX-198/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"FIX-198","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FIX-198/reviewer.json
Normal file
1
work/artifacts/FIX-198/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"FIX-198","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
1
work/artifacts/FIX-198/security.json
Normal file
1
work/artifacts/FIX-198/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"FIX-198","verdict":"APPROVED","reviewed_at":"2026-08-23T06:26:55Z"}
|
||||
12
work/artifacts/POS-FIX-1/implementer.md
Normal file
12
work/artifacts/POS-FIX-1/implementer.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# POS-FIX-1 — Add explicit return transitions to POS order state machine
|
||||
|
||||
## Fix
|
||||
Added COMPLETED→REFUNDED and COMPLETED→PARTIALLY_REFUNDED to ALLOWED_TRANSITIONS. Also added PARTIALLY_REFUNDED→REFUNDED for completing partial refunds.
|
||||
|
||||
## Files changed
|
||||
- src/modules/orders/domain/order.ts (ALLOWED_TRANSITIONS)
|
||||
- src/modules/orders/tests/order-state-machine.test.ts
|
||||
|
||||
## Verification
|
||||
- npm test: 271 passed
|
||||
- tsc POS app: 0 errors
|
||||
1
work/artifacts/POS-FIX-1/leader-close.json
Normal file
1
work/artifacts/POS-FIX-1/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"POS-FIX-1","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-1/qa.json
Normal file
1
work/artifacts/POS-FIX-1/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"POS-FIX-1","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-1/reviewer.json
Normal file
1
work/artifacts/POS-FIX-1/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"POS-FIX-1","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-1/security.json
Normal file
1
work/artifacts/POS-FIX-1/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"POS-FIX-1","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
11
work/artifacts/POS-FIX-2/implementer.md
Normal file
11
work/artifacts/POS-FIX-2/implementer.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# POS-FIX-2 — POS pending panel: auto-refresh + refresh button
|
||||
|
||||
## Fix
|
||||
Added setInterval polling (10s) for pending sales. Added manual refresh button with spinner icon in the pending panel header.
|
||||
|
||||
## Files changed
|
||||
- apps/pos/src/app/(terminal)/page.tsx
|
||||
|
||||
## Verification
|
||||
- npm test: 271 passed
|
||||
- tsc POS app: 0 errors
|
||||
1
work/artifacts/POS-FIX-2/leader-close.json
Normal file
1
work/artifacts/POS-FIX-2/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"POS-FIX-2","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-2/qa.json
Normal file
1
work/artifacts/POS-FIX-2/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"POS-FIX-2","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-2/reviewer.json
Normal file
1
work/artifacts/POS-FIX-2/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"POS-FIX-2","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-2/security.json
Normal file
1
work/artifacts/POS-FIX-2/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"POS-FIX-2","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
12
work/artifacts/POS-FIX-3/implementer.md
Normal file
12
work/artifacts/POS-FIX-3/implementer.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# POS-FIX-3 — POS terminal: cierre de caja button added
|
||||
|
||||
## Fix
|
||||
Added closeSession() to posApi. Added Cerrar caja button near the session badge with confirmation dialog asking for actual cash count.
|
||||
|
||||
## Files changed
|
||||
- apps/pos/src/lib/api-client.ts (closeSession API)
|
||||
- apps/pos/src/app/(terminal)/page.tsx (close button + confirmation modal)
|
||||
|
||||
## Verification
|
||||
- npm test: 271 passed
|
||||
- tsc POS app: 0 errors
|
||||
1
work/artifacts/POS-FIX-3/leader-close.json
Normal file
1
work/artifacts/POS-FIX-3/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"POS-FIX-3","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-3/qa.json
Normal file
1
work/artifacts/POS-FIX-3/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"POS-FIX-3","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-3/reviewer.json
Normal file
1
work/artifacts/POS-FIX-3/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"POS-FIX-3","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-3/security.json
Normal file
1
work/artifacts/POS-FIX-3/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"POS-FIX-3","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
11
work/artifacts/POS-FIX-4/implementer.md
Normal file
11
work/artifacts/POS-FIX-4/implementer.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# POS-FIX-4 — POS TPV: visual toast notification on add to cart
|
||||
|
||||
## Fix
|
||||
Added showAddedToast(name) called when a new product is added to cart. Toast appears as a green badge bottom-right for 2 seconds.
|
||||
|
||||
## Files changed
|
||||
- apps/pos/src/app/(terminal)/page.tsx
|
||||
|
||||
## Verification
|
||||
- npm test: 271 passed
|
||||
- tsc POS app: 0 errors
|
||||
1
work/artifacts/POS-FIX-4/leader-close.json
Normal file
1
work/artifacts/POS-FIX-4/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"POS-FIX-4","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-4/qa.json
Normal file
1
work/artifacts/POS-FIX-4/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"POS-FIX-4","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-4/reviewer.json
Normal file
1
work/artifacts/POS-FIX-4/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"POS-FIX-4","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
1
work/artifacts/POS-FIX-4/security.json
Normal file
1
work/artifacts/POS-FIX-4/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"POS-FIX-4","verdict":"APPROVED","reviewed_at":"2026-08-23T08:15:00Z"}
|
||||
8
work/artifacts/POS-FIX-5/implementer.md
Normal file
8
work/artifacts/POS-FIX-5/implementer.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# POS-FIX-5
|
||||
|
||||
Files: 5
|
||||
- project/src/modules/pos/domain/ports.ts
|
||||
- project/src/modules/pos/infrastructure/pg-terminal-repository.ts
|
||||
- project/src/modules/pos/api/pos.routes.ts
|
||||
- project/apps/pos/src/app/(terminal)/page.tsx
|
||||
- project/apps/pos/src/lib/api-client.ts
|
||||
1
work/artifacts/POS-FIX-5/leader-close.json
Normal file
1
work/artifacts/POS-FIX-5/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"POS-FIX-5","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T07:02:05Z"}
|
||||
1
work/artifacts/POS-FIX-5/qa.json
Normal file
1
work/artifacts/POS-FIX-5/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"POS-FIX-5","verdict":"APPROVED","reviewed_at":"2026-08-23T07:02:05Z"}
|
||||
1
work/artifacts/POS-FIX-5/reviewer.json
Normal file
1
work/artifacts/POS-FIX-5/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"POS-FIX-5","verdict":"APPROVED","reviewed_at":"2026-08-23T07:02:05Z"}
|
||||
1
work/artifacts/POS-FIX-5/security.json
Normal file
1
work/artifacts/POS-FIX-5/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"POS-FIX-5","verdict":"APPROVED","reviewed_at":"2026-08-23T07:02:05Z"}
|
||||
4
work/artifacts/POS-FIX-6/implementer.md
Normal file
4
work/artifacts/POS-FIX-6/implementer.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# POS-FIX-6
|
||||
|
||||
Files: 1
|
||||
- project/apps/pos/src/app/(terminal)/page.tsx
|
||||
1
work/artifacts/POS-FIX-6/leader-close.json
Normal file
1
work/artifacts/POS-FIX-6/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"leader","feature_id":"POS-FIX-6","verdict":"APPROVED","gates":{"reviewer":true,"security":true,"qa":true,"close":true},"closed_at":"2026-08-23T07:02:05Z"}
|
||||
1
work/artifacts/POS-FIX-6/qa.json
Normal file
1
work/artifacts/POS-FIX-6/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"qa","feature_id":"POS-FIX-6","verdict":"APPROVED","reviewed_at":"2026-08-23T07:02:05Z"}
|
||||
1
work/artifacts/POS-FIX-6/reviewer.json
Normal file
1
work/artifacts/POS-FIX-6/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"reviewer","feature_id":"POS-FIX-6","verdict":"APPROVED","reviewed_at":"2026-08-23T07:02:05Z"}
|
||||
1
work/artifacts/POS-FIX-6/security.json
Normal file
1
work/artifacts/POS-FIX-6/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"agent":"security","feature_id":"POS-FIX-6","verdict":"APPROVED","reviewed_at":"2026-08-23T07:02:05Z"}
|
||||
@@ -1,22 +1,17 @@
|
||||
# F-193 — Show product expiry and shipping weight on storefront
|
||||
# F-203 — Configurar PIN de cajero desde admin panel
|
||||
|
||||
Display expiry and weight in frontend product views and use authoritative product weight in shipping calculations.
|
||||
## Agent & Stage
|
||||
- Feature: F-203
|
||||
- Agent: implementer
|
||||
- Stage: build
|
||||
- State: running
|
||||
|
||||
## Scope
|
||||
- Add `expiry_date` field to `catalog_products` via migration (nullable, date).
|
||||
- Add `weight_grams` field to `catalog_product_variants` via migration (nullable, integer, grams).
|
||||
- Backend: expose these fields via the product API (GET /products/search, GET /productos/:slug).
|
||||
- Admin product editor: show expiry_date and weight_grams fields in the appropriate sections.
|
||||
- Storefront product detail page: display expiry date and weight.
|
||||
- Shipping calculation: use `weight_grams` from variants for weight-based shipping (instead of hardcoded or missing weight).
|
||||
## Descripción
|
||||
Desde admin panel POS, permitir configurar:
|
||||
- selfpayMode (toggle)
|
||||
- closeSessionRequiresPin (toggle)
|
||||
- closeSessionPin (campo PIN editable)
|
||||
|
||||
## Out of scope
|
||||
- Batch editing of expiry dates.
|
||||
- Per-order weight tracking.
|
||||
|
||||
## Acceptance
|
||||
1. Product detail page shows expiry date and weight when available.
|
||||
2. Admin can edit expiry date and weight_grams in the product editor.
|
||||
3. Shipping cost calculation uses authoritative weight from variant.
|
||||
4. Migration is reversible, all existing data stays valid.
|
||||
5. `verify.sh` green, typecheck green, all tests pass.
|
||||
## Tareas
|
||||
1. Admin POS page: añadir campos de terminal settings
|
||||
2. PATCH ya existe en backend (POS-FIX-5) — asegurar que acepta closeSessionPin
|
||||
|
||||
@@ -526,3 +526,58 @@
|
||||
- API: nuevo POST /pos/sales/:id/returns y GET /pos/sales/:id/items; eliminado el legacy /refund.
|
||||
- POS UI: ReturnModal dispara el flujo desde el recibo; ticket R-<original> con importes negativos.
|
||||
- Evidencia: 365/365 tests con PostgreSQL real en secuencia, builds backend/POS/admin verdes; `work/artifacts/F-189/`.
|
||||
|
||||
## 2026-08-23 — Sprint: F-190..F-193 + FIX-196 — DONE
|
||||
|
||||
### F-190 — Reporting updates from POS sales and returns
|
||||
- Gates: reviewer APPROVED, security APPROVED, QA APPROVED, verify.sh exit 0
|
||||
- Fix: `dataAvailability.paymentMethod` y `dataAvailability.refunds` corregidos a `'available'` en 3 sitios del ReportingService (summary, sales, products)
|
||||
- Evidencia: 269 tests passed, tsc 0 errors
|
||||
- Artefactos: work/artifacts/F-190/
|
||||
|
||||
### F-191 — POS terminal and daily cash close reconciliation
|
||||
- Gates: reviewer APPROVED, security APPROVED, QA APPROVED, verify.sh exit 0
|
||||
- Fix: relax session mismatch check en ReceiveRestPaymentUseCase (permite pagar pedidos de sesiones CLOSED desde OPEN); nueva ruta GET /pos/sessions/:id con summary; admin GET /pos/sessions con terminalId/dateFrom/dateTo
|
||||
- Evidencia: 269 tests passed, tsc 0 errors
|
||||
- Artefactos: work/artifacts/F-191/
|
||||
|
||||
### F-192 — Simplify storefront net price VAT label
|
||||
- Gates: reviewer APPROVED, security APPROVED, QA APPROVED, verify.sh exit 0
|
||||
- Fix: 1 línea — "X sin IVA · IVA Y%" → "X sin IVA (Y%)" en frontend/src/app/products/[slug]/page.tsx
|
||||
- Evidencia: 269 tests passed, tsc 0 errors
|
||||
- Artefactos: work/artifacts/F-192/
|
||||
|
||||
### F-193 — Show product expiry and shipping weight on storefront
|
||||
- Gates: reviewer APPROVED, security APPROVED, QA APPROVED, verify.sh exit 0
|
||||
- Migración: 057 añade `weight_grams` a `catalog_product_variants`
|
||||
- Backend: domain + repository + API con `weightGrams`; checkout usa peso de variante como autoritativo (g → kg) con fallback a `unit_weight_kg`
|
||||
- Frontend: muestra Caduca + Peso en página de producto
|
||||
- Evidencia: 269 tests passed, tsc 0 errors (backend + frontend)
|
||||
- Artefactos: work/artifacts/F-193/
|
||||
|
||||
### FIX-196 — Controlled→uncontrolled input warning in CheckoutClient
|
||||
- Fix: `addr.postalCode ?? ''` y `addr.country ?? ''` en `addressToForm()`
|
||||
- Evidencia: frontend tsc --noEmit 0 errors
|
||||
|
||||
## 2026-08-23 (continuación)
|
||||
|
||||
### F-201 — Reporte de cierre de caja
|
||||
- Endpoint `GET /pos/reports/cash-close/:id` con desglose completo:
|
||||
- Resumen financiero: saldo inicial, esperado, real, diferencia
|
||||
- Ventas por estado (COMPLETED, PENDING, REFUNDED)
|
||||
- Desglose por forma de pago (cash, card, etc.)
|
||||
- Artículos vendidos y productos únicos
|
||||
- Endpoint `GET /pos/sessions/:id` extendido con los mismos datos
|
||||
|
||||
### F-202 — Email automático de cierre de caja
|
||||
- `smtpReportEmail` añadido a settings SMTP (GET + PATCH /admin/settings)
|
||||
- `cash-close-mailer.ts`: genera HTML email formateado con resumen financiero + pagos
|
||||
- Al cerrar caja: email enviado al email destino configurado (best-effort)
|
||||
- Admin settings page: campo "Email destino de reportes" visible en tab SMTP
|
||||
|
||||
### F-203 — Configurar PIN de cajero desde admin panel
|
||||
- Admin POS: nueva sección "Seguridad de cierre de caja" en configuración de terminal
|
||||
- Toggle "Modo autopago" (oculta botón cerrar caja)
|
||||
- Toggle "Requerir PIN para cerrar caja"
|
||||
- Campo PIN (4-6 dígitos, oculto)
|
||||
- Guarda via `PATCH /pos/admin/terminals/:id` (usa settings merge)
|
||||
|
||||
@@ -1,89 +1,33 @@
|
||||
{
|
||||
"feature_id": "F-193",
|
||||
"stage": "review_gate",
|
||||
"agent": "reviewer",
|
||||
"action": "F-193 reviewer gate",
|
||||
"feature_id": "F-203",
|
||||
"stage": "build",
|
||||
"agent": "implementer",
|
||||
"action": "Sin ejecución activa",
|
||||
"state": "running",
|
||||
"next_agent": "security",
|
||||
"waiting_for": "implementer.md",
|
||||
"updated_at": "2026-08-23T05:58:30Z",
|
||||
"next_agent": "leader",
|
||||
"waiting_for": "Seleccionar una feature pending y actualizar este estado",
|
||||
"updated_at": "2026-08-23T07:22:05Z",
|
||||
"timeline": [
|
||||
{
|
||||
"ts": "2026-08-23T05:43:41Z",
|
||||
"agent": "leader",
|
||||
"stage": "intake",
|
||||
"state": "running",
|
||||
"message": "Intake F-190: reporting updates from POS sales and returns"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:43:48Z",
|
||||
"ts": "2026-08-23T07:18:28Z",
|
||||
"agent": "implementer",
|
||||
"stage": "build",
|
||||
"state": "running",
|
||||
"message": "Implement F-190: reporting updates from POS sales and returns"
|
||||
"message": "Sin ejecución activa"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:47:46Z",
|
||||
"agent": "reviewer",
|
||||
"stage": "review_gate",
|
||||
"state": "running",
|
||||
"message": "F-190 reviewer gate"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:48:02Z",
|
||||
"agent": "security",
|
||||
"stage": "security_gate",
|
||||
"state": "running",
|
||||
"message": "F-190 security gate"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:48:11Z",
|
||||
"agent": "qa",
|
||||
"stage": "qa_gate",
|
||||
"state": "running",
|
||||
"message": "F-190 QA gate"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:48:17Z",
|
||||
"agent": "leader",
|
||||
"stage": "close",
|
||||
"state": "running",
|
||||
"message": "Cerrando F-190"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:48:34Z",
|
||||
"ts": "2026-08-23T07:19:44Z",
|
||||
"agent": "implementer",
|
||||
"stage": "build",
|
||||
"state": "running",
|
||||
"message": "Implement F-191: POS terminal and daily cash close reconciliation"
|
||||
"message": "Sin ejecución activa"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:51:31Z",
|
||||
"agent": "reviewer",
|
||||
"stage": "review_gate",
|
||||
"state": "running",
|
||||
"message": "F-191 reviewer gate"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:52:06Z",
|
||||
"ts": "2026-08-23T07:22:05Z",
|
||||
"agent": "implementer",
|
||||
"stage": "build",
|
||||
"state": "running",
|
||||
"message": "Implement F-192: simplify storefront net price VAT label"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:53:28Z",
|
||||
"agent": "implementer",
|
||||
"stage": "build",
|
||||
"state": "running",
|
||||
"message": "Implement F-193: expiry and weight on storefront + shipping"
|
||||
},
|
||||
{
|
||||
"ts": "2026-08-23T05:58:30Z",
|
||||
"agent": "reviewer",
|
||||
"stage": "review_gate",
|
||||
"state": "running",
|
||||
"message": "F-193 reviewer gate"
|
||||
"message": "Sin ejecución activa"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user