Commit Graph

3 Commits

Author SHA1 Message Date
1b2fca85f8 [MCH-FE] feat: Connect Settings to real API
- 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>
2026-01-20 02:34:59 -06:00
2c4db175c2 [MCH-FE] feat: Connect Dashboard to real API
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>
2026-01-20 02:15:04 -06:00
67d3eef6a5 Migración desde michangarrito/frontend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:12:10 -06:00