feat: implement custom email template of request email and completion email

This commit is contained in:
RaktimaNXG
2024-04-08 17:13:04 +05:30
parent ab1dbecab2
commit 5f8affb1bb
14 changed files with 788 additions and 116 deletions
+21 -7
View File
@@ -3,8 +3,8 @@ import { useNavigate, useParams } from "react-router-dom";
import "../styles/loginPage.css";
import loader from "../assets/images/loader2.gif";
import axios from "axios";
import { themeColor } from "../constant/const";
import { contractUsers } from "../constant/Utils";
import { isEnableSubscription, themeColor } from "../constant/const";
import { contractUsers, getAppLogo } from "../constant/Utils";
function GuestLogin() {
const { id, userMail, contactBookId, serverUrl } = useParams();
@@ -14,14 +14,27 @@ function GuestLogin() {
const [EnterOTP, setEnterOtp] = useState(false);
const [loading, setLoading] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [appLogo, setAppLogo] = useState(
"https://qikinnovation.ams3.digitaloceanspaces.com/logo.png"
);
useEffect(() => {
handleServerUrl();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
//function generate serverUrl and parseAppId from url and save it in local storage
const handleServerUrl = () => {
const handleServerUrl = async () => {
if (isEnableSubscription) {
const applogo = await getAppLogo();
if (applogo) {
setAppLogo(applogo);
} else {
setAppLogo(localStorage.getItem("appLogo") || "");
}
}
//split url in array from '&'
localStorage.clear();
const checkSplit = serverUrl.split("&");
@@ -164,11 +177,12 @@ function GuestLogin() {
}}
>
<div className="main_head">
<div className="main-logo">
<div className="w-[250px] h-[66px] inline-block overflow-hidden">
<img
alt="sign img"
src="https://qikinnovation.ams3.digitaloceanspaces.com/logo.png"
width="100%"
src={appLogo}
loading={true}
className="object-contain h-full"
alt="logo"
/>
</div>
</div>