Commit 8255a843 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

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

parents 13943e08 498421f3
...@@ -313,7 +313,7 @@ export default class BudgetTahunan extends Component { ...@@ -313,7 +313,7 @@ export default class BudgetTahunan extends Component {
}; };
let index = data.sort((a, b) => a - b).findIndex((val) => val === (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)) let index = data.sort((a, b) => a - b).findIndex((val) => val === (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod))
// console.log(data) // console.log(data)
// console.log(this.state.lastPeriod) console.log(this.state.lastPeriod)
// console.log(periodeData) // console.log(periodeData)
// console.log(index) // console.log(index)
this.setState({ listPeriode: defaultProps, periode: index === -1 ? periodeData[0] : periodeData[index] }, () => { this.setState({ listPeriode: defaultProps, periode: index === -1 ? periodeData[0] : periodeData[index] }, () => {
...@@ -607,7 +607,7 @@ export default class BudgetTahunan extends Component { ...@@ -607,7 +607,7 @@ export default class BudgetTahunan extends Component {
let canSubmit = true let canSubmit = true
this.state.dataTable.map(item => { this.state.dataTable.map(item => {
if (item[1] !== 'Cash Flow') { if (item[1] !== 'Cash Flow') {
if (item[3] !== "submitted") { if (item[3] !== "submitted" && item[3] !== 'approved') {
canSubmit = false canSubmit = false
array.push(item[3]) array.push(item[3])
} }
......
...@@ -602,7 +602,7 @@ export default class ProfitLoss extends Component { ...@@ -602,7 +602,7 @@ export default class ProfitLoss extends Component {
display: false display: false
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[1] : "Account", name: "Account",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 300 }}> <TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 300 }}>
...@@ -640,7 +640,7 @@ export default class ProfitLoss extends Component { ...@@ -640,7 +640,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[2] : "Notes", name: "Notes",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -678,7 +678,7 @@ export default class ProfitLoss extends Component { ...@@ -678,7 +678,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[3] : `31 Dec ${Number(this.props.periode) - 1} Actual`, name: `31 Dec ${Number(this.props.periode) - 1} Actual`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -715,7 +715,7 @@ export default class ProfitLoss extends Component { ...@@ -715,7 +715,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[4] : `Jan ${this.props.periode}`, name: `Jan ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -804,7 +804,7 @@ export default class ProfitLoss extends Component { ...@@ -804,7 +804,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[5] : `Feb ${this.props.periode}`, name: `Feb ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -894,7 +894,7 @@ export default class ProfitLoss extends Component { ...@@ -894,7 +894,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[6] : `Mar ${this.props.periode}`, name: `Mar ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -984,7 +984,7 @@ export default class ProfitLoss extends Component { ...@@ -984,7 +984,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[7] : `Apr ${this.props.periode}`, name: `Apr ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1074,7 +1074,7 @@ export default class ProfitLoss extends Component { ...@@ -1074,7 +1074,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[8] : `May ${this.props.periode}`, name: `May ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1164,7 +1164,7 @@ export default class ProfitLoss extends Component { ...@@ -1164,7 +1164,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[9] : `Jun ${this.props.periode}`, name: `Jun ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1254,7 +1254,7 @@ export default class ProfitLoss extends Component { ...@@ -1254,7 +1254,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[10] : `Jul ${this.props.periode}`, name: `Jul ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1344,7 +1344,7 @@ export default class ProfitLoss extends Component { ...@@ -1344,7 +1344,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[11] : `Aug ${this.props.periode}`, name: `Aug ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1434,7 +1434,7 @@ export default class ProfitLoss extends Component { ...@@ -1434,7 +1434,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[12] : `Sep ${this.props.periode}`, name: `Sep ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1524,7 +1524,7 @@ export default class ProfitLoss extends Component { ...@@ -1524,7 +1524,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[13] : `Oct ${this.props.periode}`, name: `Oct ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1614,7 +1614,7 @@ export default class ProfitLoss extends Component { ...@@ -1614,7 +1614,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[14] : `Nov ${this.props.periode}`, name: `Nov ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1704,7 +1704,7 @@ export default class ProfitLoss extends Component { ...@@ -1704,7 +1704,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[15] : `Dec ${this.props.periode}`, name: `Dec ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1794,7 +1794,7 @@ export default class ProfitLoss extends Component { ...@@ -1794,7 +1794,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[16] : "Current Total", name: "Current Total",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -1841,7 +1841,7 @@ export default class ProfitLoss extends Component { ...@@ -1841,7 +1841,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[17] : `31 Dec ${Number(this.props.periode) + 1} Total`, name: `31 Dec ${Number(this.props.periode) + 1} Total`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -1931,7 +1931,7 @@ export default class ProfitLoss extends Component { ...@@ -1931,7 +1931,7 @@ export default class ProfitLoss extends Component {
} }
} }
}, { }, {
name: this.state.judulColumn !== null ? this.state.judulColumn[18] : `31 Dec ${Number(this.props.periode) + 2} Total`, name: `31 Dec ${Number(this.props.periode) + 2} Total`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
......
...@@ -27,6 +27,7 @@ export default class CreateReportItems extends Component { ...@@ -27,6 +27,7 @@ export default class CreateReportItems extends Component {
uom: '', uom: '',
weight: '', weight: '',
formula: '', formula: '',
formulasum: '',
realVal: '', realVal: '',
condition: null, condition: null,
date: new Date(), date: new Date(),
...@@ -57,6 +58,7 @@ export default class CreateReportItems extends Component { ...@@ -57,6 +58,7 @@ export default class CreateReportItems extends Component {
msgErrorSD: '', msgErrorSD: '',
msgErrorED: '', msgErrorED: '',
disabledFormula: true, disabledFormula: true,
disabledFormulaSum: true,
disabledCondt: true, disabledCondt: true,
disabledValue: true, disabledValue: true,
options: ['WARNING', 'STOPPER'], options: ['WARNING', 'STOPPER'],
...@@ -761,6 +763,15 @@ export default class CreateReportItems extends Component { ...@@ -761,6 +763,15 @@ export default class CreateReportItems extends Component {
condition: '', condition: '',
realVal: '' realVal: ''
}, () => this.clearMessage()) }, () => this.clearMessage())
: newInputValue.type_item_report_name === 'Formula - Summary' ?
this.setState({
disabledFormula: false,
disabledCondt: true,
disabledValue: true,
formula: '',
condition: '',
realVal: ''
}, () => this.clearMessage())
: this.setState({ : this.setState({
disabledFormula: true, disabledFormula: true,
disabledCondt: true, disabledCondt: true,
......
...@@ -783,7 +783,7 @@ export default class EditReportItems extends Component { ...@@ -783,7 +783,7 @@ export default class EditReportItems extends Component {
style={{ width: '100%' }} style={{ width: '100%' }}
id="formula" id="formula"
label="Formula" label="Formula"
disabled={this.state.InputType == null ? true : (this.state.InputType.type_item_report_name === 'Formula' || this.state.InputType.type_item_report_name === 'Validation' ? false : true)} disabled={this.state.InputType == null ? true : (this.state.InputType.type_item_report_name === 'Formula' || this.state.InputType.type_item_report_name === 'Validation' || this.state.InputType.type_item_report_name === 'Formula - Summary' ? false : true)}
name="formula" name="formula"
error={this.state.errorFormula} error={this.state.errorFormula}
helperText={this.state.msgErrorFormula} helperText={this.state.msgErrorFormula}
......
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