Commit Graph

23 Commits

Author SHA1 Message Date
Adrian Flores Cortes
357c3cf1f9 feat(ux-ui): add Calendar, Kanban, Chart, CommandPalette, OnboardingTour, DashboardWidgets
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 19:26:08 -06:00
Adrian Flores Cortes
04c61d0a71 feat(ux-ui): add Switch, ThemeToggle, Skeleton, LanguageSelector atoms
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 19:26:02 -06:00
Adrian Flores Cortes
6568b9bfed feat(ux-ui): update layout, providers and config for UX remediation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 19:25:56 -06:00
Adrian Flores Cortes
a3b61b8ae4 [RBAC-004] feat: Add frontend permission integration
Phase 4 frontend implementation:
- permissions.api.ts: API service for GET /api/v1/permissions/me
- usePermissionStore.ts: Zustand store with caching (5min TTL)
- usePermissions.tsx: React hook with auto-fetch on auth
- CanAccess component: Permission-based conditional rendering

Features:
- can(resource, action): Single permission check
- canAny(...codes): OR logic for multiple permissions
- canAll(...codes): AND logic for multiple permissions
- hasRole/hasAnyRole: Role-based checks
- Super admin bypass
- Auto-fetch on authentication
- Cache invalidation on logout

Usage example:
```tsx
const { can, canAny } = usePermissions();
if (!can('invoices', 'create')) return <AccessDenied />;

<CanAccess permission="invoices:delete">
  <DeleteButton />
</CanAccess>
```

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 01:57:04 -06:00
Adrian Flores Cortes
1363fbd5f6 feat(hr): Add complete HR frontend module
- API Client: hr.api.ts with employees, departments, contracts, leaves, leaveTypes
- Types: hr.types.ts with all interfaces and enums
- Hooks: useEmployees, useDepartments, useContracts, useLeaves, useLeaveTypes
- Pages: EmployeesPage, EmployeeDetailPage, EmployeeFormPage, DepartmentsPage, ContractsPage, LeavesPage, LeaveRequestPage

Implements frontend for MGN-010 HR module

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:34:03 -06:00
Adrian Flores Cortes
14b84c61e2 feat(api): Add 5 new API clients for integrations
Added API clients with full endpoint coverage:
- ai.api.ts: 11 endpoints (conversations, messages, analyze, chat)
- whatsapp.api.ts: 20 endpoints (conversations, templates, broadcasts)
- webhooks.api.ts: 14 endpoints (CRUD, deliveries, logs)
- feature-flags.api.ts: 17 endpoints (flags, overrides, check)
- storage.api.ts: 21 endpoints (buckets, files, folders)

Total: 83 new endpoints

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:47:11 -06:00
Adrian Flores Cortes
41ae4f195c [SYNC] feat: Add new feature modules with API clients and hooks
- dashboard: api + hooks
- geolocation: api + hooks
- mcp: api + hooks
- payment-terminals: api + hooks
- scanning: api + hooks
- shared/types: api.types.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 18:15:05 -06:00
3a461cb184 [TASK-2026-01-20-005] feat: Resolve P2 gaps - Actions, Settings, Kanban
EPIC-P2-001: Frontend Actions Implementation
- Replace 31 console.log placeholders with navigate() calls
- 16 pages updated with proper routing

EPIC-P2-002: Settings Subpages Creation
- Add CompanySettingsPage.tsx
- Add ProfileSettingsPage.tsx
- Add SecuritySettingsPage.tsx
- Add SystemSettingsPage.tsx
- Update router with new routes

EPIC-P2-003: Bug Fix ValuationReportsPage
- Fix recursive getToday() function

EPIC-P2-006: CRM Pipeline Kanban
- Add PipelineKanbanPage.tsx
- Add KanbanColumn.tsx component
- Add KanbanCard.tsx component
- Add CRM routes to router

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:32:20 -06:00
f1a9ea3d1f [TASK-2026-01-20-004] feat: Add API clients for sales, purchases, financial, CRM, projects
EPIC-P1-004: Frontend API clients
- Add sales.api.ts (orders, quotations, returns)
- Add purchases.api.ts (purchase orders, suppliers, receipts)
- Add financial.api.ts (accounts, journals, payments)
- Add crm.api.ts (leads, opportunities, campaigns)
- Add projects.api.ts (projects, tasks, timesheets)
- Update api/index.ts with new exports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:06:32 -06:00
eb144dc3ea [TASK-2026-01-20-001] feat: Add API clients for products, inventory, warehouses and billing
EPIC-003: Clientes API frontend web
- products.api.ts: CRUD operations for product management
- inventory.api.ts: Stock levels, movements, adjustments, transfers
- warehouses.api.ts: Warehouse and location management
- billing.api.ts: Invoices, payments, credit notes, debit notes
- Updated index.ts with new exports

Coverage increased from 5.7% to ~25% of backend endpoints

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 02:12:52 -06:00
6b7f438669 feat(frontend): Add Audit and Notifications modules (MGN-007, MGN-008)
Audit module (MGN-007):
- AuditLogsPage.tsx: Full audit logs UI with filtering, stats cards, detail modal
- Uses existing types, api, hooks from settings feature

Notifications module (MGN-008):
- types/notifications.types.ts: Complete types for channels, templates, preferences, in-app
- api/notifications.api.ts: API clients for all notification operations
- hooks/useNotifications.ts: 5 hooks (useChannels, useTemplates, useNotificationPreferences,
  useInAppNotifications, useNotificationBell)
- NotificationsPage.tsx: Full notifications center with category cards, filtering,
  read/unread management

Both modules complement complete backends with comprehensive frontend UIs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 11:20:25 -06:00
4eb8ee2699 feat(frontend): Add Reports and Settings modules (MGN-009, MGN-006)
Reports module:
- types/reports.types.ts: Complete type definitions for definitions, executions, schedules
- api/reports.api.ts: API clients for all report operations
- hooks/useReports.ts: Custom hooks (useReportDefinitions, useReportExecutions, etc.)
- ReportsPage.tsx: Main reports management with tabs
- QuickReportsPage.tsx: Trial Balance and General Ledger quick reports

Settings module:
- types/settings.types.ts: Types for company, users, profile, audit logs
- api/settings.api.ts: API clients for settings operations
- hooks/useSettings.ts: Custom hooks (useCompany, useUsers, useProfile, etc.)
- SettingsPage.tsx: Settings hub with navigation cards
- UsersSettingsPage.tsx: User management page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 11:06:20 -06:00
07987788f8 feat(frontend): Add CRM and Projects modules frontend
- CRM module: Types, API client, hooks (useLeads, useOpportunities,
  usePipeline, useStages, useActivities), and pages (LeadsPage,
  OpportunitiesPage)
- Projects module: Types, API client, hooks (useProjects, useTasks,
  useTaskBoard, useTaskStages, useTimesheets), and pages (ProjectsPage,
  TasksPage)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 10:36:23 -06:00
54c14f87c8 feat(purchases): Add Purchasing module frontend (hooks + pages)
- Create purchases hooks (usePurchaseOrders, usePurchaseReceipts)
- Create PurchaseOrdersPage with order management and PDF download
- Create PurchaseReceiptsPage with receipt validation
- Update feature index to export hooks

MGN-012 Purchasing frontend implementation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 10:19:43 -06:00
836ebaf638 feat(financial): Add complete Financial module frontend
- Create financial types (Account, Journal, JournalEntry, Invoice, Payment)
- Create financial API client with full CRUD operations
- Create comprehensive hooks (useAccounts, useJournals, useJournalEntries, etc.)
- Create AccountsPage with account type filtering and stats
- Create JournalEntriesPage with journal filtering and post/cancel actions
- Create InvoicesPage with customer/supplier filtering and validation

MGN-010 Financial frontend implementation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 10:12:43 -06:00
32f2c06264 feat(sales): Add complete sales frontend pages and hooks (MGN-013)
New pages:
- SalesOrdersPage: Sales orders list with confirm/cancel/invoice actions
- QuotationsPage: Quotations management with send/accept/reject/convert actions

New hooks:
- useSalesOrders: Fetch and manage sales orders with CRUD and actions
- useSalesOrder: Single order management with line items
- useQuotations: Quotations lifecycle management
- useQuotation: Single quotation fetching

Features:
- Status filters (draft, sent, sale, done, cancelled)
- Date range filtering
- Invoice and delivery status tracking
- PDF download for quotations
- Convert quotation to sales order

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 10:03:15 -06:00
28c8bbb768 feat(inventory): Add complete inventory frontend pages and hooks (MGN-011)
New pages:
- StockLevelsPage: View and manage stock levels by warehouse/product
- MovementsPage: Stock movements history with filters and actions
- InventoryCountsPage: Physical inventory counts management
- ReorderAlertsPage: Low stock alerts and reorder suggestions
- ValuationReportsPage: Inventory valuation by FIFO/average cost

New hooks:
- useStockLevels: Fetch and manage stock levels
- useMovements: Fetch stock movements with CRUD operations
- useWarehouses: Manage warehouses
- useLocations: Manage warehouse locations
- useStockOperations: Stock adjust, transfer, reserve operations
- useInventoryCounts: Inventory count lifecycle management
- useInventoryAdjustments: Inventory adjustments management

Extended API client with:
- Inventory counts endpoints
- Inventory adjustments endpoints
- Stock valuation endpoints

Extended types with:
- InventoryCount, InventoryCountLine, CreateInventoryCountDto
- InventoryAdjustment, InventoryAdjustmentLine, CreateInventoryAdjustmentDto
- StockValuationLayer, ValuationSummary

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 09:54:51 -06:00
c9e1c3fb06 feat(catalogs): Add fiscal catalog components (MGN-005)
- Add types for fiscal entities (TaxCategory, FiscalRegime, CfdiUse, etc.)
- Add API clients for fiscal endpoints
- Add hooks for fiscal data fetching
- Add components:
  - FiscalRegimeSelect - SAT fiscal regime selector
  - CfdiUseSelect - CFDI use code selector
  - FiscalPaymentMethodSelect - SAT payment method selector
  - FiscalPaymentTypeSelect - PUE/PPD selector
  - TaxCategorySelect - Tax category selector
  - WithholdingTypeSelect - Withholding type selector
  - FiscalDataInput - Compound component for fiscal data collection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 09:31:14 -06:00
94ba9f6bcd feat(catalogs): Add complete catalog frontend module (MGN-005)
- Types: Country, State, Currency, CurrencyRate, Uom, UomCategory, PaymentTerm, DiscountRule
- API clients: countries.api, currencies.api, uom.api
- Hooks: useCountries, useStates, useCurrencies, useCurrencyRates, useLatestRates, useCurrencyConversion, useUomCategories, useUom, useUomConversion, useConversionTable
- Components: CountrySelect, StateSelect, CurrencySelect, CurrencyInput, UomCategorySelect, UomSelect, UomQuantityInput, AddressInput, ConversionTableDisplay, CurrencyRatesDisplay

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 09:09:41 -06:00
28b27565f8 feat(billing): Add billing-usage frontend module with components, pages and routes
- Add billing-usage feature module with types, API clients, hooks, and components
- Create PlanCard, PlanSelector, SubscriptionStatusBadge, InvoiceList, UsageSummaryCard, CouponInput components
- Add BillingPage, PlansPage, InvoicesPage, UsagePage
- Update routes to include billing section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 08:23:59 -06:00
b996680777 chore: Add .gitignore for build artifacts
Ignore node_modules, dist, tsbuildinfo and other common artifacts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 06:23:50 -06:00
6cb8e99f50 feat(frontend): Add API services for invoices, inventory, sales, purchases
- Add invoices feature: types, API service for CRUD, validation, payments, PDF
- Add inventory feature: types, API service for stock, movements, warehouses, locations
- Add sales feature: types, API service for orders, quotations, PDF
- Add purchases feature: types, API service for orders, receipts

Part of FASE 2: P0 Frontend API Services
2026-01-18 02:47:54 -06:00
d3fdc0b9c0 Initial commit - erp-core-frontend-web 2026-01-04 06:40:18 -06:00