handle limit page dashboard & change header profile user & get data from api in page clinics & clinic item and doctor item

This commit is contained in:
Ehsan
2025-06-01 01:08:25 +03:30
parent 80c74361eb
commit e292176a61
45 changed files with 223 additions and 258 deletions
+6 -6
View File
@@ -68,24 +68,24 @@ function ItemDoctor({ doctor, loading }) {
<p
className={`text-[12px] font-medium rounded w-fit p-1.5 ml-[52px]
${
doctor.free_turn
Number(doctor.active)
? "bg-[rgba(5,_186,_88,_0.04)] text-[#05BA58]"
: "bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]"
}`}
>
{doctor.free_turn
? `اولین نوبت آزاد: ${doctor.free_turn}`
{Number(doctor.active)
? `اولین نوبت آزاد: ${Number(doctor.active)}`
: "نوبت ندارد"}
</p>
</CustomLoading>
{/* Arrow */}
<Link href={`/doctor/${doctor.id}`}>
<Link href={`/doctor/${doctor.uuid}`}>
<Button
variant="contained"
className={`!p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit
${!doctor.free_turn || (loading && "!bg-[#D7D7D7]")}
${!Number(doctor.active) || (loading && "!bg-[#D7D7D7]")}
`}
disabled={!doctor.free_turn || loading}
disabled={!Number(doctor.active) || loading}
>
<ArrowLeftD />
</Button>
+3 -3
View File
@@ -3,7 +3,7 @@ import { useState } from "react";
import ItemUser from "./ItemUser";
function Comment({ data, loading }) {
const [list, setList] = useState(data.comments);
const [list, setList] = useState(data?.comments);
const [update, setUpdate] = useState(false);
return (
@@ -13,8 +13,8 @@ function Comment({ data, loading }) {
}`}
>
{data &&
!!data.comments.length &&
data.comments.map((item, idx) => (
!!data?.comments?.length &&
data?.comments.map((item, idx) => (
<ItemUser
key={idx}
list={list}