Commit 2dcba2e2 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'rifka' into 'master'

nambah terus

See merge request !457
parents d2bc7d0b 7fbc7a74
......@@ -34,7 +34,6 @@ export default class getAllDocument extends Component {
componentDidMount() {
this.getData()
console.log(this.props.userCompActive)
}
componentWillReceiveProps(props) {
......@@ -60,7 +59,7 @@ export default class getAllDocument extends Component {
response.data.data.map((item, index) => {
let indexId = this.props.userCompActive.findIndex((val) => val == item.company_id)
console.log(indexId)
if (indexId !== -1) {
if (String(this.props.name).includes('Manual')){
dataTable.push( [
index,
item.document_name,
......@@ -73,6 +72,21 @@ export default class getAllDocument extends Component {
item.created_by,
item.created_at,
])
} else {
if (indexId !== -1) {
dataTable.push( [
index,
item.document_name,
item.description,
item.company_name,
item.document_month,
item.document_periode,
item.document_type,
String(Number(item.document_size) / 1000 + ' KB'),
item.created_by,
item.created_at,
])
}
}
})
console.log(dataTable)
......
......@@ -296,6 +296,7 @@ export default class DocumentManagement extends Component {
userCompActive={this.state.userCompActive}
allsubcoEdit={this.state.btnadd}
handleLoading={this.handleLoading.bind(this)}
name={this.state.name}
/>
// this.state.id === 68542 ?
// <AuditTahunan
......
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