Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 818ed0c1ac | |||
| f80295d4fd | |||
| f4fe914fe9 | |||
| 3c41cbc950 | |||
| 9940b82568 | |||
| b87ef03093 | |||
| 10318f7e63 | |||
| c93bf6d7a2 | |||
| 53ae0c283b | |||
| 895b88f6d2 |
80
src/app/admin/page.tsx
Normal file
80
src/app/admin/page.tsx
Normal file
@@ -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 (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="directional-hover"
|
||||
defaultTextAnimation="background-highlight"
|
||||
borderRadius="soft"
|
||||
contentWidth="small"
|
||||
sizing="largeSmallSizeLargeTitles"
|
||||
background="fluid"
|
||||
cardStyle="outline"
|
||||
primaryButtonStyle="flat"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="semibold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarLayoutFloatingOverlay
|
||||
navItems={[
|
||||
{ name: "Inicio", id: "home" },
|
||||
{ name: "Nuestra Historia", id: "about" },
|
||||
{ name: "Productos", id: "products" },
|
||||
{ name: "Ventajas", id: "features" },
|
||||
{ name: "Profesionales", id: "professionals" },
|
||||
{ name: "Admin", id: "/admin" },
|
||||
{ name: "Contacto", id: "contact" }
|
||||
]}
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EccHcmLBLfaDNDp5ChTlQGMJOM/uploaded-1780481858970-vnz8dv02.png"
|
||||
logoAlt="Logo de Chente Ibéricos"
|
||||
brandName="Chente"
|
||||
button={{ text: "Contacto", href: "contact" }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="min-h-[60vh] flex flex-col items-center justify-center p-8 text-center">
|
||||
<h1 className="text-5xl font-bold mb-4">Panel de Administración</h1>
|
||||
<p className="text-xl mb-8">Gestiona tu tienda de productos ibéricos.</p>
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-4xl">
|
||||
<div className="bg-card p-6 rounded-lg shadow-md">
|
||||
<h2 className="text-2xl font-semibold mb-2">Gestión de Productos y Precios</h2>
|
||||
<p>Añade, edita o elimina productos, y actualiza sus precios.</p>
|
||||
</div>
|
||||
<div className="bg-card p-6 rounded-lg shadow-md">
|
||||
<h2 className="text-2xl font-semibold mb-2">Gestión de Órdenes y Stock</h2>
|
||||
<p>Supervisa pedidos, actualiza estados y controla el inventario.</p>
|
||||
</div>
|
||||
<div className="bg-card p-6 rounded-lg shadow-md">
|
||||
<h2 className="text-2xl font-semibold mb-2">Formularios de Contacto</h2>
|
||||
<p>Revisa y responde a las consultas de los clientes.</p>
|
||||
</div>
|
||||
<div className="bg-card p-6 rounded-lg shadow-md">
|
||||
<h2 className="text-2xl font-semibold mb-2">Cupones de Descuento</h2>
|
||||
<p>Crea y gestiona códigos de descuento para tus promociones.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoReveal
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EccHcmLBLfaDNDp5ChTlQGMJOM/uploaded-1780481858970-vnz8dv02.png"
|
||||
logoAlt="Logo de Chente Ibéricos"
|
||||
logoText="Chente © JAMONES CHENTACO S.L. Todos los derechos reservados."
|
||||
leftLink={{
|
||||
text: "Política de Privacidad", href: "/politica-privacidad"
|
||||
}}
|
||||
rightLink={{
|
||||
text: "Aviso Legal", href: "/aviso-legal"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
240
src/app/checkout/page.tsx
Normal file
240
src/app/checkout/page.tsx
Normal file
@@ -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", id: "/" },
|
||||
{ name: "Nuestra Historia", id: "about" },
|
||||
{ name: "Productos", id: "products" },
|
||||
{ name: "Ventajas", id: "features" },
|
||||
{ name: "Profesionales", id: "professionals" },
|
||||
{ name: "Contacto", id: "contact" },
|
||||
{ name: "Checkout", id: "/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 (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="directional-hover"
|
||||
defaultTextAnimation="background-highlight"
|
||||
borderRadius="soft"
|
||||
contentWidth="small"
|
||||
sizing="largeSmallSizeLargeTitles"
|
||||
background="fluid"
|
||||
cardStyle="outline"
|
||||
primaryButtonStyle="flat"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="semibold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarLayoutFloatingOverlay
|
||||
navItems={navItems}
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EccHcmLBLfaDNDp5ChTlQGMJOM/uploaded-1780481858970-vnz8dv02.png"
|
||||
logoAlt="Logo de Chente Ibéricos"
|
||||
brandName="Chente"
|
||||
button={{
|
||||
text: "Contacto", href: "#contact"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<main className="min-h-[70vh] flex items-center justify-center p-8">
|
||||
<div className="max-w-xl text-center">
|
||||
<h1 className="text-4xl font-bold mb-4">¡Gracias por tu compra!</h1>
|
||||
<p className="text-lg text-foreground/80 mb-6">Tu pedido ha sido confirmado y será procesado en breve. Recibirás un correo electrónico con los detalles.</p>
|
||||
<a href="/" className="inline-flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-white bg-primary-cta hover:bg-primary-cta/90">
|
||||
Volver al Inicio
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoReveal
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EccHcmLBLfaDNDp5ChTlQGMJOM/uploaded-1780481858970-vnz8dv02.png"
|
||||
logoAlt="Logo de Chente Ibéricos"
|
||||
logoText="Chente © JAMONES CHENTACO S.L. Todos los derechos reservados."
|
||||
leftLink={{
|
||||
text: "Política de Privacidad", href: "/politica-privacidad"
|
||||
}}
|
||||
rightLink={{
|
||||
text: "Aviso Legal", href: "/aviso-legal"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="directional-hover"
|
||||
defaultTextAnimation="background-highlight"
|
||||
borderRadius="soft"
|
||||
contentWidth="small"
|
||||
sizing="largeSmallSizeLargeTitles"
|
||||
background="fluid"
|
||||
cardStyle="outline"
|
||||
primaryButtonStyle="flat"
|
||||
secondaryButtonStyle="glass"
|
||||
headingFontWeight="semibold"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarLayoutFloatingOverlay
|
||||
navItems={navItems}
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EccHcmLBLfaDNDp5ChTlQGMJOM/uploaded-1780481858970-vnz8dv02.png"
|
||||
logoAlt="Logo de Chente Ibéricos"
|
||||
brandName="Chente"
|
||||
button={{
|
||||
text: "Contacto", href: "#contact"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<main className="container mx-auto p-4 md:p-8 min-h-[70vh]">
|
||||
<h1 className="text-4xl font-bold text-center mb-8">Finalizar Compra</h1>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
{/* Order Summary */}
|
||||
<div className="lg:col-span-2 bg-card p-6 rounded-lg shadow-lg">
|
||||
<h2 className="text-2xl font-semibold mb-4 flex items-center"><ShoppingBag className="mr-2" /> Resumen del Pedido</h2>
|
||||
<div className="space-y-4">
|
||||
{currentOrder.items.map(item => (
|
||||
<div key={item.id} className="flex justify-between items-center border-b border-foreground/10 pb-2">
|
||||
<span className="text-foreground/90">{item.name} (x{item.quantity})</span>
|
||||
<span className="font-medium">{item.price * item.quantity}€</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="mt-6 pt-4 border-t border-foreground/20 space-y-2">
|
||||
<div className="flex justify-between">
|
||||
<span>Subtotal:</span>
|
||||
<span className="font-medium">{currentOrder.subtotal.toFixed(2)}€</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span>IVA ({currentOrder.ivaRate * 100}%):</span>
|
||||
<span className="font-medium">{currentOrder.ivaAmount.toFixed(2)}€</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span>Envío:</span>
|
||||
<span className="font-medium">{selectedShipping.cost.toFixed(2)}€</span>
|
||||
</div>
|
||||
<div className="flex justify-between text-xl font-bold mt-4">
|
||||
<span>Total:</span>
|
||||
<span>{currentOrder.total.toFixed(2)}€</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Shipping and Payment */}
|
||||
<div className="bg-card p-6 rounded-lg shadow-lg">
|
||||
<h2 className="text-2xl font-semibold mb-4 flex items-center"><Truck className="mr-2" /> Detalles del Envío</h2>
|
||||
<div className="space-y-3 mb-6">
|
||||
{shippingOptions.map(option => (
|
||||
<label key={option.label} className="flex items-center space-x-2 cursor-pointer">
|
||||
<input
|
||||
type="radio"
|
||||
name="shipping"
|
||||
value={option.cost}
|
||||
checked={selectedShipping.cost === option.cost}
|
||||
onChange={() => setSelectedShipping(option)}
|
||||
className="form-radio text-primary-cta"
|
||||
/>
|
||||
<span>{option.label} - {option.cost.toFixed(2)}€</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mb-4 flex items-center"><CreditCard className="mr-2" /> Método de Pago</h2>
|
||||
<div className="space-y-3">
|
||||
<button
|
||||
className="w-full flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#5a67d8] hover:bg-[#434d9b]"
|
||||
onClick={() => alert("Integración con Stripe Checkout (Visa, Mastercard, Apple Pay, Google Pay)")}
|
||||
>
|
||||
Pagar con Stripe
|
||||
</button>
|
||||
<button
|
||||
className="w-full flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-white bg-[#0070ba] hover:bg-[#005a9c]"
|
||||
onClick={() => alert("Integración con PayPal")}
|
||||
>
|
||||
Pagar con PayPal
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="mt-6 w-full flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-white bg-primary-cta hover:bg-primary-cta/90"
|
||||
onClick={handleConfirmOrder}
|
||||
>
|
||||
Confirmar Pedido
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoReveal
|
||||
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EccHcmLBLfaDNDp5ChTlQGMJOM/uploaded-1780481858970-vnz8dv02.png"
|
||||
logoAlt="Logo de Chente Ibéricos"
|
||||
logoText="Chente © JAMONES CHENTACO S.L. Todos los derechos reservados."
|
||||
leftLink={{
|
||||
text: "Política de Privacidad", href: "/politica-privacidad"
|
||||
}}
|
||||
rightLink={{
|
||||
text: "Aviso Legal", href: "/aviso-legal"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
@@ -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", id: "/admin"},
|
||||
{
|
||||
name: "Contacto", id: "contact"},
|
||||
]}
|
||||
|
||||
Reference in New Issue
Block a user