Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielMajeri committed Jan 24, 2025
1 parent f060174 commit 6a8b7eb
Show file tree
Hide file tree
Showing 24 changed files with 3,198 additions and 2,550 deletions.
6 changes: 4 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const withNextIntl = require("next-intl/plugin")();
import createNextIntlPlugin from "next-intl/plugin";

const withNextIntl = createNextIntlPlugin();

/** @type {import('next').NextConfig} */
const nextConfig = {};

module.exports = withNextIntl(nextConfig);
export default withNextIntl(nextConfig);
5,459 changes: 3,032 additions & 2,427 deletions package-lock.json

Large diffs are not rendered by default.

58 changes: 32 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "taxes-payment-app",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand All @@ -17,41 +18,46 @@
"seed:dev": "dotenv -e .env.development -- ts-node --project tsconfig.seed.json prisma/seed-dev.ts"
},
"dependencies": {
"@azure/identity": "^4.0.1",
"@azure/msal-browser": "^3.10.0",
"@azure/msal-node": "^2.7.0",
"@hookform/resolvers": "^3.3.4",
"@azure/identity": "^4.6.0",
"@azure/msal-browser": "^4.0.2",
"@azure/msal-node": "^3.1.0",
"@hookform/resolvers": "^3.10.0",
"@microsoft/microsoft-graph-client": "^3.0.7",
"@prisma/client": "^5.12.1",
"@tanstack/react-table": "^8.15.0",
"@prisma/client": "^6.2.1",
"@tailwindcss/postcss": "^4.0.0",
"@tanstack/react-table": "^8.20.6",
"lodash": "^4.17.21",
"next": "14.0.4",
"next-auth": "^4.24.5",
"next-intl": "^3.4.2",
"react": "^18",
"react-dom": "^18",
"next": "15.1.6",
"next-auth": "^4.24.11",
"next-intl": "^3.26.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-google-recaptcha": "^3.1.0",
"react-hook-form": "^7.49.3",
"react-hook-form": "^7.54.2",
"react-icons": "^5.0.1",
"react-select": "^5.8.0",
"react-select": "^5.9.0",
"yup": "^1.3.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/lodash": "^4.17.0",
"@types/node": "^20.11.17",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-google-recaptcha": "^2.1.8",
"autoprefixer": "^10.0.1",
"dotenv-cli": "^7.3.0",
"eslint": "^8",
"eslint-config-next": "14.0.4",
"@types/lodash": "^4.17.14",
"@types/node": "^22.10.10",
"@types/react": "19.0.8",
"@types/react-dom": "19.0.3",
"@types/react-google-recaptcha": "^2.1.9",
"autoprefixer": "^10.4.20",
"dotenv-cli": "^8",
"eslint": "^9",
"eslint-config-next": "15.1.6",
"postcss": "^8",
"prettier": "^3.1.1",
"prisma": "^5.8.0",
"tailwindcss": "^3.3.0",
"prettier": "^3.4.2",
"prisma": "^6.2.1",
"tailwindcss": "^4.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"typescript": "^5.7.3"
},
"overrides": {
"@types/react": "19.0.8",
"@types/react-dom": "19.0.3"
}
}
6 changes: 4 additions & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
const config = {
plugins: {
tailwindcss: {},
"@tailwindcss/postcss": {},
autoprefixer: {},
},
};

export default config;
12 changes: 8 additions & 4 deletions src/app/[locale]/accommodation-tax/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ import { unstable_setRequestLocale } from "next-intl/server";
import { unstable_noStore } from "next/cache";

interface Props {
params: { locale: string };
params: Promise<{ locale: string }>;
}

export default async function AccommodationTaxPage({
params: { locale },
}: Props) {
export default async function AccommodationTaxPage(props: Props) {
const params = await props.params;

const {
locale
} = params;

unstable_noStore();
unstable_setRequestLocale(locale);
const [dorms, dormsText] = await Promise.all([
Expand Down
13 changes: 9 additions & 4 deletions src/app/[locale]/admission-tax/[studyCycle]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ export function generateStaticParams() {
}

interface Props {
params: { locale: string; studyCycle: StudyCycle };
params: Promise<{ locale: string; studyCycle: StudyCycle }>;
}

export default async function AdmissionTaxPage({
params: { locale, studyCycle },
}: Props) {
export default async function AdmissionTaxPage(props: Props) {
const params = await props.params;

const {
locale,
studyCycle
} = params;

unstable_noStore();
unstable_setRequestLocale(locale);
if (!Object.values(StudyCycle).includes(studyCycle)) {
Expand Down
4 changes: 1 addition & 3 deletions src/app/[locale]/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
26 changes: 16 additions & 10 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { unstable_setRequestLocale } from "next-intl/server";
import { locales } from "@/i18n";
import { setRequestLocale } from "next-intl/server";
import { routing } from "@/i18n/routing";

import "./globals.css";

import NavBar from "@/components/reusable/NavBar";
import { notFound } from "next/navigation";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -14,21 +15,26 @@ export const metadata: Metadata = {
};

export function generateStaticParams() {
return locales.map((locale) => ({ locale }));
return routing.locales.map((locale) => ({ locale }));
}

type LayoutProps = {
children: React.ReactNode;
params: {
params: Promise<{
locale: string;
};
}>;
};

export default async function RootLayout({
children,
params: { locale },
}: LayoutProps) {
unstable_setRequestLocale(locale);
export default async function RootLayout({ children, params }: LayoutProps) {
const { locale } = await params;

// Ensure that the incoming `locale` is valid
if (!routing.locales.includes(locale as any)) {
notFound();
}

// Enable static rendering
setRequestLocale(locale);

return (
<html lang={locale}>
Expand Down
24 changes: 11 additions & 13 deletions src/app/[locale]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import { useTranslations } from "next-intl";
import { unstable_setRequestLocale } from "next-intl/server";
import { Link } from "@/navigation";
import { setRequestLocale } from "next-intl/server";
import { Link } from "@/i18n/routing";

type PageProps = {
params: {
locale: string;
};
};
export default async function Home({
params,
}: {
params: Promise<{ locale: string }>;
}) {
const { locale } = await params;

export default function Home({ params: { locale } }: PageProps) {
unstable_setRequestLocale(locale);

const t = useTranslations("Index");
// Enable static rendering
setRequestLocale(locale);

return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<h1>PLACEHOLDER UNTIL WE GET THE UI</h1>
<h1>Taxes Payment App</h1>
<div className="flex flex-col">
<h2 className="text-lg font-bold">Admission</h2>
<Link href="/admission-tax/bachelors">Admission bachelors</Link>
Expand Down
13 changes: 9 additions & 4 deletions src/app/[locale]/tuition-tax/[studyCycle]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ export function generateStaticParams() {
}

interface Props {
params: { locale: string; studyCycle: StudyCycle };
params: Promise<{ locale: string; studyCycle: StudyCycle }>;
}

export default async function TuitionTaxPage({
params: { locale, studyCycle },
}: Props) {
export default async function TuitionTaxPage(props: Props) {
const params = await props.params;

const {
locale,
studyCycle
} = params;

unstable_noStore();
unstable_setRequestLocale(locale);

Expand Down
7 changes: 4 additions & 3 deletions src/app/admin/dormitories/update/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import EditDormitoryForm from "@/components/forms/admin/editDorm";
import { unstable_noStore } from "next/cache";

type Params = {
searchParams: {
searchParams: Promise<{
id: string;
name: string;
accountId?: string;
};
}>;
};

export default async function EditDormitory({ searchParams }: Params) {
export default async function EditDormitory(props: Params) {
const searchParams = await props.searchParams;
unstable_noStore();

const accounts = await prisma.euPlatescAccount.findMany({
Expand Down
9 changes: 4 additions & 5 deletions src/app/admin/euplatesc-accounts/update/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ import Navbar from "@/components/navbar";
import EditAccount from "@/components/forms/admin/editAccount";

type Props = {
searchParams: {
searchParams: Promise<{
id: string;
name: string;
description?: string;
merchantId: string;
secretKey: string;
};
}>;
};

export default async function EditEuPlatescAccountPage({
searchParams,
}: Props) {
export default async function EditEuPlatescAccountPage(props: Props) {
const searchParams = await props.searchParams;
return (
<div className="min-h-screen bg-gray-100">
<Navbar />
Expand Down
7 changes: 4 additions & 3 deletions src/app/admin/faculties/update/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import EditFacultyForm from "@/components/forms/admin/editFaculty";
import { unstable_noStore } from "next/cache";

type Params = {
searchParams: {
searchParams: Promise<{
id: string;
nameRo: string;
nameEn: string;
accountId?: string;
};
}>;
};

export default async function EditFaculty({ searchParams }: Params) {
export default async function EditFaculty(props: Params) {
const searchParams = await props.searchParams;
unstable_noStore();

const accounts = await prisma.euPlatescAccount.findMany({
Expand Down
7 changes: 4 additions & 3 deletions src/app/admin/taxes/dormitory/update/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ import prisma from "@/db/prisma";
import { unstable_noStore } from "next/cache";

type Props = {
searchParams: {
searchParams: Promise<{
id: string;
value: string;
studentDormId: string;
remarksRo: string;
remarksEn: string;
};
}>;
};

export default async function EditDormitoryTaxValue({ searchParams }: Props) {
export default async function EditDormitoryTaxValue(props: Props) {
const searchParams = await props.searchParams;
unstable_noStore();

const dormitories = await prisma.studentDorm.findMany({
Expand Down
7 changes: 4 additions & 3 deletions src/app/admin/taxes/faculty/update/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import EditFacultyTaxForm from "@/components/forms/admin/editFacultyTax";
import { unstable_noStore } from "next/cache";

type Props = {
searchParams: {
searchParams: Promise<{
id: string;
value: string;
studyCycle: string;
facultyId: string;
facultyTaxType: string;
remarksRo: string;
remarksEn: string;
};
}>;
};

export default async function Edit({ searchParams }: Props) {
export default async function Edit(props: Props) {
const searchParams = await props.searchParams;
unstable_noStore();

const faculties = await prisma.faculty.findMany();
Expand Down
7 changes: 4 additions & 3 deletions src/app/admin/users/user/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import { addAdmin } from "@/actions/actions";
import { getAccessToken } from "@/utils/microsoft-graph";

type Params = {
searchParams: {
searchParams: Promise<{
userId: string;
};
}>;
};

export default async function Page({ searchParams }: Params) {
export default async function Page(props: Params) {
const searchParams = await props.searchParams;
const authProvider: AuthProvider = async (callback: AuthProviderCallback) => {
try {
const accessToken = await getAccessToken();
Expand Down
2 changes: 1 addition & 1 deletion src/components/admin/TransactionsList.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Props = {
};

export default function TransactionsList({ transactions }: Props) {
const data = useMemo(() => transactions, []);
const data = useMemo(() => transactions, [transactions]);
const [sorting, setSorting] = React.useState<SortingState>([]);
const [search, setSearch] = React.useState<string>();
const table = useReactTable({
Expand Down
Loading

0 comments on commit 6a8b7eb

Please sign in to comment.