Compare commits

..

No commits in common. "02e0bf8ecdceb93b11086441f125667cfa64295f" and "b7af07794a9910f665ce090f50fdee7f7746c09a" have entirely different histories.

14 changed files with 176 additions and 222 deletions

View File

@ -7,7 +7,6 @@ export default function RootLayout({
}) { }) {
return ( return (
<> <>
<NavbarPanel /> <NavbarPanel />
{children} {children}
</> </>

View File

@ -4,5 +4,6 @@ import React from 'react'
export default function page() { export default function page() {
return ( return (
<TabController /> <TabController />
) )
} }

View File

@ -2,7 +2,6 @@ import ReportsController from '@/components/ReportsController'
import React from 'react' import React from 'react'
export default function page() { export default function page() {
const a = useMut
return ( return (
<ReportsController /> <ReportsController />
) )

View File

@ -4,7 +4,7 @@ import "./globals.css";
import { Toaster } from "@/components/ui/toaster"; import { Toaster } from "@/components/ui/toaster";
import Navbar from "@/components/Navbar"; import Navbar from "@/components/Navbar";
import NavbarSm from "@/components/NavbarSm"; import NavbarSm from "@/components/NavbarSm";
import Provider from "../utils/Provider";
const inter = Inter({ subsets: ["latin"] }); const inter = Inter({ subsets: ["latin"] });
@ -18,18 +18,20 @@ export default function RootLayout({
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return (
<html lang="fa" dir="rtl"> <html lang="fa" dir="rtl">
<Provider>
<body className="font-[yekan-m] "> <body className="font-[yekan-m] ">
<Navbar /> <Navbar />
<NavbarSm /> <NavbarSm />
<div className="flex justify-center ">{children}</div> <div className="flex justify-center " >
{children}
</div>
<Toaster /> <Toaster />
</body> </body>
</Provider>
</html> </html>
); );
} }

View File

@ -20,8 +20,6 @@ import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/use-toast"; import { toast } from "@/components/ui/use-toast";
import Image from "next/image"; import Image from "next/image";
import LoginIcon from "../public/img/login-icon.svg"; import LoginIcon from "../public/img/login-icon.svg";
import { useMutation } from "@tanstack/react-query";
import { loginStaff } from "@/utils/authenticateApi";
const FormSchema = z.object({ const FormSchema = z.object({
username: z.string().min(2, { username: z.string().min(2, {
@ -33,26 +31,11 @@ const FormSchema = z.object({
}); });
export default function Login() { export default function Login() {
const LoginMutation = useMutation({
mutationFn: loginStaff,
onSuccess: (res) => {
console.log(res);
// localStorage.setItem("roles", res.roles[0]);
// setCookie("token", res.token);
// if (res.roles[0] == "Operator") {
// router.push("/MainPage/Prescriptions");
// } else {
// router.push("/MainPage");
// }
},
onError: (err) => {},
});
const form = useForm<z.infer<typeof FormSchema>>({ const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema), resolver: zodResolver(FormSchema),
defaultValues: { defaultValues: {
username: "", username: "",
password: "", password:"",
}, },
}); });
@ -69,12 +52,10 @@ export default function Login() {
} }
return ( return (
<div <div className="w-full mt-12 sm:w-2/3 md:w-2/4 xl:w-1/3 bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040]
className="w-full mt-12 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">
h-full max-md:p-8 pt-12"
>
<div className="space-y-3 md:space-y-4 flex flex-col md:py-12 md:px-20 h-full justify-center"> <div className="space-y-3 md:space-y-4 flex flex-col md:py-12 md:px-20 h-full justify-center">
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " /> <Image alt="icon" src={LoginIcon} className="self-center w-1/3 "/>
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white"> <p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
ورود به پنل کاربری ورود به پنل کاربری
@ -90,21 +71,16 @@ export default function Login() {
name="username" name="username"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-[#7C838A] text-sm font-medium"> <FormLabel className="text-[#7C838A] text-sm font-medium">نام کاربری</FormLabel>
نام کاربری
</FormLabel>
<FormControl> <FormControl>
<Input <Input className="mb-4" placeholder="نام کاربری خود را وارد نمایید" {...field} />
className="mb-4"
placeholder="نام کاربری خود را وارد نمایید"
{...field}
/>
</FormControl> </FormControl>
{/* <FormDescription> {/* <FormDescription>
This is your public display name. This is your public display name.
</FormDescription> */} </FormDescription> */}
<FormMessage /> <FormMessage />
</FormItem> </FormItem>
)} )}
/> />
@ -113,24 +89,18 @@ export default function Login() {
name="password" name="password"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7"> <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">رمز عبور</FormLabel>
رمز عبور
</FormLabel>
<FormControl> <FormControl>
<Input placeholder="رمز عبور خود را وارد کنید" {...field} /> <Input placeholder="رمز عبور خود را وارد کنید" {...field} />
</FormControl> </FormControl>
<FormMessage /> <FormMessage />
</FormItem> </FormItem>
)} )}
/> />
<div className="flex justify-end gap-2 w-full mt-14"> <div className="flex justify-end gap-2 w-full mt-14">
<Button <Button type="submit" className="bg-blue text-white w-1/2 md:w-1/3 p-2 rounded-xl">ورود</Button>
type="submit"
className="bg-blue text-white w-1/2 md:w-1/3 p-2 rounded-xl"
>
ورود
</Button>
</div> </div>
</form> </form>
</Form> </Form>

View File

@ -22,6 +22,23 @@ export default function NavbarSm() {
const [isOpen, setOpen] = useState(false); const [isOpen, setOpen] = useState(false);
const ref = useRef(null); const ref = useRef(null);
// resize
function getSize() {
return {
width: window.innerWidth,
};
}
const [windowSize, setWindowSize] = useState(getSize);
useEffect(() => {
function handleResize() {
setWindowSize(getSize());
}
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, [windowSize]);
return ( return (
<> <>
<div <div
@ -37,9 +54,7 @@ export default function NavbarSm() {
ورود به پنل کاربری ورود به پنل کاربری
</Button> </Button>
</Link> */} </Link> */}
<div className="md:hidden"> {window.innerWidth <= 768 ? <TopNav /> : <></>}
<TopNav />
</div>
<AnimatePresence> <AnimatePresence>
{isOpen && ( {isOpen && (

View File

@ -18,11 +18,27 @@ import {
} from "@/components/ui/alert-dialog"; } from "@/components/ui/alert-dialog";
import { IoMdClose } from "react-icons/io"; import { IoMdClose } from "react-icons/io";
export default function Search({ mode }: { mode: string }) { export default function Search({mode}:{mode:string}) {
// resize
function getSize() {
return {
width: window.innerWidth,
};
}
const [windowSize, setWindowSize] = useState(getSize);
useEffect(() => {
function handleResize() {
setWindowSize(getSize());
}
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, [windowSize]);
return ( return (
<div> <div>
{mode === "controller" || mode === "admin" || mode == "landing" ? ( {window.innerWidth >= 768 || mode === 'controller' || mode === 'admin'? (
<div className=" relative flex bg-gray-300 rounded-xl items-center"> <div className=" relative flex bg-gray-300 rounded-xl items-center">
<Input <Input
// type="search" // type="search"
@ -30,12 +46,11 @@ export default function Search({ mode }: { mode: string }) {
className={`mb-0 h-8 bg-[#D6D8DE66] border-none focus-visible:none rounded-lg className={`mb-0 h-8 bg-[#D6D8DE66] border-none focus-visible:none rounded-lg
block w-full min-w-[13rem] lg:min-w-[16rem] text-xs text-black block w-full min-w-[13rem] lg:min-w-[16rem] text-xs text-black
text-opacity-60 dark:text-white text-opacity-60 dark:text-white
${mode === "controller" && "h-12 max-lg:min-w-[95vw]"} ${mode === 'controller' && 'h-12 max-lg:min-w-[95vw]'}
${ ${mode === 'admin' && 'w-full min-w-full bg-white lg:min-w-full h-11'}
mode === "admin" &&
"w-full min-w-full bg-white lg:min-w-full h-11"
}
`} `}
placeholder="جستجو..." placeholder="جستجو..."
required required
/> />
@ -49,7 +64,7 @@ export default function Search({ mode }: { mode: string }) {
</button> </button>
</div> </div>
) : ( ) : (
<div className=" md:hidden"> <div className="">
<AlertDialog> <AlertDialog>
<AlertDialogTrigger asChild> <AlertDialogTrigger asChild>
<button <button
@ -62,7 +77,7 @@ export default function Search({ mode }: { mode: string }) {
</AlertDialogTrigger> </AlertDialogTrigger>
<AlertDialogContent className=" h-1/5 min-w-[80%] max-w-fit"> <AlertDialogContent className=" h-1/5 min-w-[80%] max-w-fit">
<AlertDialogHeader className="w-full"> <AlertDialogHeader className="w-full" >
<AlertDialogTitle className=" py-1"> <AlertDialogTitle className=" py-1">
<p className="text-[#464646] text-base font-bold"> <p className="text-[#464646] text-base font-bold">
فرم جستجو فرم جستجو
@ -73,6 +88,7 @@ export default function Search({ mode }: { mode: string }) {
</AlertDialogTitle> </AlertDialogTitle>
<AlertDialogDescription className="justify-center sm:px-14 sm:py-6"> <AlertDialogDescription className="justify-center sm:px-14 sm:py-6">
<Input <Input
// type="search" // type="search"
id="default-search" id="default-search"
@ -86,6 +102,7 @@ export default function Search({ mode }: { mode: string }) {
<CiSearch /> <CiSearch />
</button> </button>
</AlertDialogDescription> </AlertDialogDescription>
</AlertDialogHeader> </AlertDialogHeader>
</AlertDialogContent> </AlertDialogContent>
</AlertDialog> </AlertDialog>

View File

@ -4,23 +4,26 @@ import React from "react";
import { Input } from "./ui/input"; import { Input } from "./ui/input";
import Link from "next/link"; import Link from "next/link";
import Search from "./Search"; import Search from "./Search";
import { usePathname } from "next/navigation"; import { usePathname } from 'next/navigation'
export default function TopNav() { export default function TopNav() {
const pathname = usePathname(); const pathname = usePathname()
return ( return (
<div <div className={`flex justify-between items-center w-full px-8 py-2 z-10 border-b-[#C9CFD7] border-b-[1px] border-solid
className={`flex justify-between items-center w-full px-8 py-2 z-10 border-b-[#C9CFD7] border-b-[1px] border-solid max-md:bg-gray max-md:bg-transparent max-md:px-0 max-md:justify-end max-md:border-b-0 ${ max-md:bg-gray max-md:bg-transparent max-md:px-0 max-md:justify-end max-md:border-b-0
pathname === "/" ? "bg-transparent" : "bg-white" ${pathname === "/" ? "bg-transparent" : "bg-white"} `}>
} `}
> <h1 className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text
<h1 className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text max-md:hidden"> max-md:hidden">
سال 1402 | مهارم تورم، رشد تولید سال 1402 | مهارم تورم، رشد تولید
</h1> </h1>
{/* <p>Current pathname: {pathname}</p> */} {/* <p>Current pathname: {pathname}</p> */}
<div className="flex items-center gap-10"> <div className="flex items-center gap-10">
<div className=" flex items-center gap-3 md:ml-4"> <div className=" flex items-center gap-3 md:ml-4">
<p className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text text-sm max-md:text-xs"> <p className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text text-sm max-md:text-xs">
امروز: چهارشنبه 24 آبان 1402 امروز: چهارشنبه 24 آبان 1402
</p> </p>
@ -54,7 +57,8 @@ export default function TopNav() {
</svg> </svg>
</div> </div>
<Search mode="landing" /> <Search/>
</div> </div>
</div> </div>
); );

View File

@ -1,75 +0,0 @@
"use client";
import Image from "next/image";
import React from "react";
import LoginIcon from "../public/img/login-icon.svg";
export default function Verify() {
return (
<div
className="w-full mt-12 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"
>
<div className="space-y-3 md:space-y-4 flex flex-col md:py-12 md:px-20 h-full justify-center">
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
تایید کد
</p>
{/* <Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="w-full flex flex-col "
>
<FormField
control={form.control}
name="username"
render={({ field }) => (
<FormItem>
<FormLabel className="text-[#7C838A] text-sm font-medium">
نام کاربری
</FormLabel>
<FormControl>
<Input
className="mb-4"
placeholder="نام کاربری خود را وارد نمایید"
{...field}
/>
</FormControl>
<FormDescription>
This is your public display name.
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="password"
render={({ field }) => (
<FormItem>
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
رمز عبور
</FormLabel>
<FormControl>
<Input placeholder="رمز عبور خود را وارد کنید" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<div className="flex justify-end gap-2 w-full mt-14">
<Button
type="submit"
className="bg-blue text-white w-1/2 md:w-1/3 p-2 rounded-xl"
>
ورود
</Button>
</div>
</form>
</Form> */}
</div>
</div>
);
}

60
package-lock.json generated
View File

@ -17,7 +17,6 @@
"@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-toast": "^1.1.5",
"@tanstack/react-query": "^5.8.7", "@tanstack/react-query": "^5.8.7",
"@tanstack/react-query-devtools": "^5.14.7",
"@uidotdev/usehooks": "^2.4.1", "@uidotdev/usehooks": "^2.4.1",
"axios": "^1.6.2", "axios": "^1.6.2",
"chart.js": "^4.4.1", "chart.js": "^4.4.1",
@ -36,7 +35,6 @@
"react-hook-form": "^7.48.2", "react-hook-form": "^7.48.2",
"react-icons": "^4.12.0", "react-icons": "^4.12.0",
"react-leaflet": "^4.2.1", "react-leaflet": "^4.2.1",
"react-otp-input": "^3.1.1",
"react-use": "^17.4.2", "react-use": "^17.4.2",
"swiper": "^11.0.5", "swiper": "^11.0.5",
"tailwind-merge": "^2.1.0", "tailwind-merge": "^2.1.0",
@ -1224,52 +1222,37 @@
} }
}, },
"node_modules/@tanstack/query-core": { "node_modules/@tanstack/query-core": {
"version": "5.14.2", "version": "5.8.7",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.14.2.tgz", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.8.7.tgz",
"integrity": "sha512-QmoJvC72sSWs3hgGis8JdmlDvqLfYGWUK4UG6OR9Q6t28JMN9m2FDwKPqoSJ9YVocELCSjMt/FGjEiLfk8000Q==", "integrity": "sha512-58xOSkxxZK4SGQ/uzX8MDZHLGZCkxlgkPxnfhxUOL2uchnNHyay2UVcR3mQNMgaMwH1e2l+0n+zfS7+UJ/MAJw==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
}
},
"node_modules/@tanstack/query-devtools": {
"version": "5.14.7",
"resolved": "https://registry.npmjs.org/@tanstack/query-devtools/-/query-devtools-5.14.7.tgz",
"integrity": "sha512-pLATV0VOGR0UrnxiA/yw0DACvCxTnH3Y1MNb61NOMfsuHOXw9W96tUqo2wlXaK7fWgIjA+SPb+YcjUsp5geAYQ==",
"funding": { "funding": {
"type": "github", "type": "github",
"url": "https://github.com/sponsors/tannerlinsley" "url": "https://github.com/sponsors/tannerlinsley"
} }
}, },
"node_modules/@tanstack/react-query": { "node_modules/@tanstack/react-query": {
"version": "5.14.6", "version": "5.8.7",
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.14.6.tgz", "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.8.7.tgz",
"integrity": "sha512-+INnJdq/904d+K2XQjqdIC58glpNGfQ8Xz93M6WBeJs5FPGFV8SEuFVzPtW/bKZ/Hu7hAiJpbFLDg5Lysvwmuw==", "integrity": "sha512-RYSSMmkhbJ7tPkf8w+MSRIXQLoUCm7DRnTLDcdf+uampupnriEsob3fVWTt9oaEj+AJWEKeCErDBdZeNcAzURQ==",
"dependencies": { "dependencies": {
"@tanstack/query-core": "5.14.2" "@tanstack/query-core": "5.8.7"
}, },
"funding": { "funding": {
"type": "github", "type": "github",
"url": "https://github.com/sponsors/tannerlinsley" "url": "https://github.com/sponsors/tannerlinsley"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^18.0.0" "react": "^18.0.0",
"react-dom": "^18.0.0",
"react-native": "*"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
},
"react-native": {
"optional": true
} }
},
"node_modules/@tanstack/react-query-devtools": {
"version": "5.14.7",
"resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.14.7.tgz",
"integrity": "sha512-nZeKPB66AZJJYqxybV5fEs3VsKwxCtpxGcXJXxEILmhnd3RHEoNLWRLW9Uv1E38C7Vgncv0DZHGrnYM1EARYTg==",
"dependencies": {
"@tanstack/query-devtools": "5.14.7"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"peerDependencies": {
"@tanstack/react-query": "^5.14.6",
"react": "^18.0.0"
} }
}, },
"node_modules/@types/cookie": { "node_modules/@types/cookie": {
@ -4683,15 +4666,6 @@
"react-dom": "^18.0.0" "react-dom": "^18.0.0"
} }
}, },
"node_modules/react-otp-input": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/react-otp-input/-/react-otp-input-3.1.1.tgz",
"integrity": "sha512-bjPavgJ0/Zmf/AYi4onj8FbH93IjeD+e8pWwxIJreDEWsU1ILR5fs8jEJmMGWSBe/yyvPP6X/W6Mk9UkOCkTPw==",
"peerDependencies": {
"react": ">=16.8.6 || ^17.0.0 || ^18.0.0",
"react-dom": ">=16.8.6 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/react-remove-scroll": { "node_modules/react-remove-scroll": {
"version": "2.5.5", "version": "2.5.5",
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz", "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz",

View File

@ -18,7 +18,6 @@
"@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-toast": "^1.1.5",
"@tanstack/react-query": "^5.8.7", "@tanstack/react-query": "^5.8.7",
"@tanstack/react-query-devtools": "^5.14.7",
"@uidotdev/usehooks": "^2.4.1", "@uidotdev/usehooks": "^2.4.1",
"axios": "^1.6.2", "axios": "^1.6.2",
"chart.js": "^4.4.1", "chart.js": "^4.4.1",
@ -37,7 +36,6 @@
"react-hook-form": "^7.48.2", "react-hook-form": "^7.48.2",
"react-icons": "^4.12.0", "react-icons": "^4.12.0",
"react-leaflet": "^4.2.1", "react-leaflet": "^4.2.1",
"react-otp-input": "^3.1.1",
"react-use": "^17.4.2", "react-use": "^17.4.2",
"swiper": "^11.0.5", "swiper": "^11.0.5",
"tailwind-merge": "^2.1.0", "tailwind-merge": "^2.1.0",

View File

@ -1,24 +0,0 @@
import axios from "axios";
import { CookieValueTypes } from "cookies-next";
axios.defaults.baseURL = "https://sootzaniapi.shetabdahi.ir/";
export async function loginStaff({
token,
Data,
}: {
token: CookieValueTypes;
Data: {
userName: string;
password: string;
captcha: {
key: string;
value: string;
};
};
}) {
const data = await axios.post("api/Authenticate/LoginStaff", Data, {
headers: { Authorization: `Bearer ${token}` },
});
return data.data;
}

49
utils/clientAPI.js Normal file
View File

@ -0,0 +1,49 @@
import axios from "axios";
axios.defaults.baseURL = "https://ticketingapi.shahrbincenter.ir/";
export async function openTicket({ Token, Data }) {
const data = await axios.post("ClientTicket/Open", Data, {
headers: {
Authorization: `Bearer ${Token}`,
"Content-Type": "multipart/form-data",
},
});
return data.data;
}
export async function getAllTickets(Token) {
const data = await axios.get("ClientTicket/Get?PageNumber=1&PageSize=20", {
headers: {
Authorization: `Bearer ${Token}`,
},
});
return data.data;
}
export async function getTicket({ Token, id }) {
const data = await axios.get(`ClientTicket/Get/${id}`, {
headers: {
Authorization: `Bearer ${Token}`,
},
});
return data.data;
}
export async function replyTicket({ id, Data, Token }) {
const data = await axios.post(`ClientTicket/Reply/${id}`, Data, {
headers: {
Authorization: `Bearer ${Token}`,
},
});
return data.data;
}
export async function closeTicket({ id, Data, Token }) {
const data = await axios.put(`ClientTicket/Close/${id}`, Data, {
headers: {
Authorization: `Bearer ${Token}`,
},
});
return data.data;
}

25
utils/commonAPI.js Normal file
View File

@ -0,0 +1,25 @@
import axios from "axios";
axios.defaults.baseURL = "https://ticketingapi.shahrbincenter.ir/";
export async function getCaptcha() {
const data = await axios.get("api/Authenticate/Captcha");
return data;
}
export async function login(Data) {
const data = await axios.post("api/Authenticate/LogisterAppUser", Data);
return data.data;
}
export async function LoginCode(Data) {
const data = await axios.post("api/Authenticate/LoginCode", Data);
return data.data;
}
export async function getCategories(Token) {
const data = await axios.get("CommonCategory/Get", {
headers: { Authorization: `Bearer ${Token}` },
});
return data.data;
}