From b87ef03093f23b91960d1f2c2975c5e1fece03f9 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 3 Jun 2026 10:40:56 +0000 Subject: [PATCH 1/3] Add src/app/admin/page.tsx --- src/app/admin/page.tsx | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/app/admin/page.tsx diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx new file mode 100644 index 0000000..7de96f6 --- /dev/null +++ b/src/app/admin/page.tsx @@ -0,0 +1,80 @@ +"use client"; + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import ReactLenis from "lenis/react"; +import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay'; +import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal'; + +export default function AdminPanelPage() { + return ( + + + + +
+

Panel de Administración

+

Gestiona tu tienda de productos ibéricos.

+
+
+

Gestión de Productos y Precios

+

Añade, edita o elimina productos, y actualiza sus precios.

+
+
+

Gestión de Órdenes y Stock

+

Supervisa pedidos, actualiza estados y controla el inventario.

+
+
+

Formularios de Contacto

+

Revisa y responde a las consultas de los clientes.

+
+
+

Cupones de Descuento

+

Crea y gestiona códigos de descuento para tus promociones.

+
+
+
+ + +
+
+ ); +} From 9940b82568fb8b6143512212e96e87f83a9d9963 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 3 Jun 2026 10:40:57 +0000 Subject: [PATCH 2/3] Add src/app/checkout/page.tsx --- src/app/checkout/page.tsx | 240 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 src/app/checkout/page.tsx diff --git a/src/app/checkout/page.tsx b/src/app/checkout/page.tsx new file mode 100644 index 0000000..0adc748 --- /dev/null +++ b/src/app/checkout/page.tsx @@ -0,0 +1,240 @@ +"use client"; + +import React from 'react'; +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import ReactLenis from "lenis/react"; +import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay'; +import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal'; +import { ShoppingBag, CreditCard, DollarSign, Truck } from "lucide-react"; + +export default function CheckoutPage() { + const navItems = [ + { name: "Inicio", href: "/" }, + { name: "Nuestra Historia", id: "about" }, + { name: "Productos", id: "products" }, + { name: "Ventajas", id: "features" }, + { name: "Profesionales", id: "professionals" }, + { name: "Contacto", id: "contact" }, + { name: "Checkout", href: "/checkout" }, + ]; + + // Dummy order data - in a real app, this would come from a cart state or API + const initialOrder = { + items: [ + { id: 'p1', name: 'Jamón 100% Ibérico de Bellota', price: 450.00, quantity: 1 }, + { id: 'p5', name: 'Lomo Ibérico de Bellota', price: 60.00, quantity: 2 }, + ], + subtotal: 0, + shippingCost: 0, + ivaRate: 0.10, // Assuming 10% IVA for food products in Spain + ivaAmount: 0, + total: 0, + }; + + const shippingOptions = [ + { label: "Envío Estándar (3-5 días)", cost: 10.00 }, + { label: "Envío Urgente (1-2 días)", cost: 20.00 }, + { label: "Recogida en tienda (Gratis)", cost: 0.00 }, + ]; + + const [currentOrder, setCurrentOrder] = React.useState(initialOrder); + const [selectedShipping, setSelectedShipping] = React.useState(shippingOptions[0]); + const [orderConfirmed, setOrderConfirmed] = React.useState(false); + + React.useEffect(() => { + const subtotal = currentOrder.items.reduce((sum, item) => sum + item.price * item.quantity, 0); + const calculatedIva = subtotal * currentOrder.ivaRate; + const total = subtotal + calculatedIva + selectedShipping.cost; + + setCurrentOrder(prevOrder => ({ + ...prevOrder, + subtotal: subtotal, + ivaAmount: calculatedIva, + shippingCost: selectedShipping.cost, + total: total, + })); + }, [selectedShipping, currentOrder.items]); + + const handleConfirmOrder = () => { + // In a real application, this would trigger a payment gateway redirect + // or call an API to process the order. + console.log("Order confirmed:", currentOrder); + setOrderConfirmed(true); + // Simulate Stripe/PayPal integration by showing a success message + }; + + if (orderConfirmed) { + return ( + + + +
+
+

¡Gracias por tu compra!

+

Tu pedido ha sido confirmado y será procesado en breve. Recibirás un correo electrónico con los detalles.

+ + Volver al Inicio + +
+
+ +
+
+ ); + } + + return ( + + + + +
+

Finalizar Compra

+ +
+ {/* Order Summary */} +
+

Resumen del Pedido

+
+ {currentOrder.items.map(item => ( +
+ {item.name} (x{item.quantity}) + {item.price * item.quantity}€ +
+ ))} +
+
+
+ Subtotal: + {currentOrder.subtotal.toFixed(2)}€ +
+
+ IVA ({currentOrder.ivaRate * 100}%): + {currentOrder.ivaAmount.toFixed(2)}€ +
+
+ Envío: + {selectedShipping.cost.toFixed(2)}€ +
+
+ Total: + {currentOrder.total.toFixed(2)}€ +
+
+
+ + {/* Shipping and Payment */} +
+

Detalles del Envío

+
+ {shippingOptions.map(option => ( + + ))} +
+ +

Método de Pago

+
+ + +
+ +
+
+
+ + +
+
+ ); +} From 3c41cbc950204f6d13a65891d55b812ce35d8ece Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 3 Jun 2026 10:40:57 +0000 Subject: [PATCH 3/3] Update src/app/page.tsx --- src/app/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 9096eb1..352786c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,7 +11,7 @@ import ProductCardFour from '@/components/sections/product/ProductCardFour'; import TestimonialCardTen from '@/components/sections/testimonial/TestimonialCardTen'; import TextSplitAbout from '@/components/sections/about/TextSplitAbout'; import FeatureCardTwentyFour from '@/components/sections/feature/FeatureCardTwentyFour'; -import { Award, Building2, Headphones, Leaf, ShieldCheck, Truck, Utensils, Package, ShoppingBag, Tag, Repeat, Users } from "lucide-react"; +import { Award, Building2, Headphones, Leaf, ShieldCheck, Truck } from "lucide-react"; export default function LandingPage() { return ( @@ -41,6 +41,8 @@ export default function LandingPage() { name: "Ventajas", id: "features"}, { name: "Profesionales", id: "professionals"}, + { + name: "Admin", href: "/admin"}, { name: "Contacto", id: "contact"}, ]}