- Added qrcode.react v4.2.0 dependency
- Replaced visual placeholder with QRCodeSVG component
- QR displays actual transaction qrData from backend
- Added qrData state to capture API response
- Configured QR with error correction level M and white margin
Resolves: TASK-2026-01-20-003 audit P2 gap
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add settingsApi in lib/api.ts with get, update, getWhatsAppStatus,
testWhatsApp and getSubscription endpoints
- Rewrite Settings.tsx to use React Query for data fetching
- Implement useQuery for loading settings and subscription data
- Implement useMutation for saving settings changes
- Add form state management with controlled inputs
- Add loading states, error handling and success notifications
- Add individual save buttons per section plus global save
- Add WhatsApp connection test functionality
- Display subscription details with token usage
Also includes exports API and export button components added by linter.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace useState+useEffect with useMemo for resolvedTheme
- Use useSyncExternalStore for tracking system theme changes
- Use useLayoutEffect for DOM mutations (applying dark class)
- Add useCallback and useMemo for performance optimization
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ThemeContext for system/light/dark theme management
- Update Layout with theme toggle button
- Add dark mode styles to components
- Update Tailwind config for dark mode support
- Add CSS transitions for smooth theme switching
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Install and configure vite-plugin-pwa
- Add manifest configuration for MiChangarrito
- Create SVG icons (192x192, 512x512) with MCH branding
- Add apple-touch-icon and favicon
- Update index.html with PWA meta tags
- Enable service worker with workbox for offline caching
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace mock data with real API calls using React Query
- Add fiadosApi to lib/api.ts with all fiado endpoints
- Implement NewFiadoModal for creating fiados
- Implement PaymentModal for registering payments
- Add loading and error states
- Calculate stats dynamically from API data
- Show partial payment status and amount paid
- Display recent payments from actual payment records
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace mock data with real API calls using React Query:
- useQuery for fetching products with category/search filters
- useMutation for create, update, and delete operations
- Add loading, error, and empty states
- Add create/edit modal with form validation
- Add delete confirmation modal
- Maintain existing UI structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace mock data with real API calls using React Query
- Add useQuery hooks for products, movements, low stock, and alerts
- Implement loading state with spinner
- Implement error state with retry button
- Add alerts banner for inventory warnings
- Add empty state messages for no data scenarios
- Add proper TypeScript interfaces for API responses
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace mock data with React Query hooks
- Add CRUD operations (create/update customers)
- Add loading, error, and empty states
- Add modal for customer form
- Maintain existing UI structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace hardcoded mock data with TanStack Query hooks:
- dashboardApi.getStats() for stats cards (sales, orders, customers, fiado)
- ordersApi.getAll() for recent orders list
- inventoryApi.getLowStock() for low stock alerts
Add loading spinners and error states for each section.
Add TypeScript interfaces for API response types.
Add formatCurrency helper for MXN formatting.
Add Spanish labels for order status.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace mock data with useQuery for fetching orders from ordersApi
- Add useMutation for updating order status
- Implement loading state with spinner
- Add error state with retry button
- Add empty state when no orders found
- Show individual loading state on status update buttons
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MCH-019 - Tienda de Tokens:
- Tokens.tsx con balance, paquetes y historial de uso
- Integracion con billingApi para checkout Stripe
- Visualizacion de costos por servicio
MCH-024 - CoDi/SPEI:
- CodiSpei.tsx con tabs CoDi y SPEI
- Generacion de QR CoDi para cobros
- Visualizacion de CLABE virtual
- Historial de transacciones
Actualizaciones:
- App.tsx: Rutas /tokens y /codi-spei
- Layout.tsx: Enlaces en navegacion
- api.ts: billingApi y subscriptionsApi
Sprint 6 - Frontend completado
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Agregar dependencias: i18next, react-i18next, i18next-browser-languagedetector
- Eliminar imports no utilizados (Search, Filter)
- Eliminar variables no utilizadas (refetch, generateCodeMutation)
- Renombrar params no usados con underscore (_supplier, _onRemove)
Build ahora pasa sin errores.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>