diff --git a/app/Account/Complaints/[id]/page.tsx b/app/Account/Complaints/[id]/page.tsx index e822830..5de1e38 100644 --- a/app/Account/Complaints/[id]/page.tsx +++ b/app/Account/Complaints/[id]/page.tsx @@ -3,5 +3,9 @@ import React from "react"; export default function page({ params }: { params: any }) { const id = params.id; - return ; + return ( +
+ +
+ ); } diff --git a/app/Account/Profile/page.tsx b/app/Account/Profile/page.tsx new file mode 100644 index 0000000..bc36e12 --- /dev/null +++ b/app/Account/Profile/page.tsx @@ -0,0 +1,6 @@ +import Profile from "@/components/Profile"; +import React from "react"; + +export default function page() { + return ; +} diff --git a/app/Login/page.tsx b/app/Login/page.tsx index 8be9d95..fb515d2 100644 --- a/app/Login/page.tsx +++ b/app/Login/page.tsx @@ -7,8 +7,8 @@ import React from "react"; export default function page() { const cookieStore = cookies(); const token = cookieStore.get("Sootzani_Token"); - if (token) { - redirect("/"); - } + // if (!token) { + // redirect("/"); + // } return ; } diff --git a/app/components/Landing.tsx b/app/components/Landing.tsx index 3d35800..6faf06c 100644 --- a/app/components/Landing.tsx +++ b/app/components/Landing.tsx @@ -7,7 +7,7 @@ import { boxItems, newsItems } from "@/constants"; import Image from "next/image"; import { cn } from "@/lib/utils"; import Link from "next/link"; -import bgimg from "../../public/img/bg.png"; +import bgimg from "../../public/img/bg-slide.jpg"; import Footer from "@/components/Footer"; // Import Swiper React components @@ -18,10 +18,20 @@ import "swiper/css/pagination"; // import required modules import { Autoplay, Pagination, Navigation } from "swiper/modules"; import { sliderItems } from "@/constants"; +import { useQuery } from "@tanstack/react-query"; +import { getSliders } from "@/utils/commonApi"; export default function Landing() { + const { data, isLoading, refetch } = useQuery({ + queryKey: ["Sliders"], + queryFn: () => getSliders(), + refetchOnWindowFocus: false, + }); + + console.log(data); + return ( -
+
- {sliderItems.map((item) => { - return ( - - bg - - ); - })} + {data?.length > 0 ? ( + <> + {data.map((item: any, index: number) => { + console.log(item); + return ( + + bg + + ); + })} + {data?.length == 1 && ( + + bg + + )} + + ) : ( + <> + {sliderItems.map((item) => { + return ( + + bg + + ); + })} + + )}
@@ -68,6 +114,12 @@ export default function Landing() { " key={index} href={item.link} + onClick={() => { + localStorage.removeItem("Sootzani_Login_State"); + if (index == 0) { + localStorage.setItem("unknown", "true"); + } + }} >

{item.description} @@ -124,7 +176,7 @@ export default function Landing() { height={500} width={500} quality={100} - className="w-full h-full rounded-r-lg bg-cover object-cover object-top" + className="w-full h-full rounded-r-lg bg-cover object-cover object-center" />

@@ -139,7 +191,7 @@ export default function Landing() { شروع به کار سامانه عیون

- این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور + این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...

diff --git a/app/layout.tsx b/app/layout.tsx index 99afec3..2fc9dcd 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -9,7 +9,7 @@ import { Toaster as SonnerToaster } from "@/components/ui/sonner"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: "Create Next App", + title: "عیون", description: "Generated by create next app", }; @@ -23,9 +23,9 @@ export default function RootLayout({ - + {/* */} -
{children}
+
{children}
diff --git a/components/CitizenLogin.tsx b/components/CitizenLogin.tsx index 38dbddd..4aa48e9 100644 --- a/components/CitizenLogin.tsx +++ b/components/CitizenLogin.tsx @@ -27,6 +27,7 @@ import { useRouter } from "next/navigation"; import { Oval, ThreeDots } from "react-loader-spinner"; import useData from "@/store/useData"; import { getCookie } from "cookies-next"; +import { RefreshCcw } from "lucide-react"; const FormSchema = z.object({ phoneNumber: z.string().min(1, { message: "لطفا شماره موبایل خود را وارد نمایید.", @@ -88,7 +89,7 @@ export default function CitizenLogin() { return (
@@ -157,7 +158,7 @@ export default function CitizenLogin() { />
) : ( -
+
icon + refetch()} + color="#003778" + />
)}
diff --git a/components/ComplainsDetails.tsx b/components/ComplainsDetails.tsx index 82ebfc8..6533ce0 100644 --- a/components/ComplainsDetails.tsx +++ b/components/ComplainsDetails.tsx @@ -12,33 +12,104 @@ import InspectorOperations from "./InspectorOperations"; import { postComplaintTracking } from "@/utils/citizenApi"; import { Button } from "@/components/ui/button"; import { - Dialog, - DialogClose, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "@/components/ui/dialog"; + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from "@/components/ui/alert-dialog"; import { Input } from "./ui/input"; import { toast } from "sonner"; import { useRouter } from "next/navigation"; +import { Triangle } from "react-loader-spinner"; +import { ArrowDownToLine, ArrowRight, File } from "lucide-react"; export default function ComplainsDetails({ id, role, Data, + state, }: { id?: number; role: string; Data?: any; + state?: string; }) { - const [open, setOpen] = useState(true); + const [open, setOpen] = useState( + state == "FollowResult" ? false : true + ); const [password, setPassword] = useState(true); const router = useRouter(); const storeData = useData((state) => state.data); let data; + const openFileInNewTab = (base64Data: any, fileType: any) => { + const blob = b64toBlob(base64Data, fileType); + const blobUrl = URL.createObjectURL(blob); + const newTab = window.open(); + if (newTab) { + newTab.document.write( + 'File Preview' + ); + + // Check the file type and handle accordingly + if (fileType.includes("image")) { + newTab.document.write( + `File Preview` + ); + } else if (fileType === "application/pdf") { + newTab.document.write( + `` + ); + } else { + newTab.document.write( + `Open in New Tab` + ); + } + + newTab.document.write(""); + newTab.document.close(); + + URL.revokeObjectURL(blobUrl); + } else { + console.error("Unable to open a new tab."); + } + }; + + const downloadFile = (base64Data: any, fileName: any, fileType: any) => { + const blob = b64toBlob(base64Data, fileType); + const blobUrl = URL.createObjectURL(blob); + + const link = document.createElement("a"); + link.href = blobUrl; + link.download = fileName; + link.click(); + + URL.revokeObjectURL(blobUrl); + }; + + const b64toBlob = (b64Data: any, contentType = "", sliceSize = 512) => { + const byteCharacters = atob(b64Data); + const byteArrays = []; + + for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) { + const slice = byteCharacters.slice(offset, offset + sliceSize); + + const byteNumbers = new Array(slice.length); + for (let i = 0; i < slice.length; i++) { + byteNumbers[i] = slice.charCodeAt(i); + } + + const byteArray = new Uint8Array(byteNumbers); + byteArrays.push(byteArray); + } + + return new Blob(byteArrays, { type: contentType }); + }; + const getComplaintMutation = useMutation({ mutationKey: ["Complaint", id], mutationFn: postComplaintTracking, @@ -59,6 +130,9 @@ export default function ComplainsDetails({ console.log(storeData); useEffect(() => { useData.persist.rehydrate(); + if (state == "FollowResult") { + setOpen(false); + } }, []); useEffect(() => { // if (storeData && role == "Inspector") { @@ -66,33 +140,37 @@ export default function ComplainsDetails({ // } }, [storeData]); - if (getComplaintMutation.isSuccess) { + if (getComplaintMutation.isSuccess && !Data) { data = getComplaintMutation.data; + } else { + data = Data; } - if (open) { - return ( - - - - رمز عبور - + + return ( + <> + + + + رمز عبور + برای مشاهده درخواست پسورد خود را وارد نمایید. - - -
+ + +
{/* */} setPassword(e.target.value)} + className=" bg-white hover:bg-white focus:bg-white" />
- + @@ -101,60 +179,149 @@ export default function ComplainsDetails({ تایید {/* */} - - -
- ); - } - return ( - <> + + + {data ? ( -
-
-
-

گزارش شکایت

-
-

- موضوع شکایت:{" "} - - {data.title} - + <> + {state !== "FollowResult" && ( + + )} + +

+
+
+

+ گزارش شکایت

-

- دستگاه مربوطه:{" "} - - {data?.complaintOrganization - ? data?.complaintOrganization.title - : "-"} - -

-

- پرسنل مربوطه:{" "} - - {/* {data.title} */} - -

-

- زمان ثبت:{" "} - - {convertDate(data.registeredAt)} - -

- {/*

+

+

+ موضوع شکایت:{" "} + + {data.title} + +

+

+ دستگاه مربوطه:{" "} + + {data?.complaintOrganization + ? data?.complaintOrganization.title + : "-"} + +

+

+ پرسنل مربوطه:{" "} + + {data.complaining ? data.complaining : "-"} + +

+

+ زمان ثبت:{" "} + + {convertDate(data.registeredAt)} + +

+ {/*

{" "} موضوع شکایت:{" "} متن تستی

*/} -
- {/*

+

+ {/*

درخواست شما با کد رهگیری {data.trackingNumber} و رمز عبور 12422 در دست بررسی و اقدام می باشد. در صورت تمایل می توانید با شماره تلفن 0353286545 جهت پشتیبانی تماس حاصل کنید.{" "}

*/} +
+
+

+ انجام عملیات +

+ getComplaintMutation.mutate(storeData)} + role={role} + complaintData={data} + /> +
-
+
+

روند شکایت

+
+ {data.contents?.map((item: any) => { + return ( +
+
+

+ {item.sender == 0 ? "شهروند" : "بازرس"} +

+

+ تاریخ : + + {convertDate(item.dateTime)} + +

+
+
+ + {item.text ? item.text : "-"} + +
+ {/* {item.media.length !== 0 && ( + + )} */} +
+
+ {item?.media.map((item: any, index: number) => { + return ( + + ); + })} +
+
+
+ ); + })} +
+
+

انجام عملیات

@@ -164,50 +331,8 @@ export default function ComplainsDetails({ complaintData={data} />
-
-
-

روند شکایت

-
- {data.contents?.map((item: any) => { - return ( -
-
-

- {item.sender == 0 ? "شهروند" : "بازرس"} -

-

- تاریخ : - - {convertDate(item.dateTime)} - -

-
-
- متن:{" "} - - {item.text ? item.text : "-"} - -
-
- ); - })} -
-
-
-

- انجام عملیات -

- getComplaintMutation.mutate(storeData)} - role={role} - complaintData={data} - /> -
- {/* Left */} - {/*
+ {/* Left */} + {/*

وضعیت درخواست

@@ -245,9 +370,24 @@ export default function ComplainsDetails({ ); })}
*/} -
+
+ ) : ( - "" + <> + {getComplaintMutation.isPending && ( +
+ +
+ )} + )} ); diff --git a/components/FollowResult.tsx b/components/FollowResult.tsx index 2e8bbc6..ea24924 100644 --- a/components/FollowResult.tsx +++ b/components/FollowResult.tsx @@ -87,18 +87,6 @@ export default function FollowResult() { return ( <>
- {/*
*/} - {/*

- درخواست شما با کد رهگیری - {`${trackingNumber}`}و - رمز عبور - {`${password}`} - در دست بررسی و اقدام می باشد. در صورت تمایل می توانید با شماره تلفن - 0353286545 جهت پشتیبانی تماس حاصل کنید. -

*/} {complaintPrintMutation?.data ? ( <>
@@ -195,7 +183,8 @@ export default function FollowResult() {
) : ( diff --git a/components/InspectorOperations.tsx b/components/InspectorOperations.tsx index d3bf63e..cf9123b 100644 --- a/components/InspectorOperations.tsx +++ b/components/InspectorOperations.tsx @@ -52,11 +52,6 @@ export default function InspectorOperations({ .max(260, { message: "Bio must not be longer than 30 characters.", }), - ...(role == "Inspector" && { - type: z.enum(["private", "public"], { - required_error: "لطفا وضعیت عملیات را انتخاب نمایید.", - }), - }), operation: z.string({ required_error: "Please select an email to display.", }), @@ -100,9 +95,6 @@ export default function InspectorOperations({ formData.append("text", data.text); formData.append("trackingNumber", complaintData.trackingNumber); formData.append("Operation", data.operation); - if (data.type) { - formData.append("IsPublic", data.type == "public" ? "true" : "false"); - } if (role == "Inspector") { formData.append("EncodedKey", password); } else { @@ -165,38 +157,6 @@ export default function InspectorOperations({ )} /> - {role == "Inspector" && ( - ( - - - - - - - - خصوصی - - - - - - عمومی - - - - - - )} - /> - )} -
) : ( -
+
icon + refetch()} + color="#003778" + />
)}
diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 70d19ae..c0ab279 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -13,25 +13,82 @@ import { isAuthorized } from "@/lib/utils"; import useToken from "@/store/useToken"; import { DropdownMenu } from "@radix-ui/react-dropdown-menu"; import ProfileDropDown from "./ProfileDropDown"; - +import { getCookie } from "cookies-next"; +import Hamburger from "hamburger-react"; +import { AnimatePresence, motion } from "framer-motion"; export default function Navbar() { const pathname = usePathname(); const isAuth = useToken((state) => state.token); - const [auth, setAuth] = useState(isAuth); + const [auth, setAuth] = useState(); + const [isOpen, setOpen] = useState(false); + const token = getCookie("Sootzani_Token"); useEffect(() => { - useToken.persist.rehydrate(); - setAuth(isAuth); - }, [isAuth]); + const token = getCookie("Sootzani_Token"); + if (token) { + setAuth(true); + } else { + setAuth(false); + } + }, [isAuth ,token]); + return ( -
- -
+
+ {/* */} +
-
+
+ + + {isOpen && ( + +
    + {menuItems.map((item, idx, array) => { + // const { Icon } = item; + const lastItem = array.length - 1; + return ( + + setOpen((prev) => !prev)} + className={`flex items-center justify-between w-full p-3 rounded-xl text-white + ${lastItem === idx ? "bg-yellow" : "bg-blue"} `} + href={item.href} + > + + {item.name} + + {/* */} + + + ); + })} +
+
+ )} +
+
+

عیــون

-

سامانه افشار فساد شهرداری

+

سامانه افشای فساد شهرداری

-
+
{menuItems.map((item, index, array) => { if (array.length - 1 !== index) { return ( @@ -66,7 +123,7 @@ export default function Navbar() { onClick={() => localStorage.setItem("Sootzani_Login_State", "true") } - className=" bg-blue hover:bg-blue/90 rounded-lg" + className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs" > ورود به پنل کاربری diff --git a/components/Profile.tsx b/components/Profile.tsx new file mode 100644 index 0000000..4614ad2 --- /dev/null +++ b/components/Profile.tsx @@ -0,0 +1,175 @@ +"use client"; +import React, { useEffect } from "react"; + +import { zodResolver } from "@hookform/resolvers/zod"; +import { useForm } from "react-hook-form"; +import * as z from "zod"; + +import { Button } from "@/components/ui/button"; +import { + Form, + FormControl, + FormDescription, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; +import { Input } from "@/components/ui/input"; +import { toast } from "@/components/ui/use-toast"; +import Link from "next/link"; +import RequestStep2 from "./RequestStep2"; +import { useMutation, useQuery } from "@tanstack/react-query"; +import { editProfile, getProfile } from "@/utils/authenticateApi"; +import { useRouter } from "next/navigation"; + +const FormSchema = z.object({ + firstName: z.string().min(1, { + message: "لطفا نام خود را وارد نمایید.", + }), + lastName: z.string().min(1, { + message: "لطفا نام خانوادگی خود را وارد نمایید.", + }), + nationalId: z + .string() + .length(10, { message: "کد ملی معتبر نمی باشد." }) + .transform((value) => { + const parsedNumber = Number(value); + if (Number.isNaN(parsedNumber)) { + throw new Error("کد ملی معتبر نمی باشد."); + } else if ( + Number(parsedNumber) > 100000000 && + Number(parsedNumber) < 999999999 + ) { + throw new Error("کد ملی معتبر نمی باشد."); + } + return parsedNumber; + }), +}); + +export default function Profile() { + const router = useRouter(); + const { + data: profileData, + isLoading, + refetch, + } = useQuery({ + queryKey: ["Profile"], + queryFn: () => getProfile(), + refetchOnWindowFocus: false, + }); + + const editProfileMutation = useMutation({ + mutationKey: ["editProfile"], + mutationFn: editProfile, + onSuccess: (res) => { + router.push("/RequestStep2"); + localStorage.setItem("authorized", "true"); + }, + onError: (error) => {}, + }); + + const form = useForm>({ + resolver: zodResolver(FormSchema), + }); + + useEffect(() => { + if (profileData) { + form.setValue("firstName", profileData.firstName); + form.setValue("lastName", profileData.lastName); + form.setValue("nationalId", profileData.nationalId); + } + }, [profileData]); + + console.log(form.getValues()); + function onSubmit(data: z.infer) { + // toast({ + // title: "You submitted the following values:", + // description: ( + //
+    //       {JSON.stringify(data, null, 2)}
+    //     
+ // ), + // }); + const strNationalId = String(data.nationalId); + const payload = { ...data, nationalId: strNationalId }; + console.log(data); + editProfileMutation.mutate(payload); + } + + return ( +
+
+ {profileData && ( +
+ +
+ ( + + + نام + + + + + + + )} + /> + ( + + + نام خانوادگی + + + + + + + )} + /> + ( + + + کد ملی + + + + + + + )} + /> +
+
+ + )} +
+
+ ); +} diff --git a/components/ProfileDropDown.tsx b/components/ProfileDropDown.tsx index de877c5..1cbbb70 100644 --- a/components/ProfileDropDown.tsx +++ b/components/ProfileDropDown.tsx @@ -54,17 +54,19 @@ export default function ProfileDropDown() { return ( - + - + router.push("/Account/Profile")}> مشاهده پروفایل router.push("/Account/Complaints")}> - درخواست های اخیر + درخواست های من @@ -72,7 +74,7 @@ export default function ProfileDropDown() { onClick={() => { saveToken(false); deleteCookie("Sootzani_Token"); - router.replace("/"); + router.push("/"); }} > diff --git a/components/RequestResult.tsx b/components/RequestResult.tsx index abfaf95..739747d 100644 --- a/components/RequestResult.tsx +++ b/components/RequestResult.tsx @@ -1,16 +1,18 @@ "use client"; -import React, { useEffect, useState } from "react"; +import React, { useEffect, useRef, useState } from "react"; import Image from "next/image"; import Resultimg from "../public/img/result.png"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { useRouter } from "next/navigation"; import { Button } from "./ui/button"; +import { useReactToPrint } from "react-to-print"; export default function Result() { const [trackingNumber, setTrackingNumber] = useState(); const [password, setPassword] = useState(); - + const componentRef = useRef(null); + const router = useRouter(); useEffect(() => { const tn = localStorage.getItem("trackingNumber"); @@ -19,6 +21,15 @@ export default function Result() { setPassword(pw); }, []); + const handlePrint = useReactToPrint({ + content: () => componentRef.current, + // onBeforePrint() { + // setPrintStyle(!printStyle); + // }, + // onAfterPrint() { + // setPrintStyle(!printStyle) + // }, + }); return (
@@ -40,12 +51,23 @@ export default function Result() { در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید.

+ {/*
+ +
*/} icon
+
); } diff --git a/components/RequestStep1.tsx b/components/RequestStep1.tsx index 783ef2d..0c1e701 100644 --- a/components/RequestStep1.tsx +++ b/components/RequestStep1.tsx @@ -105,10 +105,6 @@ export default function RequestStep1() {

لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.

- {/*

- در صورت عدم تمایل به ثبت مشخصات شخصی می توانید به صفحه ی بعد مراجعه - کنید. -

*/} {profileData && (
{}, + onError: (error) => { + toast("مشکلی در ارسال درخواست به وجود آمد.", { + className: "!bg-red-500 !text-white", + }); + }, }); const authorizedComplaintSubmitMutation = useMutation({ @@ -125,10 +131,15 @@ export default function RequestStep2() { onSuccess: (res) => { localStorage.setItem("trackingNumber", res.trackingNumber); localStorage.setItem("password", res.password); + localStorage.setItem("registeredAt", res.registeredAt); localStorage.removeItem("authorized"); router.push("/RequestResult"); }, - onError: (error) => {}, + onError: (error) => { + toast("مشکلی در ارسال درخواست به وجود آمد.", { + className: "!bg-red-500 !text-white", + }); + }, }); // All Category @@ -182,7 +193,9 @@ export default function RequestStep2() { formData.append("Captcha.Key", CaptchaData?.headers["captcha-key"]); formData.append("Complaining", data.person ? data.person : ""); formData.append("OrganizationId", data.OrganizationId); - if (isAuth) { + const unknown = localStorage.getItem("unknown"); + const isAuth = getCookie("Sootzani_Token"); + if (isAuth && !unknown) { authorizedComplaintSubmitMutation.mutate({ Data: formData, }); @@ -191,6 +204,7 @@ export default function RequestStep2() { Data: formData, }); } + refetch(); resetField("Title"); resetField("Text"); @@ -418,7 +432,7 @@ export default function RequestStep2() { control={form.control} name="captchaValue" render={({ field }) => ( - + *کد امنیتی @@ -434,7 +448,7 @@ export default function RequestStep2() { /> {isLoading ? ( -
+
) : ( -
+
icon + refetch()} + color="#003778" + />
)}
diff --git a/components/TabController.tsx b/components/TabController.tsx index d9e9659..bc6e9d5 100644 --- a/components/TabController.tsx +++ b/components/TabController.tsx @@ -59,7 +59,7 @@ export default function TabController() { const finishedComplaints = data?.filter((item: any) => item.status == 4); console.log(newComplaints); return ( -
+
{/*
) : ( "تایید" )} -
+
*/} {/* -)) +)); AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName const AlertDialogHeader = ({ diff --git a/components/ui/separator.tsx b/components/ui/separator.tsx new file mode 100644 index 0000000..12d81c4 --- /dev/null +++ b/components/ui/separator.tsx @@ -0,0 +1,31 @@ +"use client" + +import * as React from "react" +import * as SeparatorPrimitive from "@radix-ui/react-separator" + +import { cn } from "@/lib/utils" + +const Separator = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>( + ( + { className, orientation = "horizontal", decorative = true, ...props }, + ref + ) => ( + + ) +) +Separator.displayName = SeparatorPrimitive.Root.displayName + +export { Separator } diff --git a/constants/index.tsx b/constants/index.tsx index d0aefd9..18a0736 100644 --- a/constants/index.tsx +++ b/constants/index.tsx @@ -8,7 +8,7 @@ export const menuItems = [ { id: 2, name: "اخبار", href: "/" }, { id: 3, name: "درباره ما", href: "/" }, { id: 4, name: "تماس با ما", href: "/CallUs" }, - { id: 5, name: "پیگیری", href: "/" }, + { id: 5, name: "پیگیری", href: "/FollowUp" }, { id: 6, name: "ورود به پنل کاربری", href: "/Login" }, ]; @@ -21,7 +21,7 @@ export const sliderItems = [ export const boxItems = [ { id: 1, - name: "ثبت شکایت", + name: "ثبت شکایت(ناشناس)", icon: "/img/box1.svg", icon2: "/img/box1-hover.svg", description: "ارسال درخواست نارضایتی از پرسنل", @@ -29,20 +29,20 @@ export const boxItems = [ }, { id: 2, + name: "ثبت شکایت", + icon: "/img/box1.svg", + icon2: "/img/box1-hover.svg", + description: "ارسال درخواست نارضایتی از پرسنل", + link: "/CitizenLogin", + }, + { + id: 3, name: "پیگیری شکایت", icon: "/img/box2.svg", icon2: "/img/box2-hover.svg", description: "پیگیری درخواست ارسال شده", link: "/FollowUp", }, - { - id: 3, - name: "ثبت شکایت(شناس)", - icon: "/img/box1.svg", - icon2: "/img/box1-hover.svg", - description: "ارسال درخواست نارضایتی از پرسنل", - link: "/CitizenLogin", - }, // { // id: 3, // name: "مشاهده آمار", @@ -58,21 +58,21 @@ export const newsItems = [ id: 1, title: "شروع به کار سامانه عیون", content: - "این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", + "این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", date: "24 آذر ماه 1402", }, { id: 2, title: "شروع به کار سامانه عیون", content: - "این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", + "این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", date: "24 آذر ماه 1402", }, { id: 3, title: "شروع به کار سامانه عیون ", content: - "این سامانه با هدف نظارت بر عملکرد پرستل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", + "این سامانه با هدف نظارت بر عملکرد پرسنل و نهادهای مرتبط با امور مردمی در شهرداری استان یزد در زمستان 1402 شروع به فعالیت نموده است ...", date: "24 آذر ماه 1402", }, ]; @@ -236,10 +236,9 @@ export const Operations = [ { value: 7, name: "شروع مجدد درخواست" }, ]; - export const errorMessages = { 500: "خطایی رخ داد. لطفا از اتصال اینترنت خود اطمینان حاصل نمایید.", 400: "مشکلی در ارسال درخواست به وجود آمد.", 480: "لطفا تمام اطلاعات خواسته شده را وارد نمایید.", 428: "کد فعالسازی را وارد نمایید.", -}; \ No newline at end of file +}; diff --git a/next.config.js b/next.config.js index 55b22b0..f01e7ba 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,9 @@ /** @type {import('next').NextConfig} */ -const nextConfig = { output: "standalone" }; +const nextConfig = { + output: "standalone", + images: { + domains: ["sootzaniapi.shetabdahi.ir"], + }, +}; module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index d607247..2fc05aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sootzani", - "version": "0.1.0", + "version": "0.1.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sootzani", - "version": "0.1.0", + "version": "0.1.5", "dependencies": { "@hookform/resolvers": "^3.3.2", "@radix-ui/react-alert-dialog": "^1.0.5", @@ -16,6 +16,7 @@ "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-radio-group": "^1.1.3", "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.1.5", @@ -52,6 +53,7 @@ "react-spinners": "^0.13.8", "react-to-print": "^2.14.15", "react-use": "^17.4.2", + "sharp": "^0.33.1", "sonner": "^1.3.1", "swiper": "^11.0.5", "tailwind-merge": "^2.1.0", @@ -104,6 +106,15 @@ "node": ">=6.9.0" } }, + "node_modules/@emnapi/runtime": { + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.44.0.tgz", + "integrity": "sha512-ZX/etZEZw8DR7zAB1eVQT40lNo0jeqpb6dCgOvctB6FIQ5PoXfMuNY8+ayQfu8tNQbAB8gQWSSJupR8NxeiZXw==", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@emotion/is-prop-valid": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", @@ -280,6 +291,437 @@ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.1.tgz", + "integrity": "sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.0" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.1.tgz", + "integrity": "sha512-YrnuB3bXuWdG+hJlXtq7C73lF8ampkhU3tMxg5Hh+E7ikxbUVOU9nlNtVTloDXz6pRHt2y2oKJq7DY/yt+UXYw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.0" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.0.tgz", + "integrity": "sha512-VzYd6OwnUR81sInf3alj1wiokY50DjsHz5bvfnsFpxs5tqQxESoHtJO6xyksDs3RIkyhMWq2FufXo6GNSU9BMw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=11", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.0.tgz", + "integrity": "sha512-dD9OznTlHD6aovRswaPNEy8dKtSAmNo4++tO7uuR4o5VxbVAOoEQ1uSmN4iFAdQneTHws1lkTZeiXPrcCkh6IA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=10.13", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.0.tgz", + "integrity": "sha512-VwgD2eEikDJUk09Mn9Dzi1OW2OJFRQK+XlBTkUNmAWPrtj8Ly0yq05DFgu1VCMx2/DqCGQVi5A1dM9hTmxf3uw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.0.tgz", + "integrity": "sha512-xTYThiqEZEZc0PRU90yVtM3KE7lw1bKdnDQ9kCTHWbqWyHOe4NpPOtMGy27YnN51q0J5dqRrvicfPbALIOeAZA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.0.tgz", + "integrity": "sha512-o9E46WWBC6JsBlwU4QyU9578G77HBDT1NInd+aERfxeOPbk0qBZHgoDsQmA2v9TbqJRWzoBPx1aLOhprBMgPjw==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.0.tgz", + "integrity": "sha512-naldaJy4hSVhWBgEjfdBY85CAa4UO+W1nx6a1sWStHZ7EUfNiuBTTN2KUYT5dH1+p/xij1t2QSXfCiFJoC5S/Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.0.tgz", + "integrity": "sha512-OdorplCyvmSAPsoJLldtLh3nLxRrkAAAOHsGWGDYfN0kh730gifK+UZb3dWORRa6EusNqCTjfXV4GxvgJ/nPDQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.0.tgz", + "integrity": "sha512-FW8iK6rJrg+X2jKD0Ajhjv6y74lToIBEvkZhl42nZt563FfxkCYacrXZtd+q/sRQDypQLzY5WdLkVTbJoPyqNg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.1.tgz", + "integrity": "sha512-Ii4X1vnzzI4j0+cucsrYA5ctrzU9ciXERfJR633S2r39CiD8npqH2GMj63uFZRCFt3E687IenAdbwIpQOJ5BNA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.0" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.1.tgz", + "integrity": "sha512-59B5GRO2d5N3tIfeGHAbJps7cLpuWEQv/8ySd9109ohQ3kzyCACENkFVAnGPX00HwPTQcaBNF7HQYEfZyZUFfw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.0" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.1.tgz", + "integrity": "sha512-tRGrb2pHnFUXpOAj84orYNxHADBDIr0J7rrjwQrTNMQMWA4zy3StKmMvwsI7u3dEZcgwuMMooIIGWEWOjnmG8A==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.0" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.1.tgz", + "integrity": "sha512-4y8osC0cAc1TRpy02yn5omBeloZZwS62fPZ0WUAYQiLhSFSpWJfY/gMrzKzLcHB9ulUV6ExFiu2elMaixKDbeg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.0" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.1.tgz", + "integrity": "sha512-D3lV6clkqIKUizNS8K6pkuCKNGmWoKlBGh5p0sLO2jQERzbakhu4bVX1Gz+RS4vTZBprKlWaf+/Rdp3ni2jLfA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.0" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.1.tgz", + "integrity": "sha512-LOGKNu5w8uu1evVqUAUKTix2sQu1XDRIYbsi5Q0c/SrXhvJ4QyOx+GaajxmOg5PZSsSnCYPSmhjHHsRBx06/wQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.0" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.1.tgz", + "integrity": "sha512-vWI/sA+0p+92DLkpAMb5T6I8dg4z2vzCUnp8yvxHlwBpzN8CIcO3xlSXrLltSvK6iMsVMNswAv+ub77rsf25lA==", + "cpu": [ + "wasm32" + ], + "optional": true, + "dependencies": { + "@emnapi/runtime": "^0.44.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.1.tgz", + "integrity": "sha512-/xhYkylsKL05R+NXGJc9xr2Tuw6WIVl2lubFJaFYfW4/MQ4J+dgjIo/T4qjNRizrqs/szF/lC9a5+updmY9jaQ==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.1.tgz", + "integrity": "sha512-XaM69X0n6kTEsp9tVYYLhXdg7Qj32vYJlAKRutxUsm1UlgQNx6BOhHwZPwukCGXBU2+tH87ip2eV1I/E8MQnZg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -1084,6 +1526,29 @@ } } }, + "node_modules/@radix-ui/react-separator": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.0.3.tgz", + "integrity": "sha512-itYmTy/kokS21aiV5+Z56MZB54KrhPgn6eHDKkFeOLR34HMN2s8PaN47qZZAGnvupcjxHaFZnW4pQEh0BvvVuw==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-primitive": "1.0.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-slot": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", @@ -2153,11 +2618,22 @@ "node": ">=6" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2168,8 +2644,16 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } }, "node_modules/combined-stream": { "version": "1.0.8", @@ -2381,6 +2865,14 @@ "node": ">=6" } }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-node-es": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", @@ -3608,6 +4100,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, "node_modules/is-async-function": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", @@ -4136,7 +4633,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -7993,7 +8489,6 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -8051,6 +8546,45 @@ "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" }, + "node_modules/sharp": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.1.tgz", + "integrity": "sha512-iAYUnOdTqqZDb3QjMneBKINTllCJDZ3em6WaWy7NPECM4aHncvqHRm0v0bN9nqJxMiwamv5KIdauJ6lUzKDpTQ==", + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "semver": "^7.5.4" + }, + "engines": { + "libvips": ">=8.15.0", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.1", + "@img/sharp-darwin-x64": "0.33.1", + "@img/sharp-libvips-darwin-arm64": "1.0.0", + "@img/sharp-libvips-darwin-x64": "1.0.0", + "@img/sharp-libvips-linux-arm": "1.0.0", + "@img/sharp-libvips-linux-arm64": "1.0.0", + "@img/sharp-libvips-linux-s390x": "1.0.0", + "@img/sharp-libvips-linux-x64": "1.0.0", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.0", + "@img/sharp-libvips-linuxmusl-x64": "1.0.0", + "@img/sharp-linux-arm": "0.33.1", + "@img/sharp-linux-arm64": "0.33.1", + "@img/sharp-linux-s390x": "0.33.1", + "@img/sharp-linux-x64": "0.33.1", + "@img/sharp-linuxmusl-arm64": "0.33.1", + "@img/sharp-linuxmusl-x64": "0.33.1", + "@img/sharp-wasm32": "0.33.1", + "@img/sharp-win32-ia32": "0.33.1", + "@img/sharp-win32-x64": "0.33.1" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -8086,6 +8620,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -8899,8 +9441,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yaml": { "version": "2.3.4", diff --git a/package.json b/package.json index 63427a8..6a5d2b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sootzani", - "version": "0.1.0", + "version": "0.1.5", "private": true, "scripts": { "dev": "next dev", @@ -17,6 +17,7 @@ "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-radio-group": "^1.1.3", "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-toast": "^1.1.5", @@ -53,6 +54,7 @@ "react-spinners": "^0.13.8", "react-to-print": "^2.14.15", "react-use": "^17.4.2", + "sharp": "^0.33.1", "sonner": "^1.3.1", "swiper": "^11.0.5", "tailwind-merge": "^2.1.0", diff --git a/public/img/01-report.jpg b/public/img/01-report.jpg new file mode 100644 index 0000000..e6b89a1 Binary files /dev/null and b/public/img/01-report.jpg differ diff --git a/public/img/bg-slide.jpg b/public/img/bg-slide.jpg new file mode 100644 index 0000000..4ffd0b1 Binary files /dev/null and b/public/img/bg-slide.jpg differ diff --git a/utils/citizenApi.ts b/utils/citizenApi.ts index e594002..29c288a 100644 --- a/utils/citizenApi.ts +++ b/utils/citizenApi.ts @@ -10,6 +10,7 @@ axios.interceptors.request.use(function (config) { }); // Post Complaints export async function postComplaintSubmit({ Data }: { Data: FormData }) { + delete axios.defaults.headers.common["Authorization"]; const data = await axios.post(`api/Citizen`, Data); return data.data; } @@ -31,7 +32,9 @@ export async function postComplaintTracking({ }: { Data: { trackingNumber: string; password: string }; }) { - const data = await axios.post(`api/Citizen/Get`, Data); + const data = await axios.post(`api/Citizen/Get`, Data, { + headers: { Authorization: "" }, + }); return data.data; } diff --git a/utils/commonApi.ts b/utils/commonApi.ts index fbc6f03..eba5289 100644 --- a/utils/commonApi.ts +++ b/utils/commonApi.ts @@ -18,3 +18,9 @@ export async function getCaptcha() { console.log(data); return data; } + +export async function getSliders() { + const data = await axios.get("api/Common/Sliders"); + console.log(data); + return data.data; +}