feat: repositorios, servicios, UI completa con rutas, Capacitor Android sync

This commit is contained in:
mono
2026-10-24 21:11:50 -05:00
parent 0c7cf651ce
commit df3838c2f3
36 changed files with 4224 additions and 402 deletions

View File

@@ -0,0 +1,20 @@
import { db } from '../db/schema';
import type { CuadreCaja } from '@toldo/core';
export class CuadreRepository {
async create(cuadre: CuadreCaja): Promise<string> {
return db.cuadres.add(cuadre);
}
async getByFecha(fecha: Date): Promise<CuadreCaja[]> {
const start = new Date(fecha);
start.setHours(0, 0, 0, 0);
const end = new Date(fecha);
end.setHours(23, 59, 59, 999);
return db.cuadres.where('fecha').between(start, end).toArray();
}
async getAll(): Promise<CuadreCaja[]> {
return db.cuadres.toArray();
}
}