Commit 54585617 authored by Deni Rinaldi's avatar Deni Rinaldi

isu report + consol

parent dd6887b9
...@@ -5,7 +5,7 @@ import 'bootstrap/dist/css/bootstrap.min.css'; ...@@ -5,7 +5,7 @@ import 'bootstrap/dist/css/bootstrap.min.css';
import Constant from './library/Constant'; import Constant from './library/Constant';
if (sessionStorage.getItem('reloaded') != null) { if (sessionStorage.getItem('reloaded') != null) {
console.log('page was reloaded'); // console.log('page was reloaded');
} else { } else {
// localStorage.removeItem(Constant.TOKEN) // localStorage.removeItem(Constant.TOKEN)
window.location.reload(); window.location.reload();
......
...@@ -78,7 +78,7 @@ export default class BudgetTahunan extends Component { ...@@ -78,7 +78,7 @@ export default class BudgetTahunan extends Component {
this.setState({ loading: true }) this.setState({ loading: true })
this.props.selectIndex('Master Budget & CAT') this.props.selectIndex('Master Budget & CAT')
if (this.props.location.state !== undefined) { if (this.props.location.state !== undefined) {
console.log(this.props); // console.log(this.props);
this.setState({ userType: this.props.location.state.userType, intent: 'Home', lastPeriod: this.props.location.state.rawData.periode, rawData: this.props.location.state.rawData }, () => { this.setState({ userType: this.props.location.state.userType, intent: 'Home', lastPeriod: this.props.location.state.rawData.periode, rawData: this.props.location.state.rawData }, () => {
this.checkApprover() this.checkApprover()
}) })
...@@ -89,7 +89,7 @@ export default class BudgetTahunan extends Component { ...@@ -89,7 +89,7 @@ export default class BudgetTahunan extends Component {
checkApprover() { checkApprover() {
api.create().checkApprover().then(response => { api.create().checkApprover().then(response => {
console.log(response); // console.log(response);
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true }, () => this.setState({ isApprover: true, checkApprover: true }, () =>
this.getPeriode()) this.getPeriode())
...@@ -105,7 +105,7 @@ export default class BudgetTahunan extends Component { ...@@ -105,7 +105,7 @@ export default class BudgetTahunan extends Component {
"periode": this.state.periode.periode "periode": this.state.periode.periode
} }
api.create().getCompanySubmitted(body).then(response => { api.create().getCompanySubmitted(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') {
let data = response.data.data let data = response.data.data
...@@ -152,7 +152,7 @@ export default class BudgetTahunan extends Component { ...@@ -152,7 +152,7 @@ export default class BudgetTahunan extends Component {
"revision": this.state.revision.revision, "revision": this.state.revision.revision,
} }
api.create().getMasterBudgetAtt(payload).then(response => { api.create().getMasterBudgetAtt(payload).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.setState({ listAttachment: response.data.data }) this.setState({ listAttachment: response.data.data })
...@@ -169,7 +169,7 @@ export default class BudgetTahunan extends Component { ...@@ -169,7 +169,7 @@ export default class BudgetTahunan extends Component {
"report_type": "Master Budget", "report_type": "Master Budget",
} }
api.create().getReportTypeBody(payload).then(response => { api.create().getReportTypeBody(payload).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => { let dataTable = response.data.data.map((item, index) => {
...@@ -205,7 +205,7 @@ export default class BudgetTahunan extends Component { ...@@ -205,7 +205,7 @@ export default class BudgetTahunan extends Component {
"periode": this.state.periode.periode "periode": this.state.periode.periode
} }
api.create().getSubmitMasterBudget(body).then(response => { api.create().getSubmitMasterBudget(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.setState({ isSubmit: response.data.data.is_can_submit }, () => { this.setState({ isSubmit: response.data.data.is_can_submit }, () => {
...@@ -234,7 +234,7 @@ export default class BudgetTahunan extends Component { ...@@ -234,7 +234,7 @@ export default class BudgetTahunan extends Component {
getCompanyActive() { getCompanyActive() {
api.create().getPerusahaanActive().then((response) => { api.create().getPerusahaanActive().then((response) => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let data = response.data.data let data = response.data.data
...@@ -280,7 +280,7 @@ export default class BudgetTahunan extends Component { ...@@ -280,7 +280,7 @@ export default class BudgetTahunan extends Component {
getLastPeriod() { getLastPeriod() {
api.create().getLastPeriod(this.state.company.company_id).then(response => { api.create().getLastPeriod(this.state.company.company_id).then(response => {
console.log(response); // console.log(response);
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ lastPeriod: response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => { this.setState({ lastPeriod: response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => {
this.getPeriode() this.getPeriode()
...@@ -321,7 +321,7 @@ export default class BudgetTahunan extends Component { ...@@ -321,7 +321,7 @@ export default class BudgetTahunan extends Component {
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod) let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)
let index = data.sort((a, b) => a - b).findIndex((val) => val === periode) let index = data.sort((a, b) => a - b).findIndex((val) => val === periode)
// console.log(data) // console.log(data)
console.log(this.state.latestPeriode) // console.log(this.state.latestPeriode)
// console.log(periodeData) // console.log(periodeData)
// console.log(index) // console.log(index)
this.setState({ listPeriode: defaultProps, periode: index === -1 ? periodeData[0] : periodeData[index] }, () => { this.setState({ listPeriode: defaultProps, periode: index === -1 ? periodeData[0] : periodeData[index] }, () => {
...@@ -342,7 +342,7 @@ export default class BudgetTahunan extends Component { ...@@ -342,7 +342,7 @@ export default class BudgetTahunan extends Component {
"periode": this.state.periode.periode "periode": this.state.periode.periode
} }
api.create().getRevision(payload).then(response => { api.create().getRevision(payload).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let data = response.data.data let data = response.data.data
...@@ -371,7 +371,7 @@ export default class BudgetTahunan extends Component { ...@@ -371,7 +371,7 @@ export default class BudgetTahunan extends Component {
"is_approver": this.state.isApprover "is_approver": this.state.isApprover
} }
api.create().getSubmission(payload).then(response => { api.create().getSubmission(payload).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.setState({ this.setState({
...@@ -383,7 +383,7 @@ export default class BudgetTahunan extends Component { ...@@ -383,7 +383,7 @@ export default class BudgetTahunan extends Component {
lastRevision: response.data.data.last_revision, lastRevision: response.data.data.last_revision,
btnApprove: response.data.data.is_submit btnApprove: response.data.data.is_submit
}, () => { }, () => {
console.log(this.state.lastStatus); // console.log(this.state.lastStatus);
this.historyApproval() this.historyApproval()
this.getLatestPeriodSubmit() this.getLatestPeriodSubmit()
api.create().checkApprover().then(response => { api.create().checkApprover().then(response => {
...@@ -409,7 +409,7 @@ export default class BudgetTahunan extends Component { ...@@ -409,7 +409,7 @@ export default class BudgetTahunan extends Component {
"periode": this.state.periode.periode "periode": this.state.periode.periode
} }
api.create().historyApproval(body).then(response => { api.create().historyApproval(body).then(response => {
console.log(response); // console.log(response);
if (response.data.data.length > 0) { if (response.data.data.length > 0) {
let dataTableHistory = response.data.data.map(item => { let dataTableHistory = response.data.data.map(item => {
return [ return [
...@@ -438,20 +438,20 @@ export default class BudgetTahunan extends Component { ...@@ -438,20 +438,20 @@ export default class BudgetTahunan extends Component {
"min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'), "min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'),
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD') "max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD')
} }
console.log(payload) // console.log(payload)
api.create().approvalSubmission(body).then((res) => { api.create().approvalSubmission(body).then((res) => {
console.log(res) // console.log(res)
this.setState({ loading: false }, () => { this.setState({ loading: false }, () => {
this.getSubmission() this.getSubmission()
}) })
if (type == 'revision') { if (type == 'revision') {
api.create().createPeriodeRevision(payload).then((res) => console.log(res)) api.create().createPeriodeRevision(payload).then((res))
} }
}) })
} }
clickDetail(item, id, revision, status) { clickDetail(item, id, revision, status) {
console.log(this.state.dataForRevision); // console.log(this.state.dataForRevision);
this.state.dataForRevision.map(i => { this.state.dataForRevision.map(i => {
if (i.report_name === item) { if (i.report_name === item) {
if (i.revision !== revision) { if (i.revision !== revision) {
...@@ -540,7 +540,7 @@ export default class BudgetTahunan extends Component { ...@@ -540,7 +540,7 @@ export default class BudgetTahunan extends Component {
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp) // console.log(resp)
if (err) { if (err) {
console.log(err); // console.log(err);
} }
else { else {
const formData = new FormData(); const formData = new FormData();
...@@ -567,7 +567,7 @@ export default class BudgetTahunan extends Component { ...@@ -567,7 +567,7 @@ export default class BudgetTahunan extends Component {
deleteAttachment(item) { deleteAttachment(item) {
api.create().deleteAttachment(item.attachment_id).then(response => { api.create().deleteAttachment(item.attachment_id).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.getSubmission() this.getSubmission()
...@@ -584,7 +584,7 @@ export default class BudgetTahunan extends Component { ...@@ -584,7 +584,7 @@ export default class BudgetTahunan extends Component {
this.setState({ loading: true }) this.setState({ loading: true })
// console.log(JSON.stringify(data)); // console.log(JSON.stringify(data));
api.create('UPLOAD').createSubmitReport(data).then(response => { api.create('UPLOAD').createSubmitReport(data).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.getSubmission() this.getSubmission()
...@@ -604,7 +604,7 @@ export default class BudgetTahunan extends Component { ...@@ -604,7 +604,7 @@ export default class BudgetTahunan extends Component {
async downloadAttachment(fileurl, name) { async downloadAttachment(fileurl, name) {
let length = name.split(".").length let length = name.split(".").length
let fileType = name.split(".")[length - 1] let fileType = name.split(".")[length - 1]
console.log(fileType); // console.log(fileType);
let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}` let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
// console.log(url); // console.log(url);
let res = await fetch( let res = await fetch(
...@@ -643,7 +643,7 @@ export default class BudgetTahunan extends Component { ...@@ -643,7 +643,7 @@ export default class BudgetTahunan extends Component {
submission_id: this.state.submissionID submission_id: this.state.submissionID
} }
api.create().submitMasterBudget(body).then(response => { api.create().submitMasterBudget(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.getSubmission() this.getSubmission()
...@@ -866,7 +866,7 @@ export default class BudgetTahunan extends Component { ...@@ -866,7 +866,7 @@ export default class BudgetTahunan extends Component {
detailRevisiCheck.splice(indexId, 1) detailRevisiCheck.splice(indexId, 1)
} }
this.setState({ detailRevisiCheck }) this.setState({ detailRevisiCheck })
console.log(detailRevisiCheck) // console.log(detailRevisiCheck)
} }
const options = { const options = {
......
...@@ -55,7 +55,7 @@ export default class BalanceSheet extends Component { ...@@ -55,7 +55,7 @@ export default class BalanceSheet extends Component {
componentDidMount() { componentDidMount() {
this.getItemHierarki() this.getItemHierarki()
this.getLatestUpdate() this.getLatestUpdate()
console.log(this.props); // console.log(this.props);
} }
getLatestUpdate() { getLatestUpdate() {
...@@ -87,7 +87,7 @@ export default class BalanceSheet extends Component { ...@@ -87,7 +87,7 @@ export default class BalanceSheet extends Component {
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
let response = await api.create().getDetailReportMB(payload) let response = await api.create().getDetailReportMB(payload)
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
...@@ -214,7 +214,7 @@ export default class BalanceSheet extends Component { ...@@ -214,7 +214,7 @@ export default class BalanceSheet 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');
...@@ -233,7 +233,7 @@ export default class BalanceSheet extends Component { ...@@ -233,7 +233,7 @@ export default class BalanceSheet 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) => {
...@@ -266,7 +266,7 @@ export default class BalanceSheet extends Component { ...@@ -266,7 +266,7 @@ export default class BalanceSheet extends Component {
report_id: this.props.report_id, report_id: this.props.report_id,
balance_sheet: payload balance_sheet: 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] })
} }
}); });
...@@ -275,7 +275,7 @@ export default class BalanceSheet extends Component { ...@@ -275,7 +275,7 @@ export default class BalanceSheet 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, visibleBalanceSheet: false, loading: true }) this.setState({ visibleUpload: false, visibleBalanceSheet: false, loading: true })
...@@ -356,7 +356,7 @@ export default class BalanceSheet extends Component { ...@@ -356,7 +356,7 @@ export default class BalanceSheet extends Component {
} }
// console.log(data); // console.log(data);
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()
...@@ -373,7 +373,7 @@ export default class BalanceSheet extends Component { ...@@ -373,7 +373,7 @@ export default class BalanceSheet extends Component {
async downloadAllData() { async downloadAllData() {
let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
console.log(url); // console.log(url);
let res = await fetch( let res = await fetch(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID === null ? "" : this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID === null ? "" : this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
) )
...@@ -412,7 +412,7 @@ export default class BalanceSheet extends Component { ...@@ -412,7 +412,7 @@ export default class BalanceSheet extends Component {
total_more_year: i[0] === 3 && i[21] === "" ? "0.0" : String(Number(i[21]).toFixed(1)), total_more_year: i[0] === 3 && i[21] === "" ? "0.0" : String(Number(i[21]).toFixed(1)),
}) })
}) })
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,
...@@ -422,7 +422,7 @@ export default class BalanceSheet extends Component { ...@@ -422,7 +422,7 @@ export default class BalanceSheet 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, saveDraft: false }) this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
} else { } else {
...@@ -682,7 +682,7 @@ export default class BalanceSheet extends Component { ...@@ -682,7 +682,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -825,7 +825,7 @@ export default class BalanceSheet extends Component { ...@@ -825,7 +825,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -968,7 +968,7 @@ export default class BalanceSheet extends Component { ...@@ -968,7 +968,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -1111,7 +1111,7 @@ export default class BalanceSheet extends Component { ...@@ -1111,7 +1111,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -1254,7 +1254,7 @@ export default class BalanceSheet extends Component { ...@@ -1254,7 +1254,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -1397,7 +1397,7 @@ export default class BalanceSheet extends Component { ...@@ -1397,7 +1397,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -1540,7 +1540,7 @@ export default class BalanceSheet extends Component { ...@@ -1540,7 +1540,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -1683,7 +1683,7 @@ export default class BalanceSheet extends Component { ...@@ -1683,7 +1683,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -1826,7 +1826,7 @@ export default class BalanceSheet extends Component { ...@@ -1826,7 +1826,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -1969,7 +1969,7 @@ export default class BalanceSheet extends Component { ...@@ -1969,7 +1969,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -2112,7 +2112,7 @@ export default class BalanceSheet extends Component { ...@@ -2112,7 +2112,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -2255,7 +2255,7 @@ export default class BalanceSheet extends Component { ...@@ -2255,7 +2255,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -2398,7 +2398,7 @@ export default class BalanceSheet extends Component { ...@@ -2398,7 +2398,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -2541,7 +2541,7 @@ export default class BalanceSheet extends Component { ...@@ -2541,7 +2541,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
...@@ -2684,7 +2684,7 @@ export default class BalanceSheet extends Component { ...@@ -2684,7 +2684,7 @@ export default class BalanceSheet 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)
}} }}
/> />
} }
......
...@@ -40,7 +40,7 @@ class HomePage extends Component { ...@@ -40,7 +40,7 @@ class HomePage extends Component {
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ userData: response.data.data }, () => { this.setState({ userData: response.data.data }, () => {
console.log(this.state.userData) // console.log(this.state.userData)
}) })
} }
} }
...@@ -69,7 +69,7 @@ class HomePage extends Component { ...@@ -69,7 +69,7 @@ class HomePage extends Component {
getListUserSubco() { getListUserSubco() {
api.create().getDashboardUser().then(response => { api.create().getDashboardUser().then(response => {
console.log(response); // console.log(response);
let valueSubmit = 0 let valueSubmit = 0
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -91,7 +91,7 @@ class HomePage extends Component { ...@@ -91,7 +91,7 @@ class HomePage extends Component {
getDashboard() { getDashboard() {
let listDashboard = [] let listDashboard = []
api.create().getDashboard().then((response) => { api.create().getDashboard().then((response) => {
console.log(response); // console.log(response);
if (String(response.data.status).toLocaleLowerCase() == 'success') { if (String(response.data.status).toLocaleLowerCase() == 'success') {
let data = response.data.data let data = response.data.data
data.map((item, index) => { data.map((item, index) => {
...@@ -106,7 +106,7 @@ class HomePage extends Component { ...@@ -106,7 +106,7 @@ class HomePage extends Component {
getApprMat() { getApprMat() {
this.setState({loading: true}) this.setState({loading: true})
api.create().getAM().then((response) => { api.create().getAM().then((response) => {
console.log(response); // console.log(response);
let actAM = response.data.data.map((item, index) => { let actAM = response.data.data.map((item, index) => {
if (String(item.status).toLocaleLowerCase() == 'active') { if (String(item.status).toLocaleLowerCase() == 'active') {
return item return item
...@@ -120,14 +120,14 @@ class HomePage extends Component { ...@@ -120,14 +120,14 @@ class HomePage extends Component {
this.getListUserSubco() this.getListUserSubco()
} }
this.getDashboardMB() this.getDashboardMB()
console.log(actAM) // console.log(actAM)
this.setState({loading: false}) this.setState({loading: false})
}) })
} }
getDashboardMB() { getDashboardMB() {
api.create().getDashboardMB().then((response) => { api.create().getDashboardMB().then((response) => {
console.log(response) // console.log(response)
if (String(response.data.status).toLocaleLowerCase() == 'success') { if (String(response.data.status).toLocaleLowerCase() == 'success') {
let data = response.data.data let data = response.data.data
let listdmb = data.sort((a, b) => a.company_id - b.company_id).map((item, index) => { let listdmb = data.sort((a, b) => a.company_id - b.company_id).map((item, index) => {
......
...@@ -21,8 +21,8 @@ export default class SubHolding extends Component { ...@@ -21,8 +21,8 @@ export default class SubHolding extends Component {
periode: null, periode: null,
reportType: [ reportType: [
{ value: 1, label: 'DB Balance Sheet' }, { value: 1, label: 'DB Balance Sheet' },
{ value: 2, label: 'DB Profit & Loss' }, { value: 3, label: 'DB Profit & Loss' },
{ value: 3, label: 'DB Profit & Loss Detail' }, { value: 2, label: 'DB Profit & Loss Detail' },
{ value: 4, label: 'DB Ratio' }, { value: 4, label: 'DB Ratio' },
], ],
report: null, report: null,
...@@ -57,7 +57,7 @@ export default class SubHolding extends Component { ...@@ -57,7 +57,7 @@ export default class SubHolding extends Component {
getCompanyActive() { getCompanyActive() {
api.create().getPerusahaanActive().then((response) => { api.create().getPerusahaanActive().then((response) => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let data = response.data.data let data = response.data.data
...@@ -103,7 +103,7 @@ export default class SubHolding extends Component { ...@@ -103,7 +103,7 @@ export default class SubHolding extends Component {
getLastPeriod() { getLastPeriod() {
api.create().getLastPeriod(this.state.company.company_id).then(response => { api.create().getLastPeriod(this.state.company.company_id).then(response => {
console.log(response); // console.log(response);
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ lastPeriod: response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => { this.setState({ lastPeriod: response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => {
this.getPeriode() this.getPeriode()
...@@ -167,7 +167,7 @@ export default class SubHolding extends Component { ...@@ -167,7 +167,7 @@ export default class SubHolding extends Component {
"is_approver": true "is_approver": true
} }
api.create().getSubmission(payload).then(response => { api.create().getSubmission(payload).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.setState({ this.setState({
...@@ -192,7 +192,7 @@ export default class SubHolding extends Component { ...@@ -192,7 +192,7 @@ export default class SubHolding extends Component {
"submission_id": this.state.submissionID "submission_id": this.state.submissionID
} }
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
console.log(response); // console.log(response);
let dataTable = [] let dataTable = []
if (this.state.report.value === 1) { if (this.state.report.value === 1) {
if (response.data) { if (response.data) {
......
...@@ -72,7 +72,7 @@ export default class CreateParameter extends Component { ...@@ -72,7 +72,7 @@ export default class CreateParameter extends Component {
getDetailParameter() { getDetailParameter() {
api.create().getDetailParameter(this.props.data[0]).then((response) => { api.create().getDetailParameter(this.props.data[0]).then((response) => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
...@@ -86,7 +86,7 @@ export default class CreateParameter extends Component { ...@@ -86,7 +86,7 @@ export default class CreateParameter extends Component {
}, () => { }, () => {
this.getAllGroup() this.getAllGroup()
this.getPerusahaan() this.getPerusahaan()
console.log(this.state.tempData) // console.log(this.state.tempData)
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
...@@ -109,7 +109,7 @@ export default class CreateParameter extends Component { ...@@ -109,7 +109,7 @@ export default class CreateParameter extends Component {
getAllGroup() { getAllGroup() {
api.create().getAllGroup().then(response => { api.create().getAllGroup().then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
...@@ -266,7 +266,7 @@ export default class CreateParameter extends Component { ...@@ -266,7 +266,7 @@ export default class CreateParameter extends Component {
getParameterByGroup(id) { getParameterByGroup(id) {
api.create().getParameterByGroup(id).then(response => { api.create().getParameterByGroup(id).then(response => {
console.log(id, response); // console.log(id, response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
...@@ -411,11 +411,11 @@ export default class CreateParameter extends Component { ...@@ -411,11 +411,11 @@ export default class CreateParameter extends Component {
let isDate = type !== '' ? true : false let isDate = type !== '' ? true : false
if (isDate && type == 'start_date') { if (isDate && type == 'start_date') {
this.setState({ startDate: format(e, 'yyyy-MM-dd'), endDate: null }, () => { this.setState({ startDate: format(e, 'yyyy-MM-dd'), endDate: null }, () => {
console.log(this.state.startDate) // console.log(this.state.startDate)
}) })
} else if (isDate && type == 'end_date') { } else if (isDate && type == 'end_date') {
this.setState({ endDate: format(e, 'yyyy-MM-dd') }, () => { this.setState({ endDate: format(e, 'yyyy-MM-dd') }, () => {
console.log(this.state.endDate) // console.log(this.state.endDate)
}) })
} else { } else {
this.setState({ ...data, [e.target.name]: e.target.value }, () => this.clearMessage()) this.setState({ ...data, [e.target.name]: e.target.value }, () => this.clearMessage())
...@@ -488,7 +488,7 @@ export default class CreateParameter extends Component { ...@@ -488,7 +488,7 @@ export default class CreateParameter extends Component {
"start_date": this.state.tempData.start_date, "start_date": this.state.tempData.start_date,
"end_date": this.state.tempData.end_date "end_date": this.state.tempData.end_date
} }
console.log(body); // console.log(body);
this.props.updateParameter(body) this.props.updateParameter(body)
} }
...@@ -505,7 +505,7 @@ export default class CreateParameter extends Component { ...@@ -505,7 +505,7 @@ export default class CreateParameter extends Component {
"start_date": this.state.startDate, "start_date": this.state.startDate,
"end_date": this.state.endDate "end_date": this.state.endDate
} }
console.log(body); // console.log(body);
this.props.createParameter(body) this.props.createParameter(body)
} }
......
...@@ -69,7 +69,7 @@ export default class Parameter extends Component { ...@@ -69,7 +69,7 @@ export default class Parameter extends Component {
type: 'MAX_FILE_SIZE' type: 'MAX_FILE_SIZE'
} }
api.create().getAllSettingByType(body).then(response => { api.create().getAllSettingByType(body).then(response => {
console.log(response.data.data[0]); // console.log(response.data.data[0]);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
...@@ -85,7 +85,7 @@ export default class Parameter extends Component { ...@@ -85,7 +85,7 @@ export default class Parameter extends Component {
menu: "parameters" menu: "parameters"
} }
api.create().getPermission(payload).then(response => { api.create().getPermission(payload).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.setState({ this.setState({
...@@ -107,7 +107,7 @@ export default class Parameter extends Component { ...@@ -107,7 +107,7 @@ export default class Parameter extends Component {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
console.log(response); // console.log(response);
let data = response.data.data let data = response.data.data
let listData = data.map((item, index) => { let listData = data.map((item, index) => {
return [ return [
...@@ -170,7 +170,7 @@ export default class Parameter extends Component { ...@@ -170,7 +170,7 @@ export default class Parameter extends Component {
updateParameter = (payload) => { updateParameter = (payload) => {
this.setState({ visibleEdit: false }) this.setState({ visibleEdit: false })
api.create().updateParameter(payload).then(response => { api.create().updateParameter(payload).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
...@@ -227,7 +227,7 @@ export default class Parameter extends Component { ...@@ -227,7 +227,7 @@ export default class Parameter extends Component {
"https://tia.eksad.com/tia-reporting-dev/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx" "https://tia.eksad.com/tia-reporting-dev/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx"
) )
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');
...@@ -242,7 +242,7 @@ export default class Parameter extends Component { ...@@ -242,7 +242,7 @@ export default class Parameter extends Component {
"https://tia.eksad.com/tia-reporting-dev/public/setting/export_setting" "https://tia.eksad.com/tia-reporting-dev/public/setting/export_setting"
) )
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');
...@@ -258,7 +258,7 @@ export default class Parameter extends Component { ...@@ -258,7 +258,7 @@ export default class Parameter extends Component {
"keyword": e "keyword": e
} }
api.create().searchParameter(body).then(response => { api.create().searchParameter(body).then(response => {
console.log(response.data); // console.log(response.data);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
...@@ -303,7 +303,7 @@ export default class Parameter extends Component { ...@@ -303,7 +303,7 @@ export default class Parameter extends Component {
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp) // console.log(resp)
if (err) { if (err) {
console.log(err); // console.log(err);
} }
else { else {
// let judul = resp.rows[2] // let judul = resp.rows[2]
...@@ -329,7 +329,7 @@ export default class Parameter extends Component { ...@@ -329,7 +329,7 @@ export default class Parameter extends Component {
let body = { let body = {
setting: payload setting: payload
} }
console.log(resp.rows[1]); // console.log(resp.rows[1]);
this.setState({ payload: body, buttonError: false, judul: resp.rows[1] === undefined ? "" : resp.rows[1][0] }) this.setState({ payload: body, buttonError: false, judul: resp.rows[1] === undefined ? "" : resp.rows[1][0] })
} }
}); });
...@@ -337,7 +337,7 @@ export default class Parameter extends Component { ...@@ -337,7 +337,7 @@ export default class Parameter extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadParameter(this.state.payload).then(response => { api.create().checkUploadParameter(this.state.payload).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -607,7 +607,7 @@ export default class Parameter extends Component { ...@@ -607,7 +607,7 @@ export default class Parameter extends Component {
} }
] ]
console.log(dataRow); // console.log(dataRow);
this.setState({ this.setState({
dataLoaded: true, dataLoaded: true,
cols: columns, cols: columns,
...@@ -647,7 +647,7 @@ export default class Parameter extends Component { ...@@ -647,7 +647,7 @@ export default class Parameter extends Component {
uploadParameter() { uploadParameter() {
api.create().uploadParameter(this.state.payload).then(response => { api.create().uploadParameter(this.state.payload).then(response => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
......
...@@ -100,7 +100,7 @@ export default class UnitBisnis extends Component { ...@@ -100,7 +100,7 @@ export default class UnitBisnis extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadUnitBisnis(this.state.payload).then(response => { api.create().checkUploadUnitBisnis(this.state.payload).then(response => {
console.log(response) // console.log(response)
let dataRow = [] let dataRow = []
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
...@@ -236,7 +236,7 @@ export default class UnitBisnis extends Component { ...@@ -236,7 +236,7 @@ export default class UnitBisnis extends Component {
type: 'MAX_FILE_SIZE' type: 'MAX_FILE_SIZE'
} }
api.create().getAllSettingByType(body).then(response => { api.create().getAllSettingByType(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.setState({ this.setState({
...@@ -252,7 +252,7 @@ export default class UnitBisnis extends Component { ...@@ -252,7 +252,7 @@ export default class UnitBisnis extends Component {
menu: "business unit" menu: "business unit"
} }
api.create().getPermission(payload).then(response => { api.create().getPermission(payload).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.setState({ this.setState({
...@@ -448,7 +448,7 @@ export default class UnitBisnis extends Component { ...@@ -448,7 +448,7 @@ export default class UnitBisnis extends Component {
uploadUnitBisnis() { uploadUnitBisnis() {
api.create().uploadUnitBisnis(this.state.payload).then(response => { api.create().uploadUnitBisnis(this.state.payload).then(response => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -478,7 +478,7 @@ export default class UnitBisnis extends Component { ...@@ -478,7 +478,7 @@ export default class UnitBisnis extends Component {
} }
deleteUnitBisnis(payload) { deleteUnitBisnis(payload) {
console.log(payload); // console.log(payload);
let id = String(payload[1]) let id = String(payload[1])
api.create().deleteUnitBisnis(id).then(response => { api.create().deleteUnitBisnis(id).then(response => {
if (response.data) { if (response.data) {
......
...@@ -39,7 +39,7 @@ export default class CreateUnitBisnis extends Component { ...@@ -39,7 +39,7 @@ export default class CreateUnitBisnis extends Component {
componentDidMount() { componentDidMount() {
if (this.props.type === 'edit') { if (this.props.type === 'edit') {
this.getDetailUnitBisnis() this.getDetailUnitBisnis()
console.log(this.props.data); // console.log(this.props.data);
// this.setState({ // this.setState({
// id: data[0], // id: data[0],
// name: data[1], // name: data[1],
...@@ -48,7 +48,7 @@ export default class CreateUnitBisnis extends Component { ...@@ -48,7 +48,7 @@ export default class CreateUnitBisnis extends Component {
// }) // })
} else { } else {
let date = format(new Date, 'yyyy-MM-dd') let date = format(new Date, 'yyyy-MM-dd')
console.log(date); // console.log(date);
this.setState({ this.setState({
startDate: date, startDate: date,
endDate: date endDate: date
...@@ -58,7 +58,7 @@ export default class CreateUnitBisnis extends Component { ...@@ -58,7 +58,7 @@ export default class CreateUnitBisnis extends Component {
getDetailUnitBisnis() { getDetailUnitBisnis() {
api.create().getDetailUnitBisnis(this.props.data[1]).then(response => { api.create().getDetailUnitBisnis(this.props.data[1]).then(response => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -98,12 +98,12 @@ export default class CreateUnitBisnis extends Component { ...@@ -98,12 +98,12 @@ export default class CreateUnitBisnis extends Component {
if (isDate && type == 'start_date') { if (isDate && type == 'start_date') {
this.setState({ startDate: format(e, 'yyyy-MM-dd'), endDate: null }, () => { this.setState({ startDate: format(e, 'yyyy-MM-dd'), endDate: null }, () => {
this.clearError() this.clearError()
console.log(this.state.startDate) // console.log(this.state.startDate)
}) })
} else if (isDate && type == 'end_date') { } else if (isDate && type == 'end_date') {
this.setState({ endDate: format(e, 'yyyy-MM-dd') }, () => { this.setState({ endDate: format(e, 'yyyy-MM-dd') }, () => {
this.clearError() this.clearError()
console.log(this.state.endDate) // console.log(this.state.endDate)
}) })
} else { } else {
// this.setState({...data, tempData: {...this.state.tempData, [e.target.name] : e.target.value}}) // this.setState({...data, tempData: {...this.state.tempData, [e.target.name] : e.target.value}})
......
...@@ -74,7 +74,7 @@ export default class UserRole extends Component { ...@@ -74,7 +74,7 @@ export default class UserRole extends Component {
async daskdkas() { async daskdkas() {
let res = await localStorage.getItem(Constant.TOKEN) let res = await localStorage.getItem(Constant.TOKEN)
console.log(res) // console.log(res)
} }
closeEdit() { closeEdit() {
...@@ -91,7 +91,7 @@ export default class UserRole extends Component { ...@@ -91,7 +91,7 @@ export default class UserRole extends Component {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
console.log(response.data); // console.log(response.data);
let data = response.data.data let data = response.data.data
let listData = data.sort((a, b) => a.user_id - b.user_id).map((item, index) => { let listData = data.sort((a, b) => a.user_id - b.user_id).map((item, index) => {
return [index, item.user_id, item.fullname === null ? '-' : item.fullname, item.email, item.role_name, item.totalCompany, item.status] return [index, item.user_id, item.fullname === null ? '-' : item.fullname, item.email, item.role_name, item.totalCompany, item.status]
...@@ -129,7 +129,7 @@ export default class UserRole extends Component { ...@@ -129,7 +129,7 @@ export default class UserRole extends Component {
menu: "user" menu: "user"
} }
api.create().getPermission(payload).then(response => { api.create().getPermission(payload).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.setState({ this.setState({
...@@ -190,7 +190,7 @@ export default class UserRole extends Component { ...@@ -190,7 +190,7 @@ export default class UserRole extends Component {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
if (err) { if (err) {
console.log(err); // console.log(err);
} }
else { else {
// let judul = resp.rows[0] // let judul = resp.rows[0]
...@@ -212,7 +212,7 @@ export default class UserRole extends Component { ...@@ -212,7 +212,7 @@ export default class UserRole extends Component {
let body = { let body = {
user: payload user: payload
} }
console.log(resp.rows[1]) // console.log(resp.rows[1])
this.setState({ payload: body, rows: [], judul: resp.rows[1][0] }) this.setState({ payload: body, rows: [], judul: resp.rows[1][0] })
} }
}); });
...@@ -248,7 +248,7 @@ export default class UserRole extends Component { ...@@ -248,7 +248,7 @@ export default class UserRole extends Component {
checkUpload(){ checkUpload(){
api.create().checkUploadUser(this.state.payload).then(response => { api.create().checkUploadUser(this.state.payload).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -275,7 +275,7 @@ export default class UserRole extends Component { ...@@ -275,7 +275,7 @@ export default class UserRole extends Component {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('fullname')) check = tableMeta.rowData[6].findIndex((val) => val.field.includes('fullname'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
console.log('masuk') // console.log('masuk')
} }
} }
return ( return (
...@@ -326,7 +326,7 @@ export default class UserRole extends Component { ...@@ -326,7 +326,7 @@ export default class UserRole extends Component {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('role')) check = tableMeta.rowData[6].findIndex((val) => val.field.includes('role'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
console.log(tableMeta.rowData[6]) // console.log(tableMeta.rowData[6])
} }
} }
return ( return (
...@@ -352,7 +352,7 @@ export default class UserRole extends Component { ...@@ -352,7 +352,7 @@ export default class UserRole extends Component {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('start_date')) check = tableMeta.rowData[6].findIndex((val) => val.field.includes('start_date'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
console.log('masuk') // console.log('masuk')
} }
} }
return ( return (
...@@ -378,7 +378,7 @@ export default class UserRole extends Component { ...@@ -378,7 +378,7 @@ export default class UserRole extends Component {
check = tableMeta.rowData[6].findIndex((val) => val.field.includes('end_date')) check = tableMeta.rowData[6].findIndex((val) => val.field.includes('end_date'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
console.log('masuk') // console.log('masuk')
} }
} }
return ( return (
...@@ -434,7 +434,7 @@ export default class UserRole extends Component { ...@@ -434,7 +434,7 @@ export default class UserRole extends Component {
"https://tia.eksad.com/tia-reporting-dev/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx" "https://tia.eksad.com/tia-reporting-dev/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx"
) )
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');
...@@ -447,7 +447,7 @@ export default class UserRole extends Component { ...@@ -447,7 +447,7 @@ export default class UserRole extends Component {
downloadDataTables = async () => { downloadDataTables = async () => {
let res = await fetch("https://tia.eksad.com/tia-reporting-dev/public/user/export_user") let res = await fetch("https://tia.eksad.com/tia-reporting-dev/public/user/export_user")
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');
...@@ -459,8 +459,8 @@ export default class UserRole extends Component { ...@@ -459,8 +459,8 @@ export default class UserRole extends Component {
updateUser(payload) { updateUser(payload) {
api.create().updateUser(payload).then((response) => { api.create().updateUser(payload).then((response) => {
console.log(response.data.message) // console.log(response.data.message)
console.log(response.data.status) // console.log(response.data.status)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
...@@ -488,9 +488,9 @@ export default class UserRole extends Component { ...@@ -488,9 +488,9 @@ export default class UserRole extends Component {
} }
createUser(payload) { createUser(payload) {
console.log('Mode Create') // console.log('Mode Create')
api.create().createUser(payload).then((response) => { api.create().createUser(payload).then((response) => {
console.log(response.data) // console.log(response.data)
// if (String(response.data.status).toLocaleUpperCase === 'Success' || String(response.data.status).toLocaleUpperCase === 'success') { // if (String(response.data.status).toLocaleUpperCase === 'Success' || String(response.data.status).toLocaleUpperCase === 'success') {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
...@@ -534,10 +534,10 @@ export default class UserRole extends Component { ...@@ -534,10 +534,10 @@ export default class UserRole extends Component {
} }
uploadUser() { uploadUser() {
console.log(JSON.stringify(this.state.payload)) // console.log(JSON.stringify(this.state.payload))
api.create().uploadUser(this.state.payload).then(response => { api.create().uploadUser(this.state.payload).then(response => {
this.setState({buttonError: false}) this.setState({buttonError: false})
console.log(JSON.stringify(response)) // console.log(JSON.stringify(response))
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
......
...@@ -82,7 +82,7 @@ export default class AddUser extends Component { ...@@ -82,7 +82,7 @@ export default class AddUser extends Component {
// //
} else { } else {
let date = format(new Date, 'yyyy-MM-dd') let date = format(new Date, 'yyyy-MM-dd')
console.log(date); // console.log(date);
this.setState({ this.setState({
startDate: date, startDate: date,
endDate: date endDate: date
...@@ -179,7 +179,7 @@ export default class AddUser extends Component { ...@@ -179,7 +179,7 @@ export default class AddUser extends Component {
msgErrorED: '', msgErrorED: '',
company company
}, () => { }, () => {
console.log(this.state.company) // console.log(this.state.company)
}) })
} }
...@@ -265,7 +265,7 @@ export default class AddUser extends Component { ...@@ -265,7 +265,7 @@ export default class AddUser extends Component {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ listCompany: response.data.data }) this.setState({ listCompany: response.data.data })
console.log(response.data.data) // console.log(response.data.data)
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
......
...@@ -172,7 +172,7 @@ export default class EditUser extends Component { ...@@ -172,7 +172,7 @@ export default class EditUser extends Component {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ tempData: response.data.data, company: response.data.data.company }, ()=> this.setState({ tempData: response.data.data, company: response.data.data.company }, ()=>
this.getRole(response.data.data.role_id)) this.getRole(response.data.data.role_id))
console.log(response.data.data) // console.log(response.data.data)
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -255,7 +255,7 @@ export default class EditUser extends Component { ...@@ -255,7 +255,7 @@ export default class EditUser extends Component {
}; };
let index = roleData.findIndex((val) => val.role_id === id) let index = roleData.findIndex((val) => val.role_id === id)
console.log(index) // console.log(index)
this.setState({ listRole: defaultProps, role: index === -1 ? null : roleData[index], msgErrorRN: index === -1 ? 'Role has been Inactive' : '', errorRoleName: index === -1 ? true : false }) this.setState({ listRole: defaultProps, role: index === -1 ? null : roleData[index], msgErrorRN: index === -1 ? 'Role has been Inactive' : '', errorRoleName: index === -1 ? true : false })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
......
...@@ -101,7 +101,7 @@ class UserRole extends Component { ...@@ -101,7 +101,7 @@ class UserRole extends Component {
menu: "user role" menu: "user role"
} }
api.create().getPermission(payload).then(response => { api.create().getPermission(payload).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.setState({ this.setState({
......
...@@ -64,7 +64,7 @@ export default class AddRole extends Component { ...@@ -64,7 +64,7 @@ export default class AddRole extends Component {
// //
} else { } else {
let date = format(new Date, 'yyyy-MM-dd') let date = format(new Date, 'yyyy-MM-dd')
console.log(date); // console.log(date);
this.setState({ this.setState({
startDate: date, startDate: date,
endDate: date endDate: date
...@@ -134,7 +134,7 @@ export default class AddRole extends Component { ...@@ -134,7 +134,7 @@ export default class AddRole extends Component {
} }
// console.log(payload) // console.log(payload)
api.create().addRole(payload).then((response) => { api.create().addRole(payload).then((response) => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
...@@ -193,7 +193,7 @@ export default class AddRole extends Component { ...@@ -193,7 +193,7 @@ export default class AddRole extends Component {
return set return set
} }
}) })
console.log(app) // console.log(app)
this.setState({ application: app, setting: set, isLoad: true }, () => console.log(this.state.application)) this.setState({ application: app, setting: set, isLoad: true }, () => console.log(this.state.application))
// this.setState({ menuData: response.data.data }) // this.setState({ menuData: response.data.data })
} else { } else {
...@@ -300,7 +300,7 @@ export default class AddRole extends Component { ...@@ -300,7 +300,7 @@ export default class AddRole extends Component {
} }
} }
this.setState({ privileges }, () => { this.setState({ privileges }, () => {
console.log(this.state.privileges) // console.log(this.state.privileges)
}) })
} }
...@@ -332,7 +332,7 @@ export default class AddRole extends Component { ...@@ -332,7 +332,7 @@ export default class AddRole extends Component {
item.sub_menu.map((items,indexs) => { item.sub_menu.map((items,indexs) => {
let subIndexID = privileges.findIndex((val) => val.menu_id === items.menu_id) let subIndexID = privileges.findIndex((val) => val.menu_id === items.menu_id)
if (subIndexID === -1) { if (subIndexID === -1) {
console.log('masuk pa eko', subIndexID) // console.log('masuk pa eko', subIndexID)
privileges.push({ privileges.push({
menu_id: items.menu_id, menu_id: items.menu_id,
button_id: [index] button_id: [index]
......
...@@ -102,7 +102,7 @@ export default class EditRole extends Component { ...@@ -102,7 +102,7 @@ export default class EditRole extends Component {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ tempData: response.data.data, privileges: response.data.data.privileges }) this.setState({ tempData: response.data.data, privileges: response.data.data.privileges })
console.log(response.data.data.start_date) // console.log(response.data.data.start_date)
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -161,7 +161,7 @@ export default class EditRole extends Component { ...@@ -161,7 +161,7 @@ export default class EditRole extends Component {
} }
// console.log(payload) // console.log(payload)
api.create().editRole(payload).then((response) => { api.create().editRole(payload).then((response) => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
...@@ -220,7 +220,7 @@ export default class EditRole extends Component { ...@@ -220,7 +220,7 @@ export default class EditRole extends Component {
return set return set
} }
}) })
console.log(app) // console.log(app)
this.setState({ application: app, setting: set, isLoad: true }, () => console.log(this.state.application)) this.setState({ application: app, setting: set, isLoad: true }, () => console.log(this.state.application))
// this.setState({ menuData: response.data.data }) // this.setState({ menuData: response.data.data })
} else { } else {
...@@ -249,7 +249,7 @@ export default class EditRole extends Component { ...@@ -249,7 +249,7 @@ export default class EditRole extends Component {
handleItemClick(item) { handleItemClick(item) {
let indexID = this.state.privileges.findIndex((val) => val.menu_id === item.menu_id) let indexID = this.state.privileges.findIndex((val) => val.menu_id === item.menu_id)
console.log(item) // console.log(item)
let privileges = this.state.privileges let privileges = this.state.privileges
if (indexID === -1) { if (indexID === -1) {
privileges.push({ privileges.push({
...@@ -307,7 +307,7 @@ export default class EditRole extends Component { ...@@ -307,7 +307,7 @@ export default class EditRole extends Component {
item.sub_menu.map((items,indexs) => { item.sub_menu.map((items,indexs) => {
let subIndexID = privileges.findIndex((val) => val.menu_id === items.menu_id) let subIndexID = privileges.findIndex((val) => val.menu_id === items.menu_id)
if (subIndexID === -1) { if (subIndexID === -1) {
console.log('masuk pa eko', subIndexID) // console.log('masuk pa eko', subIndexID)
privileges.push({ privileges.push({
menu_id: items.menu_id, menu_id: items.menu_id,
button_id: [index] button_id: [index]
......
...@@ -54,7 +54,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -54,7 +54,7 @@ export default class BalanceSheetOLPA extends Component {
componentDidMount() { componentDidMount() {
this.getItemHierarki() this.getItemHierarki()
this.lastUpdate() this.lastUpdate()
console.log(this.props); // console.log(this.props);
} }
lastUpdate(){ lastUpdate(){
...@@ -86,7 +86,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -86,7 +86,7 @@ export default class BalanceSheetOLPA extends Component {
"company_id": this.props.company.company_id "company_id": this.props.company.company_id
} }
let response = await api.create().getDetailReportOLPA(payload) let response = await api.create().getDetailReportOLPA(payload)
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
...@@ -207,7 +207,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -207,7 +207,7 @@ export default class BalanceSheetOLPA extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/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/outlook_pa/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');
...@@ -226,7 +226,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -226,7 +226,7 @@ export default class BalanceSheetOLPA 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) => {
...@@ -257,7 +257,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -257,7 +257,7 @@ export default class BalanceSheetOLPA extends Component {
report_id: this.props.report_id, report_id: this.props.report_id,
balance_sheet: payload balance_sheet: 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] })
} }
}); });
...@@ -266,7 +266,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -266,7 +266,7 @@ export default class BalanceSheetOLPA extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadOLPA(this.state.payload).then(response => { api.create().checkUploadOLPA(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, visibleBalanceSheet: false, loading: true }) this.setState({ visibleUpload: false, visibleBalanceSheet: false, loading: true })
...@@ -301,7 +301,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -301,7 +301,7 @@ export default class BalanceSheetOLPA 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[23].length > 0) { if (item[23].length > 0) {
console.log('masuk') // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true, editable: true })
} }
}) })
...@@ -341,9 +341,9 @@ export default class BalanceSheetOLPA extends Component { ...@@ -341,9 +341,9 @@ export default class BalanceSheetOLPA extends Component {
balance_sheet: data, balance_sheet: data,
status: type status: type
} }
console.log(JSON.stringify(body)); // console.log(JSON.stringify(body));
api.create('UPLOAD').uploadOLPA(body).then(response => { api.create('UPLOAD').uploadOLPA(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()
...@@ -360,7 +360,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -360,7 +360,7 @@ export default class BalanceSheetOLPA extends Component {
async downloadAllData() { async downloadAllData() {
let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
console.log(url); // console.log(url);
let res = await fetch( let res = await fetch(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id === null ? "" : this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id === null ? "" : this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
) )
...@@ -407,7 +407,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -407,7 +407,7 @@ export default class BalanceSheetOLPA extends Component {
"status": "submitted" "status": "submitted"
} }
api.create().validateSubmitReportOLPA(payload).then((response) => { api.create().validateSubmitReportOLPA(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 {
...@@ -652,7 +652,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -652,7 +652,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -795,7 +795,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -795,7 +795,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -938,7 +938,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -938,7 +938,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -1081,7 +1081,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1081,7 +1081,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -1224,7 +1224,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1224,7 +1224,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -1367,7 +1367,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1367,7 +1367,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -1510,7 +1510,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1510,7 +1510,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -1653,7 +1653,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1653,7 +1653,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -1796,7 +1796,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1796,7 +1796,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -1939,7 +1939,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1939,7 +1939,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -2082,7 +2082,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -2082,7 +2082,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -2225,7 +2225,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -2225,7 +2225,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
...@@ -2368,7 +2368,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -2368,7 +2368,7 @@ export default class BalanceSheetOLPA 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)
}} }}
/> />
} }
......
...@@ -66,7 +66,7 @@ export default class Profile extends Component { ...@@ -66,7 +66,7 @@ export default class Profile extends Component {
handleChange(e) { handleChange(e) {
let data = this.state let data = this.state
this.setState({ ...data, [e.target.name]: e.target.value }) this.setState({ ...data, [e.target.name]: e.target.value })
console.log(e.target.name); // console.log(e.target.name);
if (e.target.name === "password") { if (e.target.name === "password") {
this.setState({ errorPassword: false, msgPassword: 'Consists of 8 Characters with a Combination of Numbers.' }) this.setState({ errorPassword: false, msgPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
} else if (e.target.name === "confirmPassword") { } else if (e.target.name === "confirmPassword") {
...@@ -109,7 +109,7 @@ export default class Profile extends Component { ...@@ -109,7 +109,7 @@ export default class Profile extends Component {
"confirm_password": this.state.confirmPassword "confirm_password": this.state.confirmPassword
} }
api.create().changePassword(body).then(response => { api.create().changePassword(body).then(response => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -154,12 +154,12 @@ export default class Profile extends Component { ...@@ -154,12 +154,12 @@ export default class Profile extends Component {
getUser() { getUser() {
let userId = localStorage.getItem(Constant.USER) let userId = localStorage.getItem(Constant.USER)
api.create().getDetailUser(userId).then((response) => { api.create().getDetailUser(userId).then((response) => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ company: response.data.data.company, photo: response.data.data.photo, name: response.data.data.fullname }) this.setState({ company: response.data.data.company, photo: response.data.data.photo, name: response.data.data.fullname })
console.log(response) // console.log(response)
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -181,12 +181,12 @@ export default class Profile extends Component { ...@@ -181,12 +181,12 @@ export default class Profile extends Component {
getPerusahaan() { getPerusahaan() {
api.create().getPerusahaanHierarki().then((response) => { api.create().getPerusahaanHierarki().then((response) => {
console.log(response); // console.log(response);
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ listCompany: response.data.data }) this.setState({ listCompany: response.data.data })
console.log(response.data.data) // console.log(response.data.data)
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -321,7 +321,7 @@ export default class Profile extends Component { ...@@ -321,7 +321,7 @@ export default class Profile extends Component {
let formData = new FormData() let formData = new FormData()
formData.append('file', this.state.pictures[0]) formData.append('file', this.state.pictures[0])
api.create().uploadFoto(formData).then(response => { api.create().uploadFoto(formData).then(response => {
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
......
...@@ -32,8 +32,8 @@ class Upload extends Component { ...@@ -32,8 +32,8 @@ class Upload extends Component {
componentDidUpdate(prevs, next) { componentDidUpdate(prevs, next) {
if (prevs.percentage > 0 && prevs.percentage <= 100) { if (prevs.percentage > 0 && prevs.percentage <= 100) {
console.log('old percentage', prevs.percentage) // console.log('old percentage', prevs.percentage)
console.log('new percentage', this.state.percentage) // console.log('new percentage', this.state.percentage)
if (this.state.percentage !== prevs.percentage) { if (this.state.percentage !== prevs.percentage) {
this.setState({ percentage: prevs.percentage }) this.setState({ percentage: prevs.percentage })
} }
...@@ -47,7 +47,7 @@ class Upload extends Component { ...@@ -47,7 +47,7 @@ class Upload extends Component {
componentDidMount() { componentDidMount() {
if (this.props.docName !== undefined && this.props.docName !== "") { if (this.props.docName !== undefined && this.props.docName !== "") {
console.log('masuk'); // console.log('masuk');
this.setState({ docName: this.props.docName, docSize: this.props.docSize, inputVisible: false, editVisible: true }) this.setState({ docName: this.props.docName, docSize: this.props.docSize, inputVisible: false, editVisible: true })
} }
} }
......
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