Commit 21ce0aae authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

Deni dev(pc)

See merge request !218
parents de6f5610 a43a3427
...@@ -161,6 +161,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') => ...@@ -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 getRevision = (body) => api.post('transaction/get_revision', body)
const getPeriodeTransaction = () => api.get('transaction/get_periode') const getPeriodeTransaction = () => api.get('transaction/get_periode')
const deleteAttachment = (id) => api.post(`transaction/delete_attachment/${id}`) const deleteAttachment = (id) => api.post(`transaction/delete_attachment/${id}`)
const getDetailReportMB = (body) => api.post('/transaction/master_budget/get_report_hierarki', body)
//Template //Template
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`) 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/') => ...@@ -264,7 +265,8 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
uploadAttachment, uploadAttachment,
getPeriodeTransaction, getPeriodeTransaction,
getRevision, getRevision,
deleteAttachment deleteAttachment,
getDetailReportMB
} }
} }
......
...@@ -32,7 +32,8 @@ export default class BudgetTahunan extends Component { ...@@ -32,7 +32,8 @@ export default class BudgetTahunan extends Component {
visibleFAM: false, visibleFAM: false,
visibleCAT: false, visibleCAT: false,
listAttachment: [], listAttachment: [],
visibleUpload: false visibleUpload: false,
revisionTable: null
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
...@@ -161,8 +162,12 @@ export default class BudgetTahunan extends Component { ...@@ -161,8 +162,12 @@ export default class BudgetTahunan extends Component {
}) })
} }
clickDetail(item, id) { clickDetail(item, id, revision) {
this.setState({ report_id: id }) console.log(item);
this.setState({
report_id: id,
revisionTable: revision,
}, () => {
if (item === 'Balance Sheet') { if (item === 'Balance Sheet') {
this.setState({ this.setState({
visibleBudgetTahunan: false, visibleBudgetTahunan: false,
...@@ -172,7 +177,7 @@ export default class BudgetTahunan extends Component { ...@@ -172,7 +177,7 @@ export default class BudgetTahunan extends Component {
visibleFAM: false, visibleFAM: false,
visibleTP: false, visibleTP: false,
}) })
} else if (item === 'Profit & Loss') { } else if (item === 'Profit Loss') {
this.setState({ this.setState({
visibleBudgetTahunan: false, visibleBudgetTahunan: false,
visibleBS: false, visibleBS: false,
...@@ -209,6 +214,7 @@ export default class BudgetTahunan extends Component { ...@@ -209,6 +214,7 @@ export default class BudgetTahunan extends Component {
visibleTP: false visibleTP: false
}) })
} }
})
} }
handleChange(value, tableMeta) { handleChange(value, tableMeta) {
...@@ -323,7 +329,7 @@ export default class BudgetTahunan extends Component { ...@@ -323,7 +329,7 @@ export default class BudgetTahunan extends Component {
borderColor: 'transparent' borderColor: 'transparent'
}} }}
onClick={() => 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> <Typography style={{ color: tableMeta.rowData[5] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
...@@ -554,6 +560,8 @@ export default class BudgetTahunan extends Component { ...@@ -554,6 +560,8 @@ export default class BudgetTahunan extends Component {
<BalanceSheet <BalanceSheet
report_id={this.state.report_id} report_id={this.state.report_id}
company={this.state.company} company={this.state.company}
revision={this.state.revisionTable}
periode={this.state.periode.periode}
onClickClose={() => this.setState({ visibleBS: false, visibleBudgetTahunan: true })} 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.
...@@ -455,7 +455,7 @@ export default class CreateParameter extends Component { ...@@ -455,7 +455,7 @@ export default class CreateParameter extends Component {
} else if (R.isNil(this.state.getParameter)) { } else if (R.isNil(this.state.getParameter)) {
this.setState({ errorParameter: true, msgErrorParameter: 'Parameter Cannot be Empty.' }) this.setState({ errorParameter: true, msgErrorParameter: 'Parameter Cannot be Empty.' })
} else if (R.isNil(this.state.getPerusahaan)) { } 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)) { // } else if (R.isEmpty(this.state.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' }) // this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
// } else if (R.isNil(this.state.value)) { // } else if (R.isNil(this.state.value)) {
......
...@@ -75,10 +75,12 @@ export default class UnitBisnis extends Component { ...@@ -75,10 +75,12 @@ export default class UnitBisnis extends Component {
} }
this.setState({ payload: body, buttonError: false }) this.setState({ payload: body, buttonError: false })
api.create().checkUploadUnitBisnis(body).then(response => { api.create().checkUploadUnitBisnis(body).then(response => {
console.log(response)
let dataRow = []
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataRow = response.data.data.map((item, index) => { dataRow = response.data.data.map((item, index) => {
return [ return [
index + 1, index + 1,
item.business_unit_name, item.business_unit_name,
......
...@@ -70,7 +70,7 @@ class Upload extends Component { ...@@ -70,7 +70,7 @@ class Upload extends Component {
uploadProgress: false, uploadProgress: false,
percentage: '0' percentage: '0'
}) })
this.setState({ alertMessage: "Unsupported File", alert: true }) this.setState({ alertMessage: "File extension not allowed.", alert: true })
// alert("Unsupported Media Type") // alert("Unsupported Media Type")
} }
} }
...@@ -95,11 +95,11 @@ class Upload extends Component { ...@@ -95,11 +95,11 @@ class Upload extends Component {
if (this.state.sizeFile < 1000) { if (this.state.sizeFile < 1000) {
this.props.onUpload() this.props.onUpload()
} else { } 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') // alert('File Tidak Boleh Lebih Dari 1MB')
} }
} else { } else {
this.setState({ alertMessage: 'Unsupported File', alert: true }) this.setState({ alertMessage: 'File extension not allowed.', alert: true })
// alert('File Tidak Mendukung') // 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