feat(TPV-FIXES): completed feature
This commit is contained in:
61
work/artifacts/TPV-FIXES/01-intake.md
Normal file
61
work/artifacts/TPV-FIXES/01-intake.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# TPV-FIXES — Intake
|
||||
|
||||
## Feature
|
||||
- **ID:** TPV-FIXES
|
||||
- **Title:** TPV fixes: Cashier label, favicon 404, pos/sales 400 error
|
||||
- **Type:** fix
|
||||
- **Priority:** med
|
||||
- **Risk:** low
|
||||
|
||||
## 3 Bugs Identificados
|
||||
|
||||
### Bug 1: favicon 404 (storefront)
|
||||
**Ubicación:** `project/storefront/src/app/layout.tsx`
|
||||
|
||||
**Problema:** El storefront NO tiene favicon configurado en metadata. Existe `project/storefront/public/favicon.ico` pero Next.js App Router busca:
|
||||
- `app/favicon.ico` (no existe en storefront)
|
||||
- Referencia en `metadata.icons` (no está declarado)
|
||||
|
||||
**Comparación:** El app `frontend` SÍ tiene `project/frontend/src/app/favicon.ico`
|
||||
|
||||
**Solución propuesta:** Agregar al metadata del layout:
|
||||
```ts
|
||||
icons: { icon: '/favicon.ico', shortcut: '/favicon.ico' }
|
||||
```
|
||||
O copiar `public/favicon.ico` a `src/app/favicon.ico`
|
||||
|
||||
---
|
||||
|
||||
### Bug 2: Cashier label (POS Receipt)
|
||||
**Ubicación:** `project/apps/pos/src/components/ReceiptModal.tsx` (línea ~95)
|
||||
|
||||
**Problema:** El receipt muestra `<strong>Cajero:</strong>` hardcodeado. Posible bug:
|
||||
- Gendered label ("Cajero" no "Cajera"/"Cajero/a")
|
||||
- El `receipt.cashier` viene vacío o null
|
||||
|
||||
**Verificar:** Necesito ver de dónde viene `receipt.cashier` y si hay tests que fallen.
|
||||
|
||||
---
|
||||
|
||||
### Bug 3: pos/sales 400 error
|
||||
**Ubicación:** `project/src/modules/pos/api/pos.routes.ts`
|
||||
|
||||
**Análisis:** Los endpoints `POST /pos/sales` y `POST /pos/sales/:id/payments` validan con Zod y requieren:
|
||||
- `x-terminal-id` header que coincida con `body.terminalId`
|
||||
- `methodCode` o `kind` en cada payment
|
||||
|
||||
**Causa probable:** El frontend POS no está enviando `x-terminal-id` header o el body no tiene los campos requeridos.
|
||||
|
||||
**Verificar:** Tests en `pos-pending-payments.itest.ts` muestran uso correcto. El bug podría estar en la app POS (apps/pos/).
|
||||
|
||||
---
|
||||
|
||||
## Investigación Pendiente
|
||||
- [ ] Verificar `receipt.cashier` en `buildPosReceipt.ts`
|
||||
- [ ] Revisar `apps/pos/src/lib/api-client.ts` para ver cómo se envía el `x-terminal-id`
|
||||
- [ ] Confirmar cuál de los 3 bugs es el más urgente
|
||||
|
||||
## Gates
|
||||
- [ ] reviewer: PENDING
|
||||
- [ ] security: PENDING
|
||||
- [ ] qa: PENDING
|
||||
Reference in New Issue
Block a user