responsive page user-account & add-doctor & turns & add loading to all page panel & change design page dashboard
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import TextLoading from "@/app/component/loading/Text"
|
||||
import WarnP from "@/components/icons/WarnP"
|
||||
|
||||
function Activities({ data }) {
|
||||
function Activities({ data, loading }) {
|
||||
return (
|
||||
<div className="w-full mt-[16px] sm:mt-[24px] md:mt-[32px] lg:mt-[40px]">
|
||||
<p className="text-[#525252] text-[14px] md:text-[16px] font-bold">فعالیت های امروز</p>
|
||||
@@ -15,9 +16,13 @@ function Activities({ data }) {
|
||||
<div className="bg-[rgba(255,192,81,0.20)] p-[8px] rounded-full">
|
||||
<WarnP />
|
||||
</div>
|
||||
<p className="text-[#616161] text-[16px] font-medium">{item.text}</p>
|
||||
<TextLoading width={110} height={18} loading={loading}>
|
||||
<p className="text-[#616161] text-[16px] font-medium">{item.text}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
<p className="text-[#7E7E7E] text-[12px] font-normal">{item.time}</p>
|
||||
<TextLoading width={55} height={18} loading={loading}>
|
||||
<p className="text-[#7E7E7E] text-[12px] font-normal">{item.time}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
{data.todays_activities.length > idx + 1 && (
|
||||
<span className="block h-px w-full bg-transparent md:bg-[#EFEFEF] px-[13px] my-[16px] md:my-[20px] lg:my-[24px]"></span>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { DatePicker } from "jalaali-react-date-picker"
|
||||
'use client'
|
||||
|
||||
import { DatePicker } from "jalaali-react-date-picker";
|
||||
|
||||
function Date() {
|
||||
return (
|
||||
|
||||
@@ -1,32 +1,46 @@
|
||||
import CircularLoading from '@/app/component/loading/Circular'
|
||||
import TextLoading from '@/app/component/loading/Text'
|
||||
import ArrowLeftBlueP from '@/components/icons/ArrowLeftBlueP'
|
||||
import LocationP from '@/components/icons/LocationP'
|
||||
import { Button } from '@mui/material'
|
||||
import Image from 'next/image'
|
||||
import React from 'react'
|
||||
|
||||
function Head({ data }) {
|
||||
function Head({ data, loading }) {
|
||||
return (
|
||||
<div className="flex w-full flex-col items-center justify-start">
|
||||
<Image
|
||||
src={data.src}
|
||||
height={80}
|
||||
width={80}
|
||||
alt="profile"
|
||||
/>
|
||||
<p className="text-[#3B3B3B] text-[14px] font-semibold mt-[8px] mb-[4px]">{data.name}</p>
|
||||
<CircularLoading width={80} height={80} loading={loading}>
|
||||
<Image
|
||||
src={data.src}
|
||||
height={80}
|
||||
width={80}
|
||||
alt="profile"
|
||||
/>
|
||||
</CircularLoading>
|
||||
<div className={loading && 'mt-[8px] mb-[4px]'}>
|
||||
<TextLoading width={60} height={18} loading={loading}>
|
||||
<p className="text-[#3B3B3B] text-[14px] font-semibold mt-[8px] mb-[4px]">{data.name}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
<div className="flex items-center justify-center gap-[8px]">
|
||||
<LocationP />
|
||||
<p className="text-[#7E7E7E] text-[14px] font-normal">نماینده شهر اهواز</p>
|
||||
<TextLoading width={55} height={16} loading={loading}>
|
||||
<p className="text-[#7E7E7E] text-[14px] font-normal">نماینده شهر اهواز</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
<div className="flex items-center justify-center my-[16px]">
|
||||
<div className="flex flex-col items-center justify-center">
|
||||
<p className="text-[#9B9B9B] text-[14px] font-normal">کل بیماران</p>
|
||||
<p className="text-[#3B3B3B] text-[14px] font-medium">{data.all_patients}</p>
|
||||
<TextLoading width={55} height={16} loading={loading}>
|
||||
<p className="text-[#3B3B3B] text-[14px] font-medium">{data.all_patients}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
<span className="block h-[44px] w-px bg-[#EFEFEF] mx-[44px]"></span>
|
||||
<div className="flex flex-col items-center justify-center">
|
||||
<p className="text-[#9B9B9B] text-[14px] font-normal">کل نوبت ها</p>
|
||||
<p className="text-[#3B3B3B] text-[14px] font-medium">{data.total_turns}</p>
|
||||
<TextLoading width={55} height={16} loading={loading}>
|
||||
<p className="text-[#3B3B3B] text-[14px] font-medium">{data.total_turns}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
|
||||
@@ -2,17 +2,17 @@ import Head from "./Head";
|
||||
import Date from "./Date";
|
||||
import Activities from "./Activities";
|
||||
|
||||
function UserDetail({ data }) {
|
||||
function UserDetail({ data, loading }) {
|
||||
return (
|
||||
<div className="hidden xl:flex min-w-[332px] h-full opacity-page">
|
||||
<div
|
||||
className="min-w-[332px] p-[24px] border-0 border-r border-r-[#EFEFEF] h-full items-start fixed top-0 left-0
|
||||
bg-[#FFF] py-[40px] px-[16px]"
|
||||
>
|
||||
<Head data={data} />
|
||||
<Head data={data} loading={loading} />
|
||||
<span className="block w-full h-px bg-[#EFEFEF] px-[22px] mt-[13px] mb-[16px]"></span>
|
||||
<Date />
|
||||
<Activities data={data} />
|
||||
<Activities data={data} loading={loading} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user