- Implemented API for updating company Verifactu profile. - Created entities for company Verifactu profile and defaults. - Developed hooks for querying and updating the company Verifactu profile. - Added UI components for displaying and editing company Verifactu settings. - Introduced validation and error handling for profile updates. - Created utility functions for building form data and handling feedback states. - Added tests for utility functions and error handling. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .env.acana | ||
| .env.development | ||
| .env.production | ||
| .env.rodax | ||
| Dockerfile | ||
| index.html | ||
| package.json | ||
| README.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.mts | ||
apps/web
Aplicación frontend principal del ERP.
Documentación canónica
- Flujo de autenticación y selección de empresa:
../../docs/frontend/auth-and-company-selection.md - Contexto tenant y reglas de
X-Company-Id:../../docs/architecture/tenant-context.md - Tratamiento de errores HTTP en frontend:
../../docs/architecture/http-error-handling-frontend.md
Runtime actual de autenticación
La app usa @erp/identity/client como runtime actual.
Flujo actual
- La sesión y la empresa activa se resuelven según el flujo documentado en
docs/frontend/auth-and-company-selection.md. - Las rutas tenant-scoped deben respetar las reglas de
X-Company-Iddocumentadas endocs/architecture/tenant-context.md.
Headers
- No duplicar aquí la matriz de headers.
- Consultar
docs/frontend/auth-and-company-selection.mdpara endpoints excluidos ytenant-context.mdpara reglas tenant-scoped.
App company switcher
Componente:
apps/web/src/layout/app-company-switcher.tsx
Propósito:
- mostrar la empresa activa real en el layout autenticado
- permitir cambiar entre
availableCompaniesde la sesión actual
Reglas:
- usar el contexto de
identity - no manejar tokens
- no llamar directamente a
GET /companies/available - no usar
companySlugpara auth - no modificar el access token
- respetar el flujo canónico documentado en
docs/frontend/auth-and-company-selection.md
Refresh automático
La app implementa refresh automático global sobre 401.
La semántica completa de retry, exclusiones y limpieza de sesión se documenta en docs/frontend/auth-and-company-selection.md.