| @@ -2,6 +2,7 @@ | |||||
| // import ProjectSearch from "@/components/ProjectSearch"; | // import ProjectSearch from "@/components/ProjectSearch"; | ||||
| // import { getServerI18n } from "@/i18n"; | // import { getServerI18n } from "@/i18n"; | ||||
| import {I18nProvider} from "@/i18n"; | |||||
| import { preloadProjects } from "../../../app/api/projects"; | import { preloadProjects } from "../../../app/api/projects"; | ||||
| import ProjectSearch from "../../../components/ProjectSearch"; | import ProjectSearch from "../../../components/ProjectSearch"; | ||||
| import { getServerI18n } from "../../../i18n"; | import { getServerI18n } from "../../../i18n"; | ||||
| @@ -42,9 +43,11 @@ const Projects: React.FC = async () => { | |||||
| {t("Create Project")} | {t("Create Project")} | ||||
| </Button> | </Button> | ||||
| </Stack> | </Stack> | ||||
| <I18nProvider namespaces={["project"]}> | |||||
| <Suspense fallback={<ProjectSearch.Loading />}> | <Suspense fallback={<ProjectSearch.Loading />}> | ||||
| <ProjectSearch /> | <ProjectSearch /> | ||||
| </Suspense> | </Suspense> | ||||
| </I18nProvider> | |||||
| </> | </> | ||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -8,6 +8,7 @@ import Typography from "@mui/material/Typography"; | |||||
| import { Metadata } from "next"; | import { Metadata } from "next"; | ||||
| import Link from "next/link"; | import Link from "next/link"; | ||||
| import { Suspense } from "react"; | import { Suspense } from "react"; | ||||
| import { I18nProvider } from "@/i18n"; | |||||
| export const metadata: Metadata = { | export const metadata: Metadata = { | ||||
| title: "Product", | title: "Product", | ||||
| @@ -15,7 +16,7 @@ export const metadata: Metadata = { | |||||
| const productSetting: React.FC = async () => { | const productSetting: React.FC = async () => { | ||||
| const project = TypeEnum.PRODUCT; | const project = TypeEnum.PRODUCT; | ||||
| const { t } = await getServerI18n(project); | |||||
| const { t } = await getServerI18n("project"); | |||||
| // preloadClaims(); | // preloadClaims(); | ||||
| return ( | return ( | ||||
| @@ -38,9 +39,13 @@ const productSetting: React.FC = async () => { | |||||
| {t("Create product")} | {t("Create product")} | ||||
| </Button> */} | </Button> */} | ||||
| </Stack> | </Stack> | ||||
| <Suspense fallback={<ItemsSearch.Loading />}> | |||||
| <ItemsSearch /> | |||||
| </Suspense> | |||||
| <I18nProvider namespaces={["project", "common", "items"]}> | |||||
| <Suspense fallback={<ItemsSearch.Loading />}> | |||||
| <ItemsSearch /> | |||||
| </Suspense> | |||||
| </I18nProvider> | |||||
| </> | </> | ||||
| ); | ); | ||||
| }; | }; | ||||
| @@ -4,10 +4,22 @@ import LoginForm from "./LoginForm"; | |||||
| import Logo from "../Logo"; | import Logo from "../Logo"; | ||||
| import { Box } from "@mui/material"; | import { Box } from "@mui/material"; | ||||
| const LoginPage = () => { | const LoginPage = () => { | ||||
| return ( | return ( | ||||
| <Grid container height="100vh"> | <Grid container height="100vh"> | ||||
| <Grid item sm sx={{ backgroundColor: "neutral.900" }}></Grid> | |||||
| <Grid item sm sx={{ backgroundColor: "#c5e58b"}}> | |||||
| <Box sx={{ | |||||
| backgroundImage: "url('logo/HomepageLogo.png')", | |||||
| backgroundRepeat: "no-repeat", | |||||
| backgroundSize: "75% 40%", | |||||
| width: "100%", | |||||
| height: "100%", | |||||
| backgroundPosition: "center", | |||||
| }}> | |||||
| </Box> | |||||
| </Grid> | |||||
| <Grid item xs={12} sm={8} lg={5}> | <Grid item xs={12} sm={8} lg={5}> | ||||
| <Box | <Box | ||||
| sx={{ | sx={{ | ||||
| @@ -21,6 +21,7 @@ | |||||
| "Scheduling": "排程", | "Scheduling": "排程", | ||||
| "Settings": "設定", | "Settings": "設定", | ||||
| "User": "用戶", | "User": "用戶", | ||||
| "user": "用戶", | |||||
| "User Group": "用戶群組", | "User Group": "用戶群組", | ||||
| "Items": "物料", | "Items": "物料", | ||||
| "Demand Forecast Setting": "需求預測設定", | "Demand Forecast Setting": "需求預測設定", | ||||
| @@ -22,5 +22,7 @@ | |||||
| "authority": "權限", | "authority": "權限", | ||||
| "description": "描述", | "description": "描述", | ||||
| "Search by Authority or description or position.": "搜尋權限、描述或職位。", | "Search by Authority or description or position.": "搜尋權限、描述或職位。", | ||||
| "Remove": "移除" | |||||
| "Remove": "移除", | |||||
| "User": "用戶", | |||||
| "user": "用戶" | |||||
| } | } | ||||