- Add bulk XML CFDI upload support (up to 300MB) - Add period selector component for month/year navigation - Fix session persistence on page refresh (Zustand hydration) - Fix income/expense classification based on tenant RFC - Fix IVA calculation from XML (correct Impuestos element) - Add error handling to reportes page - Support multiple CORS origins - Update reportes service with proper Decimal/BigInt handling - Add RFC to tenant view store for proper CFDI classification - Update README with changelog and new features Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
821 B
TypeScript
26 lines
821 B
TypeScript
import { create } from 'zustand';
|
|
import { persist } from 'zustand/middleware';
|
|
|
|
interface TenantViewState {
|
|
viewingTenantId: string | null;
|
|
viewingTenantName: string | null;
|
|
viewingTenantRfc: string | null;
|
|
setViewingTenant: (id: string | null, name: string | null, rfc?: string | null) => void;
|
|
clearViewingTenant: () => void;
|
|
}
|
|
|
|
export const useTenantViewStore = create<TenantViewState>()(
|
|
persist(
|
|
(set) => ({
|
|
viewingTenantId: null,
|
|
viewingTenantName: null,
|
|
viewingTenantRfc: null,
|
|
setViewingTenant: (id, name, rfc = null) => set({ viewingTenantId: id, viewingTenantName: name, viewingTenantRfc: rfc }),
|
|
clearViewingTenant: () => set({ viewingTenantId: null, viewingTenantName: null, viewingTenantRfc: null }),
|
|
}),
|
|
{
|
|
name: 'horux-tenant-view',
|
|
}
|
|
)
|
|
);
|