Compare commits

..

No commits in common. "d5d8cff1cad7a5a88c5b2f9ae11ba7418297e6c8" and "63613f782840b6ce1934fe3ce8918e556213f814" have entirely different histories.

15 changed files with 247 additions and 51 deletions

View File

@ -60,6 +60,8 @@ export default function Landing() {
refetchOnWindowFocus: false, refetchOnWindowFocus: false,
}); });
return ( return (
<div className="overflow-x-hidden max-md:-mt-8"> <div className="overflow-x-hidden max-md:-mt-8">
<div className="w-screen bg-top lg:bg-center bg-no-repeat h-[13rem] sm:h-[20rem] md:h-[24rem] xl:h-[33rem]"> <div className="w-screen bg-top lg:bg-center bg-no-repeat h-[13rem] sm:h-[20rem] md:h-[24rem] xl:h-[33rem]">
@ -130,7 +132,7 @@ export default function Landing() {
</Swiper> </Swiper>
</div> </div>
<div className="3xl:w-[60%] w-[80%] mx-auto max-md:mt-5"> <div className="3xl:w-[60%] w-[75%] mx-auto max-md:mt-5">
<div className="flex justify-between gap-6 w-full mx-auto -mt-24 max-md:mt-0 max-sm:flex-wrap max-sm:justify-around "> <div className="flex justify-between gap-6 w-full mx-auto -mt-24 max-md:mt-0 max-sm:flex-wrap max-sm:justify-around ">
{boxItems.map((item, index) => { {boxItems.map((item, index) => {
return ( return (

View File

@ -18,10 +18,11 @@ export default function AboutUs() {
refetch(); refetch();
}, [title, refetch]); }, [title, refetch]);
const fetchedContent = data?.content || ""; // Assuming your API response has a 'content' property const fetchedContent = data?.content || ""; // Assuming your API response has a 'content' property
return ( return (
<div className="bg-white dark:bg-gray-900 3xl:w-[60%] w-[80%] pt-8"> <div className="bg-white dark:bg-gray-900 w-screen pt-8">
<div <div
className="container flex font-[yekan] className="container flex font-[yekan]
text-[#7C838A] dark:text-white text-base font-medium leading-6 tracking-wide 3xl:text-lg 3xl:font-bold" text-[#7C838A] dark:text-white text-base font-medium leading-6 tracking-wide 3xl:text-lg 3xl:font-bold"

View File

@ -0,0 +1,16 @@
import React from "react";
export default function BoxDashboard() {
return (
<div
className="w-full h-full px-7 py-8 bg-zinc-100 rounded-lg shadow flex flex-col justify-end items-center text-black
transition-all duration-300 hover:transition-all hover:duration-300
hover:text-white hover:bg-blue hover:pb-10
max-lg:min-h-[10em] max-lg:max-w-[10em]"
>
<p className="text-center text-sm font-medium ">
تعداد درخواست ها 30 روز گذشته
</p>
</div>
);
}

View File

@ -135,6 +135,11 @@ export default function ComplainsDetails({
setOpen(false); setOpen(false);
} }
}, []); }, []);
useEffect(() => {
// if (storeData && role == "Inspector") {
// getComplaintMutation.mutate(storeData);
// }
}, [storeData]);
if (getComplaintMutation.isSuccess && !Data) { if (getComplaintMutation.isSuccess && !Data) {
data = getComplaintMutation.data; data = getComplaintMutation.data;

View File

@ -1,5 +1,14 @@
import React from 'react' import React from 'react'
import { counterItems } from '@/constants' import { counterItems } from '@/constants'
// import patern from "../public/img/paternSvg.png"
// Import Swiper React components
import { Swiper, SwiperSlide } from 'swiper/react';
// Import Swiper styles
import 'swiper/css';
import 'swiper/css/pagination';
// import required modules
import { Pagination } from 'swiper/modules';
export default function Counter() { export default function Counter() {
return ( return (
@ -19,7 +28,56 @@ export default function Counter() {
</div> </div>
); );
})} })}
{/*
<Swiper
slidesPerView={1}
// spaceBetween={30}
// spaceBetween={10}
// slidesPerView="auto"
breakpoints={{
1920: {
width: 1920,
slidesPerView: 5,
},
1024: {
width: 1024,
slidesPerView: 3,
},
768: {
width: 768,
slidesPerView: 2,
},
425: {
width: 425,
slidesPerView: 2,
},
}}
pagination={{
clickable: true,
}}
modules={[Pagination]}
className="mySwiper"
>
{counterItems.map((item) => {
return (
<SwiperSlide className='h-48 flex flex-col justify-end items-center gap-1 px-7 py-6 rounded-lg
hover:bg-[#002A5B] transition-all duration-500 text-center
max-md:px-1 max-md:py-1'
key={item.id}>
<p className='text-yellow font-bold text-base'>{item.count}</p>
<p className='text-white font-normal text-sm'>{item.name}</p>
</SwiperSlide>
);
})}
{/* <SwiperSlide>Slide 1</SwiperSlide> */}
{/* </Swiper> */}
</div> </div>
</div> </div>
</div> </div>
) )

View File

@ -4,7 +4,19 @@ import Image from "next/image";
import Resultimg from "../public/img/followResult.png"; import Resultimg from "../public/img/followResult.png";
import Link from "next/link"; import Link from "next/link";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { ThreeDots } from "react-loader-spinner";
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { IoMdClose } from "react-icons/io"; import { IoMdClose } from "react-icons/io";
import { postComplaintTracking } from "@/utils/citizenApi"; import { postComplaintTracking } from "@/utils/citizenApi";
@ -61,8 +73,20 @@ export default function FollowResult() {
}, },
}); });
function onSubmit() {
console.log("SuccessPrinttttttttttt");
// complaintPrintMutation.mutate({
// Data: { trackingNumber: trackingNumber, password: password },
// });
}
// const possibleOperations = complaintPrintMutation.data?.possibleOperations;
// const selectOptions = Operations.filter((item, index) =>
// possibleOperations.includes(index)
// );
const printableContent = "This is the content to be printed."; const printableContent = "This is the content to be printed.";
console.log(complaintPrintMutation?.data);
return ( return (
<> <>
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] pt-6 mx-auto"> <div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] pt-6 mx-auto">
@ -77,6 +101,98 @@ export default function FollowResult() {
</span> </span>
<p>بازگشت</p> <p>بازگشت</p>
</button> </button>
{/* <div className="flex justify-center gap-2 mb-2 sm:justify-end">
<AlertDialog>
<AlertDialogTrigger asChild>
<Button
variant="outline"
type="submit"
onClick={() => onSubmit()}
className="p-2 text-center text-white w-fit bg-blue rounded-xl"
>
پرینت درخواست
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>
<p className="text-[#464646] text-base font-bold">
گزارش شکایات
</p>
<AlertDialogCancel className="h-auto p-0 border-0">
<IoMdClose />
</AlertDialogCancel>
</AlertDialogTitle>
<AlertDialogDescription className="h-full px-0 py-0 sm:px-0 sm:pt-0 ">
{complaintPrintMutation.isPending ? (
<div className="items-center self-center justify-center h-full felx">
<ThreeDots
visible={true}
height="80"
width="100"
color="#003778"
radius="9"
ariaLabel="three-dots-loading"
wrapperStyle={{}}
wrapperClass=""
/>
</div>
) : (
<div
dir="rtl"
className=" font-[yekan] px-10 py-4 sm:px-28 sm:pt-9 "
id="details"
ref={componentRef}
// style={{ border: printStyle ? 'none' : '5px solid black' , margin: printStyle ? 'auto': '1em' }}
>
<p className="text-[#464646] text-sm font-medium">
{" "}
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{`${complaintData?.title}`}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
{" "}
متن شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{`${complaintData?.contents[0]?.text}`}
</span>
</p>
<br />
<p className="text-[#464646] text-sm font-medium">
{" "}
جزئیات شکایت:
</p>
<br />
<p className="text-[#464646] text-sm font-medium">
درخواست شما با کد رهگیری
<span className="mx-2 text-slate-500">{`${trackingNumber}`}</span>
و رمز عبور
<span className="mx-2 text-slate-500">{`${password}`}</span>
در دست بررسی و اقدام می باشد. در صورت تمایل می
توانید با شماره تلفن 0353286545 جهت پشتیبانی تماس
حاصل کنید.
</p>
</div>
)}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<Button
className="w-1/2 text-white bg-blue sm:w-1/6"
onClick={handlePrint}
>
پرینت گزارش
</Button>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div> */}
<ComplainsDetails <ComplainsDetails
role="Citizen" role="Citizen"
state="FollowResult" state="FollowResult"
@ -86,6 +202,13 @@ export default function FollowResult() {
) : ( ) : (
"" ""
)} )}
{/* <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> </div>
</> </>
); );

View File

@ -25,7 +25,6 @@ import Link from "next/link";
import FollowResult from "./FollowResult"; import FollowResult from "./FollowResult";
import { postComplaintTracking } from "@/utils/citizenApi"; import { postComplaintTracking } from "@/utils/citizenApi";
import { toast } from "sonner"; import { toast } from "sonner";
import { Oval } from "react-loader-spinner";
const FormSchema = z.object({ const FormSchema = z.object({
trackingNumber: z.string().min(2, { trackingNumber: z.string().min(2, {
@ -53,6 +52,22 @@ export default function FollowUp() {
// router.push("/FollowResult"); // router.push("/FollowResult");
router.push("/FollowResult", { data: JSON.stringify(result) }); router.push("/FollowResult", { data: JSON.stringify(result) });
// router.push(
// "/FollowResult",
// {
// data: JSON.stringify(result),
// },
// );
// router.push({
// pathname : '/FollowResult',
// query : {
// data: JSON.stringify( result ) ;
// },
// });
// return (res)
}, },
onError: (err: any | string) => { onError: (err: any | string) => {
toast(<>{err.response.data.detail}</>, { toast(<>{err.response.data.detail}</>, {
@ -147,21 +162,7 @@ export default function FollowUp() {
type="submit" type="submit"
className="w-1/2 p-2 text-center text-white bg-blue min-w-max sm:w-1/3 lg:w-1/4 rounded-xl" className="w-1/2 p-2 text-center text-white bg-blue min-w-max sm:w-1/3 lg:w-1/4 rounded-xl"
> >
{complaintTrackingMutation.isPending ? ( پیگیری درخواست
<div className="flex items-center justify-center gap-2">
<Oval
visible={true}
height="20"
width="20"
color="#fff"
ariaLabel="oval-loading"
wrapperStyle={{}}
wrapperClass=""
/>
</div>
) : (
"پیگیری درخواست"
)}
</Button> </Button>
</div> </div>
</form> </form>

View File

@ -20,7 +20,7 @@ export default function Footer() {
// <div classNameName="flex justify-center items-center w-full bg-blue "> // <div classNameName="flex justify-center items-center w-full bg-blue ">
<footer className="bg-blue dark:bg-gray-900"> <footer className="bg-blue dark:bg-gray-900">
<div className="mx-auto 3xl:w-[60%] w-[80%] py-7 md:py-8 lg:pt-14 lg:pb-7 "> <div className="mx-auto w-full max-w-screen-3xl px-4 py-7 md:px-8 md:py-8 lg:pt-14 lg:pb-7 lg:px-11 ">
<div className="md:flex md:justify-between w-full "> <div className="md:flex md:justify-between w-full ">
<div className="grid gap-10 sm:gap-16 md:gap-20 lg:gap-28 grid-cols-1 w-full"> <div className="grid gap-10 sm:gap-16 md:gap-20 lg:gap-28 grid-cols-1 w-full">
<div> <div>
@ -30,10 +30,7 @@ export default function Footer() {
<div> <div>
<p className=" text-white text-xs md:text-sm font-normal md:leading-7"> <p className=" text-white text-xs md:text-sm font-normal md:leading-7">
<div <div className=" !text-white footer" dangerouslySetInnerHTML={{ __html: fetchedContent }} />
className=" !text-white footer"
dangerouslySetInnerHTML={{ __html: fetchedContent }}
/>
</p> </p>
</div> </div>
</div> </div>

View File

@ -88,8 +88,8 @@ export default function Navbar() {
)} )}
</AnimatePresence> </AnimatePresence>
</div> </div>
<div className=" flex items-center max-md:mr-1 gap-5"> <div className=" flex items-center max-md:mr-1 ">
<Link href="/" className=" max-sm:hidden"> <Link href="/">
<Image <Image
src="/img/logo.png" src="/img/logo.png"
quality={100} quality={100}
@ -99,7 +99,7 @@ export default function Navbar() {
/> />
</Link> </Link>
<div className=" text-brown flex flex-col text-center"> <div className=" text-brown flex flex-col text-center w-40">
<Link href="/"> <Link href="/">
<h1 className="text-[23px] w-full">عیــون</h1> <h1 className="text-[23px] w-full">عیــون</h1>
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1> <h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1>

View File

@ -34,7 +34,7 @@ export default function News() {
console.log(data); console.log(data);
return ( return (
<div className="bg-white dark:bg-gray-900 pt-8 3xl:w-[60%] w-[80%] "> <div className="bg-white dark:bg-gray-900 pt-8 container">
<h2 className=" w-full font-bold mb-2">اخبار</h2> <h2 className=" w-full font-bold mb-2">اخبار</h2>
<div className="w-full flex flex-wrap lg:flex-row gap-8 mb-14 flex-col max-lg:gap-4"> <div className="w-full flex flex-wrap lg:flex-row gap-8 mb-14 flex-col max-lg:gap-4">
{/* {data.map((item: any, index: number) => { {/* {data.map((item: any, index: number) => {

View File

@ -35,10 +35,10 @@ export default function NewsDetail({ id }: { id: any }) {
}); });
return ( return (
<div className="mt-10 3xl:w-[60%] w-[80%] max-md:px-3 pb-10"> <div className="mt-10 w-full md:w-1/2 max-md:px-3">
{data && ( {data && (
<> <>
{/* <div className=" text-blue gap-1 mb-2 bg-gray-100 rounded-md p-2"> <div className=" text-blue gap-1 mb-2 bg-gray-100 rounded-md p-2">
<div <div
className=" flex items-center cursor-pointer" className=" flex items-center cursor-pointer"
onClick={() => router.push("/News")} onClick={() => router.push("/News")}
@ -48,7 +48,7 @@ export default function NewsDetail({ id }: { id: any }) {
</span> </span>
<span>بازگشت</span> <span>بازگشت</span>
</div> </div>
</div> */} </div>
<p className=" font-bold mb-2">{data?.title}</p> <p className=" font-bold mb-2">{data?.title}</p>
<div className=" w-full border "> <div className=" w-full border ">
<Image <Image
@ -63,8 +63,8 @@ export default function NewsDetail({ id }: { id: any }) {
<div className=" text-gray-500 mt-2"> <div className=" text-gray-500 mt-2">
{convertFullTime(data.dateTime)} {convertFullTime(data.dateTime)}
</div> </div>
<div className="max-sm:text-sm mt-2">{data.description}</div> <div className="">{data.description}</div>
<div className="max-sm:text-sm mt-2">{data.content}</div> <div className="">{data.content}</div>
</> </>
)} )}
</div> </div>

View File

@ -9,7 +9,7 @@ import { IoArrowDown } from "react-icons/io5";
export default function SubmitRequest() { export default function SubmitRequest() {
return ( return (
<div className="3xl:w-[60%] w-[80%] mx-auto pb-24"> <div className="3xl:w-[60%] w-[75%] mx-auto pb-24">
<div className=" border my-6 mx-auto py-3 px-4 rounded-lg"> <div className=" border my-6 mx-auto py-3 px-4 rounded-lg">
<p className="text-sm font-normal text-right text-black"> <p className="text-sm font-normal text-right text-black">
درباره سامانه عیون درباره سامانه عیون
@ -18,7 +18,7 @@ export default function SubmitRequest() {
<div className=" w-full flex flex-row gap-12 max-lg:flex-col-reverse items-center"> <div className=" w-full flex flex-row gap-12 max-lg:flex-col-reverse items-center">
<div className="w-1/3 flex flex-col justify-between gap-8 max-lg:w-full"> <div className="w-1/3 flex flex-col justify-between gap-8 max-lg:w-full">
<p className="font-normal text-sm leading-6 text-justify text-black line-clamp-5 tracking-wider max-sm:pr-0 "> <p className="pr-6 font-normal text-sm leading-6 text-justify text-black line-clamp-5 tracking-wider max-sm:pr-0 ">
این سامانه با هدف بررسی درخواست های مردمی و شکایت های ایشان از پرسنل این سامانه با هدف بررسی درخواست های مردمی و شکایت های ایشان از پرسنل
شهرداری و رسیدگی به آن ایجاد شده است. فلوچارت روبرو نحوه ارسال شهرداری و رسیدگی به آن ایجاد شده است. فلوچارت روبرو نحوه ارسال
درخواست و پیگیری آن را مشاهده می کنید. درخواست و پیگیری آن را مشاهده می کنید.

View File

@ -81,8 +81,8 @@ export default function Verify() {
<div className="absolute top-3 left-5 "> <div className="absolute top-3 left-5 ">
<Triangle <Triangle
visible={true} visible={true}
height="40" height="30"
width="40" width="30"
color="#003778" color="#003778"
ariaLabel="triangle-loading" ariaLabel="triangle-loading"
wrapperStyle={{}} wrapperStyle={{}}

View File

@ -6,9 +6,10 @@ import bgimg from "../public/img/bg.png";
export const menuItems = [ export const menuItems = [
{ id: 1, name: "صفحه اصلی", href: "/" }, { id: 1, name: "صفحه اصلی", href: "/" },
{ id: 2, name: "اخبار", href: "/News" }, { id: 2, name: "اخبار", href: "/News" },
{ id: 3, name: "تماس با ما", href: "/CallUs" }, { id: 3, name: "درباره ما", href: "/AboutUs" },
{ id: 4, name: "پیگیری", href: "/FollowUp" }, { id: 4, name: "تماس با ما", href: "/CallUs" },
{ id: 5, name: "ورود به پنل کاربری", href: "/Login" }, { id: 5, name: "پیگیری", href: "/FollowUp" },
{ id: 6, name: "ورود به پنل کاربری", href: "/Login" },
]; ];
export const sliderItems = [ export const sliderItems = [
@ -140,16 +141,8 @@ export const ControllerMenuItems = [
export const AdminMenuItems = [ export const AdminMenuItems = [
{ id: 1, name: "داشبورد", href: "/UserPanel/AdminDashboard" }, { id: 1, name: "داشبورد", href: "/UserPanel/AdminDashboard" },
{ { id: 2, name: "مدیریت کاربران", href: "/UserPanel/AdminDashboard/UserManagement" },
id: 2, { id: 3, name: "مدیریت کلید ها", href: "/UserPanel/AdminDashboard/KeysManagement" },
name: "مدیریت کاربران",
href: "/UserPanel/AdminDashboard/UserManagement",
},
{
id: 3,
name: "مدیریت کلید ها",
href: "/UserPanel/AdminDashboard/KeysManagement",
},
{ id: 4, name: "گزارشات و آمار", href: "/UserPanel/AdminDashboard/#" }, { id: 4, name: "گزارشات و آمار", href: "/UserPanel/AdminDashboard/#" },
{ id: 5, name: "تنظیمات", href: "/UserPanel/AdminDashboard/#" }, { id: 5, name: "تنظیمات", href: "/UserPanel/AdminDashboard/#" },
]; ];