Browse Source

add button link

pull/1/head
wahyuun 12 months ago
parent
commit
3e4bd305ed
  1. 20
      src/views/Dashboard/DashboardBOD.js

20
src/views/Dashboard/DashboardBOD.js

@ -12,6 +12,7 @@ import ContentLoader from 'react-content-loader';
import toRupiah from '@develoka/angka-rupiah-js'; import toRupiah from '@develoka/angka-rupiah-js';
import Icon from '@iconify/react'; import Icon from '@iconify/react';
import { HealthByBudget, HealthBySchedule } from './Components'; import { HealthByBudget, HealthBySchedule } from './Components';
import { Link } from 'react-router-dom';
const DashboardBOD = (props) => { const DashboardBOD = (props) => {
let role_id = '', user_id='',isLogin='',token=''; let role_id = '', user_id='',isLogin='',token='';
@ -20,13 +21,11 @@ const DashboardBOD = (props) => {
user_id = props.location.state.user_id; user_id = props.location.state.user_id;
token = props.location.state.token; token = props.location.state.token;
isLogin = props.location.state.isLogin; isLogin = props.location.state.isLogin;
console.log('props.location.state success');
} else { } else {
role_id = localStorage.getItem("role_id"); role_id = localStorage.getItem("role_id");
user_id = localStorage.getItem("user_id"); user_id = localStorage.getItem("user_id");
token = localStorage.getItem("token"); token = localStorage.getItem("token");
isLogin = localStorage.getItem("isLogin"); isLogin = localStorage.getItem("isLogin");
console.error('undefined in props.location.state');
} }
const HEADER = { const HEADER = {
headers: { headers: {
@ -427,11 +426,20 @@ const DashboardBOD = (props) => {
<div style={{ color: '#888888', fontSize: 12 }}>Total Project Expenditure from on-going project.</div> <div style={{ color: '#888888', fontSize: 12 }}>Total Project Expenditure from on-going project.</div>
</div> </div>
{PROJECT_EXPENDITURE ? {PROJECT_EXPENDITURE ?
<div style={{ flex: 6, display: 'flex', justifyContent: 'center', alignItems: 'center' }} onClick={handleGetDetailExpenditure}> <>
<div style={{ backgroundColor: '#DDDDDD', color: '#4C4747', borderRadius: 5, padding: 4, fontWeight: 500, cursor: 'pointer', fontSize: 12, textAlign: 'center', lineHeight: 'normal' }}> <div style={{ flex: 6, display: 'flex', justifyContent: 'center', alignItems: 'center' }} onClick={handleGetDetailExpenditure}>
Detailed View <div style={{ backgroundColor: '#DDDDDD', color: '#4C4747', borderRadius: 5, padding: 4, fontWeight: 500, cursor: 'pointer', fontSize: 12, textAlign: 'center', lineHeight: 'normal' }}>
Detailed View
</div>
</div> </div>
</div> <div style={{ flex: 6, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<Link to="/dashboard-project-carousell" style={{ textDecoration: 'none' }}>
<div style={{ backgroundColor: '#DDDDDD', color: '#4C4747', borderRadius: 5, padding: 4, fontWeight: 500, cursor: 'pointer', fontSize: 12, textAlign: 'center', lineHeight: 'normal' }}>
View All Gantt
</div>
</Link>
</div>
</>
: :
<div style={{ flex: 6, display: 'flex', justifyContent: 'center', alignItems: 'center' }}> <div style={{ flex: 6, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<div style={{ backgroundColor: '#DDDDDD', color: '#4C4747', borderRadius: 5, padding: 4, fontWeight: 500, fontSize: 12, textAlign: 'center', lineHeight: 'normal' }}>Detailed View</div> <div style={{ backgroundColor: '#DDDDDD', color: '#4C4747', borderRadius: 5, padding: 4, fontWeight: 500, fontSize: 12, textAlign: 'center', lineHeight: 'normal' }}>Detailed View</div>

Loading…
Cancel
Save