Compare commits
2 Commits
8e00f200a7
...
d5d8cff1ca
| Author | SHA1 | Date |
|---|---|---|
|
|
d5d8cff1ca | |
|
|
63613f7828 |
|
|
@ -21,9 +21,6 @@ export default function CallUs(props: any) {
|
||||||
|
|
||||||
{/* <div className="w-full mt-6"> */}
|
{/* <div className="w-full mt-6"> */}
|
||||||
{/* <Map /> */}
|
{/* <Map /> */}
|
||||||
|
|
||||||
{/* Display fetched content */}
|
|
||||||
{/* <div dangerouslySetInnerHTML={{ __html: fetchedContent }} /> */}
|
|
||||||
{/* </div> */}
|
{/* </div> */}
|
||||||
|
|
||||||
<div className="container flex items-center h-[90vh]">
|
<div className="container flex items-center h-[90vh]">
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export default function FollowResult() {
|
||||||
const printableContent = "This is the content to be printed.";
|
const printableContent = "This is the content to be printed.";
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] pt-6 mx-auto mb-10">
|
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] pt-6 mx-auto">
|
||||||
{complaintPrintMutation?.data ? (
|
{complaintPrintMutation?.data ? (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
|
import ReactDOM from "react-dom";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import Resultimg from "../public/img/result.png";
|
import Resultimg from "../public/img/result.png";
|
||||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
@ -12,7 +13,10 @@ import { getSingleWebContents } from "@/utils/commonApi";
|
||||||
export default function Result() {
|
export default function Result() {
|
||||||
const [trackingNumber, setTrackingNumber] = useState<any>();
|
const [trackingNumber, setTrackingNumber] = useState<any>();
|
||||||
const [password, setPassword] = useState<any>();
|
const [password, setPassword] = useState<any>();
|
||||||
const componentRef = useRef<HTMLDivElement>(null);
|
const componentRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
// const componentRef2 = useRef<HTMLDivElement | null>(null);
|
||||||
|
// const [componentData, setComponentData] = useState<React.ReactNode | null>(null);
|
||||||
|
|
||||||
const [title, setTitle] = useState("AfterRegistration");
|
const [title, setTitle] = useState("AfterRegistration");
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -23,6 +27,12 @@ export default function Result() {
|
||||||
setPassword(pw);
|
setPassword(pw);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// useEffect(() => {
|
||||||
|
// const content1 = componentRef.current?.innerText || "";
|
||||||
|
// const content2 = componentRef2.current?.innerText || "";
|
||||||
|
// setComponentData(<div>{content1 + content2}</div>);
|
||||||
|
// }, []);
|
||||||
|
|
||||||
const handlePrint = useReactToPrint({
|
const handlePrint = useReactToPrint({
|
||||||
content: () => componentRef.current,
|
content: () => componentRef.current,
|
||||||
});
|
});
|
||||||
|
|
@ -40,52 +50,25 @@ export default function Result() {
|
||||||
refetch();
|
refetch();
|
||||||
}, [title, refetch]);
|
}, [title, refetch]);
|
||||||
|
|
||||||
if (isLoading) {
|
|
||||||
return <p>Loading...</p>;
|
|
||||||
}
|
|
||||||
if (isError) {
|
|
||||||
return <p>Error fetching content.</p>;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fetchedContent = data?.content || "";
|
const fetchedContent = data?.content || "";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`w-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 bg-request-result
|
className={`w-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 sm:bg-[url('/img/Result1.png')]
|
||||||
h-[85vh] bg-50% bg-no-repeat bg-center repeat
|
h-[85vh] bg-50% bg-no-repeat bg-center flex flex-col gap-4`}
|
||||||
flex flex-col gap-4`}
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className=" flex flex-col justify-center font-[yekan] pt-12 px-3
|
className=" flex flex-col justify-center font-[yekan] sm:pt-12 px-3 text-justify
|
||||||
text-[#7C838A] dark:text-white text-sm font-medium leading-6 tracking-wide 3xl:text-base 3xl:font-bold"
|
text-[#7C838A] dark:text-white text-sm font-medium leading-6 tracking-wide 3xl:text-base 3xl:font-bold"
|
||||||
ref={componentRef}
|
ref={componentRef}
|
||||||
dir="rtl"
|
dir="rtl"
|
||||||
>
|
>
|
||||||
{/* <p
|
|
||||||
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
|
||||||
3xl:text-base 3xl:font-bold "
|
|
||||||
>
|
|
||||||
با تشکر از شما
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p
|
|
||||||
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
|
||||||
3xl:text-base 3xl:font-bold "
|
|
||||||
>
|
|
||||||
درخواست شما با کد پیگیری
|
|
||||||
<span className="text-slate-500 mx-2">{`${trackingNumber}`}</span>و
|
|
||||||
رمز عبور
|
|
||||||
<span className="text-slate-500 mx-2">{`${password}`}</span>
|
|
||||||
در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه
|
|
||||||
پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید.
|
|
||||||
</p> */}
|
|
||||||
|
|
||||||
{/* Display fetched content */}
|
{/* Display fetched content */}
|
||||||
<div dangerouslySetInnerHTML={{ __html: fetchedContent }} />
|
<div dangerouslySetInnerHTML={{ __html: fetchedContent }} />
|
||||||
|
|
||||||
<p
|
<p
|
||||||
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white mt-4
|
||||||
3xl:text-base 3xl:font-bold mt-4"
|
3xl:text-base 3xl:font-bold "
|
||||||
>
|
>
|
||||||
کد پیگیری :
|
کد پیگیری :
|
||||||
<span className="text-slate-500 mx-2">{`${trackingNumber}`}</span>
|
<span className="text-slate-500 mx-2">{`${trackingNumber}`}</span>
|
||||||
|
|
@ -97,18 +80,37 @@ export default function Result() {
|
||||||
>
|
>
|
||||||
رمز عبور :<span className="text-slate-500 mx-2">{`${password}`}</span>
|
رمز عبور :<span className="text-slate-500 mx-2">{`${password}`}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{/* <Image
|
{/* <Image
|
||||||
alt="icon"
|
alt="icon"
|
||||||
src={Resultimg}
|
src={Resultimg}
|
||||||
className="self-center w-3/5 mt-5 sm:w-[23em] sm:h-[20em] 3xl:w-3/5 3xl:h-[30em] object-contain"
|
className="self-center w-3/5 mt-5 sm:w-[23em] sm:h-[20em] 3xl:w-3/5 3xl:h-[30em] object-contain"
|
||||||
/> */}
|
/> */}
|
||||||
</div>
|
</div>
|
||||||
<div className=" w-full flex justify-end mt-2">
|
<div className=" w-full flex flex-col justify-between items-end mt-2">
|
||||||
|
{/* <div className="pr-4">
|
||||||
|
<p
|
||||||
|
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
|
3xl:text-base 3xl:font-bold "
|
||||||
|
>
|
||||||
|
کد پیگیری :
|
||||||
|
<span className="text-slate-500 mx-2">{`${trackingNumber}`}</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p
|
||||||
|
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
|
3xl:text-base 3xl:font-bold "
|
||||||
|
>
|
||||||
|
رمز عبور :
|
||||||
|
<span className="text-slate-500 mx-2">{`${password}`}</span>
|
||||||
|
</p>
|
||||||
|
</div> */}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
type="submit"
|
type="submit"
|
||||||
onClick={handlePrint}
|
onClick={handlePrint}
|
||||||
className="w-fit bg-blue text-white p-2 rounded-xl text-center"
|
className="w-full sm:w-fit bg-blue text-white p-2 rounded-xl text-center "
|
||||||
>
|
>
|
||||||
پرینت درخواست
|
پرینت درخواست
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
|
|
@ -18,7 +18,7 @@ module.exports = {
|
||||||
extend: {
|
extend: {
|
||||||
backgroundImage: {
|
backgroundImage: {
|
||||||
mainBg: "url('/img/bg.png')",
|
mainBg: "url('/img/bg.png')",
|
||||||
'request-result': "url('/img/result.png')",
|
// 'request-result': "url('/img/result50%.png')",
|
||||||
},
|
},
|
||||||
backgroundSize: {
|
backgroundSize: {
|
||||||
'auto': 'auto',
|
'auto': 'auto',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue