Compare commits
No commits in common. "master" and "v0.1.22" have entirely different histories.
|
|
@ -2,10 +2,5 @@ import TabController from "@/components/TabController";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function page() {
|
export default function page() {
|
||||||
return (
|
return <TabController />;
|
||||||
<div className="flex justify-center items-center w-full">
|
|
||||||
<TabController />
|
|
||||||
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,5 @@ export default function page() {
|
||||||
if (token) {
|
if (token) {
|
||||||
redirect("/RequestStep2");
|
redirect("/RequestStep2");
|
||||||
}
|
}
|
||||||
return (
|
return <CitizenLogin />;
|
||||||
<div className="flex justify-center items-center w-full h-[calc(100vh-4rem)] ">
|
|
||||||
<CitizenLogin />
|
|
||||||
|
|
||||||
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,5 @@ export default function page() {
|
||||||
// if (!token) {
|
// if (!token) {
|
||||||
// redirect("/");
|
// redirect("/");
|
||||||
// }
|
// }
|
||||||
return (
|
return <CitizenLogin />;
|
||||||
<div className="flex justify-center items-center w-full h-[calc(100vh-4rem)] ">
|
|
||||||
<CitizenLogin />
|
|
||||||
|
|
||||||
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import RequestStep0 from "@/components/RequestStep0";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function page() {
|
|
||||||
return (
|
|
||||||
<div className="flex justify-center items-center w-full h-[calc(100vh-4rem)] ">
|
|
||||||
<RequestStep0 />
|
|
||||||
|
|
||||||
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -2,11 +2,5 @@ import Verify from "@/components/Verify";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function page() {
|
export default function page() {
|
||||||
return (
|
return <Verify />;
|
||||||
<div className="flex justify-center items-center w-full h-[calc(100vh-4rem)] ">
|
|
||||||
<Verify />
|
|
||||||
|
|
||||||
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { boxItems, newsItems } from "@/constants";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { cn, convertDate } from "@/lib/utils";
|
import { cn, convertDate } from "@/lib/utils";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import bgimg2 from "../../public/img/bg-slide2.jpg";
|
import bgimg from "../../public/img/bg-slide.jpg";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
|
|
||||||
// Import Swiper React components
|
// Import Swiper React components
|
||||||
|
|
@ -47,7 +47,7 @@ export default function Landing() {
|
||||||
queryFn: () => getSliders(),
|
queryFn: () => getSliders(),
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: NewsData,
|
data: NewsData,
|
||||||
isLoading: NewsIsLoading,
|
isLoading: NewsIsLoading,
|
||||||
|
|
@ -70,8 +70,7 @@ export default function Landing() {
|
||||||
delay: 2500,
|
delay: 2500,
|
||||||
disableOnInteraction: false,
|
disableOnInteraction: false,
|
||||||
}}
|
}}
|
||||||
// autoplay={ data?.length > 1 ? { delay: 2500, disableOnInteraction: false } : false }
|
loop={false}
|
||||||
loop={false}
|
|
||||||
pagination={{
|
pagination={{
|
||||||
clickable: true,
|
clickable: true,
|
||||||
}}
|
}}
|
||||||
|
|
@ -95,6 +94,19 @@ export default function Landing() {
|
||||||
</SwiperSlide>
|
</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>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
@ -103,7 +115,7 @@ export default function Landing() {
|
||||||
<SwiperSlide key={item.id}>
|
<SwiperSlide key={item.id}>
|
||||||
<Image
|
<Image
|
||||||
alt="bg"
|
alt="bg"
|
||||||
src={bgimg2}
|
src={bgimg}
|
||||||
// width={20}
|
// width={20}
|
||||||
// height={20}
|
// height={20}
|
||||||
quality={100}
|
quality={100}
|
||||||
|
|
@ -118,16 +130,14 @@ export default function Landing() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="3xl:w-[60%] w-[80%] mx-auto max-md:mt-5">
|
<div className="3xl:w-[60%] w-[80%] mx-auto max-md:mt-5">
|
||||||
{/* About Oyoon */}
|
<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 ">
|
||||||
<SubmitRequest />
|
|
||||||
<div className="flex justify-between gap-8 w-full mx-auto -mt-10 max-md:mt-2 max-sm:flex-wrap max-sm:justify-around ">
|
|
||||||
{boxItems.map((item, index) => {
|
{boxItems.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
className="group bg-white border shadow-md rounded-lg p-10 h-64 w-1/2 flex items-end justify-center z-10 relative
|
className="group bg-white shadow-md rounded-lg p-10 h-64 w-64 flex items-end justify-center z-10 relative
|
||||||
hover:bg-blue transition-all duration-700 ease-in-out text-center
|
hover:bg-blue transition-all duration-700 ease-in-out text-center
|
||||||
hover:flex-col-reverse hover:justify-evenly hover:items-center hover:cursor-pointer
|
hover:flex-col-reverse hover:justify-evenly hover:items-center hover:cursor-pointer
|
||||||
max-lg:w-1/2 max-lg:h-52 max-md:w-1/2 max-md:h-40
|
max-lg:w-52 max-lg:h-52 max-md:w-40 max-md:h-40
|
||||||
max-lg:p-8 max-md:p-5 max-sm:p-2 hover:max-lg:p-2
|
max-lg:p-8 max-md:p-5 max-sm:p-2 hover:max-lg:p-2
|
||||||
max-md:shadow-[0px_0px_8px_0px_#00000040]
|
max-md:shadow-[0px_0px_8px_0px_#00000040]
|
||||||
"
|
"
|
||||||
|
|
@ -255,6 +265,7 @@ export default function Landing() {
|
||||||
{/* Counter */}
|
{/* Counter */}
|
||||||
{/* <Counter /> */}
|
{/* <Counter /> */}
|
||||||
{/*SubmitRequest */}
|
{/*SubmitRequest */}
|
||||||
|
<SubmitRequest />
|
||||||
{/* Footer */}
|
{/* Footer */}
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -86,16 +86,12 @@
|
||||||
src: url(../fonts/iranyekanwebmediumfanum.ttf);
|
src: url(../fonts/iranyekanwebmediumfanum.ttf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "yekan-eng";
|
|
||||||
src: url(../fonts/IRANYekanRegular.ttf);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-container {
|
.leaflet-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.printPage {
|
.printPage {
|
||||||
background-color: antiquewhite;
|
background-color: antiquewhite;
|
||||||
color: black;
|
color: black;
|
||||||
|
|
@ -114,11 +110,10 @@
|
||||||
.swiper-button-next {
|
.swiper-button-next {
|
||||||
width: 2em !important;
|
width: 2em !important;
|
||||||
height: 2em !important;
|
height: 2em !important;
|
||||||
background-color: rgba(255, 255, 255, 0.886);
|
background-color: rgba(255, 255, 255, 0.886);
|
||||||
color: blue !important;
|
color: blue !important;
|
||||||
/*font-size: 10px;
|
/*font-size: 10px;
|
||||||
*/
|
*/border-radius: 8px;
|
||||||
border-radius: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Optional: Adjust the position of the navigation buttons */
|
/* Optional: Adjust the position of the navigation buttons */
|
||||||
|
|
@ -133,9 +128,8 @@
|
||||||
right: auto !important;
|
right: auto !important;
|
||||||
/* Set your desired right position */
|
/* Set your desired right position */
|
||||||
}
|
}
|
||||||
.swiper-button-prev::after,
|
.swiper-button-prev::after ,
|
||||||
.swiper-button-next::after {
|
.swiper-button-next::after {
|
||||||
font-size: 1em !important;
|
font-size: 1em !important;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ import { EnvScript, PublicEnvScript } from "next-runtime-env";
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "عیون",
|
title: "عیون",
|
||||||
description: "هر گونه فساد در شهرداری یزد را به راحتی گزارش دهید.",
|
description: "Generated by create next app",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
noStore();
|
noStore();
|
||||||
return (
|
return (
|
||||||
<html lang="fa" dir="rtl">
|
<html lang="fa" dir="rtl">
|
||||||
|
|
@ -29,7 +29,7 @@ export default function RootLayout({
|
||||||
<Navbar />
|
<Navbar />
|
||||||
{/* <NavbarSm /> */}
|
{/* <NavbarSm /> */}
|
||||||
|
|
||||||
<div className="flex justify-center mt-16 sm:mt-14">
|
<div className="flex justify-center mt-20 sm:mt-14">
|
||||||
<ProgressBarProviders>{children}</ProgressBarProviders>
|
<ProgressBarProviders>{children}</ProgressBarProviders>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,66 +7,36 @@ import {
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
DialogTrigger,
|
DialogTrigger,
|
||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
|
|
||||||
import {
|
|
||||||
AlertDialog,
|
|
||||||
AlertDialogAction,
|
|
||||||
AlertDialogCancel,
|
|
||||||
AlertDialogContent,
|
|
||||||
AlertDialogDescription,
|
|
||||||
AlertDialogFooter,
|
|
||||||
AlertDialogHeader,
|
|
||||||
AlertDialogTitle,
|
|
||||||
AlertDialogTrigger,
|
|
||||||
} from "@/components/ui/alert-dialog";
|
|
||||||
|
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
import { Button } from "./ui/button";
|
|
||||||
export default function AttachmentsDialog({
|
export default function AttachmentsDialog({
|
||||||
children,
|
children,
|
||||||
attachments,
|
attachments,
|
||||||
deleteFile,
|
deleteFile,
|
||||||
deleteAllAttachmentsFiles,
|
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
attachments: File[] | [];
|
attachments: File[] | [];
|
||||||
deleteFile: (file: any) => void;
|
deleteFile: (file: any) => void;
|
||||||
deleteAllAttachmentsFiles: () => void;
|
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Dialog>
|
<Dialog>
|
||||||
{children}
|
{children}
|
||||||
<DialogContent className=" max-h-[95vh] overflow-y-auto max-sm:p-0">
|
<DialogContent>
|
||||||
<AlertDialog>
|
<DialogHeader>
|
||||||
<DialogHeader>
|
<DialogTitle>پیوستها</DialogTitle>
|
||||||
<DialogTitle className=" mt-7">پیوستها</DialogTitle>
|
<DialogDescription>
|
||||||
<DialogDescription className="max-md:px-2 py-5 w-full">
|
{attachments.length == 0 ? (
|
||||||
{attachments.length != 0 && (
|
<div className=" text-center my-5">هیج پیوستی وجود ندارد.</div>
|
||||||
<AlertDialogTrigger>
|
) : (
|
||||||
<Button className=" mb-2 absolute right-3 top-1 p-1 bg-white hover:bg-white text-red-600 ">
|
<div className=" flex flex-col gap-2 mt-2">
|
||||||
حذف همه
|
{attachments?.map((item,index) => {
|
||||||
</Button>{" "}
|
|
||||||
</AlertDialogTrigger>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{attachments.length == 0 ? (
|
|
||||||
<div className=" text-center my-5">هیج پیوستی وجود ندارد.</div>
|
|
||||||
) : (
|
|
||||||
<div className=" flex flex-col gap-2 mt-2 h-full mx-2">
|
|
||||||
{attachments?.map((item, index) => {
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div key={index} className=" flex gap-2 w-full items-center">
|
||||||
key={index}
|
|
||||||
className=" flex gap-2 w-full items-center"
|
|
||||||
>
|
|
||||||
<div className=" p-2 bg-blue w-10 grid place-content-center rounded-lg text-white">
|
<div className=" p-2 bg-blue w-10 grid place-content-center rounded-lg text-white">
|
||||||
{index + 1}
|
{index + 1}
|
||||||
</div>
|
</div>
|
||||||
<div className="bg-gray-200 p-2 rounded-lg max-w-full justify-between flex flex-1">
|
<div className="bg-gray-200 p-2 rounded-lg max-w-full justify-between flex flex-1">
|
||||||
<div className="">
|
<div className="">
|
||||||
<p className=" truncate max-w-[16rem]">
|
<p className=" truncate">{item.name}</p>
|
||||||
{item.name}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<X
|
<X
|
||||||
|
|
@ -76,30 +46,11 @@ export default function AttachmentsDialog({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</DialogDescription>
|
||||||
<AlertDialogContent>
|
</DialogHeader>
|
||||||
<AlertDialogHeader>
|
|
||||||
<AlertDialogTitle>
|
|
||||||
آیا میخواهید همه ی فایلها را حذف کنید؟
|
|
||||||
</AlertDialogTitle>
|
|
||||||
<AlertDialogDescription></AlertDialogDescription>
|
|
||||||
</AlertDialogHeader>
|
|
||||||
<AlertDialogFooter className=" gap-2">
|
|
||||||
<AlertDialogCancel className=" flex-1">لغو</AlertDialogCancel>
|
|
||||||
<AlertDialogAction
|
|
||||||
className=" flex-1"
|
|
||||||
onClick={() => deleteAllAttachmentsFiles()}
|
|
||||||
>
|
|
||||||
تایید
|
|
||||||
</AlertDialogAction>
|
|
||||||
</AlertDialogFooter>
|
|
||||||
</AlertDialogContent>
|
|
||||||
</DialogDescription>
|
|
||||||
</DialogHeader>
|
|
||||||
</AlertDialog>
|
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,13 @@ import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
export default function CallUs(props: any) {
|
export default function CallUs(props: any) {
|
||||||
const { position, zoom } = props;
|
const { position, zoom } = props;
|
||||||
|
|
||||||
//query
|
|
||||||
const { data, isLoading, isError, refetch } = useQuery({
|
const { data, isLoading, isError, refetch } = useQuery({
|
||||||
queryKey: ["WebContents", "CallUs"],
|
queryKey: ["WebContents", "CallUs"],
|
||||||
queryFn: () => getSingleWebContents("CallUs"),
|
queryFn: () => getSingleWebContents("CallUs"),
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
|
console.log(data);
|
||||||
const fetchedContent = data?.content || "";
|
const fetchedContent = data?.content || "";
|
||||||
|
|
||||||
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 3xl:w-[60%] w-[80%] ">
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,8 @@ export default function CitizenLogin() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="w-full 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-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]
|
||||||
h-3/4 max-md:p-8 z-10 bg-[url('/img/yazd1.png')] bg-no-repeat bg-bottom bg-contain"
|
h-full max-md:p-8 pt-12 mb-10"
|
||||||
>
|
>
|
||||||
<div className="flex flex-col justify-center h-full space-y-3 md:space-y-4 md:py-10 md:px-12 lg:px-16">
|
<div className="flex flex-col justify-center h-full space-y-3 md:space-y-4 md:py-10 md:px-12 lg:px-16">
|
||||||
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />
|
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />
|
||||||
|
|
@ -139,10 +139,7 @@ export default function CitizenLogin() {
|
||||||
رمز عبور
|
رمز عبور
|
||||||
</FormLabel> */}
|
</FormLabel> */}
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input placeholder="کد امنیتی" {...field} />
|
||||||
placeholder="کد امنیتی"
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,7 @@ export default function ComplainsDetails({
|
||||||
const storeData = useData((state) => state.data);
|
const storeData = useData((state) => state.data);
|
||||||
let data;
|
let data;
|
||||||
|
|
||||||
const openFileInNewTab = (
|
const openFileInNewTab = (base64Data: any, fileType: any) => {
|
||||||
base64Data: any,
|
|
||||||
fileType: any,
|
|
||||||
fileName?: string
|
|
||||||
) => {
|
|
||||||
const blob = b64toBlob(base64Data, fileType);
|
const blob = b64toBlob(base64Data, fileType);
|
||||||
const blobUrl = URL.createObjectURL(blob);
|
const blobUrl = URL.createObjectURL(blob);
|
||||||
const newTab = window.open();
|
const newTab = window.open();
|
||||||
|
|
@ -70,7 +66,9 @@ export default function ComplainsDetails({
|
||||||
`<iframe width="100%" height="100%" src="${blobUrl}"></iframe>`
|
`<iframe width="100%" height="100%" src="${blobUrl}"></iframe>`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
downloadFile(base64Data, fileName, fileType);
|
newTab.document.write(
|
||||||
|
`<a href="${blobUrl}" target="_blank">Open in New Tab</a>`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
newTab.document.write("</body></html>");
|
newTab.document.write("</body></html>");
|
||||||
|
|
@ -162,10 +160,10 @@ export default function ComplainsDetails({
|
||||||
<AlertDialogHeader dir="rtl">
|
<AlertDialogHeader dir="rtl">
|
||||||
<AlertDialogTitle dir="rtl">رمز عبور</AlertDialogTitle>
|
<AlertDialogTitle dir="rtl">رمز عبور</AlertDialogTitle>
|
||||||
<AlertDialogDescription className=" w-full mx-auto">
|
<AlertDialogDescription className=" w-full mx-auto">
|
||||||
برای مشاهده گزارش رمز عبور خود را وارد نمایید.
|
برای مشاهده درخواست رمز عبور خود را وارد نمایید.
|
||||||
</AlertDialogDescription>
|
</AlertDialogDescription>
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
<div className="grid items-center gap-1.5 w-full px-6 mx-auto">
|
<div className="grid items-center gap-1.5 w-full px-10 mx-auto">
|
||||||
{/* <Label htmlFor="picture">Picture</Label> */}
|
{/* <Label htmlFor="picture">Picture</Label> */}
|
||||||
<Input
|
<Input
|
||||||
dir="ltr"
|
dir="ltr"
|
||||||
|
|
@ -207,15 +205,11 @@ export default function ComplainsDetails({
|
||||||
)} */}
|
)} */}
|
||||||
|
|
||||||
{/* Editt */}
|
{/* Editt */}
|
||||||
<div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col lg:h-[79vh] mb-10">
|
<div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col lg:h-[80vh] mb-10">
|
||||||
{/* 1 */}
|
{/* 1 */}
|
||||||
<div
|
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[80vh] max-lg:order-3">
|
||||||
className={`flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[79vh] max-lg:order-3 ${
|
|
||||||
possibleOperations.length == 0 && "hidden"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
{/* ***** */}
|
{/* ***** */}
|
||||||
<div className=" bg-[#E9E9E9] rounded-md p-4 px-6 flex flex-col lg:h-full">
|
<div className=" bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col lg:h-full">
|
||||||
<p className="text-[#464646] text-base font-bold mb-1">
|
<p className="text-[#464646] text-base font-bold mb-1">
|
||||||
انجام عملیات
|
انجام عملیات
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -231,16 +225,12 @@ export default function ComplainsDetails({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 2 */}
|
{/* 2 */}
|
||||||
<div
|
<div className="flex flex-col self-stretch w-full gap-2 rounded-lg lg:w-2/3 ">
|
||||||
className={`flex flex-col self-stretch w-full gap-2 rounded-lg lg:w-2/3 ${
|
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col md:flex-row gap-2 items-center justify-center">
|
||||||
possibleOperations.length == 0 && "lg:w-full"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<div className=" bg-[#E9E9E9] rounded-md py-4 px-6 flex flex-col md:flex-row gap-2 items-center justify-center">
|
|
||||||
{data?.user == null ? (
|
{data?.user == null ? (
|
||||||
<>
|
<>
|
||||||
<div className="relative flex flex-col w-full p-5 mt-2 border border-gray-400 rounded-md gap-y-1">
|
<div className="relative flex flex-col w-full p-5 mt-2 border border-gray-400 rounded-md gap-y-1">
|
||||||
<p className=" absolute -top-3 right-2 bg-[#E9E9E9] px-2 text-sm text-[#464646] font-bold">
|
<p className=" absolute -top-3 right-2 bg-[#E9E9E9] px-2 text-sm text-gray-500">
|
||||||
اطلاعات کلی
|
اطلاعات کلی
|
||||||
</p>
|
</p>
|
||||||
<p className="text-[#2e2a2a] text-sm font-medium">
|
<p className="text-[#2e2a2a] text-sm font-medium">
|
||||||
|
|
@ -250,7 +240,7 @@ export default function ComplainsDetails({
|
||||||
</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">
|
||||||
{data?.complaintOrganization
|
{data?.complaintOrganization
|
||||||
? data?.complaintOrganization.title
|
? data?.complaintOrganization.title
|
||||||
|
|
@ -258,7 +248,7 @@ export default function ComplainsDetails({
|
||||||
</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">
|
||||||
{data.complaining ? data.complaining : "-"}
|
{data.complaining ? data.complaining : "-"}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -280,7 +270,7 @@ export default function ComplainsDetails({
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div className="relative flex flex-col p-5 mt-2 border border-gray-400 rounded-md gap-y-1 md:w-1/2">
|
<div className="relative flex flex-col p-5 mt-2 border border-gray-400 rounded-md gap-y-1 md:w-1/2">
|
||||||
<p className=" absolute -top-3 right-2 bg-[#E9E9E9] px-2 text-sm text-[#464646] font-bold">
|
<p className=" absolute -top-3 right-2 bg-[#E9E9E9] px-2 text-sm text-gray-500">
|
||||||
اطلاعات کلی
|
اطلاعات کلی
|
||||||
</p>
|
</p>
|
||||||
<p className="text-[#2e2a2a] text-sm font-medium">
|
<p className="text-[#2e2a2a] text-sm font-medium">
|
||||||
|
|
@ -290,7 +280,7 @@ export default function ComplainsDetails({
|
||||||
</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">
|
||||||
{data?.complaintOrganization
|
{data?.complaintOrganization
|
||||||
? data?.complaintOrganization.title
|
? data?.complaintOrganization.title
|
||||||
|
|
@ -298,7 +288,7 @@ export default function ComplainsDetails({
|
||||||
</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">
|
||||||
{data.complaining ? data.complaining : "-"}
|
{data.complaining ? data.complaining : "-"}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -346,83 +336,64 @@ export default function ComplainsDetails({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="h-[calc(80vh-11.5em)] max-h-[calc(80vh-11.5em)] overflow-hidden">
|
<div className="h-[calc(80vh-11.5em)] max-h-[calc(80vh-11.5em)] overflow-hidden">
|
||||||
<div className="bg-[#E9E9E9] rounded-md py-4 px-6 flex flex-col h-full ">
|
<div className="bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col h-full ">
|
||||||
<p className="text-[#464646] text-base font-bold">
|
<p className="text-[#464646] text-base font-bold">
|
||||||
روند رسیدگی گزارش
|
روند شکایت
|
||||||
</p>
|
</p>
|
||||||
<div
|
<div
|
||||||
className="flex flex-col mt-4 gap-y-4 overflow-auto
|
className="flex flex-col mt-4 gap-y-4 overflow-auto
|
||||||
scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-gray-100 "
|
scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-gray-100 "
|
||||||
>
|
>
|
||||||
{data.contents?.map((item: any, index: any, array: any) => {
|
{data.contents?.map((item: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<div
|
||||||
<div className="flex max-sm:flex-col flex-row gap-2 m-1">
|
key={item.id}
|
||||||
<div className="flex">
|
className="p-4 bg-white rounded-lg shadow-md "
|
||||||
<span className=" flex items-center justify-center w-7 h-7 mt-1 mr-1 bg-blue-100 rounded-md -start-4 ring-2 ring-blue bg-blue2 text-white bg-blue">
|
>
|
||||||
{array.length - index}
|
<div className="flex items-center gap-4 justify-between">
|
||||||
|
<p className="">
|
||||||
|
<Badge>
|
||||||
|
{item.operationWithDescription.description} توسط{" "}
|
||||||
|
{item.sender == 0 ? "شهروند" : "بازرس"}
|
||||||
|
</Badge>
|
||||||
|
</p>
|
||||||
|
<p className="">
|
||||||
|
<span className="text-[#7C838A] text-sm">
|
||||||
|
{convertFullTime(item.dateTime)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</p>
|
||||||
<div
|
</div>
|
||||||
key={item.id}
|
<div className=" text-[#464646] mt-2">
|
||||||
className="p-4 bg-white rounded-lg shadow-md w-full relative"
|
<span className="text-[#7C838A] text-sm">
|
||||||
>
|
{item.text ? item.text : "-"}
|
||||||
<div className="flex items-center sm:gap-4 justify-between flex-col sm:flex-row gap-1">
|
</span>
|
||||||
<div>
|
</div>
|
||||||
{/* <span className="absolute -top-5 right-0 flex items-center justify-center w-7 h-7 mt-1 mr-1 bg-blue-100 rounded-md -start-4 shadow-md bg-blue2 text-blue bg-white">
|
{/* {item.media.length !== 0 && (
|
||||||
{array.length - index}
|
|
||||||
</span> */}
|
|
||||||
<p className="">
|
|
||||||
<Badge className="bg-blue">
|
|
||||||
{
|
|
||||||
item.operationWithDescription
|
|
||||||
.description
|
|
||||||
}{" "}
|
|
||||||
توسط{" "}
|
|
||||||
{item.sender == 0 ? "شهروند" : "بازرس"}
|
|
||||||
</Badge>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p className="">
|
|
||||||
<span className="text-blue text-sm">
|
|
||||||
{convertFullTime(item.dateTime)}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className=" text-[#464646] mt-2">
|
|
||||||
<span className="text-[#7C838A] text-sm flex flex-wrap whitespace-normal break-all mt-2">
|
|
||||||
{item.text ? item.text : "-"}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{/* {item.media.length !== 0 && (
|
|
||||||
<Separator className="mt-2 mb-1 " />
|
<Separator className="mt-2 mb-1 " />
|
||||||
)} */}
|
)} */}
|
||||||
<div className=" text-[#464646] mt-2">
|
<div className=" text-[#464646] mt-2">
|
||||||
<div className="flex flex-wrap items-center w-full gap-2 mt-2 text-xs max-md:flex-col">
|
<div className="flex flex-wrap items-center w-full gap-2 mt-2 text-xs max-md:flex-col">
|
||||||
{item?.media.map(
|
{item?.media.map((item: any, index: number) => {
|
||||||
(item: any, index: number) => {
|
return (
|
||||||
return (
|
<div
|
||||||
<div
|
key={index}
|
||||||
key={index}
|
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
|
||||||
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center cursor-pointer"
|
>
|
||||||
onClick={() =>
|
<a
|
||||||
openFileInNewTab(
|
onClick={() =>
|
||||||
item.data,
|
openFileInNewTab(
|
||||||
item.mimeType,
|
item.data,
|
||||||
item.title
|
item.mimeType
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
className="flex items-center gap-2 truncate cursor-pointer "
|
||||||
<div className="flex items-center truncate gap-2 cursor-pointer w-full max-w-full">
|
>
|
||||||
<div>
|
<File className="w-6 h-6 " />
|
||||||
<File className="w-6 h-6" />
|
<p className=" max-w-[5rem] truncate">
|
||||||
</div>
|
{item.title}
|
||||||
<p className=" max-sm:max-w-[40vw] max-w-full truncate ">
|
</p>
|
||||||
{item.title}
|
</a>
|
||||||
</p>
|
<ArrowDownToLine
|
||||||
</div>
|
|
||||||
{/* <ArrowDownToLine
|
|
||||||
className="cursor-pointer "
|
className="cursor-pointer "
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
downloadFile(
|
downloadFile(
|
||||||
|
|
@ -431,16 +402,13 @@ export default function ComplainsDetails({
|
||||||
item.mimeType
|
item.mimeType
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/> */}
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
})}
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ export default function FollowUp() {
|
||||||
<div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8">
|
<div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8">
|
||||||
<div className="flex flex-col justify-start h-full space-y-3 md:space-y-4 ">
|
<div className="flex flex-col justify-start h-full space-y-3 md:space-y-4 ">
|
||||||
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
||||||
لطفا جهت پیگیری گزارش و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را
|
لطفا جهت پیگیری درخواست و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را
|
||||||
وارد نمایید.
|
وارد نمایید.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -124,8 +124,6 @@ export default function FollowUp() {
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
autoComplete="new-password"
|
|
||||||
type="password"
|
|
||||||
placeholder="رمز عبور خود را وارد کنید"
|
placeholder="رمز عبور خود را وارد کنید"
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
|
|
@ -155,7 +153,7 @@ export default function FollowUp() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
"پیگیری گزارش"
|
"پیگیری درخواست"
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export default function Footer() {
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p className=" text-white text-xs md:text-sm font-normal md:leading-7 text-justify">
|
<p className=" text-white text-xs md:text-sm font-normal md:leading-7">
|
||||||
<div
|
<div
|
||||||
className=" !text-white footer"
|
className=" !text-white footer"
|
||||||
dangerouslySetInnerHTML={{ __html: fetchedContent }}
|
dangerouslySetInnerHTML={{ __html: fetchedContent }}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import { useMutation, useQuery } from "@tanstack/react-query";
|
||||||
import { OperateByInspector } from "@/utils/inspectorApi";
|
import { OperateByInspector } from "@/utils/inspectorApi";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { postComplaintsDetails } from "@/utils/citizenApi";
|
import { postComplaintsDetails } from "@/utils/citizenApi";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
import { DialogTrigger } from "./ui/dialog";
|
import { DialogTrigger } from "./ui/dialog";
|
||||||
import AttachmentsDialog from "./AttachmentsDialog";
|
import AttachmentsDialog from "./AttachmentsDialog";
|
||||||
import { Eye, Upload } from "lucide-react";
|
import { Eye, Upload } from "lucide-react";
|
||||||
|
|
@ -52,7 +52,6 @@ export default function InspectorOperations({
|
||||||
password?: string;
|
password?: string;
|
||||||
}) {
|
}) {
|
||||||
const [first, setfirst] = useState<File[]>([]);
|
const [first, setfirst] = useState<File[]>([]);
|
||||||
const [charCount, setCharCount] = useState(0);
|
|
||||||
|
|
||||||
// Queries
|
// Queries
|
||||||
const { data, isLoading, refetch } = useQuery({
|
const { data, isLoading, refetch } = useQuery({
|
||||||
|
|
@ -119,21 +118,6 @@ export default function InspectorOperations({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add the useEffect hook to monitor changes in the description field
|
|
||||||
useEffect(() => {
|
|
||||||
if (charCount != 0) {
|
|
||||||
setCharCount(form.watch("text")?.length);
|
|
||||||
}
|
|
||||||
}, [form.watch("text")]);
|
|
||||||
|
|
||||||
function handleTextChange(event: React.ChangeEvent<HTMLTextAreaElement>) {
|
|
||||||
const newCharCount = event.target.value.length;
|
|
||||||
// Update charCount only when the user types or removes characters
|
|
||||||
if (newCharCount <= data?.maxTextLength) {
|
|
||||||
setCharCount(newCharCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Functions
|
//Functions
|
||||||
function onSubmit(data: z.infer<typeof FormSchema>) {
|
function onSubmit(data: z.infer<typeof FormSchema>) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|
@ -152,11 +136,6 @@ export default function InspectorOperations({
|
||||||
OperationMutation.mutate(formData);
|
OperationMutation.mutate(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteAllAttachmentsFiles = () => {
|
|
||||||
setfirst([]);
|
|
||||||
form.setValue("media", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
const deleteFileFromAttachments = (file: any) => {
|
const deleteFileFromAttachments = (file: any) => {
|
||||||
const filtered = first?.filter((item) => item.name !== file);
|
const filtered = first?.filter((item) => item.name !== file);
|
||||||
setfirst(filtered);
|
setfirst(filtered);
|
||||||
|
|
@ -170,42 +149,25 @@ export default function InspectorOperations({
|
||||||
const formatSize = (size: number) => {
|
const formatSize = (size: number) => {
|
||||||
const string = formatBytes(size);
|
const string = formatBytes(size);
|
||||||
return (
|
return (
|
||||||
<span className="">
|
<span className="" dir="ltr">
|
||||||
{string[0]} {string[1]}
|
{string}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form
|
<form onSubmit={form.handleSubmit(onSubmit)} className="">
|
||||||
onSubmit={form.handleSubmit(onSubmit)}
|
|
||||||
className="flex flex-col h-full"
|
|
||||||
>
|
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="text"
|
name="text"
|
||||||
render={({ field, fieldState: { error } }) => (
|
render={({ field, fieldState: { error } }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel className="">
|
<FormLabel className="">متن</FormLabel>
|
||||||
متن({charCount}/{data?.maxTextLength})
|
|
||||||
</FormLabel>
|
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
className="resize-none bg-white lg:min-h-[19em]"
|
className="resize-none bg-white lg:min-h-[20em]"
|
||||||
{...field}
|
{...field}
|
||||||
readOnly={possibleOperations.length == 0}
|
readOnly={possibleOperations.length == 0}
|
||||||
onChange={(e) => {
|
|
||||||
const currentValue = e.target.value;
|
|
||||||
if (currentValue.length <= data?.maxTextLength) {
|
|
||||||
field.onChange(e);
|
|
||||||
handleTextChange(e);
|
|
||||||
} else {
|
|
||||||
// Truncate the value to the allowed limit
|
|
||||||
field.onChange(
|
|
||||||
currentValue.substring(0, data?.maxTextLength)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
{!error ? (
|
{!error ? (
|
||||||
|
|
@ -230,7 +192,6 @@ export default function InspectorOperations({
|
||||||
<AttachmentsDialog
|
<AttachmentsDialog
|
||||||
attachments={first}
|
attachments={first}
|
||||||
deleteFile={(item) => deleteFileFromAttachments(item)}
|
deleteFile={(item) => deleteFileFromAttachments(item)}
|
||||||
deleteAllAttachmentsFiles={deleteAllAttachmentsFiles}
|
|
||||||
>
|
>
|
||||||
<DialogTrigger className=" bg-white rounded-md h-9 text-xs flex-1 flex gap-2 items-center justify-center">
|
<DialogTrigger className=" bg-white rounded-md h-9 text-xs flex-1 flex gap-2 items-center justify-center">
|
||||||
<Eye className=" w-4 h-4" />
|
<Eye className=" w-4 h-4" />
|
||||||
|
|
@ -260,13 +221,8 @@ export default function InspectorOperations({
|
||||||
const fileArray1 = Array.from(first);
|
const fileArray1 = Array.from(first);
|
||||||
const fileArray2 = Array.from(e.target.files);
|
const fileArray2 = Array.from(e.target.files);
|
||||||
const mergedArray = fileArray1.concat(fileArray2);
|
const mergedArray = fileArray1.concat(fileArray2);
|
||||||
const uniqueFiles = Array.from(
|
setfirst(mergedArray);
|
||||||
new Map(
|
field.onChange(mergedArray);
|
||||||
mergedArray.map((file: any) => [file.name, file])
|
|
||||||
).values()
|
|
||||||
);
|
|
||||||
setfirst(uniqueFiles);
|
|
||||||
field.onChange(uniqueFiles);
|
|
||||||
} else if (!first && e.target.files) {
|
} else if (!first && e.target.files) {
|
||||||
const fileArray2 = Array.from(e.target.files);
|
const fileArray2 = Array.from(e.target.files);
|
||||||
setfirst(fileArray2);
|
setfirst(fileArray2);
|
||||||
|
|
@ -279,7 +235,7 @@ export default function InspectorOperations({
|
||||||
<FormDescription className=" text-xs my-1 ">
|
<FormDescription className=" text-xs my-1 ">
|
||||||
<span>
|
<span>
|
||||||
حجم هر فایل حداکثر می بایست {formatSize(data?.maxFileSize)}{" "}
|
حجم هر فایل حداکثر می بایست {formatSize(data?.maxFileSize)}{" "}
|
||||||
باشد
|
مگابایت باشد
|
||||||
</span>{" "}
|
</span>{" "}
|
||||||
و{" "}
|
و{" "}
|
||||||
{`تعداد فایل های پیوست شده می بایست حداکثر ${data?.maxFileCount} تا باشد.`}
|
{`تعداد فایل های پیوست شده می بایست حداکثر ${data?.maxFileCount} تا باشد.`}
|
||||||
|
|
@ -290,7 +246,7 @@ export default function InspectorOperations({
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div className="flex justify-between gap-2 mt-auto">
|
<div className="flex justify-between gap-2 mt-3 ">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="operation"
|
name="operation"
|
||||||
|
|
@ -314,15 +270,9 @@ export default function InspectorOperations({
|
||||||
/>
|
/>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent
|
<SelectContent dir="rtl">
|
||||||
ref={(ref) => {
|
|
||||||
if (!ref) return;
|
|
||||||
ref.ontouchstart = (e) => e.preventDefault();
|
|
||||||
}}
|
|
||||||
dir="rtl"
|
|
||||||
>
|
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
<SelectLabel>نوع عملیات</SelectLabel>
|
<SelectLabel>عملیات</SelectLabel>
|
||||||
{possibleOperations.map((item: any) => {
|
{possibleOperations.map((item: any) => {
|
||||||
return (
|
return (
|
||||||
<SelectItem
|
<SelectItem
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export default function Navbar() {
|
||||||
setAuth(false);
|
setAuth(false);
|
||||||
}
|
}
|
||||||
}, [isAuth, token]);
|
}, [isAuth, token]);
|
||||||
|
console.log(pathname);
|
||||||
return (
|
return (
|
||||||
<div className={` left-0 right-0 top-0 z-20 fixed`}>
|
<div className={` left-0 right-0 top-0 z-20 fixed`}>
|
||||||
{/* <TopNav /> */}
|
{/* <TopNav /> */}
|
||||||
|
|
@ -74,7 +74,7 @@ export default function Navbar() {
|
||||||
<Link
|
<Link
|
||||||
onClick={() => setOpen((prev) => !prev)}
|
onClick={() => setOpen((prev) => !prev)}
|
||||||
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
|
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
|
||||||
bg-blue `}
|
${lastItem === idx ? "bg-yellow" : "bg-blue"} `}
|
||||||
href={item.href}
|
href={item.href}
|
||||||
>
|
>
|
||||||
<span className="flex gap-1 text-sm">
|
<span className="flex gap-1 text-sm">
|
||||||
|
|
@ -107,7 +107,7 @@ export default function Navbar() {
|
||||||
<Link
|
<Link
|
||||||
onClick={() => setOpen((prev) => !prev)}
|
onClick={() => setOpen((prev) => !prev)}
|
||||||
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
|
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
|
||||||
bg-blue `}
|
${lastItem === idx ? "bg-yellow" : "bg-blue"} `}
|
||||||
href={item.href}
|
href={item.href}
|
||||||
>
|
>
|
||||||
<span className="flex gap-1 text-sm">
|
<span className="flex gap-1 text-sm">
|
||||||
|
|
@ -126,23 +126,22 @@ 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 gap-5">
|
||||||
<Link href="/" className="">
|
<Link href="/" className=" max-sm:hidden">
|
||||||
<Image
|
<Image
|
||||||
src="/img/logo2.png"
|
src="/img/logo.png"
|
||||||
quality={100}
|
quality={100}
|
||||||
alt="log"
|
alt="log"
|
||||||
width={2000}
|
width={32}
|
||||||
height={2000}
|
height={32}
|
||||||
className="w-28 h-18"
|
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
{/* <div className=" text-brown flex flex-col text-center">
|
<div className=" text-brown flex flex-col text-center">
|
||||||
<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>
|
||||||
</Link>
|
</Link>
|
||||||
</div> */}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className=" flex gap-5 items-center mr-8 max-md:hidden">
|
<div className=" flex gap-5 items-center mr-8 max-md:hidden">
|
||||||
{auth ? (
|
{auth ? (
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,7 @@ export default function NavbarSm() {
|
||||||
sticky top-0
|
sticky top-0
|
||||||
shadow-md`}
|
shadow-md`}
|
||||||
>
|
>
|
||||||
<Hamburger
|
<Hamburger toggled={isOpen} size={20} toggle={setOpen} direction="right"/>
|
||||||
toggled={isOpen}
|
|
||||||
size={20}
|
|
||||||
toggle={setOpen}
|
|
||||||
direction="right"
|
|
||||||
/>
|
|
||||||
{auth && <ProfileDropDown />}
|
{auth && <ProfileDropDown />}
|
||||||
{/* <Link href="/Login">
|
{/* <Link href="/Login">
|
||||||
<Button className=" bg-blue hover:bg-blue/90 rounded-lg text-xs ">
|
<Button className=" bg-blue hover:bg-blue/90 rounded-lg text-xs ">
|
||||||
|
|
@ -82,7 +77,7 @@ export default function NavbarSm() {
|
||||||
<Link
|
<Link
|
||||||
onClick={() => setOpen((prev) => !prev)}
|
onClick={() => setOpen((prev) => !prev)}
|
||||||
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
|
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
|
||||||
bg-blue `}
|
${lastItem === idx ? "bg-yellow" : "bg-blue"} `}
|
||||||
href={item.href}
|
href={item.href}
|
||||||
>
|
>
|
||||||
<span className="flex gap-1 text-sm">{item.name}</span>
|
<span className="flex gap-1 text-sm">{item.name}</span>
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,12 @@ export default function Pagination({
|
||||||
previousLabel={<MdKeyboardArrowRight className="w-5 h-5 " />}
|
previousLabel={<MdKeyboardArrowRight className="w-5 h-5 " />}
|
||||||
pageClassName=" w-10 h-10 grid place-content-center rounded-lg !text-blue shadow-md"
|
pageClassName=" w-10 h-10 grid place-content-center rounded-lg !text-blue shadow-md"
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
" flex flex-wrap gap-3 text-sm md:text-base w-full rounded-md p-2 pb-3 bg-transparent justify-center text-blue mt-5 fixed left-0 right-0 bottom-0"
|
" flex flex-wrap gap-3 text-sm md:text-base w-full rounded-md p-2 pb-3 bg-white/30 backdrop-blur-lg justify-center text-blue mt-5 fixed left-0 right-0 bottom-0"
|
||||||
)}
|
)}
|
||||||
activeClassName=" bg-blue text-blue shadow-md shadow-main"
|
activeClassName=" bg-blue text-blue shadow-md shadow-main"
|
||||||
activeLinkClassName=" text-white w-full p-1 h-full"
|
activeLinkClassName=" text-white w-full p-1 h-full"
|
||||||
previousLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md bg-white"
|
previousLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md"
|
||||||
nextLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md bg-white"
|
nextLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ const PrintButton: React.FC<PrintButtonProps> = ({ handlePrint }) => {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={handlePrint}
|
onClick={handlePrint}
|
||||||
className="w-full min-w-[4rem] sm:w-fit bg-blue text-white p-2 rounded-xl text-center "
|
className="w-full sm:w-fit bg-blue text-white p-2 rounded-xl text-center "
|
||||||
>
|
>
|
||||||
چاپ
|
پرینت
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -74,10 +74,7 @@ export default function ProfileDropDown() {
|
||||||
className=" max-sm:-mr-8 max-sm:text-xs w-12"
|
className=" max-sm:-mr-8 max-sm:text-xs w-12"
|
||||||
asChild
|
asChild
|
||||||
>
|
>
|
||||||
<Button
|
<Button variant="outline" className=" truncate w-32 grid place-content-center">
|
||||||
variant="outline"
|
|
||||||
className=" truncate w-32 grid place-content-center"
|
|
||||||
>
|
|
||||||
{/* {profileData?.title ? profileData?.title : profileData?.userName} */}
|
{/* {profileData?.title ? profileData?.title : profileData?.userName} */}
|
||||||
<p className=" truncate w-full">
|
<p className=" truncate w-full">
|
||||||
{" "}
|
{" "}
|
||||||
|
|
@ -95,7 +92,7 @@ export default function ProfileDropDown() {
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem onClick={() => router.push("/Account/Complaints")}>
|
<DropdownMenuItem onClick={() => router.push("/Account/Complaints")}>
|
||||||
<CreditCard className="w-4 h-4 ml-2" />
|
<CreditCard className="w-4 h-4 ml-2" />
|
||||||
<span>گزارش های من</span>
|
<span>درخواست های من</span>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuGroup>
|
</DropdownMenuGroup>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ export default function Result() {
|
||||||
const contentRef = useRef<any>();
|
const contentRef = useRef<any>();
|
||||||
const handlePrint = useReactToPrint({
|
const handlePrint = useReactToPrint({
|
||||||
// content: () => contentRef.current,
|
// content: () => contentRef.current,
|
||||||
content: () => {
|
content: () => {
|
||||||
|
console.log(contentRef.current); // Log the content to the console
|
||||||
return contentRef.current;
|
return contentRef.current;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -72,15 +73,14 @@ export default function Result() {
|
||||||
3xl:text-base 3xl:font-bold "
|
3xl:text-base 3xl:font-bold "
|
||||||
>
|
>
|
||||||
کد پیگیری :
|
کد پیگیری :
|
||||||
<span className="text-slate-500 mx-2 font-bold">{`${trackingNumber}`}</span>
|
<span className="text-slate-500 mx-2">{`${trackingNumber}`}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p
|
<p
|
||||||
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
3xl:text-base 3xl:font-bold "
|
3xl:text-base 3xl:font-bold "
|
||||||
>
|
>
|
||||||
رمز عبور :
|
رمز عبور :<span className="text-slate-500 mx-2">{`${password}`}</span>
|
||||||
<span className="text-slate-500 mx-2 !font-mono font-extrabold">{`${password}`}</span>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{/* <Image
|
{/* <Image
|
||||||
|
|
@ -90,6 +90,7 @@ export default function Result() {
|
||||||
/> */}
|
/> */}
|
||||||
</div>
|
</div>
|
||||||
<div className=" w-full flex flex-col justify-between items-end mt-2">
|
<div className=" w-full flex flex-col justify-between items-end mt-2">
|
||||||
|
|
||||||
<div className="hidden">
|
<div className="hidden">
|
||||||
<PrintPage
|
<PrintPage
|
||||||
contentRef={contentRef}
|
contentRef={contentRef}
|
||||||
|
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
"use client";
|
|
||||||
import { RequestItems, boxItems } from "@/constants";
|
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
import Image from "next/image";
|
|
||||||
import Link from "next/link";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default function RequestStep0() {
|
|
||||||
return (
|
|
||||||
<div className="">
|
|
||||||
<div className="flex justify-between gap-6 w-full mx-auto -mt-10 max-md:mt-2 max-sm:flex-wrap max-sm:justify-around ">
|
|
||||||
{RequestItems.map((item, index) => {
|
|
||||||
return (
|
|
||||||
<Link
|
|
||||||
className="group bg-white border shadow-md rounded-lg p-10 h-64 w-64 flex z-10 relative
|
|
||||||
hover:bg-blue transition-all duration-700 ease-in-out text-center
|
|
||||||
flex-col items-center justify-end gap-2
|
|
||||||
hover:flex-col-reverse hover:justify-evenly hover:items-center hover:cursor-pointer
|
|
||||||
max-lg:w-52 max-lg:h-52 max-md:w-40 max-md:h-40
|
|
||||||
max-lg:p-8 max-md:p-5 max-sm:p-2 hover:max-lg:p-2
|
|
||||||
max-md:shadow-[0px_0px_8px_0px_#00000040]
|
|
||||||
"
|
|
||||||
key={index}
|
|
||||||
href={item.link}
|
|
||||||
onClick={() => {
|
|
||||||
localStorage.removeItem("Sootzani_Login_State");
|
|
||||||
if (index == 0) {
|
|
||||||
localStorage.setItem("unknown", "true");
|
|
||||||
}
|
|
||||||
if (index == 1) {
|
|
||||||
localStorage.removeItemItem("unknown");
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<p className="text-xs text-center font-medium text-gray hidden group-hover:flex group-hover:text-white">
|
|
||||||
{item.description}
|
|
||||||
</p>
|
|
||||||
<p className=" z-10 text-base text-black group-hover:text-white max-md:text-sm">
|
|
||||||
{item.name}
|
|
||||||
</p>
|
|
||||||
<p className=" z-10 text-xs text-center font-medium group-hover:hidden">
|
|
||||||
{item.description}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<Image
|
|
||||||
alt="icon"
|
|
||||||
src={item.icon}
|
|
||||||
width={20}
|
|
||||||
height={20}
|
|
||||||
quality={100}
|
|
||||||
key={index}
|
|
||||||
className={cn(
|
|
||||||
" w-[60%] h-[60%] absolute left-12 top-6 group-hover:hidden max-md:h-[60%] max-md:w-[60%] max-md:left-auto",
|
|
||||||
item.id == 3 && "left-2"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Image
|
|
||||||
alt="icon"
|
|
||||||
src={item.icon2}
|
|
||||||
width={20}
|
|
||||||
height={20}
|
|
||||||
quality={100}
|
|
||||||
key={index}
|
|
||||||
className=" w-[45%] h-[45%] hidden group-hover:flex"
|
|
||||||
/>
|
|
||||||
</Link>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -90,12 +90,12 @@ export default function RequestStep1() {
|
||||||
const payload = data;
|
const payload = data;
|
||||||
editProfileMutation.mutate(payload);
|
editProfileMutation.mutate(payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8">
|
<div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8">
|
||||||
<div className="flex flex-col justify-center h-full space-y-4 md:space-y-4">
|
<div className="flex flex-col justify-center h-full space-y-4 md:space-y-4">
|
||||||
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
||||||
فرم ثبت گزارش{" "}
|
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
|
||||||
</p>
|
</p>
|
||||||
{profileData && (
|
{profileData && (
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
|
|
@ -140,6 +140,7 @@ export default function RequestStep1() {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-center w-full gap-2 mt-8 sm:justify-end">
|
<div className="flex justify-center w-full gap-2 mt-8 sm:justify-end">
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,6 @@ interface Organization {
|
||||||
export default function RequestStep2() {
|
export default function RequestStep2() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [file, setFile] = useState<File[]>([]);
|
const [file, setFile] = useState<File[]>([]);
|
||||||
const [charCount, setCharCount] = useState(0);
|
|
||||||
const [charCountPerson, setCharCountPerson] = useState(0);
|
|
||||||
|
|
||||||
// Queries
|
// Queries
|
||||||
const { data: optionsData, isLoading: isLoadingData } = useQuery({
|
const { data: optionsData, isLoading: isLoadingData } = useQuery({
|
||||||
|
|
@ -80,22 +78,15 @@ export default function RequestStep2() {
|
||||||
message: "لطفا موضوع شکایت را وارد نمایید.",
|
message: "لطفا موضوع شکایت را وارد نمایید.",
|
||||||
}),
|
}),
|
||||||
OrganizationId: z.string({
|
OrganizationId: z.string({
|
||||||
required_error: "لطفا دستگاه مرتبط را انتخاب نمایید.",
|
required_error: "لطفا دستگاه مربوطه را انتخاب نمایید.",
|
||||||
}),
|
}),
|
||||||
person: z
|
person: z.string().optional(),
|
||||||
.string()
|
|
||||||
.min(1, {
|
|
||||||
message: "لطفا نام فرد مورد نظر را بنویسید.",
|
|
||||||
})
|
|
||||||
.max(50, {
|
|
||||||
message: "تعداد کاراکترها بیشتر از حد مجاز میباشد.",
|
|
||||||
}),
|
|
||||||
description: z
|
description: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, {
|
.min(1, {
|
||||||
message: "لطفا توضیحات خود را بنویسید.",
|
message: "لطفا توضیحات خود را بنویسید.",
|
||||||
})
|
})
|
||||||
.max(optionsData?.maxTextLength, {
|
.max(300, {
|
||||||
message: "تعداد کاراکترها بیشتر از حد مجاز میباشد.",
|
message: "تعداد کاراکترها بیشتر از حد مجاز میباشد.",
|
||||||
}),
|
}),
|
||||||
uploadFile: z
|
uploadFile: z
|
||||||
|
|
@ -107,9 +98,7 @@ export default function RequestStep2() {
|
||||||
)
|
)
|
||||||
.refine(
|
.refine(
|
||||||
(files) => files.every((item) => item.size < optionsData?.maxFileSize),
|
(files) => files.every((item) => item.size < optionsData?.maxFileSize),
|
||||||
`حجم هر فایل حداکثر می بایست ${formatBytes(
|
`حجم هر فایل حداکثر می بایست ${optionsData?.maxFileSize} مگابایت باشد.`
|
||||||
optionsData?.maxFileSize
|
|
||||||
)} باشد.`
|
|
||||||
)
|
)
|
||||||
.nullish(),
|
.nullish(),
|
||||||
categoryId: z.string({
|
categoryId: z.string({
|
||||||
|
|
@ -141,13 +130,9 @@ export default function RequestStep2() {
|
||||||
mutationKey: ["authorizedComplaintSubmit"],
|
mutationKey: ["authorizedComplaintSubmit"],
|
||||||
mutationFn: postAuthorizedComplaintSubmit,
|
mutationFn: postAuthorizedComplaintSubmit,
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
const currentDate = new Date();
|
|
||||||
const formattedDate = currentDate.toISOString();
|
|
||||||
|
|
||||||
localStorage.setItem("trackingNumber", res.trackingNumber);
|
localStorage.setItem("trackingNumber", res.trackingNumber);
|
||||||
localStorage.setItem("password", res.password);
|
localStorage.setItem("password", res.password);
|
||||||
// localStorage.setItem("registeredAt", res.registeredAt);
|
localStorage.setItem("registeredAt", res.registeredAt);
|
||||||
localStorage.setItem("registeredAt", formattedDate);
|
|
||||||
localStorage.removeItem("authorized");
|
localStorage.removeItem("authorized");
|
||||||
localStorage.removeItem("unknown");
|
localStorage.removeItem("unknown");
|
||||||
router.push("/RequestResult");
|
router.push("/RequestResult");
|
||||||
|
|
@ -196,30 +181,6 @@ export default function RequestStep2() {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleDescriptionChange(
|
|
||||||
event: React.ChangeEvent<HTMLTextAreaElement>
|
|
||||||
) {
|
|
||||||
const newCharCount = event.target.value.length;
|
|
||||||
// Update charCount only when the user types or removes characters
|
|
||||||
if (newCharCount <= optionsData?.maxTextLength) {
|
|
||||||
setCharCount(newCharCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handlePersonCharCountChange(
|
|
||||||
event: React.ChangeEvent<HTMLInputElement>
|
|
||||||
) {
|
|
||||||
const newCharCount = event.target.value.length;
|
|
||||||
// Update charCount only when the user types or removes characters
|
|
||||||
if (newCharCount <= 50) {
|
|
||||||
setCharCountPerson(newCharCount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Add the useEffect hook to monitor changes in the description field
|
|
||||||
useEffect(() => {
|
|
||||||
setCharCount(form.watch("description")?.length);
|
|
||||||
}, [form.watch("description")]);
|
|
||||||
|
|
||||||
function onSubmit(data: z.infer<typeof FormSchema>) {
|
function onSubmit(data: z.infer<typeof FormSchema>) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("Title", data.title);
|
formData.append("Title", data.title);
|
||||||
|
|
@ -232,7 +193,7 @@ export default function RequestStep2() {
|
||||||
}
|
}
|
||||||
formData.append("Captcha.Value", data.captchaValue);
|
formData.append("Captcha.Value", data.captchaValue);
|
||||||
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");
|
const unknown = localStorage.getItem("unknown");
|
||||||
const isAuth = getCookie("Sootzani_Token");
|
const isAuth = getCookie("Sootzani_Token");
|
||||||
|
|
@ -261,11 +222,6 @@ export default function RequestStep2() {
|
||||||
form.setValue("uploadFile", filtered);
|
form.setValue("uploadFile", filtered);
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteAllAttachmentsFiles = () => {
|
|
||||||
setFile([]);
|
|
||||||
form.setValue("uploadFile", []);
|
|
||||||
};
|
|
||||||
|
|
||||||
const allowedExtensions = optionsData?.allowedExtensions;
|
const allowedExtensions = optionsData?.allowedExtensions;
|
||||||
const split = allowedExtensions?.split(",");
|
const split = allowedExtensions?.split(",");
|
||||||
const withDot = split?.map((item: string) => "." + item);
|
const withDot = split?.map((item: string) => "." + item);
|
||||||
|
|
@ -280,31 +236,28 @@ export default function RequestStep2() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full h-full pt-12 pb-3 sm:w-2/3 md:w-2/4 max-sm:p-8">
|
<div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8">
|
||||||
<div className="flex flex-col justify-center h-full space-y-3 md:space-y-3">
|
<div className="flex flex-col justify-center h-full space-y-3 md:space-y-4">
|
||||||
<span className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
||||||
ارسال گزارش
|
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
|
||||||
</span>
|
|
||||||
<p className="text-sm font-bold leading-tight tracking-tight md:text-sm text-[#7C838A] dark:text-white">
|
|
||||||
لطفا جهت ارسال گزارش فرم زیر را تکمیل نمایید.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form
|
<form
|
||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
className="flex flex-col w-full mt-6 max-sm:gap-2"
|
className="flex flex-col w-full mt-6"
|
||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="title"
|
name="title"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
<span className=" text-red-500">*</span>موضوع گزارش
|
*موضوع شکایت
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="موضوع گزارش خود را بنویسید"
|
placeholder="موضوع شکایت خود را بنویسید"
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
@ -312,14 +265,14 @@ export default function RequestStep2() {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div className="flex flex-row flex-wrap justify-between max-sm:gap-3">
|
<div className="flex flex-row flex-wrap justify-between">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="OrganizationId"
|
name="OrganizationId"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className=" w-full sm:w-[48%]">
|
<FormItem className=" w-full sm:w-[48%]">
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
<span className=" text-red-500">*</span>واحد مورد گزارش
|
*دستگاه مربوطه
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<Select
|
<Select
|
||||||
onValueChange={field.onChange}
|
onValueChange={field.onChange}
|
||||||
|
|
@ -333,17 +286,11 @@ export default function RequestStep2() {
|
||||||
>
|
>
|
||||||
<SelectValue
|
<SelectValue
|
||||||
className=""
|
className=""
|
||||||
placeholder="واحد مورد گزارش را انتخاب نمایید."
|
placeholder="دستگاه مربوطه را انتخاب نمایید."
|
||||||
/>
|
/>
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent
|
<SelectContent dir="rtl">
|
||||||
ref={(ref) => {
|
|
||||||
if (!ref) return;
|
|
||||||
ref.ontouchstart = (e) => e.preventDefault();
|
|
||||||
}}
|
|
||||||
dir="rtl"
|
|
||||||
>
|
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
{organizationsData?.map((item: any) => {
|
{organizationsData?.map((item: any) => {
|
||||||
return (
|
return (
|
||||||
|
|
@ -365,24 +312,13 @@ export default function RequestStep2() {
|
||||||
name="person"
|
name="person"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className=" w-full sm:w-[48%]">
|
<FormItem className=" w-full sm:w-[48%]">
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
فرد مرتبط
|
فرد مربوطه
|
||||||
{/* ({charCountPerson}/{50}) */}
|
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="نام فرد مورد نظر خود را بنویسید"
|
placeholder="نام فرد مورد نظر خود را بنویسید"
|
||||||
{...field}
|
{...field}
|
||||||
onChange={(e) => {
|
|
||||||
const currentValue = e.target.value;
|
|
||||||
if (currentValue.length <= 50) {
|
|
||||||
field.onChange(e);
|
|
||||||
handlePersonCharCountChange(e);
|
|
||||||
} else {
|
|
||||||
// Truncate the value to the allowed limit
|
|
||||||
field.onChange(currentValue.substring(0, 50));
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|
@ -397,28 +333,13 @@ export default function RequestStep2() {
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
توضیحات ({charCount}/{optionsData?.maxTextLength})
|
توضیحات
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
placeholder=" توضیحات خود را بنویسید"
|
placeholder="متن توضیحات خود را بنویسید"
|
||||||
className="mb-3 resize-none"
|
className="mb-3 resize-none"
|
||||||
{...field}
|
{...field}
|
||||||
onChange={(e) => {
|
|
||||||
const currentValue = e.target.value;
|
|
||||||
if (currentValue.length <= optionsData?.maxTextLength) {
|
|
||||||
field.onChange(e);
|
|
||||||
handleDescriptionChange(e);
|
|
||||||
} else {
|
|
||||||
// Truncate the value to the allowed limit
|
|
||||||
field.onChange(
|
|
||||||
currentValue.substring(
|
|
||||||
0,
|
|
||||||
optionsData?.maxTextLength
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|
@ -426,14 +347,14 @@ export default function RequestStep2() {
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="flex flex-row flex-wrap justify-between mb-2 max-sm:gap-3">
|
<div className="flex flex-row flex-wrap justify-between mb-2">
|
||||||
{/* Select Option */}
|
{/* Select Option */}
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="categoryId"
|
name="categoryId"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-full sm:w-[48%] flex-row-reverse">
|
<FormItem className="w-full sm:w-[48%] flex-row-reverse">
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
انتخاب دسته بندی
|
انتخاب دسته بندی
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<Select
|
<Select
|
||||||
|
|
@ -446,12 +367,7 @@ export default function RequestStep2() {
|
||||||
<SelectValue placeholder=" دسته بندی ها" />
|
<SelectValue placeholder=" دسته بندی ها" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<SelectContent
|
<SelectContent>
|
||||||
ref={(ref) => {
|
|
||||||
if (!ref) return;
|
|
||||||
ref.ontouchstart = (e) => e.preventDefault();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{categoryData?.map((catItems: any, index: any) => (
|
{categoryData?.map((catItems: any, index: any) => (
|
||||||
<SelectItem key={index} value={catItems.id}>
|
<SelectItem key={index} value={catItems.id}>
|
||||||
{catItems.title}
|
{catItems.title}
|
||||||
|
|
@ -490,7 +406,6 @@ export default function RequestStep2() {
|
||||||
<AttachmentsDialog
|
<AttachmentsDialog
|
||||||
attachments={file}
|
attachments={file}
|
||||||
deleteFile={(item) => deleteFileFromAttachments(item)}
|
deleteFile={(item) => deleteFileFromAttachments(item)}
|
||||||
deleteAllAttachmentsFiles={deleteAllAttachmentsFiles}
|
|
||||||
>
|
>
|
||||||
<DialogTrigger className=" bg-slate-200 rounded-md h-9 text-xs flex-1 flex gap-2 items-center justify-center">
|
<DialogTrigger className=" bg-slate-200 rounded-md h-9 text-xs flex-1 flex gap-2 items-center justify-center">
|
||||||
<Eye className=" w-4 h-4" />
|
<Eye className=" w-4 h-4" />
|
||||||
|
|
@ -519,24 +434,9 @@ export default function RequestStep2() {
|
||||||
if (file && e.target.files) {
|
if (file && e.target.files) {
|
||||||
const fileArray1 = Array.from(file);
|
const fileArray1 = Array.from(file);
|
||||||
const fileArray2 = Array.from(e.target.files);
|
const fileArray2 = Array.from(e.target.files);
|
||||||
const mergedArray: File[] =
|
const mergedArray = fileArray1.concat(fileArray2);
|
||||||
fileArray1.concat(fileArray2);
|
setFile(mergedArray);
|
||||||
const allFiles = mergedArray.map((item) => {
|
field.onChange(mergedArray);
|
||||||
return { name: item.name, type: item.type };
|
|
||||||
});
|
|
||||||
const newMergedArray = Array.from(
|
|
||||||
new Set(mergedArray)
|
|
||||||
);
|
|
||||||
const uniqueFiles = Array.from(
|
|
||||||
new Map(
|
|
||||||
mergedArray.map((file: any) => [
|
|
||||||
file.name,
|
|
||||||
file,
|
|
||||||
])
|
|
||||||
).values()
|
|
||||||
);
|
|
||||||
setFile(uniqueFiles);
|
|
||||||
field.onChange(uniqueFiles);
|
|
||||||
} else if (!file && e.target.files) {
|
} else if (!file && e.target.files) {
|
||||||
const fileArray2 = Array.from(e.target.files);
|
const fileArray2 = Array.from(e.target.files);
|
||||||
setFile(fileArray2);
|
setFile(fileArray2);
|
||||||
|
|
@ -545,19 +445,18 @@ export default function RequestStep2() {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{!error ? (
|
{/* {!error ? (
|
||||||
<FormDescription className=" text-xs my-1 ">
|
<FormDescription className=" text-xs my-1 ">
|
||||||
<span>
|
<span>
|
||||||
حجم هر فایل حداکثر می بایست{" "}
|
حجم هر فایل حداکثر می بایست{" "}
|
||||||
{formatSize(optionsData?.maxFileSize)} باشد
|
{formatSize(optionsData?.maxFileSize)} مگابایت باشد
|
||||||
</span>{" "}
|
</span>{" "}
|
||||||
و{" "}
|
و{" "}
|
||||||
{`تعداد فایل های پیوست شده می بایست حداکثر ${optionsData?.maxFileCount} تا باشد.`}
|
{`تعداد فایل های پیوست شده می بایست حداکثر ${optionsData?.maxFileCount} تا باشد.`}
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
) : (
|
) : (
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
)}
|
)} */}
|
||||||
{/* <FormMessage /> */}
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
|
@ -571,7 +470,7 @@ export default function RequestStep2() {
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-1/2 ">
|
<FormItem className="w-1/2 ">
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
<span className=" text-red-500">*</span>کد امنیتی
|
*کد امنیتی
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
|
|
@ -616,10 +515,10 @@ export default function RequestStep2() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-center w-full gap-2 mt-0 sm:justify-end">
|
<div className="flex justify-center w-full gap-2 mt-4 sm:justify-end">
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="w-1/2 p-2 mb-3 text-center text-white sm:w-1/3 lg:w-1/4 bg-blue rounded-xl"
|
className="w-1/2 p-2 mb-4 text-center text-white sm:w-1/3 lg:w-1/4 bg-blue rounded-xl"
|
||||||
>
|
>
|
||||||
{authorizedComplaintSubmitMutation.isPending ||
|
{authorizedComplaintSubmitMutation.isPending ||
|
||||||
complaintSubmitMutation.isPending ? (
|
complaintSubmitMutation.isPending ? (
|
||||||
|
|
@ -635,7 +534,7 @@ export default function RequestStep2() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
"ارسال گزارش"
|
"ارسال درخواست"
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { IoArrowDown } from "react-icons/io5";
|
||||||
|
|
||||||
export default function SubmitRequest() {
|
export default function SubmitRequest() {
|
||||||
return (
|
return (
|
||||||
<div className=" mx-auto max-sm:pb-6 pb-20">
|
<div className="3xl:w-[60%] w-[80%] 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">
|
||||||
درباره سامانه عیون
|
درباره سامانه عیون
|
||||||
|
|
@ -25,12 +25,9 @@ export default function SubmitRequest() {
|
||||||
</p>
|
</p>
|
||||||
<Link
|
<Link
|
||||||
href="/RequestStep2"
|
href="/RequestStep2"
|
||||||
onClick={() => {
|
|
||||||
localStorage.setItem("unknown", "true");
|
|
||||||
}}
|
|
||||||
className="text-sm font-bold text-blue text-left underline underline-offset-4"
|
className="text-sm font-bold text-blue text-left underline underline-offset-4"
|
||||||
>
|
>
|
||||||
برای شروع ارسال گزارش کلیک کنید.
|
برای شروع ارسال درخواست کلیک کنید.
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-2/3 flex items-center max-lg:w-full max-sm:flex-wrap justify-center">
|
<div className="w-2/3 flex items-center max-lg:w-full max-sm:flex-wrap justify-center">
|
||||||
|
|
|
||||||
|
|
@ -60,15 +60,15 @@ export default function TabController() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 pt-9 z-10">
|
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 pt-9">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
router.push("/RequestStep2");
|
router.push("/RequestStep2");
|
||||||
localStorage.removeItem("unknown");
|
localStorage.removeItemItem("unknown");
|
||||||
}}
|
}}
|
||||||
className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs"
|
className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs"
|
||||||
>
|
>
|
||||||
ثبت گزارش
|
ثبت درخواست
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Search
|
<Search
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ export default function TableController({ data }: { data: Complaint[] }) {
|
||||||
<div>
|
<div>
|
||||||
<Table className="border-[1px] border-solid border-muted rounded-md mb-20">
|
<Table className="border-[1px] border-solid border-muted rounded-md mb-20">
|
||||||
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
|
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
|
||||||
<TableHeader className="bg-white">
|
<TableHeader>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableHead>ردیف</TableHead>
|
<TableHead>ردیف</TableHead>
|
||||||
<TableHead>کد پیگیری</TableHead>
|
<TableHead>کد پیگیری</TableHead>
|
||||||
|
|
@ -81,7 +81,7 @@ export default function TableController({ data }: { data: Complaint[] }) {
|
||||||
<TableHead>تاریخ آخرین تغییر</TableHead>
|
<TableHead>تاریخ آخرین تغییر</TableHead>
|
||||||
<TableHead>موضوع</TableHead>
|
<TableHead>موضوع</TableHead>
|
||||||
<TableHead>وضعیت</TableHead>
|
<TableHead>وضعیت</TableHead>
|
||||||
<TableHead>واحد مرتبط</TableHead>
|
<TableHead>دستگاه مربوطه</TableHead>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody className="bg-[#F5F5F5]">
|
<TableBody className="bg-[#F5F5F5]">
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ export default function Verify() {
|
||||||
}, [otp]);
|
}, [otp]);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="w-full 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-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]
|
||||||
h-3/5 sm:h-3/4 max-md:p-8 relative z-10 bg-[url('/img/yazd1.png')] bg-no-repeat bg-bottom bg-contain"
|
h-full max-md:p-8 pt-12 relative"
|
||||||
>
|
>
|
||||||
{CitizenVerifyMutation.isPending && (
|
{CitizenVerifyMutation.isPending && (
|
||||||
<div className="absolute top-3 left-5 ">
|
<div className="absolute top-3 left-5 ">
|
||||||
|
|
@ -88,7 +88,7 @@ export default function Verify() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="flex flex-col justify-start h-full space-y-3 md:space-y-6 md:py-16 md:px-20">
|
<div className="flex flex-col justify-center h-full space-y-3 md:space-y-4 md:py-12 md:px-20">
|
||||||
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />
|
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />
|
||||||
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
|
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||||
تایید کد
|
تایید کد
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
"use client";
|
// components/PrintPage.tsx
|
||||||
import React, { useEffect } from "react";
|
import React from "react";
|
||||||
// import { convertDate } from "@/lib/utils";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
|
|
||||||
interface PrintPageProps {
|
interface PrintPageProps {
|
||||||
contentRef: React.RefObject<any>;
|
contentRef: React.RefObject<any>;
|
||||||
|
|
@ -10,22 +8,6 @@ interface PrintPageProps {
|
||||||
password: string;
|
password: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert Date
|
|
||||||
function convertDate(date: string) {
|
|
||||||
const convertedDate = dayjs(date)
|
|
||||||
.calendar("jalali")
|
|
||||||
.locale("fa")
|
|
||||||
.format("YYYY/M/DD");
|
|
||||||
return convertedDate;
|
|
||||||
}
|
|
||||||
// const registeredAt = localStorage.getItem("registeredAt");
|
|
||||||
// const convertedDate = registeredAt ? convertDate(registeredAt) : "Invalid Date";
|
|
||||||
|
|
||||||
|
|
||||||
const currentDate = new Date();
|
|
||||||
const formattedDate = currentDate.toISOString();
|
|
||||||
const convertedDate = convertDate(formattedDate);
|
|
||||||
|
|
||||||
const PrintPage: React.FC<PrintPageProps> = ({
|
const PrintPage: React.FC<PrintPageProps> = ({
|
||||||
contentRef,
|
contentRef,
|
||||||
fetchedContent,
|
fetchedContent,
|
||||||
|
|
@ -35,27 +17,17 @@ const PrintPage: React.FC<PrintPageProps> = ({
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={contentRef}
|
ref={contentRef}
|
||||||
className="w-screen h-screen border-2 border-spacing-6 p-36 bg-slate-200 bg-[url('/img/bg-print2.jpg')] bg-no-repeat bg-bottom bg-cover font-[yekan]"
|
className="w-screen h-screen border-2 border-spacing-6 p-36 bg-slate-200 bg-[url('/img/bg-print.jpg')] bg-no-repeat bg-bottom bg-cover font-[yekan]"
|
||||||
dir="rtl"
|
dir="rtl"
|
||||||
>
|
>
|
||||||
<div className="flex flex-col absolute top-[125px] left-[104px] text-xs gap-1">
|
<div dangerouslySetInnerHTML={{ __html: fetchedContent }} className=" mt-16 text-justify" />
|
||||||
<p>سامانه نظارت شهرداری یزد</p>
|
|
||||||
<p>
|
|
||||||
تاریخ: <span>{convertedDate}</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<p >
|
||||||
dangerouslySetInnerHTML={{ __html: fetchedContent }}
|
|
||||||
className=" mt-16 text-justify"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
کد پیگیری : <span>{trackingNumber}</span>
|
کد پیگیری : <span>{trackingNumber}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
رمز عبور : <span className="font-mono">{password}</span>
|
رمز عبور : <span>{password}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,21 @@
|
||||||
"use client";
|
"use client"
|
||||||
|
|
||||||
import * as React from "react";
|
import * as React from "react"
|
||||||
import * as SelectPrimitive from "@radix-ui/react-select";
|
import {
|
||||||
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
CaretSortIcon,
|
||||||
|
CheckIcon,
|
||||||
|
ChevronDownIcon,
|
||||||
|
ChevronUpIcon,
|
||||||
|
} from "@radix-ui/react-icons"
|
||||||
|
import * as SelectPrimitive from "@radix-ui/react-select"
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
const Select = SelectPrimitive.Root;
|
const Select = SelectPrimitive.Root
|
||||||
|
|
||||||
const SelectGroup = SelectPrimitive.Group;
|
const SelectGroup = SelectPrimitive.Group
|
||||||
|
|
||||||
const SelectValue = SelectPrimitive.Value;
|
const SelectValue = SelectPrimitive.Value
|
||||||
|
|
||||||
const SelectTrigger = React.forwardRef<
|
const SelectTrigger = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
||||||
|
|
@ -19,18 +24,18 @@ const SelectTrigger = React.forwardRef<
|
||||||
<SelectPrimitive.Trigger
|
<SelectPrimitive.Trigger
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
<SelectPrimitive.Icon asChild>
|
<SelectPrimitive.Icon asChild>
|
||||||
<ChevronDown className="h-4 w-4 opacity-50" />
|
<CaretSortIcon className="h-4 w-4 opacity-50" />
|
||||||
</SelectPrimitive.Icon>
|
</SelectPrimitive.Icon>
|
||||||
</SelectPrimitive.Trigger>
|
</SelectPrimitive.Trigger>
|
||||||
));
|
))
|
||||||
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
||||||
|
|
||||||
const SelectScrollUpButton = React.forwardRef<
|
const SelectScrollUpButton = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
||||||
|
|
@ -44,10 +49,10 @@ const SelectScrollUpButton = React.forwardRef<
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<ChevronUp className="h-4 w-4" />
|
<ChevronUpIcon />
|
||||||
</SelectPrimitive.ScrollUpButton>
|
</SelectPrimitive.ScrollUpButton>
|
||||||
));
|
))
|
||||||
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
||||||
|
|
||||||
const SelectScrollDownButton = React.forwardRef<
|
const SelectScrollDownButton = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
||||||
|
|
@ -61,11 +66,11 @@ const SelectScrollDownButton = React.forwardRef<
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<ChevronDown className="h-4 w-4" />
|
<ChevronDownIcon />
|
||||||
</SelectPrimitive.ScrollDownButton>
|
</SelectPrimitive.ScrollDownButton>
|
||||||
));
|
))
|
||||||
SelectScrollDownButton.displayName =
|
SelectScrollDownButton.displayName =
|
||||||
SelectPrimitive.ScrollDownButton.displayName;
|
SelectPrimitive.ScrollDownButton.displayName
|
||||||
|
|
||||||
const SelectContent = React.forwardRef<
|
const SelectContent = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.Content>,
|
React.ElementRef<typeof SelectPrimitive.Content>,
|
||||||
|
|
@ -96,8 +101,8 @@ const SelectContent = React.forwardRef<
|
||||||
<SelectScrollDownButton />
|
<SelectScrollDownButton />
|
||||||
</SelectPrimitive.Content>
|
</SelectPrimitive.Content>
|
||||||
</SelectPrimitive.Portal>
|
</SelectPrimitive.Portal>
|
||||||
));
|
))
|
||||||
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
SelectContent.displayName = SelectPrimitive.Content.displayName
|
||||||
|
|
||||||
const SelectLabel = React.forwardRef<
|
const SelectLabel = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.Label>,
|
React.ElementRef<typeof SelectPrimitive.Label>,
|
||||||
|
|
@ -105,11 +110,11 @@ const SelectLabel = React.forwardRef<
|
||||||
>(({ className, ...props }, ref) => (
|
>(({ className, ...props }, ref) => (
|
||||||
<SelectPrimitive.Label
|
<SelectPrimitive.Label
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
className={cn("px-2 py-1.5 text-sm font-semibold", className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
));
|
))
|
||||||
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
||||||
|
|
||||||
const SelectItem = React.forwardRef<
|
const SelectItem = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.Item>,
|
React.ElementRef<typeof SelectPrimitive.Item>,
|
||||||
|
|
@ -118,21 +123,20 @@ const SelectItem = React.forwardRef<
|
||||||
<SelectPrimitive.Item
|
<SelectPrimitive.Item
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||||
<SelectPrimitive.ItemIndicator>
|
<SelectPrimitive.ItemIndicator>
|
||||||
<Check className="h-4 w-4" />
|
<CheckIcon className="h-4 w-4" />
|
||||||
</SelectPrimitive.ItemIndicator>
|
</SelectPrimitive.ItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
||||||
</SelectPrimitive.Item>
|
</SelectPrimitive.Item>
|
||||||
));
|
))
|
||||||
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
SelectItem.displayName = SelectPrimitive.Item.displayName
|
||||||
|
|
||||||
const SelectSeparator = React.forwardRef<
|
const SelectSeparator = React.forwardRef<
|
||||||
React.ElementRef<typeof SelectPrimitive.Separator>,
|
React.ElementRef<typeof SelectPrimitive.Separator>,
|
||||||
|
|
@ -143,8 +147,8 @@ const SelectSeparator = React.forwardRef<
|
||||||
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
));
|
))
|
||||||
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Select,
|
Select,
|
||||||
|
|
@ -157,4 +161,4 @@ export {
|
||||||
SelectSeparator,
|
SelectSeparator,
|
||||||
SelectScrollUpButton,
|
SelectScrollUpButton,
|
||||||
SelectScrollDownButton,
|
SelectScrollDownButton,
|
||||||
};
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { LuMapPin } from "react-icons/lu";
|
import { LuMapPin } from "react-icons/lu";
|
||||||
import { HiOutlineMail } from "react-icons/hi";
|
import { HiOutlineMail } from "react-icons/hi";
|
||||||
import { FiPhone } from "react-icons/fi";
|
import { FiPhone } from "react-icons/fi";
|
||||||
import bgimg from "../public/img/bg-slide2.jpg";
|
import bgimg from "../public/img/bg.png";
|
||||||
|
|
||||||
export const menuItems = [
|
export const menuItems = [
|
||||||
{ id: 1, name: "صفحه اصلی", href: "/" },
|
{ id: 1, name: "صفحه اصلی", href: "/" },
|
||||||
|
|
@ -14,7 +14,7 @@ export const menuItems = [
|
||||||
export const authorizedMenuItems = [
|
export const authorizedMenuItems = [
|
||||||
{ id: 1, name: "صفحه اصلی", href: "/" },
|
{ id: 1, name: "صفحه اصلی", href: "/" },
|
||||||
{ id: 2, name: "پیگیری", href: "/FollowUp" },
|
{ id: 2, name: "پیگیری", href: "/FollowUp" },
|
||||||
{ id: 3, name: "گزارش های من", href: "/Account/Complaints" },
|
{ id: 3, name: "درخواست های من", href: "/Account/Complaints" },
|
||||||
{ id: 4, name: "اخبار", href: "/News" },
|
{ id: 4, name: "اخبار", href: "/News" },
|
||||||
{ id: 5, name: "تماس با ما", href: "/CallUs" },
|
{ id: 5, name: "تماس با ما", href: "/CallUs" },
|
||||||
];
|
];
|
||||||
|
|
@ -26,49 +26,38 @@ 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: "ارسال گزارش بدون احراز هویت",
|
||||||
// link: "/RequestStep2",
|
link: "/RequestStep2",
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: " گزارش فساد",
|
name: " گزارش فساد",
|
||||||
icon: "/img/box1.svg",
|
icon: "/img/box1.svg",
|
||||||
icon2: "/img/box1-hover.svg",
|
icon2: "/img/box1-hover.svg",
|
||||||
description: "ارسال گزارش ",
|
description: "ارسال گزارش با احراز هویت",
|
||||||
link: "/RequestStep0",
|
link: "/CitizenLogin",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
name: "پیگیری گزارش ها",
|
name: "پیگیری گزارش ها",
|
||||||
icon: "/img/box2.svg",
|
icon: "/img/box2.svg",
|
||||||
icon2: "/img/box2-hover.svg",
|
icon2: "/img/box2-hover.svg",
|
||||||
description: "پیگیری گزارش ارسال شده",
|
description: "پیگیری درخواست ارسال شده",
|
||||||
link: "/FollowUp",
|
link: "/FollowUp",
|
||||||
},
|
},
|
||||||
];
|
// {
|
||||||
|
// id: 3,
|
||||||
export const RequestItems = [
|
// name: "مشاهده آمار",
|
||||||
{
|
// icon: "/img/box3.svg",
|
||||||
id: 1,
|
// icon2: "/img/box3-hover.svg",
|
||||||
name: " گزارش فساد (ناشناس)",
|
// description: "مشاهده آمار و گزارشات درخواست ها",
|
||||||
icon: "/img/box5.svg",
|
// link: "/",
|
||||||
icon2: "/img/box5-hover.svg",
|
// },
|
||||||
description: "ارسال گزارش بدون احراز هویت",
|
|
||||||
link: "/RequestStep2",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: " گزارش فساد (شناس)",
|
|
||||||
icon: "/img/box4-hover.svg",
|
|
||||||
icon2: "/img/box4.svg",
|
|
||||||
description: "ارسال گزارش با احراز هویت",
|
|
||||||
link: "/CitizenLogin",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const newsItems = [
|
export const newsItems = [
|
||||||
|
|
@ -104,10 +93,10 @@ export const counterItems = [
|
||||||
];
|
];
|
||||||
|
|
||||||
export const requestItems = [
|
export const requestItems = [
|
||||||
{ id: 1, name: "گزارش از طرف شهروند" },
|
{ id: 1, name: "درخواست از طرف شهروند" },
|
||||||
{ id: 2, name: "دریافت کد رهگیری" },
|
{ id: 2, name: "دریافت کد رهگیری" },
|
||||||
{ id: 3, name: "بررسی توسط بازرس شهرداری" },
|
{ id: 3, name: "بررسی توسط بازرس شهرداری" },
|
||||||
{ id: 4, name: " اعلام نتیجه گزارش" },
|
{ id: 4, name: " اعلام نتیجه درخواست" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const aboutFooterItems = [
|
export const aboutFooterItems = [
|
||||||
|
|
|
||||||
33
lib/utils.ts
|
|
@ -47,18 +47,37 @@ export function isAuthorized() {
|
||||||
export function bytesToMB(bytes: number) {
|
export function bytesToMB(bytes: number) {
|
||||||
return Math.floor(bytes / (1024 * 1024));
|
return Math.floor(bytes / (1024 * 1024));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatBytes(bytes: number, decimals = 2) {
|
export function formatBytes(bytes: number, decimals = 2) {
|
||||||
|
console.log(bytes);
|
||||||
if (!+bytes) return "0 Bytes";
|
if (!+bytes) return "0 Bytes";
|
||||||
|
|
||||||
const k = 1024;
|
const k = 1024;
|
||||||
const dm = decimals < 0 ? 0 : decimals;
|
const dm = decimals < 0 ? 0 : decimals;
|
||||||
const sizes = ["بایت", "کیلوبایت", "مگابایت", "گیگابایت", "ترابایت", "PiB", "EiB", "ZiB", "YiB"];
|
const sizes = [
|
||||||
|
"Bytes",
|
||||||
|
"KB",
|
||||||
|
"MB",
|
||||||
|
"GiB",
|
||||||
|
"TiB",
|
||||||
|
"PiB",
|
||||||
|
"EiB",
|
||||||
|
"ZiB",
|
||||||
|
"YiB",
|
||||||
|
];
|
||||||
|
// const sizes = [
|
||||||
|
// "Bytes",
|
||||||
|
// "KB",
|
||||||
|
// "MB",
|
||||||
|
// "GiB",
|
||||||
|
// "TiB",
|
||||||
|
// "PiB",
|
||||||
|
// "EiB",
|
||||||
|
// "ZiB",
|
||||||
|
// "YiB",
|
||||||
|
// ];
|
||||||
|
|
||||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||||
const psFloaat = parseFloat((bytes / Math.pow(k, i)).toFixed(dm))
|
|
||||||
const sz = sizes[i]
|
|
||||||
|
|
||||||
// return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
||||||
return [psFloaat , sz]
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "sootzani",
|
"name": "sootzani",
|
||||||
"version": "0.2.5",
|
"version": "0.1.22",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sootzani",
|
"name": "sootzani",
|
||||||
"version": "0.2.5",
|
"version": "0.1.22",
|
||||||
"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",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sootzani",
|
"name": "sootzani",
|
||||||
"version": "0.2.5",
|
"version": "0.1.22",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 824 B |
|
Before Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 998 KiB |
|
|
@ -1,7 +0,0 @@
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
|
||||||
<svg fill="#c7c6c6" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800px" height="800px" viewBox="0 0 442.04 442.04" xml:space="preserve">
|
|
||||||
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
|
||||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
<g id="SVGRepo_iconCarrier"> <g> <g> <path d="M221.02,341.304c-49.708,0-103.206-19.44-154.71-56.22C27.808,257.59,4.044,230.351,3.051,229.203 c-4.068-4.697-4.068-11.669,0-16.367c0.993-1.146,24.756-28.387,63.259-55.881c51.505-36.777,105.003-56.219,154.71-56.219 c49.708,0,103.207,19.441,154.71,56.219c38.502,27.494,62.266,54.734,63.259,55.881c4.068,4.697,4.068,11.669,0,16.367 c-0.993,1.146-24.756,28.387-63.259,55.881C324.227,321.863,270.729,341.304,221.02,341.304z M29.638,221.021 c9.61,9.799,27.747,27.03,51.694,44.071c32.83,23.361,83.714,51.212,139.688,51.212s106.859-27.851,139.688-51.212 c23.944-17.038,42.082-34.271,51.694-44.071c-9.609-9.799-27.747-27.03-51.694-44.071 c-32.829-23.362-83.714-51.212-139.688-51.212s-106.858,27.85-139.688,51.212C57.388,193.988,39.25,211.219,29.638,221.021z"/> </g> <g> <path d="M221.02,298.521c-42.734,0-77.5-34.767-77.5-77.5c0-42.733,34.766-77.5,77.5-77.5c18.794,0,36.924,6.814,51.048,19.188 c5.193,4.549,5.715,12.446,1.166,17.639c-4.549,5.193-12.447,5.714-17.639,1.166c-9.564-8.379-21.844-12.993-34.576-12.993 c-28.949,0-52.5,23.552-52.5,52.5s23.551,52.5,52.5,52.5c28.95,0,52.5-23.552,52.5-52.5c0-6.903,5.597-12.5,12.5-12.5 s12.5,5.597,12.5,12.5C298.521,263.754,263.754,298.521,221.02,298.521z"/> </g> <g> <path d="M221.02,246.021c-13.785,0-25-11.215-25-25s11.215-25,25-25c13.786,0,25,11.215,25,25S234.806,246.021,221.02,246.021z"/> </g> </g> </g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
||||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<svg fill="#fff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
width="800px" height="800px" viewBox="0 0 442.04 442.04"
|
|
||||||
xml:space="preserve">
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path d="M221.02,341.304c-49.708,0-103.206-19.44-154.71-56.22C27.808,257.59,4.044,230.351,3.051,229.203
|
|
||||||
c-4.068-4.697-4.068-11.669,0-16.367c0.993-1.146,24.756-28.387,63.259-55.881c51.505-36.777,105.003-56.219,154.71-56.219
|
|
||||||
c49.708,0,103.207,19.441,154.71,56.219c38.502,27.494,62.266,54.734,63.259,55.881c4.068,4.697,4.068,11.669,0,16.367
|
|
||||||
c-0.993,1.146-24.756,28.387-63.259,55.881C324.227,321.863,270.729,341.304,221.02,341.304z M29.638,221.021
|
|
||||||
c9.61,9.799,27.747,27.03,51.694,44.071c32.83,23.361,83.714,51.212,139.688,51.212s106.859-27.851,139.688-51.212
|
|
||||||
c23.944-17.038,42.082-34.271,51.694-44.071c-9.609-9.799-27.747-27.03-51.694-44.071
|
|
||||||
c-32.829-23.362-83.714-51.212-139.688-51.212s-106.858,27.85-139.688,51.212C57.388,193.988,39.25,211.219,29.638,221.021z"/>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
<path d="M221.02,298.521c-42.734,0-77.5-34.767-77.5-77.5c0-42.733,34.766-77.5,77.5-77.5c18.794,0,36.924,6.814,51.048,19.188
|
|
||||||
c5.193,4.549,5.715,12.446,1.166,17.639c-4.549,5.193-12.447,5.714-17.639,1.166c-9.564-8.379-21.844-12.993-34.576-12.993
|
|
||||||
c-28.949,0-52.5,23.552-52.5,52.5s23.551,52.5,52.5,52.5c28.95,0,52.5-23.552,52.5-52.5c0-6.903,5.597-12.5,12.5-12.5
|
|
||||||
s12.5,5.597,12.5,12.5C298.521,263.754,263.754,298.521,221.02,298.521z"/>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
<path d="M221.02,246.021c-13.785,0-25-11.215-25-25s11.215-25,25-25c13.786,0,25,11.215,25,25S234.806,246.021,221.02,246.021z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
||||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M2.21967 2.21967C1.9534 2.48594 1.9292 2.9026 2.14705 3.19621L2.21967 3.28033L6.25424 7.3149C4.33225 8.66437 2.89577 10.6799 2.29888 13.0644C2.1983 13.4662 2.4425 13.8735 2.84431 13.9741C3.24613 14.0746 3.6534 13.8305 3.75399 13.4286C4.28346 11.3135 5.59112 9.53947 7.33416 8.39452L9.14379 10.2043C8.43628 10.9258 8 11.9143 8 13.0046C8 15.2138 9.79086 17.0046 12 17.0046C13.0904 17.0046 14.0788 16.5683 14.8004 15.8608L20.7197 21.7803C21.0126 22.0732 21.4874 22.0732 21.7803 21.7803C22.0466 21.5141 22.0708 21.0974 21.8529 20.8038L21.7803 20.7197L15.6668 14.6055L15.668 14.604L14.4679 13.4061L11.598 10.5368L11.6 10.536L8.71877 7.65782L8.72 7.656L7.58672 6.52549L3.28033 2.21967C2.98744 1.92678 2.51256 1.92678 2.21967 2.21967ZM10.2041 11.2655L13.7392 14.8006C13.2892 15.2364 12.6759 15.5046 12 15.5046C10.6193 15.5046 9.5 14.3853 9.5 13.0046C9.5 12.3287 9.76824 11.7154 10.2041 11.2655ZM12 5.5C10.9997 5.5 10.0291 5.64807 9.11109 5.925L10.3481 7.16119C10.8839 7.05532 11.4364 7 12 7C15.9231 7 19.3099 9.68026 20.2471 13.4332C20.3475 13.835 20.7546 14.0794 21.1565 13.9791C21.5584 13.8787 21.8028 13.4716 21.7024 13.0697C20.5994 8.65272 16.6155 5.5 12 5.5ZM12.1947 9.00928L15.996 12.81C15.8942 10.7531 14.2472 9.10764 12.1947 9.00928Z" fill="#fff"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
|
@ -1,7 +0,0 @@
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
|
|
||||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
|
|
||||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
<g id="SVGRepo_iconCarrier"> <path d="M2.21967 2.21967C1.9534 2.48594 1.9292 2.9026 2.14705 3.19621L2.21967 3.28033L6.25424 7.3149C4.33225 8.66437 2.89577 10.6799 2.29888 13.0644C2.1983 13.4662 2.4425 13.8735 2.84431 13.9741C3.24613 14.0746 3.6534 13.8305 3.75399 13.4286C4.28346 11.3135 5.59112 9.53947 7.33416 8.39452L9.14379 10.2043C8.43628 10.9258 8 11.9143 8 13.0046C8 15.2138 9.79086 17.0046 12 17.0046C13.0904 17.0046 14.0788 16.5683 14.8004 15.8608L20.7197 21.7803C21.0126 22.0732 21.4874 22.0732 21.7803 21.7803C22.0466 21.5141 22.0708 21.0974 21.8529 20.8038L21.7803 20.7197L15.6668 14.6055L15.668 14.604L14.4679 13.4061L11.598 10.5368L11.6 10.536L8.71877 7.65782L8.72 7.656L7.58672 6.52549L3.28033 2.21967C2.98744 1.92678 2.51256 1.92678 2.21967 2.21967ZM10.2041 11.2655L13.7392 14.8006C13.2892 15.2364 12.6759 15.5046 12 15.5046C10.6193 15.5046 9.5 14.3853 9.5 13.0046C9.5 12.3287 9.76824 11.7154 10.2041 11.2655ZM12 5.5C10.9997 5.5 10.0291 5.64807 9.11109 5.925L10.3481 7.16119C10.8839 7.05532 11.4364 7 12 7C15.9231 7 19.3099 9.68026 20.2471 13.4332C20.3475 13.835 20.7546 14.0794 21.1565 13.9791C21.5584 13.8787 21.8028 13.4716 21.7024 13.0697C20.5994 8.65272 16.6155 5.5 12 5.5ZM12.1947 9.00928L15.996 12.81C15.8942 10.7531 14.2472 9.10764 12.1947 9.00928Z" fill="#c7c6c6"/> </g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 548 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 330 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
|
@ -15,6 +15,7 @@ axios.interceptors.response.use(
|
||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
async function (error) {
|
async function (error) {
|
||||||
|
console.log(error);
|
||||||
const originalRequest = error.config;
|
const originalRequest = error.config;
|
||||||
|
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
|
|
|
||||||