diff --git a/app/[locale]/location/[id]/add/LocationAddPage.tsx b/app/[locale]/location/[id]/add/LocationAddPage.tsx new file mode 100644 index 0000000..9556980 --- /dev/null +++ b/app/[locale]/location/[id]/add/LocationAddPage.tsx @@ -0,0 +1,6 @@ +import { LocationEditForm } from '@/app/ui/LocationEditForm'; +import { YearMonth } from '@/app/lib/db-types'; + +export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) { + return (); +} \ No newline at end of file diff --git a/app/[locale]/location/[id]/add/page.tsx b/app/[locale]/location/[id]/add/page.tsx new file mode 100644 index 0000000..3f032fc --- /dev/null +++ b/app/[locale]/location/[id]/add/page.tsx @@ -0,0 +1,11 @@ +import { parseYearMonth } from '@/app/lib/format'; +import LocationAddPage from './LocationAddPage'; +import { Main } from '@/app/ui/Main'; + +export default async function Page({ params:{ id } }: { params: { id:string } }) { + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/app/[locale]/location/[id]/delete/LocationDeletePage.tsx b/app/[locale]/location/[id]/delete/LocationDeletePage.tsx new file mode 100644 index 0000000..7377733 --- /dev/null +++ b/app/[locale]/location/[id]/delete/LocationDeletePage.tsx @@ -0,0 +1,14 @@ +import { notFound } from 'next/navigation'; +import { fetchLocationById } from '@/app/lib/actions/locationActions'; +import { LocationDeleteForm } from '@/app/ui/LocationDeleteForm'; + +export const LocationDeletePage = async ({ locationId }: { locationId:string }) => { + + const location = await fetchLocationById(locationId); + + if (!location) { + return(notFound()); + } + + return (); +} \ No newline at end of file diff --git a/app/[locale]/location/[id]/delete/not-found.tsx b/app/[locale]/location/[id]/delete/not-found.tsx new file mode 100644 index 0000000..1587224 --- /dev/null +++ b/app/[locale]/location/[id]/delete/not-found.tsx @@ -0,0 +1,6 @@ +import { NotFoundPage } from '@/app/ui/NotFoundPage'; + +const BillingLocationNotFound = () => +; + +export default BillingLocationNotFound; \ No newline at end of file diff --git a/app/[locale]/location/[id]/delete/page.tsx b/app/[locale]/location/[id]/delete/page.tsx new file mode 100644 index 0000000..40c7b8e --- /dev/null +++ b/app/[locale]/location/[id]/delete/page.tsx @@ -0,0 +1,19 @@ +import { notFound } from 'next/navigation'; +import { fetchLocationById } from '@/app/lib/actions/locationActions'; +import { LocationDeleteForm } from '@/app/ui/LocationDeleteForm'; +import { Main } from '@/app/ui/Main'; + +export default async function Page({ params:{ id } }: { params: { id:string } }) { + + const location = await fetchLocationById(id); + + if (!location) { + return(notFound()); + } + + return ( +
+ +
+ ); +} \ No newline at end of file diff --git a/app/[locale]/location/[id]/edit/LocationEditPage.tsx b/app/[locale]/location/[id]/edit/LocationEditPage.tsx new file mode 100644 index 0000000..505f634 --- /dev/null +++ b/app/[locale]/location/[id]/edit/LocationEditPage.tsx @@ -0,0 +1,16 @@ +import { notFound } from 'next/navigation'; +import { LocationEditForm } from '@/app/ui/LocationEditForm'; +import { fetchLocationById } from '@/app/lib/actions/locationActions'; + +export default async function LocationEditPage({ locationId }: { locationId:string }) { + + const location = await fetchLocationById(locationId); + + if (!location) { + return(notFound()); + } + + const result = ; + + return (result); +} \ No newline at end of file diff --git a/app/[locale]/location/[id]/edit/not-found.tsx b/app/[locale]/location/[id]/edit/not-found.tsx new file mode 100644 index 0000000..54c9f60 --- /dev/null +++ b/app/[locale]/location/[id]/edit/not-found.tsx @@ -0,0 +1,6 @@ +import { NotFoundPage } from '@/app/ui/NotFoundPage'; + +const BillingLocationNotFound = () => +; + +export default BillingLocationNotFound; \ No newline at end of file diff --git a/app/[locale]/location/[id]/edit/page.tsx b/app/[locale]/location/[id]/edit/page.tsx new file mode 100644 index 0000000..251f944 --- /dev/null +++ b/app/[locale]/location/[id]/edit/page.tsx @@ -0,0 +1,15 @@ +import { Suspense } from 'react'; +import LocationEditPage from './LocationEditPage'; +import { Main } from '@/app/ui/Main'; +import { LocationEditFormSkeleton } from '@/app/ui/LocationEditForm'; + +export default async function Page({ params:{ id } }: { params: { id:string } }) { + + return ( +
+ }> + + +
+ ); +} \ No newline at end of file