feat: mejorar ux y validaciones del toldo
This commit is contained in:
87
openspec/changes/improve-ui-ux-pos/specs/toldo-poc/spec.md
Normal file
87
openspec/changes/improve-ui-ux-pos/specs/toldo-poc/spec.md
Normal file
@@ -0,0 +1,87 @@
|
||||
# Spec Delta
|
||||
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Realizar cuadre de caja
|
||||
The system SHALL allow completing an end-of-day reconciliation with cash counted and QR bank total, while clearly showing the expected values and calculated differences.
|
||||
|
||||
#### Scenario: Cuadre completo
|
||||
- **GIVEN** base inicial, ventas (cash/QR), gastos (cash/QR) recorded
|
||||
- **WHEN** user performs cuadre
|
||||
- **THEN** saldoEsperadoEfectivo is calculated (base + ventas efectivo - gastos efectivo)
|
||||
- **AND** user can enter saldoRealEfectivo
|
||||
- **AND** user can enter total QR reported by the bank
|
||||
- **AND** descuadreEfectivo and descuadreQR are calculated
|
||||
- **AND** totalVentas = ventas efectivo + ventas QR
|
||||
|
||||
### Requirement: Reporte por productor
|
||||
The system SHALL generate reports by producer including initial real inventory, expected inventory, differences, sales movements, and sales value.
|
||||
|
||||
#### Scenario: Reporte por productor completo
|
||||
- **GIVEN** sales and inventory data for the day
|
||||
- **WHEN** generating report by producer
|
||||
- **THEN** shows inventory differences vs previous day
|
||||
- **AND** shows initial inventory (real)
|
||||
- **AND** shows inventory movements from sales (salidas)
|
||||
- **AND** shows sales value for producer's products
|
||||
- **AND** shows total per producer
|
||||
|
||||
### Requirement: Reporte consolidado
|
||||
The system SHALL generate consolidated totals for a user-selected date range and identify the selected period in the result.
|
||||
|
||||
#### Scenario: Consolidado por rango
|
||||
- **GIVEN** multiple days of data
|
||||
- **WHEN** generating consolidated report for date range
|
||||
- **THEN** aggregates sales, expenses, adjustments
|
||||
- **AND** shows totals by producer
|
||||
- **AND** rejects an end date before the start date with a clear validation message
|
||||
|
||||
### Requirement: Exportar datos
|
||||
The system SHALL export all operational data, including market days, in versioned JSON format.
|
||||
|
||||
#### Scenario: Exportar jornada completa
|
||||
- **GIVEN** data exists in the app
|
||||
- **WHEN** user exports
|
||||
- **THEN** JSON file is generated with schemaVersion, appVersion, exportedAt, data
|
||||
- **AND** data includes jornadas so an imported device preserves day status and traceability
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Navegación adaptada al dispositivo
|
||||
The system SHALL provide consistent navigation and visible context on desktop, tablet, and mobile widths.
|
||||
|
||||
#### Scenario: Navegación móvil
|
||||
- **WHEN** the app is opened on a narrow viewport
|
||||
- **THEN** the navigation can be opened and closed without covering the active content
|
||||
- **AND** the current section and active day status remain visible
|
||||
|
||||
### Requirement: POS seguro y comprensible
|
||||
The system SHALL guide the user through product selection, quantity editing, payment selection, and sale confirmation without allowing invalid quantities or sales outside an open day.
|
||||
|
||||
#### Scenario: Venta válida desde POS
|
||||
- **GIVEN** an open day and products with available stock
|
||||
- **WHEN** user adds products, adjusts quantities, selects cash or QR, and confirms
|
||||
- **THEN** a confirmation feedback identifies amount and payment method
|
||||
- **AND** the cart is cleared only after successful persistence
|
||||
|
||||
#### Scenario: Venta inválida
|
||||
- **GIVEN** no open day or a non-positive quantity
|
||||
- **WHEN** user attempts to confirm the sale
|
||||
- **THEN** the sale is not persisted
|
||||
- **AND** an inline, actionable validation message is shown
|
||||
|
||||
### Requirement: Flujo de configuración inicial
|
||||
The system SHALL guide a first-time user to create at least one producer and product before attempting an operational sale.
|
||||
|
||||
#### Scenario: Configuración vacía
|
||||
- **WHEN** no producers or products exist
|
||||
- **THEN** the dashboard explains the next setup step and links directly to inventory setup
|
||||
- **AND** the POS explains why a sale cannot yet be created
|
||||
|
||||
### Requirement: Pruebas de flujo crítico
|
||||
The project SHALL include automated browser coverage for the main operational flow and responsive navigation.
|
||||
|
||||
#### Scenario: Jornada completa en navegador
|
||||
- **WHEN** the test opens a day, creates catalog data, records a multi-line sale and expense, and closes the day
|
||||
- **THEN** the expected totals and closed status are visible
|
||||
- **AND** the test can run with network access disabled after the app has loaded
|
||||
@@ -1,29 +1,32 @@
|
||||
# Tasks
|
||||
|
||||
## 1. Research & Setup
|
||||
- [ ] 1.1 Research POS UI patterns
|
||||
- [ ] 1.2 Install Vuetify 3, mdi icons
|
||||
- [ ] 1.3 Configure Vuetify theme
|
||||
- [x] 1.1 Audit README requirements against current implementation
|
||||
- [x] 1.2 Confirm Vuetify 3 and Material Design icons are available
|
||||
- [x] 1.3 Configure responsive theme and shared visual language
|
||||
|
||||
## 2. UI Overhaul
|
||||
- [ ] 2.1 Redesign Layout with Vuetify (app bar, navigation)
|
||||
- [ ] 2.2 Redesign Dashboard with day summary
|
||||
- [ ] 2.3 Redesign Inventory/Producers/Products with data tables
|
||||
- [ ] 2.4 Redesign POS Sales screen (product grid + cart)
|
||||
- [ ] 2.5 Redesign Expenses, Adjustments
|
||||
- [ ] 2.6 Redesign Cash Closure with detailed breakdown
|
||||
- [ ] 2.7 Redesign Reports
|
||||
- [ ] 2.8 Redesign Export/Import
|
||||
- [x] 2.1 Redesign Layout with responsive navigation and day status
|
||||
- [x] 2.2 Redesign Dashboard with setup guidance and day summary
|
||||
- [x] 2.3 Improve Inventory/Producers/Products forms and validation
|
||||
- [x] 2.4 Redesign POS Sales screen with stock-aware cart and inline feedback
|
||||
- [x] 2.5 Redesign Expenses and Adjustments with inline validation
|
||||
- [x] 2.6 Redesign Cash Closure with cash and QR breakdown
|
||||
- [x] 2.7 Redesign Reports with producer and date-range summaries
|
||||
- [x] 2.8 Redesign Export/Import and include jornadas
|
||||
|
||||
## 3. UX Features
|
||||
- [ ] 3.1 Add setup wizard for first run
|
||||
- [ ] 3.2 Add quick product creation
|
||||
- [ ] 3.3 Improve validation
|
||||
- [x] 3.1 Add first-run setup guidance
|
||||
- [x] 3.2 Keep quick producer/product creation in inventory
|
||||
- [x] 3.3 Replace silent validation and alerts with actionable feedback
|
||||
- [x] 3.4 Prevent invalid quantities and sales outside an open day
|
||||
|
||||
## 4. Testing
|
||||
- [ ] 4.1 Setup Playwright
|
||||
- [ ] 4.2 Create realistic test scenarios
|
||||
- [ ] 4.3 Test full day flow
|
||||
- [x] 4.1 Setup Playwright
|
||||
- [ ] 4.2 Add realistic service cases for QR, discrepancies, reports, and export
|
||||
- [ ] 4.3 Test full day browser flow
|
||||
- [x] 4.4 Test responsive navigation and empty setup state
|
||||
|
||||
## 5. Build & Deploy
|
||||
- [ ] 5.1 Build web and APK
|
||||
- [x] 5.1 Build web and APK
|
||||
- [x] 5.2 Verify APK artifact and record validation commands
|
||||
|
||||
Reference in New Issue
Block a user