Compare commits

..

8 Commits

Author SHA1 Message Date
yasaman 228eeff4b3 change boxItem Text 2024-01-21 20:31:57 +03:30
yasaman b673e8d4d4 a bug fixes 2024-01-21 19:51:13 +03:30
yasaman fae39c9194 a Bugs fixed 2024-01-20 16:06:41 +03:30
yasaman 7f0600fb54 Landing , followresult ,RequqestResult Modified 2024-01-18 16:20:42 +03:30
Hossein Rahmani 4de35861ff Merge branch 'master' into Kahdooei 2024-01-15 00:08:05 +03:30
Hossein Rahmani 6c9b8c2e42 Merge branch 'master' into Kahdooei 2024-01-08 22:48:18 +03:30
Hossein Rahmani 39c90f95f1 merge branch 2024-01-06 00:20:48 +03:30
yasaman a11f743013 part of Admin Panel done 2024-01-03 16:12:39 +03:30
14 changed files with 352 additions and 222 deletions

View File

@ -136,8 +136,8 @@ export default function Landing() {
quality={100}
key={index}
className={cn(
" w-[80%] h-[80%] absolute left-2 top-6 group-hover:hidden max-md:h-[60%] max-md:w-[60%] max-md:left-auto",
item.id == 1 && "left-8"
" w-[80%] h-[80%] absolute left-8 top-6 group-hover:hidden max-md:h-[60%] max-md:w-[60%] max-md:left-auto",
item.id == 3 && "left-2"
)}
/>

View File

@ -25,7 +25,7 @@ export default function RootLayout({
<Navbar />
{/* <NavbarSm /> */}
<div className="flex justify-center mt-20 sm:mt-10">{children}</div>
<div className="flex justify-center mt-20 sm:mt-14">{children}</div>
<Toaster />
<SonnerToaster />

View File

@ -1,33 +1,55 @@
"use client";
import Image from "next/image";
import React from "react";
import React, { useEffect, useState } from "react";
import { callUsItems } from "@/constants";
import { getSingleWebContents } from "@/utils/commonApi";
import { cn } from "@/lib/utils";
const Map = dynamic(() => import("./Map"), {
ssr: false,
});
import dynamic from "next/dynamic";
import { useQuery } from "@tanstack/react-query";
export default function CallUs(props: any) {
const { position, zoom } = props;
// const [title, setTitle] = useState("CullUs");
// const { data, isLoading, isError, refetch } = useQuery({
// queryKey: ["WebContents", title],
// queryFn: () => getSingleWebContents(title),
// refetchOnWindowFocus: false,
// });
// console.log(data);
// useEffect(() => {
// refetch();
// }, [title, refetch]);
// if (isLoading) {
// return <p>Loading...</p>;
// }
// if (isError) {
// return <p>Error fetching content.</p>;
// }
// const fetchedContent = data?.content || ""; // Assuming your API response has a 'content' property
return (
<div className="bg-white dark:bg-gray-900 w-screen">
<div className="w-full">
<div className="w-full h-[42vh]">
{/* <Image
src={mapImg}
className="object-cover w-full h-full "
alt=" Logo1"
quality={100}
width={100}
height={100}
/> */}
<Map />
</div>
{/* <div className="w-full mt-6"> */}
{/* <Map /> */}
<div className="container">
{/* Display fetched content */}
{/* <div dangerouslySetInnerHTML={{ __html: fetchedContent }} /> */}
{/* </div> */}
<div className="container flex items-center h-[90vh]">
<div className="grid gap-8 md:gap-0 grid-cols-1 md:grid-cols-3 md:h-[40vh] h-full w-full lg:px-32 xl:px-52 md:py-8 py-12">
{callUsItems.map((item) => {
return (

View File

@ -6,11 +6,12 @@ import Image from "next/image";
import { ComplainDetailsItems } from "@/constants";
import { useMutation } from "@tanstack/react-query";
import useData from "@/store/useData";
import { convertDate } from "@/lib/utils";
import { convertDate , convertFullTime } from "@/lib/utils";
import { Badge } from "./ui/badge";
import InspectorOperations from "./InspectorOperations";
import { postComplaintTracking } from "@/utils/citizenApi";
import { Button } from "@/components/ui/button";
import { Button } from "@/components/ui/button";
import {
AlertDialog,
AlertDialogAction,
@ -196,54 +197,12 @@ export default function ComplainsDetails({
</button>
)}
<div className="flex max-lg:flex-col gap-3 items-start">
<div className="flex flex-col w-full lg:w-1/3 lg:order-2 gap-3 lg:sticky top-40">
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
<p className="text-[#464646] text-base font-bold">
گزارش شکایت
</p>
<div className="mt-2">
<p className="text-[#2e2a2a] text-sm font-medium">
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.title}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
دستگاه مربوطه:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data?.complaintOrganization
? data?.complaintOrganization.title
: "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
پرسنل مربوطه:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.complaining ? data.complaining : "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
زمان ثبت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{convertDate(data.registeredAt)}
</span>
</p>
{/* <p className="text-[#464646] text-sm font-medium">
{" "}
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
متن تستی
</span>
</p> */}
</div>
{/* <p className="text-[#464646] text-sm font-medium text-justify">
درخواست شما با کد رهگیری {data.trackingNumber} و رمز عبور 12422 در
دست بررسی و اقدام می باشد. در صورت تمایل می توانید با شماره تلفن
0353286545 جهت پشتیبانی تماس حاصل کنید.{" "}
</p> */}
</div>
<div className=" max-lg:hidden order-2 bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col">
{/* Editt */}
<div className="w-full flex max-lg:flex-col items-start mt-2 gap-2">
{/* 1 */}
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[78vh]">
{/* ***** */}
<div className="max-lg:hidden 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>
@ -254,74 +213,186 @@ export default function ComplainsDetails({
/>
</div>
</div>
<div className="w-full lg:w-2/3 self-stretch bg-[#E9E9E9] p-4 px-10 rounded-lg">
<p className="text-[#464646] text-base font-bold">روند شکایت</p>
<div className=" flex flex-col gap-y-4 mt-4">
{data.contents?.map((item: any) => {
return (
<div
key={item.id}
className=" bg-white p-4 rounded-lg shadow-md"
>
<div className=" flex gap-4 items-center">
<p className="">
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
</p>
<p className="">
تاریخ :
<span className="text-[#7C838A]">
{convertDate(item.dateTime)}
</span>
</p>
</div>
<div className=" text-[#464646] mt-2">
<span className="text-[#7C838A]">
{item.text ? item.text : "-"}
{/* 2 */}
<div className="w-full lg:w-2/3 self-stretch rounded-lg flex flex-col gap-2 ">
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col md:flex-row gap-2 items-center justify-center lg:sticky top-28">
{data.user == null ? (
<>
<div className="mt-2 flex flex-col gap-y-1 border rounded-md border-gray-400 w-full p-5 relative">
<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">
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data?.title}
</span>
</div>
{/* {item.media.length !== 0 && (
</p>
<p className="text-[#464646] text-sm font-medium">
دستگاه مربوطه:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data?.complaintOrganization
? data?.complaintOrganization.title
: "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
فرد مربوطه:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.complaining ? data.complaining : "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
زمان ثبت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{convertFullTime(data.registeredAt)}
</span>
</p>
</div>
</>
) : (
<>
<div className="mt-2 flex flex-col gap-y-1 border rounded-md border-gray-400 md:w-1/2 p-5 relative">
<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">
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data?.title}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
دستگاه مربوطه:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data?.complaintOrganization
? data?.complaintOrganization.title
: "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
فرد مربوطه:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.complaining ? data.complaining : "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
زمان ثبت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{convertFullTime(data.registeredAt)}
</span>
</p>
</div>
<div className="mt-2 flex flex-col gap-y-1 border rounded-md border-gray-400 md:w-1/2 p-5 relative">
<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">
نام:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.user?.firstName ? data.user?.firstName : "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
نام خانوادگی:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.user?.lastName ? data.user?.lastName : "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
کدملی:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.user?.nationalId ? data.user?.nationalId : "-"}
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
شماره موبایل:{" "}
<span className="text-[#7C838A] text-sm font-medium">
{data.user?.phoneNumber
? data.user?.phoneNumber
: "-"}
</span>
</p>
</div>
</>
)}
</div>
<div className="bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
<p className="text-[#464646] text-base font-bold">روند شکایت</p>
<div className=" flex flex-col gap-y-4 mt-4">
{data.contents?.map((item: any) => {
return (
<div
key={item.id}
className=" bg-white p-4 rounded-lg shadow-md"
>
<div className=" flex gap-4 items-center">
<p className="">
<Badge>
{item.sender == 0 ? "شهروند" : "بازرس"}
</Badge>
</p>
<p className="">
تاریخ :
<span className="text-[#7C838A]">
{convertDate(item.dateTime)}
</span>
</p>
</div>
<div className=" text-[#464646] mt-2">
<span className="text-[#7C838A]">
{item.text ? item.text : "-"}
</span>
</div>
{/* {item.media.length !== 0 && (
<Separator className=" mt-2 mb-1" />
)} */}
<div className=" text-[#464646] mt-2">
<div className=" flex flex-wrap max-md:flex-col w-full items-center gap-2 text-xs mt-2">
{item?.media.map((item: any, index: number) => {
return (
<div
key={index}
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
>
<a
onClick={() =>
openFileInNewTab(item.data, item.mimeType)
}
className=" cursor-pointer flex gap-2 truncate items-center"
<div className=" text-[#464646] mt-2">
<div className=" flex flex-wrap max-md:flex-col w-full items-center gap-2 text-xs mt-2">
{item?.media.map((item: any, index: number) => {
return (
<div
key={index}
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
>
<File className=" w-6 h-6" />
<p className=" max-w-[5rem] truncate">
{item.title}
</p>
</a>
<ArrowDownToLine
className=" cursor-pointer"
onClick={() =>
downloadFile(
item.data,
item.title,
item.mimeType
)
}
/>
</div>
);
})}
<a
onClick={() =>
openFileInNewTab(item.data, item.mimeType)
}
className=" cursor-pointer flex gap-2 truncate items-center"
>
<File className=" w-6 h-6" />
<p className=" max-w-[5rem] truncate">
{item.title}
</p>
</a>
<ArrowDownToLine
className=" cursor-pointer"
onClick={() =>
downloadFile(
item.data,
item.title,
item.mimeType
)
}
/>
</div>
);
})}
</div>
</div>
</div>
</div>
);
})}
);
})}
</div>
</div>
</div>
<div className=" lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
{/* 3 */}
{/* ****** */}
<div className="lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col mt-2">
<p className="text-[#464646] text-base font-bold mb-1">
انجام عملیات
</p>
@ -331,45 +402,6 @@ export default function ComplainsDetails({
complaintData={data}
/>
</div>
{/* Left */}
{/* <div className="w-full md:w-1/3 bg-white shadow-lg rounded-md pt-3 px-4 flex flex-row md:flex-col max-md:flex-wrap">
<p className="text-[#464646] text-base font-bold mb-3">
وضعیت درخواست
</p>
{ComplainDetailsItems.map((item, index, array) => {
return (
<div
className="w-full justify-start items-start gap-4 inline-flex "
key={item.id}
>
<div className="grow shrink basis-0 pb-2 flex-col justify-start items-start gap-1 inline-flex">
<div className="self-stretch text-right text-lime-800 text-lg font-semibold leading-[30px]">
{item.title}
</div>
<div className="self-stretch text-right text-zinc-700 text-base font-normal uppercase">
{item.desc}
</div>
<div className="self-stretch text-right text-zinc-700 text-base font-normal">
{item.date} <br /> {item.time}
</div>
</div>
<div className="w-6 self-stretch flex-col justify-start items-center gap-1 inline-flex">
<div className="py-0.5 justify-start items-start gap-2.5 inline-flex">
<Image
src={greenIcon}
alt="greenIcon"
width={100}
height={100}
/>
</div>
<div className="w-1 grow shrink basis-0 bg-lime-800 rounded-[1px]"></div>
</div>
</div>
);
})}
</div> */}
</div>
</>
) : (

View File

@ -86,10 +86,10 @@ export default function FollowResult() {
console.log(complaintPrintMutation?.data);
return (
<>
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] max-sm:mt-16 pt-4 mx-auto mb-10">
<div className="w-[90vw] sm:w-[90vw] lg:w-[85vw] xl:w-[75vw] 3xl:w-[70vw] max-sm:mt-16 pt-12 mx-auto mb-10">
{complaintPrintMutation?.data ? (
<>
<div className="flex justify-center sm:justify-end gap-2 mb-2">
{/* <div className="flex justify-center sm:justify-end gap-2 mb-2">
<AlertDialog>
<AlertDialogTrigger asChild>
<Button
@ -180,7 +180,7 @@ export default function FollowResult() {
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
</div> */}
<ComplainsDetails
role="Citizen"
state="FollowResult"

View File

@ -48,7 +48,7 @@ export default function Footer() {
</div>
</div>
<div className=" max-md:mt-6 flex flex-row justify-center md:justify-end items-start w-full md:w-1/4 ">
{/* <div className=" max-md:mt-6 flex flex-row justify-center md:justify-end items-start w-full md:w-1/4 ">
<div className="w-23 h-23 sm:w-36 sm:h-36 ">
<Image
src={img1}
@ -69,7 +69,8 @@ export default function Footer() {
height={100}
/>
</div>
</div>
</div> */}
</div>
<hr className=" border-gray-200 sm:mx-auto dark:border-gray-700 mt-5 sm:mt-10" />

View File

@ -120,7 +120,7 @@ export default function InspectorOperations({
<FormControl>
<Textarea
placeholder="متن خود را وارد نمایید"
className="resize-none bg-white"
className="resize-none bg-white lg:min-h-[20em]"
{...field}
/>
</FormControl>

View File

@ -29,7 +29,7 @@ export default function Navbar() {
} else {
setAuth(false);
}
}, [isAuth ,token]);
}, [isAuth, token]);
return (
<div className={` left-0 right-0 top-0 z-20 fixed`}>
@ -89,16 +89,21 @@ export default function Navbar() {
</AnimatePresence>
</div>
<div className=" flex items-center max-md:mr-1 ">
<Image
src="/img/logo.png"
quality={100}
alt="log"
width={32}
height={32}
/>
<Link href="/">
<Image
src="/img/logo.png"
quality={100}
alt="log"
width={32}
height={32}
/>
</Link>
<div className=" text-brown flex flex-col text-center w-40">
<h1 className="text-[23px] w-full">عیــون</h1>
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1>
<Link href="/">
<h1 className="text-[23px] w-full">عیــون</h1>
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1>
</Link>
</div>
</div>
<div className=" flex gap-5 items-center mr-8 max-md:hidden">

View File

@ -7,12 +7,14 @@ import { useQuery, useQueryClient } from "@tanstack/react-query";
import { useRouter } from "next/navigation";
import { Button } from "./ui/button";
import { useReactToPrint } from "react-to-print";
import { getSingleWebContents } from "@/utils/commonApi";
export default function Result() {
const [trackingNumber, setTrackingNumber] = useState<any>();
const [password, setPassword] = useState<any>();
const componentRef = useRef<HTMLDivElement>(null);
const [title, setTitle] = useState("AfterRegistration");
const router = useRouter();
useEffect(() => {
const tn = localStorage.getItem("trackingNumber");
@ -23,17 +25,43 @@ export default function Result() {
const handlePrint = useReactToPrint({
content: () => componentRef.current,
// onBeforePrint() {
// setPrintStyle(!printStyle);
// },
// onAfterPrint() {
// setPrintStyle(!printStyle)
// },
});
// const [fetchedContent, setFetchedContent] = useState("");
const { data, isLoading, isError, refetch } = useQuery({
queryKey: ["WebContents", title],
queryFn: () => getSingleWebContents(title),
refetchOnWindowFocus: false,
});
console.log(data);
useEffect(() => {
refetch();
}, [title, refetch]);
if (isLoading) {
return <p>Loading...</p>;
}
if (isError) {
return <p>Error fetching content.</p>;
}
const fetchedContent = data?.content || "";
return (
<div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 pt-12 ">
<div className="h-full flex flex-col justify-center">
<p
<div
className={`w-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 bg-request-result
h-[85vh] bg-50% bg-no-repeat bg-center repeat
flex flex-col gap-4`}
>
<div
className=" flex flex-col justify-center font-[yekan] pt-12 px-3
text-[#7C838A] dark:text-white text-sm font-medium leading-6 tracking-wide 3xl:text-base 3xl:font-bold"
ref={componentRef}
dir="rtl"
>
{/* <p
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
3xl:text-base 3xl:font-bold "
>
@ -50,24 +78,46 @@ export default function Result() {
<span className="text-slate-500 mx-2">{`${password}`}</span>
در سامانه عیون ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه
پیگیری درخواست، با استفاده از کد رهگیری و رمز عبور مشاهده کنید.
</p> */}
{/* Display fetched content */}
<div dangerouslySetInnerHTML={{ __html: fetchedContent }} />
<p
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
3xl:text-base 3xl:font-bold mt-4"
>
کد پیگیری :
<span className="text-slate-500 mx-2">{`${trackingNumber}`}</span>
</p>
{/* <div className=" w-full flex justify-end mt-2">
<Button
variant="outline"
type="submit"
onClick={handlePrint}
className="w-fit bg-blue text-white p-2 rounded-xl text-center"
>
پرینت درخواست
</Button>
</div> */}
<Image
<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">{`${password}`}</span>
</p>
{/* <Image
alt="icon"
src={Resultimg}
className="self-center w-3/5 mt-5 sm:w-[23em] sm:h-[20em] 3xl:w-3/5 3xl:h-[30em] object-contain"
/>
/> */}
</div>
<div className=" w-full flex justify-end mt-2">
<Button
variant="outline"
type="submit"
onClick={handlePrint}
className="w-fit bg-blue text-white p-2 rounded-xl text-center"
>
پرینت درخواست
</Button>
</div>
{/* <Image
alt="icon"
src={Resultimg}
className="self-center w-3/5 mt-5 sm:w-[23em] sm:h-[20em] 3xl:w-3/5 3xl:h-[30em] object-contain"
/> */}
</div>
);
}

View File

@ -21,23 +21,23 @@ export const sliderItems = [
export const boxItems = [
{
id: 1,
name: "ثبت شکایت(ناشناس)",
name: " گزارش فساد (ناشناس)",
icon: "/img/box1.svg",
icon2: "/img/box1-hover.svg",
description: "ارسال درخواست نارضایتی از پرسنل",
description: "ارسال گزارش بدون احراز هویت",
link: "/RequestStep2",
},
{
id: 2,
name: "ثبت شکایت",
name: " گزارش فساد",
icon: "/img/box1.svg",
icon2: "/img/box1-hover.svg",
description: "ارسال درخواست نارضایتی از پرسنل",
description: "ارسال گزارش با احراز هویت",
link: "/CitizenLogin",
},
{
id: 3,
name: "پیگیری شکایت",
name: "پیگیری گزارش ها",
icon: "/img/box2.svg",
icon2: "/img/box2-hover.svg",
description: "پیگیری درخواست ارسال شده",
@ -117,14 +117,14 @@ export const callUsItems = [
id: 2,
title: "نشانی الکترونیک",
icon: <HiOutlineMail size="full" />,
description: "جهت ارتباط ما با باا شماره",
description: "جهت ارتباط ما با شماره",
description2: "sotzani@gamil.com",
},
{
id: 3,
title: "تماس با ما ",
icon: <FiPhone size="full" />,
description: "جهت ارتباط ما با باا شماره",
description: "جهت ارتباط ما با شماره",
description2: "03531234567",
},
];
@ -141,16 +141,8 @@ export const ControllerMenuItems = [
export const AdminMenuItems = [
{ id: 1, name: "داشبورد", href: "/UserPanel/AdminDashboard" },
{
id: 2,
name: "مدیریت کاربران",
href: "/UserPanel/AdminDashboard/UserManagement",
},
{
id: 3,
name: "مدیریت کلید ها",
href: "/UserPanel/AdminDashboard/KeysManagement",
},
{ id: 2, name: "مدیریت کاربران", href: "/UserPanel/AdminDashboard/UserManagement" },
{ id: 3, name: "مدیریت کلید ها", href: "/UserPanel/AdminDashboard/KeysManagement" },
{ id: 4, name: "گزارشات و آمار", href: "/UserPanel/AdminDashboard/#" },
{ id: 5, name: "تنظیمات", href: "/UserPanel/AdminDashboard/#" },
];

View File

@ -20,6 +20,15 @@ export function convertDate(date: string) {
return convertedDate;
}
export function convertFullTime(date: string) {
const convertedDate = dayjs(date)
.calendar("jalali")
.locale("fa")
.format(" HH:mm - YYYY/M/DD");
return convertedDate;
}
export function Decrypt(encryptedData: string , privateKey: string) {
const Key = `-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCfmb1aGcWsqJPp+v6e72CPngE6P6FoCZCJESwDTXUXiJiAKshB

2
package-lock.json generated
View File

@ -6,7 +6,7 @@
"packages": {
"": {
"name": "sootzani",
"version": "0.1.6 ",
"version": "0.1.6",
"dependencies": {
"@hookform/resolvers": "^3.3.2",
"@radix-ui/react-alert-dialog": "^1.0.5",

View File

@ -18,6 +18,13 @@ module.exports = {
extend: {
backgroundImage: {
mainBg: "url('/img/bg.png')",
'request-result': "url('/img/result.png')",
},
backgroundSize: {
'auto': 'auto',
'cover': 'cover',
'contain': 'contain',
'50%': '50%',
},
objectPosition: {
"custom": "top 10px right 10px",

View File

@ -23,4 +23,16 @@ export async function getSliders() {
const data = await axios.get("api/Common/Sliders");
console.log(data);
return data.data;
}
export async function getWebContents() {
const data = await axios.get("api/Common/Contents");
console.log(data);
return data.data;
}
export async function getSingleWebContents( title: string ) {
const data = await axios.get(`api/Common/Contents/${title}`);
console.log(data);
return data.data;
}