Commit 5c805297 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

nambah terus docmanag

parent a649918d
...@@ -34,7 +34,6 @@ export default class getAllDocument extends Component { ...@@ -34,7 +34,6 @@ export default class getAllDocument extends Component {
componentDidMount() { componentDidMount() {
this.getData() this.getData()
console.log(this.props.userCompActive)
} }
componentWillReceiveProps(props) { componentWillReceiveProps(props) {
...@@ -60,6 +59,20 @@ export default class getAllDocument extends Component { ...@@ -60,6 +59,20 @@ export default class getAllDocument extends Component {
response.data.data.map((item, index) => { response.data.data.map((item, index) => {
let indexId = this.props.userCompActive.findIndex((val) => val == item.company_id) let indexId = this.props.userCompActive.findIndex((val) => val == item.company_id)
console.log(indexId) console.log(indexId)
if (String(this.props.name).includes('Manual')){
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,
])
} else {
if (indexId !== -1) { if (indexId !== -1) {
dataTable.push( [ dataTable.push( [
index, index,
...@@ -74,6 +87,7 @@ export default class getAllDocument extends Component { ...@@ -74,6 +87,7 @@ export default class getAllDocument extends Component {
item.created_at, item.created_at,
]) ])
} }
}
}) })
console.log(dataTable) console.log(dataTable)
this.setState({ dataTable, loading: false }) this.setState({ dataTable, loading: false })
......
...@@ -296,6 +296,7 @@ export default class DocumentManagement extends Component { ...@@ -296,6 +296,7 @@ export default class DocumentManagement extends Component {
userCompActive={this.state.userCompActive} userCompActive={this.state.userCompActive}
allsubcoEdit={this.state.btnadd} allsubcoEdit={this.state.btnadd}
handleLoading={this.handleLoading.bind(this)} handleLoading={this.handleLoading.bind(this)}
name={this.state.name}
/> />
// this.state.id === 68542 ? // this.state.id === 68542 ?
// <AuditTahunan // <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