feat: 메뉴 반영

main
Lim Jonguk 3 years ago
parent 486e87febc
commit 8f43d84268

@ -1,3 +1,3 @@
REACT_APP_VERSION = v3.1.0 REACT_APP_VERSION = v0.0.1
REACT_APP_API_URL=http://localhost:8090 REACT_APP_API_URL=http://localhost:8090
REACT_APP_SERVER_TIMEOUT=60000 REACT_APP_SERVER_TIMEOUT=60000

@ -1,6 +1,6 @@
{ {
"name": "berry-material-react", "name": "xit-opst-fo",
"version": "3.1.0", "version": "0.0.1",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@auth0/auth0-spa-js": "^1.19.4", "@auth0/auth0-spa-js": "^1.19.4",

@ -1,13 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>Berry - React Material Admin Dashboard Template</title> <title>주정차 위반 의견진술 심사</title>
<link rel="icon" href="%PUBLIC_URL%/favicon.svg" /> <link rel="icon" href="%PUBLIC_URL%/favicon.svg" />
<!-- Meta Tags--> <!-- Meta Tags-->
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#2296f3" /> <meta name="theme-color" content="#2296f3" />
<meta name="title" content="Berry - React Material Admin Dashboard Template by CodedThemes" /> <meta name="title" content="Parking violation opinion statement review" />
<meta <meta
name="description" name="description"
content="Start your next React project with Berry admin template. It build with Reactjs, Material-UI, Redux, and Hook for faster web development." content="Start your next React project with Berry admin template. It build with Reactjs, Material-UI, Redux, and Hook for faster web development."

@ -30,6 +30,7 @@ const verifyToken = (accessToken) => {
} }
const decoded = jwtDecode(accessToken); const decoded = jwtDecode(accessToken);
console.log(decoded); console.log(decoded);
console.log(decoded.exp > Date.now() / 1000);
/** /**
* Property 'exp' does not exist on type '<T = unknown>(token, options?: JwtDecodeOptions | undefined) => T'. * Property 'exp' does not exist on type '<T = unknown>(token, options?: JwtDecodeOptions | undefined) => T'.

@ -3,7 +3,7 @@ import { memo, useMemo } from 'react';
// material-ui // material-ui
import { useTheme } from '@mui/material/styles'; import { useTheme } from '@mui/material/styles';
import { Box, Drawer, Stack, useMediaQuery } from '@mui/material'; import { Box, Drawer, useMediaQuery } from '@mui/material';
// third-party // third-party
import PerfectScrollbar from 'react-perfect-scrollbar'; import PerfectScrollbar from 'react-perfect-scrollbar';
@ -11,11 +11,9 @@ import PerfectScrollbar from 'react-perfect-scrollbar';
// project imports // project imports
import MenuList from './MenuList'; import MenuList from './MenuList';
import LogoSection from '../LogoSection'; import LogoSection from '../LogoSection';
import MenuCard from './MenuCard';
import { openDrawer } from 'store/slices/menu'; import { openDrawer } from 'store/slices/menu';
import { useDispatch, useSelector } from 'store'; import { useDispatch, useSelector } from 'store';
import { drawerWidth } from 'store/constant'; import { drawerWidth } from 'store/constant';
import Chip from 'ui-component/extended/Chip';
// ==============================|| SIDEBAR DRAWER ||============================== // // ==============================|| SIDEBAR DRAWER ||============================== //
@ -48,10 +46,6 @@ const Sidebar = ({ window }) => {
}} }}
> >
<MenuList /> <MenuList />
<MenuCard />
<Stack direction="row" justifyContent="center" sx={{ mb: 2 }}>
<Chip label={process.env.REACT_APP_VERSION} disabled chipcolor="secondary" size="small" sx={{ cursor: 'pointer' }} />
</Stack>
</PerfectScrollbar> </PerfectScrollbar>
), ),
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps

@ -16,7 +16,11 @@ import {
IconClipboardCheck, IconClipboardCheck,
IconDisabled, IconDisabled,
IconUser, IconUser,
IconParking IconParking,
IconDatabase,
IconDatabaseImport,
IconList,
IconFileCertificate
} from '@tabler/icons'; } from '@tabler/icons';
// constant // constant
@ -34,7 +38,11 @@ const icons = {
IconClipboardCheck, IconClipboardCheck,
IconUser, IconUser,
IconDisabled, IconDisabled,
IconParking IconParking,
IconDatabase,
IconDatabaseImport,
IconList,
IconFileCertificate
}; };
// ==============================|| OPST MENU ITEMS ||============================== // // ==============================|| OPST MENU ITEMS ||============================== //
@ -65,16 +73,16 @@ const opst = {
id: 'opst-2-1', id: 'opst-2-1',
title: <FormattedMessage id="opst-2-1" />, title: <FormattedMessage id="opst-2-1" />,
type: 'item', type: 'item',
url: '/board', url: '/parking/review',
icon: icons.IconKey icon: icons.IconList
}, },
{ {
/* 심의 등록 */ /* 심의 등록 */
id: 'opst-2-2', id: 'opst-2-2',
title: <FormattedMessage id="opst-2-2" />, title: <FormattedMessage id="opst-2-2" />,
type: 'item', type: 'item',
url: '/board', url: '/parking/register',
icon: icons.IconKey icon: icons.IconDatabaseImport
} }
] ]
}, },
@ -90,24 +98,24 @@ const opst = {
id: 'opst-3-1', id: 'opst-3-1',
title: <FormattedMessage id="opst-3-1" />, title: <FormattedMessage id="opst-3-1" />,
type: 'item', type: 'item',
url: '/board', url: '/resident/data',
icon: icons.IconKey icon: icons.IconDatabase
}, },
{ {
/* 심의 목록 */ /* 심의 목록 */
id: 'opst-3-2', id: 'opst-3-2',
title: <FormattedMessage id="opst-2-1" />, title: <FormattedMessage id="opst-2-1" />,
type: 'item', type: 'item',
url: '/board', url: '/resident/review',
icon: icons.IconKey icon: icons.IconList
}, },
{ {
/* 심의 등록 */ /* 심의 등록 */
id: 'opst-3-3', id: 'opst-3-3',
title: <FormattedMessage id="opst-2-1" />, title: <FormattedMessage id="opst-2-2" />,
type: 'item', type: 'item',
url: '/board', url: '/resident/register',
icon: icons.IconKey icon: icons.IconDatabaseImport
} }
] ]
}, },
@ -123,24 +131,24 @@ const opst = {
id: 'opst-4-1', id: 'opst-4-1',
title: <FormattedMessage id="opst-3-1" />, title: <FormattedMessage id="opst-3-1" />,
type: 'item', type: 'item',
url: '/board', url: '/disabled/dataMgt',
icon: icons.IconKey icon: icons.IconDatabase
}, },
{ {
/* 심의 목록 */ /* 심의 목록 */
id: 'opst-4-2', id: 'opst-4-2',
title: <FormattedMessage id="opst-2-1" />, title: <FormattedMessage id="opst-2-1" />,
type: 'item', type: 'item',
url: '/board', url: '/disabled/review',
icon: icons.IconKey icon: icons.IconList
}, },
{ {
/* 심의 등록 */ /* 심의 등록 */
id: 'opst-4-3', id: 'opst-4-3',
title: <FormattedMessage id="opst-2-2" />, title: <FormattedMessage id="opst-2-2" />,
type: 'item', type: 'item',
url: '/board', url: '/disabled/register',
icon: icons.IconKey icon: icons.IconDatabaseImport
} }
] ]
}, },
@ -157,18 +165,16 @@ const opst = {
id: 'opst-5-1', id: 'opst-5-1',
title: <FormattedMessage id="opst-5" />, title: <FormattedMessage id="opst-5" />,
type: 'item', type: 'item',
url: '/board', url: '/user/management',
icon: icons.IconKey, icon: icons.IconDatabase
target: true
}, },
{ {
/* 심사위원 평가 */ /* 심사위원 평가 */
id: 'opst-5-2', id: 'opst-5-2',
title: <FormattedMessage id="opst-5-2" />, title: <FormattedMessage id="opst-5-2" />,
type: 'item', type: 'item',
url: '/board', url: '/user/juror',
icon: icons.IconKey, icon: icons.IconFileCertificate
target: true
} }
] ]
}, },
@ -177,9 +183,8 @@ const opst = {
id: 'opst-6', id: 'opst-6',
title: <FormattedMessage id="opst-6" />, title: <FormattedMessage id="opst-6" />,
type: 'item', type: 'item',
url: '/board', url: '/sms/management',
icon: icons.IconMessage, icon: icons.IconMessage
target: true
}, },
{ {
/* 게시판 관리 */ /* 게시판 관리 */

@ -33,15 +33,6 @@ const other = {
icon: icons.IconHelp, icon: icons.IconHelp,
external: true, external: true,
target: true target: true
},
{
id: 'roadmap',
title: <FormattedMessage id="roadmap" />,
type: 'item',
url: 'https://codedthemes.gitbook.io/berry/roadmap',
icon: icons.IconSitemap,
external: true,
target: true
} }
] ]
}; };

@ -24,6 +24,7 @@ const MainRoutes = {
</AuthGuard> </AuthGuard>
), ),
children: [ children: [
/* Dashboard */
{ {
path: '/dashboard/default', path: '/dashboard/default',
element: <DashboardDefault /> element: <DashboardDefault />
@ -32,14 +33,65 @@ const MainRoutes = {
path: '/dashboard/analytics', path: '/dashboard/analytics',
element: <DashboardAnalytics /> element: <DashboardAnalytics />
}, },
/* 공지사항 */
{ {
path: '/publicBoard', path: '/publicBoard',
element: <PublicBoard /> element: <PublicBoard />
}, },
/* 주정차 */
{
path: '/parking/review',
element: <Board />
},
{
path: '/parking/register',
element: <Board />
},
/* 거주자 */
{
path: '/resident/data',
element: <Board />
},
{
path: '/resident/review',
element: <Board />
},
{
path: '/resident/register',
element: <Board />
},
/* 장애인 */
{
path: '/disabled/data',
element: <Board />
},
{
path: '/disabled/review',
element: <Board />
},
{
path: '/disabled/register',
element: <Board />
},
/* 사용자 */
{
path: '/user/management',
element: <Board />
},
/* SMS */
{
path: '/sms/management',
element: <Board />
},
/* 게시판 */
{ {
path: '/board', path: '/board',
element: <Board /> element: <Board />
}, },
{
path: '/user/juror',
element: <Board />
},
{ {
path: '/sample-page', path: '/sample-page',
element: <SamplePage /> element: <SamplePage />

@ -28,7 +28,7 @@ const axiosService = axios.create({
const alertError = (config, request, response, error) => { const alertError = (config, request, response, error) => {
if (response && response.data) { if (response && response.data) {
const errCode = response.data.code || response.data.status; const errCode = response.data.code || response.data.status;
const errMsg = response.data.code != '' && response.data.code != null ? response.data.message : response.data.error; const errMsg = response.data.code !== '' && response.data.code !== null ? response.data.message : response.data.error;
console.error(`${errCode}: ${errMsg}`); console.error(`${errCode}: ${errMsg}`);
console.error('================================='); console.error('=================================');

Loading…
Cancel
Save