Commit 42312799 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'faisal' into 'master'

update OL PA dini hari

See merge request !479
parents 9627018c 2ef941b9
......@@ -68,7 +68,7 @@ export default class ProfitLossOLPA extends Component {
"company_id": this.props.company.company_id,
"outlook_pa_id": this.props.outlook_pa_id
}
api.create().getLastestUpdateMB(payload).then(response => {
api.create().getLastestUpdateOLPA(payload).then(response => {
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -343,20 +343,22 @@ export default class ProfitLossOLPA extends Component {
this.state.dataTable.map(i => {
data.push({
item_report_id: i[1],
total_actual_before: String(Number(i[6]).toFixed(1)),
january: String(Number(i[7]).toFixed(1)),
february: String(Number(i[8]).toFixed(1)),
march: String(Number(i[9]).toFixed(1)),
april: String(Number(i[10]).toFixed(1)),
may: String(Number(i[11]).toFixed(1)),
june: String(Number(i[12]).toFixed(1)),
july: String(Number(i[13]).toFixed(1)),
august: String(Number(i[14]).toFixed(1)),
september: String(Number(i[15]).toFixed(1)),
october: String(Number(i[16]).toFixed(1)),
november: String(Number(i[17]).toFixed(1)),
december: String(Number(i[18]).toFixed(1)),
total_current_year: String(Number(i[19]).toFixed(1)),
total_actual_before: String(Number(i[7]).toFixed(1)),
january: String(Number(i[8]).toFixed(1)),
february: String(Number(i[9]).toFixed(1)),
march: String(Number(i[10]).toFixed(1)),
april: String(Number(i[11]).toFixed(1)),
may: String(Number(i[12]).toFixed(1)),
june: String(Number(i[13]).toFixed(1)),
july: String(Number(i[14]).toFixed(1)),
august: String(Number(i[15]).toFixed(1)),
september: String(Number(i[16]).toFixed(1)),
october: String(Number(i[17]).toFixed(1)),
november: String(Number(i[18]).toFixed(1)),
december: String(Number(i[19]).toFixed(1)),
total_current_year: String(Number(i[20]).toFixed(1)),
total_next_year: String(Number(i[21]).toFixed(1)),
total_more_year: String(Number(i[22]).toFixed(1)),
})
})
let body = {
......@@ -1825,7 +1827,9 @@ export default class ProfitLossOLPA extends Component {
<div style={{ width: '50%' }}>
{this.props.isApprover == true || this.state.dataTable.length == 0 ? null :
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{((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') ) && <a data-tip={'Download Template'} data-for="template">
{((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')) && (
<div>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
......@@ -1837,9 +1841,13 @@ export default class ProfitLossOLPA extends Component {
>
<img src={Images.template} />
</button>
</a>}
</a>
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
{((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') ) && <a data-tip={'Upload'} data-for="upload">
</div>
)}
{((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')) && (
<div>
<a data-tip={'Upload'} data-for="upload">
<button
style={{
backgroundColor: 'transparent',
......@@ -1851,8 +1859,10 @@ export default class ProfitLossOLPA extends Component {
>
<img src={Images.upload} />
</button>
</a>}
</a>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
</div>
)}
<a data-tip={'Download'} data-for="download">
<button
style={{
......@@ -2131,7 +2141,7 @@ export default class ProfitLossOLPA extends Component {
this.setState({ uploadStatus: 'idle', percentage: '0' })
}}
onUpload={() => {
this.state.judul === "Outlook Performance Appraisal - PROFIT LOSS" ?
this.state.judul === "OUTLOOK PA - PROFIT LOSS" ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
}}
......
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