mirror of
https://github.com/marcogll/gloria_app.git
synced 2026-03-15 13:24:44 +00:00
feat: Complete Sprints 3 & 4 - Email, Reschedule, OCR, Upload, Contact Forms
Sprint 3 - Crisis y Agenda (100%): - Implement SMTP email service with nodemailer - Create email templates (reschedule, daily agenda, course inquiry) - Add appointment reschedule functionality with modal - Add Google Calendar updateEvent function - Create scheduled job for daily agenda email at 10 PM - Add manual trigger endpoint for testing Sprint 4 - Pagos y Roles (100%): - Add Payment proof upload with OCR (tesseract.js, pdf-parse) - Extract data from proofs (amount, date, reference, sender, bank) - Create PaymentUpload component with drag & drop - Add course contact form to /cursos page - Update Services button to navigate to /servicios - Add Reschedule button to Assistant and Therapist dashboards - Add PaymentUpload component to Assistant dashboard - Add eventId field to Appointment model - Add OCR-extracted fields to Payment model - Update Prisma schema and generate client - Create API endpoints for reschedule, upload-proof, courses contact - Create manual trigger endpoint for daily agenda job - Initialize daily agenda job in layout.tsx Dependencies added: - nodemailer, node-cron, tesseract.js, sharp, pdf-parse, @types/nodemailer Files created/modified: - src/infrastructure/email/smtp.ts - src/lib/email/templates/* - src/jobs/send-daily-agenda.ts - src/app/api/calendar/reschedule/route.ts - src/app/api/payments/upload-proof/route.ts - src/app/api/contact/courses/route.ts - src/app/api/jobs/trigger-agenda/route.ts - src/components/dashboard/RescheduleModal.tsx - src/components/dashboard/PaymentUpload.tsx - src/components/forms/CourseContactForm.tsx - src/app/dashboard/asistente/page.tsx (updated) - src/app/dashboard/terapeuta/page.tsx (updated) - src/app/cursos/page.tsx (updated) - src/components/layout/Services.tsx (updated) - src/infrastructure/external/calendar.ts (updated) - src/app/layout.tsx (updated) - prisma/schema.prisma (updated) - src/lib/validations.ts (updated) - src/lib/env.ts (updated) Tests: - TypeScript typecheck: No errors - ESLint: Only warnings (img tags, react-hooks) - Production build: Successful Documentation: - Updated CHANGELOG.md with Sprint 3/4 changes - Updated PROGRESS.md with 100% completion status - Updated TASKS.md with completed tasks
This commit is contained in:
156
src/app/servicios/page.tsx
Normal file
156
src/app/servicios/page.tsx
Normal file
@@ -0,0 +1,156 @@
|
||||
"use client";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Heart, Users, Sparkles, Calendar } from "lucide-react";
|
||||
|
||||
const services = [
|
||||
{
|
||||
icon: Heart,
|
||||
title: "Terapia Individual",
|
||||
description:
|
||||
"Sesiones uno a uno enfocadas en ansiedad, depresión, trauma o crecimiento personal.",
|
||||
image: "/services/icons/t_ind.png",
|
||||
duration: "60 min",
|
||||
modalidad: "Presencial o Virtual",
|
||||
},
|
||||
{
|
||||
icon: Users,
|
||||
title: "Terapia de Pareja",
|
||||
description: "Espacios para mejorar la comunicación, resolver conflictos y reconectar.",
|
||||
image: "/services/icons/t_pareja.png",
|
||||
duration: "60-90 min",
|
||||
modalidad: "Presencial o Virtual",
|
||||
},
|
||||
{
|
||||
icon: Sparkles,
|
||||
title: "Talleres y Grupos",
|
||||
description: "Experiencias colectivas de sanación y aprendizaje emocional.",
|
||||
image: "/services/icons/t_fam.png",
|
||||
duration: "2-3 horas",
|
||||
modalidad: "Presencial",
|
||||
},
|
||||
{
|
||||
icon: Calendar,
|
||||
title: "Crisis y Emergencia",
|
||||
description: "Atención inmediata para situaciones de crisis emocional.",
|
||||
image: "/services/icons/t_ind.png",
|
||||
duration: "Variable",
|
||||
modalidad: "Virtual",
|
||||
},
|
||||
];
|
||||
|
||||
export default function ServicesPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-background">
|
||||
<div className="container mx-auto px-4 py-12 sm:px-6 lg:px-8">
|
||||
<motion.div
|
||||
className="mb-12 text-center"
|
||||
initial={{ opacity: 0, y: -20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6 }}
|
||||
>
|
||||
<h1 className="mb-4 font-serif text-4xl font-bold text-primary sm:text-5xl">Servicios</h1>
|
||||
<p className="mx-auto max-w-2xl text-lg text-secondary">
|
||||
Ofrezco distintos enfoques terapéuticos adaptados a tus necesidades
|
||||
</p>
|
||||
<motion.div
|
||||
className="mx-auto h-1 w-24 bg-accent"
|
||||
initial={{ width: 0 }}
|
||||
animate={{ width: 96 }}
|
||||
transition={{ duration: 0.8, delay: 0.3 }}
|
||||
/>
|
||||
</motion.div>
|
||||
|
||||
<div className="grid gap-8 md:grid-cols-2 lg:gap-12">
|
||||
{services.map((service, index) => {
|
||||
const Icon = service.icon;
|
||||
return (
|
||||
<motion.div
|
||||
key={service.title}
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6, delay: index * 0.1 }}
|
||||
>
|
||||
<motion.div
|
||||
whileHover={{ y: -8 }}
|
||||
transition={{ type: "spring", stiffness: 300, damping: 20 }}
|
||||
>
|
||||
<div className="rounded-2xl border-t-4 border-t-accent bg-white shadow-lg transition-shadow hover:shadow-xl">
|
||||
<div className="p-8">
|
||||
<div className="mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-background">
|
||||
<img
|
||||
src={service.image}
|
||||
alt={service.title}
|
||||
className="h-12 w-12 object-contain"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<h3 className="mb-3 text-center font-serif text-2xl font-semibold text-primary">
|
||||
{service.title}
|
||||
</h3>
|
||||
|
||||
<p className="mb-6 text-center leading-relaxed text-secondary">
|
||||
{service.description}
|
||||
</p>
|
||||
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center justify-between border-b py-3">
|
||||
<span className="text-sm font-medium text-primary">Duración</span>
|
||||
<span className="text-sm text-secondary">{service.duration}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between border-b py-3">
|
||||
<span className="text-sm font-medium text-primary">Modalidad</span>
|
||||
<span className="text-sm text-secondary">{service.modalidad}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between py-3">
|
||||
<span className="text-sm font-medium text-primary">Inversión</span>
|
||||
<span className="text-sm font-semibold text-accent">Variable</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
onClick={() => {
|
||||
const element = document.querySelector("#agendar");
|
||||
if (element) element.scrollIntoView({ behavior: "smooth" });
|
||||
}}
|
||||
className="mt-6 w-full bg-accent text-primary hover:bg-accent/90"
|
||||
>
|
||||
Agendar Sesión
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
<motion.div
|
||||
className="mt-12 rounded-2xl bg-white p-8 shadow-lg"
|
||||
initial={{ opacity: 0, y: 30 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6, delay: 0.4 }}
|
||||
>
|
||||
<h2 className="mb-4 font-serif text-2xl font-bold text-primary">
|
||||
¿Tienes dudas sobre qué servicio es para ti?
|
||||
</h2>
|
||||
<p className="mb-6 text-secondary">
|
||||
Agenda una sesión de evaluación gratuita para que podamos identificar juntos tus
|
||||
necesidades y definir el mejor camino de sanación.
|
||||
</p>
|
||||
<Button
|
||||
size="lg"
|
||||
onClick={() => {
|
||||
const element = document.querySelector("#agendar");
|
||||
if (element) element.scrollIntoView({ behavior: "smooth" });
|
||||
}}
|
||||
className="w-full bg-primary text-white hover:bg-primary/90 sm:w-auto"
|
||||
>
|
||||
Agenda tu Sesión de Evaluación
|
||||
</Button>
|
||||
</motion.div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user