responsive pagination && handle free_turn value && fix set value in small size appo list in page doctors && set data rate in doctor item && fix set token in cookie in page login on domain nobat724.com

This commit is contained in:
ehsan
2025-10-04 17:16:47 +03:30
parent e1510b142b
commit 83e482507b
19 changed files with 282 additions and 171 deletions
+2 -3
View File
@@ -10,7 +10,6 @@ import ArrowLeftD from "@/components/icons/ArrowLeftD";
import ClockD from "@/components/icons/ClockD";
import LikeD from "@/components/icons/LikeD";
import PointD from "@/components/icons/PointD";
import { convertTimestampToPersianDateSimple } from "@/helper";
function ItemDoctor({ doctor, loading, setDoctors }) {
const handleLoading = () => {
@@ -90,8 +89,8 @@ function ItemDoctor({ doctor, loading, setDoctors }) {
: "bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]"
}`}
>
{Number(doctor?.active)
? `اولین نوبت آزاد: ${convertTimestampToPersianDateSimple(doctor?.free_turn)}`
{doctor?.free_turn
? `اولین نوبت آزاد: ${doctor?.free_turn}`
: "نوبت ندارد"}
</p>
</CustomLoading>
+9 -6
View File
@@ -1,25 +1,28 @@
import { Pagination } from "@mui/material";
import { Pagination, useMediaQuery, useTheme } from "@mui/material";
function PaginationContent({ page, pageDetail, changePage, limit = 12 }) {
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("sm"));
const count = Math.ceil(pageDetail.totalRecords / limit);
return (
<Pagination
count={count}
page={page || 1}
size={isSmall ? "small" : "medium"}
onChange={changePage}
color="primary"
className={(!count || count < 2) && "!hidden"}
sx={{
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root": {
"& .MuiPaginationItem-root": {
color: "#616161",
fontSize: "16px",
fontWeight: "500",
},
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root.Mui-selected":
{
color: "#F8F8FF",
},
"& .MuiPaginationItem-root.Mui-selected": {
color: "#F8F8FF",
},
"& .MuiSvgIcon-root": {
rotate: "180deg !important",
},
+5 -3
View File
@@ -16,7 +16,7 @@ function ProgressDetail({ data, idx }) {
{label[idx]}
</p>
<LinearProgress
value={data}
value={data || 0}
variant="determinate"
className="!w-full lg:!w-[265px] !rounded-[10px] !bg-[#D7D7D7] !h-[11px]"
sx={{
@@ -26,8 +26,10 @@ function ProgressDetail({ data, idx }) {
},
}}
/>
<p className="text-[#525252] text-[20px] font-medium">
{numberToArStyle(data)}%
<p
className={`text-[#525252] font-medium ${data ? "text-[20px]" : "text-[18px]"}`}
>
{data ? `${numberToArStyle(data)}%` : "بدون نمره"}
</p>
</li>
);
+1 -1
View File
@@ -2,7 +2,7 @@ import { Slider } from "@mui/material";
import { useState } from "react";
function ProgressChange({ data, changeData, parent }) {
const [value, setValue] = useState(70);
const [value, setValue] = useState(data.progress);
return (
<li className="flex items-center justify-start gap-3 w-full">
-1
View File
@@ -1,5 +1,4 @@
import ArrowLeftB from "@/components/icons/ArrowLeftB";
import { request } from "@/services/response";
import { Button } from "@mui/material";
import Cookies from "js-cookie";
import { useParams } from "next/navigation";