Commit 964c413b authored by faisalhamdi's avatar faisalhamdi

comment console

parent dd6887b9
...@@ -56,7 +56,6 @@ export default class FixedAssetsMovement extends Component { ...@@ -56,7 +56,6 @@ export default class FixedAssetsMovement extends Component {
componentDidMount() { componentDidMount() {
this.getItemHierarki() this.getItemHierarki()
this.getLatestUpdate() this.getLatestUpdate()
console.log(this.props);
} }
getLatestUpdate() { getLatestUpdate() {
...@@ -88,7 +87,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -88,7 +87,7 @@ export default class FixedAssetsMovement extends Component {
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
console.log(response); // console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
...@@ -240,7 +239,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -240,7 +239,7 @@ export default class FixedAssetsMovement extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
res = await res.blob() res = await res.blob()
console.log(res) // console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -259,7 +258,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -259,7 +258,7 @@ export default class FixedAssetsMovement extends Component {
} }
else { else {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
console.log(resp.rows[2]); // console.log(resp.rows[2]);
let payload = [] let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/; let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => { isi.map((i, index) => {
...@@ -292,7 +291,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -292,7 +291,7 @@ export default class FixedAssetsMovement extends Component {
report_id: this.props.report_id, report_id: this.props.report_id,
fixed_asset_movement: payload fixed_asset_movement: payload
} }
console.log(body) // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
} }
}); });
...@@ -301,7 +300,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -301,7 +300,7 @@ export default class FixedAssetsMovement extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMB(this.state.payload).then(response => { api.create().checkUploadMB(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleFixedAssetsMovement: false, loading: true }) this.setState({ visibleUpload: false, visibleFixedAssetsMovement: false, loading: true })
...@@ -337,7 +336,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -337,7 +336,7 @@ export default class FixedAssetsMovement extends Component {
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => { this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => { this.state.dataTable.map(item => {
if (item[24].length > 0) { if (item[24].length > 0) {
console.log('masuk') // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true, editable: true })
} }
}) })
...@@ -379,9 +378,9 @@ export default class FixedAssetsMovement extends Component { ...@@ -379,9 +378,9 @@ export default class FixedAssetsMovement extends Component {
fixed_asset_movement: data, fixed_asset_movement: data,
status: type status: type
} }
console.log(JSON.stringify(body)); // console.log(JSON.stringify(body));
api.create('UPLOAD').uploadMasterBudget(body).then(response => { api.create('UPLOAD').uploadMasterBudget(body).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
...@@ -417,7 +416,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -417,7 +416,7 @@ export default class FixedAssetsMovement extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
console.log(this.state.dataTable) // console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
item_report_id: i[1], item_report_id: i[1],
...@@ -439,7 +438,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -439,7 +438,7 @@ export default class FixedAssetsMovement extends Component {
total_more_year: i[0] === 3 && i[21] === "" ? "0" : String(i[21]) total_more_year: i[0] === 3 && i[21] === "" ? "0" : String(i[21])
}) })
}) })
console.log(JSON.stringify(data)) // console.log(JSON.stringify(data))
let payload = { let payload = {
"submission_id": this.props.submissionID, "submission_id": this.props.submissionID,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
...@@ -449,7 +448,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -449,7 +448,7 @@ export default class FixedAssetsMovement extends Component {
"status": "submitted" "status": "submitted"
} }
api.create().validateSubmitReport(payload).then((response) => { api.create().validateSubmitReport(payload).then((response) => {
console.log(response) // console.log(response)
if (response.data.data.result) { if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false }) this.setState({ loading: false, buttonError: false, editable: false })
} else { } else {
...@@ -881,7 +880,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -881,7 +880,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -970,7 +969,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -970,7 +969,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1059,7 +1058,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1059,7 +1058,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1148,7 +1147,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1148,7 +1147,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1237,7 +1236,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1237,7 +1236,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1326,7 +1325,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1326,7 +1325,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1415,7 +1414,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1415,7 +1414,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1504,7 +1503,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1504,7 +1503,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1593,7 +1592,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1593,7 +1592,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1682,7 +1681,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1682,7 +1681,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1771,7 +1770,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1771,7 +1770,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1860,7 +1859,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1860,7 +1859,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1987,7 +1986,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1987,7 +1986,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
...@@ -2065,7 +2064,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2065,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) // console.log(dataTable2)
}} }}
/> />
} }
......
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