Commit 211a05c7 authored by faisalhamdi's avatar faisalhamdi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into faisal

parents f8a03050 2a780f3a
......@@ -574,12 +574,12 @@ export default class TaxPlanningOLPA extends Component {
]
})
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
// this.state.dataTable.map(item => {
// if (item[25].length > 0) {
// console.log('masuk')
// this.setState({ buttonError: true, errorPreview: true, editable: true })
// }
// })
this.state.dataTable.map(item => {
if (item[25].length > 0) {
console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
})
console.log(this.state.dataTable);
})
}
......
......@@ -544,6 +544,7 @@ export default class RollingOutlook extends Component {
formData.append("revision", Number(this.state.revision.revision));
formData.append("companyId", this.state.company.company_id);
formData.append("periode", Number(this.state.periode.periode));
formData.append("quartal", this.state.quarter.value);
formData.append("file", event);
this.setState({ formData })
}
......@@ -551,7 +552,15 @@ export default class RollingOutlook extends Component {
}
uploadAttachment(formData) {
// var object = {};
// formData.forEach(function (value, key) {
// object[key] = value;
// });
// var json = JSON.stringify(object);
// console.log(object)
// console.log(json)
api.create().uploadAttachment(formData).then(response => {
console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({ visibleUpload: false }, () => {
......@@ -997,7 +1006,7 @@ export default class RollingOutlook extends Component {
<div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && (
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}>
<button
style={{
......@@ -1043,7 +1052,7 @@ export default class RollingOutlook extends Component {
: null
}
</div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && (
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}>
{this.state.listAttachment.length > 0 ?
this.state.listAttachment.map((item) => {
......
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