diff --git a/src/auth/utils.js b/src/auth/utils.js
index 0dee36f..9ed37f9 100644
--- a/src/auth/utils.js
+++ b/src/auth/utils.js
@@ -7,7 +7,7 @@ import useJwt from 'auth/jwt/coreUseJwt'
*/
// eslint-disable-next-line arrow-body-style
export const hostname = "localhost"
-const hostPort = "8090"
+const hostPort = "8080"
export const hostPath = `http://${hostname}:${hostPort}`
export const apiPath = `${hostPath}/api`
diff --git a/src/layout/MainLayout/Header/index.js b/src/layout/MainLayout/Header/index.js
index 48c4489..b5eb4d6 100644
--- a/src/layout/MainLayout/Header/index.js
+++ b/src/layout/MainLayout/Header/index.js
@@ -114,7 +114,7 @@ function Header(props) {
>
-
- User
+ User
-
User Group
diff --git a/src/layout/MainLayout/index.js b/src/layout/MainLayout/index.js
index 48a9177..b57283c 100644
--- a/src/layout/MainLayout/index.js
+++ b/src/layout/MainLayout/index.js
@@ -17,7 +17,7 @@ import Footer from 'components/cards/AuthFooter';
// types
import { openDrawer } from 'store/reducers/menu';
-import "assets/style/styles.css";
+// import "assets/style/styles.css";
// ==============================|| MAIN LAYOUT ||============================== //
@@ -50,7 +50,7 @@ const MainLayout = () => {
}, [drawerOpen]);
return (
-
+
{/* */}
diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js
index 67f217e..6b65305 100644
--- a/src/pages/authentication/auth-forms/CustomFormWizard.js
+++ b/src/pages/authentication/auth-forms/CustomFormWizard.js
@@ -398,14 +398,14 @@ const CustomFormWizard = (props) => {
onChange={handleChange}
placeholder="( )"
inputProps={{
+ maxLength: 1,
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
- }
+ }
},
}}
fullWidth
- // sx={{width:'90%'}}
error={Boolean(touched.checkDigit && errors.checkDigit)}
/>
{touched.checkDigit && errors.checkDigit && (
@@ -667,7 +667,6 @@ const CustomFormWizard = (props) => {
{
onChange={handleChange}
placeholder="eg:852"
inputProps={{
+ maxLength: 3,
onKeyDown: (e) => {
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
- sx={{width:'20%'}}
+ sx={{width:'25%'}}
/>
{
if (e.key === 'Enter') {
e.preventDefault();
}
},
}}
+ sx={{width:'75%'}}
/>
{touched.phone && errors.phone && (
@@ -714,12 +714,6 @@ const CustomFormWizard = (props) => {
- {/*
-
-
-
-
- */}
@@ -729,7 +723,6 @@ const CustomFormWizard = (props) => {
傳真號碼
{
}
},
}}
- sx={{width:'20%'}}
+ sx={{width:'25%'}}
/>
{
}
},
}}
+ sx={{width:'75%'}}
/>
diff --git a/src/pages/pnspsUserDetailPage/UserInformationCard.js b/src/pages/pnspsUserDetailPage/UserInformationCard.js
index 59ede65..6bf419f 100644
--- a/src/pages/pnspsUserDetailPage/UserInformationCard.js
+++ b/src/pages/pnspsUserDetailPage/UserInformationCard.js
@@ -13,7 +13,7 @@ import {
subDivision4,
subDivision5,
subDivision6
-} from "../pnspsUserSettingPage/DummyComboRecord";
+} from "../pnspsUserSearchPage/DummyComboRecord";
import {useEffect, useState} from "react";
import Checkbox from "@mui/material/Checkbox";
import LoadingComponent from "../extra-pages/LoadingComponent";
diff --git a/src/pages/pnspsUserSettingPage/DummyComboRecord.js b/src/pages/pnspsUserSearchPage/DummyComboRecord.js
similarity index 100%
rename from src/pages/pnspsUserSettingPage/DummyComboRecord.js
rename to src/pages/pnspsUserSearchPage/DummyComboRecord.js
diff --git a/src/pages/pnspsUserSearchPage/UserSearchForm.js b/src/pages/pnspsUserSearchPage/UserSearchForm.js
index 33cc35a..09336d5 100644
--- a/src/pages/pnspsUserSearchPage/UserSearchForm.js
+++ b/src/pages/pnspsUserSearchPage/UserSearchForm.js
@@ -17,7 +17,7 @@ import {
subDivision4,
subDivision5,
subDivision6
-} from "pages/pnspsUserSettingPage/DummyComboRecord";
+} from "pages/pnspsUserSearchPage/DummyComboRecord";
import Checkbox from "@mui/material/Checkbox";
import * as React from "react";
// ==============================|| DASHBOARD - DEFAULT ||============================== //
diff --git a/src/pages/pnspsUserSettingPage/UserSearchForm.js b/src/pages/pnspsUserSettingPage/UserSearchForm.js
deleted file mode 100644
index 2297846..0000000
--- a/src/pages/pnspsUserSettingPage/UserSearchForm.js
+++ /dev/null
@@ -1,232 +0,0 @@
-// material-ui
-import {
- Button,
- CardContent, FormControlLabel,
- Grid, TextField,
- Typography
-} from '@mui/material';
-import MainCard from "../../components/MainCard";
-import {useForm} from "react-hook-form";
-
-import dayjs from "dayjs";
-import {useEffect, useState} from "react";
-import Autocomplete from '@mui/material/Autocomplete';
-import {
- subDivision1,
- subDivision2,
- subDivision3,
- subDivision4,
- subDivision5,
- subDivision6
-} from "pages/pnspsUserSettingPage/DummyComboRecord";
-import Checkbox from "@mui/material/Checkbox";
-import * as React from "react";
-// ==============================|| DASHBOARD - DEFAULT ||============================== //
-
-const subDivisionArray =[
- ...subDivision1,
- ...subDivision2,
- ...subDivision3,
- ...subDivision4,
- ...subDivision5,
- ...subDivision6
-];
-
-const UserSearchForm = ({applySearch}) => {
-
- const [value, setValue] = useState();
- const [type, setType] = useState([]);
- const [division, setDivision] = useState(null);
- const [subDivision, setSubDivision] = useState(null);
- const [isLotusNoteUser, setIsLotusNoteUser] = useState(false);
- const [locked, setLocked] = useState(false);
-
-
- const { reset, register, handleSubmit } = useForm()
- const onSubmit = (data) => {
-
- let typeArray = [];
-
- for(let i =0; i < type.length; i++){
- typeArray.push(type[i].label);
- }
-
- const temp = {
- eventName: data.eventName,
- eventOrganization: data.eventOrganization,
- eventRegion: data.eventRegion,
- eventDescription: data.eventDescription,
- type: typeArray,
- division: division,
- subDivision: subDivision,
- selectedDate: dayjs(value).format("MM/DD/YYYY")
- };
- applySearch(temp);
- };
-
- useEffect(() => {
- if(division != null){
- setSubDivision(subDivisionArray[division.type-1][0]);
- }
-
- }, [division]);
-
- function resetForm(){
- setValue(new Date().toDateString());
- setType([]);
- setDivision(null);
- setSubDivision(null);
- setIsLotusNoteUser(false);
- setLocked(false);
- reset();
- }
-
- return (
-
-
-
-
- );
-};
-
-export default UserSearchForm;
diff --git a/src/pages/pnspsUserSettingPage/UserTable.js b/src/pages/pnspsUserSettingPage/UserTable.js
deleted file mode 100644
index ed2ab25..0000000
--- a/src/pages/pnspsUserSettingPage/UserTable.js
+++ /dev/null
@@ -1,137 +0,0 @@
-// material-ui
-import * as React from 'react';
-import {
- DataGrid,
- GridActionsCellItem,
-} from "@mui/x-data-grid";
-import EditIcon from '@mui/icons-material/Edit';
-import {useEffect} from "react";
-import {useNavigate} from "react-router-dom";
-import { useTheme } from '@mui/material/styles';
-import Checkbox from '@mui/material/Checkbox';
-// ==============================|| EVENT TABLE ||============================== //
-
-export default function UserTable({recordList}) {
- const [rows, setRows] = React.useState(recordList);
- const [rowModesModel] = React.useState({});
- const theme = useTheme();
-
- const navigate = useNavigate()
-
- useEffect(() => {
- setRows(recordList);
- }, [recordList]);
-
- const handleEditClick = (id) => () => {
- navigate('/user/'+ id);
- };
-
- const columns = [
- {
- field: 'actions',
- type: 'actions',
- headerName: 'Actions',
- width: 100,
- cellClassName: 'actions',
- getActions: ({id}) => {
- return [
- }
- label="Edit"
- className="textPrimary"
- onClick={handleEditClick(id)}
- color="primary"
- />]
- },
- },
- {
- id: 'username',
- field: 'username',
- headerName: 'User Name',
- flex: 1,
- },
- {
- id: 'name',
- field: 'name',
- headerName: 'Full Name',
- flex: 1,
- },
- {
- id: 'post',
- field: 'post',
- headerName: 'Post',
- flex: 1,
- },
- {
- id: 'email',
- field: 'email',
- headerName: 'Email',
- flex: 1,
- },
- {
- id: 'subDivisionId',
- field: 'subDivisionId',
- //type: 'date',
- //sortable: false,
- headerName: 'Sub-Division',
- flex: 1,
- },
- {
- id: 'lotusNotesUser',
- field: 'lotusNotesUser',
- type: 'bool',
- headerName: 'Lotus Notes User',
- flex: 1,
- renderCell: (params) => {
- return (
-
- );
- },
- },
- {
- id: 'locked',
- field: 'locked',
- type: 'bool',
- headerName: 'Locked',
- flex: 1,
- renderCell: (params) => {
- return (
-
- );
- },
- },
- ];
-
- return (
-
-
-
- );
-}
diff --git a/src/pages/pnspsUserSettingPage/index.js b/src/pages/pnspsUserSettingPage/index.js
deleted file mode 100644
index 0f333cf..0000000
--- a/src/pages/pnspsUserSettingPage/index.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// material-ui
-import {
- Grid
-} from '@mui/material';
-import MainCard from "../../components/MainCard";
-import SearchForm from "./UserSearchForm";
-import EventTable from "./UserTable";
-import {useEffect, useState} from "react";
-import axios from "axios";
-import {apiPath} from "../../auth/utils";
-import {GET_USER_PATH} from "../../utils/ApiPathConst";
-
-// ==============================|| DASHBOARD - DEFAULT ||============================== //
-
-
-const UserSettingPage = () => {
-
- const [record,setRecord] = useState([]);
- const [searchCriteria, setSearchCriteria] = useState({});
- const [sortedRecord, setSortedRecord] = useState([]);
-
- useEffect(() => {
- axios.get(`${apiPath}${GET_USER_PATH}`)
- .then((response) => {
- if (response.status === 200) {
- setRecord(response.data);
- setSortedRecord(response.data);
- }
- })
- .catch(error => {
- console.log(error);
- return false;
- });
- }, [])
-
- const filterSearchName = (array) => {
- return array.filter((item) => item.name.toLowerCase().includes(searchCriteria.eventName));
- };
-
- const filterSearchType = (array) => {
- return array.filter((item) => item.category.includes(searchCriteria.type));
- };
-
- function sortData(record) {
- let sortedRecord = record;
- sortedRecord = filterSearchName(sortedRecord);
- sortedRecord = filterSearchType(sortedRecord);
- return sortedRecord;
- }
-
- function applySearch(input) {
- setSearchCriteria(input);
- }
-
- useEffect(() => {
- //console.log(searchCriteria);
- if (Object.keys(searchCriteria).length !== 0) {
- const tempSortedRecord = sortData(record);
- console.log(tempSortedRecord);
- setSortedRecord(tempSortedRecord);
- } else {
- setSortedRecord(record);
- }
- }, [searchCriteria]);
-
- return (
-
- {/*row 1*/}
-
-
-
- {/*row 2*/}
-
-
-
-
-
-
-
-
- );
-};
-
-export default UserSettingPage;
diff --git a/src/routes/SettingRoutes.js b/src/routes/SettingRoutes.js
index dc51cd3..797071e 100644
--- a/src/routes/SettingRoutes.js
+++ b/src/routes/SettingRoutes.js
@@ -9,7 +9,6 @@ const SettingPage = Loadable(lazy(() => import('pages/pnspsSettingPage')));
const PasswordPolicyPage = Loadable(lazy(()=> import('pages/pnspsPasswordPolicyPage')))
const UserSettingPage = Loadable(lazy(()=>import ('pages/pnspsUserSettingPage/')));
const UserSearchPage = Loadable(lazy(()=>import ('pages/pnspsUserSearchPage')));
-const UserSearchPage_Public = Loadable(lazy(()=>import ('pages/pnspsUserSearchPage_Public')));
const UserMaintainPage = Loadable(lazy(() => import('pages/pnspsUserDetailPage')));
const UserGroupSearchPage = Loadable(lazy(() => import('pages/pnspsUserGroupSearchPage')));
const UserGroupDetailPage = Loadable(lazy(() => import('pages/pnspsUserGroupDetailPage')));
@@ -40,13 +39,9 @@ const SettingRoutes = {
path: '/user/:id',
element:
},
- {
- path: 'usersetting',
- element:
- },
{
path: 'setting',
- element:
+ element:
},
{
path: 'passwordpolicy',