Commit a6868e92 authored by r.kurnia's avatar r.kurnia

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

parents 3c45b48f 52335ff8
...@@ -126,8 +126,13 @@ export default class BudgetTahunan extends Component { ...@@ -126,8 +126,13 @@ export default class BudgetTahunan extends Component {
let defaultProps = { let defaultProps = {
options: companyData, options: companyData,
getOptionLabel: (option) => titleCase(option.company_name), getOptionLabel: (option) => titleCase(option.company_name),
}; }
this.setState({ listCompany: defaultProps, company: companyData[0] }, () => { let indexID = null
if (this.state.rawData !== undefined) {
indexID = companyData.findIndex((val) => val.company_id == this.state.rawData.company_id)
}
this.setState({ listCompany: defaultProps, company: indexID == null? companyData[0] : companyData[indexID]}, () => {
// console.log(response.data.data); // console.log(response.data.data);
if (response.data.data.length > 0) { if (response.data.data.length > 0) {
this.getRevision() this.getRevision()
...@@ -195,14 +200,17 @@ export default class BudgetTahunan extends Component { ...@@ -195,14 +200,17 @@ export default class BudgetTahunan extends Component {
item.revision item.revision
] ]
}) })
let dataTableRevision = response.data.data.map((item, index) => { let dataTableRevision = []
return [ response.data.data.map((item, index) => {
if (item.report_name !== 'Cash Flow') {
dataTableRevision.push([
item.report_id, item.report_id,
item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name, item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name,
"" ""
] ])
}
}) })
// console.log(dataTable); // console.log(dataTableRevision);
this.setState({ dataTable, loading: false, dataTableRevision, dataForRevision: response.data.data }, ()=> { this.setState({ dataTable, loading: false, dataTableRevision, dataForRevision: response.data.data }, ()=> {
document.body.style.overflow = 'unset'; document.body.style.overflow = 'unset';
}) })
......
...@@ -58,7 +58,6 @@ export default class BalanceSheet extends Component { ...@@ -58,7 +58,6 @@ export default class BalanceSheet extends Component {
componentDidMount() { componentDidMount() {
this.getLatestUpdate() this.getLatestUpdate()
this.getSettingControl() this.getSettingControl()
// console.log(this.props);
} }
getSettingControl() { getSettingControl() {
...@@ -436,7 +435,7 @@ export default class BalanceSheet extends Component { ...@@ -436,7 +435,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,
...@@ -446,7 +445,7 @@ export default class BalanceSheet extends Component { ...@@ -446,7 +445,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 {
...@@ -2680,7 +2679,7 @@ export default class BalanceSheet extends Component { ...@@ -2680,7 +2679,7 @@ export default class BalanceSheet extends Component {
} }
] ]
const loadingComponent = ( const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}> <div style={{ position: 'fixed', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader <PropagateLoader
// css={override} // css={override}
size={20} size={20}
......
...@@ -37,13 +37,33 @@ export default class CashFlow extends Component { ...@@ -37,13 +37,33 @@ export default class CashFlow extends Component {
super(props) super(props)
this.state = { this.state = {
dataTable: [], dataTable: [],
loading: false loading: false,
minValue: "0",
maxValue: "0"
} }
} }
componentDidMount() { componentDidMount() {
this.setState({ loading: true }) this.setState({ loading: true })
this.getSettingControl()
}
getSettingControl() {
let body = {
group: 'THRESHOLD_CONTROL',
company_id: this.props.company.company_id,
type: 'CASH_FLOW'
}
api.create().getAllSettingByType(body).then(response => {
console.log(response);
this.setState({
minValue: response.data.data[0] ? response.data.data[0].min_value : null,
maxValue: response.data.data[0] ? response.data.data[0].max_value : null,
}, () => {
this.getItemHierarki() this.getItemHierarki()
})
})
} }
getItemHierarki() { getItemHierarki() {
...@@ -585,7 +605,7 @@ export default class CashFlow extends Component { ...@@ -585,7 +605,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -601,26 +621,8 @@ export default class CashFlow extends Component { ...@@ -601,26 +621,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -698,7 +700,7 @@ export default class CashFlow extends Component { ...@@ -698,7 +700,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -714,26 +716,8 @@ export default class CashFlow extends Component { ...@@ -714,26 +716,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -748,7 +732,7 @@ export default class CashFlow extends Component { ...@@ -748,7 +732,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -811,7 +795,7 @@ export default class CashFlow extends Component { ...@@ -811,7 +795,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -827,26 +811,8 @@ export default class CashFlow extends Component { ...@@ -827,26 +811,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -934,7 +900,7 @@ export default class CashFlow extends Component { ...@@ -934,7 +900,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -950,26 +916,8 @@ export default class CashFlow extends Component { ...@@ -950,26 +916,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1059,7 +1007,7 @@ export default class CashFlow extends Component { ...@@ -1059,7 +1007,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1075,26 +1023,8 @@ export default class CashFlow extends Component { ...@@ -1075,26 +1023,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1182,7 +1112,7 @@ export default class CashFlow extends Component { ...@@ -1182,7 +1112,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1198,26 +1128,8 @@ export default class CashFlow extends Component { ...@@ -1198,26 +1128,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1305,7 +1217,7 @@ export default class CashFlow extends Component { ...@@ -1305,7 +1217,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1321,26 +1233,8 @@ export default class CashFlow extends Component { ...@@ -1321,26 +1233,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1428,7 +1322,7 @@ export default class CashFlow extends Component { ...@@ -1428,7 +1322,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1444,26 +1338,8 @@ export default class CashFlow extends Component { ...@@ -1444,26 +1338,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1553,7 +1429,7 @@ export default class CashFlow extends Component { ...@@ -1553,7 +1429,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1569,26 +1445,8 @@ export default class CashFlow extends Component { ...@@ -1569,26 +1445,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1676,7 +1534,7 @@ export default class CashFlow extends Component { ...@@ -1676,7 +1534,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1692,26 +1550,8 @@ export default class CashFlow extends Component { ...@@ -1692,26 +1550,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1799,7 +1639,7 @@ export default class CashFlow extends Component { ...@@ -1799,7 +1639,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1815,26 +1655,8 @@ export default class CashFlow extends Component { ...@@ -1815,26 +1655,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1922,7 +1744,7 @@ export default class CashFlow extends Component { ...@@ -1922,7 +1744,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1938,26 +1760,8 @@ export default class CashFlow extends Component { ...@@ -1938,26 +1760,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1)} value={Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -2074,7 +1878,7 @@ export default class CashFlow extends Component { ...@@ -2074,7 +1878,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -2090,26 +1894,8 @@ export default class CashFlow extends Component { ...@@ -2090,26 +1894,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -2173,7 +1959,7 @@ export default class CashFlow extends Component { ...@@ -2173,7 +1959,7 @@ export default class CashFlow extends Component {
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1) === Number(tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]).toFixed(1) ? (Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -2189,26 +1975,8 @@ export default class CashFlow extends Component { ...@@ -2189,26 +1975,8 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)}
/> : tableMeta.rowData[24] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[23] == "" ? "0" : tableMeta.rowData[23]}`} arrow>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
......
...@@ -87,7 +87,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -87,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
...@@ -118,7 +118,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -118,7 +118,8 @@ export default class FixedAssetsMovement extends Component {
item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_next_year, item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_next_year,
item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_more_year, item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_more_year,
item.order, item.order,
item.fixed_asset_movement.forecast_formula item.fixed_asset_movement.forecast_formula,
item.fixed_asset_movement.before_formula
]) ])
} }
if (item.children !== null) { if (item.children !== null) {
...@@ -154,7 +155,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -154,7 +155,8 @@ export default class FixedAssetsMovement extends Component {
item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_next_year, item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_next_year,
item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_more_year, item.type_report_id == 5 || item.type_report_id == 6 ? 0 : item.fixed_asset_movement.total_more_year,
item.order, item.order,
item.fixed_asset_movement.forecast_formula item.fixed_asset_movement.forecast_formula,
item.fixed_asset_movement.before_formula
]) ])
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -330,6 +332,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -330,6 +332,7 @@ export default class FixedAssetsMovement extends Component {
item.total_more_year, item.total_more_year,
item.orders, item.orders,
item.forecast_formula, item.forecast_formula,
item.before_formula,
item.error item.error
] ]
}) })
...@@ -463,7 +466,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -463,7 +466,7 @@ export default class FixedAssetsMovement extends Component {
render() { render() {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleValueFormula = (value, tableMeta) => { const handleValueFormula = (value, tableMeta, Bfr) => {
let splitFormula = String(tableMeta.rowData[3]).split('@') let splitFormula = String(tableMeta.rowData[3]).split('@')
let baru = [] let baru = []
let anjay = [] let anjay = []
...@@ -495,7 +498,17 @@ export default class FixedAssetsMovement extends Component { ...@@ -495,7 +498,17 @@ export default class FixedAssetsMovement extends Component {
anjay.push(item) anjay.push(item)
} else { } else {
if (String(item).includes('#')) { if (String(item).includes('#')) {
if (String(item).includes('[M-1]')) { if (Bfr !== undefined) {
let data = 24
let period = Number(this.props.periode) - 1
console.log(dataTable2[tableMeta.rowIndex][data])
anjay.push(0)
let indexID = dataTable2[tableMeta.rowIndex][data].findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == period)
if (indexID !== -1) {
let valuezz = dataTable2[tableMeta.rowIndex][data][indexID].value
anjay.push(valuezz == "" ? 0 : valuezz)
}
} else if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '') let tst = String(item).replace('[M-1]', '')
let data = tableMeta.columnIndex == 7 ? 18 : tableMeta.columnIndex - 1 let data = tableMeta.columnIndex == 7 ? 18 : tableMeta.columnIndex - 1
let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode
...@@ -607,20 +620,13 @@ export default class FixedAssetsMovement extends Component { ...@@ -607,20 +620,13 @@ export default class FixedAssetsMovement extends Component {
const handleForecast = (tableMeta, periode) => { const handleForecast = (tableMeta, periode) => {
let total = 0 let total = 0
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'gain/ (loss) on fixed assets' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'gain/ (loss) on fixed assets' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
// // console.log(dataTable2[tableMeta.rowIndex][23])
// // console.log()
let indexID = dataTable2[tableMeta.rowIndex][23].findIndex((val) => val.periode == periode) let indexID = dataTable2[tableMeta.rowIndex][23].findIndex((val) => val.periode == periode)
if (indexID !== -1) { if (indexID !== -1) {
total = dataTable2[tableMeta.rowIndex][23][indexID].value total = dataTable2[tableMeta.rowIndex][23][indexID].value
} }
} else { } else {
total = handleValueFormula(tableMeta.columnIndex, tableMeta) total = handleValueFormula(tableMeta.columnIndex, tableMeta)
// // console.log(dataTable2[tableMeta.rowIndex])
} }
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
// total = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex - 1]
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
// }
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
return total return total
} }
...@@ -659,6 +665,13 @@ export default class FixedAssetsMovement extends Component { ...@@ -659,6 +665,13 @@ export default class FixedAssetsMovement extends Component {
// // console.log(indexParent); // // console.log(indexParent);
return a return a
} }
const handleBfr = (value,tableMeta) => {
let total = 0
total = handleValueFormula(value, tableMeta, 'before')
return total
}
const handleFormula = (data, tableMeta, month) => { const handleFormula = (data, tableMeta, month) => {
let rilFormula = String(tableMeta.rowData[3]) let rilFormula = String(tableMeta.rowData[3])
if (rilFormula.includes("#")) { if (rilFormula.includes("#")) {
...@@ -765,6 +778,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -765,6 +778,7 @@ export default class FixedAssetsMovement extends Component {
return a return a
} }
} }
const columns = [{ const columns = [{
name: "", name: "",
options: { options: {
...@@ -802,8 +816,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -802,8 +816,8 @@ export default class FixedAssetsMovement extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ width: 300 }}> <div style={{ width: 300 }}>
{tableMeta.rowData[24] ? {tableMeta.rowData[25] ?
tableMeta.rowData[24].length > 0 ? tableMeta.rowData[25].length > 0 ?
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}> <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<LightTooltip title={"Report Items Not Registered"} arrow> <LightTooltip title={"Report Items Not Registered"} arrow>
<span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span> <span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
...@@ -843,6 +857,24 @@ export default class FixedAssetsMovement extends Component { ...@@ -843,6 +857,24 @@ export default class FixedAssetsMovement extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1?
null null
: :
tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleBfr(value,tableMeta)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -2401,7 +2433,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2401,7 +2433,7 @@ export default class FixedAssetsMovement extends Component {
// disabled={this.state.buttonError} // disabled={this.state.buttonError}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
......
...@@ -180,7 +180,7 @@ export default class ProfitLoss extends Component { ...@@ -180,7 +180,7 @@ export default class ProfitLoss extends Component {
} }
} }
}) })
console.log(dataTable) // console.log(dataTable)
this.setState({ dataTable, loading: false, buttonError: true, editable: true }, () => { this.setState({ dataTable, loading: false, buttonError: true, editable: true }, () => {
// console.log(dataTable) // console.log(dataTable)
}) })
......
...@@ -595,7 +595,7 @@ export default class ReportItems extends Component { ...@@ -595,7 +595,7 @@ export default class ReportItems extends Component {
getData() { getData() {
this.setState({ loading: true }) this.setState({ loading: true })
api.create().getReportItems().then((response) => { api.create().getReportItems().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') {
......
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