Compare commits

..

No commits in common. "87fb5e90f77483aaab54325cc2ecc8832b468e85" and "df3d2c60fdd9617b6c5e2d929ae6e67c7491f2cd" have entirely different histories.

5 changed files with 9 additions and 35 deletions

View File

@ -29,7 +29,7 @@ export default function Footer() {
</h2> </h2>
<div> <div>
<p className=" text-white text-xs md:text-sm font-normal md:leading-7 text-justify"> <p className=" text-white text-xs md:text-sm font-normal md:leading-7">
<div <div
className=" !text-white footer" className=" !text-white footer"
dangerouslySetInnerHTML={{ __html: fetchedContent }} dangerouslySetInnerHTML={{ __html: fetchedContent }}

View File

@ -30,7 +30,7 @@ export default function Navbar() {
setAuth(false); setAuth(false);
} }
}, [isAuth, token]); }, [isAuth, token]);
console.log(pathname);
return ( return (
<div className={` left-0 right-0 top-0 z-20 fixed`}> <div className={` left-0 right-0 top-0 z-20 fixed`}>
{/* <TopNav /> */} {/* <TopNav /> */}

View File

@ -34,6 +34,7 @@ export default function Result() {
const handlePrint = useReactToPrint({ const handlePrint = useReactToPrint({
// content: () => contentRef.current, // content: () => contentRef.current,
content: () => { content: () => {
console.log(contentRef.current); // Log the content to the console
return contentRef.current; return contentRef.current;
}, },
}); });

View File

@ -132,13 +132,9 @@ export default function RequestStep2() {
mutationKey: ["authorizedComplaintSubmit"], mutationKey: ["authorizedComplaintSubmit"],
mutationFn: postAuthorizedComplaintSubmit, mutationFn: postAuthorizedComplaintSubmit,
onSuccess: (res) => { onSuccess: (res) => {
const currentDate = new Date();
const formattedDate = currentDate.toISOString()
localStorage.setItem("trackingNumber", res.trackingNumber); localStorage.setItem("trackingNumber", res.trackingNumber);
localStorage.setItem("password", res.password); localStorage.setItem("password", res.password);
// localStorage.setItem("registeredAt", res.registeredAt); localStorage.setItem("registeredAt", res.registeredAt);
localStorage.setItem("registeredAt", formattedDate);
localStorage.removeItem("authorized"); localStorage.removeItem("authorized");
localStorage.removeItem("unknown"); localStorage.removeItem("unknown");
router.push("/RequestResult"); router.push("/RequestResult");

View File

@ -1,7 +1,5 @@
"use client"; // components/PrintPage.tsx
import React, { useEffect } from "react"; import React from "react";
// import { convertDate } from "@/lib/utils";
import dayjs from "dayjs";
interface PrintPageProps { interface PrintPageProps {
contentRef: React.RefObject<any>; contentRef: React.RefObject<any>;
@ -10,17 +8,6 @@ interface PrintPageProps {
password: string; password: string;
} }
// Convert Date
function convertDate(date: string) {
const convertedDate = dayjs(date)
.calendar("jalali")
.locale("fa")
.format("YYYY/M/DD");
return convertedDate;
}
const registeredAt = localStorage.getItem("registeredAt");
const convertedDate = registeredAt ? convertDate(registeredAt) : "Invalid Date";
const PrintPage: React.FC<PrintPageProps> = ({ const PrintPage: React.FC<PrintPageProps> = ({
contentRef, contentRef,
fetchedContent, fetchedContent,
@ -33,19 +20,9 @@ const PrintPage: React.FC<PrintPageProps> = ({
className="w-screen h-screen border-2 border-spacing-6 p-36 bg-slate-200 bg-[url('/img/bg-print.jpg')] bg-no-repeat bg-bottom bg-cover font-[yekan]" className="w-screen h-screen border-2 border-spacing-6 p-36 bg-slate-200 bg-[url('/img/bg-print.jpg')] bg-no-repeat bg-bottom bg-cover font-[yekan]"
dir="rtl" dir="rtl"
> >
<div className="flex flex-col absolute top-7 left-28 text-xs gap-1"> <div dangerouslySetInnerHTML={{ __html: fetchedContent }} className=" mt-16 text-justify" />
<p>سامانه نظارت شهرداری یزد</p>
<p>
تاریخ: <span>{convertedDate}</span>
</p>
</div>
<div <p >
dangerouslySetInnerHTML={{ __html: fetchedContent }}
className=" mt-16 text-justify"
/>
<p>
کد پیگیری : <span>{trackingNumber}</span> کد پیگیری : <span>{trackingNumber}</span>
</p> </p>