Skip to content

Commit

Permalink
feat: created doctors profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
yeasin2002 committed Aug 17, 2024
1 parent 0adf893 commit 68ae8b8
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 27 deletions.
23 changes: 0 additions & 23 deletions src/app/[lang]/admin/(dashboard)/doctors/page.tsx

This file was deleted.

15 changes: 15 additions & 0 deletions src/app/[lang]/admin/(public)/doctors/[doctorId]/DoctorIdNav.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { GoBack } from "@/components";
import { cn } from "@/utils";
import { ChevronLeft } from "lucide-react";
import React from "react";
interface Props extends React.ComponentProps<"div"> {}

export const DoctorIdNav = ({ className, ...props }: Props) => {
return (
<div {...props}>
<GoBack className={cn("gap- flex items-center", className)}>
<ChevronLeft /> <p>Go Back</p>
</GoBack>
</div>
);
};
103 changes: 103 additions & 0 deletions src/app/[lang]/admin/(public)/doctors/[doctorId]/DoctorsProfile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import Image from "next/image";
import React from "react";
import { DoctorIdNav } from "./DoctorIdNav";

interface Props extends React.ComponentPropsWithoutRef<"div"> {}

export const DoctorProfile = ({ ...props }: Props) => {
return (
<div className="p-4">
<DoctorIdNav />
<div
className="container mx-auto min-h-screen rounded-lg bg-gray-100 p-6 shadow-md"
aria-label="doctor profile"
{...props}
>
<div className="mb-6 flex items-center">
<Image
src={
"https://images.unsplash.com/photo-1522075469751-3a6694fb2f61?q=80&w=1160&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
}
alt="Doctor"
className="mr-6 h-24 w-24 rounded-full"
width={500}
height={500}
/>
<div>
<h2 className="text-2xl font-semibold">Dr. Adam H.</h2>
<p className="text-gray-600">Dentist</p>
</div>
</div>
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
<div>
<h3 className="mb-2 text-xl font-semibold">Personal Information</h3>
<p>
<strong>Email:</strong> [email protected]
</p>
<p>
<strong>Phone:</strong> (555) 123-4567
</p>
<p>
<strong>Gender:</strong> Male
</p>
<p>
<strong>Address:</strong> 7898 Marsh Ln Richardson, Wisconsin
35697
</p>
</div>
<div>
<h3 className="mb-2 text-xl font-semibold">Professional Details</h3>
<p>
<strong>Specialization:</strong> General Dentistry
</p>
<p>
<strong>Years of Experience:</strong> 10
</p>
<p>
<strong>Role:</strong> Doctor
</p>
</div>
</div>
<div className="mt-6">
<h3 className="mb-2 text-xl font-semibold">Bio</h3>
<p className="text-gray-700">
Dr. Adam is a highly skilled dentist with over 10 years of
experience in general dentistry. He specializes in preventive care,
cosmetic dentistry, and restorative procedures.
</p>
</div>
<div className="mt-6">
<h3 className="mb-2 text-xl font-semibold">Services</h3>
<ul className="list-inside list-disc">
<li>Consultation</li>
<li>Scaling</li>
<li>Root Canal</li>
<li>Bleaching</li>
<li>Wisdom Teeth Removal</li>
</ul>
</div>
<div className="mt-6">
<h3 className="mb-2 text-xl font-semibold">Statistics</h3>
<div className="grid grid-cols-2 gap-4 md:grid-cols-4">
<div className="rounded-lg bg-blue-100 p-4">
<p className="text-2xl font-bold">26</p>
<p className="text-sm text-gray-600">Pending Approvals</p>
</div>
<div className="rounded-lg bg-green-100 p-4">
<p className="text-2xl font-bold">14</p>
<p className="text-sm text-gray-600">Upcoming Appointments</p>
</div>
<div className="rounded-lg bg-yellow-100 p-4">
<p className="text-2xl font-bold">10</p>
<p className="text-sm text-gray-600">Patients This Month</p>
</div>
<div className="rounded-lg bg-purple-100 p-4">
<p className="text-2xl font-bold">103</p>
<p className="text-sm text-gray-600">Total Patients</p>
</div>
</div>
</div>
</div>
</div>
);
};
16 changes: 16 additions & 0 deletions src/app/[lang]/admin/(public)/doctors/[doctorId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";
import { DoctorProfile } from "./DoctorsProfile";

interface Props {
params: { doctorId: string };
}

const DoctorDetailsById = ({ params }: Props) => {
return (
<div>
<DoctorProfile />
</div>
);
};

export default DoctorDetailsById;
26 changes: 26 additions & 0 deletions src/app/[lang]/admin/(public)/doctors/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Button, DashboardNav, DoctorsCards } from "@/components";
import React from "react";

const Doctors = () => {
return (
<div>
<DashboardNav />
<section className="p-4">
<div className="mb-8 mt-2">
<div>
<h1 className="font-grotesk text-4xl font-bold text-main-400 sm:text-5xl md:text-6xl lg:text-7xl">
Doctors
</h1>
<p> Your Devoted and Knowledgeable Doctors</p>
</div>
</div>
<div className="mt-10 grid grid-cols-2 gap-2 md:gap-x-8 lg:gap-x-10 xl:gap-x-14">
<DoctorsCards className="max-w-full" imageClassName="h-80" />
<DoctorsCards className="max-w-full" imageClassName="h-80" />
</div>
</section>
</div>
);
};

export default Doctors;
7 changes: 3 additions & 4 deletions src/components/dashboard/DashboardNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ export const DashboardNav = ({ ...props }: Props) => {
<header
{...props}
className={cn(
"sticky top-0 flex h-16 items-center gap-4 border-b bg-background px-4 md:px-6",
"sticky top-0 z-20 flex h-16 items-center gap-4 border-b bg-background px-4 md:px-6",
props.className,
)}
>
<nav className="hidden flex-col gap-6 text-lg font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6">
<LinkTo
href={"/"}
href={"/"}
className="flex items-center gap-2 text-lg font-semibold md:text-base"
>
<Home className="h-6 w-6" />
Expand Down Expand Up @@ -85,8 +85,7 @@ export const DashboardNav = ({ ...props }: Props) => {
<DropdownMenuContent align="end">
<DropdownMenuLabel>My Account</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem>Settings</DropdownMenuItem>
<DropdownMenuItem>Support</DropdownMenuItem>
<DropdownMenuItem>Profile</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem
// onClick={logoutWithAuthJs}
Expand Down

0 comments on commit 68ae8b8

Please sign in to comment.