瀏覽代碼

fix layout

master
Alex Cheung 1 年之前
父節點
當前提交
6f91c77b46
共有 2 個文件被更改,包括 10 次插入55 次删除
  1. +1
    -1
      src/pages/User/GLDUserProfile/UserInformationCard.js
  2. +9
    -54
      src/pages/User/GLDUserProfile/index.js

+ 1
- 1
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 &&currentUserData !== undefined&&currentUserData.id!==undefined) {
console.log(currentUserData)
// console.log(currentUserData)
// setLocked(currentUserData.locked);
setOnReady(true);
}


+ 9
- 54
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 ?
<LoadingComponent />
:
<Grid container sx={{ backgroundColor: 'backgroundColor.default' }}>
<Grid container sx={{minHeight: '90vh', backgroundColor: 'backgroundColor.default' }}direction="column"
justifyContent="flex-start">
<Grid item xs={12}>
<div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
@@ -127,11 +86,7 @@ const UserMaintainPage = () => {
</Stack>
</div>
</Grid>
<Grid item xs={12}>
<Button title="Back" sx={{ ml: 3.5, mt: 2 }} style={{ border: '2px solid' }} variant="outlined" onClick={() => { navigate("/userSearchview") }}>
<ForwardIcon style={{ height: 30, width: 50, transform: "rotate(180deg)" }} />
</Button>
</Grid>
{/*col 1*/}
<Grid item xs={12}>
<Grid container>


Loading…
取消
儲存