Landing , followresult ,RequqestResult Modified
parent
4de35861ff
commit
7f0600fb54
|
|
@ -136,8 +136,8 @@ export default function Landing() {
|
||||||
quality={100}
|
quality={100}
|
||||||
key={index}
|
key={index}
|
||||||
className={cn(
|
className={cn(
|
||||||
" w-[80%] h-[80%] absolute left-2 top-6 group-hover:hidden max-md:h-[60%] max-md:w-[60%] max-md:left-auto",
|
" w-[80%] h-[80%] absolute left-8 top-6 group-hover:hidden max-md:h-[60%] max-md:w-[60%] max-md:left-auto",
|
||||||
item.id == 1 && "left-8"
|
item.id == 3 && "left-2"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export default function RootLayout({
|
||||||
<Navbar />
|
<Navbar />
|
||||||
{/* <NavbarSm /> */}
|
{/* <NavbarSm /> */}
|
||||||
|
|
||||||
<div className="flex justify-center mt-20 sm:mt-10">{children}</div>
|
<div className="flex justify-center mt-20 sm:mt-14">{children}</div>
|
||||||
|
|
||||||
<Toaster />
|
<Toaster />
|
||||||
<SonnerToaster />
|
<SonnerToaster />
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,55 @@
|
||||||
"use client";
|
"use client";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import React from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
|
|
||||||
import { callUsItems } from "@/constants";
|
import { callUsItems } from "@/constants";
|
||||||
|
import { getSingleWebContents } from "@/utils/commonApi";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
const Map = dynamic(() => import("./Map"), {
|
const Map = dynamic(() => import("./Map"), {
|
||||||
ssr: false,
|
ssr: false,
|
||||||
});
|
});
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
export default function CallUs(props: any) {
|
export default function CallUs(props: any) {
|
||||||
const { position, zoom } = props;
|
const { position, zoom } = props;
|
||||||
|
// const [title, setTitle] = useState("CullUs");
|
||||||
|
|
||||||
|
|
||||||
|
// const { data, isLoading, isError, refetch } = useQuery({
|
||||||
|
// queryKey: ["WebContents", title],
|
||||||
|
// queryFn: () => getSingleWebContents(title),
|
||||||
|
// refetchOnWindowFocus: false,
|
||||||
|
// });
|
||||||
|
// console.log(data);
|
||||||
|
|
||||||
|
|
||||||
|
// useEffect(() => {
|
||||||
|
// refetch();
|
||||||
|
// }, [title, refetch]);
|
||||||
|
|
||||||
|
// if (isLoading) {
|
||||||
|
// return <p>Loading...</p>;
|
||||||
|
// }
|
||||||
|
// if (isError) {
|
||||||
|
// return <p>Error fetching content.</p>;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const fetchedContent = data?.content || ""; // Assuming your API response has a 'content' property
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-white dark:bg-gray-900 w-screen">
|
<div className="bg-white dark:bg-gray-900 w-screen">
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="w-full h-[42vh]">
|
|
||||||
{/* <Image
|
|
||||||
src={mapImg}
|
|
||||||
className="object-cover w-full h-full "
|
|
||||||
alt=" Logo1"
|
|
||||||
quality={100}
|
|
||||||
width={100}
|
|
||||||
height={100}
|
|
||||||
/> */}
|
|
||||||
|
|
||||||
<Map />
|
{/* <div className="w-full mt-6"> */}
|
||||||
</div>
|
{/* <Map /> */}
|
||||||
|
|
||||||
<div className="container">
|
{/* Display fetched content */}
|
||||||
|
{/* <div dangerouslySetInnerHTML={{ __html: fetchedContent }} /> */}
|
||||||
|
{/* </div> */}
|
||||||
|
|
||||||
|
<div className="container flex items-center h-[90vh]">
|
||||||
<div className="grid gap-8 md:gap-0 grid-cols-1 md:grid-cols-3 md:h-[40vh] h-full w-full lg:px-32 xl:px-52 md:py-8 py-12">
|
<div className="grid gap-8 md:gap-0 grid-cols-1 md:grid-cols-3 md:h-[40vh] h-full w-full lg:px-32 xl:px-52 md:py-8 py-12">
|
||||||
{callUsItems.map((item) => {
|
{callUsItems.map((item) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,12 @@ import Image from "next/image";
|
||||||
import { ComplainDetailsItems } from "@/constants";
|
import { ComplainDetailsItems } from "@/constants";
|
||||||
import { useMutation } from "@tanstack/react-query";
|
import { useMutation } from "@tanstack/react-query";
|
||||||
import useData from "@/store/useData";
|
import useData from "@/store/useData";
|
||||||
import { convertDate } from "@/lib/utils";
|
import { convertDate , convertFullTime } from "@/lib/utils";
|
||||||
import { Badge } from "./ui/badge";
|
import { Badge } from "./ui/badge";
|
||||||
import InspectorOperations from "./InspectorOperations";
|
import InspectorOperations from "./InspectorOperations";
|
||||||
import { postComplaintTracking } from "@/utils/citizenApi";
|
import { postComplaintTracking } from "@/utils/citizenApi";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlertDialog,
|
AlertDialog,
|
||||||
AlertDialogAction,
|
AlertDialogAction,
|
||||||
|
|
@ -196,54 +197,12 @@ export default function ComplainsDetails({
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="flex max-lg:flex-col gap-3 items-start">
|
{/* Editt */}
|
||||||
<div className="flex flex-col w-full lg:w-1/3 lg:order-2 gap-3 lg:sticky top-40">
|
<div className="w-full flex max-lg:flex-col items-start mt-2 gap-2">
|
||||||
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
|
{/* 1 */}
|
||||||
<p className="text-[#464646] text-base font-bold">
|
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28">
|
||||||
گزارش شکایت
|
{/* ***** */}
|
||||||
</p>
|
<div className="max-lg:hidden bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col">
|
||||||
<div className="mt-2">
|
|
||||||
<p className="text-[#2e2a2a] text-sm font-medium">
|
|
||||||
موضوع شکایت:{" "}
|
|
||||||
<span className="text-[#7C838A] text-sm font-medium">
|
|
||||||
{data.title}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p className="text-[#464646] text-sm font-medium">
|
|
||||||
دستگاه مربوطه:{" "}
|
|
||||||
<span className="text-[#7C838A] text-sm font-medium">
|
|
||||||
{data?.complaintOrganization
|
|
||||||
? data?.complaintOrganization.title
|
|
||||||
: "-"}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p className="text-[#464646] text-sm font-medium">
|
|
||||||
پرسنل مربوطه:{" "}
|
|
||||||
<span className="text-[#7C838A] text-sm font-medium">
|
|
||||||
{data.complaining ? data.complaining : "-"}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p className="text-[#464646] text-sm font-medium">
|
|
||||||
زمان ثبت:{" "}
|
|
||||||
<span className="text-[#7C838A] text-sm font-medium">
|
|
||||||
{convertDate(data.registeredAt)}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
{/* <p className="text-[#464646] text-sm font-medium">
|
|
||||||
{" "}
|
|
||||||
موضوع شکایت:{" "}
|
|
||||||
<span className="text-[#7C838A] text-sm font-medium">
|
|
||||||
متن تستی
|
|
||||||
</span>
|
|
||||||
</p> */}
|
|
||||||
</div>
|
|
||||||
{/* <p className="text-[#464646] text-sm font-medium text-justify">
|
|
||||||
درخواست شما با کد رهگیری {data.trackingNumber} و رمز عبور 12422 در
|
|
||||||
دست بررسی و اقدام می باشد. در صورت تمایل می توانید با شماره تلفن
|
|
||||||
0353286545 جهت پشتیبانی تماس حاصل کنید.{" "}
|
|
||||||
</p> */}
|
|
||||||
</div>
|
|
||||||
<div className=" max-lg:hidden order-2 bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col">
|
|
||||||
<p className="text-[#464646] text-base font-bold mb-1">
|
<p className="text-[#464646] text-base font-bold mb-1">
|
||||||
انجام عملیات
|
انجام عملیات
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -254,74 +213,186 @@ export default function ComplainsDetails({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full lg:w-2/3 self-stretch bg-[#E9E9E9] p-4 px-10 rounded-lg">
|
|
||||||
<p className="text-[#464646] text-base font-bold">روند شکایت</p>
|
{/* 2 */}
|
||||||
<div className=" flex flex-col gap-y-4 mt-4">
|
<div className="w-full lg:w-2/3 self-stretch rounded-lg flex flex-col gap-2 ">
|
||||||
{data.contents?.map((item: any) => {
|
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col md:flex-row gap-2 items-center justify-center lg:sticky top-28">
|
||||||
return (
|
{data.user == null ? (
|
||||||
<div
|
<>
|
||||||
key={item.id}
|
<div className="mt-2 flex flex-col gap-y-1 border rounded-md border-gray-400 w-full p-5 relative">
|
||||||
className=" bg-white p-4 rounded-lg shadow-md"
|
<p className=" absolute -top-3 right-2 bg-[#E9E9E9] px-2 text-sm text-gray-500">
|
||||||
>
|
اطلاعات کلی
|
||||||
<div className=" flex gap-4 items-center">
|
</p>
|
||||||
<p className="">
|
<p className="text-[#2e2a2a] text-sm font-medium">
|
||||||
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
موضوع شکایت:{" "}
|
||||||
</p>
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
<p className="">
|
{data?.title}
|
||||||
تاریخ :
|
|
||||||
<span className="text-[#7C838A]">
|
|
||||||
{convertDate(item.dateTime)}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className=" text-[#464646] mt-2">
|
|
||||||
<span className="text-[#7C838A]">
|
|
||||||
{item.text ? item.text : "-"}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</p>
|
||||||
{/* {item.media.length !== 0 && (
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
دستگاه مربوطه:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data?.complaintOrganization
|
||||||
|
? data?.complaintOrganization.title
|
||||||
|
: "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
فرد مربوطه:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data.complaining ? data.complaining : "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
زمان ثبت:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{convertFullTime(data.registeredAt)}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<div className="mt-2 flex flex-col gap-y-1 border rounded-md border-gray-400 md:w-1/2 p-5 relative">
|
||||||
|
<p className=" absolute -top-3 right-2 bg-[#E9E9E9] px-2 text-sm text-gray-500">
|
||||||
|
اطلاعات کلی
|
||||||
|
</p>
|
||||||
|
<p className="text-[#2e2a2a] text-sm font-medium">
|
||||||
|
موضوع شکایت:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data?.title}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
دستگاه مربوطه:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data?.complaintOrganization
|
||||||
|
? data?.complaintOrganization.title
|
||||||
|
: "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
فرد مربوطه:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data.complaining ? data.complaining : "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
زمان ثبت:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{convertFullTime(data.registeredAt)}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="mt-2 flex flex-col gap-y-1 border rounded-md border-gray-400 md:w-1/2 p-5 relative">
|
||||||
|
<p className=" absolute -top-3 right-2 bg-[#E9E9E9] px-2 text-sm text-gray-500">
|
||||||
|
اطلاعات شاکی
|
||||||
|
</p>
|
||||||
|
<p className="text-[#2e2a2a] text-sm font-medium">
|
||||||
|
نام:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data.user?.firstName ? data.user?.firstName : "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
نام خانوادگی:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data.user?.lastName ? data.user?.lastName : "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
کدملی:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data.user?.nationalId ? data.user?.nationalId : "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
|
شماره موبایل:{" "}
|
||||||
|
<span className="text-[#7C838A] text-sm font-medium">
|
||||||
|
{data.user?.phoneNumber
|
||||||
|
? data.user?.phoneNumber
|
||||||
|
: "-"}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
|
||||||
|
<p className="text-[#464646] text-base font-bold">روند شکایت</p>
|
||||||
|
<div className=" flex flex-col gap-y-4 mt-4">
|
||||||
|
{data.contents?.map((item: any) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={item.id}
|
||||||
|
className=" bg-white p-4 rounded-lg shadow-md"
|
||||||
|
>
|
||||||
|
<div className=" flex gap-4 items-center">
|
||||||
|
<p className="">
|
||||||
|
<Badge>
|
||||||
|
{item.sender == 0 ? "شهروند" : "بازرس"}
|
||||||
|
</Badge>
|
||||||
|
</p>
|
||||||
|
<p className="">
|
||||||
|
تاریخ :
|
||||||
|
<span className="text-[#7C838A]">
|
||||||
|
{convertDate(item.dateTime)}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className=" text-[#464646] mt-2">
|
||||||
|
<span className="text-[#7C838A]">
|
||||||
|
{item.text ? item.text : "-"}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{/* {item.media.length !== 0 && (
|
||||||
<Separator className=" mt-2 mb-1" />
|
<Separator className=" mt-2 mb-1" />
|
||||||
)} */}
|
)} */}
|
||||||
<div className=" text-[#464646] mt-2">
|
<div className=" text-[#464646] mt-2">
|
||||||
<div className=" flex flex-wrap max-md:flex-col w-full items-center gap-2 text-xs mt-2">
|
<div className=" flex flex-wrap max-md:flex-col w-full items-center gap-2 text-xs mt-2">
|
||||||
{item?.media.map((item: any, index: number) => {
|
{item?.media.map((item: any, index: number) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
|
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
|
||||||
>
|
|
||||||
<a
|
|
||||||
onClick={() =>
|
|
||||||
openFileInNewTab(item.data, item.mimeType)
|
|
||||||
}
|
|
||||||
className=" cursor-pointer flex gap-2 truncate items-center"
|
|
||||||
>
|
>
|
||||||
<File className=" w-6 h-6" />
|
<a
|
||||||
<p className=" max-w-[5rem] truncate">
|
onClick={() =>
|
||||||
{item.title}
|
openFileInNewTab(item.data, item.mimeType)
|
||||||
</p>
|
}
|
||||||
</a>
|
className=" cursor-pointer flex gap-2 truncate items-center"
|
||||||
<ArrowDownToLine
|
>
|
||||||
className=" cursor-pointer"
|
<File className=" w-6 h-6" />
|
||||||
onClick={() =>
|
<p className=" max-w-[5rem] truncate">
|
||||||
downloadFile(
|
{item.title}
|
||||||
item.data,
|
</p>
|
||||||
item.title,
|
</a>
|
||||||
item.mimeType
|
<ArrowDownToLine
|
||||||
)
|
className=" cursor-pointer"
|
||||||
}
|
onClick={() =>
|
||||||
/>
|
downloadFile(
|
||||||
</div>
|
item.data,
|
||||||
);
|
item.title,
|
||||||
})}
|
item.mimeType
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
})}
|
||||||
})}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className=" lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
|
|
||||||
|
{/* 3 */}
|
||||||
|
{/* ****** */}
|
||||||
|
<div className="lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col mt-2">
|
||||||
<p className="text-[#464646] text-base font-bold mb-1">
|
<p className="text-[#464646] text-base font-bold mb-1">
|
||||||
انجام عملیات
|
انجام عملیات
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -331,45 +402,6 @@ export default function ComplainsDetails({
|
||||||
complaintData={data}
|
complaintData={data}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* Left */}
|
|
||||||
{/* <div className="w-full md:w-1/3 bg-white shadow-lg rounded-md pt-3 px-4 flex flex-row md:flex-col max-md:flex-wrap">
|
|
||||||
<p className="text-[#464646] text-base font-bold mb-3">
|
|
||||||
وضعیت درخواست
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{ComplainDetailsItems.map((item, index, array) => {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="w-full justify-start items-start gap-4 inline-flex "
|
|
||||||
key={item.id}
|
|
||||||
>
|
|
||||||
<div className="grow shrink basis-0 pb-2 flex-col justify-start items-start gap-1 inline-flex">
|
|
||||||
<div className="self-stretch text-right text-lime-800 text-lg font-semibold leading-[30px]">
|
|
||||||
{item.title}
|
|
||||||
</div>
|
|
||||||
<div className="self-stretch text-right text-zinc-700 text-base font-normal uppercase">
|
|
||||||
{item.desc}
|
|
||||||
</div>
|
|
||||||
<div className="self-stretch text-right text-zinc-700 text-base font-normal">
|
|
||||||
{item.date} <br /> {item.time}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="w-6 self-stretch flex-col justify-start items-center gap-1 inline-flex">
|
|
||||||
<div className="py-0.5 justify-start items-start gap-2.5 inline-flex">
|
|
||||||
<Image
|
|
||||||
src={greenIcon}
|
|
||||||
alt="greenIcon"
|
|
||||||
width={100}
|
|
||||||
height={100}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="w-1 grow shrink basis-0 bg-lime-800 rounded-[1px]"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div> */}
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,10 @@ export default function FollowResult() {
|
||||||
console.log(complaintPrintMutation?.data);
|
console.log(complaintPrintMutation?.data);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] max-sm:mt-16 pt-4 mx-auto mb-10">
|
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] max-sm:mt-16 pt-12 mx-auto mb-10">
|
||||||
{complaintPrintMutation?.data ? (
|
{complaintPrintMutation?.data ? (
|
||||||
<>
|
<>
|
||||||
<div className="flex justify-center sm:justify-end gap-2 mb-2">
|
{/* <div className="flex justify-center sm:justify-end gap-2 mb-2">
|
||||||
<AlertDialog>
|
<AlertDialog>
|
||||||
<AlertDialogTrigger asChild>
|
<AlertDialogTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -180,7 +180,7 @@ export default function FollowResult() {
|
||||||
</AlertDialogFooter>
|
</AlertDialogFooter>
|
||||||
</AlertDialogContent>
|
</AlertDialogContent>
|
||||||
</AlertDialog>
|
</AlertDialog>
|
||||||
</div>
|
</div> */}
|
||||||
<ComplainsDetails
|
<ComplainsDetails
|
||||||
role="Citizen"
|
role="Citizen"
|
||||||
state="FollowResult"
|
state="FollowResult"
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ export default function Footer() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className=" max-md:mt-6 flex flex-row justify-center md:justify-end items-start w-full md:w-1/4 ">
|
{/* <div className=" max-md:mt-6 flex flex-row justify-center md:justify-end items-start w-full md:w-1/4 ">
|
||||||
<div className="w-23 h-23 sm:w-36 sm:h-36 ">
|
<div className="w-23 h-23 sm:w-36 sm:h-36 ">
|
||||||
<Image
|
<Image
|
||||||
src={img1}
|
src={img1}
|
||||||
|
|
@ -69,7 +69,8 @@ export default function Footer() {
|
||||||
height={100}
|
height={100}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr className=" border-gray-200 sm:mx-auto dark:border-gray-700 mt-5 sm:mt-10" />
|
<hr className=" border-gray-200 sm:mx-auto dark:border-gray-700 mt-5 sm:mt-10" />
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export default function Navbar() {
|
||||||
} else {
|
} else {
|
||||||
setAuth(false);
|
setAuth(false);
|
||||||
}
|
}
|
||||||
}, [isAuth ,token]);
|
}, [isAuth, token]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={` left-0 right-0 top-0 z-20 fixed`}>
|
<div className={` left-0 right-0 top-0 z-20 fixed`}>
|
||||||
|
|
@ -89,16 +89,21 @@ export default function Navbar() {
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
</div>
|
</div>
|
||||||
<div className=" flex items-center max-md:mr-1 ">
|
<div className=" flex items-center max-md:mr-1 ">
|
||||||
<Image
|
<Link href="/">
|
||||||
src="/img/logo.png"
|
<Image
|
||||||
quality={100}
|
src="/img/logo.png"
|
||||||
alt="log"
|
quality={100}
|
||||||
width={32}
|
alt="log"
|
||||||
height={32}
|
width={32}
|
||||||
/>
|
height={32}
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<div className=" text-brown flex flex-col text-center w-40">
|
<div className=" text-brown flex flex-col text-center w-40">
|
||||||
<h1 className="text-[23px] w-full">عیــون</h1>
|
<Link href="/">
|
||||||
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1>
|
<h1 className="text-[23px] w-full">عیــون</h1>
|
||||||
|
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className=" flex gap-5 items-center mr-8 max-md:hidden">
|
<div className=" flex gap-5 items-center mr-8 max-md:hidden">
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,14 @@ import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Button } from "./ui/button";
|
import { Button } from "./ui/button";
|
||||||
import { useReactToPrint } from "react-to-print";
|
import { useReactToPrint } from "react-to-print";
|
||||||
|
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);
|
||||||
|
const [title, setTitle] = useState("AfterRegistration");
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const tn = localStorage.getItem("trackingNumber");
|
const tn = localStorage.getItem("trackingNumber");
|
||||||
|
|
@ -23,17 +25,43 @@ export default function Result() {
|
||||||
|
|
||||||
const handlePrint = useReactToPrint({
|
const handlePrint = useReactToPrint({
|
||||||
content: () => componentRef.current,
|
content: () => componentRef.current,
|
||||||
// onBeforePrint() {
|
|
||||||
// setPrintStyle(!printStyle);
|
|
||||||
// },
|
|
||||||
// onAfterPrint() {
|
|
||||||
// setPrintStyle(!printStyle)
|
|
||||||
// },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// const [fetchedContent, setFetchedContent] = useState("");
|
||||||
|
|
||||||
|
const { data, isLoading, isError, refetch } = useQuery({
|
||||||
|
queryKey: ["WebContents", title],
|
||||||
|
queryFn: () => getSingleWebContents(title),
|
||||||
|
refetchOnWindowFocus: false,
|
||||||
|
});
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
refetch();
|
||||||
|
}, [title, refetch]);
|
||||||
|
|
||||||
|
if (isLoading) {
|
||||||
|
return <p>Loading...</p>;
|
||||||
|
}
|
||||||
|
if (isError) {
|
||||||
|
return <p>Error fetching content.</p>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const fetchedContent = data?.content || "";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 pt-12 ">
|
<div
|
||||||
<div className="h-full flex flex-col justify-center">
|
className={`w-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 bg-request-result
|
||||||
<p
|
h-[85vh] bg-50% bg-no-repeat bg-center repeat
|
||||||
|
flex flex-col gap-4`}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className=" flex flex-col justify-center font-[yekan] pt-12 px-3
|
||||||
|
text-[#7C838A] dark:text-white text-sm font-medium leading-6 tracking-wide 3xl:text-base 3xl:font-bold"
|
||||||
|
ref={componentRef}
|
||||||
|
dir="rtl"
|
||||||
|
>
|
||||||
|
{/* <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
|
||||||
3xl:text-base 3xl:font-bold "
|
3xl:text-base 3xl:font-bold "
|
||||||
>
|
>
|
||||||
|
|
@ -50,24 +78,46 @@ export default function Result() {
|
||||||
<span className="text-slate-500 mx-2">{`${password}`}</span>
|
<span className="text-slate-500 mx-2">{`${password}`}</span>
|
||||||
در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه
|
در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه
|
||||||
پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید.
|
پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید.
|
||||||
|
</p> */}
|
||||||
|
|
||||||
|
{/* Display fetched content */}
|
||||||
|
<div dangerouslySetInnerHTML={{ __html: fetchedContent }} />
|
||||||
|
|
||||||
|
<p
|
||||||
|
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
|
3xl:text-base 3xl:font-bold mt-4"
|
||||||
|
>
|
||||||
|
کد پیگیری :
|
||||||
|
<span className="text-slate-500 mx-2">{`${trackingNumber}`}</span>
|
||||||
</p>
|
</p>
|
||||||
{/* <div className=" w-full flex justify-end mt-2">
|
|
||||||
<Button
|
<p
|
||||||
variant="outline"
|
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
type="submit"
|
3xl:text-base 3xl:font-bold "
|
||||||
onClick={handlePrint}
|
>
|
||||||
className="w-fit bg-blue text-white p-2 rounded-xl text-center"
|
رمز عبور :<span className="text-slate-500 mx-2">{`${password}`}</span>
|
||||||
>
|
</p>
|
||||||
پرینت درخواست
|
{/* <Image
|
||||||
</Button>
|
|
||||||
</div> */}
|
|
||||||
<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">
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
type="submit"
|
||||||
|
onClick={handlePrint}
|
||||||
|
className="w-fit bg-blue text-white p-2 rounded-xl text-center"
|
||||||
|
>
|
||||||
|
پرینت درخواست
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{/* <Image
|
||||||
|
alt="icon"
|
||||||
|
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"
|
||||||
|
/> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export const sliderItems = [
|
||||||
export const boxItems = [
|
export const boxItems = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "ثبت شکایت(ناشناس)",
|
name: "ثبت گزارش ها(ناشناس)",
|
||||||
icon: "/img/box1.svg",
|
icon: "/img/box1.svg",
|
||||||
icon2: "/img/box1-hover.svg",
|
icon2: "/img/box1-hover.svg",
|
||||||
description: "ارسال درخواست نارضایتی از پرسنل",
|
description: "ارسال درخواست نارضایتی از پرسنل",
|
||||||
|
|
@ -29,7 +29,7 @@ export const boxItems = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "ثبت شکایت",
|
name: "ثبت گزارش ها",
|
||||||
icon: "/img/box1.svg",
|
icon: "/img/box1.svg",
|
||||||
icon2: "/img/box1-hover.svg",
|
icon2: "/img/box1-hover.svg",
|
||||||
description: "ارسال درخواست نارضایتی از پرسنل",
|
description: "ارسال درخواست نارضایتی از پرسنل",
|
||||||
|
|
@ -37,7 +37,7 @@ export const boxItems = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "پیگیری شکایت",
|
name: "پیگیری گزارش ها",
|
||||||
icon: "/img/box2.svg",
|
icon: "/img/box2.svg",
|
||||||
icon2: "/img/box2-hover.svg",
|
icon2: "/img/box2-hover.svg",
|
||||||
description: "پیگیری درخواست ارسال شده",
|
description: "پیگیری درخواست ارسال شده",
|
||||||
|
|
@ -117,14 +117,14 @@ export const callUsItems = [
|
||||||
id: 2,
|
id: 2,
|
||||||
title: "نشانی الکترونیک",
|
title: "نشانی الکترونیک",
|
||||||
icon: <HiOutlineMail size="full" />,
|
icon: <HiOutlineMail size="full" />,
|
||||||
description: "جهت ارتباط ما با باا شماره",
|
description: "جهت ارتباط ما با شماره",
|
||||||
description2: "sotzani@gamil.com",
|
description2: "sotzani@gamil.com",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
title: "تماس با ما ",
|
title: "تماس با ما ",
|
||||||
icon: <FiPhone size="full" />,
|
icon: <FiPhone size="full" />,
|
||||||
description: "جهت ارتباط ما با باا شماره",
|
description: "جهت ارتباط ما با شماره",
|
||||||
description2: "03531234567",
|
description2: "03531234567",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,15 @@ export function convertDate(date: string) {
|
||||||
return convertedDate;
|
return convertedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function convertFullTime(date: string) {
|
||||||
|
const convertedDate = dayjs(date)
|
||||||
|
.calendar("jalali")
|
||||||
|
.locale("fa")
|
||||||
|
.format(" HH:mm - YYYY/M/DD");
|
||||||
|
return convertedDate;
|
||||||
|
}
|
||||||
|
|
||||||
export function Decrypt(encryptedData: string , privateKey: string) {
|
export function Decrypt(encryptedData: string , privateKey: string) {
|
||||||
const Key = `-----BEGIN RSA PRIVATE KEY-----
|
const Key = `-----BEGIN RSA PRIVATE KEY-----
|
||||||
MIICXAIBAAKBgQCfmb1aGcWsqJPp+v6e72CPngE6P6FoCZCJESwDTXUXiJiAKshB
|
MIICXAIBAAKBgQCfmb1aGcWsqJPp+v6e72CPngE6P6FoCZCJESwDTXUXiJiAKshB
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sootzani",
|
"name": "sootzani",
|
||||||
"version": "0.1.6 ",
|
"version": "0.1.6",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.3.2",
|
"@hookform/resolvers": "^3.3.2",
|
||||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,13 @@ module.exports = {
|
||||||
extend: {
|
extend: {
|
||||||
backgroundImage: {
|
backgroundImage: {
|
||||||
mainBg: "url('/img/bg.png')",
|
mainBg: "url('/img/bg.png')",
|
||||||
|
'request-result': "url('/img/result.png')",
|
||||||
|
},
|
||||||
|
backgroundSize: {
|
||||||
|
'auto': 'auto',
|
||||||
|
'cover': 'cover',
|
||||||
|
'contain': 'contain',
|
||||||
|
'50%': '50%',
|
||||||
},
|
},
|
||||||
objectPosition: {
|
objectPosition: {
|
||||||
"custom": "top 10px right 10px",
|
"custom": "top 10px right 10px",
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,16 @@ export async function getSliders() {
|
||||||
const data = await axios.get("api/Common/Sliders");
|
const data = await axios.get("api/Common/Sliders");
|
||||||
console.log(data);
|
console.log(data);
|
||||||
return data.data;
|
return data.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getWebContents() {
|
||||||
|
const data = await axios.get("api/Common/Contents");
|
||||||
|
console.log(data);
|
||||||
|
return data.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getSingleWebContents( title: string ) {
|
||||||
|
const data = await axios.get(`api/Common/Contents/${title}`);
|
||||||
|
console.log(data);
|
||||||
|
return data.data;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue