Commit bbf90a9e authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

change title page

parent 25a6bea2
......@@ -62,7 +62,7 @@ export default function AddProduct({ open, handleClose }) {
setImage("");
setCategory(0);
setMessage({ message: "เพิ่มสินค้าสำเร็จ", error: false });
handleClose()
handleClose();
setTimeout(() => {
setMessage({ message: "", error: false });
}, 3000);
......@@ -107,6 +107,7 @@ export default function AddProduct({ open, handleClose }) {
/>
<div className="text-left">
<TextField
fullWidth
className="m-1"
label="รายละเอียด"
variant="standard"
......
import { Add } from "@mui/icons-material";
import {
Snackbar,
Box,
Button,
Grid,
......@@ -10,19 +9,17 @@ import {
TableCell,
TableHead,
TableRow,
Alert,
} from "@mui/material";
import React, { useState, useContext, useEffect } from "react";
import React, { useState, useEffect } from "react";
import AddCategory from "@/components/category/AddCategory";
import axios from "axios";
import { Delete } from "@mui/icons-material";
import { Edit } from "@mui/icons-material";
import UpdateCategory from "@/components/category/UpdateCategory";
import { UserContext } from "../_app";
import DeleteCategory from "@/components/category/DeleteCategory";
import Head from "next/head";
export default function AdminCategory() {
const user = useContext(UserContext);
const [modal, setModal] = useState(false);
const [message, setMessage] = useState({ message: "", error: false });
const [deleteState, setDeleteState] = useState({
......@@ -42,6 +39,10 @@ export default function AdminCategory() {
};
useEffect(fetchCategory, [modal, updateState, message, deleteState]);
return (
<>
<Head>
<title>จัดการหมวดหมู่ | admin</title>
</Head>
<Box>
<Grid container>
<Grid item lg={3} md={0}></Grid>
......@@ -87,7 +88,9 @@ export default function AdminCategory() {
<TableCell sx={{ maxWidth: 10 }}>
<Button
color="error"
onClick={() => setDeleteState({open: true, id: cate.id})}
onClick={() =>
setDeleteState({ open: true, id: cate.id })
}
>
<Delete />
</Button>
......@@ -120,5 +123,6 @@ export default function AdminCategory() {
/>
)}
</Box>
</>
);
}
......@@ -4,10 +4,14 @@ import { Grid, Paper } from "@mui/material";
import Chart from "@/components/dashboard/Chart";
import Deposits from "@/components/dashboard/Deposits";
import Orders from "@/components/dashboard/Orders";
import Head from "next/head";
export default function Report() {
return (
<main>
<>
<Head>
<title>รายงาน | admin</title>
</Head>
<DashboardLayout>
<Grid container spacing={3}>
{/* Chart */}
......@@ -44,6 +48,6 @@ export default function Report() {
</Grid>
</Grid>
</DashboardLayout>
</main>
</>
);
}
......@@ -6,21 +6,18 @@ import {
Card,
CardActions,
CardContent,
CardHeader,
CardMedia,
Paper,
Table,
TableBody,
TableCell,
TableHead,
TableRow,
Typography,
} from "@mui/material";
import { useState, useEffect } from "react";
import axios from "axios";
import Head from "next/head";
import { Delete } from "@mui/icons-material";
import { Edit } from "@mui/icons-material";
export default function Stock() {
const [modal, setModal] = useState(false);
const [products, setProducts] = useState([]);
......@@ -39,6 +36,10 @@ export default function Stock() {
}, []);
return (
<>
<Head>
<title>รายการสินค้า | admin</title>
</Head>
<Box>
<Box sx={{ mb: 2, textAlign: "right" }}>
<Button onClick={() => setModal(!modal)}>
......@@ -94,5 +95,6 @@ export default function Stock() {
))}
<AddProduct open={modal} handleClose={() => setModal(false)} />
</Box>
</>
);
}
import { Inter } from 'next/font/google'
import Head from 'next/head'
const inter = Inter({ subsets: ['latin'] })
export default function Home() {
return (
<main>
<>
<Head>
<title>หน้าหลัก | OpenShop</title>
</Head>
<div>
<h1>Hello world</h1>
</main>
</div>
</>
)
}
......@@ -7,6 +7,7 @@ import { Container } from "@mui/material";
import { Google } from "@mui/icons-material";
import { useState } from "react";
import axios from "axios";
import Head from "next/head";
import userCookie from "@/components/lib/userCookie";
export default function Login() {
......@@ -45,6 +46,9 @@ export default function Login() {
return (
<div>
<Head>
<title>เข้าสู่ระบบ | OpenShop</title>
</Head>
<Container>
<Snackbar
ContentProps={{ className: "bg-red-500" }}
......
......@@ -7,6 +7,7 @@ import { Container } from "@mui/material";
import { Google } from "@mui/icons-material";
import { useState } from "react";
import axios from "axios";
import Head from "next/head";
export default function Login() {
const [errorMessage, setErrorMessage] = useState("");
......@@ -66,6 +67,9 @@ export default function Login() {
return (
<div>
<Head>
<title>สมัครสมาชิก | OpenShop</title>
</Head>
<Container>
<Snackbar
ContentProps={{ className: "bg-red-500" }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment