Commit dd1b3cae authored by Deni Rinaldi's avatar Deni Rinaldi

balance sheet

parent 71f6d7fa
......@@ -161,6 +161,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const getRevision = (body) => api.post('transaction/get_revision', body)
const getPeriodeTransaction = () => api.get('transaction/get_periode')
const deleteAttachment = (id) => api.post(`transaction/delete_attachment/${id}`)
const getDetailReportMB = (body) => api.post('/transaction/master_budget/get_report_hierarki', body)
//Template
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
......@@ -264,7 +265,8 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
uploadAttachment,
getPeriodeTransaction,
getRevision,
deleteAttachment
deleteAttachment,
getDetailReportMB
}
}
......
......@@ -32,7 +32,8 @@ export default class BudgetTahunan extends Component {
visibleFAM: false,
visibleCAT: false,
listAttachment: [],
visibleUpload: false
visibleUpload: false,
revisionTable: null
}
this.fileHandler = this.fileHandler.bind(this);
}
......@@ -161,8 +162,12 @@ export default class BudgetTahunan extends Component {
})
}
clickDetail(item, id) {
this.setState({ report_id: id })
clickDetail(item, id, revision) {
console.log(item);
this.setState({
report_id: id,
revisionTable: revision,
}, () => {
if (item === 'Balance Sheet') {
this.setState({
visibleBudgetTahunan: false,
......@@ -172,7 +177,7 @@ export default class BudgetTahunan extends Component {
visibleFAM: false,
visibleTP: false,
})
} else if (item === 'Profit & Loss') {
} else if (item === 'Profit Loss') {
this.setState({
visibleBudgetTahunan: false,
visibleBS: false,
......@@ -209,6 +214,7 @@ export default class BudgetTahunan extends Component {
visibleTP: false
})
}
})
}
handleChange(value, tableMeta) {
......@@ -323,7 +329,7 @@ export default class BudgetTahunan extends Component {
borderColor: 'transparent'
}}
onClick={() =>
tableMeta.rowData[5] ? this.clickDetail(tableMeta.rowData[1], tableMeta.rowData[4]) : null
tableMeta.rowData[5] ? this.clickDetail(tableMeta.rowData[1], tableMeta.rowData[4], tableMeta.rowData[2]) : null
}
>
<Typography style={{ color: tableMeta.rowData[5] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
......@@ -554,6 +560,8 @@ export default class BudgetTahunan extends Component {
<BalanceSheet
report_id={this.state.report_id}
company={this.state.company}
revision={this.state.revisionTable}
periode={this.state.periode.periode}
onClickClose={() => this.setState({ visibleBS: false, visibleBudgetTahunan: true })}
/>
)}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -364,7 +364,7 @@ export default class CreateParameter extends Component {
} else if (R.isNil(this.state.getParameter)) {
this.setState({ errorParameter: true, msgErrorParameter: 'Parameter Cannot be Empty.' })
} else if (R.isNil(this.state.getPerusahaan)) {
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Perusahaan Cannot be Empty.' })
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Cannot be Empty.' })
// } else if (R.isEmpty(this.state.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
// } else if (R.isNil(this.state.value)) {
......
......@@ -74,9 +74,11 @@ export default class UnitBisnis extends Component {
}
this.setState({ payload: body, buttonError: false })
api.create().checkUploadUnitBisnis(body).then(response => {
console.log(response)
let dataRow = []
if (response.data) {
if (response.data.status === "success") {
let dataRow = response.data.data.map((item, index) => {
dataRow = response.data.data.map((item, index) => {
return [
index + 1,
item.business_unit_name,
......@@ -180,6 +182,7 @@ export default class UnitBisnis extends Component {
} else {
this.setState({
dataLoaded: false,
rows: []
});
}
})
......
......@@ -70,7 +70,7 @@ class Upload extends Component {
uploadProgress: false,
percentage: '0'
})
this.setState({ alertMessage: "Unsupported File", alert: true })
this.setState({ alertMessage: "File extension not allowed.", alert: true })
// alert("Unsupported Media Type")
}
}
......@@ -95,11 +95,11 @@ class Upload extends Component {
if (this.state.sizeFile < 1000) {
this.props.onUpload()
} else {
this.setState({ alertMessage: 'File cannot be more than 1MB', alert: true })
this.setState({ alertMessage: 'The file is too large. Allowed maximum size is 1MB', alert: true })
// alert('File Tidak Boleh Lebih Dari 1MB')
}
} else {
this.setState({ alertMessage: 'Unsupported File', alert: true })
this.setState({ alertMessage: 'File extension not allowed.', alert: true })
// alert('File Tidak Mendukung')
}
}
......
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