diff --git a/.env.production b/.env.production
index 021a5c53..d8e4e1fa 100644
--- a/.env.production
+++ b/.env.production
@@ -1,5 +1,5 @@
-API_URL=http://10.10.0.81:8090/api
+API_URL=http://127.0.0.1:8090/api
NEXTAUTH_SECRET=secret
-NEXTAUTH_URL=http://10.10.0.81:3000
-NEXT_PUBLIC_API_URL=http://10.10.0.81:8090/api
+NEXTAUTH_URL=http://127.0.0.1:3000
+NEXT_PUBLIC_API_URL=http://127.0.0.1:8090/api
NEXT_PUBLIC_QC_MEASUREMENT_ENABLED=false
\ No newline at end of file
diff --git a/src/components/LoginPage/LoginPage.tsx b/src/components/LoginPage/LoginPage.tsx
index 23fa15c8..75f1b140 100644
--- a/src/components/LoginPage/LoginPage.tsx
+++ b/src/components/LoginPage/LoginPage.tsx
@@ -16,24 +16,11 @@ const LoginPage = () => {
lg={6}
sx={{
display: { xs: "none", sm: "block" },
- backgroundColor: "#c5e58b",
+ backgroundImage: "linear-gradient(135deg, rgba(59,130,246,0.15) 0%, #f1f5f9 45%, #f8fafc 100%)",
+ backgroundColor: "#f8fafc",
minHeight: { xs: 0, sm: "100vh" },
}}
- >
-
-
+ />
{
labelKey: "nav.m18Sync",
path: "/m18Syn",
requiredAbility: [AUTH.M18_SYNC, AUTH.ADMIN],
- isHidden: false,
+ isHidden: true,
},
{
id: "nav.chartReports",
@@ -416,6 +416,7 @@ const NavigationContent: React.FC = () => {
icon: ,
labelKey: "nav.settings.importTesting",
path: "/settings/m18ImportTesting",
+ isHidden: true,
},
{
id: "nav.settings.importExcel",
diff --git a/src/components/PoSearch/PoSearch.tsx b/src/components/PoSearch/PoSearch.tsx
index 0d82819c..95caf12c 100644
--- a/src/components/PoSearch/PoSearch.tsx
+++ b/src/components/PoSearch/PoSearch.tsx
@@ -294,17 +294,6 @@ const PoSearch: React.FC = ({
if (typeof v === "string" && (v as string).trim() === "") return;
cleanedQuery[k] = String(v);
});
- const searchedCodeRaw = (filterArgs as any)?.code;
- const searchedCode =
- typeof searchedCodeRaw === "string" ? searchedCodeRaw.trim() : "";
- const isM18PoCode =
- searchedCode.length > 14 &&
- (searchedCode.startsWith("PP") || searchedCode.startsWith("PF"));
- if (isM18PoCode) {
- cleanedQuery.refreshFromM18 = "true";
- setIsM18LookupLoading(true);
- setAutoSyncStatus("載入中...");
- }
try {
const baseListResp = await clientAuthFetch(
@@ -320,17 +309,8 @@ const PoSearch: React.FC = ({
const records: PoResult[] = res.records ?? [];
setFilteredPo(records);
setTotalCount(res.total ?? 0);
- if (isM18PoCode) {
- const refreshAction = baseListResp.headers.get("X-M18-Po-Refresh");
- if (refreshAction === "synced") {
- setAutoSyncStatus(records.length > 0 ? "已從M18同步PO" : "找不到PO");
- } else {
- setAutoSyncStatus(null);
- }
- }
} catch (e) {
console.error("PO list fetch error:", e);
- if (isM18PoCode) setAutoSyncStatus("找不到PO");
} finally {
setIsM18LookupLoading(false);
autoSyncInProgressRef.current = false;
diff --git a/src/middleware.ts b/src/middleware.ts
index d71df885..d53b836c 100644
--- a/src/middleware.ts
+++ b/src/middleware.ts
@@ -26,6 +26,11 @@ export default async function middleware(
req: NextRequestWithAuth,
event: NextFetchEvent,
) {
+ const blockedDemoPaths = ["/m18Syn", "/settings/m18ImportTesting", "/testing", "/jo/testing"];
+ if (blockedDemoPaths.some((path) => req.nextUrl.pathname === path || req.nextUrl.pathname.startsWith(`${path}/`))) {
+ return NextResponse.redirect(new URL("/dashboard", req.url));
+ }
+
// Handle language parameters
const langPref = req.nextUrl.searchParams.get(LANG_QUERY_PARAM);
if (langPref) {