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

Merge branch 'didam' into 'master'

handleLocfArfinNgitungDariBelakang

See merge request !779
parents 6c2cfeb8 02d7a453
......@@ -274,8 +274,8 @@ export default class ListOfCreditFacilities extends Component {
// console.log(dataTable);
if (dataTable.length == 0) {
dataTable.push(
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "" ],
[9, "", "", "", "", "", "Grand Total", null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "" ],
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 0 ],
[9, "", "", "", "", "", {value: "Grand Total"}, null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 999999 ],
)
}
......@@ -695,15 +695,30 @@ export default class ListOfCreditFacilities extends Component {
const handleFormulaHardcode = (value, tableMeta, column) => {
let valuez = 0
if (column == 21) {
valuez = Number(tableMeta.rowData[14]) + Number(tableMeta.rowData[16]) + Number(tableMeta.rowData[19])
} else if (column == 22) {
valuez = Number(tableMeta.rowData[15]) + Number(tableMeta.rowData[17]) + Number(tableMeta.rowData[20])
} else if (column == 23) {
valuez = Number(tableMeta.rowData[12]) - Number(tableMeta.rowData[21])
} else if (column == 24) {
valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22])
if (tableMeta.rowData[0] == 8) {
dataTable2.map((item,index) => {
if (item[6].value.includes(String(tableMeta.rowData[6].value).substr(6,tableMeta.rowData[6].length)) && item[0] != 8) {
valuez += Number(item[column])
}
})
} else if (tableMeta.rowData[0] == 9) {
dataTable2.map((item,index) => {
if (item[0] == 8) {
valuez += Number(item[column])
}
})
} else {
if (column == 21) {
valuez = Number(tableMeta.rowData[14]) + Number(tableMeta.rowData[16]) + Number(tableMeta.rowData[19])
} else if (column == 22) {
valuez = Number(tableMeta.rowData[15]) + Number(tableMeta.rowData[17]) + Number(tableMeta.rowData[20])
} else if (column == 23) {
valuez = Number(tableMeta.rowData[12]) - Number(tableMeta.rowData[21])
} else if (column == 24) {
valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22])
}
}
dataTable2[tableMeta.rowIndex][column] = valuez
return valuez
}
......@@ -711,9 +726,17 @@ export default class ListOfCreditFacilities extends Component {
const handleTambah = (data, rowIndex) => {
// // console.log(dataTable2)
let newData = []
let indexxx = 0
dataTable2.map((item, index) => {
indexxx = index
if (item[6] == "Grand Total") {
item[46] = 999999
} else {
item[46] = indexxx
}
newData.push(item)
if (index == rowIndex) {
indexxx = index + 1
newData.push([
3,
"",
......@@ -760,16 +783,17 @@ export default class ListOfCreditFacilities extends Component {
"",
"",
"",
"" ],
"notez",
indexxx],
)
}
})
dataTable2 = newData.sort((a,b) => a[6].value.localeCompare(b[6].value))
dataTable2 = newData.sort((a,b) => a[46] - b[46])
this.setState({ dataTable: dataTable2 }, () => {
setTimeout(() => {
this.setState({ loading: false })
// // console.log(dataTable2)
console.log(dataTable2)
}, 500)
})
}
......@@ -788,17 +812,164 @@ export default class ListOfCreditFacilities extends Component {
const handleCalculate = () => {
this.setState({ loading: true }, () => {
let bankPrev = ""
let idPrev = 0
let newData = []
let indexxx = 0
dataTable2.map((item, index) => {
let indexId = dataTampungBank.findIndex((val) => val == item[6].value )
if (indexId == -1) {
dataTampungBank.push(item[6].value)
indexxx = index
if (item[6] == "Grand Total") {
item[46] = 999999
} else {
item[46] = indexxx
}
if (bankPrev != "") {
if (item[6].value !== bankPrev) {
if (item[6].value == 'Grand Total') {
// if (dataTable2.length > 2) {
// newData.push(item)
// } else {
if (String(dataTable2[index - 1][6].value).includes('Total ')) {
newData.push(item)
} else {
if (String(dataTable2[index][6].value).includes('Total ')) {
newData.push(item)
} else {
item[46] = index + 1
let nameTotal = String(dataTable2[index - 1][6].value).split("-")
newData.push([
8,
"",
"",
"",
"",
"",
{value: 'Total ' + nameTotal[nameTotal.length - 1]},
null,
"",
this.state.currentDate,
"",
"0",
"",
"0",
"",
"0",
"",
"0",
"",
"",
"0",
"0",
"0",
"0",
"0",
"",
"0",
"",
"0",
"",
"0",
"",
"0",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"notez",
index],
item,
)
}
}
} else {
if (String(dataTable2[index - 1][6].value).includes('Total ')) {
newData.push(item)
} else {
if (String(dataTable2[index][6].value).includes('Total ')) {
newData.push(item)
} else {
item[46] = index + 1
let nameTotal = String(dataTable2[index - 1][6].value).split("-")
newData.push([
8,
"",
"",
"",
"",
"",
{value: 'Total ' + nameTotal[nameTotal.length - 1]},
null,
"",
this.state.currentDate,
"",
"0",
"",
"0",
"",
"0",
"",
"0",
"",
"",
"0",
"0",
"0",
"0",
"0",
"",
"0",
"",
"0",
"",
"0",
"",
"0",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"notez",
index],
item,
)
}
}
}
}
else {
newData.push(item)
}
} else {
bankPrev = item[6].value
idPrev = item[0]
newData.push(item)
}
})
// console.log(dataTampungBank)
// console.log(newData)
setTimeout(() => {
console.log(dataTampungBank)
this.setState({ loading: false })
// console.log(newData)
// console.log(dataTampungBank)
this.setState({ loading: false, dataTable: newData })
}, 100);
})
}
......@@ -913,7 +1084,7 @@ export default class ListOfCreditFacilities extends Component {
return (
<div style={{ width: 96 }}>
{tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9 || tableMeta.rowData[0] === 4 ?
val :
val.value :
<Autocomplete
{...this.state.bankNameList}
id="bankNameList"
......@@ -980,7 +1151,9 @@ export default class ListOfCreditFacilities extends Component {
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right', width: 90 }}>
<ThemeProvider theme={theme}>
{ tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<ThemeProvider theme={theme}>
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', marginBottom: -105 }}
......@@ -996,6 +1169,8 @@ export default class ListOfCreditFacilities extends Component {
}}
/>
</ThemeProvider>
}
</div>
)
}
......@@ -1155,6 +1330,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1182,6 +1375,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1244,6 +1455,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1270,6 +1499,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1331,6 +1578,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1357,6 +1622,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1421,6 +1704,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[18], tableMeta, 18)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
<Input
......@@ -1446,6 +1747,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[20], tableMeta, 20)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1530,6 +1849,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[21], tableMeta, 21)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1553,6 +1890,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[22], tableMeta, 22)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1608,6 +1963,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[23], tableMeta, 23)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1631,6 +2004,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
null :
tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormulaHardcode(tableMeta.rowData[24], tableMeta, 24)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1688,7 +2079,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -1713,7 +2104,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1768,7 +2159,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -1793,7 +2184,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1848,7 +2239,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -1873,7 +2264,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -1928,7 +2319,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -1953,7 +2344,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2011,7 +2402,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2036,7 +2427,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2061,7 +2452,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2122,7 +2513,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2147,7 +2538,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2172,7 +2563,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2233,7 +2624,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2258,7 +2649,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2283,7 +2674,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2344,7 +2735,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2369,7 +2760,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<ThemeProvider theme={theme}>
......@@ -2394,7 +2785,7 @@ export default class ListOfCreditFacilities extends Component {
</div>
<div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
......@@ -2435,22 +2826,25 @@ export default class ListOfCreditFacilities extends Component {
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right', width: 90 }}>
<ThemeProvider theme={theme}>
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent', marginBottom: -105 }}
type="text"
placeholder=""
disabled={false}
defaultValue={tableMeta.rowData[45]}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 45)
// // // console.log(dataTable2)
}}
/>
</ThemeProvider>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<ThemeProvider theme={theme}>
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent', marginBottom: -105 }}
type="text"
placeholder=""
disabled={false}
defaultValue={tableMeta.rowData[45]}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 45)
// // // console.log(dataTable2)
}}
/>
</ThemeProvider>
}
</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