Ensured consistent day calculation using stored days field and removed duplicate daysBetween logic. Implemented working-day-only calculation, excluding weekends (Saturday & Sunday), and blocked invalid date selections. Corrected handling of Unpaid leave so it does not affect leave balance. Added routing and integrated Sonner notifications for login, manager actions, and employee leave submission.
32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
import type { Metadata } from "next";
|
|
import "./globals.css";
|
|
import { AuthProvider } from "@/context/AuthContext";
|
|
import { Geist } from "next/font/google";
|
|
import { cn } from "@/lib/utils";
|
|
import { Toaster } from "@/components/ui/sonner";
|
|
|
|
const geist = Geist({subsets:['latin'],variable:'--font-sans'});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "LeaveFlow - Leave Management",
|
|
description: "Streamlined leave management for teams",
|
|
};
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="en" className={cn("font-sans", geist.variable)}>
|
|
<head>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
</head>
|
|
<body>
|
|
<AuthProvider>{children}</AuthProvider>
|
|
<Toaster richColors position="top-right" />
|
|
</body>
|
|
</html>
|
|
);
|
|
} |