From e5db59e26aea2f2d18899b866dec19b87e0cbbd0 Mon Sep 17 00:00:00 2001 From: Favour Idoko Date: Mon, 22 Jul 2024 23:47:37 +0100 Subject: [PATCH] resolved merge conflict --- .../InvoiceEmail/DetailTable.tsx | 0 .../InvoiceEmail/EmailFooter.tsx | 0 .../InvoiceEmail/OrderSummaryTable.tsx | 0 .../invoice-email-temp/InvoiceEmail.tsx | 6 +- app/routes/admin.email.edit-template.tsx | 109 +++++++++++++++++- package-lock.json | 18 ++- package.json | 1 + 7 files changed, 129 insertions(+), 5 deletions(-) rename app/components/{ => EmailSubRenewal}/InvoiceEmail/DetailTable.tsx (100%) rename app/components/{ => EmailSubRenewal}/InvoiceEmail/EmailFooter.tsx (100%) rename app/components/{ => EmailSubRenewal}/InvoiceEmail/OrderSummaryTable.tsx (100%) diff --git a/app/components/InvoiceEmail/DetailTable.tsx b/app/components/EmailSubRenewal/InvoiceEmail/DetailTable.tsx similarity index 100% rename from app/components/InvoiceEmail/DetailTable.tsx rename to app/components/EmailSubRenewal/InvoiceEmail/DetailTable.tsx diff --git a/app/components/InvoiceEmail/EmailFooter.tsx b/app/components/EmailSubRenewal/InvoiceEmail/EmailFooter.tsx similarity index 100% rename from app/components/InvoiceEmail/EmailFooter.tsx rename to app/components/EmailSubRenewal/InvoiceEmail/EmailFooter.tsx diff --git a/app/components/InvoiceEmail/OrderSummaryTable.tsx b/app/components/EmailSubRenewal/InvoiceEmail/OrderSummaryTable.tsx similarity index 100% rename from app/components/InvoiceEmail/OrderSummaryTable.tsx rename to app/components/EmailSubRenewal/InvoiceEmail/OrderSummaryTable.tsx diff --git a/app/email/templates/invoice-email-temp/InvoiceEmail.tsx b/app/email/templates/invoice-email-temp/InvoiceEmail.tsx index 199b8cbf..9d1ab2f6 100644 --- a/app/email/templates/invoice-email-temp/InvoiceEmail.tsx +++ b/app/email/templates/invoice-email-temp/InvoiceEmail.tsx @@ -12,9 +12,9 @@ import { Text, } from "@react-email/components"; -import DetailTable from "~/components/InvoiceEmail/DetailTable"; -import EmailFooter from "~/components/InvoiceEmail/EmailFooter"; -import OrderSummaryTable from "~/components/InvoiceEmail/OrderSummaryTable"; +import DetailTable from "~/components/EmailSubRenewal/InvoiceEmail/DetailTable"; +import EmailFooter from "~/components/EmailSubRenewal/InvoiceEmail/EmailFooter"; +import OrderSummaryTable from "~/components/EmailSubRenewal/InvoiceEmail/OrderSummaryTable"; import { invoiceDetails, orderSummary, paymentDetails } from "./data"; interface infoProperties { diff --git a/app/routes/admin.email.edit-template.tsx b/app/routes/admin.email.edit-template.tsx index 5a30e845..db19f005 100644 --- a/app/routes/admin.email.edit-template.tsx +++ b/app/routes/admin.email.edit-template.tsx @@ -1,5 +1,112 @@ +import { useNavigate } from "@remix-run/react"; +import { useState } from "react"; +import Button from "~/components/customButton/customButton"; +import accordian from "../../public/icons/accordion.png"; + const EditTemplate = () => { - return
EditTemplate
; + const [htmlContent, setHtmlContent] = useState(""); + const [allowEdit, setAllow] = useState(false); + const navigate = useNavigate(); + + const [content, setContent] = useState( + "Hi Chiviva it's been a long time...and we've missed you as much as you have missed us, This year, we are excited to introduce the first ever INBOUND hybrid experience including the return of our in-person event in Boston (safety first in compliance with all state and federal regulation and recomendations) and an upgraded online fully immersive experience. Passes are now on a sale, and you can learn about our pass types and on our registration page or read the summarry pass perks below. Finally the count down begins!", + ); + + const [BrandContent, setBrandHtml] = useState( + "-Forever Yours, The INBOUND Team", + ); + const [isEditing, setIsEditing] = useState(false); + + const handleChange = (e: any) => { + setContent(e.target.value); + setBrandHtml(e.target.value); + }; + + + const toggleEdit = () => { + setIsEditing(!isEditing); + }; + + return ( +
+
+
    +
  • + Email + + arrow right icon + +
  • +
  • navigate("/admin/email")} + > + New Template + + arrow right icon + +
  • +
  • navigate("/admin/email/generate-html")} + > + Generate with HTML +
  • +
+
+

+ Preview Your Generated Template +

+
+

+ Review the layout and look of your email template generated + generated from the pasted HTML code to ensure you have pasted the + right template. +

+
+ +
+
+
+
+
+
    +
  • + {isEditing ? ( +
    + + +
    + ) : ( +
    +

    {content}

    +
    +
    +

    {BrandContent}

    +
    + )} +
    +
    +
  • + +
+
+
+
+
+ ); }; export default EditTemplate; diff --git a/package-lock.json b/package-lock.json index 59abc5f5..4ddd2635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "clsx": "^2.1.1", "isbot": "^4.4.0", "lucide-react": "^0.408.0", + "pnpm": "^9.6.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-email": "^2.1.5", @@ -10394,6 +10395,21 @@ "node": ">=4" } }, + "node_modules/pnpm": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/pnpm/-/pnpm-9.6.0.tgz", + "integrity": "sha512-ONxvuo26NbOTQLlwARLC/h4S8QsXE0cVpKqYzPe7A152/Zgc8Ls4TfqY+NavVIHCvvL0Jmokv6IMNOtxR84LXg==", + "bin": { + "pnpm": "bin/pnpm.cjs", + "pnpx": "bin/pnpx.cjs" + }, + "engines": { + "node": ">=18.12" + }, + "funding": { + "url": "https://opencollective.com/pnpm" + } + }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "license": "MIT", @@ -14487,4 +14503,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index f406b075..310867a3 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "clsx": "^2.1.1", "isbot": "^4.4.0", "lucide-react": "^0.408.0", + "pnpm": "^9.6.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-email": "^2.1.5",