Commit db4f4636 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Maintenance Mode

See merge request !1663
parents c7380a7f a0e81ca0
...@@ -17900,6 +17900,16 @@ ...@@ -17900,6 +17900,16 @@
} }
} }
}, },
"suneditor": {
"version": "2.44.3",
"resolved": "https://registry.npmjs.org/suneditor/-/suneditor-2.44.3.tgz",
"integrity": "sha512-B25DrbAxcwkvAANNm2EClugBCxATCa3SvV03SpyaMJybKj4bzQnS1iq6Wo3h+v970tNSnjfeoT3ID3Nj0NuiBA=="
},
"suneditor-react": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/suneditor-react/-/suneditor-react-3.4.1.tgz",
"integrity": "sha512-xsfMjy2748x8Bcw/SeT2CeecrBABcJPyCO+LPourVLcQg8QW/A9FbIfP0DghNlBkH/gxy9iviR5wVydg9UW2wQ=="
},
"supports-color": { "supports-color": {
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
......
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-scripts": "3.4.1", "react-scripts": "3.4.1",
"react-spinners": "^0.9.0", "react-spinners": "^0.9.0",
"react-tooltip": "^4.2.8" "react-tooltip": "^4.2.8",
"suneditor": "^2.44.3",
"suneditor-react": "^3.4.1"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
......
This diff is collapsed.
...@@ -235,6 +235,19 @@ export default function MiniDrawer() { ...@@ -235,6 +235,19 @@ export default function MiniDrawer() {
subItem: null, subItem: null,
collapse: false, collapse: false,
}, },
{
img: Images.masterdata,
label: 'General Setting',
path: '',
subItem: [
{
img: '',
label: 'Maintenance Mode',
path: 'maintenance-mode',
},
],
collapse: false,
},
{ {
img: Images.masterdata, img: Images.masterdata,
label: 'Master Data', label: 'Master Data',
......
...@@ -70,6 +70,7 @@ class HomePage extends Component { ...@@ -70,6 +70,7 @@ class HomePage extends Component {
this.setState({ loading: true, loading2: true, loading3: true }) this.setState({ loading: true, loading2: true, loading3: true })
let userId = localStorage.getItem(Constant.USER) let userId = localStorage.getItem(Constant.USER)
api.create().getDetailUser(userId).then((response) => { api.create().getDetailUser(userId).then((response) => {
console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
......
...@@ -71,6 +71,18 @@ const arraySide = [ ...@@ -71,6 +71,18 @@ const arraySide = [
path: 'beranda', path: 'beranda',
subItem: null subItem: null
}, },
// {
// img: '',
// label: 'General Setting',
// path: '',
// subItem: [
// {
// img: '',
// label: 'Maintenance Mode',
// path: 'maintenance-mode',
// }
// ]
// },
{ {
img: Images.masterdata, img: Images.masterdata,
label: 'Master Data', label: 'Master Data',
......
...@@ -20,6 +20,7 @@ import SubHolding from '../container/Reports/SubHolding'; ...@@ -20,6 +20,7 @@ import SubHolding from '../container/Reports/SubHolding';
import SummaryTriputra from '../container/SummaryTriputra/SummaryOfTriputra'; import SummaryTriputra from '../container/SummaryTriputra/SummaryOfTriputra';
import MasterDataCAT from '../container/MasterData/MasterDataCAT/MasterDataCAT'; import MasterDataCAT from '../container/MasterData/MasterDataCAT/MasterDataCAT';
import ProgressReport from '../container/ProgressReport/ProgressReport'; import ProgressReport from '../container/ProgressReport/ProgressReport';
import MaintenanceMode from '../container/GeneralSetting/MaintenanceMode';
import CafrmDocument from "../container/CAFRM/CafrmDocument"; import CafrmDocument from "../container/CAFRM/CafrmDocument";
import ReportCafrm from "../container/ReportCarfm/RepotrCafrm"; import ReportCafrm from "../container/ReportCarfm/RepotrCafrm";
import Maintenance from "../container/Auth/Maintenance"; import Maintenance from "../container/Auth/Maintenance";
...@@ -129,6 +130,10 @@ const routes = [ ...@@ -129,6 +130,10 @@ const routes = [
path: "/home/progress-report-cafrm", path: "/home/progress-report-cafrm",
main: ReportCafrm main: ReportCafrm
}, },
{
path: "/home/maintenance-mode",
main: MaintenanceMode
},
{ {
path: "*", path: "*",
main: screen404 main: screen404
...@@ -136,7 +141,8 @@ const routes = [ ...@@ -136,7 +141,8 @@ const routes = [
{ {
path:"/maintenance", path:"/maintenance",
main: Maintenance main: Maintenance
} },
]; ];
export default routes; export default routes;
\ No newline at end of file
...@@ -16,6 +16,7 @@ import EmailVerification from "../container/Auth/EmailVerification"; ...@@ -16,6 +16,7 @@ import EmailVerification from "../container/Auth/EmailVerification";
import Constant from "../library/Constant"; import Constant from "../library/Constant";
import ShadowScreen from "../container/ShadowScreen"; import ShadowScreen from "../container/ShadowScreen";
import Maintenance from "../container/Auth/Maintenance"; import Maintenance from "../container/Auth/Maintenance";
import MaintenanceMode from "../container/GeneralSetting/MaintenanceMode";
export default function BasicExample() { export default function BasicExample() {
...@@ -49,6 +50,7 @@ export default function BasicExample() { ...@@ -49,6 +50,7 @@ export default function BasicExample() {
} }
function PrivateRoute({ children, ...rest }) { function PrivateRoute({ children, ...rest }) {
console.log(rest);
const logged = localStorage.getItem(Constant.TOKEN) !== null ? true : false const logged = localStorage.getItem(Constant.TOKEN) !== null ? true : false
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment