Compare commits

..

4 Commits

Author SHA1 Message Date
Hossein Rahmani d5d8cff1ca Merge branch 'Kahdooei' 2024-01-27 13:23:40 +03:30
Hossein Rahmani 8e00f200a7 Bugs fixed 2024-01-27 13:21:14 +03:30
Hossein Rahmani ccabfbe739 Merge branch 'Kahdooei' 2024-01-27 12:19:25 +03:30
Hossein Rahmani 6b8f7e9d0c Bugs Fixed + Codes Cleaned 2024-01-27 12:05:53 +03:30
15 changed files with 51 additions and 247 deletions

View File

@ -59,8 +59,6 @@ export default function Landing() {
queryFn: () => getNews(),
refetchOnWindowFocus: false,
});
return (
<div className="overflow-x-hidden max-md:-mt-8">
@ -132,7 +130,7 @@ export default function Landing() {
</Swiper>
</div>
<div className="3xl:w-[60%] w-[75%] mx-auto max-md:mt-5">
<div className="3xl:w-[60%] w-[80%] 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 ">
{boxItems.map((item, index) => {
return (

View File

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

View File

@ -1,16 +0,0 @@
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

@ -13,7 +13,7 @@ import dynamic from "next/dynamic";
import { useQuery } from "@tanstack/react-query";
export default function CallUs(props: any) {
const { position, zoom } = props;
const { position, zoom } = props;
return (
<div className="bg-white dark:bg-gray-900 w-screen">

View File

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

View File

@ -1,14 +1,5 @@
import React from 'react'
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() {
return (
@ -28,56 +19,7 @@ export default function Counter() {
</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>
)

View File

@ -4,19 +4,7 @@ import Image from "next/image";
import Resultimg from "../public/img/followResult.png";
import Link from "next/link";
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 { IoMdClose } from "react-icons/io";
import { postComplaintTracking } from "@/utils/citizenApi";
@ -73,20 +61,8 @@ 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.";
console.log(complaintPrintMutation?.data);
return (
<>
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] pt-6 mx-auto">
@ -101,98 +77,6 @@ export default function FollowResult() {
</span>
<p>بازگشت</p>
</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
role="Citizen"
state="FollowResult"
@ -202,13 +86,6 @@ 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>
</>
);

View File

@ -25,6 +25,7 @@ import Link from "next/link";
import FollowResult from "./FollowResult";
import { postComplaintTracking } from "@/utils/citizenApi";
import { toast } from "sonner";
import { Oval } from "react-loader-spinner";
const FormSchema = z.object({
trackingNumber: z.string().min(2, {
@ -52,22 +53,6 @@ export default function FollowUp() {
// router.push("/FollowResult");
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) => {
toast(<>{err.response.data.detail}</>, {
@ -95,7 +80,7 @@ export default function FollowUp() {
// });
console.log(data);
localStorage.setItem("trackingNumber2", data.trackingNumber);
localStorage.setItem("password2", data.password);
@ -162,7 +147,21 @@ export default function FollowUp() {
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"
>
پیگیری درخواست
{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>
</div>
</form>

View File

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

View File

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

View File

@ -34,7 +34,7 @@ export default function News() {
console.log(data);
return (
<div className="bg-white dark:bg-gray-900 pt-8 container">
<div className="bg-white dark:bg-gray-900 pt-8 3xl:w-[60%] w-[80%] ">
<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">
{/* {data.map((item: any, index: number) => {

View File

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

View File

@ -9,7 +9,7 @@ import { IoArrowDown } from "react-icons/io5";
export default function SubmitRequest() {
return (
<div className="3xl:w-[60%] w-[75%] mx-auto pb-24">
<div className="3xl:w-[60%] w-[80%] mx-auto pb-24">
<div className=" border my-6 mx-auto py-3 px-4 rounded-lg">
<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-1/3 flex flex-col justify-between gap-8 max-lg:w-full">
<p className="pr-6 font-normal text-sm leading-6 text-justify text-black line-clamp-5 tracking-wider max-sm:pr-0 ">
<p className="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 ">
<Triangle
visible={true}
height="30"
width="30"
height="40"
width="40"
color="#003778"
ariaLabel="triangle-loading"
wrapperStyle={{}}

View File

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