-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0 parents
commit b0503b8
Showing
262 changed files
with
30,293 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": [ | ||
"development" | ||
], | ||
"hints": { | ||
"axe/forms": [ | ||
"default", | ||
{ | ||
"select-name": "off", | ||
"label": "off" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# dental_frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ReactNode } from "react"; | ||
|
||
export default function BookingLayout({ children }: { children: ReactNode }) { | ||
return ( | ||
<section className="grid grid-cols-9 gap-4 w-full">{children}</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import BookingCard from "@/components/bookings"; | ||
|
||
export default function Booking() { | ||
return ( | ||
<> | ||
<BookingCard /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ILayoutProps } from "@/utils/interfaces"; | ||
|
||
export default function CalendarLayout({ children }: ILayoutProps) { | ||
return <section className="grow h-auto lg:h-full w-full">{children}</section>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
"use client"; | ||
import { useEffect } from "react"; | ||
import { Card, CardBody } from "@/libraries/material-tailwind"; | ||
import { toast } from "@/libraries/react-toastify"; | ||
import api from "@/utils/api"; | ||
import { getErrorMessage } from "@/utils/functions"; | ||
import useLoading from "@/hooks/useLoading"; | ||
import { useCalendar } from "@/contexts/CalendarContext"; | ||
import BCalendar from "@/components/custom/calendars/BCalendar"; | ||
import { IEvent } from "@/utils/interfaces"; | ||
import { useUser } from "@/contexts/UserContext"; | ||
|
||
let isFirstLoad = true; | ||
|
||
export default function CalendarPage() { | ||
const { setIsLoading } = useLoading(); | ||
const { setEvents } = useCalendar(); | ||
const {userData} = useUser(); | ||
|
||
useEffect(() => { | ||
if(!userData || userData?.userType == 1) return ; | ||
if (isFirstLoad) { | ||
setIsLoading(true); | ||
api | ||
.post("/calendar/events/list") | ||
.then((res) => { | ||
const processedData: Array<IEvent> = res.data.map( | ||
(dataItem: { | ||
id: string; | ||
title: string; | ||
doubleBooked: boolean; | ||
date: string; | ||
}) => ({ | ||
id: dataItem.id, | ||
title: dataItem.title, | ||
doubleBooked: dataItem.doubleBooked, | ||
start: new Date(`${dataItem.date}T00:00:00.00Z`), | ||
end: new Date(`${dataItem.date}T23:59:59.00Z`), | ||
}) | ||
); | ||
setEvents(processedData); | ||
setIsLoading(false); | ||
}) | ||
.catch((err) => { | ||
toast.error(getErrorMessage(err)); | ||
setIsLoading(false); | ||
}); | ||
} | ||
isFirstLoad = false; | ||
}, []); | ||
|
||
return ( | ||
<Card placeholder="" className="h-full"> | ||
<CardBody placeholder="" className="h-full"> | ||
<BCalendar /> | ||
</CardBody> | ||
</Card> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ReactNode } from "react"; | ||
|
||
interface IProps { | ||
children: ReactNode; | ||
} | ||
|
||
export default function CreatePasswordLayout({ children }: IProps) { | ||
return children; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
"use client"; | ||
import Image from "next/image"; | ||
import LeftSection from "@/components/layout/AuthLayout/LeftSection"; | ||
import { Typography } from "@/libraries/material-tailwind"; | ||
import CreatePasswordForm from "@/components/create-password/CreatePasswordForm"; | ||
import Loading from "@/components/custom/Loading"; | ||
import { useState } from "react"; | ||
|
||
export default function CreatePasswordPage() { | ||
const [loading, setLoading] = useState<boolean>(false); | ||
|
||
return ( | ||
<> | ||
<LeftSection className="flex flex-col justify-center items-center gap-4"> | ||
<div className="flex flex-col items-center gap-4 relative z-4"> | ||
<Image | ||
src="/assets/images/logo-white.png" | ||
width={54} | ||
height={54} | ||
className="w-auto h-auto" | ||
alt="" | ||
priority={true} | ||
/> | ||
<Typography | ||
variant="h1" | ||
placeholder="" | ||
className="text-white text-3xl font-extrabold text-center" | ||
> | ||
Dental Jobs | ||
</Typography> | ||
</div> | ||
<div className="relative"> | ||
<Image | ||
src="/assets/images/calendar.png" | ||
width={383} | ||
height={406} | ||
className="w-auto h-auto" | ||
alt="" | ||
/> | ||
<Image | ||
src="/assets/images/comment-of-calendar.png" | ||
width={260} | ||
height={100} | ||
className="w-auto h-auto absolute top-[11%] -right-[41%]" | ||
alt="" | ||
/> | ||
</div> | ||
<Typography | ||
placeholder="" | ||
className="text-center text-gray-200 font-semibold text-lg" | ||
> | ||
Habitasse leo mi enim condimentum rhoncus. Sed non tortor gravida . | ||
</Typography> | ||
</LeftSection> | ||
<section className="flex flex-col items-center justify-center py-16 z-10 bg-[#F5F7F9] h-screen overflow-auto"> | ||
{loading ? ( | ||
<Loading /> | ||
) : ( | ||
<div className="w-1/2 flex flex-col items-center gap-10"> | ||
<Typography | ||
placeholder="" | ||
variant="h2" | ||
className="font-bold text-3xl text-center text-dark" | ||
> | ||
Create New Password | ||
</Typography> | ||
<CreatePasswordForm setLoading={setLoading} /> | ||
</div> | ||
)} | ||
</section> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ReactNode } from "react"; | ||
|
||
export default function DashboardLayout({ children }: { children: ReactNode }) { | ||
return ( | ||
<section className="grid grid-cols-12 xl:grid-cols-9 gap-4"> | ||
{children} | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"use client"; | ||
import AvatarCard from "@/components/dashboard/AvatarCard"; | ||
import BookingsCard from "@/components/dashboard/BookingsCard"; | ||
import CalendarCard from "@/components/dashboard/CalendarCard"; | ||
import CompleteProfileCard from "@/components/dashboard/CompleteProfileCard"; | ||
import JobPostingCard from "@/components/dashboard/JobPostingCard"; | ||
import { useUser } from "@/contexts/UserContext"; | ||
import { useEffect } from "react"; | ||
|
||
export default function DashboardPage() { | ||
const { userData } = useUser(); | ||
|
||
useEffect(() => { | ||
if (!userData || userData?.userType == 1) return; | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<AvatarCard className="col-span-12 md:col-span-6 xl:col-span-2" /> | ||
<CompleteProfileCard className="col-span-12 md:col-span-6 xl:col-span-4" /> | ||
<BookingsCard className="col-span-12 lg:col-span-6 xl:col-span-3 flex lg:hidden xl:flex" /> | ||
<JobPostingCard className="col-span-12 xl:col-span-7" /> | ||
<BookingsCard className="col-span-12 lg:col-span-6 xl:col-span-3 hidden lg:flex xl:hidden" /> | ||
<CalendarCard className="col-span-12 lg:col-span-6 xl:col-span-2" /> | ||
</> | ||
); | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ReactNode } from "react"; | ||
|
||
interface IProps { | ||
children: ReactNode; | ||
} | ||
|
||
export default function ForgotPasswordLayout({ children }: IProps) { | ||
return children; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
"use client"; | ||
import { useState } from "react"; | ||
import Image from "next/image"; | ||
import LeftSection from "@/components/layout/AuthLayout/LeftSection"; | ||
import { Typography } from "@/libraries/material-tailwind"; | ||
import ForgotPasswordForm from "@/components/forgot-password/ForgotPasswordForm"; | ||
import Loading from "@/components/custom/Loading"; | ||
|
||
export default function ForgotPasswordPage() { | ||
const [loading, setLoading] = useState<boolean>(false); | ||
return ( | ||
<> | ||
<LeftSection className="flex flex-col justify-center items-center gap-4"> | ||
<div className="flex flex-col items-center gap-4 relative z-4"> | ||
<Image | ||
src="/assets/images/logo-white.png" | ||
width={54} | ||
height={54} | ||
className="w-auto h-auto" | ||
alt="" | ||
priority={true} | ||
/> | ||
<Typography | ||
variant="h1" | ||
placeholder="" | ||
className="text-white text-3xl font-extrabold text-center" | ||
> | ||
Dental Jobs | ||
</Typography> | ||
</div> | ||
<div className="relative"> | ||
<Image | ||
src="/assets/images/calendar.png" | ||
width={383} | ||
height={406} | ||
className="w-auto h-auto" | ||
alt="" | ||
/> | ||
<Image | ||
src="/assets/images/comment-of-calendar.png" | ||
width={260} | ||
height={100} | ||
className="w-auto h-auto absolute top-[11%] -right-[41%]" | ||
alt="" | ||
/> | ||
</div> | ||
<Typography | ||
placeholder="" | ||
className="text-center text-gray-200 font-semibold text-lg" | ||
> | ||
Habitasse leo mi enim condimentum rhoncus. Sed non tortor gravida . | ||
</Typography> | ||
</LeftSection> | ||
<section className="flex flex-col items-center justify-center py-16 z-10 bg-[#F5F7F9] h-screen overflow-auto"> | ||
{loading ? ( | ||
<Loading /> | ||
) : ( | ||
<div className="w-1/2 flex flex-col items-center gap-10"> | ||
<Typography | ||
placeholder="" | ||
variant="h2" | ||
className="font-bold text-3xl text-center text-dark" | ||
> | ||
Forgot Password? | ||
</Typography> | ||
<ForgotPasswordForm setLoading={setLoading} /> | ||
</div> | ||
)} | ||
</section> | ||
</> | ||
); | ||
} |
Oops, something went wrong.