Commit 439509e1 authored by syadziy's avatar syadziy

update document management

parent d53313c0
...@@ -35,9 +35,9 @@ export default class DocumentManagement extends Component { ...@@ -35,9 +35,9 @@ export default class DocumentManagement extends Component {
} }
} }
getPermission(subMenu) { getPermission() {
let payload = { let payload = {
menu: subMenu menu: "document management"
} }
api.create().getPermission(payload).then(response => { api.create().getPermission(payload).then(response => {
console.log(response) console.log(response)
...@@ -61,15 +61,13 @@ export default class DocumentManagement extends Component { ...@@ -61,15 +61,13 @@ export default class DocumentManagement extends Component {
} }
selectTab = (event, newEvent) => { selectTab = (event, newEvent) => {
this.setState({ tab: newEvent }, () => { this.setState({ tab: newEvent })
console.log(this.state.tab) console.log(this.state.tab)
this.getPermission(this.state.listData[this.state.tab].value.toLocaleLowerCase())
})
} }
componentDidMount() { componentDidMount() {
this.getDataDocument() this.getDataDocument()
// this.getPermission() this.getPermission()
this.getDetailUser() this.getDetailUser()
} }
...@@ -96,7 +94,7 @@ export default class DocumentManagement extends Component { ...@@ -96,7 +94,7 @@ export default class DocumentManagement extends Component {
loadTable: true, loadTable: true,
refresh: id === undefined ? '' : 'create' refresh: id === undefined ? '' : 'create'
}, () => { }, () => {
this.getPermission(dataList[0].value) // this.getPermission(dataList[0].value)
}) })
} }
} else { } else {
...@@ -272,7 +270,7 @@ export default class DocumentManagement extends Component { ...@@ -272,7 +270,7 @@ export default class DocumentManagement extends Component {
<Typography style={{ fontSize: '16px', color: 'white' }}>Document Management</Typography> <Typography style={{ fontSize: '16px', color: 'white' }}>Document Management</Typography>
</div> </div>
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
{this.state.loading && loadingComponent && this.state.isHasAccessDocument} {this.state.loading && loadingComponent}
<Paper style={{ padding: 20 }}> <Paper style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}> <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
{(this.state.btncreate) && <span> {(this.state.btncreate) && <span>
...@@ -325,11 +323,11 @@ export default class DocumentManagement extends Component { ...@@ -325,11 +323,11 @@ export default class DocumentManagement extends Component {
</div> </div>
</Paper> </Paper>
{!this.state.isHasAccessDocument && ( {/* {!this.state.isHasAccessDocument && (
<Paper style={{ padding: 20 }}> <Paper style={{ padding: 20 }}>
<label>You Don't Have Any Access in Document Management</label> <label>You Don't Have Any Access in Document Management</label>
</Paper> </Paper>
)} )} */}
</div> </div>
{this.state.konfirmasi && ( {this.state.konfirmasi && (
<PopUpKonfirmasi <PopUpKonfirmasi
......
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