|
| 1 | +import { Body, Container, Font, Head, Heading, Html, Preview, Section, Tailwind, Text } from "@react-email/components"; |
| 2 | +import * as React from "react"; |
| 3 | +import { Footer } from "./layout/Footer"; |
| 4 | +import { Header } from "./layout/Header"; |
| 5 | + |
| 6 | +interface TicketSolvedEmailProps { |
| 7 | + name: string; |
| 8 | + ticketId: string; |
| 9 | + ticketMessage: string; |
| 10 | + resolution?: string; |
| 11 | +} |
| 12 | + |
| 13 | +export default function TicketSolvedEmail({ name, ticketId, ticketMessage, resolution }: TicketSolvedEmailProps) { |
| 14 | + return ( |
| 15 | + <Html> |
| 16 | + <Tailwind |
| 17 | + config={{ |
| 18 | + theme: { |
| 19 | + extend: { |
| 20 | + colors: { |
| 21 | + zootopia: { |
| 22 | + navy: "#1d3071", |
| 23 | + blue: "#004aad", |
| 24 | + orange: "#e98d55", |
| 25 | + yellow: "#f2d575", |
| 26 | + brown: "#504039", |
| 27 | + }, |
| 28 | + }, |
| 29 | + }, |
| 30 | + }, |
| 31 | + }} |
| 32 | + > |
| 33 | + <Head> |
| 34 | + <Font fontFamily="Helvetica" fallbackFontFamily="Arial" fontWeight={400} fontStyle="normal" /> |
| 35 | + </Head> |
| 36 | + <Preview>Ticket #{ticketId} ได้รับการแก้ไขแล้ว!</Preview> |
| 37 | + |
| 38 | + <Body className="bg-white font-sans"> |
| 39 | + <Container className="mx-auto w-full max-w-[800px] my-10 bg-white rounded-2xl overflow-hidden shadow-lg"> |
| 40 | + <Header /> |
| 41 | + |
| 42 | + <Section className="bg-white px-6 py-8 text-center"> |
| 43 | + <Heading className="text-sm font-semibold text-[#1d3071] m-0 mb-2 tracking-widest uppercase" style={{ textShadow: "0 2px 8px rgba(0,0,0,0.1)" }}> |
| 44 | + Ticket |
| 45 | + </Heading> |
| 46 | + <Text className="text-2xl font-bold m-0 text-[#4caf50]">ได้รับการแก้ไขแล้ว!</Text> |
| 47 | + </Section> |
| 48 | + |
| 49 | + <Section className="px-6 pb-10 pt-4"> |
| 50 | + <Section className="bg-[#004aad]/20 border-l-4 border-[#1d3071] rounded-lg px-6 py-5 mb-8"> |
| 51 | + <Text className="text-base leading-relaxed text-[#004aad] m-0"> |
| 52 | + สวัสดีครับน้อง <strong className="text-[#504039]">{name}</strong> |
| 53 | + </Text> |
| 54 | + </Section> |
| 55 | + |
| 56 | + <Section className="bg-[#e8f5e9] border-2 border-[#4caf50] rounded-xl px-6 py-6 mb-8 text-center"> |
| 57 | + <Text className="text-lg font-bold text-[#2e7d32] m-0">Ticket ของน้องได้รับการแก้ไขเรียบร้อยแล้ว!</Text> |
| 58 | + </Section> |
| 59 | + |
| 60 | + <Section className="bg-[#f5f5f5] border-2 border-[#e0e0e0] rounded-xl px-6 py-6 mb-8"> |
| 61 | + <Text className="text-sm font-bold text-[#616161] m-0 mb-3">🎫 รายละเอียด Ticket:</Text> |
| 62 | + <Text className="text-sm leading-relaxed text-[#504039] m-0 mb-2"> |
| 63 | + <strong>หมายเลข Ticket:</strong> #{ticketId} |
| 64 | + </Text> |
| 65 | + {ticketMessage && ( |
| 66 | + <Text className="text-sm leading-relaxed text-[#504039] m-0"> |
| 67 | + <strong>รายละเอียด:</strong> {ticketMessage} |
| 68 | + </Text> |
| 69 | + )} |
| 70 | + </Section> |
| 71 | + |
| 72 | + {resolution && ( |
| 73 | + <Section className="bg-[#f5f5f5] border-2 border-[#e0e0e0] rounded-xl px-6 py-6 mb-8"> |
| 74 | + <Text className="text-sm font-bold text-[#616161] m-0 mb-3">ข้อความจากทีมงาน:</Text> |
| 75 | + <Text className="text-sm leading-relaxed text-[#504039] m-0 mb-2">{resolution}</Text> |
| 76 | + </Section> |
| 77 | + )} |
| 78 | + |
| 79 | + <Text className="text-base leading-relaxed text-[#504039] mb-6"> |
| 80 | + หาก Ticket นี้ยังไม่ได้รับการแก้ไขตามที่คาดหวัง หรือมีคำถามเพิ่มเติม กรุณาติดต่อทีมงาน <strong>ComCamp 37</strong> ได้ทุกช่องทาง |
| 81 | + </Text> |
| 82 | + |
| 83 | + <Text className="text-base leading-relaxed text-[#504039] mb-6 text-center">ขอบคุณที่แจ้งปัญหามาให้ทีมงานทราบครับ 🙏</Text> |
| 84 | + |
| 85 | + <Section className="text-center"> |
| 86 | + <Text className="text-2xl m-0">🦊🐰🦁</Text> |
| 87 | + </Section> |
| 88 | + </Section> |
| 89 | + |
| 90 | + <Footer /> |
| 91 | + </Container> |
| 92 | + </Body> |
| 93 | + </Tailwind> |
| 94 | + </Html> |
| 95 | + ); |
| 96 | +} |
0 commit comments