260322:1648 Correct Coresspondence / Doing RFA / Correct CI
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s

This commit is contained in:
admin
2026-03-22 16:48:12 +07:00
parent e5deedb42e
commit 11984bfa29
683 changed files with 105251 additions and 29068 deletions
@@ -1,9 +1,9 @@
"use client";
'use client';
import { CorrespondenceDetail } from "@/components/correspondences/detail";
import { useCorrespondence } from "@/hooks/use-correspondence";
import { Loader2 } from "lucide-react";
import { useParams } from "next/navigation";
import { CorrespondenceDetail } from '@/components/correspondences/detail';
import { useCorrespondence } from '@/hooks/use-correspondence';
import { Loader2 } from 'lucide-react';
import { useParams } from 'next/navigation';
export default function CorrespondenceDetailPage() {
const params = useParams();
@@ -13,26 +13,26 @@ export default function CorrespondenceDetailPage() {
if (!uuid) {
return (
<div className="flex flex-col items-center justify-center min-h-screen">
<h1 className="text-xl font-bold text-red-500">Invalid Correspondence UUID</h1>
</div>
<div className="flex flex-col items-center justify-center min-h-screen">
<h1 className="text-xl font-bold text-red-500">Invalid Correspondence UUID</h1>
</div>
);
}
if (isLoading) {
return (
<div className="flex bg-muted/20 min-h-screen justify-center items-center">
<Loader2 className="h-8 w-8 animate-spin" />
</div>
<div className="flex bg-muted/20 min-h-screen justify-center items-center">
<Loader2 className="h-8 w-8 animate-spin" />
</div>
);
}
if (isError || !correspondence) {
return (
<div className="flex flex-col items-center justify-center min-h-screen">
<h1 className="text-xl font-bold text-red-500">Failed to load correspondence</h1>
<p>Please try again later or verify the UUID.</p>
</div>
<div className="flex flex-col items-center justify-center min-h-screen">
<h1 className="text-xl font-bold text-red-500">Failed to load correspondence</h1>
<p>Please try again later or verify the UUID.</p>
</div>
);
}
@@ -1,4 +1,4 @@
import { CorrespondenceForm } from "@/components/correspondences/form";
import { CorrespondenceForm } from '@/components/correspondences/form';
// Force dynamic rendering to prevent build-time prerendering issues
export const dynamic = 'force-dynamic';
@@ -11,9 +11,7 @@ export default function NewCorrespondencePage() {
<div className="max-w-4xl mx-auto py-6">
<div className="mb-8">
<h1 className="text-3xl font-bold">New Correspondence</h1>
<p className="text-muted-foreground mt-1">
Create a new official letter or communication record.
</p>
<p className="text-muted-foreground mt-1">Create a new official letter or communication record.</p>
</div>
<div className="bg-card border rounded-lg p-6 shadow-sm">
@@ -1,10 +1,10 @@
import { Suspense } from "react";
import { Button } from "@/components/ui/button";
import Link from "next/link";
import { Plus, Loader2 } from "lucide-react";
import { CorrespondencesContent } from "@/components/correspondences/correspondences-content";
import { Suspense } from 'react';
import { Button } from '@/components/ui/button';
import Link from 'next/link';
import { Plus, Loader2 } from 'lucide-react';
import { CorrespondencesContent } from '@/components/correspondences/correspondences-content';
export const dynamic = "force-dynamic";
export const dynamic = 'force-dynamic';
export default function CorrespondencesPage() {
return (
@@ -12,9 +12,7 @@ export default function CorrespondencesPage() {
<div className="flex justify-between items-center">
<div>
<h1 className="text-3xl font-bold">Correspondences</h1>
<p className="text-muted-foreground mt-1">
Manage official letters and communications
</p>
<p className="text-muted-foreground mt-1">Manage official letters and communications</p>
</div>
<Link href="/correspondences/new">
<Button>
@@ -24,7 +22,13 @@ export default function CorrespondencesPage() {
</Link>
</div>
<Suspense fallback={<div className="flex justify-center py-8"><Loader2 className="h-8 w-8 animate-spin" /></div>}>
<Suspense
fallback={
<div className="flex justify-center py-8">
<Loader2 className="h-8 w-8 animate-spin" />
</div>
}
>
<CorrespondencesContent />
</Suspense>
</div>