Commit 02d7a453 authored by d.arizona's avatar d.arizona

handleLocfArfinNgitungDariBelakang

parent 7c8adec4
...@@ -274,8 +274,8 @@ export default class ListOfCreditFacilities extends Component { ...@@ -274,8 +274,8 @@ export default class ListOfCreditFacilities extends Component {
// console.log(dataTable); // console.log(dataTable);
if (dataTable.length == 0) { if (dataTable.length == 0) {
dataTable.push( 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", "", "", "", "", "", "", "", "", "", "", "", "", "" ], [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, "", "", "", "", "", "Grand Total", null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "" ], [9, "", "", "", "", "", {value: "Grand Total"}, null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 999999 ],
) )
} }
...@@ -695,6 +695,19 @@ export default class ListOfCreditFacilities extends Component { ...@@ -695,6 +695,19 @@ export default class ListOfCreditFacilities extends Component {
const handleFormulaHardcode = (value, tableMeta, column) => { const handleFormulaHardcode = (value, tableMeta, column) => {
let valuez = 0 let valuez = 0
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) { if (column == 21) {
valuez = Number(tableMeta.rowData[14]) + Number(tableMeta.rowData[16]) + Number(tableMeta.rowData[19]) valuez = Number(tableMeta.rowData[14]) + Number(tableMeta.rowData[16]) + Number(tableMeta.rowData[19])
} else if (column == 22) { } else if (column == 22) {
...@@ -704,6 +717,8 @@ export default class ListOfCreditFacilities extends Component { ...@@ -704,6 +717,8 @@ export default class ListOfCreditFacilities extends Component {
} else if (column == 24) { } else if (column == 24) {
valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22]) valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22])
} }
}
dataTable2[tableMeta.rowIndex][column] = valuez dataTable2[tableMeta.rowIndex][column] = valuez
return valuez return valuez
} }
...@@ -711,9 +726,17 @@ export default class ListOfCreditFacilities extends Component { ...@@ -711,9 +726,17 @@ export default class ListOfCreditFacilities extends Component {
const handleTambah = (data, rowIndex) => { const handleTambah = (data, rowIndex) => {
// // console.log(dataTable2) // // console.log(dataTable2)
let newData = [] let newData = []
let indexxx = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
indexxx = index
if (item[6] == "Grand Total") {
item[46] = 999999
} else {
item[46] = indexxx
}
newData.push(item) newData.push(item)
if (index == rowIndex) { if (index == rowIndex) {
indexxx = index + 1
newData.push([ newData.push([
3, 3,
"", "",
...@@ -760,16 +783,17 @@ export default class ListOfCreditFacilities extends Component { ...@@ -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 }, () => { this.setState({ dataTable: dataTable2 }, () => {
setTimeout(() => { setTimeout(() => {
this.setState({ loading: false }) this.setState({ loading: false })
// // console.log(dataTable2) console.log(dataTable2)
}, 500) }, 500)
}) })
} }
...@@ -788,17 +812,164 @@ export default class ListOfCreditFacilities extends Component { ...@@ -788,17 +812,164 @@ export default class ListOfCreditFacilities extends Component {
const handleCalculate = () => { const handleCalculate = () => {
this.setState({ loading: true }, () => { this.setState({ loading: true }, () => {
let bankPrev = ""
let idPrev = 0
let newData = []
let indexxx = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
let indexId = dataTampungBank.findIndex((val) => val == item[6].value ) indexxx = index
if (indexId == -1) { if (item[6] == "Grand Total") {
dataTampungBank.push(item[6].value) 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(() => { setTimeout(() => {
console.log(dataTampungBank) // console.log(newData)
this.setState({ loading: false }) // console.log(dataTampungBank)
this.setState({ loading: false, dataTable: newData })
}, 100); }, 100);
}) })
} }
...@@ -913,7 +1084,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -913,7 +1084,7 @@ export default class ListOfCreditFacilities extends Component {
return ( return (
<div style={{ width: 96 }}> <div style={{ width: 96 }}>
{tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9 || tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9 || tableMeta.rowData[0] === 4 ?
val : val.value :
<Autocomplete <Autocomplete
{...this.state.bankNameList} {...this.state.bankNameList}
id="bankNameList" id="bankNameList"
...@@ -980,6 +1151,8 @@ export default class ListOfCreditFacilities extends Component { ...@@ -980,6 +1151,8 @@ export default class ListOfCreditFacilities extends Component {
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (val, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{ tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Input <Input
disableUnderline={true} disableUnderline={true}
...@@ -996,6 +1169,8 @@ export default class ListOfCreditFacilities extends Component { ...@@ -996,6 +1169,8 @@ export default class ListOfCreditFacilities extends Component {
}} }}
/> />
</ThemeProvider> </ThemeProvider>
}
</div> </div>
) )
} }
...@@ -1155,6 +1330,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1155,6 +1330,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1182,6 +1375,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1182,6 +1375,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1244,6 +1455,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1244,6 +1455,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1270,6 +1499,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1270,6 +1499,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1331,6 +1578,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1331,6 +1578,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1357,6 +1622,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1357,6 +1622,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1421,6 +1704,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1421,6 +1704,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Input <Input
...@@ -1446,6 +1747,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1446,6 +1747,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1530,6 +1849,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1530,6 +1849,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1553,6 +1890,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1553,6 +1890,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1608,6 +1963,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1608,6 +1963,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1631,6 +2004,24 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1631,6 +2004,24 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 ?
null : 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 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1688,7 +2079,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1688,7 +2079,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -1713,7 +2104,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1713,7 +2104,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -1768,7 +2159,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1768,7 +2159,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -1793,7 +2184,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1793,7 +2184,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -1848,7 +2239,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1848,7 +2239,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -1873,7 +2264,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1873,7 +2264,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -1928,7 +2319,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1928,7 +2319,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -1953,7 +2344,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1953,7 +2344,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2011,7 +2402,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2011,7 +2402,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center"> <div className="grid grid-3x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2036,7 +2427,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2036,7 +2427,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2061,7 +2452,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2061,7 +2452,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-3"> <div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2122,7 +2513,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2122,7 +2513,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center"> <div className="grid grid-3x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2147,7 +2538,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2147,7 +2538,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2172,7 +2563,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2172,7 +2563,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-3"> <div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2233,7 +2624,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2233,7 +2624,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center"> <div className="grid grid-3x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2258,7 +2649,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2258,7 +2649,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2283,7 +2674,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2283,7 +2674,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-3"> <div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2344,7 +2735,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2344,7 +2735,7 @@ export default class ListOfCreditFacilities extends Component {
<div className="grid grid-3x content-center"> <div className="grid grid-3x content-center">
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2369,7 +2760,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2369,7 +2760,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
...@@ -2394,7 +2785,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2394,7 +2785,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div className="col-3"> <div className="col-3">
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2435,6 +2826,8 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2435,6 +2826,8 @@ export default class ListOfCreditFacilities extends Component {
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (val, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Input <Input
disableUnderline={true} disableUnderline={true}
...@@ -2451,6 +2844,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2451,6 +2844,7 @@ export default class ListOfCreditFacilities extends Component {
}} }}
/> />
</ThemeProvider> </ThemeProvider>
}
</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