Commit 3d8c563e authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into deni-dev(pc)

parents b4f022ff 2dcba2e2
...@@ -65,7 +65,8 @@ export default class BudgetTahunan extends Component { ...@@ -65,7 +65,8 @@ export default class BudgetTahunan extends Component {
lastPeriod: '', lastPeriod: '',
latestPeriode: '', latestPeriode: '',
minDateRevision: new Date(), minDateRevision: new Date(),
maxDateRevision: new Date() maxDateRevision: new Date(),
btnApprove: false
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
...@@ -376,6 +377,7 @@ export default class BudgetTahunan extends Component { ...@@ -376,6 +377,7 @@ export default class BudgetTahunan extends Component {
lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status, lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status,
loading: false, loading: false,
lastRevision: response.data.data.last_revision, lastRevision: response.data.data.last_revision,
btnApprove: response.data.data.is_submit
}, () => { }, () => {
console.log(this.state.lastStatus); console.log(this.state.lastStatus);
this.historyApproval() this.historyApproval()
...@@ -1100,7 +1102,7 @@ export default class BudgetTahunan extends Component { ...@@ -1100,7 +1102,7 @@ export default class BudgetTahunan extends Component {
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography>
</div> </div>
</button> </button>
</div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' ? </div> : (this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove) ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}> <div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1"> <div className="col-1">
<button <button
......
...@@ -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,7 +59,7 @@ export default class getAllDocument extends Component { ...@@ -60,7 +59,7 @@ 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 (indexId !== -1) { if (String(this.props.name).includes('Manual')){
dataTable.push( [ dataTable.push( [
index, index,
item.document_name, item.document_name,
...@@ -73,6 +72,21 @@ export default class getAllDocument extends Component { ...@@ -73,6 +72,21 @@ export default class getAllDocument extends Component {
item.created_by, item.created_by,
item.created_at, 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) console.log(dataTable)
......
...@@ -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