|
|
@ -13,8 +13,21 @@ 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'; |
|
|
|
|
|
|
|
|
|
|
|
const DashboardBOD = () => { |
|
|
|
const DashboardBOD = (props) => { |
|
|
|
const token = localStorage.getItem("token") |
|
|
|
let role_id = '', user_id='',isLogin='',token=''; |
|
|
|
|
|
|
|
if (props.location.state && props.location.state.role_id && props.location.state.user_id) { |
|
|
|
|
|
|
|
role_id = props.location.state.role_id; |
|
|
|
|
|
|
|
user_id = props.location.state.user_id; |
|
|
|
|
|
|
|
token = props.location.state.token; |
|
|
|
|
|
|
|
isLogin = props.location.state.isLogin; |
|
|
|
|
|
|
|
console.log('props.location.state success'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
role_id = localStorage.getItem("role_id"); |
|
|
|
|
|
|
|
user_id = localStorage.getItem("user_id"); |
|
|
|
|
|
|
|
token = localStorage.getItem("token"); |
|
|
|
|
|
|
|
isLogin = localStorage.getItem("isLogin"); |
|
|
|
|
|
|
|
console.error('undefined in props.location.state'); |
|
|
|
|
|
|
|
} |
|
|
|
const HEADER = { |
|
|
|
const HEADER = { |
|
|
|
headers: { |
|
|
|
headers: { |
|
|
|
"Content-Type": "application/json", |
|
|
|
"Content-Type": "application/json", |
|
|
|