260320:1131 Refactor Overrall #01
Build and Deploy / deploy (push) Has been cancelled

This commit is contained in:
admin
2026-03-20 11:31:27 +07:00
parent f1b81a7d0d
commit 1d3479770b
147 changed files with 1745 additions and 1567 deletions
@@ -29,6 +29,12 @@ import {
} from "@/components/ui/card";
import { toast } from "sonner";
// Force dynamic rendering to prevent build-time prerendering issues
export const dynamic = 'force-dynamic';
// Ensure this page is never statically generated
export const fetchCache = 'force-no-store';
// 1. กำหนด Schema สำหรับตรวจสอบข้อมูล (Validation)
// อ้างอิงจาก Data Dictionary ตาราง projects
const projectSchema = z.object({
@@ -74,7 +80,6 @@ export default function CreateProjectPage() {
try {
// เรียก API สร้างโครงการ (Mockup URL)
// ใน Phase หลัง Backend จะเตรียม Endpoint POST /projects ไว้ให้
console.log("Submitting project data:", data);
// จำลองการส่งข้อมูล (Artificial Delay)
await new Promise((resolve) => setTimeout(resolve, 1000));
@@ -86,7 +91,7 @@ export default function CreateProjectPage() {
router.refresh();
} catch (error) {
toast.error('เกิดข้อผิดพลาดในการสร้างโครงการ');
console.error('[CreateProjectPage]', error);
// Project creation failed - toast shown
} finally {
setIsLoading(false);
}