Bugs fixed
parent
dc03495f73
commit
a190f8c301
|
|
@ -247,7 +247,7 @@ export default function ComplainsDetails({
|
||||||
</AlertDialog>
|
</AlertDialog>
|
||||||
{getComplaintMutation.data && !getComplaintMutation.isPending ? (
|
{getComplaintMutation.data && !getComplaintMutation.isPending ? (
|
||||||
<>
|
<>
|
||||||
<button
|
{/* <button
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
router.push("/UserPanel/ControllerDashboard/Complaints")
|
router.push("/UserPanel/ControllerDashboard/Complaints")
|
||||||
}
|
}
|
||||||
|
|
@ -257,7 +257,7 @@ export default function ComplainsDetails({
|
||||||
<ArrowRight />
|
<ArrowRight />
|
||||||
</span>
|
</span>
|
||||||
<p>بازگشت</p>
|
<p>بازگشت</p>
|
||||||
</button>
|
</button> */}
|
||||||
|
|
||||||
<div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col">
|
<div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col">
|
||||||
{/* 1 */}
|
{/* 1 */}
|
||||||
|
|
@ -277,7 +277,7 @@ export default function ComplainsDetails({
|
||||||
</div>
|
</div>
|
||||||
{/* 2 */}
|
{/* 2 */}
|
||||||
<div className="flex flex-col self-stretch w-full gap-2 rounded-lg lg:w-2/3 ">
|
<div className="flex flex-col self-stretch w-full gap-2 rounded-lg lg:w-2/3 ">
|
||||||
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col md:flex-row gap-2 items-center justify-center lg:sticky top-28">
|
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col md:flex-row gap-2 items-center justify-center">
|
||||||
{data.user == null ? (
|
{data.user == null ? (
|
||||||
<>
|
<>
|
||||||
<div className="relative flex flex-col w-full p-5 mt-2 border border-gray-400 rounded-md gap-y-1">
|
<div className="relative flex flex-col w-full p-5 mt-2 border border-gray-400 rounded-md gap-y-1">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { Input } from "./ui/input";
|
||||||
import { Label } from "./ui/label";
|
import { Label } from "./ui/label";
|
||||||
import { Button } from "./ui/button";
|
import { Button } from "./ui/button";
|
||||||
import { CiSearch } from "react-icons/ci";
|
import { CiSearch } from "react-icons/ci";
|
||||||
import { XCircle } from "lucide-react";
|
import { X, XCircle } from "lucide-react";
|
||||||
|
|
||||||
export default function Search({
|
export default function Search({
|
||||||
mode,
|
mode,
|
||||||
|
|
@ -36,7 +36,7 @@ export default function Search({
|
||||||
}
|
}
|
||||||
Cancel(true);
|
Cancel(true);
|
||||||
};
|
};
|
||||||
|
console.log(value);
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
|
|
@ -70,11 +70,11 @@ export default function Search({
|
||||||
type="button"
|
type="button"
|
||||||
className="absolute left-3"
|
className="absolute left-3"
|
||||||
>
|
>
|
||||||
<XCircle className=" text-gray-600" />
|
<X className=" text-gray-600 h-5 w-5" />
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button onClick={action} className="absolute left-3">
|
<button onClick={action} className="absolute left-3">
|
||||||
<CiSearch />
|
<CiSearch className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{/* <button onClick={action} className="absolute left-3">
|
{/* <button onClick={action} className="absolute left-3">
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ export default function TabController() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const handelSearch = (event: any) => {
|
const handelSearch = (event: any) => {
|
||||||
|
setPage(1);
|
||||||
refetch();
|
refetch();
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -86,16 +87,13 @@ export default function TabController() {
|
||||||
setPsblState(Number(activeTab));
|
setPsblState(Number(activeTab));
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
console.log(currentPage);
|
||||||
const isZero = totalCount === 0;
|
const isZero = totalCount === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 pt-9 mx-auto">
|
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 pt-9 mx-auto">
|
||||||
<p className="my-2 text-xs font-bold 3xl:ml-6 sm:text-sm">
|
|
||||||
لیست شکایت ها
|
|
||||||
</p>
|
|
||||||
<Tabs value={String(selectedTab)} className="" dir="rtl">
|
<Tabs value={String(selectedTab)} className="" dir="rtl">
|
||||||
<div className="flex flex-col-reverse items-center justify-between w-full gap-4 mb-10 lg:flex-row lg:gap-2">
|
<div className="flex flex-col-reverse items-center justify-between w-full gap-4 mb-5 lg:flex-row lg:gap-2">
|
||||||
{/* Tab Title */}
|
{/* Tab Title */}
|
||||||
<TabsList className="flex w-full gap-1 h-a max-lg:flex-wrap max lg:w-4/5 md:gap-4 lg:gap-1 p-1">
|
<TabsList className="flex w-full gap-1 h-a max-lg:flex-wrap max lg:w-4/5 md:gap-4 lg:gap-1 p-1">
|
||||||
{/* <p className="text-xs font-bold 3xl:ml-6 sm:text-sm max-xl:hidden">
|
{/* <p className="text-xs font-bold 3xl:ml-6 sm:text-sm max-xl:hidden">
|
||||||
|
|
@ -114,7 +112,8 @@ export default function TabController() {
|
||||||
setSelectedTab(String(item.value));
|
setSelectedTab(String(item.value));
|
||||||
localStorage.setItem("ActiveTab", String(item.value));
|
localStorage.setItem("ActiveTab", String(item.value));
|
||||||
refetch();
|
refetch();
|
||||||
setPage(0);
|
setSearch("");
|
||||||
|
setPage(1);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="relative w-full ">
|
<div className="relative w-full ">
|
||||||
|
|
@ -156,6 +155,7 @@ export default function TabController() {
|
||||||
{!isZero ? (
|
{!isZero ? (
|
||||||
<Pagination
|
<Pagination
|
||||||
TotalPages={totalPages}
|
TotalPages={totalPages}
|
||||||
|
currentPage={currentPage - 1}
|
||||||
countPage={totalCount}
|
countPage={totalCount}
|
||||||
Page={(num: number) => setPage(num + 1)}
|
Page={(num: number) => setPage(num + 1)}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue