From 6f91c77b46aa006976bafef624709786c59240e8 Mon Sep 17 00:00:00 2001 From: Alex Cheung Date: Tue, 23 Jan 2024 16:24:18 +0800 Subject: [PATCH] fix layout --- .../GLDUserProfile/UserInformationCard.js | 2 +- src/pages/User/GLDUserProfile/index.js | 63 +++---------------- 2 files changed, 10 insertions(+), 55 deletions(-) diff --git a/src/pages/User/GLDUserProfile/UserInformationCard.js b/src/pages/User/GLDUserProfile/UserInformationCard.js index aaf5c0f..873cae7 100644 --- a/src/pages/User/GLDUserProfile/UserInformationCard.js +++ b/src/pages/User/GLDUserProfile/UserInformationCard.js @@ -32,7 +32,7 @@ const UserInformationCard = ({userData}) => { useEffect(() => { //if state data are ready and assign to different field if (Object.keys(userData).length > 0 &¤tUserData !== undefined&¤tUserData.id!==undefined) { - console.log(currentUserData) + // console.log(currentUserData) // setLocked(currentUserData.locked); setOnReady(true); } diff --git a/src/pages/User/GLDUserProfile/index.js b/src/pages/User/GLDUserProfile/index.js index e61ed25..e253354 100644 --- a/src/pages/User/GLDUserProfile/index.js +++ b/src/pages/User/GLDUserProfile/index.js @@ -1,6 +1,6 @@ // material-ui import { - Button, + // Button, Grid, Typography, Stack, @@ -9,9 +9,9 @@ import { import { useEffect, useState } from "react"; import * as React from "react"; import axios from "axios"; -import { useNavigate, +// import { useNavigate, // useParams -} from "react-router-dom"; +// } from "react-router-dom"; import { GLD_USER_PATH, // DELETE_USER, // POST_ADMIN_USER_REGISTER @@ -29,7 +29,7 @@ import { // notifyDeleteSuccess, // notifySaveSuccess, } from "utils/CommonFunction"; -import ForwardIcon from '@mui/icons-material/Forward'; +// import ForwardIcon from '@mui/icons-material/Forward'; import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' import { @@ -50,52 +50,10 @@ const BackgroundHead = { const UserMaintainPage = () => { // const params = useParams(); - const navigate = useNavigate(); + // const navigate = useNavigate(); const [userData, setUserData] = React.useState({}); const [onReady, setOnReady] = useState(false); - // const [isCollectData, setIsCollectData] = useState(false); - // const [editedCustomerData, setEditedCustomerData] = useState({}); - // const [userConfirm, setUserConfirm] = useState(false); - // const [isNewRecord, setIsNewRecord] = useState(false); - // const [refUserData, setRefUserData] = React.useState({}); - - - // function updateUserObject(userData) { - // setEditedCustomerData(userData); - // } - - // const submitData = () => { - // setUserConfirm(true); - // setIsCollectData(!isCollectData); - // } - - // ==============================|| DELETE WINDOW RELATED ||============================== // - // const [isWindowOpen, setIsWindowOpen] = useState(false); - // const handleClose = () => { - // setIsWindowOpen(false); - // }; - - // const handleDeleteClick = () => { - // setIsWindowOpen(true); - // }; - - // function deleteData() { - // axios.delete(`${DELETE_USER}/${params.id}`, - // ) - // .then((response) => { - // if (response.status === 204) { - // notifyDeleteSuccess(); - // setIsWindowOpen(false); - // navigate('/userSearchview'); - // } - // }) - // .catch(error => { - // console.log(error); - // return false; - // }); - // } - // ==============================|| DELETE WINDOW RELATED ||============================== // - + useEffect(() => { axios.get(`${GLD_USER_PATH}/${getUserId()}`) .then((response) => { @@ -119,7 +77,8 @@ const UserMaintainPage = () => { !onReady ? : - +
@@ -127,11 +86,7 @@ const UserMaintainPage = () => {
- - - + {/*col 1*/}