Commit 2981e5e7 authored by d.arizona's avatar d.arizona

update

parent 8a0c59b0
...@@ -205,13 +205,13 @@ export default class SubHolding extends Component { ...@@ -205,13 +205,13 @@ export default class SubHolding extends Component {
let index = data.findIndex((val) => val.month_name == month) let index = data.findIndex((val) => val.month_name == month)
let listQuarter = [ let listQuarter = [
{name: 'Q1', value: '3'}, { name: 'Q1', value: '3' },
{name: 'Q2', value: '6'}, { name: 'Q2', value: '6' },
{name: 'Q3', value: '9'}, { name: 'Q3', value: '9' },
{name: 'Q4', value: '12'}, { name: 'Q4', value: '12' },
] ]
let listUom = [{value: 'Mio IDR'}] let listUom = [{ value: 'Mio IDR' }]
let defaultPropsQuarter = { let defaultPropsQuarter = {
options: listQuarter, options: listQuarter,
...@@ -268,7 +268,7 @@ export default class SubHolding extends Component { ...@@ -268,7 +268,7 @@ export default class SubHolding extends Component {
if (this.state.report.value === 2) { if (this.state.report.value === 2) {
response.data.data.map((item, index) => { response.data.data.map((item, index) => {
if (item.report_name === 'Balance Sheet') { if (item.report_name === 'Balance Sheet') {
this.setState({ revisionType: item.revision }, ()=> { this.setState({ revisionType: item.revision }, () => {
this.getSubmission() this.getSubmission()
}) })
} }
...@@ -276,7 +276,7 @@ export default class SubHolding extends Component { ...@@ -276,7 +276,7 @@ export default class SubHolding extends Component {
} else if (this.state.report.value === 1) { } else if (this.state.report.value === 1) {
response.data.data.map((item, index) => { response.data.data.map((item, index) => {
if (item.report_name === 'Profit Loss') { if (item.report_name === 'Profit Loss') {
this.setState({ revisionType: item.revision }, ()=> { this.setState({ revisionType: item.revision }, () => {
this.getSubmission() this.getSubmission()
}) })
} }
...@@ -284,13 +284,13 @@ export default class SubHolding extends Component { ...@@ -284,13 +284,13 @@ export default class SubHolding extends Component {
} else if (this.state.report.value === 5) { } else if (this.state.report.value === 5) {
response.data.data.map((item, index) => { response.data.data.map((item, index) => {
if (item.report_name === 'Tax Planning') { if (item.report_name === 'Tax Planning') {
this.setState({ revisionType: item.revision }, ()=> { this.setState({ revisionType: item.revision }, () => {
this.getSubmission() this.getSubmission()
}) })
} }
}) })
} else { } else {
this.setState({ revisionType: 0 }, ()=> { this.setState({ revisionType: 0 }, () => {
this.getSubmission() this.getSubmission()
}) })
} }
...@@ -946,7 +946,7 @@ export default class SubHolding extends Component { ...@@ -946,7 +946,7 @@ export default class SubHolding extends Component {
} else { } else {
OPID = null OPID = null
} }
this.setState({OPID}, () => { this.setState({ OPID }, () => {
let payloadOI = { let payloadOI = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
"operating_indicator_id": this.state.OPID, "operating_indicator_id": this.state.OPID,
...@@ -1080,7 +1080,7 @@ export default class SubHolding extends Component { ...@@ -1080,7 +1080,7 @@ export default class SubHolding extends Component {
}) })
} else if (this.state.report.value === 6) { } else if (this.state.report.value === 6) {
let dbSumaCF = [] let dbSumaCF = []
let paylodCF = {...payload, months: this.state.month.month_id} let paylodCF = { ...payload, months: this.state.month.month_id }
api.create().getReportCFSuma(paylodCF).then(response => { api.create().getReportCFSuma(paylodCF).then(response => {
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
...@@ -1089,41 +1089,41 @@ export default class SubHolding extends Component { ...@@ -1089,41 +1089,41 @@ export default class SubHolding extends Component {
const handlePushChild = (item) => { const handlePushChild = (item) => {
let indexIDzz = dbSumaCF.findIndex((val) => val[1] === item.id) let indexIDzz = dbSumaCF.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) { if (indexIDzz === -1) {
let mtd_actual = item.cash_flow.mtd_actual == ''? 0 : item.cash_flow.mtd_actual let mtd_actual = item.cash_flow.mtd_actual == '' ? 0 : item.cash_flow.mtd_actual
let mtd = item.cash_flow.mtd == ''? 0 : item.cash_flow.mtd let mtd = item.cash_flow.mtd == '' ? 0 : item.cash_flow.mtd
let persenMtd = Number(mtd_actual/mtd) let persenMtd = Number(mtd_actual / mtd)
let ytd_actual = item.cash_flow.ytd_actual == ''? 0 : item.cash_flow.ytd_actual let ytd_actual = item.cash_flow.ytd_actual == '' ? 0 : item.cash_flow.ytd_actual
let ytd = item.cash_flow.ytd == ''? 0 : item.cash_flow.ytd let ytd = item.cash_flow.ytd == '' ? 0 : item.cash_flow.ytd
let persenYtd = Number(ytd_actual/ytd) let persenYtd = Number(ytd_actual / ytd)
let quarter_actual = item.cash_flow.quarter_actual == ''? 0 : item.cash_flow.quarter_actual let quarter_actual = item.cash_flow.quarter_actual == '' ? 0 : item.cash_flow.quarter_actual
let quarter = item.cash_flow.quarter == ''? 0 : item.cash_flow.quarter let quarter = item.cash_flow.quarter == '' ? 0 : item.cash_flow.quarter
let persenQuarter = Number(quarter_actual/quarter) let persenQuarter = Number(quarter_actual / quarter)
let fy_actual = item.cash_flow.fy_actual == ''? 0 : item.cash_flow.fy_actual let fy_actual = item.cash_flow.fy_actual == '' ? 0 : item.cash_flow.fy_actual
let fy = item.cash_flow.fy == ''? 0 : item.cash_flow.fy let fy = item.cash_flow.fy == '' ? 0 : item.cash_flow.fy
let persenFy = Number(fy_actual/fy) let persenFy = Number(fy_actual / fy)
dbSumaCF.push([ dbSumaCF.push([
item.id, item.id,
item.cash_flow.mtd_actual, item.cash_flow.mtd_actual,
item.cash_flow.mtd, item.cash_flow.mtd,
isNaN(persenMtd) || persenMtd == 'Infinity' || persenMtd == '-Infinity'? (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0? -0 : 0) : (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0? persenMtd * -100 : persenMtd * 100), isNaN(persenMtd) || persenMtd == 'Infinity' || persenMtd == '-Infinity' ? (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0 ? -0 : 0) : (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0 ? persenMtd * -100 : persenMtd * 100),
item.cash_flow.mtd_last_year, item.cash_flow.mtd_last_year,
item.cash_flow.ytd_actual, item.cash_flow.ytd_actual,
item.cash_flow.ytd, item.cash_flow.ytd,
isNaN(persenYtd) || persenYtd == 'Infinity' || persenYtd == '-Infinity'? (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0? -0 : 0) : (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0? persenYtd * -100 : persenYtd * 100), isNaN(persenYtd) || persenYtd == 'Infinity' || persenYtd == '-Infinity' ? (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0 ? -0 : 0) : (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0 ? persenYtd * -100 : persenYtd * 100),
// isNaN(persenYtd)? 0 : persenYtd * 100, // isNaN(persenYtd)? 0 : persenYtd * 100,
item.cash_flow.ytd_last_year, item.cash_flow.ytd_last_year,
item.cash_flow.quarter_actual, item.cash_flow.quarter_actual,
item.cash_flow.quarter, item.cash_flow.quarter,
isNaN(persenQuarter) || persenQuarter == 'Infinity' || persenQuarter == '-Infinity'? (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0? -0 : 0) : (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0? persenQuarter * -100 : persenQuarter * 100), isNaN(persenQuarter) || persenQuarter == 'Infinity' || persenQuarter == '-Infinity' ? (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0 ? -0 : 0) : (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0 ? persenQuarter * -100 : persenQuarter * 100),
// isNaN(persenQuarter)? 0 : persenQuarter * 100, // isNaN(persenQuarter)? 0 : persenQuarter * 100,
item.cash_flow.quarter_last_year, item.cash_flow.quarter_last_year,
item.cash_flow.fy_actual, item.cash_flow.fy_actual,
item.cash_flow.fy, item.cash_flow.fy,
isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity'? (item.cash_flow.fy == '' || item.cash_flow.fy == 0? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0? persenFy * -100 : persenFy * 100), isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity' ? (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? persenFy * -100 : persenFy * 100),
// isNaN(persenFy)? 0 : persenFy * 100, // isNaN(persenFy)? 0 : persenFy * 100,
item.cash_flow.fy_last_year, item.cash_flow.fy_last_year,
]) ])
...@@ -1136,42 +1136,42 @@ export default class SubHolding extends Component { ...@@ -1136,42 +1136,42 @@ export default class SubHolding extends Component {
} }
} }
} }
res.map((item,index) => { res.map((item, index) => {
let mtd_actual = item.cash_flow.mtd_actual == ''? 0 : item.cash_flow.mtd_actual let mtd_actual = item.cash_flow.mtd_actual == '' ? 0 : item.cash_flow.mtd_actual
let mtd = item.cash_flow.mtd == ''? 0 : item.cash_flow.mtd let mtd = item.cash_flow.mtd == '' ? 0 : item.cash_flow.mtd
let persenMtd = Number(mtd_actual/mtd) let persenMtd = Number(mtd_actual / mtd)
console.log(persenMtd) console.log(persenMtd)
let ytd_actual = item.cash_flow.ytd_actual == ''? 0 : item.cash_flow.ytd_actual let ytd_actual = item.cash_flow.ytd_actual == '' ? 0 : item.cash_flow.ytd_actual
let ytd = item.cash_flow.ytd == ''? 0 : item.cash_flow.ytd let ytd = item.cash_flow.ytd == '' ? 0 : item.cash_flow.ytd
let persenYtd = Number(ytd_actual/ytd) let persenYtd = Number(ytd_actual / ytd)
let quarter_actual = item.cash_flow.quarter_actual == ''? 0 : item.cash_flow.quarter_actual let quarter_actual = item.cash_flow.quarter_actual == '' ? 0 : item.cash_flow.quarter_actual
let quarter = item.cash_flow.quarter == ''? 0 : item.cash_flow.quarter let quarter = item.cash_flow.quarter == '' ? 0 : item.cash_flow.quarter
let persenQuarter = Number(quarter_actual/quarter) let persenQuarter = Number(quarter_actual / quarter)
let fy_actual = item.cash_flow.fy_actual == ''? 0 : item.cash_flow.fy_actual let fy_actual = item.cash_flow.fy_actual == '' ? 0 : item.cash_flow.fy_actual
let fy = item.cash_flow.fy == ''? 0 : item.cash_flow.fy let fy = item.cash_flow.fy == '' ? 0 : item.cash_flow.fy
let persenFy = Number(fy_actual/fy) let persenFy = Number(fy_actual / fy)
dbSumaCF.push([ dbSumaCF.push([
item.id, item.id,
item.cash_flow.mtd_actual, item.cash_flow.mtd_actual,
item.cash_flow.mtd, item.cash_flow.mtd,
isNaN(persenMtd) || persenMtd == 'Infinity' || persenMtd == '-Infinity'? (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0? -0 : 0) : (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0? persenMtd * -100 : persenMtd * 100), isNaN(persenMtd) || persenMtd == 'Infinity' || persenMtd == '-Infinity' ? (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0 ? -0 : 0) : (item.cash_flow.mtd == '' || item.cash_flow.mtd == 0 ? persenMtd * -100 : persenMtd * 100),
item.cash_flow.mtd_last_year, item.cash_flow.mtd_last_year,
item.cash_flow.ytd_actual, item.cash_flow.ytd_actual,
item.cash_flow.ytd, item.cash_flow.ytd,
isNaN(persenYtd) || persenYtd == 'Infinity' || persenYtd == '-Infinity'? (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0? -0 : 0) : (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0? persenYtd * -100 : persenYtd * 100), isNaN(persenYtd) || persenYtd == 'Infinity' || persenYtd == '-Infinity' ? (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0 ? -0 : 0) : (item.cash_flow.ytd == '' || item.cash_flow.ytd == 0 ? persenYtd * -100 : persenYtd * 100),
// isNaN(persenYtd)? 0 : persenYtd * 100, // isNaN(persenYtd)? 0 : persenYtd * 100,
item.cash_flow.ytd_last_year, item.cash_flow.ytd_last_year,
item.cash_flow.quarter_actual, item.cash_flow.quarter_actual,
item.cash_flow.quarter, item.cash_flow.quarter,
isNaN(persenQuarter) || persenQuarter == 'Infinity' || persenQuarter == '-Infinity'? (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0? -0 : 0) : (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0? persenQuarter * -100 : persenQuarter * 100), isNaN(persenQuarter) || persenQuarter == 'Infinity' || persenQuarter == '-Infinity' ? (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0 ? -0 : 0) : (item.cash_flow.quarter == '' || item.cash_flow.quarter == 0 ? persenQuarter * -100 : persenQuarter * 100),
// isNaN(persenQuarter)? 0 : persenQuarter * 100, // isNaN(persenQuarter)? 0 : persenQuarter * 100,
item.cash_flow.quarter_last_year, item.cash_flow.quarter_last_year,
item.cash_flow.fy_actual, item.cash_flow.fy_actual,
item.cash_flow.fy, item.cash_flow.fy,
isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity'? (item.cash_flow.fy == '' || item.cash_flow.fy == 0? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0? persenFy * -100 : persenFy * 100), isNaN(persenFy) || persenFy == 'Infinity' || persenFy == '-Infinity' ? (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? -0 : 0) : (item.cash_flow.fy == '' || item.cash_flow.fy == 0 ? persenFy * -100 : persenFy * 100),
// isNaN(persenFy)? 0 : persenFy * 100, // isNaN(persenFy)? 0 : persenFy * 100,
item.cash_flow.fy_last_year, item.cash_flow.fy_last_year,
]) ])
...@@ -1184,7 +1184,7 @@ export default class SubHolding extends Component { ...@@ -1184,7 +1184,7 @@ export default class SubHolding extends Component {
} }
}) })
console.log(dbSumaCF) console.log(dbSumaCF)
this.setState({dbSumaCF}, () => { this.setState({ dbSumaCF }, () => {
api.create().getReportCFSumaMB(payload).then(response => { api.create().getReportCFSumaMB(payload).then(response => {
// console.log(payload); // console.log(payload);
console.log(response); console.log(response);
...@@ -1477,7 +1477,7 @@ export default class SubHolding extends Component { ...@@ -1477,7 +1477,7 @@ export default class SubHolding extends Component {
this.setState({ previewTable: true, loading: false, previewDownload: false }) this.setState({ previewTable: true, loading: false, previewDownload: false })
}) })
} else if (this.state.report.value === 9) { } else if (this.state.report.value === 9) {
let paylodFR = {...payload, months: this.state.month.month_id} let paylodFR = { ...payload, months: this.state.month.month_id }
api.create().getReportFRMB(paylodFR).then(response => { api.create().getReportFRMB(paylodFR).then(response => {
console.log(payload); console.log(payload);
console.log(response); console.log(response);
...@@ -1609,7 +1609,7 @@ export default class SubHolding extends Component { ...@@ -1609,7 +1609,7 @@ export default class SubHolding extends Component {
} }
getCFSumaMR(payload, dbSumaCF) { getCFSumaMR(payload, dbSumaCF) {
let payloadLast = {...payload, "periode": Number(this.state.periode.periode) - 1} let payloadLast = { ...payload, "periode": Number(this.state.periode.periode) - 1 }
// let payloadLast = { // let payloadLast = {
// "report_id": this.state.report.value, // "report_id": this.state.report.value,
// "revision": this.state.revisionType, // "revision": this.state.revisionType,
...@@ -1625,7 +1625,7 @@ export default class SubHolding extends Component { ...@@ -1625,7 +1625,7 @@ export default class SubHolding extends Component {
let dataTable2 = [] let dataTable2 = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
res.map((item,index) => { res.map((item, index) => {
let indexID = dataTable.findIndex((val) => val[1] == item.id) let indexID = dataTable.findIndex((val) => val[1] == item.id)
if (indexID != -1) { if (indexID != -1) {
const handlePushChild = (items) => { const handlePushChild = (items) => {
...@@ -1702,7 +1702,7 @@ export default class SubHolding extends Component { ...@@ -1702,7 +1702,7 @@ export default class SubHolding extends Component {
let dataTable3 = [] let dataTable3 = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
res.map((item,index) => { res.map((item, index) => {
let indexID = dataTable2.findIndex((val) => val[1] == item.id) let indexID = dataTable2.findIndex((val) => val[1] == item.id)
let indexIDSuma = dbSumaCF.findIndex((val) => val[0] == item.id) let indexIDSuma = dbSumaCF.findIndex((val) => val[0] == item.id)
if (indexID != -1) { if (indexID != -1) {
...@@ -1779,7 +1779,7 @@ export default class SubHolding extends Component { ...@@ -1779,7 +1779,7 @@ export default class SubHolding extends Component {
let dataTable2 = [] let dataTable2 = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
res.map((item,index) => { res.map((item, index) => {
let indexID = dataTable.findIndex((val) => val[4] == item.id) let indexID = dataTable.findIndex((val) => val[4] == item.id)
console.log(indexID) console.log(indexID)
if (indexID != -1) { if (indexID != -1) {
...@@ -1866,7 +1866,7 @@ export default class SubHolding extends Component { ...@@ -1866,7 +1866,7 @@ export default class SubHolding extends Component {
let dataTable2 = [] let dataTable2 = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
res.map((item,index) => { res.map((item, index) => {
let indexID = dataTable.findIndex((val) => val[1] == item.id) let indexID = dataTable.findIndex((val) => val[1] == item.id)
if (indexID != -1) { if (indexID != -1) {
const handlePushChild = (items) => { const handlePushChild = (items) => {
...@@ -1945,7 +1945,7 @@ export default class SubHolding extends Component { ...@@ -1945,7 +1945,7 @@ export default class SubHolding extends Component {
let dataTable3 = [] let dataTable3 = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
res.map((item,index) => { res.map((item, index) => {
let indexID = dataTable2.findIndex((val) => val[1] == item.id) let indexID = dataTable2.findIndex((val) => val[1] == item.id)
if (indexID != -1) { if (indexID != -1) {
const handlePushChild = (items) => { const handlePushChild = (items) => {
...@@ -2026,7 +2026,7 @@ export default class SubHolding extends Component { ...@@ -2026,7 +2026,7 @@ export default class SubHolding extends Component {
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let res = response.data.data let res = response.data.data
res.map((item,index) => { res.map((item, index) => {
let indexID = dataTable.findIndex((val) => val[1] == item.id) let indexID = dataTable.findIndex((val) => val[1] == item.id)
if (indexID != -1) { if (indexID != -1) {
const handlePushChild = (items) => { const handlePushChild = (items) => {
...@@ -2114,7 +2114,7 @@ export default class SubHolding extends Component { ...@@ -2114,7 +2114,7 @@ export default class SubHolding extends Component {
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
let res = response.data.data let res = response.data.data
res.map((item,index) => { res.map((item, index) => {
let indexID = dataTable2.findIndex((val) => val[1] == item.id) let indexID = dataTable2.findIndex((val) => val[1] == item.id)
if (indexID != -1) { if (indexID != -1) {
const handlePushChild = (items) => { const handlePushChild = (items) => {
...@@ -2283,7 +2283,7 @@ export default class SubHolding extends Component { ...@@ -2283,7 +2283,7 @@ export default class SubHolding extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Sub Holding</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Sub Holding</Typography>
</div> </div>
<div style={{ minWidth: 'max-content', padding: '20px 20px 0px 20px' }}> <div style={{ minWidth: 'max-content', padding: '20px 20px 0px 20px' }}>
<div style={{ marginTop: 15, display: 'flex'}}> <div style={{ marginTop: 15, display: 'flex' }}>
<Autocomplete <Autocomplete
options={this.state.reportType} options={this.state.reportType}
getOptionLabel={(option) => titleCase(option.label)} getOptionLabel={(option) => titleCase(option.label)}
...@@ -2296,7 +2296,7 @@ export default class SubHolding extends Component { ...@@ -2296,7 +2296,7 @@ export default class SubHolding extends Component {
renderInput={(params) => <TextField {...params} label="Report Type" margin="normal" style={{ marginTop: 7 }} />} renderInput={(params) => <TextField {...params} label="Report Type" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.report} value={this.state.report}
/> />
{this.state.report != null? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete {this.state.report != null ? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete
{...this.state.listMonths} {...this.state.listMonths}
// getOptionLabel={(option) => titleCase(option.label)} // getOptionLabel={(option) => titleCase(option.label)}
id="months" id="months"
...@@ -2322,7 +2322,7 @@ export default class SubHolding extends Component { ...@@ -2322,7 +2322,7 @@ export default class SubHolding extends Component {
renderInput={(params) => <TextField {...params} label="Company" margin="normal" style={{ marginTop: 7 }} />} renderInput={(params) => <TextField {...params} label="Company" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.company} value={this.state.company}
/> />
{this.state.report != null? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete {this.state.report != null ? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete
{...this.state.listQuarter} {...this.state.listQuarter}
// getOptionLabel={(option) => titleCase(option.label)} // getOptionLabel={(option) => titleCase(option.label)}
id="quarter" id="quarter"
...@@ -2335,7 +2335,7 @@ export default class SubHolding extends Component { ...@@ -2335,7 +2335,7 @@ export default class SubHolding extends Component {
value={this.state.quarter} value={this.state.quarter}
/> : null : null} /> : null : null}
</div> </div>
<div style={{ marginTop: 15, display: 'flex'}}> <div style={{ marginTop: 15, display: 'flex' }}>
<Autocomplete <Autocomplete
{...this.state.listPeriode} {...this.state.listPeriode}
id="periode" id="periode"
...@@ -2350,7 +2350,7 @@ export default class SubHolding extends Component { ...@@ -2350,7 +2350,7 @@ export default class SubHolding extends Component {
/>} />}
value={this.state.periode} value={this.state.periode}
/> />
{this.state.report != null? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete {this.state.report != null ? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete
{...this.state.listUom} {...this.state.listUom}
// getOptionLabel={(option) => titleCase(option.label)} // getOptionLabel={(option) => titleCase(option.label)}
id="uom" id="uom"
...@@ -2358,7 +2358,7 @@ export default class SubHolding extends Component { ...@@ -2358,7 +2358,7 @@ export default class SubHolding extends Component {
this.getReportType() this.getReportType()
})} })}
disableClearable disableClearable
style={{ width: 250, marginLeft: 10}} style={{ width: 250, marginLeft: 10 }}
renderInput={(params) => <TextField {...params} label="Uom" margin="normal" style={{ marginTop: 7 }} />} renderInput={(params) => <TextField {...params} label="Uom" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.uom} value={this.state.uom}
/> : null : null} /> : null : null}
......
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