Commit 6f85f133 authored by d.arizona's avatar d.arizona

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

parents fdd589a3 d1d278d9
...@@ -260,6 +260,12 @@ const create = (type = "") => { ...@@ -260,6 +260,12 @@ const create = (type = "") => {
const getRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/get_report_hierarki', body) const getRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/get_report_hierarki', body)
const createRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/store_ro_tax_planning', body) const createRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/store_ro_tax_planning', body)
const getSubmitRollingOutlook = (body) => api.post('transaction/rolling_outlook/get_latest_periode_submit', body) const getSubmitRollingOutlook = (body) => api.post('transaction/rolling_outlook/get_latest_periode_submit', body)
const getRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_operating_indicator_id', body)
const getHierarkiRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_report_hierarki', body)
const createRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/create_rolling_outlook', body)
const getLastestUpdateROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_latest_update', body)
//REPORT NEW //REPORT NEW
const getAllReportBS = (body) => api.post('/transaction/db_balance_sheet/get_report_hierarki', body) const getAllReportBS = (body) => api.post('/transaction/db_balance_sheet/get_report_hierarki', body)
...@@ -735,7 +741,11 @@ const create = (type = "") => { ...@@ -735,7 +741,11 @@ const create = (type = "") => {
createRollingOutlookPL, createRollingOutlookPL,
checkImportRollingOutlookPL, checkImportRollingOutlookPL,
importRollingOutlookPL, importRollingOutlookPL,
getSubmitRollingOutlook getSubmitRollingOutlook,
getRollingOI,
getHierarkiRollingOI,
createRollingOI,
getLastestUpdateROOI
} }
} }
......
...@@ -80,7 +80,7 @@ export default class OperatingIndicator extends Component { ...@@ -80,7 +80,7 @@ export default class OperatingIndicator extends Component {
} }
getLastPeriod() { getLastPeriod() {
api.create().getLastPeriodOI(this.state.company.company_id).then(response => { api.create().getLastPeriodOI(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 }, () => {
...@@ -190,7 +190,7 @@ export default class OperatingIndicator extends Component { ...@@ -190,7 +190,7 @@ export default class OperatingIndicator extends Component {
}) })
if (arrayBaru.length > 0) { if (arrayBaru.length > 0) {
arrayBaru = arrayBaru.sort((a,b) => a.company_name.localeCompare(b.company_name)) arrayBaru = arrayBaru.sort((a, b) => a.company_name.localeCompare(b.company_name))
} }
let defaultProps = { let defaultProps = {
...@@ -315,22 +315,22 @@ export default class OperatingIndicator extends Component { ...@@ -315,22 +315,22 @@ export default class OperatingIndicator extends Component {
visibleDetailOpt: true, visibleDetailOpt: true,
visibleDetailMonthly: false, visibleDetailMonthly: false,
visibleDetailRolling: false visibleDetailRolling: false
}) })
} else if (String(item[1]).toLocaleLowerCase().includes("monthly report")) { } else if (String(item[1]).toLocaleLowerCase().includes("monthly report")) {
console.log(item); console.log(item);
let month = String(item[1]).toLocaleLowerCase().includes('jan') ? 1 : let month = String(item[1]).toLocaleLowerCase().includes('jan') ? 1 :
String(item[1]).toLocaleLowerCase().includes('feb') ? 2 : String(item[1]).toLocaleLowerCase().includes('feb') ? 2 :
String(item[1]).toLocaleLowerCase().includes('mar') ? 3 : String(item[1]).toLocaleLowerCase().includes('mar') ? 3 :
String(item[1]).toLocaleLowerCase().includes('apr') ? 4 : String(item[1]).toLocaleLowerCase().includes('apr') ? 4 :
String(item[1]).toLocaleLowerCase().includes('may') ? 5 : String(item[1]).toLocaleLowerCase().includes('may') ? 5 :
String(item[1]).toLocaleLowerCase().includes('jun') ? 6 : String(item[1]).toLocaleLowerCase().includes('jun') ? 6 :
String(item[1]).toLocaleLowerCase().includes('jul') ? 7 : String(item[1]).toLocaleLowerCase().includes('jul') ? 7 :
String(item[1]).toLocaleLowerCase().includes('aug') ? 8 : String(item[1]).toLocaleLowerCase().includes('aug') ? 8 :
String(item[1]).toLocaleLowerCase().includes('sep') ? 9 : String(item[1]).toLocaleLowerCase().includes('sep') ? 9 :
String(item[1]).toLocaleLowerCase().includes('oct') ? 10 : String(item[1]).toLocaleLowerCase().includes('oct') ? 10 :
String(item[1]).toLocaleLowerCase().includes('nov') ? 11 : String(item[1]).toLocaleLowerCase().includes('nov') ? 11 :
String(item[1]).toLocaleLowerCase().includes('dec') ? 12 : null String(item[1]).toLocaleLowerCase().includes('dec') ? 12 : null
this.setState({ this.setState({
statusDetail: String(item[2]).toLocaleLowerCase(), statusDetail: String(item[2]).toLocaleLowerCase(),
dataDetail: { ...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company }, dataDetail: { ...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company },
...@@ -339,18 +339,22 @@ export default class OperatingIndicator extends Component { ...@@ -339,18 +339,22 @@ export default class OperatingIndicator extends Component {
visibleDetailMonthly: true, visibleDetailMonthly: true,
visibleDetailRolling: false, visibleDetailRolling: false,
months: month months: month
}) })
} else if (String(item[1]).toLocaleLowerCase().includes("rolling outlook")) { } else if (String(item[1]).toLocaleLowerCase().includes("rolling outlook")) {
let quarter =String(item[1]).toLocaleLowerCase().includes('q1') ? "q1" :
String(item[1]).toLocaleLowerCase().includes('q2') ? "q2" :
String(item[1]).toLocaleLowerCase().includes('q3') ? "q3" : null
this.setState({ this.setState({
statusDetail: String(item[2]).toLocaleLowerCase(), statusDetail: String(item[2]).toLocaleLowerCase(),
dataDetail: { ...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company }, dataDetail: { ...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company },
visibleOperatingIndicator: false, visibleOperatingIndicator: false,
visibleDetailOpt: false, visibleDetailOpt: false,
visibleDetailMonthly: false, visibleDetailMonthly: false,
visibleDetailRolling: true visibleDetailRolling: true,
quartal: quarter
}) })
} else { } else {
this.setState({ this.setState({
...@@ -360,7 +364,7 @@ export default class OperatingIndicator extends Component { ...@@ -360,7 +364,7 @@ export default class OperatingIndicator extends Component {
visibleDetailOpt: false, visibleDetailOpt: false,
visibleDetailMonthly: false, visibleDetailMonthly: false,
visibleDetailRolling: true visibleDetailRolling: true
}) })
} }
...@@ -421,7 +425,7 @@ export default class OperatingIndicator extends Component { ...@@ -421,7 +425,7 @@ export default class OperatingIndicator extends Component {
} }
saveRollingOI(payload) { saveRollingOI(payload) {
api.create().createMonthlyReportOI(payload).then((response) => { api.create().createRollingOI(payload).then((response) => {
console.log(response); console.log(response);
this.getReport() this.getReport()
this.getOperatingID() this.getOperatingID()
...@@ -504,10 +508,10 @@ export default class OperatingIndicator extends Component { ...@@ -504,10 +508,10 @@ export default class OperatingIndicator extends Component {
borderColor: 'transparent' borderColor: 'transparent'
}} }}
onClick={() => onClick={() =>
tableMeta.rowData[4] ? // tableMeta.rowData[4] ?
this.clickDetail(tableMeta.rowData, tableMeta.rowData[1], tableMeta.rowData[3], tableMeta.rowData[2]) this.clickDetail(tableMeta.rowData, tableMeta.rowData[1], tableMeta.rowData[3], tableMeta.rowData[2])
: // :
null // null
} }
> >
<Typography style={{ color: tableMeta.rowData[4] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography> <Typography style={{ color: tableMeta.rowData[4] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
...@@ -640,7 +644,7 @@ export default class OperatingIndicator extends Component { ...@@ -640,7 +644,7 @@ export default class OperatingIndicator extends Component {
})} })}
getReport={() => this.getOperatingID()} getReport={() => this.getOperatingID()}
saveOperatingInd={this.saveOperatingInd.bind(this)} saveOperatingInd={this.saveOperatingInd.bind(this)}
isSubmit={this.state.statusDetail == 'closed'? false : this.state.isSubmit} isSubmit={this.state.statusDetail == 'closed' ? false : this.state.isSubmit}
permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }} permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }}
/> />
} }
...@@ -658,7 +662,7 @@ export default class OperatingIndicator extends Component { ...@@ -658,7 +662,7 @@ export default class OperatingIndicator extends Component {
})} })}
getReport={() => this.getOperatingID()} getReport={() => this.getOperatingID()}
saveMonthlyOI={this.saveMonthlyOI.bind(this)} saveMonthlyOI={this.saveMonthlyOI.bind(this)}
isSubmit={this.state.statusDetail == 'closed'? false : this.state.isSubmit} isSubmit={this.state.statusDetail == 'closed' ? false : this.state.isSubmit}
permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }} permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }}
/> />
} }
...@@ -669,7 +673,7 @@ export default class OperatingIndicator extends Component { ...@@ -669,7 +673,7 @@ export default class OperatingIndicator extends Component {
data={this.state.dataDetail} data={this.state.dataDetail}
height={this.props.height} height={this.props.height}
width={this.props.width} width={this.props.width}
months={this.state.months} quartal={this.state.quartal}
company={this.state.company} company={this.state.company}
onClickClose={() => this.setState({ visibleDetailRolling: false, visibleOperatingIndicator: true }, () => { onClickClose={() => this.setState({ visibleDetailRolling: false, visibleOperatingIndicator: true }, () => {
this.getOperatingID() this.getOperatingID()
...@@ -677,7 +681,7 @@ export default class OperatingIndicator extends Component { ...@@ -677,7 +681,7 @@ export default class OperatingIndicator extends Component {
})} })}
getReport={() => this.getOperatingID()} getReport={() => this.getOperatingID()}
saveRollingOI={this.saveRollingOI.bind(this)} saveRollingOI={this.saveRollingOI.bind(this)}
isSubmit={this.state.statusDetail == 'closed'? false : this.state.isSubmit} isSubmit={this.state.statusDetail == 'closed' ? false : this.state.isSubmit}
permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }} permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }}
/> />
} }
......
...@@ -51,17 +51,19 @@ export default class BalanceSheetOLPA extends Component { ...@@ -51,17 +51,19 @@ export default class BalanceSheetOLPA extends Component {
updateBy: '-', updateBy: '-',
handleTekTekTek: 0, handleTekTekTek: 0,
viewOnly: true, viewOnly: true,
get_for: 'view' get_for: 'view',
minValue: "0",
maxValue: "0",
kansas: 0
} }
this.handleValue = this.handleValue.bind(this) this.handleValue = this.handleValue.bind(this)
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
componentDidMount() { componentDidMount() {
this.getItemHierarki()
this.getLatestUpdate() this.getLatestUpdate()
this.handleViewOnly() this.handleViewOnly()
// console.log(this.props); this.getSettingControl()
} }
handleViewOnly() { handleViewOnly() {
...@@ -100,8 +102,40 @@ export default class BalanceSheetOLPA extends Component { ...@@ -100,8 +102,40 @@ export default class BalanceSheetOLPA extends Component {
handleGetFor(type) { handleGetFor(type) {
this.setState({ get_for: type }, () => { this.setState({ get_for: type }, () => {
this.getLatestUpdate() this.getLatestUpdate()
this.getItemHierarki() this.getSettingControl()
// this.getSettingControl() })
}
getSettingControl() {
let body = {
group: 'THRESHOLD_CONTROL',
company_id: this.props.company.company_id,
type: 'BALANCE_SHEET'
}
api.create().getAllSettingByType(body).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === 'success') {
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()
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
}) })
} }
...@@ -225,9 +259,9 @@ export default class BalanceSheetOLPA extends Component { ...@@ -225,9 +259,9 @@ export default class BalanceSheetOLPA 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, saveDraft: true })
} else { } else {
this.setState({ dataTable, loading: false, buttonError: true, editable: true }) this.setState({ dataTable, loading: false, buttonError: true, editable: true, saveDraft: true })
} }
} }
...@@ -470,8 +504,21 @@ export default class BalanceSheetOLPA extends Component { ...@@ -470,8 +504,21 @@ export default class BalanceSheetOLPA extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
let err = false
let dataTable = this.state.dataTable
let kansas = this.state.kansas
// console.log(this.state.dataTable) // console.log(this.state.dataTable)
this.state.dataTable.map(i => { dataTable.map((i, index) => {
if (String(i[5]) == "Control (should be nil)") {
if ( Number(i[17]) < this.state.minValue || Number(i[17]) > this.state.maxValue ) {
err = true
} else if (Number(i[18]) < this.state.minValue || Number(i[18]) > this.state.maxValue) {
err = true
} else if (Number(i[19]) < this.state.minValue || Number(i[19]) > this.state.maxValue) {
err = true
}
}
data.push({ data.push({
item_report_id: i[1], item_report_id: i[1],
total_actual_before: String(i[6]), total_actual_before: String(i[6]),
...@@ -501,10 +548,41 @@ export default class BalanceSheetOLPA extends Component { ...@@ -501,10 +548,41 @@ export default class BalanceSheetOLPA extends Component {
} }
api.create().validateSubmitReportOLPA(payload).then((response) => { api.create().validateSubmitReportOLPA(payload).then((response) => {
// console.log(response) // console.log(response)
if (response.data.data.result) { // console.log(response.data.data.result)
this.setState({ loading: false, buttonError: false, editable: false }) // console.log(err);
if (response.data) {
if (response.data.status === "success") {
if (response.data.data.result && err === false) {
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
if (kansas == 0) {
this.setState({kansas: 1, loading: true}, () => {
this.handleValidate()
})
} else {
this.setState({kansas: 0})
}
} else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: true })
if (kansas == 0) {
this.setState({kansas: 1, loading: true}, () => {
this.handleValidate()
})
} else {
this.setState({kansas: 0})
}
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else { } else {
this.setState({ loading: false, buttonError: true, editable: true }) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
} }
}) })
} }
...@@ -1316,27 +1394,6 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1316,27 +1394,6 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValue(tableMeta)).toFixed(1)} value={Number(handleValue(tableMeta)).toFixed(1)}
/> />
</span> </span>
// <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}
// // disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 4 ?
null null
...@@ -1350,26 +1407,6 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1350,26 +1407,6 @@ export default class BalanceSheetOLPA extends Component {
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> />
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
<NumberFormat <NumberFormat
...@@ -1380,32 +1417,12 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1380,32 +1417,12 @@ export default class BalanceSheetOLPA extends Component {
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> />
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ? (Number(handleValidation(value, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(value, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1414,70 +1431,31 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1414,70 +1431,31 @@ export default class BalanceSheetOLPA extends Component {
borderColor: 'transparent', borderColor: 'transparent',
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent'
color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)} value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[22] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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 <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
fontSize: 12, fontSize: 12,
textAlign: 'right', textAlign: 'right',
borderColor: 'transparent', borderColor: 'transparent',
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'red'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)} value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> />
</LightTooltip> : </LightTooltip>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip>
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
null null
} }
...@@ -1542,27 +1520,6 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1542,27 +1520,6 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValue(tableMeta)).toFixed(1)} value={Number(handleValue(tableMeta)).toFixed(1)}
/> />
</span> </span>
// <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}
// // disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 4 ?
null null
...@@ -1576,26 +1533,6 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1576,26 +1533,6 @@ export default class BalanceSheetOLPA extends Component {
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> />
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
<NumberFormat <NumberFormat
...@@ -1606,32 +1543,12 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1606,32 +1543,12 @@ export default class BalanceSheetOLPA extends Component {
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> />
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ? (Number(handleValidation(value, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(value, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1640,70 +1557,31 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1640,70 +1557,31 @@ export default class BalanceSheetOLPA extends Component {
borderColor: 'transparent', borderColor: 'transparent',
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent'
color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)} value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[22] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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 <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
fontSize: 12, fontSize: 12,
textAlign: 'right', textAlign: 'right',
borderColor: 'transparent', borderColor: 'transparent',
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'red'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)} value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> />
</LightTooltip> : </LightTooltip>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip>
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
null null
} }
...@@ -1768,27 +1646,6 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1768,27 +1646,6 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValue(tableMeta)).toFixed(1)} value={Number(handleValue(tableMeta)).toFixed(1)}
/> />
</span> </span>
// <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}
// // disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 4 ?
null null
...@@ -1803,26 +1660,6 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1803,26 +1660,6 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)} // value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/> />
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
<NumberFormat <NumberFormat
...@@ -1834,42 +1671,12 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1834,42 +1671,12 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValueFormula(value, tableMeta)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)} // value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/> />
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
// value === "" ?
// null :
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(value)}
// />
null null
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ? (Number(handleValidation(value, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(value, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1878,70 +1685,31 @@ export default class BalanceSheetOLPA extends Component { ...@@ -1878,70 +1685,31 @@ export default class BalanceSheetOLPA extends Component {
borderColor: 'transparent', borderColor: 'transparent',
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent'
color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)} value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[22] === "STOPPER" ? /> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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 <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
fontSize: 12, fontSize: 12,
textAlign: 'right', textAlign: 'right',
borderColor: 'transparent', borderColor: 'transparent',
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'red'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)} value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> />
</LightTooltip> : </LightTooltip>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip>
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
: :
null null
} }
...@@ -2143,7 +1911,7 @@ export default class BalanceSheetOLPA extends Component { ...@@ -2143,7 +1911,7 @@ export default class BalanceSheetOLPA extends Component {
marginRight: 20 marginRight: 20
}} }}
onClick={() => { onClick={() => {
this.setState({ loading: true, dataTable: dataTable2, buttonDraft: false }, () => { this.setState({ loading: true, dataTable: dataTable2 }, () => {
setTimeout(() => { setTimeout(() => {
this.handleValidate() this.handleValidate()
}, 100); }, 100);
...@@ -2164,12 +1932,14 @@ export default class BalanceSheetOLPA extends Component { ...@@ -2164,12 +1932,14 @@ export default class BalanceSheetOLPA extends Component {
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
disabled={this.state.buttonDraft}
onClick={() => onClick={() =>
this.state.handleTekTekTek == 1 ? null : this.state.saveDraft ?
this.setState({ handleTekTekTek: 1 }, () => { this.setState({ alert: true, messageAlert: 'Data Incomplete !', tipeAlert: 'error' })
this.backToOLPA('draft') :
}) this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.backToOLPA('draft')
})
} }
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
......
...@@ -574,12 +574,12 @@ export default class TaxPlanningOLPA extends Component { ...@@ -574,12 +574,12 @@ export default class TaxPlanningOLPA 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[25].length > 0) { if (item[25].length > 0) {
// console.log('masuk') console.log('masuk')
// this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true, editable: true })
// } }
// }) })
console.log(this.state.dataTable); console.log(this.state.dataTable);
}) })
} }
......
...@@ -546,6 +546,7 @@ export default class RollingOutlook extends Component { ...@@ -546,6 +546,7 @@ export default class RollingOutlook extends Component {
formData.append("revision", Number(this.state.revision.revision)); formData.append("revision", Number(this.state.revision.revision));
formData.append("companyId", this.state.company.company_id); formData.append("companyId", this.state.company.company_id);
formData.append("periode", Number(this.state.periode.periode)); formData.append("periode", Number(this.state.periode.periode));
formData.append("quartal", this.state.quarter.value);
formData.append("file", event); formData.append("file", event);
this.setState({ formData }) this.setState({ formData })
} }
...@@ -553,7 +554,15 @@ export default class RollingOutlook extends Component { ...@@ -553,7 +554,15 @@ export default class RollingOutlook extends Component {
} }
uploadAttachment(formData) { uploadAttachment(formData) {
// var object = {};
// formData.forEach(function (value, key) {
// object[key] = value;
// });
// var json = JSON.stringify(object);
// console.log(object)
// console.log(json)
api.create().uploadAttachment(formData).then(response => { api.create().uploadAttachment(formData).then(response => {
console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ visibleUpload: false }, () => { this.setState({ visibleUpload: false }, () => {
...@@ -999,7 +1008,7 @@ export default class RollingOutlook extends Component { ...@@ -999,7 +1008,7 @@ export default class RollingOutlook extends Component {
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography> <Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div> </div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && ( {!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<button <button
style={{ style={{
...@@ -1045,7 +1054,7 @@ export default class RollingOutlook extends Component { ...@@ -1045,7 +1054,7 @@ export default class RollingOutlook extends Component {
: null : null
} }
</div> </div>
{!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' && this.state.lastStatus === 'REVISION') && ( {!this.state.isApprover && (this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && (
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
{this.state.listAttachment.length > 0 ? {this.state.listAttachment.length > 0 ?
this.state.listAttachment.map((item) => { this.state.listAttachment.map((item) => {
......
...@@ -1515,7 +1515,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1515,7 +1515,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1646,7 +1646,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1646,7 +1646,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1777,7 +1777,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1777,7 +1777,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1908,7 +1908,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1908,7 +1908,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2039,7 +2039,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2039,7 +2039,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2170,7 +2170,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2170,7 +2170,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1344,7 +1344,7 @@ export default class ProfitLossROO extends Component { ...@@ -1344,7 +1344,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1442,7 +1442,7 @@ export default class ProfitLossROO extends Component { ...@@ -1442,7 +1442,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1540,7 +1540,7 @@ export default class ProfitLossROO extends Component { ...@@ -1540,7 +1540,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? true : false} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1638,7 +1638,7 @@ export default class ProfitLossROO extends Component { ...@@ -1638,7 +1638,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1736,7 +1736,7 @@ export default class ProfitLossROO extends Component { ...@@ -1736,7 +1736,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1834,7 +1834,7 @@ export default class ProfitLossROO extends Component { ...@@ -1834,7 +1834,7 @@ export default class ProfitLossROO extends Component {
type="text" type="text"
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? true : false} disabled={this.props.quarter == 'q1' || this.props.quarter == 'q2'? false : true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
......
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