Compare commits

..

No commits in common. "6c9b8c2e42eb845c703f80cfb7bf77b7bd36ce62" and "39c90f95f1eb54da42dd3a87779563d51dcb8a38" have entirely different histories.

29 changed files with 268 additions and 1298 deletions

View File

@ -3,9 +3,5 @@ import React from "react";
export default function page({ params }: { params: any }) { export default function page({ params }: { params: any }) {
const id = params.id; const id = params.id;
return ( return <ComplainsDetails role="Inspector" id={id} />;
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] mt-3 sm:mt-6 mx-auto mb-10">
<ComplainsDetails role="Inspector" id={id} />
</div>
);
} }

View File

@ -1,6 +0,0 @@
import Profile from "@/components/Profile";
import React from "react";
export default function page() {
return <Profile />;
}

View File

@ -7,8 +7,8 @@ import React from "react";
export default function page() { export default function page() {
const cookieStore = cookies(); const cookieStore = cookies();
const token = cookieStore.get("Sootzani_Token"); const token = cookieStore.get("Sootzani_Token");
// if (!token) { if (token) {
// redirect("/"); redirect("/");
// } }
return <CitizenLogin />; return <CitizenLogin />;
} }

View File

@ -7,7 +7,7 @@ import { boxItems, newsItems } from "@/constants";
import Image from "next/image"; import Image from "next/image";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import Link from "next/link"; import Link from "next/link";
import bgimg from "../../public/img/bg-slide.jpg"; import bgimg from "../../public/img/bg.png";
import Footer from "@/components/Footer"; import Footer from "@/components/Footer";
// Import Swiper React components // Import Swiper React components
@ -18,20 +18,10 @@ import "swiper/css/pagination";
// import required modules // import required modules
import { Autoplay, Pagination, Navigation } from "swiper/modules"; import { Autoplay, Pagination, Navigation } from "swiper/modules";
import { sliderItems } from "@/constants"; import { sliderItems } from "@/constants";
import { useQuery } from "@tanstack/react-query";
import { getSliders } from "@/utils/commonApi";
export default function Landing() { export default function Landing() {
const { data, isLoading, refetch } = useQuery({
queryKey: ["Sliders"],
queryFn: () => getSliders(),
refetchOnWindowFocus: false,
});
console.log(data);
return ( return (
<div className="overflow-x-hidden max-md:-mt-8"> <div className="overflow-x-hidden">
<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]">
<Swiper <Swiper
slidesPerView={1} slidesPerView={1}
@ -47,56 +37,20 @@ export default function Landing() {
modules={[Autoplay]} modules={[Autoplay]}
className="mySwiper w-full h-full" className="mySwiper w-full h-full"
> >
{data?.length > 0 ? ( {sliderItems.map((item) => {
<> return (
{data.map((item: any, index: number) => { <SwiperSlide key={item.id}>
console.log(item); <Image
return ( alt="bg"
<SwiperSlide key={item.id}> src={bgimg}
<Image // width={20}
alt="bg" // height={20}
src={`${process.env.NEXT_PUBLIC_BASE_URL_APP}${item?.image?.url}`} quality={100}
// width={100} className=" w-full h-full object-cover max-sm:object-[70%]"
// height={100} />
layout="fill" </SwiperSlide>
quality={100} );
className=" w-full h-full object-cover max-sm:object-[70%]" })}
/>
</SwiperSlide>
);
})}
{data?.length == 1 && (
<SwiperSlide>
<Image
alt="bg"
src={`${process.env.NEXT_PUBLIC_BASE_URL_APP}${data[0]?.image?.url}`}
// width={20}
// height={20}
layout="fill"
quality={100}
className=" w-full h-full object-cover max-sm:object-[70%]"
/>
</SwiperSlide>
)}
</>
) : (
<>
{sliderItems.map((item) => {
return (
<SwiperSlide key={item.id}>
<Image
alt="bg"
src={bgimg}
// width={20}
// height={20}
quality={100}
className=" w-full h-full object-cover max-sm:object-[70%]"
/>
</SwiperSlide>
);
})}
</>
)}
</Swiper> </Swiper>
</div> </div>
@ -114,12 +68,6 @@ export default function Landing() {
" "
key={index} key={index}
href={item.link} href={item.link}
onClick={() => {
localStorage.removeItem("Sootzani_Login_State");
if (index == 0) {
localStorage.setItem("unknown", "true");
}
}}
> >
<p className="text-xs text-center font-medium text-gray hidden group-hover:flex "> <p className="text-xs text-center font-medium text-gray hidden group-hover:flex ">
{item.description} {item.description}
@ -176,7 +124,7 @@ export default function Landing() {
height={500} height={500}
width={500} width={500}
quality={100} quality={100}
className="w-full h-full rounded-r-lg bg-cover object-cover object-center" className="w-full h-full rounded-r-lg bg-cover object-cover object-top"
/> />
</div> </div>
@ -191,7 +139,7 @@ export default function Landing() {
شروع به کار سامانه عیون شروع به کار سامانه عیون
</p> </p>
<p className="text-sm font-normal text-justify text-[#3C3C43D9] line-clamp-5 max-md:line-clamp-2"> <p className="text-sm font-normal text-justify text-[#3C3C43D9] line-clamp-5 max-md:line-clamp-2">
این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور
مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده
است ... است ...
</p> </p>

View File

@ -9,7 +9,7 @@ import { Toaster as SonnerToaster } from "@/components/ui/sonner";
const inter = Inter({ subsets: ["latin"] }); const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = { export const metadata: Metadata = {
title: "عیون", title: "Create Next App",
description: "Generated by create next app", description: "Generated by create next app",
}; };
@ -23,9 +23,9 @@ export default function RootLayout({
<body className="font-[yekan] "> <body className="font-[yekan] ">
<Provider> <Provider>
<Navbar /> <Navbar />
{/* <NavbarSm /> */} <NavbarSm />
<div className="flex justify-center mt-20 sm:mt-10">{children}</div> <div className="flex justify-center">{children}</div>
<Toaster /> <Toaster />
<SonnerToaster /> <SonnerToaster />

View File

@ -27,7 +27,6 @@ import { useRouter } from "next/navigation";
import { Oval, ThreeDots } from "react-loader-spinner"; import { Oval, ThreeDots } from "react-loader-spinner";
import useData from "@/store/useData"; import useData from "@/store/useData";
import { getCookie } from "cookies-next"; import { getCookie } from "cookies-next";
import { RefreshCcw } from "lucide-react";
const FormSchema = z.object({ const FormSchema = z.object({
phoneNumber: z.string().min(1, { phoneNumber: z.string().min(1, {
message: "لطفا شماره موبایل خود را وارد نمایید.", message: "لطفا شماره موبایل خود را وارد نمایید.",
@ -89,7 +88,7 @@ export default function CitizenLogin() {
return ( return (
<div <div
className="w-full mt-14 sm:w-2/3 md:w-2/4 xl:w-1/3 bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040] className="w-full mt-12 sm:w-2/3 md:w-2/4 xl:w-1/3 bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040]
h-full max-md:p-8 pt-12 mb-10" h-full max-md:p-8 pt-12 mb-10"
> >
<div className="space-y-3 md:space-y-4 flex flex-col md:py-10 md:px-12 lg:px-16 h-full justify-center"> <div className="space-y-3 md:space-y-4 flex flex-col md:py-10 md:px-12 lg:px-16 h-full justify-center">
@ -158,7 +157,7 @@ export default function CitizenLogin() {
/> />
</div> </div>
) : ( ) : (
<div className=" flex justify-center items-center text-center gap-2"> <div className=" flex justify-center text-center">
<Image <Image
alt="icon" alt="icon"
src={srcForImage as string} src={srcForImage as string}
@ -167,11 +166,6 @@ export default function CitizenLogin() {
height={20} height={20}
quality={100} quality={100}
/> />
<RefreshCcw
className=" cursor-pointer"
onClick={() => refetch()}
color="#003778"
/>
</div> </div>
)} )}
</div> </div>

View File

@ -12,104 +12,33 @@ 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, Dialog,
AlertDialogAction, DialogClose,
AlertDialogCancel, DialogContent,
AlertDialogContent, DialogDescription,
AlertDialogDescription, DialogFooter,
AlertDialogFooter, DialogHeader,
AlertDialogHeader, DialogTitle,
AlertDialogTitle, DialogTrigger,
AlertDialogTrigger, } from "@/components/ui/dialog";
} from "@/components/ui/alert-dialog";
import { Input } from "./ui/input"; import { Input } from "./ui/input";
import { toast } from "sonner"; import { toast } from "sonner";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { Triangle } from "react-loader-spinner";
import { ArrowDownToLine, ArrowRight, File } from "lucide-react";
export default function ComplainsDetails({ export default function ComplainsDetails({
id, id,
role, role,
Data, Data,
state,
}: { }: {
id?: number; id?: number;
role: string; role: string;
Data?: any; Data?: any;
state?: string;
}) { }) {
const [open, setOpen] = useState<boolean>( const [open, setOpen] = useState<boolean>(true);
state == "FollowResult" ? false : true
);
const [password, setPassword] = useState<any>(true); const [password, setPassword] = useState<any>(true);
const router = useRouter(); const router = useRouter();
const storeData = useData((state) => state.data); const storeData = useData((state) => state.data);
let data; let data;
const openFileInNewTab = (base64Data: any, fileType: any) => {
const blob = b64toBlob(base64Data, fileType);
const blobUrl = URL.createObjectURL(blob);
const newTab = window.open();
if (newTab) {
newTab.document.write(
'<html style="height: 100%;"><head><title>File Preview</title></head><body style="margin: 0; padding: 0; height: 100%; overflow: hidden;">'
);
// Check the file type and handle accordingly
if (fileType.includes("image")) {
newTab.document.write(
`<img src="data:${fileType};base64,${base64Data}" alt="File Preview"/>`
);
} else if (fileType === "application/pdf") {
newTab.document.write(
`<iframe width="100%" height="100%" src="${blobUrl}"></iframe>`
);
} else {
newTab.document.write(
`<a href="${blobUrl}" target="_blank">Open in New Tab</a>`
);
}
newTab.document.write("</body></html>");
newTab.document.close();
URL.revokeObjectURL(blobUrl);
} else {
console.error("Unable to open a new tab.");
}
};
const downloadFile = (base64Data: any, fileName: any, fileType: any) => {
const blob = b64toBlob(base64Data, fileType);
const blobUrl = URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = blobUrl;
link.download = fileName;
link.click();
URL.revokeObjectURL(blobUrl);
};
const b64toBlob = (b64Data: any, contentType = "", sliceSize = 512) => {
const byteCharacters = atob(b64Data);
const byteArrays = [];
for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
const slice = byteCharacters.slice(offset, offset + sliceSize);
const byteNumbers = new Array(slice.length);
for (let i = 0; i < slice.length; i++) {
byteNumbers[i] = slice.charCodeAt(i);
}
const byteArray = new Uint8Array(byteNumbers);
byteArrays.push(byteArray);
}
return new Blob(byteArrays, { type: contentType });
};
const getComplaintMutation = useMutation({ const getComplaintMutation = useMutation({
mutationKey: ["Complaint", id], mutationKey: ["Complaint", id],
mutationFn: postComplaintTracking, mutationFn: postComplaintTracking,
@ -130,9 +59,6 @@ export default function ComplainsDetails({
console.log(storeData); console.log(storeData);
useEffect(() => { useEffect(() => {
useData.persist.rehydrate(); useData.persist.rehydrate();
if (state == "FollowResult") {
setOpen(false);
}
}, []); }, []);
useEffect(() => { useEffect(() => {
// if (storeData && role == "Inspector") { // if (storeData && role == "Inspector") {
@ -140,37 +66,33 @@ export default function ComplainsDetails({
// } // }
}, [storeData]); }, [storeData]);
if (getComplaintMutation.isSuccess && !Data) { if (getComplaintMutation.isSuccess) {
data = getComplaintMutation.data; data = getComplaintMutation.data;
} else {
data = Data;
} }
if (open) {
return ( return (
<> <Dialog open={open} onOpenChange={setOpen}>
<AlertDialog open={open} onOpenChange={setOpen}> <DialogContent dir="rtl" className="sm:max-w-[425px]">
<AlertDialogContent dir="rtl" className=""> <DialogHeader dir="rtl">
<AlertDialogHeader dir="rtl"> <DialogTitle dir="rtl">رمز عبور</DialogTitle>
<AlertDialogTitle dir="rtl">رمز عبور</AlertDialogTitle> <DialogDescription>
<AlertDialogDescription>
برای مشاهده درخواست پسورد خود را وارد نمایید. برای مشاهده درخواست پسورد خود را وارد نمایید.
</AlertDialogDescription> </DialogDescription>
</AlertDialogHeader> </DialogHeader>
<div className="grid items-center gap-1.5 w-full max-w-sm mx-auto"> <div className="grid w-full max-w-sm items-center gap-1.5">
{/* <Label htmlFor="picture">Picture</Label> */} {/* <Label htmlFor="picture">Picture</Label> */}
<Input <Input
dir="rtl" dir="rtl"
id="picture" id="picture"
onChange={(e) => setPassword(e.target.value)} onChange={(e) => setPassword(e.target.value)}
className=" bg-white hover:bg-white focus:bg-white"
/> />
</div> </div>
<AlertDialogFooter className=" gap-y-2 max-md:w-full max-md:flex max-md:flex-col"> <DialogFooter>
<Button <Button
onClick={() => router.push("/Account/Complaints")} onClick={() => router.push("/Account/Complaints")}
type="button" type="button"
variant="outline" variant="outline"
className=" md:ml-2" className=" ml-2"
> >
بازگشت بازگشت
</Button> </Button>
@ -179,149 +101,60 @@ export default function ComplainsDetails({
تایید تایید
</Button> </Button>
{/* </DialogClose> */} {/* </DialogClose> */}
</AlertDialogFooter> </DialogFooter>
</AlertDialogContent> </DialogContent>
</AlertDialog> </Dialog>
);
}
return (
<>
{data ? ( {data ? (
<> <div className=" w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] flex max-lg:flex-col gap-3 items-start mt-5">
{state !== "FollowResult" && ( <div className="flex flex-col w-full lg:w-1/3 lg:order-2 gap-3 lg:sticky top-40">
<button <div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
onClick={() => router.push("/Account/Complaints")} <p className="text-[#464646] text-base font-bold">گزارش شکایت</p>
className=" my-2 flex gap-1 cursor-pointer text-blue " <div className="mt-2">
> <p className="text-[#2e2a2a] text-sm font-medium">
<span> موضوع شکایت:{" "}
<ArrowRight /> <span className="text-[#7C838A] text-sm font-medium">
</span> {data.title}
<p>بازگشت</p> </span>
</button>
)}
<div className="flex max-lg:flex-col gap-3 items-start">
<div className="flex flex-col w-full lg:w-1/3 lg:order-2 gap-3 lg:sticky top-40">
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
<p className="text-[#464646] text-base font-bold">
گزارش شکایت
</p> </p>
<div className="mt-2"> <p className="text-[#464646] text-sm font-medium">
<p className="text-[#2e2a2a] text-sm font-medium"> دستگاه مربوطه:{" "}
موضوع شکایت:{" "} <span className="text-[#7C838A] text-sm font-medium">
<span className="text-[#7C838A] text-sm font-medium"> {data?.complaintOrganization
{data.title} ? data?.complaintOrganization.title
</span> : "-"}
</p> </span>
<p className="text-[#464646] text-sm font-medium"> </p>
دستگاه مربوطه:{" "} <p className="text-[#464646] text-sm font-medium">
<span className="text-[#7C838A] text-sm font-medium"> پرسنل مربوطه:{" "}
{data?.complaintOrganization <span className="text-[#7C838A] text-sm font-medium">
? data?.complaintOrganization.title {/* {data.title} */}
: "-"} </span>
</span> </p>
</p> <p className="text-[#464646] text-sm font-medium">
<p className="text-[#464646] text-sm font-medium"> زمان ثبت:{" "}
پرسنل مربوطه:{" "} <span className="text-[#7C838A] text-sm font-medium">
<span className="text-[#7C838A] text-sm font-medium"> {convertDate(data.registeredAt)}
{data.complaining ? data.complaining : "-"} </span>
</span> </p>
</p> {/* <p className="text-[#464646] text-sm font-medium">
<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 className="text-[#7C838A] text-sm font-medium">
متن تستی متن تستی
</span> </span>
</p> */} </p> */}
</div> </div>
{/* <p className="text-[#464646] text-sm font-medium text-justify"> {/* <p className="text-[#464646] text-sm font-medium text-justify">
درخواست شما با کد رهگیری {data.trackingNumber} و رمز عبور 12422 در درخواست شما با کد رهگیری {data.trackingNumber} و رمز عبور 12422 در
دست بررسی و اقدام می باشد. در صورت تمایل می توانید با شماره تلفن دست بررسی و اقدام می باشد. در صورت تمایل می توانید با شماره تلفن
0353286545 جهت پشتیبانی تماس حاصل کنید.{" "} 0353286545 جهت پشتیبانی تماس حاصل کنید.{" "}
</p> */} </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>
<InspectorOperations
updateData={() => getComplaintMutation.mutate(storeData)}
role={role}
complaintData={data}
/>
</div>
</div> </div>
<div className="w-full lg:w-2/3 self-stretch bg-[#E9E9E9] p-4 px-10 rounded-lg"> <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">روند شکایت</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" />
)} */}
<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">
{item?.media.map((item: any, index: number) => {
return (
<div
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"
>
<a
onClick={() =>
openFileInNewTab(item.data, item.mimeType)
}
className=" cursor-pointer flex gap-2 truncate items-center"
>
<File className=" w-6 h-6" />
<p className=" max-w-[5rem] truncate">
{item.title}
</p>
</a>
<ArrowDownToLine
className=" cursor-pointer"
onClick={() =>
downloadFile(
item.data,
item.title,
item.mimeType
)
}
/>
</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">
<p className="text-[#464646] text-base font-bold mb-1"> <p className="text-[#464646] text-base font-bold mb-1">
انجام عملیات انجام عملیات
</p> </p>
@ -331,8 +164,50 @@ export default function ComplainsDetails({
complaintData={data} complaintData={data}
/> />
</div> </div>
{/* Left */} </div>
{/* <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"> <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>
<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>
</div>
);
})}
</div>
</div>
<div className=" lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
<p className="text-[#464646] text-base font-bold mb-1">
انجام عملیات
</p>
<InspectorOperations
updateData={() => getComplaintMutation.mutate(storeData)}
role={role}
complaintData={data}
/>
</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 className="text-[#464646] text-base font-bold mb-3">
وضعیت درخواست وضعیت درخواست
</p> </p>
@ -370,24 +245,9 @@ export default function ComplainsDetails({
); );
})} })}
</div> */} </div> */}
</div> </div>
</>
) : ( ) : (
<> ""
{getComplaintMutation.isPending && (
<div className="w-full h-full flex justify-center mt-20">
<Triangle
visible={true}
height="100"
width="100"
color="#003778"
ariaLabel="triangle-loading"
wrapperStyle={{}}
wrapperClass=""
/>
</div>
)}
</>
)} )}
</> </>
); );

View File

@ -87,6 +87,18 @@ export default function FollowResult() {
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-4 mx-auto mb-10">
{/* <div className="h-full flex flex-col justify-center"> */}
{/* <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>
در دست بررسی و اقدام می باشد. در صورت تمایل می توانید با شماره تلفن
0353286545 جهت پشتیبانی تماس حاصل کنید.
</p> */}
{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">
@ -183,8 +195,7 @@ export default function FollowResult() {
</div> </div>
<ComplainsDetails <ComplainsDetails
role="Citizen" role="Citizen"
state="FollowResult" // Data={complaintPrintMutation?.data}
Data={complaintPrintMutation?.data}
/> />
</> </>
) : ( ) : (

View File

@ -52,6 +52,11 @@ export default function InspectorOperations({
.max(260, { .max(260, {
message: "Bio must not be longer than 30 characters.", message: "Bio must not be longer than 30 characters.",
}), }),
...(role == "Inspector" && {
type: z.enum(["private", "public"], {
required_error: "لطفا وضعیت عملیات را انتخاب نمایید.",
}),
}),
operation: z.string({ operation: z.string({
required_error: "Please select an email to display.", required_error: "Please select an email to display.",
}), }),
@ -95,6 +100,9 @@ export default function InspectorOperations({
formData.append("text", data.text); formData.append("text", data.text);
formData.append("trackingNumber", complaintData.trackingNumber); formData.append("trackingNumber", complaintData.trackingNumber);
formData.append("Operation", data.operation); formData.append("Operation", data.operation);
if (data.type) {
formData.append("IsPublic", data.type == "public" ? "true" : "false");
}
if (role == "Inspector") { if (role == "Inspector") {
formData.append("EncodedKey", password); formData.append("EncodedKey", password);
} else { } else {
@ -157,6 +165,38 @@ export default function InspectorOperations({
</FormItem> </FormItem>
)} )}
/> />
{role == "Inspector" && (
<FormField
control={form.control}
name="type"
render={({ field }) => (
<FormItem className="space-y-3">
<FormControl dir="rtl">
<RadioGroup
onValueChange={field.onChange}
// defaultValue={field?.value}
className="flex space-y-1 text-sm"
>
<FormItem className="flex items-center space-x-3 space-y-0">
<FormControl>
<RadioGroupItem value="private" className=" ml-2" />
</FormControl>
<FormLabel className="font-normal">خصوصی</FormLabel>
</FormItem>
<FormItem className="flex items-center space-x-3 space-y-0">
<FormControl>
<RadioGroupItem value="public" className=" ml-2" />
</FormControl>
<FormLabel className="font-normal">عمومی</FormLabel>
</FormItem>
</RadioGroup>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
)}
<div className=" flex justify-between mt-3 gap-2"> <div className=" flex justify-between mt-3 gap-2">
<FormField <FormField
control={form.control} control={form.control}
@ -173,7 +213,6 @@ export default function InspectorOperations({
<SelectTrigger <SelectTrigger
className=" bg-white h-10 !placeholder:text-xs text-xs" className=" bg-white h-10 !placeholder:text-xs text-xs"
dir="rtl" dir="rtl"
disabled={possibleOperations.length == 0}
> >
<SelectValue <SelectValue
className=" text-xs" className=" text-xs"

View File

@ -27,7 +27,6 @@ import { useRouter } from "next/navigation";
import { Oval, ThreeDots } from "react-loader-spinner"; import { Oval, ThreeDots } from "react-loader-spinner";
import useData from "@/store/useData"; import useData from "@/store/useData";
import useToken from "@/store/useToken"; import useToken from "@/store/useToken";
import { RefreshCcw } from "lucide-react";
const FormSchema = z.object({ const FormSchema = z.object({
username: z.string().min(1, { username: z.string().min(1, {
message: "لطفا نام کاربری را وارد نمایید.", message: "لطفا نام کاربری را وارد نمایید.",
@ -184,7 +183,7 @@ export default function Login() {
/> />
</div> </div>
) : ( ) : (
<div className=" flex justify-center text-center gap-2"> <div className=" flex justify-center text-center">
<Image <Image
alt="icon" alt="icon"
src={srcForImage as string} src={srcForImage as string}
@ -193,11 +192,6 @@ export default function Login() {
height={20} height={20}
quality={100} quality={100}
/> />
<RefreshCcw
className=" cursor-pointer"
onClick={() => refetch()}
color="#003778"
/>
</div> </div>
)} )}
</div> </div>

View File

@ -13,82 +13,25 @@ import { isAuthorized } from "@/lib/utils";
import useToken from "@/store/useToken"; import useToken from "@/store/useToken";
import { DropdownMenu } from "@radix-ui/react-dropdown-menu"; import { DropdownMenu } from "@radix-ui/react-dropdown-menu";
import ProfileDropDown from "./ProfileDropDown"; import ProfileDropDown from "./ProfileDropDown";
import { getCookie } from "cookies-next";
import Hamburger from "hamburger-react";
import { AnimatePresence, motion } from "framer-motion";
export default function Navbar() { export default function Navbar() {
const pathname = usePathname(); const pathname = usePathname();
const isAuth = useToken((state) => state.token); const isAuth = useToken((state) => state.token);
const [auth, setAuth] = useState<boolean>(); const [auth, setAuth] = useState<boolean>(isAuth);
const [isOpen, setOpen] = useState<boolean>(false);
const token = getCookie("Sootzani_Token");
useEffect(() => { useEffect(() => {
const token = getCookie("Sootzani_Token"); useToken.persist.rehydrate();
if (token) { setAuth(isAuth);
setAuth(true); }, [isAuth]);
} else {
setAuth(false);
}
}, [isAuth ,token]);
return ( return (
<div className={` left-0 right-0 top-0 z-20 fixed`}> <div
{/* <TopNav /> */} className={`max-md:hidden left-0 right-0 top-0 z-10 ${
<div className=" bg-white h-16 shadow-md flex items-center justify-between py-2 px-6"> pathname === "/" ? "absolute" : "sticky"
}`}
>
<TopNav />
<div className=" bg-white h-16 shadow-md flex items-center justify-between py-2 px-8">
<div className=" flex "> <div className=" flex ">
<div className=" md:hidden -mr-4"> <div className=" flex items-center ">
<Hamburger
toggled={isOpen}
size={20}
toggle={setOpen}
direction="right"
/>
<AnimatePresence>
{isOpen && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.2 }}
className="fixed z-[100] left-0 shadow-4xl right-0 top-[4rem] p-5 bg-white border-b-2 shadow-md"
>
<ul className="grid gap-2 ">
{menuItems.map((item, idx, array) => {
// const { Icon } = item;
const lastItem = array.length - 1;
return (
<motion.li
initial={{ scale: 0, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{
type: "spring",
stiffness: 260,
damping: 20,
delay: 0.1 + idx / 10,
}}
key={item.name}
className=" w-full p-[0.08rem] rounded-xl bg-gradient-to-tr from-neutral-800 via-white to-neutral-700"
>
<Link
onClick={() => setOpen((prev) => !prev)}
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
${lastItem === idx ? "bg-yellow" : "bg-blue"} `}
href={item.href}
>
<span className="flex gap-1 text-sm">
{item.name}
</span>
{/* <Icon className="text-xl" /> */}
</Link>
</motion.li>
);
})}
</ul>
</motion.div>
)}
</AnimatePresence>
</div>
<div className=" flex items-center max-md:mr-1 ">
<Image <Image
src="/img/logo.png" src="/img/logo.png"
quality={100} quality={100}
@ -98,10 +41,10 @@ export default function Navbar() {
/> />
<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> <h1 className="text-[23px] w-full">عیــون</h1>
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1> <h1 className="text-[9px]">سامانه افشار فساد شهرداری</h1>
</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">
{menuItems.map((item, index, array) => { {menuItems.map((item, index, array) => {
if (array.length - 1 !== index) { if (array.length - 1 !== index) {
return ( return (
@ -123,7 +66,7 @@ export default function Navbar() {
onClick={() => onClick={() =>
localStorage.setItem("Sootzani_Login_State", "true") localStorage.setItem("Sootzani_Login_State", "true")
} }
className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs" className=" bg-blue hover:bg-blue/90 rounded-lg"
> >
ورود به پنل کاربری ورود به پنل کاربری
</Button> </Button>

View File

@ -1,175 +0,0 @@
"use client";
import React, { useEffect } from "react";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { Button } from "@/components/ui/button";
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/use-toast";
import Link from "next/link";
import RequestStep2 from "./RequestStep2";
import { useMutation, useQuery } from "@tanstack/react-query";
import { editProfile, getProfile } from "@/utils/authenticateApi";
import { useRouter } from "next/navigation";
const FormSchema = z.object({
firstName: z.string().min(1, {
message: "لطفا نام خود را وارد نمایید.",
}),
lastName: z.string().min(1, {
message: "لطفا نام خانوادگی خود را وارد نمایید.",
}),
nationalId: z
.string()
.length(10, { message: "کد ملی معتبر نمی باشد." })
.transform((value) => {
const parsedNumber = Number(value);
if (Number.isNaN(parsedNumber)) {
throw new Error("کد ملی معتبر نمی باشد.");
} else if (
Number(parsedNumber) > 100000000 &&
Number(parsedNumber) < 999999999
) {
throw new Error("کد ملی معتبر نمی باشد.");
}
return parsedNumber;
}),
});
export default function Profile() {
const router = useRouter();
const {
data: profileData,
isLoading,
refetch,
} = useQuery({
queryKey: ["Profile"],
queryFn: () => getProfile(),
refetchOnWindowFocus: false,
});
const editProfileMutation = useMutation({
mutationKey: ["editProfile"],
mutationFn: editProfile,
onSuccess: (res) => {
router.push("/RequestStep2");
localStorage.setItem("authorized", "true");
},
onError: (error) => {},
});
const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema),
});
useEffect(() => {
if (profileData) {
form.setValue("firstName", profileData.firstName);
form.setValue("lastName", profileData.lastName);
form.setValue("nationalId", profileData.nationalId);
}
}, [profileData]);
console.log(form.getValues());
function onSubmit(data: z.infer<typeof FormSchema>) {
// toast({
// title: "You submitted the following values:",
// description: (
// <pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
// <code className="text-white">{JSON.stringify(data, null, 2)}</code>
// </pre>
// ),
// });
const strNationalId = String(data.nationalId);
const payload = { ...data, nationalId: strNationalId };
console.log(data);
editProfileMutation.mutate(payload);
}
return (
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-8 pt-12">
<div className="space-y-4 md:space-y-4 h-full flex flex-col justify-center">
{profileData && (
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="w-full flex flex-col mt-6 "
>
<div className="flex flex-row flex-wrap justify-between">
<FormField
control={form.control}
name="firstName"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium">
نام
</FormLabel>
<FormControl>
<Input
placeholder="نام خود را وارد نمایید"
{...field}
readOnly={true}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="lastName"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%] ">
<FormLabel className="text-[#7C838A] text-sm font-medium">
نام خانوادگی
</FormLabel>
<FormControl>
<Input
placeholder="نام خانوادگی خود را وارد نمایید"
{...field}
readOnly={true}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="nationalId"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
کد ملی
</FormLabel>
<FormControl>
<Input
type="text"
placeholder="کد ملی خود را وارد نمایید "
{...field}
readOnly={true}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
</form>
</Form>
)}
</div>
</div>
);
}

View File

@ -54,19 +54,17 @@ export default function ProfileDropDown() {
return ( return (
<DropdownMenu dir="rtl"> <DropdownMenu dir="rtl">
<DropdownMenuTrigger className=" max-sm:-mr-8 max-sm:text-xs" asChild> <DropdownMenuTrigger className=" max-sm:-mr-8 max-sm:text-xs" asChild>
<Button variant="outline"> <Button variant="outline">{profileData?.userName}</Button>
{profileData?.title ? profileData.title : profileData.userName}
</Button>
</DropdownMenuTrigger> </DropdownMenuTrigger>
<DropdownMenuContent className="w-56 sm:ml-10"> <DropdownMenuContent className="w-56 sm:ml-10">
<DropdownMenuGroup> <DropdownMenuGroup>
<DropdownMenuItem onClick={() => router.push("/Account/Profile")}> <DropdownMenuItem>
<User className="ml-2 h-4 w-4" /> <User className="ml-2 h-4 w-4" />
<span>مشاهده پروفایل</span> <span>مشاهده پروفایل</span>
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => router.push("/Account/Complaints")}> <DropdownMenuItem onClick={() => router.push("/Account/Complaints")}>
<CreditCard className="ml-2 h-4 w-4" /> <CreditCard className="ml-2 h-4 w-4" />
<span>درخواست های من</span> <span>درخواست های اخیر</span>
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuGroup> </DropdownMenuGroup>
<DropdownMenuSeparator /> <DropdownMenuSeparator />
@ -74,7 +72,7 @@ export default function ProfileDropDown() {
onClick={() => { onClick={() => {
saveToken(false); saveToken(false);
deleteCookie("Sootzani_Token"); deleteCookie("Sootzani_Token");
router.push("/"); router.replace("/");
}} }}
> >
<LogOut className="ml-2 h-4 w-4" /> <LogOut className="ml-2 h-4 w-4" />

View File

@ -1,17 +1,15 @@
"use client"; "use client";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useState } from "react";
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";
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";
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 router = useRouter(); const router = useRouter();
useEffect(() => { useEffect(() => {
@ -21,15 +19,6 @@ export default function Result() {
setPassword(pw); setPassword(pw);
}, []); }, []);
const handlePrint = useReactToPrint({
content: () => componentRef.current,
// onBeforePrint() {
// setPrintStyle(!printStyle);
// },
// onAfterPrint() {
// setPrintStyle(!printStyle)
// },
});
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 className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 pt-12 ">
<div className="h-full flex flex-col justify-center"> <div className="h-full flex flex-col justify-center">
@ -51,23 +40,12 @@ export default function Result() {
در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه
پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید. پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید.
</p> </p>
{/* <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 <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> </div>
); );
} }

View File

@ -105,6 +105,10 @@ export default function RequestStep1() {
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white"> <p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید. لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
</p> </p>
{/* <p className="text-sm md:text-base font-bold leading-tight tracking-tight text-red-500 dark:text-white">
در صورت عدم تمایل به ثبت مشخصات شخصی می توانید به صفحه ی بعد مراجعه
کنید.
</p> */}
{profileData && ( {profileData && (
<Form {...form}> <Form {...form}>
<form <form

View File

@ -27,6 +27,7 @@ import {
} from "@/components/ui/select"; } from "@/components/ui/select";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/use-toast";
import { Textarea } from "@/components/ui/textarea"; import { Textarea } from "@/components/ui/textarea";
import { Label } from "@/components/ui/label"; import { Label } from "@/components/ui/label";
import Link from "next/link"; import Link from "next/link";
@ -43,9 +44,6 @@ import { useRouter } from "next/navigation";
import { getCaptcha, getCategory, getOrganizations } from "@/utils/commonApi"; import { getCaptcha, getCategory, getOrganizations } from "@/utils/commonApi";
import { ThreeDots } from "react-loader-spinner"; import { ThreeDots } from "react-loader-spinner";
import useToken from "@/store/useToken"; import useToken from "@/store/useToken";
import { toast } from "sonner";
import { RefreshCcw } from "lucide-react";
import { getCookie } from "cookies-next";
const MAX_IMAGE_SIZE = 5242880; // 5 MB const MAX_IMAGE_SIZE = 5242880; // 5 MB
const ALLOWED_IMAGE_TYPES = [ const ALLOWED_IMAGE_TYPES = [
@ -91,7 +89,7 @@ const FormSchema = z.object({
required_error: "لطفا دسته بندی را انتخاب نمایید.", required_error: "لطفا دسته بندی را انتخاب نمایید.",
}), }),
captchaValue: z.string().min(1, { captchaValue: z.string().min(1, {
message: "لطفا کد امنیتی را وارد نمایید.", message: "لطفا کد امنیتی را وارد نمایید.ئ",
}), }),
}); });
@ -118,11 +116,7 @@ export default function RequestStep2() {
localStorage.setItem("password", res.password); localStorage.setItem("password", res.password);
router.push("/RequestResult"); router.push("/RequestResult");
}, },
onError: (error) => { onError: (error) => {},
toast("مشکلی در ارسال درخواست به وجود آمد.", {
className: "!bg-red-500 !text-white",
});
},
}); });
const authorizedComplaintSubmitMutation = useMutation({ const authorizedComplaintSubmitMutation = useMutation({
@ -131,15 +125,10 @@ export default function RequestStep2() {
onSuccess: (res) => { onSuccess: (res) => {
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.removeItem("authorized"); localStorage.removeItem("authorized");
router.push("/RequestResult"); router.push("/RequestResult");
}, },
onError: (error) => { onError: (error) => {},
toast("مشکلی در ارسال درخواست به وجود آمد.", {
className: "!bg-red-500 !text-white",
});
},
}); });
// All Category // All Category
@ -193,9 +182,7 @@ export default function RequestStep2() {
formData.append("Captcha.Key", CaptchaData?.headers["captcha-key"]); formData.append("Captcha.Key", CaptchaData?.headers["captcha-key"]);
formData.append("Complaining", data.person ? data.person : ""); formData.append("Complaining", data.person ? data.person : "");
formData.append("OrganizationId", data.OrganizationId); formData.append("OrganizationId", data.OrganizationId);
const unknown = localStorage.getItem("unknown"); if (isAuth) {
const isAuth = getCookie("Sootzani_Token");
if (isAuth && !unknown) {
authorizedComplaintSubmitMutation.mutate({ authorizedComplaintSubmitMutation.mutate({
Data: formData, Data: formData,
}); });
@ -204,7 +191,6 @@ export default function RequestStep2() {
Data: formData, Data: formData,
}); });
} }
refetch(); refetch();
resetField("Title"); resetField("Title");
resetField("Text"); resetField("Text");
@ -432,7 +418,7 @@ export default function RequestStep2() {
control={form.control} control={form.control}
name="captchaValue" name="captchaValue"
render={({ field }) => ( render={({ field }) => (
<FormItem className="w-1/2 "> <FormItem className="w-full ">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7"> <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
*کد امنیتی *کد امنیتی
</FormLabel> </FormLabel>
@ -448,7 +434,7 @@ export default function RequestStep2() {
/> />
{isLoading ? ( {isLoading ? (
<div className=" w-1/2 max-w[11rem] flex justify-center text-center"> <div className=" w-2/3 max-w[11rem] flex justify-center text-center">
<ThreeDots <ThreeDots
visible={true} visible={true}
height="50" height="50"
@ -461,7 +447,7 @@ export default function RequestStep2() {
/> />
</div> </div>
) : ( ) : (
<div className=" w-1/2 max-w[11rem] flex justify-center items-center text-center gap-2"> <div className=" w-2/3 max-w[11rem] flex justify-end text-center">
<Image <Image
alt="icon" alt="icon"
src={srcForImage as string} src={srcForImage as string}
@ -470,11 +456,6 @@ export default function RequestStep2() {
height={20} height={20}
quality={100} quality={100}
/> />
<RefreshCcw
className=" cursor-pointer"
onClick={() => refetch()}
color="#003778"
/>
</div> </div>
)} )}
</div> </div>

View File

@ -59,7 +59,7 @@ export default function TabController() {
const finishedComplaints = data?.filter((item: any) => item.status == 4); const finishedComplaints = data?.filter((item: any) => item.status == 4);
console.log(newComplaints); console.log(newComplaints);
return ( return (
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 pt-9"> <div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-8 pt-9">
<Dialog> <Dialog>
{/* <DialogTrigger className=" appearance-none" asChild> {/* <DialogTrigger className=" appearance-none" asChild>
<Button <Button

View File

@ -90,7 +90,6 @@ export default function TableController({
<TableRow> <TableRow>
<TableHead>ردیف</TableHead> <TableHead>ردیف</TableHead>
<TableHead>تاریخ</TableHead> <TableHead>تاریخ</TableHead>
<TableHead>کد پیگیری</TableHead>
<TableHead>موضوع</TableHead> <TableHead>موضوع</TableHead>
<TableHead>دستگاه مربوطه</TableHead> <TableHead>دستگاه مربوطه</TableHead>
</TableRow> </TableRow>
@ -119,11 +118,10 @@ export default function TableController({
<TableCell className="w-2/12"> <TableCell className="w-2/12">
{convertDate(item.registeredAt)} {convertDate(item.registeredAt)}
</TableCell> </TableCell>
<TableCell className="w-2/12">{item.trackingNumber}</TableCell>
<TableCell className="w-2/12"> <TableCell className="w-2/12">
{item?.title ? item.title : "-"} {item?.title ? item.title : "-"}
</TableCell> </TableCell>
<TableCell className="w-5/12"> <TableCell className="w-7/12">
{item?.complaintOrganization {item?.complaintOrganization
? item?.complaintOrganization.title ? item?.complaintOrganization.title
: "-"} : "-"}

View File

@ -12,7 +12,6 @@ import { JwtPayload, jwtDecode } from "jwt-decode";
import { setCookie } from "cookies-next"; import { setCookie } from "cookies-next";
import { Oval } from "react-loader-spinner"; import { Oval } from "react-loader-spinner";
import useToken from "@/store/useToken"; import useToken from "@/store/useToken";
import { toast } from "sonner";
export default function Verify() { export default function Verify() {
const [otp, setOtp] = useState(""); const [otp, setOtp] = useState("");
@ -60,11 +59,7 @@ export default function Verify() {
router.push("/RequestStep1"); router.push("/RequestStep1");
} }
}, },
onError: (err: any) => { onError: (err: any) => {},
toast("کد تایید شما صحیح نمیباشد.", {
className: "!bg-red-500 !text-white",
});
},
}); });
const handelVerify = () => { const handelVerify = () => {
@ -78,16 +73,9 @@ export default function Verify() {
useData.persist.rehydrate(); useData.persist.rehydrate();
}, []); }, []);
useEffect(() => {
if (otp.length == 6) {
const payload = { ...userData, verificationCode: otp };
console.log(userData);
CitizenVerifyMutation.mutate(payload);
}
}, [otp]);
return ( return (
<div <div
className="w-full mt-28 sm:w-2/3 md:w-2/4 xl:w-1/3 bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040] className="w-full my-12 sm:w-2/3 md:w-2/4 xl:w-1/3 bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040]
h-full max-md:p-8 pt-12" h-full max-md:p-8 pt-12"
> >
<div className="space-y-3 md:space-y-4 flex flex-col md:py-12 md:px-20 h-full justify-center"> <div className="space-y-3 md:space-y-4 flex flex-col md:py-12 md:px-20 h-full justify-center">
@ -102,7 +90,11 @@ export default function Verify() {
numInputs={6} numInputs={6}
renderSeparator={<span>{space}</span>} renderSeparator={<span>{space}</span>}
renderInput={(props, idx) => ( renderInput={(props, idx) => (
<input autoFocus={idx == 0} pattern="[0-9]*" {...props} /> <input
autoFocus={idx == 0}
pattern="[0-9]*"
{...props}
/>
)} )}
containerStyle=" flex justify-center" containerStyle=" flex justify-center"
inputStyle=" !w-10 rounded-md h-10 bg-[#F5F5F5] border border-blue/30 text-black" inputStyle=" !w-10 rounded-md h-10 bg-[#F5F5F5] border border-blue/30 text-black"
@ -113,7 +105,7 @@ export default function Verify() {
کد دریافت شده توسط پیامک را وارد نمایید. کد دریافت شده توسط پیامک را وارد نمایید.
</span> </span>
</label> </label>
{/* <div className="flex justify-end gap-2 w-full mt-14"> <div className="flex justify-end gap-2 w-full mt-14">
<Button <Button
disabled={CitizenVerifyMutation.isPending} disabled={CitizenVerifyMutation.isPending}
onClick={handelVerify} onClick={handelVerify}
@ -131,12 +123,13 @@ export default function Verify() {
wrapperStyle={{}} wrapperStyle={{}}
wrapperClass="" wrapperClass=""
/> />
{/* <p>در حال انجام ...</p> */}
</div> </div>
) : ( ) : (
"تایید" "تایید"
)} )}
</Button> </Button>
</div> */} </div>
{/* <Form {...form}> {/* <Form {...form}>
<form <form
onSubmit={form.handleSubmit(onSubmit)} onSubmit={form.handleSubmit(onSubmit)}

View File

@ -36,10 +36,11 @@ const AlertDialogContent = React.forwardRef<
<AlertDialogPrimitive.Content <AlertDialogPrimitive.Content
ref={ref} ref={ref}
className={cn( className={cn(
`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border duration-200 `fixed left-[50%] top-[50%] z-50 grid w-full max-w-4xl translate-x-[-50%] translate-y-[-50%] gap-4 border duration-200
data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2
data-[state=open]:slide-in-from-top-[48%] rounded-lg content-between p-0 bg-opacity-30 bg-[#FFFFF999] filter data-[state=open]:slide-in-from-top-[48%] rounded-lg
h-full max-h-[32em] content-between p-0 bg-opacity-30 bg-[#FFFFF999] filter
shadow-[0px_0px_30px_0px_rgba(0,0,0,0.3)] shadow-[0px_0px_30px_0px_rgba(0,0,0,0.3)]
`, `,
className className
@ -47,7 +48,7 @@ const AlertDialogContent = React.forwardRef<
{...props} {...props}
/> />
</AlertDialogPortal> </AlertDialogPortal>
)); ))
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
const AlertDialogHeader = ({ const AlertDialogHeader = ({

View File

@ -1,31 +0,0 @@
"use client"
import * as React from "react"
import * as SeparatorPrimitive from "@radix-ui/react-separator"
import { cn } from "@/lib/utils"
const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
>(
(
{ className, orientation = "horizontal", decorative = true, ...props },
ref
) => (
<SeparatorPrimitive.Root
ref={ref}
decorative={decorative}
orientation={orientation}
className={cn(
"shrink-0 bg-border",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
className
)}
{...props}
/>
)
)
Separator.displayName = SeparatorPrimitive.Root.displayName
export { Separator }

View File

@ -8,7 +8,7 @@ export const menuItems = [
{ id: 2, name: "اخبار", href: "/" }, { id: 2, name: "اخبار", href: "/" },
{ id: 3, name: "درباره ما", href: "/" }, { id: 3, name: "درباره ما", href: "/" },
{ id: 4, name: "تماس با ما", href: "/CallUs" }, { id: 4, name: "تماس با ما", href: "/CallUs" },
{ id: 5, name: "پیگیری", href: "/FollowUp" }, { id: 5, name: "پیگیری", href: "/" },
{ id: 6, name: "ورود به پنل کاربری", href: "/Login" }, { id: 6, name: "ورود به پنل کاربری", href: "/Login" },
]; ];
@ -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,20 +29,20 @@ export const boxItems = [
}, },
{ {
id: 2, id: 2,
name: "ثبت شکایت",
icon: "/img/box1.svg",
icon2: "/img/box1-hover.svg",
description: "ارسال درخواست نارضایتی از پرسنل",
link: "/CitizenLogin",
},
{
id: 3,
name: "پیگیری شکایت", name: "پیگیری شکایت",
icon: "/img/box2.svg", icon: "/img/box2.svg",
icon2: "/img/box2-hover.svg", icon2: "/img/box2-hover.svg",
description: "پیگیری درخواست ارسال شده", description: "پیگیری درخواست ارسال شده",
link: "/FollowUp", link: "/FollowUp",
}, },
{
id: 3,
name: "ثبت شکایت(شناس)",
icon: "/img/box1.svg",
icon2: "/img/box1-hover.svg",
description: "ارسال درخواست نارضایتی از پرسنل",
link: "/CitizenLogin",
},
// { // {
// id: 3, // id: 3,
// name: "مشاهده آمار", // name: "مشاهده آمار",
@ -58,21 +58,21 @@ export const newsItems = [
id: 1, id: 1,
title: "شروع به کار سامانه عیون", title: "شروع به کار سامانه عیون",
content: content:
"این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", "این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...",
date: "24 آذر ماه 1402", date: "24 آذر ماه 1402",
}, },
{ {
id: 2, id: 2,
title: "شروع به کار سامانه عیون", title: "شروع به کار سامانه عیون",
content: content:
"این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", "این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...",
date: "24 آذر ماه 1402", date: "24 آذر ماه 1402",
}, },
{ {
id: 3, id: 3,
title: "شروع به کار سامانه عیون ", title: "شروع به کار سامانه عیون ",
content: content:
"این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", "این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...",
date: "24 آذر ماه 1402", date: "24 آذر ماه 1402",
}, },
]; ];
@ -236,6 +236,7 @@ export const Operations = [
{ value: 7, name: "شروع مجدد درخواست" }, { value: 7, name: "شروع مجدد درخواست" },
]; ];
export const errorMessages = { export const errorMessages = {
500: "خطایی رخ داد. لطفا از اتصال اینترنت خود اطمینان حاصل نمایید.", 500: "خطایی رخ داد. لطفا از اتصال اینترنت خود اطمینان حاصل نمایید.",
400: "مشکلی در ارسال درخواست به وجود آمد.", 400: "مشکلی در ارسال درخواست به وجود آمد.",

View File

@ -1,9 +1,4 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = { output: "standalone" };
output: "standalone",
images: {
domains: ["sootzaniapi.shetabdahi.ir"],
},
};
module.exports = nextConfig; module.exports = nextConfig;

559
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "sootzani", "name": "sootzani",
"version": "0.1.5", "version": "0.1.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "sootzani", "name": "sootzani",
"version": "0.1.5", "version": "0.1.0",
"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",
@ -16,7 +16,6 @@
"@radix-ui/react-label": "^2.0.2", "@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-radio-group": "^1.1.3", "@radix-ui/react-radio-group": "^1.1.3",
"@radix-ui/react-select": "^2.0.0", "@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-toast": "^1.1.5",
@ -53,7 +52,6 @@
"react-spinners": "^0.13.8", "react-spinners": "^0.13.8",
"react-to-print": "^2.14.15", "react-to-print": "^2.14.15",
"react-use": "^17.4.2", "react-use": "^17.4.2",
"sharp": "^0.33.1",
"sonner": "^1.3.1", "sonner": "^1.3.1",
"swiper": "^11.0.5", "swiper": "^11.0.5",
"tailwind-merge": "^2.1.0", "tailwind-merge": "^2.1.0",
@ -106,15 +104,6 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@emnapi/runtime": {
"version": "0.44.0",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.44.0.tgz",
"integrity": "sha512-ZX/etZEZw8DR7zAB1eVQT40lNo0jeqpb6dCgOvctB6FIQ5PoXfMuNY8+ayQfu8tNQbAB8gQWSSJupR8NxeiZXw==",
"optional": true,
"dependencies": {
"tslib": "^2.4.0"
}
},
"node_modules/@emotion/is-prop-valid": { "node_modules/@emotion/is-prop-valid": {
"version": "0.8.8", "version": "0.8.8",
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
@ -291,437 +280,6 @@
"integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
"dev": true "dev": true
}, },
"node_modules/@img/sharp-darwin-arm64": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.1.tgz",
"integrity": "sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"glibc": ">=2.26",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-darwin-arm64": "1.0.0"
}
},
"node_modules/@img/sharp-darwin-x64": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.1.tgz",
"integrity": "sha512-YrnuB3bXuWdG+hJlXtq7C73lF8ampkhU3tMxg5Hh+E7ikxbUVOU9nlNtVTloDXz6pRHt2y2oKJq7DY/yt+UXYw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"glibc": ">=2.26",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-darwin-x64": "1.0.0"
}
},
"node_modules/@img/sharp-libvips-darwin-arm64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.0.tgz",
"integrity": "sha512-VzYd6OwnUR81sInf3alj1wiokY50DjsHz5bvfnsFpxs5tqQxESoHtJO6xyksDs3RIkyhMWq2FufXo6GNSU9BMw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"macos": ">=11",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-darwin-x64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.0.tgz",
"integrity": "sha512-dD9OznTlHD6aovRswaPNEy8dKtSAmNo4++tO7uuR4o5VxbVAOoEQ1uSmN4iFAdQneTHws1lkTZeiXPrcCkh6IA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"macos": ">=10.13",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-arm": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.0.tgz",
"integrity": "sha512-VwgD2eEikDJUk09Mn9Dzi1OW2OJFRQK+XlBTkUNmAWPrtj8Ly0yq05DFgu1VCMx2/DqCGQVi5A1dM9hTmxf3uw==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.28",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-arm64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.0.tgz",
"integrity": "sha512-xTYThiqEZEZc0PRU90yVtM3KE7lw1bKdnDQ9kCTHWbqWyHOe4NpPOtMGy27YnN51q0J5dqRrvicfPbALIOeAZA==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.26",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-s390x": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.0.tgz",
"integrity": "sha512-o9E46WWBC6JsBlwU4QyU9578G77HBDT1NInd+aERfxeOPbk0qBZHgoDsQmA2v9TbqJRWzoBPx1aLOhprBMgPjw==",
"cpu": [
"s390x"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.28",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-x64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.0.tgz",
"integrity": "sha512-naldaJy4hSVhWBgEjfdBY85CAa4UO+W1nx6a1sWStHZ7EUfNiuBTTN2KUYT5dH1+p/xij1t2QSXfCiFJoC5S/Q==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.26",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linuxmusl-arm64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.0.tgz",
"integrity": "sha512-OdorplCyvmSAPsoJLldtLh3nLxRrkAAAOHsGWGDYfN0kh730gifK+UZb3dWORRa6EusNqCTjfXV4GxvgJ/nPDQ==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"musl": ">=1.2.2",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.0.tgz",
"integrity": "sha512-FW8iK6rJrg+X2jKD0Ajhjv6y74lToIBEvkZhl42nZt563FfxkCYacrXZtd+q/sRQDypQLzY5WdLkVTbJoPyqNg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"musl": ">=1.2.2",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-linux-arm": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.1.tgz",
"integrity": "sha512-Ii4X1vnzzI4j0+cucsrYA5ctrzU9ciXERfJR633S2r39CiD8npqH2GMj63uFZRCFt3E687IenAdbwIpQOJ5BNA==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.28",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-arm": "1.0.0"
}
},
"node_modules/@img/sharp-linux-arm64": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.1.tgz",
"integrity": "sha512-59B5GRO2d5N3tIfeGHAbJps7cLpuWEQv/8ySd9109ohQ3kzyCACENkFVAnGPX00HwPTQcaBNF7HQYEfZyZUFfw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.26",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-arm64": "1.0.0"
}
},
"node_modules/@img/sharp-linux-s390x": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.1.tgz",
"integrity": "sha512-tRGrb2pHnFUXpOAj84orYNxHADBDIr0J7rrjwQrTNMQMWA4zy3StKmMvwsI7u3dEZcgwuMMooIIGWEWOjnmG8A==",
"cpu": [
"s390x"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.28",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-s390x": "1.0.0"
}
},
"node_modules/@img/sharp-linux-x64": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.1.tgz",
"integrity": "sha512-4y8osC0cAc1TRpy02yn5omBeloZZwS62fPZ0WUAYQiLhSFSpWJfY/gMrzKzLcHB9ulUV6ExFiu2elMaixKDbeg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"glibc": ">=2.26",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-x64": "1.0.0"
}
},
"node_modules/@img/sharp-linuxmusl-arm64": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.1.tgz",
"integrity": "sha512-D3lV6clkqIKUizNS8K6pkuCKNGmWoKlBGh5p0sLO2jQERzbakhu4bVX1Gz+RS4vTZBprKlWaf+/Rdp3ni2jLfA==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"musl": ">=1.2.2",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-arm64": "1.0.0"
}
},
"node_modules/@img/sharp-linuxmusl-x64": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.1.tgz",
"integrity": "sha512-LOGKNu5w8uu1evVqUAUKTix2sQu1XDRIYbsi5Q0c/SrXhvJ4QyOx+GaajxmOg5PZSsSnCYPSmhjHHsRBx06/wQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"musl": ">=1.2.2",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-x64": "1.0.0"
}
},
"node_modules/@img/sharp-wasm32": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.1.tgz",
"integrity": "sha512-vWI/sA+0p+92DLkpAMb5T6I8dg4z2vzCUnp8yvxHlwBpzN8CIcO3xlSXrLltSvK6iMsVMNswAv+ub77rsf25lA==",
"cpu": [
"wasm32"
],
"optional": true,
"dependencies": {
"@emnapi/runtime": "^0.44.0"
},
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-win32-ia32": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.1.tgz",
"integrity": "sha512-/xhYkylsKL05R+NXGJc9xr2Tuw6WIVl2lubFJaFYfW4/MQ4J+dgjIo/T4qjNRizrqs/szF/lC9a5+updmY9jaQ==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-win32-x64": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.1.tgz",
"integrity": "sha512-XaM69X0n6kTEsp9tVYYLhXdg7Qj32vYJlAKRutxUsm1UlgQNx6BOhHwZPwukCGXBU2+tH87ip2eV1I/E8MQnZg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": ">=9.6.5",
"pnpm": ">=7.1.0",
"yarn": ">=3.2.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@jridgewell/gen-mapping": { "node_modules/@jridgewell/gen-mapping": {
"version": "0.3.3", "version": "0.3.3",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
@ -1526,29 +1084,6 @@
} }
} }
}, },
"node_modules/@radix-ui/react-separator": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.0.3.tgz",
"integrity": "sha512-itYmTy/kokS21aiV5+Z56MZB54KrhPgn6eHDKkFeOLR34HMN2s8PaN47qZZAGnvupcjxHaFZnW4pQEh0BvvVuw==",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/react-primitive": "1.0.3"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
}
},
"node_modules/@radix-ui/react-slot": { "node_modules/@radix-ui/react-slot": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
@ -2618,22 +2153,11 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/color": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
"dependencies": {
"color-convert": "^2.0.1",
"color-string": "^1.9.0"
},
"engines": {
"node": ">=12.5.0"
}
},
"node_modules/color-convert": { "node_modules/color-convert": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"dependencies": { "dependencies": {
"color-name": "~1.1.4" "color-name": "~1.1.4"
}, },
@ -2644,16 +2168,8 @@
"node_modules/color-name": { "node_modules/color-name": {
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
}, "dev": true
"node_modules/color-string": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
"dependencies": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
}
}, },
"node_modules/combined-stream": { "node_modules/combined-stream": {
"version": "1.0.8", "version": "1.0.8",
@ -2865,14 +2381,6 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/detect-libc": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz",
"integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==",
"engines": {
"node": ">=8"
}
},
"node_modules/detect-node-es": { "node_modules/detect-node-es": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz",
@ -4100,11 +3608,6 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/is-arrayish": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
},
"node_modules/is-async-function": { "node_modules/is-async-function": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz",
@ -4633,6 +4136,7 @@
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"dependencies": { "dependencies": {
"yallist": "^4.0.0" "yallist": "^4.0.0"
}, },
@ -8489,6 +7993,7 @@
"version": "7.5.4", "version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"dependencies": { "dependencies": {
"lru-cache": "^6.0.0" "lru-cache": "^6.0.0"
}, },
@ -8546,45 +8051,6 @@
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
}, },
"node_modules/sharp": {
"version": "0.33.1",
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.1.tgz",
"integrity": "sha512-iAYUnOdTqqZDb3QjMneBKINTllCJDZ3em6WaWy7NPECM4aHncvqHRm0v0bN9nqJxMiwamv5KIdauJ6lUzKDpTQ==",
"hasInstallScript": true,
"dependencies": {
"color": "^4.2.3",
"detect-libc": "^2.0.2",
"semver": "^7.5.4"
},
"engines": {
"libvips": ">=8.15.0",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-darwin-arm64": "0.33.1",
"@img/sharp-darwin-x64": "0.33.1",
"@img/sharp-libvips-darwin-arm64": "1.0.0",
"@img/sharp-libvips-darwin-x64": "1.0.0",
"@img/sharp-libvips-linux-arm": "1.0.0",
"@img/sharp-libvips-linux-arm64": "1.0.0",
"@img/sharp-libvips-linux-s390x": "1.0.0",
"@img/sharp-libvips-linux-x64": "1.0.0",
"@img/sharp-libvips-linuxmusl-arm64": "1.0.0",
"@img/sharp-libvips-linuxmusl-x64": "1.0.0",
"@img/sharp-linux-arm": "0.33.1",
"@img/sharp-linux-arm64": "0.33.1",
"@img/sharp-linux-s390x": "0.33.1",
"@img/sharp-linux-x64": "0.33.1",
"@img/sharp-linuxmusl-arm64": "0.33.1",
"@img/sharp-linuxmusl-x64": "0.33.1",
"@img/sharp-wasm32": "0.33.1",
"@img/sharp-win32-ia32": "0.33.1",
"@img/sharp-win32-x64": "0.33.1"
}
},
"node_modules/shebang-command": { "node_modules/shebang-command": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@ -8620,14 +8086,6 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/simple-swizzle": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
"dependencies": {
"is-arrayish": "^0.3.1"
}
},
"node_modules/slash": { "node_modules/slash": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@ -9441,7 +8899,8 @@
"node_modules/yallist": { "node_modules/yallist": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}, },
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.3.4", "version": "2.3.4",

View File

@ -1,6 +1,6 @@
{ {
"name": "sootzani", "name": "sootzani",
"version": "0.1.5", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
@ -17,7 +17,6 @@
"@radix-ui/react-label": "^2.0.2", "@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-radio-group": "^1.1.3", "@radix-ui/react-radio-group": "^1.1.3",
"@radix-ui/react-select": "^2.0.0", "@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-toast": "^1.1.5",
@ -54,7 +53,6 @@
"react-spinners": "^0.13.8", "react-spinners": "^0.13.8",
"react-to-print": "^2.14.15", "react-to-print": "^2.14.15",
"react-use": "^17.4.2", "react-use": "^17.4.2",
"sharp": "^0.33.1",
"sonner": "^1.3.1", "sonner": "^1.3.1",
"swiper": "^11.0.5", "swiper": "^11.0.5",
"tailwind-merge": "^2.1.0", "tailwind-merge": "^2.1.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -10,7 +10,6 @@ axios.interceptors.request.use(function (config) {
}); });
// Post Complaints // Post Complaints
export async function postComplaintSubmit({ Data }: { Data: FormData }) { export async function postComplaintSubmit({ Data }: { Data: FormData }) {
delete axios.defaults.headers.common["Authorization"];
const data = await axios.post(`api/Citizen`, Data); const data = await axios.post(`api/Citizen`, Data);
return data.data; return data.data;
} }
@ -32,9 +31,7 @@ export async function postComplaintTracking({
}: { }: {
Data: { trackingNumber: string; password: string }; Data: { trackingNumber: string; password: string };
}) { }) {
const data = await axios.post(`api/Citizen/Get`, Data, { const data = await axios.post(`api/Citizen/Get`, Data);
headers: { Authorization: "" },
});
return data.data; return data.data;
} }

View File

@ -18,9 +18,3 @@ export async function getCaptcha() {
console.log(data); console.log(data);
return data; return data;
} }
export async function getSliders() {
const data = await axios.get("api/Common/Sliders");
console.log(data);
return data.data;
}