Compare commits
No commits in common. "b5c5d2963d9b688a9312c97bfc3ca919294cf9fd" and "cd8c85a6a251b25c25c4b4c89a160760c4fa3df2" have entirely different histories.
b5c5d2963d
...
cd8c85a6a2
|
|
@ -1,8 +0,0 @@
|
||||||
import AdminKeysManagement from '@/components/AdminKeysManagement'
|
|
||||||
import React from 'react'
|
|
||||||
|
|
||||||
export default function page() {
|
|
||||||
return (
|
|
||||||
<AdminKeysManagement />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
import AdminManagement from '@/components/AdminManagement'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
export default function page() {
|
||||||
|
return (
|
||||||
|
<AdminManagement />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
import AdminUserManagement from '@/components/AdminUserManagement'
|
|
||||||
import React from 'react'
|
|
||||||
|
|
||||||
export default function page() {
|
|
||||||
return (
|
|
||||||
<AdminUserManagement />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -21,7 +21,7 @@ import { sliderItems } from "@/constants";
|
||||||
|
|
||||||
export default function Landing() {
|
export default function Landing() {
|
||||||
return (
|
return (
|
||||||
<div className="overflow-x-hidden">
|
<div>
|
||||||
<div className="w-screen bg-top lg:bg-center bg-no-repeat h-[13rem] sm:h-[20rem] md:h-[24rem] xl:h-[33rem]">
|
<div className="w-screen bg-top lg:bg-center bg-no-repeat h-[13rem] sm:h-[20rem] md:h-[24rem] xl:h-[33rem]">
|
||||||
<Swiper
|
<Swiper
|
||||||
slidesPerView={1}
|
slidesPerView={1}
|
||||||
|
|
@ -47,7 +47,7 @@ export default function Landing() {
|
||||||
// width={20}
|
// width={20}
|
||||||
// height={20}
|
// height={20}
|
||||||
quality={100}
|
quality={100}
|
||||||
className=" w-full h-full object-cover max-sm:object-[70%]"
|
className=" w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
</SwiperSlide>
|
</SwiperSlide>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,257 +0,0 @@
|
||||||
"use client";
|
|
||||||
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
|
||||||
import { GenerateKeyPair, GetKeys } from "@/utils/adminApi";
|
|
||||||
|
|
||||||
import {
|
|
||||||
AlertDialog,
|
|
||||||
AlertDialogAction,
|
|
||||||
AlertDialogCancel,
|
|
||||||
AlertDialogContent,
|
|
||||||
AlertDialogDescription,
|
|
||||||
AlertDialogFooter,
|
|
||||||
AlertDialogHeader,
|
|
||||||
AlertDialogTitle,
|
|
||||||
AlertDialogTrigger,
|
|
||||||
} from "@/components/ui/alert-dialog";
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { ThreeDots } from "react-loader-spinner";
|
|
||||||
|
|
||||||
import {
|
|
||||||
Form,
|
|
||||||
FormControl,
|
|
||||||
FormDescription,
|
|
||||||
FormField,
|
|
||||||
FormItem,
|
|
||||||
FormLabel,
|
|
||||||
FormMessage,
|
|
||||||
} from "@/components/ui/form";
|
|
||||||
import { Input } from "@/components/ui/input";
|
|
||||||
|
|
||||||
|
|
||||||
// const FormSchema = z.object({
|
|
||||||
// title: z.string().min(2, {
|
|
||||||
// message: "trackingNumber must be at least 2 characters.",
|
|
||||||
// }),
|
|
||||||
// password: z.string().min(4, {
|
|
||||||
// message: "Password must be at least 4 characters.",
|
|
||||||
// }),
|
|
||||||
// });
|
|
||||||
|
|
||||||
export default function AdminKeysManagement() {
|
|
||||||
// List Keys
|
|
||||||
const {
|
|
||||||
data: data1,
|
|
||||||
error: Error1,
|
|
||||||
isLoading: isListLoading,
|
|
||||||
refetch: refetch1,
|
|
||||||
} = useQuery({
|
|
||||||
queryKey: ["KeysList"],
|
|
||||||
queryFn: () => GetKeys(),
|
|
||||||
// refetchOnWindowFocus: false,
|
|
||||||
});
|
|
||||||
console.log(data1);
|
|
||||||
|
|
||||||
// GenerateKeyPair
|
|
||||||
const {
|
|
||||||
data: data2,
|
|
||||||
error: Error2,
|
|
||||||
isLoading: isNewKeyLoading,
|
|
||||||
refetch: refetch2,
|
|
||||||
} = useQuery({
|
|
||||||
queryKey: ["GenerateKey"],
|
|
||||||
queryFn: () => GenerateKeyPair(),
|
|
||||||
enabled: false, // Disable automatic fetching
|
|
||||||
});
|
|
||||||
const handleClick = () => {
|
|
||||||
refetch2();
|
|
||||||
console.log(data2);
|
|
||||||
// Manually trigger the query when the button is clicked
|
|
||||||
};
|
|
||||||
|
|
||||||
// }
|
|
||||||
return (
|
|
||||||
<div className="w-full bg-[#F5F5F5] min-h-[82vh] flex justify-center">
|
|
||||||
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
|
||||||
{/* 1 */}
|
|
||||||
<AlertDialog>
|
|
||||||
<AlertDialogTrigger asChild>
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
onClick={handleClick}
|
|
||||||
disabled={isNewKeyLoading}
|
|
||||||
>
|
|
||||||
{" "}
|
|
||||||
ایجاد جفت کلید
|
|
||||||
</Button>
|
|
||||||
</AlertDialogTrigger>
|
|
||||||
<AlertDialogContent className=" w-full max-w-6xl h-full max-h-[80vh]">
|
|
||||||
<AlertDialogHeader>
|
|
||||||
<AlertDialogTitle>اطلاعات کلید جدید</AlertDialogTitle>
|
|
||||||
<AlertDialogDescription>
|
|
||||||
{isNewKeyLoading ? (
|
|
||||||
<div className="felx justify-center items-center self-center h-full">
|
|
||||||
<ThreeDots
|
|
||||||
visible={true}
|
|
||||||
height="80"
|
|
||||||
width="100"
|
|
||||||
color="#003778"
|
|
||||||
radius="9"
|
|
||||||
ariaLabel="three-dots-loading"
|
|
||||||
wrapperStyle={{}}
|
|
||||||
wrapperClass=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className=" " id="KeyFetch">
|
|
||||||
<p className="text-black text-sm font-semibold">
|
|
||||||
کلید عمومی :
|
|
||||||
</p>
|
|
||||||
<p className="text-slate-700 text-sm text-left mb-4">
|
|
||||||
{data2?.publicKey}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p className="text-black text-sm font-semibold">
|
|
||||||
کلید خصوصی :
|
|
||||||
</p>
|
|
||||||
<p className="text-slate-700 text-sm text-left mb-4">
|
|
||||||
{data2?.privateKey}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</AlertDialogDescription>
|
|
||||||
</AlertDialogHeader>
|
|
||||||
<AlertDialogFooter>
|
|
||||||
<AlertDialogCancel>بستن</AlertDialogCancel>
|
|
||||||
{/* <AlertDialogAction>Continue</AlertDialogAction> */}
|
|
||||||
</AlertDialogFooter>
|
|
||||||
</AlertDialogContent>
|
|
||||||
</AlertDialog>
|
|
||||||
|
|
||||||
{/* 1 */}
|
|
||||||
<AlertDialog>
|
|
||||||
<AlertDialogTrigger asChild>
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
onClick={handleClick}
|
|
||||||
disabled={isNewKeyLoading}
|
|
||||||
>
|
|
||||||
افزودن کلید جدید
|
|
||||||
</Button>
|
|
||||||
</AlertDialogTrigger>
|
|
||||||
<AlertDialogContent className=" w-full max-w-6xl h-full max-h-[80vh]">
|
|
||||||
<AlertDialogHeader>
|
|
||||||
<AlertDialogTitle>افزودن کلید جدید</AlertDialogTitle>
|
|
||||||
<AlertDialogDescription>
|
|
||||||
{isNewKeyLoading ? (
|
|
||||||
<div className="felx justify-center items-center self-center h-full">
|
|
||||||
<ThreeDots
|
|
||||||
visible={true}
|
|
||||||
height="80"
|
|
||||||
width="100"
|
|
||||||
color="#003778"
|
|
||||||
radius="9"
|
|
||||||
ariaLabel="three-dots-loading"
|
|
||||||
wrapperStyle={{}}
|
|
||||||
wrapperClass=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<></>
|
|
||||||
// <Form {...form}>
|
|
||||||
// <form
|
|
||||||
// onSubmit={form.handleSubmit(onSubmit)}
|
|
||||||
// className="w-full flex flex-col mt-6 "
|
|
||||||
// >
|
|
||||||
// <div className="flex flex-row flex-wrap justify-between">
|
|
||||||
// <FormField
|
|
||||||
// control={form.control}
|
|
||||||
// name="trackingNumber"
|
|
||||||
// render={({ field }) => (
|
|
||||||
// <FormItem className=" w-full lg:w-[48%]">
|
|
||||||
// <FormLabel className="text-[#7C838A] text-sm font-medium">
|
|
||||||
// کد پیگیری
|
|
||||||
// </FormLabel>
|
|
||||||
// <FormControl>
|
|
||||||
// <Input
|
|
||||||
// placeholder="کد پیگیری خود را وارد نمایید"
|
|
||||||
// {...field}
|
|
||||||
// />
|
|
||||||
// </FormControl>
|
|
||||||
// <FormMessage />
|
|
||||||
// </FormItem>
|
|
||||||
// )}
|
|
||||||
// />
|
|
||||||
|
|
||||||
// <FormField
|
|
||||||
// control={form.control}
|
|
||||||
// name="password"
|
|
||||||
// render={({ field }) => (
|
|
||||||
// <FormItem className=" w-full lg:w-[48%]">
|
|
||||||
// <FormLabel className="text-[#7C838A] text-sm font-medium ">
|
|
||||||
// رمز عبور
|
|
||||||
// </FormLabel>
|
|
||||||
// <FormControl>
|
|
||||||
// <Input
|
|
||||||
// placeholder="رمز عبور خود را وارد کنید"
|
|
||||||
// {...field}
|
|
||||||
// />
|
|
||||||
// </FormControl>
|
|
||||||
// <FormMessage />
|
|
||||||
// </FormItem>
|
|
||||||
// )}
|
|
||||||
// />
|
|
||||||
// </div>
|
|
||||||
|
|
||||||
// <div className="flex justify-center sm:justify-end gap-2 w-full mt-8">
|
|
||||||
// <Button
|
|
||||||
// // href="/FollowResult"
|
|
||||||
// type="submit"
|
|
||||||
// className="bg-blue text-white min-w-max w-1/2 sm:w-1/3 lg:w-1/4 p-2 rounded-xl text-center"
|
|
||||||
// >
|
|
||||||
// پیگیری درخواست
|
|
||||||
// </Button>
|
|
||||||
// </div>
|
|
||||||
// </form>
|
|
||||||
// </Form>
|
|
||||||
)}
|
|
||||||
</AlertDialogDescription>
|
|
||||||
</AlertDialogHeader>
|
|
||||||
<AlertDialogFooter>
|
|
||||||
<AlertDialogCancel>بستن</AlertDialogCancel>
|
|
||||||
{/* <AlertDialogAction>Continue</AlertDialogAction> */}
|
|
||||||
</AlertDialogFooter>
|
|
||||||
</AlertDialogContent>
|
|
||||||
</AlertDialog>
|
|
||||||
|
|
||||||
<div className="w-full text-right text-neutral-600 text-lg font-bold my-4">
|
|
||||||
لیست کلیدها
|
|
||||||
</div>
|
|
||||||
{/* 2 */}
|
|
||||||
<div className="w-full flex flex-row max-md:flex-wrap justify-between gap-3">
|
|
||||||
{data1?.map((item: any) => {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={item.id}
|
|
||||||
className={`flex flex-col justify-center gap-2 w-full lg:w-1/2 h-28 px-5 bg-white rounded-md shadow-md items-start
|
|
||||||
`}
|
|
||||||
>
|
|
||||||
<p className=" text-slate-500 text-sm font-normal leading-normal">
|
|
||||||
عنوان کلید :
|
|
||||||
<span className=" text-slate-800">{item.title}</span>
|
|
||||||
</p>
|
|
||||||
<p className=" text-slate-500 text-sm font-normal leading-normal">
|
|
||||||
آی دی بازرس :
|
|
||||||
<span className=" text-slate-800 self-end">
|
|
||||||
{item.inspectorId}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -22,7 +22,7 @@ import { Button } from "./ui/button";
|
||||||
import { AdminCardItems } from "@/constants";
|
import { AdminCardItems } from "@/constants";
|
||||||
import TableAdmin from "./TableAdmin";
|
import TableAdmin from "./TableAdmin";
|
||||||
|
|
||||||
export default function AdminUserManagement() {
|
export default function AdminManagement() {
|
||||||
return (
|
return (
|
||||||
<div className="w-full bg-[#F5F5F5] min-h-[82vh] flex justify-center">
|
<div className="w-full bg-[#F5F5F5] min-h-[82vh] flex justify-center">
|
||||||
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
||||||
|
|
@ -118,10 +118,7 @@ export default function ComplainsDetails({
|
||||||
<div className=" flex flex-col gap-y-4 mt-4">
|
<div className=" flex flex-col gap-y-4 mt-4">
|
||||||
{data.contents?.map((item: any) => {
|
{data.contents?.map((item: any) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div className=" bg-white p-4 rounded-lg shadow-md">
|
||||||
key={item.id}
|
|
||||||
className=" bg-white p-4 rounded-lg shadow-md"
|
|
||||||
>
|
|
||||||
<div className=" flex gap-4 items-center">
|
<div className=" flex gap-4 items-center">
|
||||||
<p className="">
|
<p className="">
|
||||||
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
||||||
|
|
@ -142,6 +139,26 @@ export default function ComplainsDetails({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
{/* {data.contents?.map((item: any) => {
|
||||||
|
return (
|
||||||
|
<div 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-[#7C838A] mt-2">
|
||||||
|
متن: {item.text ? item.text : "-"}
|
||||||
|
</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">
|
<div className=" lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
|
||||||
|
|
|
||||||
|
|
@ -31,18 +31,11 @@ export default function FollowResult() {
|
||||||
const [trackingNumber, setTrackingNumber] = useState<any>();
|
const [trackingNumber, setTrackingNumber] = useState<any>();
|
||||||
const [password, setPassword] = useState<any>();
|
const [password, setPassword] = useState<any>();
|
||||||
const [complaintData, setComplaintData] = useState<any>();
|
const [complaintData, setComplaintData] = useState<any>();
|
||||||
const [printStyle, setPrintStyle] = useState<boolean>(true);
|
|
||||||
|
|
||||||
// Print component Data
|
// Print component Data
|
||||||
const componentRef = useRef<HTMLDivElement>(null);
|
const componentRef = useRef<HTMLDivElement>(null);
|
||||||
const handlePrint = useReactToPrint({
|
const handlePrint = useReactToPrint({
|
||||||
content: () => componentRef.current,
|
content: () => componentRef.current,
|
||||||
// onBeforePrint() {
|
|
||||||
// setPrintStyle(!printStyle);
|
|
||||||
// },
|
|
||||||
// onAfterPrint() {
|
|
||||||
// setPrintStyle(!printStyle)
|
|
||||||
// },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -126,7 +119,7 @@ export default function FollowResult() {
|
||||||
</AlertDialogCancel>
|
</AlertDialogCancel>
|
||||||
</AlertDialogTitle>
|
</AlertDialogTitle>
|
||||||
|
|
||||||
<AlertDialogDescription className="h-full px-0 py-0 sm:px-0 sm:pt-0 ">
|
<AlertDialogDescription className="h-full">
|
||||||
{complaintPrintMutation.isPending ? (
|
{complaintPrintMutation.isPending ? (
|
||||||
<div className="felx justify-center items-center self-center h-full">
|
<div className="felx justify-center items-center self-center h-full">
|
||||||
<ThreeDots
|
<ThreeDots
|
||||||
|
|
@ -143,10 +136,9 @@ export default function FollowResult() {
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
dir="rtl"
|
dir="rtl"
|
||||||
className=" font-[yekan] px-10 py-4 sm:px-28 sm:pt-9 "
|
className=" font-[yekan]"
|
||||||
id="details"
|
id="details"
|
||||||
ref={componentRef}
|
ref={componentRef}
|
||||||
// style={{ border: printStyle ? 'none' : '5px solid black' , margin: printStyle ? 'auto': '1em' }}
|
|
||||||
>
|
>
|
||||||
<p className="text-[#464646] text-sm font-medium">
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
{" "}
|
{" "}
|
||||||
|
|
@ -183,6 +175,7 @@ export default function FollowResult() {
|
||||||
</AlertDialogDescription>
|
</AlertDialogDescription>
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
<AlertDialogFooter>
|
<AlertDialogFooter>
|
||||||
|
{/* <AlertDialogCancel>Cancel</AlertDialogCancel> */}
|
||||||
<Button
|
<Button
|
||||||
className="bg-blue text-white w-1/2 sm:w-1/6"
|
className="bg-blue text-white w-1/2 sm:w-1/6"
|
||||||
onClick={handlePrint}
|
onClick={handlePrint}
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,7 @@ export default function NavbarPanel() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 className="text-white inline-block bg-clip-text before:max-md:hidden text-sm font-bold max-md:text-xs max-md:font-medium">
|
<h1 className="text-white inline-block bg-clip-text before:max-md:hidden text-sm font-bold max-md:text-xs max-md:font-medium">
|
||||||
|
نام و نام خانوادگی (بازرس)
|
||||||
{role === 'Admin' ? 'نام و نام خانوادگی (ادمین)' : 'نام و نام خانوادگی (بازرس)'}
|
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ export default function RequestStep1() {
|
||||||
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
|
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||||
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
|
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-red-500 dark:text-white">
|
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-red-800 dark:text-white">
|
||||||
در صورت عدم تمایل به ثبت مشخصات شخصی می توانید به صفحه ی بعد مراجعه کنید.
|
در صورت عدم تمایل به ثبت مشخصات شخصی می توانید به صفحه ی بعد مراجعه کنید.
|
||||||
</p>
|
</p>
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
|
|
|
||||||
|
|
@ -68,19 +68,19 @@ const FormSchema = z.object({
|
||||||
}),
|
}),
|
||||||
uploadFile: z
|
uploadFile: z
|
||||||
.custom<FileList>((val) => val instanceof FileList, "Required")
|
.custom<FileList>((val) => val instanceof FileList, "Required")
|
||||||
// .refine((files) => files.length > 0, `Required`)
|
.refine((files) => files.length > 0, `Required`)
|
||||||
.refine((files) => files.length <= 5, `Maximum of 5 File are allowed.`)
|
.refine((files) => files.length <= 5, `Maximum of 5 File are allowed.`)
|
||||||
.refine(
|
.refine(
|
||||||
(files) => Array.from(files).every((file) => file.size <= MAX_IMAGE_SIZE),
|
(files) => Array.from(files).every((file) => file.size <= MAX_IMAGE_SIZE),
|
||||||
`Each file size should be less than 5 MB.`
|
`Each file size should be less than 5 MB.`
|
||||||
|
)
|
||||||
|
.refine(
|
||||||
|
(files) =>
|
||||||
|
Array.from(files).every((file) =>
|
||||||
|
ALLOWED_IMAGE_TYPES.includes(file.type)
|
||||||
|
),
|
||||||
|
"Only these types are allowed .jpg, .jpeg, .png and .webp"
|
||||||
),
|
),
|
||||||
// .refine(
|
|
||||||
// (files) =>
|
|
||||||
// Array.from(files).every((file) =>
|
|
||||||
// ALLOWED_IMAGE_TYPES.includes(file.type)
|
|
||||||
// ),
|
|
||||||
// "Only these types are allowed .jpg, .jpeg, .png and .webp"
|
|
||||||
// ),
|
|
||||||
categoryId: z.string({
|
categoryId: z.string({
|
||||||
required_error: "Please select an category to display.",
|
required_error: "Please select an category to display.",
|
||||||
}),
|
}),
|
||||||
|
|
@ -331,7 +331,7 @@ export default function RequestStep2() {
|
||||||
<Input
|
<Input
|
||||||
type="file"
|
type="file"
|
||||||
className="mb-3"
|
className="mb-3"
|
||||||
accept="image/* , .pdf"
|
accept="image/*"
|
||||||
multiple={true}
|
multiple={true}
|
||||||
disabled={form.formState.isSubmitting}
|
disabled={form.formState.isSubmitting}
|
||||||
{...field}
|
{...field}
|
||||||
|
|
|
||||||
|
|
@ -141,10 +141,13 @@ export const ControllerMenuItems = [
|
||||||
|
|
||||||
export const AdminMenuItems = [
|
export const AdminMenuItems = [
|
||||||
{ id: 1, name: "داشبورد", href: "/UserPanel/AdminDashboard" },
|
{ id: 1, name: "داشبورد", href: "/UserPanel/AdminDashboard" },
|
||||||
{ id: 2, name: "مدیریت کاربران", href: "/UserPanel/AdminDashboard/UserManagement" },
|
{
|
||||||
{ id: 3, name: "مدیریت کلید ها", href: "/UserPanel/AdminDashboard/KeysManagement" },
|
id: 2,
|
||||||
{ id: 4, name: "گزارشات و آمار", href: "/UserPanel/AdminDashboard/#" },
|
name: "مدیریت کاربران",
|
||||||
{ id: 5, name: "تنظیمات", href: "/UserPanel/AdminDashboard/#" },
|
href: "/UserPanel/AdminDashboard/Management",
|
||||||
|
},
|
||||||
|
{ id: 2, name: "تنظیمات", href: "/UserPanel/AdminDashboard" },
|
||||||
|
{ id: 3, name: "گزارشات و آمار", href: "/UserPanel/AdminDashboard" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const ControllerTableItems = [
|
export const ControllerTableItems = [
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,8 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { CookieValueTypes, getCookie } from "cookies-next";
|
import { CookieValueTypes } from "cookies-next";
|
||||||
|
|
||||||
axios.defaults.baseURL = "https://sootzaniapi.shetabdahi.ir/";
|
axios.defaults.baseURL = "https://sootzaniapi.shetabdahi.ir/";
|
||||||
|
|
||||||
axios.interceptors.request.use(function (config) {
|
|
||||||
const token = getCookie("Sootzani_Token");
|
|
||||||
config.headers.Authorization = token ? `Bearer ${token}` : "";
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
export async function GenerateKeyPair() {
|
export async function GenerateKeyPair() {
|
||||||
const data = await axios.get("api/Admin/GenerateKeyPair");
|
const data = await axios.get("api/Admin/GenerateKeyPair");
|
||||||
return data.data;
|
return data.data;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue