Feat Varios 3

This commit is contained in:
2026-01-06 10:34:06 -03:00
parent 0fa77e4a98
commit 9fa21ebec3
65 changed files with 2897 additions and 373 deletions

View File

@@ -31,7 +31,7 @@ export default function CashOpeningModal({ onSuccess, onCancel }: Props) {
setLoading(true);
try {
// Enviamos el fondo inicial al endpoint que creamos en C#
await api.post('/cashsessions/open', openingBalance);
await api.post('/cashsessions/open', { openingBalance });
showToast("Caja abierta correctamente. ¡Buen turno!", "success");
onSuccess();
} catch (error) {
@@ -47,11 +47,10 @@ export default function CashOpeningModal({ onSuccess, onCancel }: Props) {
initial={{ opacity: 0, scale: 0.9 }} animate={{ opacity: 1, scale: 1 }}
className="bg-white w-full max-w-md rounded-[2.5rem] shadow-2xl overflow-hidden border border-white/20"
>
{/* Header (Igual al anterior) */}
{/* Header */}
<div className="p-8 bg-slate-900 text-white relative">
<div className="absolute top-0 right-0 p-8 opacity-10"><Lock size={80} /></div>
{/* Botón X de cerrar en el header */}
<div className="relative z-10">
<span className="text-[10px] font-black uppercase tracking-[0.3em] text-blue-400 block mb-2">Inicio de Jornada</span>
<h2 className="text-3xl font-black tracking-tight uppercase">Apertura de Caja</h2>
@@ -89,13 +88,6 @@ export default function CashOpeningModal({ onSuccess, onCancel }: Props) {
</div>
</div>
<button
type="submit" disabled={loading}
className="w-full py-5 bg-blue-600 text-white font-black uppercase text-xs tracking-[0.2em] rounded-2xl shadow-xl shadow-blue-200 hover:bg-blue-700 transition-all flex items-center justify-center gap-3 active:scale-95"
>
<Play size={18} fill="currentColor" /> {loading ? 'Procesando...' : 'Iniciar Sesión de Trabajo'}
</button>
<div className="flex gap-4">
<button
type="button"
@@ -109,7 +101,7 @@ export default function CashOpeningModal({ onSuccess, onCancel }: Props) {
disabled={loading}
className="flex-[2] py-5 bg-blue-600 text-white font-black uppercase text-xs tracking-[0.2em] rounded-2xl shadow-xl shadow-blue-200 hover:bg-blue-700 transition-all flex items-center justify-center gap-3 active:scale-95"
>
<Play size={18} fill="currentColor" /> {loading ? 'Cargando...' : 'Iniciar Turno'}
<Play size={18} fill="currentColor" /> {loading ? 'Abriendo...' : 'Iniciar Turno'}
</button>
</div>
</form>

View File

@@ -3,7 +3,7 @@ import { Outlet, useNavigate, useLocation, Link } from 'react-router-dom';
import {
LayoutDashboard, PlusCircle, Banknote, LogOut,
ChevronLeft, ChevronRight, Settings, Bell,
Search, User as UserIcon, Monitor,
User as UserIcon, Monitor,
TrendingUp, ClipboardList, ShieldCheck
} from 'lucide-react';
import { motion, AnimatePresence } from 'framer-motion';
@@ -138,10 +138,7 @@ export default function CounterLayout() {
{/* TOP HEADER */}
<header className="h-16 bg-white/80 backdrop-blur-md border-b border-slate-200 px-8 flex items-center justify-between z-20 sticky top-0">
<div className="flex items-center gap-4 flex-1">
<div className="relative max-w-md w-full hidden md:block">
<Search className="absolute left-3 top-1/2 -translate-y-1/2 text-slate-400" size={18} />
<input type="text" placeholder="Buscar avisos, clientes..." className="w-full pl-10 pr-4 py-2 bg-slate-100 border-none rounded-xl text-sm focus:ring-2 focus:ring-blue-500/20 transition-all outline-none font-medium" />
</div>
{/* Buscador eliminado por redundancia */}
</div>
<div className="flex items-center gap-4">