Commit cc099446 authored by d.arizona's avatar d.arizona

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

parents 8df349a2 7ff858c5
......@@ -427,7 +427,7 @@ export default class CashFlowMR extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.month.month_value} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
......
......@@ -71,7 +71,6 @@ export default class OperatingIndicatorMR extends Component {
// this.getItemHierarki()
this.getSettingControl()
this.getLatestUpdate()
// console.log(this.props.permission.create);
}
getLatestUpdate() {
......@@ -121,7 +120,7 @@ export default class OperatingIndicatorMR extends Component {
minValue: response.data.data[0] ? Number(response.data.data[0].min_value) : -5,
maxValue: response.data.data[0] ? Number(response.data.data[0].max_value) : 5,
}, () => {
this.getItemHierarki()
this.getOperatingIDMonthly()
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -139,10 +138,31 @@ export default class OperatingIndicatorMR extends Component {
})
}
getOperatingIDMonthly() {
let payload = {
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode.periode,
"months": this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null
}
api.create().getOpetratingIndID(payload).then(response => {
if (response) {
if (response.data.data) {
this.setState({ operatingIndIDMonthly: response.data.data.operating_indicator_id } , () => {
this.getItemHierarki()
})
} else {
this.setState({ operatingIndIDMonthly: null }, () => {
this.getItemHierarki()
})
}
}
})
}
getItemHierarki() {
this.setState({ loading: true })
let payload = {
"operating_indicator_id": this.props.data.operatingIndID,
"operating_indicator_id": this.state.operatingIndIDMonthly,
"report_id": this.props.data.report_id,
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode,
......@@ -324,7 +344,7 @@ export default class OperatingIndicatorMR extends Component {
monthly_report: payload
}
console.log(body)
this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0] })
this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
}
});
}
......@@ -545,11 +565,11 @@ export default class OperatingIndicatorMR extends Component {
let total = 0
if (dex === 1) {
// total = Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][8])
total = R.equals((Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][8])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][8])), Infinity) ? '0' : Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][8])
total = R.equals((Number(Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][8])) * 100 ), NaN) ? '0' : R.equals((Number(Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][8])) * 100 ), Infinity) ? '0' : Number(Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][8]) * 100)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
} else if (dex === 2) {
// total = Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][9])
total = R.equals((Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][9])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][9])), Infinity) ? '0' : Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][9])
total = R.equals((Number(Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][9])) * 100 ), NaN) ? '0' : R.equals((Number(Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][9])) * 100 ), Infinity) ? '0' : Number(Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][9])* 100)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
}
return total
......@@ -730,7 +750,7 @@ export default class OperatingIndicatorMR extends Component {
}
}
}, {
name: `Rolling Outlook (FY ${this.props.periode})`,
name: `Rolling Outlook (FY${this.props.data.periode})`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#07a7d0', width: 96, borderLeft: '1px #fff solid', borderRight: '1px #fff solid' }}>
......@@ -1354,18 +1374,18 @@ export default class OperatingIndicatorMR extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>
Period : {
this.props.data.report_id === 22 ? 'Jan' :
this.props.data.report_id === 23 ? 'Feb' :
this.props.data.report_id === 24 ? 'Mar' :
this.props.data.report_id === 25 ? 'Apr' :
this.props.data.report_id === 26 ? 'May' :
this.props.data.report_id === 27 ? 'Jun' :
this.props.data.report_id === 28 ? 'Jul' :
this.props.data.report_id === 29 ? 'Aug' :
this.props.data.report_id === 30 ? 'Sep' :
this.props.data.report_id === 31 ? 'Oct' :
this.props.data.report_id === 32 ? 'Nov' :
this.props.data.report_id === 33 ? 'Dec' : "" } {this.props.data.periode}
this.props.data.report_id === 22 ? 'JAN' :
this.props.data.report_id === 23 ? 'FEB' :
this.props.data.report_id === 24 ? 'MAR' :
this.props.data.report_id === 25 ? 'APR' :
this.props.data.report_id === 26 ? 'MAY' :
this.props.data.report_id === 27 ? 'JUN' :
this.props.data.report_id === 28 ? 'JUL' :
this.props.data.report_id === 29 ? 'AUG' :
this.props.data.report_id === 30 ? 'SEP' :
this.props.data.report_id === 31 ? 'OCT' :
this.props.data.report_id === 32 ? 'NOV' :
this.props.data.report_id === 33 ? 'DEC' : "" } {this.props.data.periode}
</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
......@@ -1487,7 +1507,13 @@ export default class OperatingIndicatorMR extends Component {
})}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.editable === true?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -1507,7 +1533,13 @@ export default class OperatingIndicatorMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.editable === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>}
......@@ -1521,18 +1553,18 @@ export default class OperatingIndicatorMR extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>
Period : {
this.props.data.report_id === 22 ? 'Jan' :
this.props.data.report_id === 23 ? 'Feb' :
this.props.data.report_id === 24 ? 'Mar' :
this.props.data.report_id === 25 ? 'Apr' :
this.props.data.report_id === 26 ? 'May' :
this.props.data.report_id === 27 ? 'Jun' :
this.props.data.report_id === 28 ? 'Jul' :
this.props.data.report_id === 29 ? 'Aug' :
this.props.data.report_id === 30 ? 'Sep' :
this.props.data.report_id === 31 ? 'Oct' :
this.props.data.report_id === 32 ? 'Nov' :
this.props.data.report_id === 33 ? 'Dec' : "" } {this.props.data.periode}
this.props.data.report_id === 22 ? 'JAN' :
this.props.data.report_id === 23 ? 'FEB' :
this.props.data.report_id === 24 ? 'MAR' :
this.props.data.report_id === 25 ? 'APR' :
this.props.data.report_id === 26 ? 'MAY' :
this.props.data.report_id === 27 ? 'JUN' :
this.props.data.report_id === 28 ? 'JUL' :
this.props.data.report_id === 29 ? 'AUG' :
this.props.data.report_id === 30 ? 'SEP' :
this.props.data.report_id === 31 ? 'OCT' :
this.props.data.report_id === 32 ? 'NOV' :
this.props.data.report_id === 33 ? 'DEC' : "" } {this.props.data.periode}
</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
......@@ -1549,7 +1581,7 @@ export default class OperatingIndicatorMR extends Component {
</div>
)}
</div>
<div className="grid grid-2x">
<div className="grid grid-2x" style={{ marginLeft: 10 }}>
<div className="col-1">
<button
className="button"
......@@ -1607,7 +1639,13 @@ export default class OperatingIndicatorMR extends Component {
})}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.editable === true?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -1630,7 +1668,13 @@ export default class OperatingIndicatorMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.editable === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>}
......@@ -1668,7 +1712,7 @@ export default class OperatingIndicatorMR extends Component {
this.setState({ uploadStatus: 'idle', percentage: '0' })
}}
onUpload={() => {
String(this.state.judul).includes("MONTHLY") && String(this.state.judul).includes("REPORT") && String(this.state.judul).includes("OPERATING") && String(this.state.judul).includes("INDICATOR") ?
String(this.state.judulColumn).includes("TEMPLATE") && String(this.state.judulColumn).includes("UPLOAD") && String(this.state.judul).includes("MONTHLY") && String(this.state.judul).includes("REPORT") && String(this.state.judul).includes("OPERATING") && String(this.state.judul).includes("INDICATOR") ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
}}
......
......@@ -255,9 +255,27 @@ export default class ProfitLossMR extends Component {
}
}
})
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true })
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, bebas: true })
}
console.log(dataTable);
let err = false
dataTable.map((item, index) => {
if (item[19] == "" && Number(item[14]) < this.state.minValue || Number(item[14]) > this.state.maxValue) {
err = true
}
if (item[20] == "" && Number(item[16]) < this.state.minValue || Number(item[16]) > this.state.maxValue) {
err = true
}
if (item[21] == "" && Number(item[18]) < this.state.minValue || Number(item[18]) > this.state.maxValue) {
err = true
}
})
if (err === true) {
this.setState({ bebas: true })
}
})
}
......@@ -524,17 +542,17 @@ export default class ProfitLossMR extends Component {
"mtd_vs_rb": i[21]
})
})
// console.log(JSON.stringify(data));
console.log(data);
data.map(i => {
if (i.mtd_vs_previous_month === "" && (Number(i.percent_act_vs_previous_month) < this.state.minValue || Number(i.percent_act_vs_previous_month) > this.state.maxValue)) {
console.log('msk 1');
console.log(i);
// console.log('msk 1');
// console.log(i);
err = true
} else if (i.mtd_vs_mb === "" && (Number(i.percent_act_vs_mb) < this.state.minValue || Number(i.percent_act_vs_mb) > this.state.maxValue)) {
console.log('msk 2');
// console.log('msk 2');
err = true
} else if (i.mtd_vs_rb === "" && (Number(i.percent_act_vs_rb) < this.state.minValue || Number(i.percent_act_vs_rb) > this.state.maxValue)) {
console.log('msk 3');
// console.log('msk 3');
err = true
}
})
......@@ -608,7 +626,7 @@ export default class ProfitLossMR extends Component {
const handleText = (value, tableMeta, type) => {
// dataTable2[tableMeta.rowIndex][type] = value
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = value
console.log(dataTable2);
// console.log(dataTable2);
// console.log(dataTable2[tableMeta.rowIndex]);
}
const handleChange = (value, tableMeta, type) => {
......@@ -729,15 +747,15 @@ export default class ProfitLossMR extends Component {
let total = 0
if (dex === 1) {
// total = Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])
total = R.equals((Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])), Infinity) ? '0' : (Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12]) == "-Infinity" ? '0' : Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12]))
total = R.equals(Number((Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])) * 100), NaN) ? '0' : R.equals(Number((Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])) * 100), Infinity) ? '0' : Number((Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])) * 100 == "-Infinity" ? '0' : (Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])) * 100)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
} else if (dex === 2) {
// total = Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8])
total = R.equals((Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8])), Infinity) ? '0' : (Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8]) == "-Infinity" ? '0' : Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8]))
total = R.equals(Number((Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8])) * 100), NaN) ? '0' : R.equals(Number((Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8]))* 100), Infinity) ? '0' : Number((Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8])) * 100 == "-Infinity" ? '0' : (Number(dataTable2[tableMeta.rowIndex][15]) / Number(dataTable2[tableMeta.rowIndex][8])) * 100)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
} else if (dex === 3) {
// total = Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])
total = R.equals((Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])), Infinity) ? '0' : (Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9]) == "-Infinity" ? '0' : Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9]))
total = R.equals(Number((Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])) * 100), NaN) ? '0' : R.equals(Number((Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])) * 100), Infinity) ? '0' : Number((Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])) * 100 == "-Infinity" ? '0' : (Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])) * 100)
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
}
return total
......@@ -747,12 +765,18 @@ export default class ProfitLossMR extends Component {
// console.log(tableMeta)
let total = 0
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") {
let value = Number(dataTable2[tableMeta.rowIndex - 2][11]) / Number(dataTable2[tableMeta.rowIndex - 1][11])
dataTable2[tableMeta.rowIndex][11] = R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
return R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
} else {
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index == 10) {
let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item
total = Number(tableMeta.rowData[23]) + Number(itemActual)
}
})
}
dataTable2[tableMeta.rowIndex][11] = Number(total).toFixed(1)
return total
......@@ -1596,7 +1620,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={false}
value={tableMeta.rowData[19]}
// value={tableMeta.rowData[19]}
defaultValue={tableMeta.rowData[19]}
inputProps={{
style: {
......@@ -1664,10 +1688,11 @@ export default class ProfitLossMR extends Component {
handleText(event.target.value, tableMeta, 1)
}}
/>
</LightTooltipError> :
</LightTooltipError>
:
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue ? false : true}
......@@ -1675,7 +1700,7 @@ export default class ProfitLossMR extends Component {
defaultValue={tableMeta.rowData[20]}
inputProps={{
style: {
color: Number(tableMeta.rowData[14]) < this.state.minValue || Number(tableMeta.rowData[14]) > this.state.maxValue ? "#5198ea" : '#5198ea',
color: Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue ? "#5198ea" : '#5198ea',
textAlign: 'right'
}
}}
......@@ -1717,10 +1742,11 @@ export default class ProfitLossMR extends Component {
handleText(event.target.value, tableMeta, 2)
}}
/>
</LightTooltipError> :
</LightTooltipError>
:
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={Number(tableMeta.rowData[18]) < this.state.minValue || Number(tableMeta.rowData[18]) > this.state.maxValue ? false : true}
......@@ -1728,7 +1754,7 @@ export default class ProfitLossMR extends Component {
defaultValue={tableMeta.rowData[21]}
inputProps={{
style: {
color: Number(tableMeta.rowData[16]) < this.state.minValue || Number(tableMeta.rowData[16]) > this.state.maxValue ? "#5198ea" : '#5198ea',
color: Number(tableMeta.rowData[18]) < this.state.minValue || Number(tableMeta.rowData[18]) > this.state.maxValue ? "#5198ea" : '#5198ea',
textAlign: 'right'
}
}}
......@@ -1805,7 +1831,7 @@ export default class ProfitLossMR extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.month.month_value} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
......@@ -1968,7 +1994,13 @@ export default class ProfitLossMR extends Component {
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.saveDraft === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -1990,7 +2022,13 @@ export default class ProfitLossMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.buttonError ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>
......@@ -2007,7 +2045,7 @@ export default class ProfitLossMR extends Component {
<div style={{ padding: 20 }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.month.month_value} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......@@ -2022,7 +2060,7 @@ export default class ProfitLossMR extends Component {
)}
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
<div className="col-1" style={{ paddingLeft: 0}}>
<button
type="button"
onClick={() => this.setState({ loading: true, visiblePLMR: true }, () => {
......@@ -2042,7 +2080,7 @@ export default class ProfitLossMR extends Component {
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
<button
className="button"
type="button"
......@@ -2086,7 +2124,13 @@ export default class ProfitLossMR extends Component {
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.saveDraft === true ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
}
</div>
</button>
<button
......@@ -2108,7 +2152,13 @@ export default class ProfitLossMR extends Component {
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
{this.state.buttonError ?
<LightTooltip title={"Data Incomplete"} arrow>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</LightTooltip>
:
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
}
</div>
</button>
</div>
......
......@@ -1351,7 +1351,7 @@ export default class TaxPlanningMR extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()}, {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
......@@ -1556,7 +1556,7 @@ export default class TaxPlanningMR extends Component {
<div style={{ padding: 25 }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()}, {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
{this.state.dataLoaded && (
......
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