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";
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
return <TabController />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,5 @@ export default function page() {
|
|||
if (token) {
|
||||
redirect("/RequestStep2");
|
||||
}
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
return <CitizenLogin />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,5 @@ export default function page() {
|
|||
// if (!token) {
|
||||
// redirect("/");
|
||||
// }
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
return <CitizenLogin />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
return <Verify />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { boxItems, newsItems } from "@/constants";
|
|||
import Image from "next/image";
|
||||
import { cn, convertDate } from "@/lib/utils";
|
||||
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 Swiper React components
|
||||
|
|
@ -70,7 +70,6 @@ export default function Landing() {
|
|||
delay: 2500,
|
||||
disableOnInteraction: false,
|
||||
}}
|
||||
// autoplay={ data?.length > 1 ? { delay: 2500, disableOnInteraction: false } : false }
|
||||
loop={false}
|
||||
pagination={{
|
||||
clickable: true,
|
||||
|
|
@ -95,6 +94,19 @@ export default function Landing() {
|
|||
</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}>
|
||||
<Image
|
||||
alt="bg"
|
||||
src={bgimg2}
|
||||
src={bgimg}
|
||||
// width={20}
|
||||
// height={20}
|
||||
quality={100}
|
||||
|
|
@ -118,16 +130,14 @@ export default function Landing() {
|
|||
</div>
|
||||
|
||||
<div className="3xl:w-[60%] w-[80%] mx-auto max-md:mt-5">
|
||||
{/* About Oyoon */}
|
||||
<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 ">
|
||||
<div className="flex justify-between gap-6 w-full mx-auto -mt-24 max-md:mt-0 max-sm:flex-wrap max-sm:justify-around ">
|
||||
{boxItems.map((item, index) => {
|
||||
return (
|
||||
<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: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-md:shadow-[0px_0px_8px_0px_#00000040]
|
||||
"
|
||||
|
|
@ -255,6 +265,7 @@ export default function Landing() {
|
|||
{/* Counter */}
|
||||
{/* <Counter /> */}
|
||||
{/*SubmitRequest */}
|
||||
<SubmitRequest />
|
||||
{/* Footer */}
|
||||
<Footer />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -86,16 +86,12 @@
|
|||
src: url(../fonts/iranyekanwebmediumfanum.ttf);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "yekan-eng";
|
||||
src: url(../fonts/IRANYekanRegular.ttf);
|
||||
}
|
||||
|
||||
.leaflet-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
|
||||
.printPage {
|
||||
background-color: antiquewhite;
|
||||
color: black;
|
||||
|
|
@ -117,8 +113,7 @@
|
|||
background-color: rgba(255, 255, 255, 0.886);
|
||||
color: blue !important;
|
||||
/*font-size: 10px;
|
||||
*/
|
||||
border-radius: 8px;
|
||||
*/border-radius: 8px;
|
||||
}
|
||||
|
||||
/* Optional: Adjust the position of the navigation buttons */
|
||||
|
|
@ -138,4 +133,3 @@
|
|||
font-size: 1em !important;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { EnvScript, PublicEnvScript } from "next-runtime-env";
|
|||
|
||||
export const metadata: Metadata = {
|
||||
title: "عیون",
|
||||
description: "هر گونه فساد در شهرداری یزد را به راحتی گزارش دهید.",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
|
|
@ -29,7 +29,7 @@ export default function RootLayout({
|
|||
<Navbar />
|
||||
{/* <NavbarSm /> */}
|
||||
|
||||
<div className="flex justify-center mt-16 sm:mt-14">
|
||||
<div className="flex justify-center mt-20 sm:mt-14">
|
||||
<ProgressBarProviders>{children}</ProgressBarProviders>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,66 +7,36 @@ import {
|
|||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} 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 { Button } from "./ui/button";
|
||||
export default function AttachmentsDialog({
|
||||
children,
|
||||
attachments,
|
||||
deleteFile,
|
||||
deleteAllAttachmentsFiles,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
attachments: File[] | [];
|
||||
deleteFile: (file: any) => void;
|
||||
deleteAllAttachmentsFiles: () => void;
|
||||
}) {
|
||||
return (
|
||||
<Dialog>
|
||||
{children}
|
||||
<DialogContent className=" max-h-[95vh] overflow-y-auto max-sm:p-0">
|
||||
<AlertDialog>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle className=" mt-7">پیوستها</DialogTitle>
|
||||
<DialogDescription className="max-md:px-2 py-5 w-full">
|
||||
{attachments.length != 0 && (
|
||||
<AlertDialogTrigger>
|
||||
<Button className=" mb-2 absolute right-3 top-1 p-1 bg-white hover:bg-white text-red-600 ">
|
||||
حذف همه
|
||||
</Button>{" "}
|
||||
</AlertDialogTrigger>
|
||||
)}
|
||||
|
||||
<DialogTitle>پیوستها</DialogTitle>
|
||||
<DialogDescription>
|
||||
{attachments.length == 0 ? (
|
||||
<div className=" text-center my-5">هیج پیوستی وجود ندارد.</div>
|
||||
) : (
|
||||
<div className=" flex flex-col gap-2 mt-2 h-full mx-2">
|
||||
<div className=" flex flex-col gap-2 mt-2">
|
||||
{attachments?.map((item,index) => {
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className=" flex gap-2 w-full items-center"
|
||||
>
|
||||
<div 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">
|
||||
{index + 1}
|
||||
</div>
|
||||
<div className="bg-gray-200 p-2 rounded-lg max-w-full justify-between flex flex-1">
|
||||
<div className="">
|
||||
<p className=" truncate max-w-[16rem]">
|
||||
{item.name}
|
||||
</p>
|
||||
<p className=" truncate">{item.name}</p>
|
||||
</div>
|
||||
|
||||
<X
|
||||
|
|
@ -79,27 +49,8 @@ export default function AttachmentsDialog({
|
|||
})}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<AlertDialogContent>
|
||||
<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>
|
||||
</Dialog>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -14,16 +14,13 @@ import { useQuery } from "@tanstack/react-query";
|
|||
|
||||
export default function CallUs(props: any) {
|
||||
const { position, zoom } = props;
|
||||
|
||||
//query
|
||||
const { data, isLoading, isError, refetch } = useQuery({
|
||||
queryKey: ["WebContents", "CallUs"],
|
||||
queryFn: () => getSingleWebContents("CallUs"),
|
||||
refetchOnWindowFocus: false,
|
||||
});
|
||||
|
||||
console.log(data);
|
||||
const fetchedContent = data?.content || "";
|
||||
|
||||
return (
|
||||
<div className="bg-white dark:bg-gray-900 pt-8 3xl:w-[60%] w-[80%] ">
|
||||
<div className="w-full">
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ export default function CitizenLogin() {
|
|||
|
||||
return (
|
||||
<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]
|
||||
h-3/4 max-md:p-8 z-10 bg-[url('/img/yazd1.png')] bg-no-repeat bg-bottom bg-contain"
|
||||
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-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">
|
||||
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />
|
||||
|
|
@ -139,10 +139,7 @@ export default function CitizenLogin() {
|
|||
رمز عبور
|
||||
</FormLabel> */}
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="کد امنیتی"
|
||||
{...field}
|
||||
/>
|
||||
<Input placeholder="کد امنیتی" {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
|
|
|
|||
|
|
@ -47,11 +47,7 @@ export default function ComplainsDetails({
|
|||
const storeData = useData((state) => state.data);
|
||||
let data;
|
||||
|
||||
const openFileInNewTab = (
|
||||
base64Data: any,
|
||||
fileType: any,
|
||||
fileName?: string
|
||||
) => {
|
||||
const openFileInNewTab = (base64Data: any, fileType: any) => {
|
||||
const blob = b64toBlob(base64Data, fileType);
|
||||
const blobUrl = URL.createObjectURL(blob);
|
||||
const newTab = window.open();
|
||||
|
|
@ -70,7 +66,9 @@ export default function ComplainsDetails({
|
|||
`<iframe width="100%" height="100%" src="${blobUrl}"></iframe>`
|
||||
);
|
||||
} else {
|
||||
downloadFile(base64Data, fileName, fileType);
|
||||
newTab.document.write(
|
||||
`<a href="${blobUrl}" target="_blank">Open in New Tab</a>`
|
||||
);
|
||||
}
|
||||
|
||||
newTab.document.write("</body></html>");
|
||||
|
|
@ -162,10 +160,10 @@ export default function ComplainsDetails({
|
|||
<AlertDialogHeader dir="rtl">
|
||||
<AlertDialogTitle dir="rtl">رمز عبور</AlertDialogTitle>
|
||||
<AlertDialogDescription className=" w-full mx-auto">
|
||||
برای مشاهده گزارش رمز عبور خود را وارد نمایید.
|
||||
برای مشاهده درخواست رمز عبور خود را وارد نمایید.
|
||||
</AlertDialogDescription>
|
||||
</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> */}
|
||||
<Input
|
||||
dir="ltr"
|
||||
|
|
@ -207,15 +205,11 @@ export default function ComplainsDetails({
|
|||
)} */}
|
||||
|
||||
{/* 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 */}
|
||||
<div
|
||||
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="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[80vh] max-lg:order-3">
|
||||
{/* ***** */}
|
||||
<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>
|
||||
|
|
@ -231,16 +225,12 @@ export default function ComplainsDetails({
|
|||
</div>
|
||||
|
||||
{/* 2 */}
|
||||
<div
|
||||
className={`flex flex-col self-stretch w-full gap-2 rounded-lg lg:w-2/3 ${
|
||||
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">
|
||||
<div 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">
|
||||
{data?.user == null ? (
|
||||
<>
|
||||
<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 className="text-[#2e2a2a] text-sm font-medium">
|
||||
|
|
@ -250,7 +240,7 @@ export default function ComplainsDetails({
|
|||
</span>
|
||||
</p>
|
||||
<p className="text-[#464646] text-sm font-medium">
|
||||
واحد مرتبط:{" "}
|
||||
دستگاه مربوطه:{" "}
|
||||
<span className="text-[#7C838A] text-sm font-medium">
|
||||
{data?.complaintOrganization
|
||||
? data?.complaintOrganization.title
|
||||
|
|
@ -258,7 +248,7 @@ export default function ComplainsDetails({
|
|||
</span>
|
||||
</p>
|
||||
<p className="text-[#464646] text-sm font-medium">
|
||||
فرد مرتبط:{" "}
|
||||
فرد مربوطه:{" "}
|
||||
<span className="text-[#7C838A] text-sm font-medium">
|
||||
{data.complaining ? data.complaining : "-"}
|
||||
</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">
|
||||
<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 className="text-[#2e2a2a] text-sm font-medium">
|
||||
|
|
@ -290,7 +280,7 @@ export default function ComplainsDetails({
|
|||
</span>
|
||||
</p>
|
||||
<p className="text-[#464646] text-sm font-medium">
|
||||
دستگاه مرتبط:{" "}
|
||||
دستگاه مربوطه:{" "}
|
||||
<span className="text-[#7C838A] text-sm font-medium">
|
||||
{data?.complaintOrganization
|
||||
? data?.complaintOrganization.title
|
||||
|
|
@ -298,7 +288,7 @@ export default function ComplainsDetails({
|
|||
</span>
|
||||
</p>
|
||||
<p className="text-[#464646] text-sm font-medium">
|
||||
فرد مرتبط:{" "}
|
||||
فرد مربوطه:{" "}
|
||||
<span className="text-[#7C838A] text-sm font-medium">
|
||||
{data.complaining ? data.complaining : "-"}
|
||||
</span>
|
||||
|
|
@ -346,52 +336,35 @@ export default function ComplainsDetails({
|
|||
</div>
|
||||
|
||||
<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>
|
||||
<div
|
||||
className="flex flex-col mt-4 gap-y-4 overflow-auto
|
||||
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 (
|
||||
<>
|
||||
<div className="flex max-sm:flex-col flex-row gap-2 m-1">
|
||||
<div className="flex">
|
||||
<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}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
key={item.id}
|
||||
className="p-4 bg-white rounded-lg shadow-md w-full relative"
|
||||
className="p-4 bg-white rounded-lg shadow-md "
|
||||
>
|
||||
<div className="flex items-center sm:gap-4 justify-between flex-col sm:flex-row gap-1">
|
||||
<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">
|
||||
{array.length - index}
|
||||
</span> */}
|
||||
<div className="flex items-center gap-4 justify-between">
|
||||
<p className="">
|
||||
<Badge className="bg-blue">
|
||||
{
|
||||
item.operationWithDescription
|
||||
.description
|
||||
}{" "}
|
||||
توسط{" "}
|
||||
<Badge>
|
||||
{item.operationWithDescription.description} توسط{" "}
|
||||
{item.sender == 0 ? "شهروند" : "بازرس"}
|
||||
</Badge>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p className="">
|
||||
<span className="text-blue text-sm">
|
||||
<span className="text-[#7C838A] 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">
|
||||
<span className="text-[#7C838A] text-sm">
|
||||
{item.text ? item.text : "-"}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -400,29 +373,27 @@ export default function ComplainsDetails({
|
|||
)} */}
|
||||
<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">
|
||||
{item?.media.map(
|
||||
(item: any, index: number) => {
|
||||
{item?.media.map((item: any, index: number) => {
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center cursor-pointer"
|
||||
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
|
||||
>
|
||||
<a
|
||||
onClick={() =>
|
||||
openFileInNewTab(
|
||||
item.data,
|
||||
item.mimeType,
|
||||
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 " />
|
||||
</div>
|
||||
<p className=" max-sm:max-w-[40vw] max-w-full truncate ">
|
||||
<p className=" max-w-[5rem] truncate">
|
||||
{item.title}
|
||||
</p>
|
||||
</div>
|
||||
{/* <ArrowDownToLine
|
||||
</a>
|
||||
<ArrowDownToLine
|
||||
className="cursor-pointer "
|
||||
onClick={() =>
|
||||
downloadFile(
|
||||
|
|
@ -431,16 +402,13 @@ export default function ComplainsDetails({
|
|||
item.mimeType
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
/>
|
||||
</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="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>
|
||||
|
||||
|
|
@ -124,8 +124,6 @@ export default function FollowUp() {
|
|||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
autoComplete="new-password"
|
||||
type="password"
|
||||
placeholder="رمز عبور خود را وارد کنید"
|
||||
{...field}
|
||||
/>
|
||||
|
|
@ -155,7 +153,7 @@ export default function FollowUp() {
|
|||
/>
|
||||
</div>
|
||||
) : (
|
||||
"پیگیری گزارش"
|
||||
"پیگیری درخواست"
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default function Footer() {
|
|||
</h2>
|
||||
|
||||
<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
|
||||
className=" !text-white footer"
|
||||
dangerouslySetInnerHTML={{ __html: fetchedContent }}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import { useMutation, useQuery } from "@tanstack/react-query";
|
|||
import { OperateByInspector } from "@/utils/inspectorApi";
|
||||
import { toast } from "sonner";
|
||||
import { postComplaintsDetails } from "@/utils/citizenApi";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { DialogTrigger } from "./ui/dialog";
|
||||
import AttachmentsDialog from "./AttachmentsDialog";
|
||||
import { Eye, Upload } from "lucide-react";
|
||||
|
|
@ -52,7 +52,6 @@ export default function InspectorOperations({
|
|||
password?: string;
|
||||
}) {
|
||||
const [first, setfirst] = useState<File[]>([]);
|
||||
const [charCount, setCharCount] = useState(0);
|
||||
|
||||
// Queries
|
||||
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
|
||||
function onSubmit(data: z.infer<typeof FormSchema>) {
|
||||
const formData = new FormData();
|
||||
|
|
@ -152,11 +136,6 @@ export default function InspectorOperations({
|
|||
OperationMutation.mutate(formData);
|
||||
}
|
||||
|
||||
const deleteAllAttachmentsFiles = () => {
|
||||
setfirst([]);
|
||||
form.setValue("media", []);
|
||||
};
|
||||
|
||||
const deleteFileFromAttachments = (file: any) => {
|
||||
const filtered = first?.filter((item) => item.name !== file);
|
||||
setfirst(filtered);
|
||||
|
|
@ -170,42 +149,25 @@ export default function InspectorOperations({
|
|||
const formatSize = (size: number) => {
|
||||
const string = formatBytes(size);
|
||||
return (
|
||||
<span className="">
|
||||
{string[0]} {string[1]}
|
||||
<span className="" dir="ltr">
|
||||
{string}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="flex flex-col h-full"
|
||||
>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="text"
|
||||
render={({ field, fieldState: { error } }) => (
|
||||
<FormItem>
|
||||
<FormLabel className="">
|
||||
متن({charCount}/{data?.maxTextLength})
|
||||
</FormLabel>
|
||||
<FormLabel className="">متن</FormLabel>
|
||||
<FormControl>
|
||||
<Textarea
|
||||
className="resize-none bg-white lg:min-h-[19em]"
|
||||
className="resize-none bg-white lg:min-h-[20em]"
|
||||
{...field}
|
||||
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>
|
||||
{!error ? (
|
||||
|
|
@ -230,7 +192,6 @@ export default function InspectorOperations({
|
|||
<AttachmentsDialog
|
||||
attachments={first}
|
||||
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">
|
||||
<Eye className=" w-4 h-4" />
|
||||
|
|
@ -260,13 +221,8 @@ export default function InspectorOperations({
|
|||
const fileArray1 = Array.from(first);
|
||||
const fileArray2 = Array.from(e.target.files);
|
||||
const mergedArray = fileArray1.concat(fileArray2);
|
||||
const uniqueFiles = Array.from(
|
||||
new Map(
|
||||
mergedArray.map((file: any) => [file.name, file])
|
||||
).values()
|
||||
);
|
||||
setfirst(uniqueFiles);
|
||||
field.onChange(uniqueFiles);
|
||||
setfirst(mergedArray);
|
||||
field.onChange(mergedArray);
|
||||
} else if (!first && e.target.files) {
|
||||
const fileArray2 = Array.from(e.target.files);
|
||||
setfirst(fileArray2);
|
||||
|
|
@ -279,7 +235,7 @@ export default function InspectorOperations({
|
|||
<FormDescription className=" text-xs my-1 ">
|
||||
<span>
|
||||
حجم هر فایل حداکثر می بایست {formatSize(data?.maxFileSize)}{" "}
|
||||
باشد
|
||||
مگابایت باشد
|
||||
</span>{" "}
|
||||
و{" "}
|
||||
{`تعداد فایل های پیوست شده می بایست حداکثر ${data?.maxFileCount} تا باشد.`}
|
||||
|
|
@ -290,7 +246,7 @@ export default function InspectorOperations({
|
|||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<div className="flex justify-between gap-2 mt-auto">
|
||||
<div className="flex justify-between gap-2 mt-3 ">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="operation"
|
||||
|
|
@ -314,15 +270,9 @@ export default function InspectorOperations({
|
|||
/>
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent
|
||||
ref={(ref) => {
|
||||
if (!ref) return;
|
||||
ref.ontouchstart = (e) => e.preventDefault();
|
||||
}}
|
||||
dir="rtl"
|
||||
>
|
||||
<SelectContent dir="rtl">
|
||||
<SelectGroup>
|
||||
<SelectLabel>نوع عملیات</SelectLabel>
|
||||
<SelectLabel>عملیات</SelectLabel>
|
||||
{possibleOperations.map((item: any) => {
|
||||
return (
|
||||
<SelectItem
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export default function Navbar() {
|
|||
setAuth(false);
|
||||
}
|
||||
}, [isAuth, token]);
|
||||
|
||||
console.log(pathname);
|
||||
return (
|
||||
<div className={` left-0 right-0 top-0 z-20 fixed`}>
|
||||
{/* <TopNav /> */}
|
||||
|
|
@ -74,7 +74,7 @@ export default function Navbar() {
|
|||
<Link
|
||||
onClick={() => setOpen((prev) => !prev)}
|
||||
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}
|
||||
>
|
||||
<span className="flex gap-1 text-sm">
|
||||
|
|
@ -107,7 +107,7 @@ export default function Navbar() {
|
|||
<Link
|
||||
onClick={() => setOpen((prev) => !prev)}
|
||||
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}
|
||||
>
|
||||
<span className="flex gap-1 text-sm">
|
||||
|
|
@ -126,23 +126,22 @@ export default function Navbar() {
|
|||
</AnimatePresence>
|
||||
</div>
|
||||
<div className=" flex items-center max-md:mr-1 gap-5">
|
||||
<Link href="/" className="">
|
||||
<Link href="/" className=" max-sm:hidden">
|
||||
<Image
|
||||
src="/img/logo2.png"
|
||||
src="/img/logo.png"
|
||||
quality={100}
|
||||
alt="log"
|
||||
width={2000}
|
||||
height={2000}
|
||||
className="w-28 h-18"
|
||||
width={32}
|
||||
height={32}
|
||||
/>
|
||||
</Link>
|
||||
|
||||
{/* <div className=" text-brown flex flex-col text-center">
|
||||
<div className=" text-brown flex flex-col text-center">
|
||||
<Link href="/">
|
||||
<h1 className="text-[23px] w-full">عیــون</h1>
|
||||
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1>
|
||||
</Link>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
<div className=" flex gap-5 items-center mr-8 max-md:hidden">
|
||||
{auth ? (
|
||||
|
|
|
|||
|
|
@ -37,12 +37,7 @@ export default function NavbarSm() {
|
|||
sticky top-0
|
||||
shadow-md`}
|
||||
>
|
||||
<Hamburger
|
||||
toggled={isOpen}
|
||||
size={20}
|
||||
toggle={setOpen}
|
||||
direction="right"
|
||||
/>
|
||||
<Hamburger toggled={isOpen} size={20} toggle={setOpen} direction="right"/>
|
||||
{auth && <ProfileDropDown />}
|
||||
{/* <Link href="/Login">
|
||||
<Button className=" bg-blue hover:bg-blue/90 rounded-lg text-xs ">
|
||||
|
|
@ -82,7 +77,7 @@ export default function NavbarSm() {
|
|||
<Link
|
||||
onClick={() => setOpen((prev) => !prev)}
|
||||
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}
|
||||
>
|
||||
<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 " />}
|
||||
pageClassName=" w-10 h-10 grid place-content-center rounded-lg !text-blue shadow-md"
|
||||
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"
|
||||
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"
|
||||
nextLinkClassName=" 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"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ const PrintButton: React.FC<PrintButtonProps> = ({ handlePrint }) => {
|
|||
return (
|
||||
<button
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -74,10 +74,7 @@ export default function ProfileDropDown() {
|
|||
className=" max-sm:-mr-8 max-sm:text-xs w-12"
|
||||
asChild
|
||||
>
|
||||
<Button
|
||||
variant="outline"
|
||||
className=" truncate w-32 grid place-content-center"
|
||||
>
|
||||
<Button variant="outline" className=" truncate w-32 grid place-content-center">
|
||||
{/* {profileData?.title ? profileData?.title : profileData?.userName} */}
|
||||
<p className=" truncate w-full">
|
||||
{" "}
|
||||
|
|
@ -95,7 +92,7 @@ export default function ProfileDropDown() {
|
|||
</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => router.push("/Account/Complaints")}>
|
||||
<CreditCard className="w-4 h-4 ml-2" />
|
||||
<span>گزارش های من</span>
|
||||
<span>درخواست های من</span>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
<DropdownMenuSeparator />
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export default function Result() {
|
|||
const handlePrint = useReactToPrint({
|
||||
// content: () => contentRef.current,
|
||||
content: () => {
|
||||
console.log(contentRef.current); // Log the content to the console
|
||||
return contentRef.current;
|
||||
},
|
||||
});
|
||||
|
|
@ -72,15 +73,14 @@ export default function Result() {
|
|||
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
|
||||
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||
3xl:text-base 3xl:font-bold "
|
||||
>
|
||||
رمز عبور :
|
||||
<span className="text-slate-500 mx-2 !font-mono font-extrabold">{`${password}`}</span>
|
||||
رمز عبور :<span className="text-slate-500 mx-2">{`${password}`}</span>
|
||||
</p>
|
||||
|
||||
{/* <Image
|
||||
|
|
@ -90,6 +90,7 @@ export default function Result() {
|
|||
/> */}
|
||||
</div>
|
||||
<div className=" w-full flex flex-col justify-between items-end mt-2">
|
||||
|
||||
<div className="hidden">
|
||||
<PrintPage
|
||||
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>
|
||||
);
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ export default function RequestStep1() {
|
|||
<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">
|
||||
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
||||
فرم ثبت گزارش{" "}
|
||||
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
|
||||
</p>
|
||||
{profileData && (
|
||||
<Form {...form}>
|
||||
|
|
@ -140,6 +140,7 @@ export default function RequestStep1() {
|
|||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="flex justify-center w-full gap-2 mt-8 sm:justify-end">
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ interface Organization {
|
|||
export default function RequestStep2() {
|
||||
const router = useRouter();
|
||||
const [file, setFile] = useState<File[]>([]);
|
||||
const [charCount, setCharCount] = useState(0);
|
||||
const [charCountPerson, setCharCountPerson] = useState(0);
|
||||
|
||||
// Queries
|
||||
const { data: optionsData, isLoading: isLoadingData } = useQuery({
|
||||
|
|
@ -80,22 +78,15 @@ export default function RequestStep2() {
|
|||
message: "لطفا موضوع شکایت را وارد نمایید.",
|
||||
}),
|
||||
OrganizationId: z.string({
|
||||
required_error: "لطفا دستگاه مرتبط را انتخاب نمایید.",
|
||||
}),
|
||||
person: z
|
||||
.string()
|
||||
.min(1, {
|
||||
message: "لطفا نام فرد مورد نظر را بنویسید.",
|
||||
})
|
||||
.max(50, {
|
||||
message: "تعداد کاراکترها بیشتر از حد مجاز میباشد.",
|
||||
required_error: "لطفا دستگاه مربوطه را انتخاب نمایید.",
|
||||
}),
|
||||
person: z.string().optional(),
|
||||
description: z
|
||||
.string()
|
||||
.min(1, {
|
||||
message: "لطفا توضیحات خود را بنویسید.",
|
||||
})
|
||||
.max(optionsData?.maxTextLength, {
|
||||
.max(300, {
|
||||
message: "تعداد کاراکترها بیشتر از حد مجاز میباشد.",
|
||||
}),
|
||||
uploadFile: z
|
||||
|
|
@ -107,9 +98,7 @@ export default function RequestStep2() {
|
|||
)
|
||||
.refine(
|
||||
(files) => files.every((item) => item.size < optionsData?.maxFileSize),
|
||||
`حجم هر فایل حداکثر می بایست ${formatBytes(
|
||||
optionsData?.maxFileSize
|
||||
)} باشد.`
|
||||
`حجم هر فایل حداکثر می بایست ${optionsData?.maxFileSize} مگابایت باشد.`
|
||||
)
|
||||
.nullish(),
|
||||
categoryId: z.string({
|
||||
|
|
@ -141,13 +130,9 @@ export default function RequestStep2() {
|
|||
mutationKey: ["authorizedComplaintSubmit"],
|
||||
mutationFn: postAuthorizedComplaintSubmit,
|
||||
onSuccess: (res) => {
|
||||
const currentDate = new Date();
|
||||
const formattedDate = currentDate.toISOString();
|
||||
|
||||
localStorage.setItem("trackingNumber", res.trackingNumber);
|
||||
localStorage.setItem("password", res.password);
|
||||
// localStorage.setItem("registeredAt", res.registeredAt);
|
||||
localStorage.setItem("registeredAt", formattedDate);
|
||||
localStorage.setItem("registeredAt", res.registeredAt);
|
||||
localStorage.removeItem("authorized");
|
||||
localStorage.removeItem("unknown");
|
||||
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>) {
|
||||
const formData = new FormData();
|
||||
formData.append("Title", data.title);
|
||||
|
|
@ -232,7 +193,7 @@ export default function RequestStep2() {
|
|||
}
|
||||
formData.append("Captcha.Value", data.captchaValue);
|
||||
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);
|
||||
const unknown = localStorage.getItem("unknown");
|
||||
const isAuth = getCookie("Sootzani_Token");
|
||||
|
|
@ -261,11 +222,6 @@ export default function RequestStep2() {
|
|||
form.setValue("uploadFile", filtered);
|
||||
};
|
||||
|
||||
const deleteAllAttachmentsFiles = () => {
|
||||
setFile([]);
|
||||
form.setValue("uploadFile", []);
|
||||
};
|
||||
|
||||
const allowedExtensions = optionsData?.allowedExtensions;
|
||||
const split = allowedExtensions?.split(",");
|
||||
const withDot = split?.map((item: string) => "." + item);
|
||||
|
|
@ -280,31 +236,28 @@ export default function RequestStep2() {
|
|||
};
|
||||
|
||||
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="flex flex-col justify-center h-full space-y-3 md:space-y-3">
|
||||
<span 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">
|
||||
لطفا جهت ارسال گزارش فرم زیر را تکمیل نمایید.
|
||||
<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-4">
|
||||
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
|
||||
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
|
||||
</p>
|
||||
|
||||
<Form {...form}>
|
||||
<form
|
||||
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
|
||||
control={form.control}
|
||||
name="title"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
||||
<span className=" text-red-500">*</span>موضوع گزارش
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||
*موضوع شکایت
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="موضوع گزارش خود را بنویسید"
|
||||
placeholder="موضوع شکایت خود را بنویسید"
|
||||
{...field}
|
||||
/>
|
||||
</FormControl>
|
||||
|
|
@ -312,14 +265,14 @@ export default function RequestStep2() {
|
|||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<div className="flex flex-row flex-wrap justify-between max-sm:gap-3">
|
||||
<div className="flex flex-row flex-wrap justify-between">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="OrganizationId"
|
||||
render={({ field }) => (
|
||||
<FormItem className=" w-full sm:w-[48%]">
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
||||
<span className=" text-red-500">*</span>واحد مورد گزارش
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||
*دستگاه مربوطه
|
||||
</FormLabel>
|
||||
<Select
|
||||
onValueChange={field.onChange}
|
||||
|
|
@ -333,17 +286,11 @@ export default function RequestStep2() {
|
|||
>
|
||||
<SelectValue
|
||||
className=""
|
||||
placeholder="واحد مورد گزارش را انتخاب نمایید."
|
||||
placeholder="دستگاه مربوطه را انتخاب نمایید."
|
||||
/>
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent
|
||||
ref={(ref) => {
|
||||
if (!ref) return;
|
||||
ref.ontouchstart = (e) => e.preventDefault();
|
||||
}}
|
||||
dir="rtl"
|
||||
>
|
||||
<SelectContent dir="rtl">
|
||||
<SelectGroup>
|
||||
{organizationsData?.map((item: any) => {
|
||||
return (
|
||||
|
|
@ -365,24 +312,13 @@ export default function RequestStep2() {
|
|||
name="person"
|
||||
render={({ field }) => (
|
||||
<FormItem className=" w-full sm:w-[48%]">
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
||||
فرد مرتبط
|
||||
{/* ({charCountPerson}/{50}) */}
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||
فرد مربوطه
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="نام فرد مورد نظر خود را بنویسید"
|
||||
{...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>
|
||||
<FormMessage />
|
||||
|
|
@ -397,28 +333,13 @@ export default function RequestStep2() {
|
|||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||
توضیحات ({charCount}/{optionsData?.maxTextLength})
|
||||
توضیحات
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Textarea
|
||||
placeholder=" توضیحات خود را بنویسید"
|
||||
placeholder="متن توضیحات خود را بنویسید"
|
||||
className="mb-3 resize-none"
|
||||
{...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>
|
||||
<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 */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="categoryId"
|
||||
render={({ field }) => (
|
||||
<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>
|
||||
<Select
|
||||
|
|
@ -446,12 +367,7 @@ export default function RequestStep2() {
|
|||
<SelectValue placeholder=" دسته بندی ها" />
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent
|
||||
ref={(ref) => {
|
||||
if (!ref) return;
|
||||
ref.ontouchstart = (e) => e.preventDefault();
|
||||
}}
|
||||
>
|
||||
<SelectContent>
|
||||
{categoryData?.map((catItems: any, index: any) => (
|
||||
<SelectItem key={index} value={catItems.id}>
|
||||
{catItems.title}
|
||||
|
|
@ -490,7 +406,6 @@ export default function RequestStep2() {
|
|||
<AttachmentsDialog
|
||||
attachments={file}
|
||||
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">
|
||||
<Eye className=" w-4 h-4" />
|
||||
|
|
@ -519,24 +434,9 @@ export default function RequestStep2() {
|
|||
if (file && e.target.files) {
|
||||
const fileArray1 = Array.from(file);
|
||||
const fileArray2 = Array.from(e.target.files);
|
||||
const mergedArray: File[] =
|
||||
fileArray1.concat(fileArray2);
|
||||
const allFiles = mergedArray.map((item) => {
|
||||
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);
|
||||
const mergedArray = fileArray1.concat(fileArray2);
|
||||
setFile(mergedArray);
|
||||
field.onChange(mergedArray);
|
||||
} else if (!file && e.target.files) {
|
||||
const fileArray2 = Array.from(e.target.files);
|
||||
setFile(fileArray2);
|
||||
|
|
@ -545,19 +445,18 @@ export default function RequestStep2() {
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
{!error ? (
|
||||
{/* {!error ? (
|
||||
<FormDescription className=" text-xs my-1 ">
|
||||
<span>
|
||||
حجم هر فایل حداکثر می بایست{" "}
|
||||
{formatSize(optionsData?.maxFileSize)} باشد
|
||||
{formatSize(optionsData?.maxFileSize)} مگابایت باشد
|
||||
</span>{" "}
|
||||
و{" "}
|
||||
{`تعداد فایل های پیوست شده می بایست حداکثر ${optionsData?.maxFileCount} تا باشد.`}
|
||||
</FormDescription>
|
||||
) : (
|
||||
<FormMessage />
|
||||
)}
|
||||
{/* <FormMessage /> */}
|
||||
)} */}
|
||||
</FormItem>
|
||||
);
|
||||
}}
|
||||
|
|
@ -571,7 +470,7 @@ export default function RequestStep2() {
|
|||
render={({ field }) => (
|
||||
<FormItem className="w-1/2 ">
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||
<span className=" text-red-500">*</span>کد امنیتی
|
||||
*کد امنیتی
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
|
|
@ -616,10 +515,10 @@ export default function RequestStep2() {
|
|||
)}
|
||||
</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
|
||||
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 ||
|
||||
complaintSubmitMutation.isPending ? (
|
||||
|
|
@ -635,7 +534,7 @@ export default function RequestStep2() {
|
|||
/>
|
||||
</div>
|
||||
) : (
|
||||
"ارسال گزارش"
|
||||
"ارسال درخواست"
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { IoArrowDown } from "react-icons/io5";
|
|||
|
||||
export default function SubmitRequest() {
|
||||
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">
|
||||
<p className="text-sm font-normal text-right text-black">
|
||||
درباره سامانه عیون
|
||||
|
|
@ -25,12 +25,9 @@ export default function SubmitRequest() {
|
|||
</p>
|
||||
<Link
|
||||
href="/RequestStep2"
|
||||
onClick={() => {
|
||||
localStorage.setItem("unknown", "true");
|
||||
}}
|
||||
className="text-sm font-bold text-blue text-left underline underline-offset-4"
|
||||
>
|
||||
برای شروع ارسال گزارش کلیک کنید.
|
||||
برای شروع ارسال درخواست کلیک کنید.
|
||||
</Link>
|
||||
</div>
|
||||
<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 (
|
||||
<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
|
||||
onClick={() => {
|
||||
router.push("/RequestStep2");
|
||||
localStorage.removeItem("unknown");
|
||||
localStorage.removeItemItem("unknown");
|
||||
}}
|
||||
className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs"
|
||||
>
|
||||
ثبت گزارش
|
||||
ثبت درخواست
|
||||
</Button>
|
||||
|
||||
<Search
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export default function TableController({ data }: { data: Complaint[] }) {
|
|||
<div>
|
||||
<Table className="border-[1px] border-solid border-muted rounded-md mb-20">
|
||||
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
|
||||
<TableHeader className="bg-white">
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<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>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody className="bg-[#F5F5F5]">
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ export default function Verify() {
|
|||
}, [otp]);
|
||||
return (
|
||||
<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]
|
||||
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"
|
||||
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-full max-md:p-8 pt-12 relative"
|
||||
>
|
||||
{CitizenVerifyMutation.isPending && (
|
||||
<div className="absolute top-3 left-5 ">
|
||||
|
|
@ -88,7 +88,7 @@ export default function Verify() {
|
|||
/>
|
||||
</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 " />
|
||||
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
تایید کد
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
"use client";
|
||||
import React, { useEffect } from "react";
|
||||
// import { convertDate } from "@/lib/utils";
|
||||
import dayjs from "dayjs";
|
||||
// components/PrintPage.tsx
|
||||
import React from "react";
|
||||
|
||||
interface PrintPageProps {
|
||||
contentRef: React.RefObject<any>;
|
||||
|
|
@ -10,22 +8,6 @@ interface PrintPageProps {
|
|||
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> = ({
|
||||
contentRef,
|
||||
fetchedContent,
|
||||
|
|
@ -35,27 +17,17 @@ const PrintPage: React.FC<PrintPageProps> = ({
|
|||
return (
|
||||
<div
|
||||
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"
|
||||
>
|
||||
<div className="flex flex-col absolute top-[125px] left-[104px] text-xs gap-1">
|
||||
<p>سامانه نظارت شهرداری یزد</p>
|
||||
<p>
|
||||
تاریخ: <span>{convertedDate}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
dangerouslySetInnerHTML={{ __html: fetchedContent }}
|
||||
className=" mt-16 text-justify"
|
||||
/>
|
||||
<div dangerouslySetInnerHTML={{ __html: fetchedContent }} className=" mt-16 text-justify" />
|
||||
|
||||
<p >
|
||||
کد پیگیری : <span>{trackingNumber}</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
رمز عبور : <span className="font-mono">{password}</span>
|
||||
رمز عبور : <span>{password}</span>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,16 +1,21 @@
|
|||
"use client";
|
||||
"use client"
|
||||
|
||||
import * as React from "react";
|
||||
import * as SelectPrimitive from "@radix-ui/react-select";
|
||||
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
||||
import * as React from "react"
|
||||
import {
|
||||
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<
|
||||
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
||||
|
|
@ -19,18 +24,18 @@ const SelectTrigger = React.forwardRef<
|
|||
<SelectPrimitive.Trigger
|
||||
ref={ref}
|
||||
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
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<SelectPrimitive.Icon asChild>
|
||||
<ChevronDown className="h-4 w-4 opacity-50" />
|
||||
<CaretSortIcon className="h-4 w-4 opacity-50" />
|
||||
</SelectPrimitive.Icon>
|
||||
</SelectPrimitive.Trigger>
|
||||
));
|
||||
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
||||
))
|
||||
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
||||
|
||||
const SelectScrollUpButton = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
||||
|
|
@ -44,10 +49,10 @@ const SelectScrollUpButton = React.forwardRef<
|
|||
)}
|
||||
{...props}
|
||||
>
|
||||
<ChevronUp className="h-4 w-4" />
|
||||
<ChevronUpIcon />
|
||||
</SelectPrimitive.ScrollUpButton>
|
||||
));
|
||||
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
||||
))
|
||||
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
||||
|
||||
const SelectScrollDownButton = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
||||
|
|
@ -61,11 +66,11 @@ const SelectScrollDownButton = React.forwardRef<
|
|||
)}
|
||||
{...props}
|
||||
>
|
||||
<ChevronDown className="h-4 w-4" />
|
||||
<ChevronDownIcon />
|
||||
</SelectPrimitive.ScrollDownButton>
|
||||
));
|
||||
))
|
||||
SelectScrollDownButton.displayName =
|
||||
SelectPrimitive.ScrollDownButton.displayName;
|
||||
SelectPrimitive.ScrollDownButton.displayName
|
||||
|
||||
const SelectContent = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Content>,
|
||||
|
|
@ -96,8 +101,8 @@ const SelectContent = React.forwardRef<
|
|||
<SelectScrollDownButton />
|
||||
</SelectPrimitive.Content>
|
||||
</SelectPrimitive.Portal>
|
||||
));
|
||||
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
||||
))
|
||||
SelectContent.displayName = SelectPrimitive.Content.displayName
|
||||
|
||||
const SelectLabel = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Label>,
|
||||
|
|
@ -105,11 +110,11 @@ const SelectLabel = React.forwardRef<
|
|||
>(({ className, ...props }, ref) => (
|
||||
<SelectPrimitive.Label
|
||||
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}
|
||||
/>
|
||||
));
|
||||
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
||||
))
|
||||
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
||||
|
||||
const SelectItem = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Item>,
|
||||
|
|
@ -118,21 +123,20 @@ const SelectItem = React.forwardRef<
|
|||
<SelectPrimitive.Item
|
||||
ref={ref}
|
||||
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
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||
<SelectPrimitive.ItemIndicator>
|
||||
<Check className="h-4 w-4" />
|
||||
<CheckIcon className="h-4 w-4" />
|
||||
</SelectPrimitive.ItemIndicator>
|
||||
</span>
|
||||
|
||||
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
||||
</SelectPrimitive.Item>
|
||||
));
|
||||
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
||||
))
|
||||
SelectItem.displayName = SelectPrimitive.Item.displayName
|
||||
|
||||
const SelectSeparator = React.forwardRef<
|
||||
React.ElementRef<typeof SelectPrimitive.Separator>,
|
||||
|
|
@ -143,8 +147,8 @@ const SelectSeparator = React.forwardRef<
|
|||
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
||||
))
|
||||
SelectSeparator.displayName = SelectPrimitive.Separator.displayName
|
||||
|
||||
export {
|
||||
Select,
|
||||
|
|
@ -157,4 +161,4 @@ export {
|
|||
SelectSeparator,
|
||||
SelectScrollUpButton,
|
||||
SelectScrollDownButton,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { LuMapPin } from "react-icons/lu";
|
||||
import { HiOutlineMail } from "react-icons/hi";
|
||||
import { FiPhone } from "react-icons/fi";
|
||||
import bgimg from "../public/img/bg-slide2.jpg";
|
||||
import bgimg from "../public/img/bg.png";
|
||||
|
||||
export const menuItems = [
|
||||
{ id: 1, name: "صفحه اصلی", href: "/" },
|
||||
|
|
@ -14,7 +14,7 @@ export const menuItems = [
|
|||
export const authorizedMenuItems = [
|
||||
{ id: 1, name: "صفحه اصلی", href: "/" },
|
||||
{ id: 2, name: "پیگیری", href: "/FollowUp" },
|
||||
{ id: 3, name: "گزارش های من", href: "/Account/Complaints" },
|
||||
{ id: 3, name: "درخواست های من", href: "/Account/Complaints" },
|
||||
{ id: 4, name: "اخبار", href: "/News" },
|
||||
{ id: 5, name: "تماس با ما", href: "/CallUs" },
|
||||
];
|
||||
|
|
@ -26,49 +26,38 @@ export const sliderItems = [
|
|||
];
|
||||
|
||||
export const boxItems = [
|
||||
// {
|
||||
// id: 1,
|
||||
// name: " گزارش فساد (ناشناس)",
|
||||
// icon: "/img/box1.svg",
|
||||
// icon2: "/img/box1-hover.svg",
|
||||
// description: "ارسال گزارش بدون احراز هویت",
|
||||
// link: "/RequestStep2",
|
||||
// },
|
||||
{
|
||||
id: 1,
|
||||
name: " گزارش فساد (ناشناس)",
|
||||
icon: "/img/box1.svg",
|
||||
icon2: "/img/box1-hover.svg",
|
||||
description: "ارسال گزارش بدون احراز هویت",
|
||||
link: "/RequestStep2",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: " گزارش فساد",
|
||||
icon: "/img/box1.svg",
|
||||
icon2: "/img/box1-hover.svg",
|
||||
description: "ارسال گزارش ",
|
||||
link: "/RequestStep0",
|
||||
description: "ارسال گزارش با احراز هویت",
|
||||
link: "/CitizenLogin",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "پیگیری گزارش ها",
|
||||
icon: "/img/box2.svg",
|
||||
icon2: "/img/box2-hover.svg",
|
||||
description: "پیگیری گزارش ارسال شده",
|
||||
description: "پیگیری درخواست ارسال شده",
|
||||
link: "/FollowUp",
|
||||
},
|
||||
];
|
||||
|
||||
export const RequestItems = [
|
||||
{
|
||||
id: 1,
|
||||
name: " گزارش فساد (ناشناس)",
|
||||
icon: "/img/box5.svg",
|
||||
icon2: "/img/box5-hover.svg",
|
||||
description: "ارسال گزارش بدون احراز هویت",
|
||||
link: "/RequestStep2",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: " گزارش فساد (شناس)",
|
||||
icon: "/img/box4-hover.svg",
|
||||
icon2: "/img/box4.svg",
|
||||
description: "ارسال گزارش با احراز هویت",
|
||||
link: "/CitizenLogin",
|
||||
},
|
||||
// {
|
||||
// id: 3,
|
||||
// name: "مشاهده آمار",
|
||||
// icon: "/img/box3.svg",
|
||||
// icon2: "/img/box3-hover.svg",
|
||||
// description: "مشاهده آمار و گزارشات درخواست ها",
|
||||
// link: "/",
|
||||
// },
|
||||
];
|
||||
|
||||
export const newsItems = [
|
||||
|
|
@ -104,10 +93,10 @@ export const counterItems = [
|
|||
];
|
||||
|
||||
export const requestItems = [
|
||||
{ id: 1, name: "گزارش از طرف شهروند" },
|
||||
{ id: 1, name: "درخواست از طرف شهروند" },
|
||||
{ id: 2, name: "دریافت کد رهگیری" },
|
||||
{ id: 3, name: "بررسی توسط بازرس شهرداری" },
|
||||
{ id: 4, name: " اعلام نتیجه گزارش" },
|
||||
{ id: 4, name: " اعلام نتیجه درخواست" },
|
||||
];
|
||||
|
||||
export const aboutFooterItems = [
|
||||
|
|
|
|||
31
lib/utils.ts
|
|
@ -47,18 +47,37 @@ export function isAuthorized() {
|
|||
export function bytesToMB(bytes: number) {
|
||||
return Math.floor(bytes / (1024 * 1024));
|
||||
}
|
||||
|
||||
export function formatBytes(bytes: number, decimals = 2) {
|
||||
console.log(bytes);
|
||||
if (!+bytes) return "0 Bytes";
|
||||
|
||||
const k = 1024;
|
||||
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 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 [psFloaat , sz]
|
||||
|
||||
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.5",
|
||||
"version": "0.1.22",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sootzani",
|
||||
"version": "0.2.5",
|
||||
"version": "0.1.22",
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.3.2",
|
||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.5",
|
||||
"version": "0.1.22",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"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;
|
||||
},
|
||||
async function (error) {
|
||||
console.log(error);
|
||||
const originalRequest = error.config;
|
||||
|
||||
if (error.response.status === 401) {
|
||||
|
|
|
|||