- Added endpoint for retrieving deleted proformas with logical deletion. - Updated proforma listing to support active, archived, and deleted scopes. - Refactored repository and service layers to accommodate new proforma list scope. - Enhanced UI to display separate views for active, archived, and deleted proformas. - Updated localization files to reflect changes in proforma management. - Improved query handling to filter proformas based on their status and scope. |
||
|---|---|---|
| .. | ||
| 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.
Runtime actual de autenticación
La app usa:
@erp/identity/client
IdentityAuthSessionProvider
DataSourceProvider
Axios compartido
No debe usarse @erp/auth/client como runtime nuevo.
Flujo actual
login
-> GET /identity/auth/session
-> GET /companies/available
-> resolver empresa activa
-> auto-selección si hay una sola empresa
-> selector si hay varias
-> /no-companies si no hay empresas
-> X-Company-Id en rutas tenant-scoped
Headers
No enviar X-Company-Id a:
POST /identity/auth/login
POST /identity/auth/refresh
POST /identity/auth/logout
GET /identity/auth/session
GET /companies/available
Sí enviarlo a rutas tenant-scoped cuando exista activeCompanyId.
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
Refresh automático
La app implementa refresh automático global sobre 401 con retry único por request y refreshPromise compartida.
Si el refresh falla:
- limpiar sesión
- limpiar empresa activa persistida
- redirigir a
/login