Commit e3a4a5ed authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

si freeze notes

See merge request !590
parents ff0dd142 a2e49a97
......@@ -35,6 +35,12 @@ const style2 = {
background: "white",
zIndex: 100
};
const stylenotes = {
position: "sticky",
background: "white",
zIndex: 101,
left: 350
};
export default class ProfitLoss extends Component {
constructor(props) {
......@@ -549,7 +555,7 @@ export default class ProfitLoss extends Component {
if (item == '-' || item == '+' || item == '/' || item == '*') {
opet = item
} else {
arrayJumlah.push(opet == ''? Number(item) : Number(String(opet + String(item))))
arrayJumlah.push(opet == '' ? Number(item) : Number(String(opet + String(item))))
tambahan = false
opet = ""
}
......@@ -559,7 +565,7 @@ export default class ProfitLoss extends Component {
}
}
}
// if (indexs % 2 !== 0) {
// operator.push(item)
// }
......@@ -665,11 +671,18 @@ export default class ProfitLoss extends Component {
name: "Notes",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96 }}>
<TableCell style={{ ...stylenotes, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
setCellProps: () => ({
style: {
position: "sticky",
background: "white",
zIndex: 101,
left: 350
}
}),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right' }}>
......@@ -2169,13 +2182,16 @@ export default class ProfitLoss extends Component {
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent}
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
{!this.state.loading && (
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
)}
</div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
</div>
......@@ -2200,7 +2216,7 @@ export default class ProfitLoss extends Component {
</div>
</button>
</div>
{this.state.dataTable.length == 0 ? null : this.props.isApprover === true ? null :
{this.state.dataTable.length == 0 ? null : this.props.isApprover === true ? null :
(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 className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
......@@ -2284,13 +2300,15 @@ export default class ProfitLoss extends Component {
{this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent}
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
{!this.state.loading && (
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>
)}
</div>
)}
</div>
......
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