menambahkan halaman awal untuk setiap menu sidebar
This commit is contained in:
30
src/pages/eventAlarm/IndexEventAlarm.jsx
Normal file
30
src/pages/eventAlarm/IndexEventAlarm.jsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexEventAlarm = memo(function IndexEventAlarm() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Event Alarm</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Event Alarm Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexEventAlarm;
|
||||
31
src/pages/history/report/IndexReport.jsx
Normal file
31
src/pages/history/report/IndexReport.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexReport = memo(function IndexReport() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• History</Text> },
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>Report</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Report Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexReport;
|
||||
31
src/pages/history/trending/IndexTrending.jsx
Normal file
31
src/pages/history/trending/IndexTrending.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexTrending = memo(function IndexTrending() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• History</Text> },
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>Trending</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Trending Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexTrending;
|
||||
31
src/pages/master/brandDevice/IndexBrandDevice.jsx
Normal file
31
src/pages/master/brandDevice/IndexBrandDevice.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexBrandDevice = memo(function IndexBrandDevice() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Master</Text> },
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>Brand Device</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Brand Device Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexBrandDevice;
|
||||
31
src/pages/master/errorCode/IndexErrorCode.jsx
Normal file
31
src/pages/master/errorCode/IndexErrorCode.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexErrorCode = memo(function IndexErrorCode() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Master</Text> },
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>Error Code</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Error Code Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexErrorCode;
|
||||
31
src/pages/master/tag/IndexTag.jsx
Normal file
31
src/pages/master/tag/IndexTag.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexTag = memo(function IndexTag() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Master</Text> },
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>Tag</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Tag Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexTag;
|
||||
30
src/pages/notification/IndexNotification.jsx
Normal file
30
src/pages/notification/IndexNotification.jsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexNotification = memo(function IndexNotification() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Notifikasi</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Notifikasi Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexNotification;
|
||||
30
src/pages/role/IndexRole.jsx
Normal file
30
src/pages/role/IndexRole.jsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexRole = memo(function IndexRole() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Role</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Role Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexRole;
|
||||
31
src/pages/shiftManagement/member/IndexMember.jsx
Normal file
31
src/pages/shiftManagement/member/IndexMember.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexMember = memo(function IndexMember() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Manajemen Shift</Text> },
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>Anggota Shift</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Anggota Shift Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexMember;
|
||||
31
src/pages/shiftManagement/schedule/IndexSchedule.jsx
Normal file
31
src/pages/shiftManagement/schedule/IndexSchedule.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexSchedule = memo(function IndexSchedule() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• Manajemen Shift</Text> },
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>Jadwal Shift</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Jadwal Shift Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexSchedule;
|
||||
30
src/pages/user/IndexUser.jsx
Normal file
30
src/pages/user/IndexUser.jsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import React, { memo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useBreadcrumb } from '../../layout/LayoutBreadcrumb';
|
||||
import { Typography } from 'antd';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const IndexUser = memo(function IndexUser() {
|
||||
const navigate = useNavigate();
|
||||
const { setBreadcrumbItems } = useBreadcrumb();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
setBreadcrumbItems([
|
||||
{ title: <Text strong style={{ fontSize: '14px' }}>• User</Text> }
|
||||
]);
|
||||
} else {
|
||||
navigate('/signin');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>User Page</h1>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default IndexUser;
|
||||
Reference in New Issue
Block a user