|
|
|
@ -102,14 +102,13 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
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"); |
|
|
|
|
proyek_id = localStorage.getItem("proyek_id"); |
|
|
|
|
user_id = localStorage.getItem("user_id"); |
|
|
|
|
token = localStorage.getItem("token"); |
|
|
|
|
isLogin = localStorage.getItem("isLogin"); |
|
|
|
|
console.error('Undefined in props.location.state'); |
|
|
|
|
} |
|
|
|
|
const history = useHistory(); |
|
|
|
|
const HEADER = { |
|
|
|
@ -210,7 +209,10 @@ const CreatedProyek = ({ params, ...props }) => {
|
|
|
|
|
}, [openDialogProyek]); |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
parseInt(role_id) !== 44 ? getDataProyek() : getDataProyekByCustomer(); |
|
|
|
|
if (parseInt(role_id) === 44) { |
|
|
|
|
getDataProyekByCustomer() |
|
|
|
|
} |
|
|
|
|
getDataProyek(); |
|
|
|
|
}, [search, rowsPerPage, currentPage]); |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|