Commit a30d7997 authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

cpsm

See merge request !1155
parents c62d2739 68c1bc05
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -807,19 +807,22 @@ export default class SummaryOfTriputra extends Component { ...@@ -807,19 +807,22 @@ export default class SummaryOfTriputra extends Component {
a.click(); a.click();
} }
} else if (this.state.report.value === 3) { } else if (this.state.report.value === 3) {
alert("Download CPSM Report Coming Soon") // alert("Download CPSM Report Coming Soon")
// let res = await fetch( let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cpsm/export_report?year=${this.state.periode.periode}&&months=${this.state.month.month_id}`
// `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report_detail/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.lastRevision}` let sub_null = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cpsm/export_report?year=${this.state.periode.periode}&&months=${this.state.month.month_id}`
// ) console.log(url);
// res = await res.blob() let res = await fetch(
// this.setState({ loading: false }) this.state.submissionID == null ? sub_null : url
// if (res.size > 0) { )
// let url = window.URL.createObjectURL(res); res = await res.blob()
// let a = document.createElement('a'); this.setState({ loading: false })
// a.href = url; if (res.size > 0) {
// a.download = 'Report DB Profit & Loss.xlsx'; let url = window.URL.createObjectURL(res);
// a.click(); let a = document.createElement('a');
// } a.href = url;
a.download = 'Report CPSM.xlsx';
a.click();
}
} else if (this.state.report.value === 4) { } else if (this.state.report.value === 4) {
// alert("Download Historical Report Coming Soon") // alert("Download Historical Report Coming Soon")
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_historical/export_report?year=${this.state.periode.periode}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_historical/export_report?year=${this.state.periode.periode}`
......
...@@ -4673,8 +4673,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -4673,8 +4673,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
// value={tableMeta.rowData[13]} value={tableMeta.rowData[13]}
value={Number(tableMeta.rowData[13]).toFixed(2)} // value={Number(tableMeta.rowData[13]).toFixed(2)}
/> />
} }
/> />
...@@ -4859,8 +4859,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -4859,8 +4859,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
// value={tableMeta.rowData[19]} value={tableMeta.rowData[19]}
value={Number(tableMeta.rowData[19]).toFixed(2)} // value={Number(tableMeta.rowData[19]).toFixed(2)}
/> />
} }
/> />
...@@ -4942,7 +4942,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -4942,7 +4942,7 @@ export default class TableSummaryTriputra extends Component {
name: `NPAT`, name: `NPAT`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-2x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-2x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1 grid grid-3x" style={{ placeSelf: 'center', textAlign: 'center' }}> <div className="column-1 grid grid-3x" style={{ placeSelf: 'center', textAlign: 'center' }}>
...@@ -5045,8 +5045,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5045,8 +5045,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[25]} value={tableMeta.rowData[25]}
value={Number(tableMeta.rowData[25]).toFixed(2)} // value={Number(tableMeta.rowData[25]).toFixed(2)}
/> />
} }
/> />
...@@ -5128,7 +5128,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -5128,7 +5128,7 @@ export default class TableSummaryTriputra extends Component {
name: `ROIC`, name: `ROIC`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}>
...@@ -5226,7 +5226,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -5226,7 +5226,7 @@ export default class TableSummaryTriputra extends Component {
name: `EBITDA Margin`, name: `EBITDA Margin`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}>
...@@ -5324,7 +5324,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -5324,7 +5324,7 @@ export default class TableSummaryTriputra extends Component {
name: `TPAT Margin`, name: `TPAT Margin`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}>
...@@ -5422,7 +5422,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -5422,7 +5422,7 @@ export default class TableSummaryTriputra extends Component {
name: `% Revenue YoY`, name: `% Revenue YoY`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}>
...@@ -5455,8 +5455,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5455,8 +5455,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
// value={tableMeta.rowData[37]} value={tableMeta.rowData[37]}
value={Number(tableMeta.rowData[37]).toFixed(2)} // value={Number(tableMeta.rowData[37]).toFixed(2)}
/> />
} }
/> />
...@@ -5475,8 +5475,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5475,8 +5475,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[38]} value={tableMeta.rowData[38]}
value={Number(tableMeta.rowData[38]).toFixed(2)} // value={Number(tableMeta.rowData[38]).toFixed(2)}
/> />
} }
/> />
...@@ -5495,8 +5495,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5495,8 +5495,8 @@ export default class TableSummaryTriputra extends Component {
suffix={'%'} suffix={'%'}
placeholder="" placeholder=""
disabled={true} disabled={true}
// value={tableMeta.rowData[39]} value={tableMeta.rowData[39]}
value={Number(tableMeta.rowData[39]).toFixed(2)} // value={Number(tableMeta.rowData[39]).toFixed(2)}
/> />
} }
/> />
...@@ -5526,7 +5526,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -5526,7 +5526,7 @@ export default class TableSummaryTriputra extends Component {
name: `% EBITDA YoY`, name: `% EBITDA YoY`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}>
...@@ -5559,8 +5559,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5559,8 +5559,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[40]} value={tableMeta.rowData[40]}
value={Number(tableMeta.rowData[40]).toFixed(2)} // value={Number(tableMeta.rowData[40]).toFixed(2)}
/> />
} }
/> />
...@@ -5579,8 +5579,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5579,8 +5579,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[41]} value={tableMeta.rowData[41]}
value={Number(tableMeta.rowData[41]).toFixed(2)} // value={Number(tableMeta.rowData[41]).toFixed(2)}
/> />
} }
/> />
...@@ -5599,8 +5599,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5599,8 +5599,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[42]} value={tableMeta.rowData[42]}
value={Number(tableMeta.rowData[42]).toFixed(2)} // value={Number(tableMeta.rowData[42]).toFixed(2)}
/> />
} }
/> />
...@@ -5630,7 +5630,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -5630,7 +5630,7 @@ export default class TableSummaryTriputra extends Component {
name: `% TPAT YoY`, name: `% TPAT YoY`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}>
...@@ -5663,8 +5663,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5663,8 +5663,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[43]} value={tableMeta.rowData[43]}
value={Number(tableMeta.rowData[43]).toFixed(2)} // value={Number(tableMeta.rowData[43]).toFixed(2)}
/> />
} }
/> />
...@@ -5683,8 +5683,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5683,8 +5683,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[44]} value={tableMeta.rowData[44]}
value={Number(tableMeta.rowData[44]).toFixed(2)} // value={Number(tableMeta.rowData[44]).toFixed(2)}
/> />
} }
/> />
...@@ -5703,8 +5703,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5703,8 +5703,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[45]} value={tableMeta.rowData[45]}
value={Number(tableMeta.rowData[45]).toFixed(2)} // value={Number(tableMeta.rowData[45]).toFixed(2)}
/> />
} }
/> />
...@@ -5734,7 +5734,7 @@ export default class TableSummaryTriputra extends Component { ...@@ -5734,7 +5734,7 @@ export default class TableSummaryTriputra extends Component {
name: `% NPAT YoY`, name: `% NPAT YoY`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} > <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#37b5e6' }}>
...@@ -5767,8 +5767,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5767,8 +5767,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[46]} value={tableMeta.rowData[46]}
value={Number(tableMeta.rowData[46]).toFixed(2)} // value={Number(tableMeta.rowData[46]).toFixed(2)}
/> />
} }
/> />
...@@ -5787,8 +5787,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5787,8 +5787,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[47]} value={tableMeta.rowData[47]}
value={Number(tableMeta.rowData[47]).toFixed(2)} // value={Number(tableMeta.rowData[47]).toFixed(2)}
/> />
} }
/> />
...@@ -5807,8 +5807,8 @@ export default class TableSummaryTriputra extends Component { ...@@ -5807,8 +5807,8 @@ export default class TableSummaryTriputra extends Component {
placeholder="" placeholder=""
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
// value={tableMeta.rowData[48]} value={tableMeta.rowData[48]}
value={Number(tableMeta.rowData[48]).toFixed(2)} // value={Number(tableMeta.rowData[48]).toFixed(2)}
/> />
} }
/> />
......
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