add first open time for appo item and change component data, remove work time in location, add loading on links in page doctor list, fix bug search city and state in clinics page

This commit is contained in:
ehsan
2025-09-18 14:30:49 +03:30
parent a6386e693f
commit 2f078eba3c
17 changed files with 115 additions and 65 deletions
@@ -8,7 +8,7 @@ function ProgressAll({ doctor }) {
<CircularLoading width={120} height={120}>
<CircularProgress
variant="determinate"
value={doctor?.total_user_satisfaction}
value={doctor?.satisfaction}
sx={{
"& .MuiCircularProgress-circle": {
stroke: "#05BA58",
@@ -28,7 +28,7 @@ function ProgressAll({ doctor }) {
رضایت کاربران
</p>
<p className="text-[#3B3B3B]">
{numberToArStyle(doctor?.total_user_satisfaction)}%
{numberToArStyle(doctor?.satisfaction)}%
</p>
</div>
</CircularLoading>
@@ -6,7 +6,10 @@ import ProgressDetail from "@/app/component/ProfressDetail";
import TextLoading from "@/app/component/loading/Text";
import CustomLoading from "@/app/component/loading/Custom";
function Chart({ doctor }) {
function Chart({ comments, doctor }) {
console.log(doctor);
console.log(comments);
return (
<div
className="
@@ -17,10 +20,10 @@ function Chart({ doctor }) {
<TextLoading width={130} height={20}>
<div className="flex items-center justify-start gap-2.5">
<p className="text-[#616161] text-[14px] font-medium">
امتیاز کلی کاربران: {doctor?.overall_score} از 5
امتیاز کلی کاربران: {doctor?.point} از 5
</p>
<p className="text-[#7E7E7E] text-[14px] font-normal">
(از مجموع {doctor?.comments?.length} نظر)
(از مجموع {comments?.length} نظر)
</p>
</div>
</TextLoading>
@@ -28,7 +31,7 @@ function Chart({ doctor }) {
<TextLoading width={160} height={20}>
<Rating
readOnly
value={4}
value={3.5}
size="small"
name="read-only"
className="!mt-4 !mb-6 !hidden lg:!flex"
@@ -18,7 +18,7 @@ function Comments({ doctor, comments }) {
</p>
<ModalAnswer doctor={doctor} />
</div>
<Chart doctor={doctor} />
<Chart comments={comments} doctor={doctor} />
<Comment data={doctor} comments={comments} />
</div>
);
@@ -7,7 +7,7 @@ import ModalOpenLocation from "@/app/component/openLocation";
import RoutingWhiteC from "@/components/icons/RoutingWhiteC";
import RoutingC from "@/components/icons/RoutingC";
function Item({ doctor, data }) {
function Item({ data }) {
const [isOpen, setIsOpen] = useState(false);
const [open, setOpen] = useState(false);
@@ -45,15 +45,13 @@ function Item({ doctor, data }) {
<p className="text-[#525252] text-[16px] font-normal">
آدرس: {data.address}
</p>
<p className="text-[#525252] text-[16px] font-normal">
تلفن: {data.telephone}
</p>
<div className="flex w-full items-center justify-between">
<p className="text-[#525252] text-[16px] font-normal">
روزهای کاری: {doctor.hours_of_work}
تلفن: {data.telephone}
</p>
<ModalOpenLocation
open={open}
data={data}
setOpen={setOpen}
handleClose={handleClose}
>
@@ -79,6 +77,7 @@ function Item({ doctor, data }) {
<ModalOpenLocation
open={open}
data={data}
setOpen={setOpen}
handleClose={handleClose}
>
@@ -11,7 +11,7 @@ function Locations({ doctor }) {
{doctor?.address?.map((item, idx) => (
<CustomLoading key={idx} width="full" height={40}>
<li className="w-full">
<Item doctor={doctor} data={item} />
<Item data={item} />
{doctor?.address.length > idx + 1 && (
<span className="w-full h-px bg-[#EFEFEF] block my-[12px] md:my-[14px] lg:my-[16px]"></span>
)}