Commit 72c907e1 authored by syadziy's avatar syadziy

update issue

parent 439509e1
......@@ -30,8 +30,7 @@ export default class DocumentManagement extends Component {
btndelete: false,
load: false,
name: '',
userCompActive: [],
isHasAccessDocument: false,
userCompActive: []
}
}
......@@ -40,7 +39,7 @@ export default class DocumentManagement extends Component {
menu: "document management"
}
api.create().getPermission(payload).then(response => {
console.log(response)
// console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -73,30 +72,16 @@ export default class DocumentManagement extends Component {
getDataDocument(id, name) {
api.create().getDocumentCategory().then(response => {
console.log(response);
// console.log(response);
if (response) {
if (response.data.status === "success") {
let dataList = []
response.data.data.map((item, index) => {
// if (item.value == "Manual Book TIA 4.0sss") {
dataList.push(item)
// }
this.setState({
listData: response.data.data,
id: id === undefined ? response.data.data[0].setting_id : id,
name: name === undefined ? response.data.data[0].value : name,
loadTable: true,
refresh: id === undefined ? '' : 'create'
})
if (dataList.length == 0) {
this.setState({ isHasAccessDocument: dataList.length == 0 ? false : true })
} else {
this.setState({
isHasAccessDocument: dataList.length == 0 ? false : true,
listData: dataList,
id: id === undefined ? dataList[0].setting_id : id,
name: name === undefined ? dataList[0].value : name,
loadTable: true,
refresh: id === undefined ? '' : 'create'
}, () => {
// this.getPermission(dataList[0].value)
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -323,11 +308,6 @@ export default class DocumentManagement extends Component {
</div>
</Paper>
{/* {!this.state.isHasAccessDocument && (
<Paper style={{ padding: 20 }}>
<label>You Don't Have Any Access in Document Management</label>
</Paper>
)} */}
</div>
{this.state.konfirmasi && (
<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