white-label: brand de la clinica por configuracion (fase 1 de instancia sin branding SKEEN)
- backend: GET/PUT /skeen/frontend/v1/brand leyendo ir.config_parameter skeen.clinic.brand (JSON: nombre, logo_claro, logo_oscuro, pie) con defaults SKEEN; GET publico (el login lo necesita sin sesion), PUT admin con auditoria. frontend_users.xml: 'Administrador SKEEN' -> 'Administrador' - frontend: ClinicBrand + BRAND_DEFAULT en odoo.ts; brand y setBrand en el contexto de auth (fetch al boot + cache localStorage + document.title) - Login/layouts/mensajes/exports leen el brand en vez de strings SKEEN: Login.tsx, SkeenLayout, HomeNestLayout, Cumpleanos (wa + export), Pacientes/Ventas/Cortes/Reportes/Kpis/Alertas/AgendaPrint (titulos), useClinicaPrint (fallback nombre), Login hace GET publico al montar - Configuracion > Clinica: tarjeta 'Identidad de la clinica' (solo admin) para editar nombre/pie/logos con preview - no renombrado (invisible al usuario): rutas API /skeen/*, claves localStorage, nombres de modulos, parametros skeen.* Verificacion API: 11/11 tests OK (defaults, PUT merge, campo invalido ignorado, restore, admin neutral). Deploy: build + rsync + Odoo reiniciado
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
} from '../components/ui';
|
||||
import { CortePrint } from '../components/CortePrint';
|
||||
import { odooApi, type CashClosing } from '../services/odoo';
|
||||
import { useAuth } from '../lib/auth';
|
||||
import { exportToExcel } from '../lib/exporter';
|
||||
|
||||
const money = (v: number) =>
|
||||
@@ -33,6 +34,7 @@ const PASOS = [
|
||||
] as const;
|
||||
|
||||
const Cortes: FC = () => {
|
||||
const { brand } = useAuth();
|
||||
const [closings, setClosings] = useState<CashClosing[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -79,9 +81,9 @@ const Cortes: FC = () => {
|
||||
}
|
||||
try {
|
||||
await exportToExcel({
|
||||
filename: `cortes-skeen-${mes}`,
|
||||
filename: `cortes-${mes}`,
|
||||
sheetName: 'Cortes',
|
||||
title: 'Cortes de caja SKEEN',
|
||||
title: `Cortes de caja ${brand.nombre}`,
|
||||
subtitle: `Mes ${mes} · ${cortesDelMes.length} cortes`,
|
||||
columns: [
|
||||
{ header: 'Referencia', key: 'name' },
|
||||
|
||||
Reference in New Issue
Block a user